            offMessage = '';
            // Hide timeout.
            var popTimer = 0;
            function popOver(which) { //,itemLength) {
                //alert(itemLength);
                clearTimeout(popTimer);
                //alert(menuItems[which] + "\n" + which);// + "\n" + menuItems);
                boxOn(which);        
            }
            function popSub(which) {
                clearTimeout(popTimer);
            }
        
            function popOut(menuNum) {
                popTimer = setTimeout('boxOff(0)', 1500);
                //document.tempForm.mousePos.value = "";
            }
            function boxOn(which){
               clearTimeout(popTimer);
               if (document.all||document.getElementById){
                  which.className='BorderOn'
                  if (document.getElementById) {
                      document.getElementById("secondChoice").innerHTML = menuItems[which];
                      if (menuItems[which] != '' ){
                          invi(0);
                          
                          //document.tempForm.mousePos.value = menuItems[which];
                          var subMenuCount = menuItems[which].split("</div");
                          //for (i=0;i<subMenuCount.length;i++) {
                          //    document.tempForm.mousePos.value += "items in submenu: " + subMenuCount[i] + "\n\n";
                          //}
                          move(subMenuCount.length - 1);
                      }
                      else {
                          invi(1);
                      }
                      //document.getElementById("navDropDown").style.left = parseInt(document.getElementById("navDropDown").style.left);
                      //document.getElementById("navDropDown").style.top = parseInt(document.getElementById("navDropDown").style.top);
                      //document.getElementById("navDropDown").style.visibility = "show";
                      //alert(document.getElementById("secondChoice").style.left);
                  }
                  else {
                      secondChoice.innerHTML = menuItems[which];
                      //navDropDown.left = 68;
                      //navDropDown.top = 234;
                      //navDropDown.visibility = "show";
                  }
               }
            }
            
            function boxOff(which){
               if (document.all||document.getElementById){
                    which.className='BorderOff'
                    if (document.getElementById) {document.getElementById("secondChoice").innerHTML = offMessage}
                    else {secondChoice.innerHTML = offMessage}
                }
               invi(1);
               
            }
            var menu = new Array();
            
            function writeMenu(){
                /*var adjustIE = new getObj('mainNav');
                var isIE = navigator.appVersion.indexOf("MSIE")>0
                if (isIE == true) {
                    adjustIE.style.top = 5 + "px";
                }
                else {
                    adjustIE.style.top = 3 + "px";
                }*/
                top_nav_text = top_nav_text.substring(0,top_nav_text.length-0); 
                if (document.all||document.getElementById){
                  if (document.getElementById) {
                      document.getElementById("top_navigation").innerHTML = top_nav_text;
                    }
                  else {
                      top_navigation.innerHTML = top_nav_text;
                  }
                }
                if (document.all||document.getElementById){
                  if (document.getElementById) {
                      document.getElementById("mainNav").innerHTML = navMenu;
                    }
                  else {
                      mainNav.innerHTML = navMenu;
                  }
                }
                footy();
            }

            var theForm = document.tempForm;
            var tempX = 0;
            var tempY = 0;
            var winWidth = 0;
            var IE = document.all?true:false;
            if (!IE) document.captureEvents(Event.MOUSEMOVE)
            document.onmousemove = getMouseXY;
            var windowProps = document.documentElement;
            winWidth = windowProps.clientWidth;
            windowWide = windowProps.clientWidth;
            
            function getMouseXY(e) {
                
                if (IE) { // grab the x-y pos.s if browser is IE
                    tempX = event.clientX + document.body.scrollLeft;
                    tempY = event.clientY + document.body.scrollTop;
                }
                else {  // grab the x-y pos.s if browser is NS
                    tempX = e.pageX;
                    tempY = e.pageY;
                }  
                if (tempX < 0){tempX = 0;}
                if (tempY < 0){tempY = 0;}
                //alert(tempX + " " + tempY);
                //document.tempForm.mousePos.value = tempX + " " + tempY;
                winWidth = (winWidth - 750)/2;
            }

            var DHTML = (document.getElementById || document.all || document.layers);

            function getObj(name)
            {
              if (document.getElementById)
              {
              	this.obj = document.getElementById(name);
            	this.style = document.getElementById(name).style;
              }
              else if (document.all)
              {
            	this.obj = document.all[name];
            	this.style = document.all[name].style;
              }
              else if (document.layers)
              {
               	this.obj = document.layers[name];
               	this.style = document.layers[name];
              }
            }
            
            function invi(flag)
            {
            	if (!DHTML) return;
            	var x = new getObj('text');
            	x.style.visibility = (flag) ? 'hidden' : 'visible' 
            }
            function inviHeadline(flag)
            {
            	invi(1);
                if (!DHTML) return;
            	var x = new getObj('headline');
            	x.style.visibility = (flag) ? 'hidden' : 'visible'
            }
            var texttop = 282;
