if (document.images) {
	pic1 = new Image(175,18);
	pic1.src = "img_side/side-hover.gif";
	pic2= new Image(175,18);
	pic2.src = "img_side/side-hover-sub.gif";
	pic3 = new Image(4,31);
	pic3.src = "img_header/toolbar/hover/line.bmp";
	pic4 = new Image(4,30);
	pic4.src = "img_header/search/hover/search-blueline.gif";
	pic5 = new Image(150,4);
	pic5.src = "img_window/window-hover.bmp";
}

function toolbarHover(str) {
	cgetElementById(str+"-line").style.backgroundImage = 'url(img_header/toolbar/hover/line.bmp)';
}

function toolbarOut(str) {
	cgetElementById(str+"-line").style.backgroundImage = 'url(img_header/toolbar/textbox-fill.gif)';
}

function headlogitemOver(str) {
	cgetElementById(str).style.backgroundImage = 'url(img_side/side-hover-sub.gif)';
}

function headlogitemOut(str) {
	cgetElementById(str).style.backgroundImage = 'url()';
}

function searchbarHover(str) {
	cgetElementById(str+"-line").style.backgroundImage = 'url(img_header/search/hover/search-blueline.gif)';
}

function searchbarOut(str) {
	cgetElementById(str+"-line").style.backgroundImage = 'url(img_header/search/fill-search.gif)';
}

function windowHover(str) {
	cgetElementById(str).style.backgroundImage = 'url(img_window/window-hover.bmp)';
}

function windowOut(str) {
	cgetElementById(str).style.backgroundImage = 'url(img_window/window-fill.gif)';
}

function showMenu(nam, pre) {
	var str = "";
	var arr = nam.split("-")
	var count=0;
	while (count < arr.length) {
	  if(count != 0)  {
	    str += "-";
	  }
	  str += arr[count];
	  cgetElementById(pre+"|link"+str).style.color = "#FFFFFF";
	  cgetElementById(pre+"|item"+str).style.backgroundImage = 'url(img_side/side-hover-sub.gif)';
	  var leftx = Math.ceil((document.body.clientWidth-997)/2) 
	  if(leftx < 0) {
	  	leftx = (count+1)*175;
	  } else {
	  	leftx = leftx + ((count+1)*175);
	  }
	  + ((1+count)*175);
	  cgetElementById(pre+"|menu"+str).style.left = leftx+"px";
	  cgetElementById(pre+"|menu"+str).style.visibility = "visible";
	  count += 1;
	}
}

function hideMenu(nam, pre) {
	var str = "";
	var arr = nam.split("-")
	var count=0;
	while (count < arr.length) {
	  if(count != 0)  {
	    str += "-";
	  }
	  str += arr[count];
	  cgetElementById(pre+"|link"+str).style.color = "#000000";
	  cgetElementById(pre+"|item"+str).style.backgroundImage = 'url(img_side/side-sub.gif)';
	  cgetElementById(pre+"|menu"+str).style.visibility = "hidden";
	  count += 1;
	}
}


function hoverItem(nam, pre) {
	cgetElementById(pre+"|item"+nam).style.backgroundImage = 'url(img_side/side-hover.gif)';
}

function outItem(nam, pre) {
	cgetElementById(pre+"|item"+nam).style.backgroundImage = 'url(img_side/side.gif)';
}

function repositionSide() {
	var leftx = Math.ceil((document.body.clientWidth-997)/2);
	if(leftx < 0) {
	  leftx = 0;
	}
	cgetElementById("Prod").style.left = leftx+"px";
	cgetElementById("Tech").style.left = leftx+"px";
}

function cgetElementById(element_id) {
    if (document.getElementById) {
      return document.getElementById(element_id);
    }
    else if (document.all) {
      return document.all[element_id];
    }
    else if (document.layers) {
      return document.layers[element_id];
    } else {
      return undefined;
    }
}