﻿function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

function openProject(url){
        window.open(url,null, "height=460,width=530,status=yes,scrollbars=no,toolbar=no,menubar=no,location=no,resizable=yes, left=0, top=0")
        //moveTo(screen.width/2-165,screen.height/2-266)

}

function maxImage(img,LangId){
        if(LangId=="34")        LangId="lt";
        if(LangId=="5")                LangId="en";

        var Close=new Array()
                Close["lt"]="Uþdaryti";
                Close["en"]="Close";

        var dir="http://www.vingida.lt/EasyAdmin/sys/photos/originals/";

        Window2=open("","",",scrollbars=yes, resizable=yes, location=no, menubar=no, status=no,");
        Window2.document.open();
        Window2.document.write("<HEAD><TITLE>Vingida</TITLE></HEAD><META HTTP-EQUIV='imagetoolbar' CONTENT='no'>");
        //Window2.document.write("<script language='JavaScript'>var message='Kopijuoti draudziama.';function click(e) {if (document.all) {if (event.button == 2) {alert(message);return false;}}if (document.layers) {if (e.which == 3) {alert(message);return false;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);}document.onmousedown=click;</script>")
        Window2.document.write("<body bgcolor='#eff6fe' topmargin=15 leftmargin=15 marginheight=15 marginwidth=15>");
        Window2.document.write("<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center'>");
        Window2.document.write("<a onClick='window.close()'><img src='"+dir+img+"' border='0' alt='"+Close[LangId]+"'></a>");
        Window2.document.write("</td></tr></table>");
        Window2.document.write("</body>");
        Window2.document.close();
}

function DisplayError(text){
        var options = 'Width=468px,Height=60px,status=no,resizable=no,scrollbars=no';
        var newWind = window.open('','',options);
        newWind.document.write("<html><body>");
        newWind.document.write("<table cellspacing=10 cellpadding=0 width='100%' height='100%' border=0 align='center'><tr><td>");
        newWind.document.write("<p style='font-size: 12px; color: #cc0000; font-family: verdana; text-align:justify;'>");
        newWind.document.write(text);
        newWind.document.write("</p>");
        newWind.document.write("</td></tr></table>");
        newWind.document.write("</body></html>");
}


function counter(){
 url = "http://www.vingida.lt/statdir/stat.php";

 sg_js="1.3"
 sg_r = "" + Math.random() + "&r=" + escape(document.referrer) + "&pg=" + escape(window.location.href);

 document.cookie = "sg=1; path=/";
 sg_r += "&c=" + (document.cookie ? "1" : "0");

 if (self != top) {
  fr = 1;
 } else {
  fr = 0;
 }
  sg_r += "&fr=" + fr;
 mt = (new Date()).getTimezoneOffset();
 sg_r += "&mt=" + mt;

 sg_r+="&j="+(navigator.javaEnabled()?"1":"0")

 sg_r+="&wh="+screen.width+'x'+screen.height+"&px="+(((navigator.appName.substring(0,3)=="Mic"))?screen.colorDepth:screen.pixelDepth)

 sg_r+="&jv="+sg_js+"&js=1";
//document.write("<a href='" + url + "'><img src='"+ url + "?"+sg_r+"&' border='0' alt='Web Log Analyzer and Page Counter - AWLA' /></a>")
 document.write("<img src='"+ url + "?"+sg_r+"&' border='0' width=0 height=0 />")
 }

 function wopen(pid) {
  var ff = 'http://www.vingida.lt/statdir/stat.php?rurl=http://' + pid;
  window.open(ff, 'spec', 'scrollbars,toolbar,menubar,location,resizable');
}


/*function startticker(){
 if (!document.getElementById('ticker')) {
			return;
		}
 if(document.getElementById('ticker')) {
   var tick = '<div style="position:relative;width:'+tWidth+';height:'+tHeight+';overflow:hidden;background-color:'+tcolour+'"';
   if (moStop) tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"'; tick +='><div id="mq" style="position:absolute;left:0px;top:5px;font-family:'+fontfamily+';font-size:'+fsz+';white-space:nowrap;"></div></div>';
    document.getElementById('ticker').innerHTML = tick;
    mq = document.getElementById("mq");
    mq.style.left=(parseInt(tWidth)+10)+"px"; 
    mq.innerHTML='<span id="tx">'+content+'</span>'; 
    aw = document.getElementById("tx").offsetWidth;
    lefttime=setInterval("scrollticker()",50);
  }
} 
*/


function startticker(){
 if (!document.getElementById('ticker')) {
			return;
		}
 if(document.getElementById('ticker')) {
   var tick = '<div style="position:relative;width:'+tWidth+';height:'+tHeight+';overflow:hidden;background-color:'+tcolour+'"';
   if (moStop) tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"'; tick +='><div id="mq" style="position:absolute;left:0px;top:5px;font-family:'+fontfamily+';font-size:'+fsz+';white-space:nowrap;"></div></div>';
    document.getElementById('ticker').innerHTML = tick;
    mq = document.getElementById("mq");
    mq.style.left=(parseInt(tWidth)+10)+"px"; 
    //mq.innerHTML='<span id="tx">'+content+'</span>';
	mq.innerHTML='<span id="tx"><a href="'+link1+'" class="marquee">'+text1+'</a><a href="'+link2+'" class="marquee">'+text2+'</a></span>';

    aw = document.getElementById("tx").offsetWidth;
    lefttime=setInterval("scrollticker()",50);
  }
} 

function scrollticker() {
  mq.style.left = (parseInt(mq.style.left)>(-10 - aw)) ?parseInt(mq.style.left)-cps+"px" : parseInt(tWidth)+10+"px";
}