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://www.plunge.lt/EasyAdmin/sys/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 popitup(url)
{
	newwindow=window.open(url,'name','width=780 height=560');
	if (window.focus) {newwindow.focus()}
	return false;
}

function function_exists( function_name ) { 
    if (typeof function_name == 'string'){
        return (typeof window[function_name] == 'function');
    } else{
        return (function_name instanceof Function);
    }
}


