function ShowTopPhoto(img,language){

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

//newImg = new Image();
//newImg.src = img;

//getImageSize(img);


Window2=open("","","scrollbars=1,width=800,height=600,fullscreen=0,resizable=1");
Window2.document.open();
Window2.document.write("<HEAD><TITLE>IPA</TITLE>");
Window2.document.write("<scri"+"pt src='http://www.ipa.lt/js/other.js'>"+"</scr"+"ipt>");
Window2.document.write("</HEAD>");
Window2.document.write("<body bgcolor='#EFEFEF' topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>");
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='"+img+"' border='0' alt=''></a>");
Window2.document.write("</td></tr></table>");
Window2.document.write("<scri"+"pt >document.onload=getImageSize('"+img+"')</scr"+"ipt>");
Window2.document.write("</body>");
Window2.document.close();

}


function getImageSize(img){
	newImg = new Image();
	newImg.src = img;
	height = newImg.height;
	width = newImg.width;
//	alert(width+" "+height);
	if (height!=0 && width!=0)	{
		height = parseFloat(height) + 100;
		width = parseFloat(width) + 50;
		window.resizeTo(width,height);
	} else {
		
	}
	
}



function ShowNewsTopPhoto(img, language, width,height){

if (width) w=parseFloat(width)+50; else  w='800';
if (height) h=parseFloat(height)+50; else  h='600';



Window2=open("","","scrollbars=1,width="+w+",height="+h+",fullscreen=0,resizable=1");
Window2.document.open();
Window2.document.write("<HEAD><TITLE>IPA</TITLE>");
Window2.document.write("<scri"+"pt src='http://www.ipa.lt/js/other.js'>"+"</scr"+"ipt>");
Window2.document.write("</HEAD>");
Window2.document.write("<body bgcolor='#EFEFEF' topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>");
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='"+img+"' border='0' alt=''></a>");
Window2.document.write("</td></tr></table>");

Window2.document.write("</body>");
Window2.document.close();

}

