var rgb_grey= [51,51,51];
var rgb_lgrey= [200,200,200];
var rgb_red= [204,0,51];
over_spd=12 
out_spd=15

document.onmouseover = domouseover;
document.onmouseout  = domouseout;
document.onclick     = doclick;

dualhex = new Array()
hex = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]
for(i = 0; i < 256; i++) dualhex[i] = hex[parseInt(i / 16)] + hex[i % 16]

function SetupMenu() {
	switch (thisMenuItem) {
	case "profile":
		Profile.className = "aselmenu";
		break;
	case "services":
		Services.className = "aselmenu";
		break;
	case "contact":
		Contact.className = "aselmenu";
		break;
	case "clients":
		Clients.className = "aselmenu";
		break;
	case "members":
		;
		break;
	case "products":
		Products.className = "aselmenu";
		break;
	case "links":
		Links.className = "aselmenu";
		break;
	}
}

function OpenWin(thePage, Width, Height, theTitle) {
	var wparams = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + Width + ",height=" + Height + ",ScreenX=200, Left=200, ScreenY=50, Top=50";
	window.open(thePage, theTitle, wparams);
  return false;
} 

function domouseover() {
  if (document.all && window.event.srcElement.className == "amenu")
    fadeMenu(window.event.srcElement.sourceIndex, 1)
}

function domouseout() {
  if (document.all && window.event.srcElement.className == "amenu")
    setTimeout("fadeMenu('" + window.event.srcElement.sourceIndex + "', 0)", over_spd * over_spd * 2)
}

function doclick() {
  if (document.all && window.event.srcElement.className == "A")
    window.event.srcElement.blur();
}

function fadeMenu(element, over) {
  if(over) {
    beg = rgb_lgrey;
    end = rgb_grey; 
    spd = over_spd;
}
  else {
    beg = rgb_grey;
    end = rgb_lgrey;
    spd = out_spd;
}
  for(i = 0; i <= spd; i++)
    setTimeout("document.all[" + element + "].style.color = '#"
     + dualhex[Math.floor(beg[0] * ((spd - i) / spd) + end[0] * (i / spd))]
     + dualhex[Math.floor(beg[1] * ((spd - i) / spd) + end[1] * (i / spd))]
     + dualhex[Math.floor(beg[2] * ((spd - i) / spd) + end[2] * (i / spd))] + "';",  i * spd);
}
