<!--
var agt=navigator.userAgent.toLowerCase();
 var is_major = parseInt(navigator.appVersion);
 var is_minor = parseFloat(navigator.appVersion);

 var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
 var is_nav2 = (is_nav && (is_major == 2));
 var is_nav3 = (is_nav && (is_major == 3));
 var is_nav4 = (is_nav && (is_major == 4));
 var is_nav4up = (is_nav && (is_major >= 4));
 var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) );
 var is_nav6 = (is_nav && (is_major == 5));
 var is_nav6up = (is_nav && (is_major >= 5));

// alert(is_nav4);

 var isIE4=(!document.getElementById&&document.all);
 var isIE5=(document.getElementById&&document.all);
 var isNN4= is_nav4;
 var isNN6= is_nav6up;


 CurrentMenu = 0;
 Closing = 0;
 Closing2 = 0;
 CanClose = 1;
 pradinis = 0;

 if (isNN4 ) pauze=700;
 else pauze = 10;

 //**************************** preload and swap functions **************************
 
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


 
//################################### menu dropdown ################################################################
//################################### menu dropdown ################################################################
//################################### menu dropdown ################################################################

function getas(title, id)
{
  if (isIE4) objektas = document.all(title + id).style;
  if (isIE5 || isNN6) objektas = document.getElementById(title + id).style;
  if (isNN4) objektas = document[title + id];
  return objektas;
}

function showlayer(id)
{
	popmenu = document.getElementById("menu" + id).style;
  	if (popmenu == "undefined" || popmenu=="")
       	return;

  	if (Closing!=0) clearTimeout(TimeOut);
  	if (CurrentMenu!=0)
  	{
    	if (Closing2!=0)
    	{ 
			clearTimeout(TimeOut2);
		}


	    if (CurrentMenu!=id)
		{
	    	//off3(CurrentMenu);
			WCH.Discard('menu' + CurrentMenu);
		}

	    if (CurrentMenu!=id )
			WCH.Discard('menu' + CurrentMenu);


    	senaspopas = document.getElementById("menu" + CurrentMenu).style;
    	senaspopas.visibility = 'hidden';
  	}
  	CurrentMenu=id;

  	popmenu.visibility = 'visible';

	WCH.Apply('menu' + id);

}


function hidelayer(id)
{
//   off(id);
   tmp = getas ("menu", id);
   tmp.visibility="hidden";
//   if(selected !=0 )   { pradinis=1; }
}

function trytohide(id)
{
  Closing=1;
  TimeOut=setTimeout("hidelayer("+id+")",pauze);
}


function rodom(id)   { 
	showlayer(id); 
}
function nerodom(id)
{
 if (isNN4 || isNN6 )  trytohide(id);
 else   hidelayer(id);
}

function rodom2(id)
{
  if (isNN4){ showlayer(id);}
  return false;
}

function nerodom2(id)
{
  if (isNN4) trytohide(id);
}

function change_color2(id,color)
{
  if (isNN4) return;
  if (selected==id ) return;
  change_color("td1_", id, color);
  change_color("td2_", id, color);
}

function change_color(title, id, color)
{
  tmp = getas(title, id );
  tmp.backgroundColor=color;
}

function checkall(form_name)
{
	var frm = document.getElementById( form_name );
    for (var i=0;i<frm.elements.length;i++)
    {
		var e = frm.elements[i];
      	if (( e.name.substr(0,9) == 'check_ids') && (e.type=='checkbox'))
      	{
        		e.checked = 1 - e.checked;
     	}
 	}
}

function is_checked(form_name)
{
	var frm = document.getElementById(form_name);
	for (var i=0; i<frm.elements.length; i++)
	{
		var e = frm.elements[i];
		if ((e.type == 'checkbox') && (e.name.substr(0,9) == 'check_ids') &&
			(e.checked)) return true;
	}
	return false;
}

function try_order_goods(form_name, err_str)
{
	var frm = document.getElementById(form_name);
	if (is_checked(form_name))
	{
		frm.action.value=frm.buy_action.value;
		return true;
	}
	else
	{
		alert(err_str);
		return false;
	}
}

//-->
