function CheckBrowser()
{
 	sVersion = navigator.appVersion;
	bDom = document.getElementById;
	if(sVersion.indexOf("MSIE 6")>-1 && bDom)
		return "ie6";
	if(sVersion.indexOf("MSIE 5")>-1 && bDom)
		return "ie5";
	if(document.all && !bDom)
		return "ie4";
	if(bDom && parseInt(sVersion) >= 5)
		return "nn5";
	if(document.layers && !bDom)
		return "nn4";
	return "?";
}

function GetObj(sName)
{
	sBrows = CheckBrowser();
 	switch(sBrows)
	{
	 	case "ie6":
	 	case "ie5":
		case "nn5":
			 return document.getElementById(sName);
			 break;
		case "ie4":
			 return document.all[sName];
			 break;
		case "nn4":
			 return document.layers[sName];
		default:
			return null;
	}
}

function OpenMail(No, Nom, TypeRef, Ref, lang)
{
 	oRef = GetObj("ref");
	if(oRef)
	{
		TypeRef = 'Advert';
		Ref = oRef.value;
	}
	eval('open("/mail/formmail_'+lang+'.php?AgentId='+No+'&AgentName='+Nom+'&'+TypeRef+'='+Ref+'","","location=no,menubar=no,resizable=no,scrollbars=no,status=yes,toolbar=no,width=565,height=580")');
}

function Init()
{
	sBrows = CheckBrowser();
 	if((sBrows == "ie6") || (sBrows == "ie5") || (sBrows == "ie4"))
		 return;
 	oObject = GetObj("left_colmap");
	if(window.innerHeight)
		lHeight = window.innerHeight;
	else
		lHeight = screen.availHeight;
	 lHeight = lHeight - 50;
	oObject.style.height = lHeight;
}