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);
	}
}

function main_text_over(ob, number){
	var str = new String();
	str = ob.id;
	str = str.substring(0, 1);
	if (str == 'r')
		document.getElementById(ob).style.backgroundColor = "#FFE9D3";
	else
		document.getElementById(ob).style.backgroundColor = "#FFFFCC";
	for (i=1; i<=number+1; i++)
		document.getElementById(ob + eval(i)).style.color = "#001552";
}

function main_text_out(ob, number){
	var str = new String();
	str = ob.id;
	str = str.substring(0, 1);
	if (str == 'r')
		with(document.getElementById(ob).style){
			backgroundColor = "#FFF3E8";
		}
	else
		with(document.getElementById(ob).style){
			backgroundColor = "#FEFEE5";
		}
	for (i=1; i<=number+1; i++)
		document.getElementById(ob + eval(i)).style.color = "#000000";
}