// ver. 1.3.3  CONTACT PERSONS


window.status = "Copyright Intervalve Oldenzaal B.V. 2002";
var unself
var activeMenu = 0;


function activateMenu(menuLayerRef, left, top, height, width) {
	if (loadcheck == 1) {
	if (activeMenu) hideMenu(activeMenu); 
	imgID = "im" + menuLayerRef;
	activeMenu = menuLayerRef;
	layerMoveTo("HOOFDMENU", layerGetX(imgID)+left, layerGetY(imgID)+top)
	layerResizeTo("HOOFDMENU", width, height);
	layerResizeTo("str" + menuLayerRef, 150,1);
	layerResizeTo("tbj", width, height);
	layerShow("menu" + menuLayerRef);
	layerShow("HOOFDMENU");
	}
}


function hideMenu(layerID) {
	layerHide("HOOFDMENU");
	layerResizeTo("str" + layerID, 100,1);
	layerHide("menu" + layerID);
}


function turnOff() {
	if (activeMenu) {
		hideMenu(activeMenu);
		activeMenu = 0;
	}
}


function timer(offon) {
	if (offon == 0)	{
		unself = setTimeout('turnOff()', 1200);
	}
	if (offon ==1)	{
		clearTimeout(unself);
	}
}


var loadcheck;
function preload() {
	menu = new Array()

	menu[01] = "http://www.sempell.com/intervalve/menu/company.jpg";
	menu[02] = "http://www.sempell.com/intervalve/menu/company-a.jpg";
	menu[03] = "http://www.sempell.com/intervalve/menu/products.jpg";
	menu[04] = "http://www.sempell.com/intervalve/menu/products-a.jpg";
	menu[05] = "http://www.sempell.com/intervalve/menu/quality.jpg";
	menu[06] = "http://www.sempell.com/intervalve/menu/quality-a.jpg";
	menu[07] = "http://www.sempell.com/intervalve/menu/contact.jpg";
	menu[08] = "http://www.sempell.com/intervalve/menu/contact-a.jpg";
	menu[09] = "http://www.sempell.com/intervalve/menu/references.jpg";
	menu[10] = "http://www.sempell.com/intervalve/menu/references-a.jpg";
	menu[11] = "http://www.sempell.com/intervalve/menu/support.jpg";
	menu[12] = "http://www.sempell.com/intervalve/menu/support-a.jpg";
	im = new Array()
	for (var i = 1; i < menu.length; i++){
		im[i] = new Image()
		im[i].src = menu[i]
	}
	loadcheck = 1;
}


function display(num,imgname){
	if (loadcheck == 1) {
		imgname.src = im[num].src
	}
}


