var secondOn = false;
var currentId = null;

function OpenWin(win,srcFile,popW,popH,scrol) {
		popH=popH+1;
		popW=popW+1;
		parStr = "HEIGHT=" + popH + ",WIDTH=" + popW + "top=20,left=20,screenX=0,screenY=0,scrollbars=no,status=no";
	   	window.open(srcFile,win,parStr);
}

function wop(url, width, height)
{
var w = window.open('', '', 'width=' + width +', height=' + height + ',status=no,menubar=no,resizable=yes,scrollbars=no');
w.document.write('<html><head><title>Informap</title></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><table border="0" align="center" width="100%" height="100%" cellspacing="0" cellpadding="0"><tr><td align=center><a href=\'javascript:window.close();\'><img border="0" src="' + url + '"></a></td></tr></table></body></html>');
w.focus();
}

function wof(url, width, height)
{
var w = window.open('', '', 'width=' + width +', height=' + height + ',status=no,menubar=no,resizable=yes,scrollbars=no');
w.document.write('<html><head><title>Informap</title></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="v_1a" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+url+'" /><param name="quality" value="high" /><param name="bgcolor" value="#666666" /><embed src="'+url+'" quality="high" bgcolor="#666666" width="'+width+'" height="'+height+'" name="v_1a" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></body></html>');
w.focus();
}

function onCountryList(obj) {
//48
//458
var menu = document.getElementById("countryMenu")
menu.style.left=document.body.clientWidth-205
var top =obj.offsetTop
if (top == 0) {
	top =47
}
menu.style.top = top 
menu.style.visibility = 'visible'

}

function offCountryList() {
setTimeout("hideList()",200)

}

function hideList()
{
	if (!secondOn) {
		var menu = document.getElementById("countryMenu")
		if (currentId != null) {
		lastobj = document.getElementById(currentId)
		setStyleName('country',lastobj);
		document.getElementById(currentId+"_list").style.display="none"
		currentId = null;
		}
		menu.style.visibility = 'hidden'
	}
}

function secondListOn()
{
	secondOn = true;
}

function secondListOff()
{
	secondOn = false;
	offCountryList();
}

function setStyleName(stylename,obj) {
obj.className = stylename
}

function openLangMenu(obj){
	var id = obj.id
	if (currentId != id) {
		if (currentId != null) {
		lastobj = document.getElementById(currentId)
		setStyleName('country',lastobj);
		document.getElementById(currentId+"_list").style.display="none"
		}
		setStyleName('country countryOn countryActive',obj);
		document.getElementById(id+"_list").style.display=""
		currentId = id;
	}else {
		currentId = null;
		setStyleName('country countryOn',obj);
		document.getElementById(id+"_list").style.display="none"
	}
}

function deselectList(obj){
if (obj.id != currentId){
	setStyleName('country',obj);
	}
}

function selectList(obj){
	if (obj.id != currentId) {
		secondListOn();
		setStyleName('country countryOn',obj);
	}
}

function selectLang(obj) {
	setStyleName('lang langOn',obj);
}

function deselectLang(obj) {
	setStyleName('lang',obj);
}
