//<!-- menu script

var ns4 = (document.layers);
var ie = (document.all);
var ns6 = (!document.all && document.getElementById);


if (document.images) {
  
  /*------splash page------------*/
  image1on = new Image();
  image1on.src = "/images/menu/enterSite-on.jpg";
  
  image1off = new Image();
  image1off.src = "/images/menu/enterSite-off.jpg";
  
  
  
/*----------main menu--------------------*/
  image3on = new Image();
  image3on.src = "/images/menu/intro-on.jpg";

  image4on = new Image();
  image4on.src = "/images/menu/money-on.jpg";

  image5on = new Image();
  image5on.src = "/images/menu/solution-on.jpg"; 
  
  image6on = new Image();
  image6on.src = "/images/menu/savings-on.jpg";  
  
  image7on = new Image();
  image7on.src = "/images/menu/applications-on.jpg"; 
  
  image8on = new Image();
  image8on.src = "/images/menu/getStarted-on.jpg"; 
  
  image9on = new Image();
  image9on.src = "/images/menu/conclusion-on.jpg"; 
  

  image3off = new Image();
  image3off.src = "/images/menu/intro-off.jpg";

  image4off = new Image();
  image4off.src = "/images/menu/money-off.jpg";

  image5off = new Image();
  image5off.src = "/images/menu/solution-off.jpg";
  
  image6off = new Image();
  image6off.src = "/images/menu/savings-off.jpg";
  
  image7off = new Image();
  image7off.src = "/images/menu/applications-off.jpg";
  
  image8off = new Image();
  image8off.src = "/images/menu/getStarted-off.jpg";
  
  image9off = new Image();
  image9off.src = "/images/menu/conclusion-off.jpg";
  
  
  /*----------sub menu----------------------------*/
  image10on = new Image();
  image10on.src = "/images/menu/tech_docs-on.jpg"; 
  
  image11on = new Image();
  image11on.src = "/images/menu/getinTouch-on.jpg"; 
  
  image10off = new Image();
  image10off.src = "/images/menu/tech_docs-off.jpg";
  
  image11off = new Image();
  image11off.src = "/images/menu/getinTouch-off.jpg";
  

}

function turnOn(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "on.src");
  }
}

function turnOff(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "off.src");
  }
}

function openIt(id,leftpos, toppos) {	

	if (document.images) {
		if(ns4){
			if(leftpos){
				document.layers[id].visibility = "show";
				document.layers[id].left = leftpos;
				document.layers[id].top = toppos;
			}
	
		}else if(ie){
		
			if(leftpos){
				document.all[id].style.visibility = "visible";
				document.all[id].style.left = leftpos;
				document.all[id].style.top = toppos;
			}
			
		}else if(ns6){
		
			if(leftpos){
				document.getElementById(id).style.visibility = "visible";
				document.getElementById(id).style.left = leftpos;
				document.getElementById(id).style.top = toppos;
			}
		}
	}
}

function closeIt(id){

	if (document.images) {
		if(ns4){
			document.layers[id].visibility = "hide";
		}	else if(ie){
			document.all[id].style.visibility = "hidden";	
		}	else if(ns6){
			document.getElementById(id).style.visibility = "hidden";
		}
	}
}

//global var - needed for updateXCoor()
var x;

//this function updates the width of red space (how much to move over
// the drop down menus, by updating a variable in includes/TextLinks.asp
function updateXCoor(){

	//http://www.webmasterworld.com/forum91/1553.htm

		//the width of the page content
		var contentWidth = 775;
		var	myWidth = 0;
	
		//http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=16
		if( typeof( window.innerWidth ) == 'number' ) {
			 //Non-IE
			myWidth = window.innerWidth;
		} else if( document.documentElement &&
		  ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			 //IE 6+ in 'standards compliant mode'
			 myWidth = document.documentElement.clientWidth;
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
		}	
		
		if (myWidth > contentWidth){
			x = (myWidth - contentWidth) / 2;
		}else{
			x = 10;
		}
			
		//window.status = 'The blank space = ' + x + ' ...available width = ' + myWidth;
}

// -->