function init() {
	preload();
	initBrowserComp();
	var s
	s='<div id=im1 style="position:absolute; left: 0px; top: 41px;"><A href="http://www.sempell.com/intervalve/company.php?language=en&item=Company" target=home onmouseout="display(01,img1);" onmouseover="display(02,img1);turnOff();"><IMG border=0 id=img1 src="http://www.sempell.com/intervalve/menu/company.jpg" alt="Company"></A></DIV>'; 
	s+='<div id=im2 style="position:absolute; left: 0px; top: 73px;"><A onmouseout="display(03,img2);timer(0);" onmouseover="display(04,img2);activateMenu(2,125,21,33,170);timer(1);"><IMG border=0 id=img2 src="http://www.sempell.com/intervalve/menu/products.jpg" alt="Products"></A></DIV>'; 
	s+='<div id=im3 style="position:absolute; left: 0px; top:105px;"><A onmouseout="display(05,img3);timer(0);" onmouseover="display(06,img3);activateMenu(3,125,21,22,145);timer(1);"><IMG border=0 id=img3 src="http://www.sempell.com/intervalve/menu/quality.jpg" alt="Quality"></A></DIV>';
	s+='<div id=im4 style="position:absolute; left: 0px; top:137px;"><A href="http://www.sempell.com/intervalve/contact.php?item=Request_for_Information&language=en" target=home onmouseout="display(07,img4);" onmouseover="display(07,img4);turnOff();"><IMG border=0 id=img4 src="http://www.sempell.com/intervalve/menu/contact.jpg" alt="Contact"></A></DIV>';
	
//	s+='<div id=im4 style="position:absolute; left: 0px; top:137px;"><A onmouseout="display(07,img4);timer(0);" onmouseover="display(08,img4);activateMenu(4,125,21,33,160);timer(1);"><IMG border=0 id=img4 src="http://www.sempell.com/intervalve/menu/contact.jpg" alt="Contact"></A></DIV>'; 
//	s+='<div id=im6 style="position:absolute; left: 0px; top:169px;"><A href="http://cms.mhwd.com/tabel.php?sid=105&type=117&page=references&zoekkolom=kolom1&item=References" target=home onmouseout="display(09,img6);" onmouseover="display(10,img6);turnOff();"><IMG border=0 id=img6 src="http://www.sempell.com/intervalve/menu/references.jpg" alt="References"></A></DIV>'; 
	s+='<div id=im5 style="position:absolute; left: 0px; top:201px;"><A onmouseout="display(11,img5);timer(0);" onmouseover="display(12,img5);activateMenu(5,125,21,66,165);timer(1);"><IMG border=0 id=img5 src="http://www.sempell.com/intervalve/menu/support.jpg" alt="Support"></A></DIV>'; 
	s+='<div style="position:absolute; left: 8px; top:  67px;"><img id=str1 src="http://www.sempell.com/intervalve/menu/streepje.gif" height=1 width=100></DIV>'; 	
	s+='<div style="position:absolute; left: 8px; top:  99px;"><img id=str2 src="http://www.sempell.com/intervalve/menu/streepje.gif" height=1 width=100></DIV>'; 	
	s+='<div style="position:absolute; left: 8px; top: 131px;"><img id=str3 src="http://www.sempell.com/intervalve/menu/streepje.gif" height=1 width=100></DIV>'; 	
	s+='<div style="position:absolute; left: 8px; top: 163px;"><img id=str4 src="http://www.sempell.com/intervalve/menu/streepje.gif" height=1 width=100></DIV>'; 	
	s+='<div style="position:absolute; left: 8px; top: 195px;"><img id=str0 src="http://www.sempell.com/intervalve/menu/streepje.gif" height=1 width=100></DIV>'; 	
	s+='<div style="position:absolute; left: 8px; top: 227px;"><img id=str5 src="http://www.sempell.com/intervalve/menu/streepje.gif" height=1 width=100></DIV>'; 
	s+='<div id=HOOFDMENU style="position:absolute; left:117; width:265; z-index:10; visibility: hidden; border-right: #000000 0px solid; border-top: #000000 0px solid; border-left: #000000 0px solid; border-bottom: #000000 0px solid; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">'; 
	s+='<div id=menu2 class="menu" onmouseover="timer(1);display(04,img2);" onmouseout="timer(0);display(03,img2);">		<a href="http://www.sempell.com/intervalve/products.php?language=en&item=High_Pressure_Gate_Valves" onclick="turnOff();">High Pressure Gate Valves</a><BR>		<a href="http://www.sempell.com/intervalve/products.php?language=en&item=High_Pressure_Globe_Valves" onclick="turnOff();">High Pressure Globe Valves</a><BR>		<a href="http://www.sempell.com/intervalve/products.php?language=en&item=High_Pressure_Check_Valves" onclick="turnOff();">High Pressure Check Valves</a><BR>		<a href="http://www.sempell.com/intervalve/products.php?language=en&item=Miscelaneous_Products" onclick="turnOff();">Miscelaneous Products</a>	</div>'; 
	s+='<div id=menu3 class="menu" onmouseover="timer(1);display(06,img3);" onmouseout="timer(0);display(05,img3);">		<a href="http://www.sempell.com/intervalve/quality.php?language=en&item=Certification" onclick="turnOff();">Certification</a>	</div>'; 
//	s+='<div id=menu4 class="menu" onmouseover="timer(1);display(08,img4);" onmouseout="timer(0);display(07,img4);">		<a href="http://www.sempell.com/intervalve/contact.php?language=en&item=Location" onclick="turnOff();">Location</a><BR>		<a href="http://www.sempell.com/intervalve/contact.php?language=en&item=Contactpersons" onclick="turnOff();">Contactpersons</a><BR></div>'; 
	s+='<div id=menu5 class="menu" onmouseover="timer(1);display(12,img5);" onmouseout="timer(0);display(11,img5);">		<a href="http://www.sempell.com/intervalve/support.php?language=en&item=Drawings" onclick="turnOff();">Drawings</a><BR>		<a href="http://www.sempell.com/intervalve/support.php?language=en&item=Pressure_drop" onclick="turnOff();">Pressure drop</a><BR>		<a href="http://www.sempell.com/intervalve/support.php?language=en&item=CV_values" onclick="turnOff();">CV values</a><BR>		<a href="http://www.sempell.com/intervalve/support.php?language=en&item=Material_properties" onclick="turnOff();">Material properties</a><BR>		<a href="http://www.sempell.com/intervalve/support.php?language=en&item=Butt_welding_ends" onclick="turnOff();">Butt welding ends</a><BR>		<a href="http://www.sempell.com/intervalve/support.php?language=en&item=Figure_number_composition" onclick="turnOff();">Figure number composition</a>	<BR><a href="http://www.sempell.com/intervalve/support.php?language=en&item=Manuals" onclick="turnOff();">Manuals</a></div>'; 
/*	if (browser.ns6 || browser.ie6) {
		s+='<table width=100% CELLPADDING=0 cellspacing=0 border=0>		<TR height=5>			<TD style="font-size: 1px;" width=2 background="http://www.sempell.com/intervalve/fadertje.gif">&nbsp;</TD>			<TD style="font-size: 1px; FILTER: alpha(opacity=0);">&nbsp;</TD>			<TD style="font-size: 1px; FILTER: alpha(opacity=0);" width=10>&nbsp;</TD>		</TR>		<TR height=10>			<TD class="mnubck" background="http://www.sempell.com/intervalve/menu/hlb.gif">&nbsp;</TD>			<TD class="mnubck" background="http://www.sempell.com/intervalve/menu/lijnboven.gif">&nbsp;</TD>			<TD class="mnubck" background="http://www.sempell.com/intervalve/menu/hrb.gif">&nbsp;</TD>		</TR>		<TR id=tbj style="">			<TD class="mnubck" background="http://www.sempell.com/intervalve/menu/lijnlinks.gif">&nbsp;</TD>			<TD class="mnubck">&nbsp;</TD>			<TD class="mnubck" background="http://www.sempell.com/intervalve/menu/lijnrechts.gif">&nbsp;</td>		</tr>		<TR height=10>			<TD class="mnubck" background="http://www.sempell.com/intervalve/menu/hlo.gif">&nbsp;</TD>			<TD class="mnubck" background="http://www.sempell.com/intervalve/menu/lijnonder.gif">&nbsp;</TD>			<TD class="mnubck" background="http://www.sempell.com/intervalve/menu/hro.gif">&nbsp;</TD>		</TR>	</table></DIV>'; 
	}
	else {
*/		s+='<table width=100% CELLPADDING=0 cellspacing=0 border=0>		<TR height=5>			<TD style="" width=2><img src="http://www.sempell.com/intervalve/menu/fadertje.gif" width=2 height=5></TD>			<TD style="FILTER: alpha(opacity=0);">         <img style="visibility: hidden;" src="http://www.sempell.com/intervalve/menu/fadertje.gif" width=2 height=5></TD>			<TD style="FILTER: alpha(opacity=0);" width=10><img style="visibility: hidden;" src="http://www.sempell.com/intervalve/menu/fadertje.gif" width=2 height=5></TD>		</TR>		<TR height=10>			<TD class="mnubck" width=2> <img src="http://www.sempell.com/intervalve/menu/hlb.gif" width=2 height=10></TD>			<TD class="mnubck">         <img src="http://www.sempell.com/intervalve/menu/lijnboven.gif" width=100% height=10></TD>			<TD class="mnubck" width=10><img src="http://www.sempell.com/intervalve/menu/hrb.gif" width=10 height=10></TD>		</TR>		<TR id=tbj style="">			<TD class="mnubck"><img src="http://www.sempell.com/intervalve/menu/lijnlinks.gif" width=2 height=100%></TD>			<TD class="mnubck">&nbsp;</TD>			<TD class="mnubck"><img src="http://www.sempell.com/intervalve/menu/lijnrechts.gif" width=10 height=100%></td>		</tr>		<TR height=10>			<TD class="mnubck"><img src="http://www.sempell.com/intervalve/menu/hlo.gif" width=2 height=10></TD>			<TD class="mnubck"><img src="http://www.sempell.com/intervalve/menu/lijnonder.gif" width=100% height=10></TD>			<TD class="mnubck"><img src="http://www.sempell.com/intervalve/menu/hro.gif" width=10 height=10></TD>		</TR>	</table></div>'; 
//	}
	layerHTMLWrite("LTJ", s);
	s=''
}


