function newWind(url){

	window.open(url,"","width=510,height=550,status=1");
	return false;
}

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 title = document.title;
	//var dir = "http://alpha.linkarta.lt/p/EasySite/EasyAdmin/sys/photos/originals/";
	//var dir = "http://www.kam.lt/new/EasyAdmin/sys/photos/originals/";
	var dir = web_dir + "photos/originals/";

	var html="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
	html+="<html>\n";
	html+="<head>\n";
	html+="<title>" + title + "</title>\n";
	html+="<meta http-equiv='imagetoolbar' content='no'>\n";
//	html+="<meta http-equiv='Content-Type' content='text/html; charset=windows-1257'>\n";
	html+="</head>\n";
//	html+="<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>";
	html+="<body bgcolor='#eff6fe' topmargin=15 leftmargin=15 marginheight=15 marginwidth=15>";
	html+="<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center'>";
	html+="<a onClick='window.close()'><img src='"+dir+img+"' border='0' alt='"+Close[LangId]+"'></a>";
	html+="</td></tr></table>";
	html+="</body>\n";
	html+="</html>\n";

	var Window2=open("","",",scrollbars=yes, resizable=yes, location=no, menubar=no, status=no,");
	Window2.document.open();
	Window2.document.write(html);
	Window2.document.close();
}


function maxPhoto(img,LangId, width, height){
	if(LangId=="34")	LangId="lt";
	if(LangId=="5")		LangId="en";

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

	var title = document.title;
	//var dir = "http://alpha.linkarta.lt/p/EasySite/EasyAdmin/sys/photos/originals/";
	//var dir = "http://www.kam.lt/new/EasyAdmin/sys/photos/originals/";
	var dir = web_dir + "photos/originals/";

	var html="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
	html+="<html>\n";
	html+="<head>\n";
	html+="<title>" + title + "</title>\n";
	html+="<meta http-equiv='imagetoolbar' content='no'>\n";
//	html+="<meta http-equiv='Content-Type' content='text/html; charset=windows-1257'>\n";
	html+="</head>\n";
//	html+="<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>";
	html+="<body bgcolor='#ffffff'>";
	html+="<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center'>";
	html+="<a onClick='window.close()'><img height='"+height+"' width='"+width+"' src='"+dir+img+"' border='0' style='border: 1px solid #E1E1E1;' alt='"+Close[LangId]+"'></a>";
	html+="</td></tr></table>";
	html+="</body>\n";
	html+="</html>\n";

	var Window2=open("","",",scrollbars=yes, resizable=yes, location=no, menubar=no, status=no, height=750, width=990");
	Window2.document.open();
	Window2.document.write(html);
	Window2.document.close();
}

function popitup(url, width, height) {

	var specs = '"width=' + width + ', height=' + (height+50) + '"';
	//var specs = '"width=900, height=700"';

	//alert(specs);
	var newwindow=window.open(url,'name', specs);
	//var newwindow=window.open(url,'name');
	if (window.focus) {newwindow.focus()}
	return false;
}

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 startticker(){
 if (!document.getElementById('ticker')) {
			return;
}
 if(document.getElementById('ticker')) {
   var tick = '<div style="width:'+tWidth+';height:'+tHeight+';overflow:hidden;"';//position:relative;
   if (moStop) tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"'; tick +='><div id="mq" style="position:relative;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 scrollticker() {
  mq.style.left = (parseInt(mq.style.left)>(-10 - aw)) ?parseInt(mq.style.left)-cps+"px" : parseInt(tWidth)+10+"px";
}
