var aLang = new Array();

var img = new Image();
img.src = "";

function setMenuClass(sNodeName, sClassName)
{
  sNodeName.parentNode.className = sClassName;
}

function displayWindowImg(path,width,height,title)
{
	scrollBarsShow = "0";
	if (window.screen.height<height) 
	{
		height=window.screen.height-40;
		scrollBarsShow = "1";
	}
	if (window.screen.width<width)
	{
		width=window.screen.width-10;
		scrollBarsShow = "1";
	}

	var topPosition  = (window.screen.height-30-height)/2;
	var leftPosition = (window.screen.width-width)/2

	var a = window.open("","","top="+topPosition+",left="+leftPosition+",menubar=0,scrollbars="+scrollBarsShow+",resizable=0,width="+width+",height="+height);
	a.document.write ("<html><head><title>"+title+"</title></head>");
	a.document.write ("<body style='margin-left:0;margin-top:0;margin-rigth:0;'>");
	a.document.write ("<img border='0' src='"+path+"' />");
	a.document.write ("<!-- null, null , null , null, null, null , null , null, null, null , null , null, null, null , null , null, null, null , null , null  -->");
	a.document.write ("</body></html>");
	return a;
}

function displayWindowImgSize(url, title)
{
	img.src = url;
	if (img.complete)
	{
		var ua = navigator.userAgent;
		var heightAdd = 8;
		if ((navigator.appName == "Microsoft Internet Explorer") || (ua.indexOf('Opera') != -1)) heightAdd = 0;

		var win = displayWindowImg(url, img.width, img.height+heightAdd, title);
		img = new Image();
		img.src = "";
		return true
	} 
	else
	{
		setTimeout("displayWindowImgSize('"+ url +"', '"+ title +"')", 1000);
	}
}
