
function menuover(obj1,obj2)
{
obj1.style.cursor="hand";
obj1.style.background=highLight(obj2);
document.getElementById(obj2).className="orange";
obj1.all.tags('a').item(0).className="bannerover";
}

function menuout(obj1, obj2)
{
obj1.style.background="";
document.getElementById(obj2).className="noorange";
obj1.all.tags('a').item(0).className="";
}

function menuclick(obj)
{
window.location.href=obj.all.tags('A').item(0).href;
}



//convert dec number to hex
function dec2hex(dec) {
  if(dec > 255) dec = 255;
  var hexChars = new Array("0", "1", "2", "3", "4", "5", "6", "7",
                           "8", "9", "a", "b", "c", "d", "e", "f");
  var a = parseInt(dec) % 16, b = (parseInt(dec) - a)/16;
  return  "" + hexChars[b] + hexChars[a];
}

//convert hec number to dec
function hex2dec(hex) {
	return parseInt(hex, 16);
}


//chenge color: r+step, g+step, b+step
function highLight(color){
	//define hstep
	hstep_r = -15;
	hstep_g = -15;
	hstep_b = -15;
	
	
	//replace bad symbol
	color = color.replace("#","");
		
	//hex
	r = color.substring(0,2);
	g = color.substring(2,4);
	b = color.substring(4,6);
	
	
	//to dec
	r = hex2dec(r);
	g = hex2dec(g);
	b = hex2dec(b);
		
	//to hex
	r = dec2hex(r + hstep_r);
	g = dec2hex(g + hstep_g);
	b = dec2hex(b + hstep_b);
	
	
	return "#" + r + g + b;
}



function menuover2(objid,color)
{
document.getElementById(objid).style.cursor="hand";
document.getElementById(objid).className=color;
}

function menuout2(objid,color)
{
document.getElementById(objid).className=color;
}

function menuclick2(theid)
{
window.location.href=document.getElementById(theid).href;
}