var FREELAYERS = new Array();
var browser = new browserObject();


function browserObject() {
	this.ver = navigator.appVersion;
	this.dom = document.getElementById?1:0;
	this.ie = (navigator.appName == "Microsoft Internet Explorer");
	this.ns = (navigator.appName == "Netscape");
	this.moz = ((navigator.userAgent.indexOf("Mozilla")!=-1)&&(navigator.userAgent.indexOf("Gecko")!=-1)&&(navigator.userAgent.indexOf("Netscape6")==-1));
	this.mac = (navigator.appVersion.indexOf("Mac")>0);
	this.win = (navigator.appVersion.indexOf("Win")>0);
	this.xwin = (navigator.appVersion.indexOf("X11")>0);
	this.opera = (navigator.userAgent.indexOf('Opera')!=-1);
	this.ie4 = (this.ie && !this.dom);
	this.ie5 = (this.ie && this.ver.indexOf("MSIE 5")>-1);
	this.ie6 = (this.ie && this.ver.indexOf("MSIE 6")>-1);
	this.ns4 = (this.ns && this.ver.indexOf("4.")>-1);
	this.ns6 = (this.ns && this.ver.indexOf("5.")>-1&&this.dom);
	this.ns60 = (this.ns6 && navigator.userAgent.indexOf('6.0')!=-1);
	this.ns61 = (this.ns6 && navigator.userAgent.indexOf('6.1')!=-1);
	this.compatible=((this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6) && !this.opera);
	this.width = null; //to be set later after document is loaded;
	this.height = null; //to be set later after document is loaded;
	return this;
}


