//   ##############  SIMPLE  BROWSER SNIFFER
window.moveTo(0,0);
window.resizeTo(screen.availWidth,screen.availHeight);

if (document.layers) {navigator.family = "nn4"}
if (document.all) {navigator.family = "ie4"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"}

//  #########  popup text 
descarray = new Array(
"<tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Glossaire' onclick=__doPostBack('_ctl0:Glossary','')>Glossaire</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Guide de l’utilisateur' onclick=__doPostBack('_ctl0:User_Guide','')>Guide de l’utilisateur</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Formation en ligne' href='#')>Formation en ligne</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Classification des produits' onclick=__doPostBack('_ctl0:Reference_HS','')>Classification des produits</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Codes produits mis à jour' onclick=__doPostBack('_ctl0:Reference_HS962002','')>Codes produits mis à jour</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Couverture des pays' onclick=__doPostBack('_ctl0:Reference_Countries','')>Couverture des pays</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Pays en développement' onclick=__doPostBack('_ctl0:Reference_DC','')>Pays en développement</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Méthodologie' onclick=__doPostBack('_ctl0:Reference_Methodology','')>Méthodologie</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Liens utiles' onclick=__doPostBack('_ctl0:Useful_Links','')>Liens utiles</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Institutions douanières' onclick=__doPostBack('_ctl0:Customs_Institutions','')>Institutions douanières</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Études de cas' onclick=__doPostBack('_ctl0:Case_Studies','')>Études de cas</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Disponibilité des données' onclick=__doPostBack('_ctl0:Data_Availability','')>Disponibilité des données</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Contingents tarifaires' onclick=__doPostBack('_ctl0:Tariff_Quotas','')>Contingents tarifaires</a>&nbsp;</td></tr>",
//"<tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Options et prix' onclick=__doPostBack('_ctl0:Subscription_Fees','')>Options et prix</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='S’enregister' onclick=__doPostBack('_ctl0:Register','')>S’enregister</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Essai gratuit' onclick=__doPostBack('_ctl0:Register_Trial','')>Essai gratuit</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Conditions générales d’utilisation' onclick=__doPostBack('_ctl0:Subscription_Terms','')>Conditions générales d’utilisation</a>&nbsp;</td></tr>",
"<tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Options et prix' onclick=__doPostBack('_ctl0:Subscription_Fees','')>Options et prix</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='S’enregister' href='http://mas-admintools.intracen.org/accounts/NewAccount.aspx' target='NewWindow'>S’enregister</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Essai gratuit' href='http://mas-admintools.intracen.org/accounts/NewAccount.aspx?l=t' target='NewWindow'>Essai gratuit</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Conditions générales d’utilisation' onclick=__doPostBack('_ctl0:Subscription_Terms','')>Conditions générales d’utilisation</a>&nbsp;</td></tr>",
"<tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Organisation' onclick=__doPostBack('_ctl0:AboutUs_fr','')>Organisation</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='News' onclick=__doPostBack('_ctl0:News','')>News</a>&nbsp;</td></tr>",
"<tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Institutions' onclick=__doPostBack('_ctl0:Institutions_fr','')>Institutions</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Pays' onclick=__doPostBack('_ctl0:Countries_fr','')>Pays</a>&nbsp;</td></tr>",
"<tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Collaborations' onclick=__doPostBack('_ctl0:Collaborations','')>Collaborations</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Etudes sur mesure' onclick=__doPostBack('_ctl0:Tailored_Studies','')>Etudes sur mesure</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Projet ACP' onclick=__doPostBack('_ctl0:ACP_Project','')>Projet ACP</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399' title='Objectifs du Millénaire pour le développement' href='http://www.mdg-trade.org' target='NewWindow')>Objectifs du Millénaire pour le développement</a>&nbsp;</td></tr>",
"<tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Nous contacter' onclick=__doPostBack('_ctl0:ContactUs_fr','')>Nous contacter</a>&nbsp;</td></tr><tr height=25 ><td nowrap>&nbsp;<a class=hrefBlue style='text-decoration:none;color: #333399;' title='Réseau des douanes' onclick=__doPostBack('_ctl0:Customs_Network','')>Réseau des douanes</a>&nbsp;</td></tr>"
);

var xPos, yPos;
overdiv="0";
//  #########  CREATES POP UP BOXES 
function PrePopLayer(arrItem)
{
	switch(arrItem)
	{
		case 0:
			if(navigator.family =="nn4") {
				xPos = document.RM.left - 5;
				yPos = document.RM.top + 16;
				}
			else if(navigator.family =="ie4"){
				xPos = RM.style.pixelLeft - 5;
				yPos = RM.style.pixelTop + 16;
				}
			else if(navigator.family =="gecko"){
				xPos = document.getElementById("RM").offsetLeft - 5;
				yPos = document.getElementById("RM").offsetTop + 16;
				}
			break;
		case 1:
			if(navigator.family =="nn4") {
				xPos = document.SP.left - 5;
				yPos = document.SP.top + 16;
				}
			else if(navigator.family =="ie4"){
				xPos = SP.style.pixelLeft - 5;
				yPos = SP.style.pixelTop + 16;
				}
			else if(navigator.family =="gecko"){
				xPos = document.getElementById("SP").offsetLeft - 5;
				yPos = document.getElementById("SP").offsetTop + 16;
				}
			break;
		case 2:
			if(navigator.family =="nn4") {
				xPos = document.AU.left + 10;
				yPos = document.AU.top + 16;
				}
			else if(navigator.family =="ie4"){
				xPos = AU.style.pixelLeft + 10;
				yPos = AU.style.pixelTop + 16;
				}
			else if(navigator.family =="gecko"){
				xPos = document.getElementById("AU").offsetLeft + 10;
				yPos = document.getElementById("AU").offsetTop + 16;
				}
			break;
		case 3:
			if(navigator.family =="nn4") {
				xPos = document.PP.left + 10;
				yPos = document.PP.top + 16;
				}
			else if(navigator.family =="ie4"){
				xPos = PP.style.pixelLeft + 10;
				yPos = PP.style.pixelTop + 16;
				}
			else if(navigator.family =="gecko"){
				xPos = document.getElementById("PP").offsetLeft + 10;
				yPos = document.getElementById("PP").offsetTop + 16;
				}
			break;
		case 4:
			if(navigator.family =="nn4") {
				xPos = document.CS.left - 5;
				yPos = document.CS.top + 16;
				}
			else if(navigator.family =="ie4"){
				xPos = CS.style.pixelLeft - 5;
				yPos = CS.style.pixelTop + 16;
				}
			else if(navigator.family =="gecko"){
				xPos = document.getElementById("CS").offsetLeft - 5;
				yPos = document.getElementById("CS").offsetTop + 16;
				}
			break;
		case 5:
			if(navigator.family =="nn4") {
				xPos = document.CU.left - 5;
				yPos = document.CU.top + 16;
				}
			else if(navigator.family =="ie4"){
				xPos = CU.style.pixelLeft - 5;
				yPos = CU.style.pixelTop + 16;
				}
			else if(navigator.family =="gecko"){
				xPos = document.getElementById("CU").offsetLeft - 5;
				yPos = document.getElementById("CU").offsetTop + 16;
				}
			break;
	}
	//alert(xPos + " " + yPos + " " + DB.style.pixelLeft + " " + navigator.family);
	popLayer(arrItem);
}

function popLayer(a){
if(!descarray[a]){descarray[a]="<font color=red>This popup (#"+a+") isn't setup correctly - needs description</font>";}
if (navigator.family == "gecko") {pad="0"; bord="0"; bordercolor="black";}
else {pad="1"; bord="0";}
desc = 	  "<table cellspacing=0 cellpadding="+pad+" border="+bord+" width=85px><tr><td>\n"
	+"<table cellspacing=0 cellpadding=3 border=0 width=100%>\n"
	+descarray[a]
	+"\n</table>\n"
	+"</td></tr></table>";
if(navigator.family =="nn4") {
	document.objPDMenu.document.write(desc);
	document.objPDMenu.document.close();
	document.objPDMenu.left=xPos; //x+15
	document.objPDMenu.top=yPos; //y-5
	}
else if(navigator.family =="ie4"){
	objPDMenu.innerHTML=desc;
	objPDMenu.style.pixelLeft=xPos;
	objPDMenu.style.pixelTop=yPos;
	}
else if(navigator.family =="gecko"){
	document.getElementById("objPDMenu").innerHTML=desc;
	document.getElementById("objPDMenu").style.left=xPos;
	document.getElementById("objPDMenu").style.top=yPos;
	}
}
function hideLayer(){
if (overdiv == "0") {
	if(navigator.family =="nn4") {eval(document.objPDMenu.top="-500");}
	else if(navigator.family =="ie4"){objPDMenu.innerHTML="";}
	else if(navigator.family =="gecko") {document.getElementById("objPDMenu").style.top="-500";}
	}
}

//  ########  TRACKS MOUSE POSITION FOR POPUP PLACEMENT
var isNav = (navigator.appName.indexOf("Netscape") !=-1);
function handlerMM(e){
x = (isNav) ? e.pageX : event.clientX + document.body.scrollLeft;
y = (isNav) ? e.pageY : event.clientY + document.body.scrollTop;
}
if (isNav){document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove = handlerMM;
//  End -->

function dpb(obj)
{
	__doPostBack(obj.id,'');
}

function MaxWin()
{
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth,screen.availHeight);
}