<!--
agent = navigator.userAgent
browser = 0
selected = ''
if (agent.indexOf("a/3",1) == 6 || agent.indexOf("a/4",1) == 6) {browser = 1} else {browser = 0}
if (browser == 1) {

link1_n = new Image(50,48);
link1_n.src = "img/home.gif";
link1_h = new Image(50,48);
link1_h.src = "img/home1.gif";

}
function nt4(img) {
if (agent.indexOf("WinNT") == -1) {
                return;
        } 
                else {
                document.images[img].src = eval(img + "_c.src")
        }
}
function pass(prima,tipo) {

if (browser == 1) {

if (tipo == 's') {
                if (selected) {
                        nt4(prima)
                        document.images[selected].src = eval(selected + "_n.src")
                }
                nt4(prima)
                document.images[prima].src = eval(prima + "_s.src")
                selected=prima
                }

if (tipo == 'h') {
                if (prima != selected) {
                nt4(prima)
                document.images[prima].src = eval(prima + "_h.src")
                        }
                }

if (tipo == 'n') {
                if (prima != selected) {
                        nt4(prima)
                        document.images[prima].src = eval(prima + "_n.src")
                        }
                }

        }
}

ns4 = (document.layers) ? true : false
ie4 = (document.all) ? true : false

function openMapa(url)
{
window.open(url,'newwindow','width=515,height=260,top:0,left:0,scrollbars=no,resizable=no')
}
function openVijest(url)
{
window.open(url,'newwindow','top=100,left=200,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=0,scrollbars=1, copyhistory=0,width=400,height=350')
}
function openSlika(url)
{
window.open(url,'newwindow','top=5,left=5,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=1,scrollbars=1, copyhistory=0,width=600,height=400')
}
function openServis(url)
{
window.open(url,'newwindow','top=100,left=200,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=0,scrollbars=1,copyhistory=0,width=400,height=300')
}

function gokategorija(parts)
{
  broj=parts.options[parts.selectedIndex].value;
  if (broj>0)
  { 
    URL='proizvodi.php?kategorija_id='+broj;
    location.href =URL;
  }
}

function getradiovalue(o)
{
	for (j=0;j<o.length;j++)
	{
		if (o[j].checked)
			return o[j].value;
	}
	return 0;
}

function checknaruci(parts)
{
	return true;
   var isok = true;
   var nplacanje = getradiovalue(document.forma.placanje);
//   var nplacanje = nplacanje=document.forma.placanje.checked.value;
// var nplacanje = document.forma.placanje.value);

   if (nplacanje==0) isok = false;
   if ((nplacanje==2)&&(document.forma.kredit.value=='')) isok = false;
   if (document.forma.dostava.value==0) isok=false;

//   alert(nplacanje);


//alert('dostava='+document.forma.dostava.value+',placanje='+nplacanje+',kredit='+document.forma.kredit.value);

   document.forma.gumb.disabled=!isok;

//   if ((document.myForm.dostava.value=='')||(document.myForm.placanje.value==''))
//      document.myForm.mySubmit.disabled=true;
//   else
//      document.myForm.mySubmit.disabled=false;
}

//-->