/*
            if (IE) {
                texttop = 240;
            }
            else {
                texttop = 250;
            }
*/            
            function move(amount)
            {
            	if (!DHTML) return;
            	var x = new getObj('text');
            	//texttop += 0;
            	x.style.top = tempY + 12 + "px";
                var newLeft = (tempX - winWidth);
                
                /*
                //this is the original left
                x.style.left = tempX + "px";
                if ((tempX + 250) > windowWide) {
                    x.style.left = tempX - 202 + "px";
                }
                */
                /*
                if (x.offsetParent) {
					curleft = x.offsetLeft
					while (obj = x.offsetParent) {
						curleft += x.offsetLeft
					}
				}
                x.style.left = curleft + "px";*/
                x.style.top = texttop + "px";
                /* original value x.style.left = tempX + "px"; */
                //var newHeight = amount * 20;
                //x.style.height = newHeight + "px;";
                //document.tempForm.mousePos.value = "Menu bottom: " + x.style.right;
                
            }

            function moveHeadline(amount)
            {
            	if (!DHTML) return;
            	var x = new getObj('headline');
            	x.style.top = tempY + 12 + "px";
                x.style.left = tempX + 12 + "px";
                
            }
            function findLeft(inValue) {
            	var lItem = new getObj(inValue);
            	//alert(lItem.style.left);
            	//lItem.style.left = lItem.style.left - 1 + "px";
            	alert(findPos(inValue));
            }
            
            var hide  = true;

function showhide(obj)
{
	var x = document.getElementById('testP');
	hide = !hide;
	x.style.visibility = (hide) ? 'hidden' : 'visible';
	setLyr(obj,'testP');
}

function setLyr(obj,lyr)
{
	var coors = findPos(obj);
	var x = document.getElementById('text');
	//x.style.top = coors[1] + 'px';
	x.style.left = coors[0] + 'px';
}

function findPos(obj)
{
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		//curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			//curtop += obj.offsetTop
		}
	}
	return [curleft,282];
}


            function changeCol(col)
            {
            	if (!DHTML) return;
            	var x = new getObj('text');
            	x.style.color = col;
            }

            function changeBG(inItem) {
                if (!DHTML) return;
            	var x = new getObj(inItem);
            	x.style.background = "#112E50";
            }

            function resetBG(inItem) {
                if (!DHTML) return;
            	var x = new getObj(inItem);
            	x.style.background = "#164881"; //2D78D3
            }


            function footy(){
                var footText  = "EVE - Electro Vehicles Europe - 2009 all rights reserved&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                footText = footText + "<a href=\"http://www.electro-vehicles.eu/legalnotice.html\">legal notices</a>";
                //= "version 4.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                
                if (document.all||document.getElementById){
                      if (document.getElementById) {document.getElementById("footer").innerHTML = footText}
                         else {footer.innerHTML = footText}
                }
            }

            function openWin(theURL) {
                window.open("/viewImage.asp?src=" + theURL,"EVE_Window", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,copyhistory=0,top=0,left=0,width=820,height=640");
            }

            function CreateControl(DivID, inWidth, inHeight, inURL, inWmode, inQuality, inScale, inBorder, inBGColor) {
                if (inWmode == "") {
                    inWmode = "transparent";
                }
                if (inQuality == "") {
                    inQuality = "high";
                }
                if (inScale == "") {
                    inScale = "showall";
                }
                if (inBorder == "") {
                    inBorder = "0";
                }
                if (inBGColor == "") {
                    inBGColor = "FFFFFF";
                }
                flashCode = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" height=" + inHeight + " width=" + inWidth + " border=" + inBorder + ">";
                flashCode = flashCode + "<param NAME=\"movie\" VALUE=" + inURL + ">";
                flashCode = flashCode + "<param name=\"wmode\" value=\"" + inWmode +"\">";
                flashCode = flashCode + "<param NAME=\"quality\" VALUE=\"" + inQuality +"\">";		 
                flashCode = flashCode + "<param NAME=\"SCALE\" VALUE=\"" + inScale + "\">";
                flashCode = flashCode + "<param NAME=\"bgcolor\" VALUE=\"" + inBGColor + "\">";
                flashCode = flashCode + "<embed src=" + inURL +" wmode=\"" + inWmode + "\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"" + inWidth + "\" height=\"" + inHeight + "\" bgcolor=#\"" + inBGColor +"\"></embed>";
                flashCode = flashCode + "</object>";
                //flashCode = flashCode + "<BR>" + DivID + "<BR>" + inWidth + "<BR>" + inHeight + "<BR>" + inURL + "<BR>" + inWmode + "<BR>" + inQuality + "<BR>" + inScale + "<BR>" + inBorder + "<BR>" + inBGColor;
                if (document.all||document.getElementById){
                  if (document.getElementById) {document.getElementById(DivID).innerHTML = flashCode}
                     else {DivID.innerHTML = flashCode}
                }
            }