/* 1999-2000 (c) arti.lt
/  dalys kodo ar ideju pasiskolintos is: dreaweaver, sapient.com
*/

// lib

function open_Popup(name, winName, winWidth, winHeight) {
	if (winWidth == null) winWidth = 500;
	if (winHeight == null) winHeight = 350;
	var newWindow = window.open(name, winName, 'width=' + winWidth + ',height=' + winHeight + ',scrollbars=yes,resizable=yes,toolbar=no,status=yes,menubar=no');
}

function open_Popup_no(name, winName, winWidth, winHeight) {
	if (winWidth == null) winWidth = 500;
	if (winHeight == null) winHeight = 350;
	var newWindow = window.open(name, winName, 'width=' + winWidth + ',height=' + winHeight + ',scrollbars=no,resizable=no,toolbar=no,status=no,menubar=no');
}


function open_Window(name, winName, winWidth, winHeight) {
	if (winWidth == null) winWidth = 500;
	if (winHeight == null) winHeight = 350;
	var newWindow = window.open(name, winName, 'width=' + winWidth + ',height=' + winHeight + ',scrollbars=yes,resizable=yes,toolbar=no,status=yes,menubar=yes');
}


// kiti

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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function showMeniu(){
    if( !meniuActive){
      MM_showHideLayers('jmeniu','','show');
      meniuActive=1;
    }
}

function killMeniu(){
    if( meniuActive){
      MM_showHideLayers('jmeniu','','hide');
      meniuActive=0;
    }
}


function hideMeniu(event) {
        jMeniuHeight = 226;
		jMeniuWidth = 235;
        if (document.all || document.getElementsByName) {
                xPos = event.clientX;
                yPos = event.clientY;
                if ( (xPos == -1) || (xPos >= div_x + jMeniuWidth) || (xPos < div_x) || (yPos >= jMeniuHeight + div_y) || yPos < div_y ) killMeniu();
        }
        else if (document.layers) {
                xPos = event.layerX;
                yPos = event.layerY
                if ( (xPos >= jMeniuWidth) || (xPos < 0) || (yPos > jMeniuHeight) || (yPos < 0) ) killMeniu();
        }
        return;
}

