<!-- 

newdom=0;

var tid;

if (document.all) {

	layerRef="document.all";

	styleSwitch=".style";

}

else if (document.layers) {

	layerRef="document.layers";

  	styleSwitch="";

}

else if(document.getElementById) {

	newdom=1;

	layerRef="document.getElementById";

	styleSwitch=".style";

}





function showLayer(layerName) {

 if (tid) {  clearTimeout(tid)};

	if (newdom) {

	document.getElementById(layerName).style.visibility="visible";

	}

	else {	

	 	eval(layerRef+"['"+layerName+"']"+styleSwitch+'.visibility="visible"');

	}

}

  	

function hideLayer(layerName) {

	if (newdom) {

	document.getElementById(layerName).style.visibility="hidden";

	}

	else {	

	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');

}

}



function off() {

	hideLayer('menu1');

	hideLayer('menu2');

	hideLayer('menu3');

	hideLayer('menu4');	

	hideLayer('menu5');	

	hideLayer('menu6');	

}



function to() {

tid=setTimeout("off()",100);

}


function openAWindow( pageToLoad, winName, width, height, left, center) {
xposition=200; yposition=20;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
}


function NotReady()
{
	alert("Atsiprašome, naujienas galėsite užsisakyti šios savaitės pabaigoje!")
	return false;
}

function Open_WinADV(fname,widthofwin,heightofwin,topofwin,leftconerofwin)
{
options = "toolbar=0,status=0,menubar=0,scrollbars=0," + "resizable=0,top=" + topofwin + ", left=" + leftconerofwin + ", width=" + widthofwin + ",height="+ heightofwin + ",screenx=200,screeny=50";
    pasiulymas = window.open( fname , "advert",options);
}

function setCookie(name, value, expire) {
document.cookie = name + "=" + escape(value)
+ ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}

function getCookie(Name) {
var search = Name + "="
if (document.cookie.length > 0) { 
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length
return unescape(document.cookie.substring(offset, end))
}
}
}

function register(name) {
var today = new Date()
var expires = new Date()
expires.setTime(today.getTime() + 1000*60*30)
setCookie("CounterInfo", name, expires)
}

function Open_WinCoo(fname,widthofwin,heightofwin,topofwin,leftconerofwin)
{
var counter = getCookie("CounterInfo")
if (counter != null) return 
else {
register("Done!"); 
options = "toolbar=0,status=0,menubar=0,scrollbars=0," + "resizable=0,top=" + topofwin + ", left=" + leftconerofwin + ", width=" + widthofwin + ",height="+ heightofwin + ",screenx=200,screeny=50";
    pasiulymas = window.open( fname , "advert",options);
}
}

function check_addr(yyy) {
var retVal=false
if ((yyy.value.indexOf('@') != -1) && (yyy.value.indexOf('.') != -1))
	retVal=true	
return retVal
}

function valFieldsNEWS(theform) {

if (!check_addr(theform.f2)){alert ("Klaidingas el. pašto adresas!"); return false; }
theform.submit();
return true;
}

function Open_WinNormal(fname,widthofwin,heightofwin,topofwin,leftconerofwin)
{
options = "toolbar=0,status=0,menubar=0,scrollbars=0," + "resizable=0,top=" + topofwin + ", left=" + leftconerofwin + ", width=" + widthofwin + ",height="+ heightofwin + ",screenx=200,screeny=50";
    pasiulymas = window.open( fname , "normal", options);

}

function ShowMsg(msg)
{
	alert(msg);
}

function valFieldsTEMA(theform) {

if (theform.f1.value=="" || theform.f4.value=="" || theform.f2.value=="" ) {
alert("Prašome užpildyti visus laukelius!");
return false }
else {
	if (!check_addr(theform.f5)){alert ("Klaidingas el. pašto adresas!"); return false; }
	theform.submit();
	return true;
}
}


function valFieldsATS(theform) {

if (theform.f4.value=="" || theform.f2.value=="" ) {
alert("Prašome užpildyti visus laukelius!");
return false }
else {
	if (!check_addr(theform.f5)){alert ("Klaidingas el. pašto adresas!"); return false; }
	theform.submit();
	return true;
}
}


// -->