function initBrowserComp() {
	if (browser.compatible) {
		if (browser.ie) {
			browser.width = document.body.clientWidth;
			browser.height = document.body.clientHeight;
			if(!browser.ie6) {
				Array.prototype.push = ArrayPush;
				Array.prototype.pop = ArrayPop;
			}
		}
		else if (browser.ns4) {
			browser.width = window.innerWidth;
			browser.height = window.innerHeight;
			initResizeBug();
		}
		else if (browser.ns6) {
			browser.width = window.innerWidth;
			browser.height = window.innerHeight;
		}
		else if(browser.opera) {
			browser.width = window.innerWidth;
			browser.height = window.innerHeight;
		}
		return (true);
	}
	else {
		return (true);

	}
}


function layerGetRef( ID ) {
	if (browser.ns6) return document.getElementById(ID);
	else if (browser.ns4) return document.layers[ID];
	else return document.all[ID];
}


function layerMoveTo( ID, x, y) {
	var thisID = layerGetRef(ID);
	if (browser.ns4) thisID.moveTo(x, y);
	else {
		thisID.style.left = x;
		thisID.style.top = y;
	}
}
function layerResizeTo( ID, w, h) {
	var thisID = layerGetRef(ID);
	if (browser.ns4) {
		thisID.resizeTo(w,h);
		thisID.document.width = w;
		thisID.document.height = h;
	}
	else {
		thisID.style.width = w+"px";
		thisID.style.height = h+"px";
	}
}
function layerShow( ID ) {
	var thisID = layerGetRef(ID);
	if (browser.ns4) thisID.visibility = "show";
	else thisID.style.visibility = "visible";

}
function layerHide( ID ) {
	var thisID = layerGetRef(ID);
	if (browser.ns4) thisID.visibility = "hide";
	else thisID.style.visibility = "hidden";
}
function layerGetX( ID ) {
	var thisID = layerGetRef(ID);
	if(browser.ns4) return thisID.left;
	else return parseInt(thisID.style.left);
}
function layerGetY( ID ) {
	var thisID = layerGetRef(ID);
	if(browser.ns4) return thisID.top;
	else return parseInt(thisID.style.top);
}


function initResizeBug() {
	document.orPageWidth = innerWidth;
	document.orPageHeight = innerHeight;
	onresize = nsResizeBug;
}
function nsResizeBug() {
	if (innerWidth != document.orPageWidth || innerHeight != document.orPageHeight) location.reload();
}
function ArrayPush(the_element) {
	this[this.length] = the_element;
}
function ArrayPop(the_element) {
	var the_value = this[this.length-1];
	this.length--;
	return(the_value);
}
function layerHTMLWrite( ID, str) {
	var thisID = layerGetRef(ID);
	if (browser.ns4) {
		thisID.document.open();
		thisID.document.write(str);
		thisID.document.close();
	}
	else {
		if(browser.mac) str += "<br>";
		thisID.innerHTML = str;
	}
}
