ua = navigator.userAgent;
browserCheck = 0;
isIE4 = 0;
isN6 = 0;

pos  = ua.indexOf("MSIE");

 if  (ua.indexOf("Opera") > 0 )
browserCheck = 0;
else if  (pos > 0 )
{
 browserCheck = 1;	
 
	if (ua.charAt(pos + 5) >= 5 ) {
	isIE4 = 0;
	}
	else
	{
	isIE4 = 1;
	}
	  
}
else if  (ua.indexOf("Netscape") > 0 )
{

	if (parseInt(navigator.appVersion) >= 5) {
	isN6 = 1;
	browserCheck = 1;	
	}
	else {
	isN6 = 0;
	browserCheck = 0;	
	}
}
else
browserCheck = 0;


//isIE4 = 1;

if (browserCheck==0){
document.location.href = "dlevel.htm"
}


function showMenu()
{
tgt=window.event.srcElement.id;
obj = document.getElementById(tgt);
obj.style.backgroundImage = "url(menu.jpg)";
}


function hideMenu()
{
tgt=window.event.srcElement.id;
obj = document.getElementById(tgt);
obj.style.backgroundImage = "none";
}


function showMenu2(tgt)
{
if (!isIE4) {
//tgt=window.event.srcElement.id; //does this work in Netscape

tgt2 = tgt + "pic";
obj = document.getElementById(tgt2);
obj.style.display = "block";
obj = document.getElementById(tgt);
obj.style.fontWeight="bold";
}
else
{

//tgt=window.event.srcElement.id;
tgt2 = tgt + "pic"; 
eval("document.all." + tgt2 + ".style.display = 'block'");
eval("document.all." + tgt + ".style.fontWeight='bold'");
}


}


function hideMenu2(tgt)
{
if (!isIE4) {
//tgt=window.event.srcElement.id;
tgt2 = tgt + "pic";
obj = document.getElementById(tgt2);
obj.style.display = "none";
obj = document.getElementById(tgt);
obj.style.fontWeight="normal";
}
else
{
//tgt=window.event.srcElement.id;
tgt2 = tgt + "pic";
eval("document.all." + tgt2 + ".style.display = 'none'");
eval("document.all." + tgt + ".style.fontWeight='normal'");
}
}


indWinFlag = 'notCalled';

function showInd(whc)
{

zone = "http://www.protectorproducts.com/industry.htm?" + whc;
//zone = "industry.htm?" + whc;

if (indWinFlag == 'notCalled') {
indWin=window.open(zone, "winInd", "width=725,height=565,top=0,left=0,scrollbars=yes");
indWinFlag='called';
}
else
{
	//if (indWin != 'undefined') {
	if (indWin.closed == false) 
	indWin.close();
	//}
	

indWin = window.open(zone, "winInd", "width=725,height=565,top=0,left=0,scrollbars=yes");
}
}

packFlag = 'notCalled';
function showPackPage(whc)
{

if (packFlag == 'notCalled') {
packFlag='called';

if (whc=='pack1')
packWin=window.open('pack1.htm', "winPro", "width=690,height=570,top=0,left=0,scrollbars=no");
else if (whc=='pack2')
packWin=window.open('pack2.htm', "winPro", "width=690,height=420,top=0,left=0,scrollbars=no");
else if (whc=='pack3')
packWin=window.open('pack3.htm', "winPro", "width=690,height=525,top=0,left=0,scrollbars=no");
else if (whc=='pack4')
packWin=window.open('pack4.htm', "winPro", "width=690,height=450,top=0,left=0,scrollbars=no");
else if (whc=='pack5')
packWin=window.open('pack5.htm', "winPro", "width=690,height=525,top=0,left=0,scrollbars=no");
else if (whc=='pack6')
packWin=window.open('pack6.htm', "winPro", "width=690,height=520,top=0,left=0,scrollbars=no");
else
n=2;

}
else 
{
	//if (packWin != 'undefined') {
	if (packWin.closed == false) {
	packWin.close();
	}
	//}

	if (whc=='pack1')
packWin=window.open('pack1.htm', "winPro", "width=690,height=570,top=0,left=0,scrollbars=no");
else if (whc=='pack2')
packWin=window.open('pack2.htm', "winPro", "width=690,height=420,top=0,left=0,scrollbars=no");
else if (whc=='pack3')
packWin=window.open('pack3.htm', "winPro", "width=690,height=525,top=0,left=0,scrollbars=no");
else if (whc=='pack4')
packWin=window.open('pack4.htm', "winPro", "width=690,height=450,top=0,left=0,scrollbars=no");
else if (whc=='pack5')
packWin=window.open('pack5.htm', "winPro", "width=690,height=525,top=0,left=0,scrollbars=no");
else if (whc=='pack6')
packWin=window.open('pack6.htm', "winPro", "width=690,height=520,top=0,left=0,scrollbars=no");
else
n=2;


}


}

function welcome(who)
{
if (!isIE4) {
obj = document.getElementById("ger");
obj.style.display = "none";
obj = document.getElementById("eng");
obj.style.display = "none";
obj = document.getElementById("fra");
obj.style.display = "none";
obj = document.getElementById("ita");
obj.style.display = "none";
obj = document.getElementById("spa");
obj.style.display = "none";
obj = document.getElementById("jap");
obj.style.display = "none";
obj = document.getElementById(who);
obj.style.display = "block";

}
else
{
eval("document.all." + "ger" + ".style.display = 'none'");
eval("document.all." + "eng" + ".style.display = 'none'");
eval("document.all." + "fra" + ".style.display = 'none'");
eval("document.all." + "ita"+ ".style.display = 'none'");
eval("document.all." + "spa" + ".style.display = 'none'");
eval("document.all." + "jap" + ".style.display = 'none'");
eval("document.all." + who + ".style.display = 'block'");

}

}

function goPage(whc)
{
eval("document.location.href ='" +  whc + "'");
}
