// JavaScript Document
function setBgColor(id, color) {
  if (document.layers) {
    document[id].bgColor = color == 'transparent' ? null : color;
  } else if (document.all) {
    document.all[id].style.backgroundColor = color;
  } else if (document.getElementById) {
    document.getElementById(id).style.backgroundColor = color;
  }
}

function setBackgroundImage(id, imageURL) {
  if (document.layers) {
    document[id].background.src = imageURL == 'none' ? null : imageURL;
  } else if (document.all) {
    document.all[id].style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
  } else if (document.getElementById) {
    document.getElementById(id).style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
  }
}

function switchImage(imgName, imgSrc) {
  if (document.images) {
	if (imgSrc != "none") {
	  document.images[imgName].src = imgSrc;
    }
  }
}

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];
  }
}

//var texttop = 122
//function moveUp(amount, id)
function moveUp(id) {
	if (!DHTML) return;
	var x = new getObj(id);
//	texttop += amount;
//	x.style.top = texttop;
	x.style.top = 117;
}

function moveDown(id) {
	if (!DHTML) return;
	var x = new getObj(id);
//	texttop += amount;
//	x.style.top = texttop;
	x.style.top = 122;
}

function getStartedMenu(imPath) {
	moveUp('menu1');
	moveDown('menu2');
	moveDown('menu3');
	moveDown('menu4');
	moveDown('menu5');
	setBgColor('menu_r1_c2', '#FF0066');
	switchImage('menu_r1_c3', imPath+'menu_r1_c3_up.gif');
	setBgColor('menu_r3_c1', '#FF0066');
	setBgColor('menu_r1_c4', '#cccccc');
	switchImage('menu_r1_c5', imPath+'menu_r1_c5.gif');
	setBgColor('menu_r1_c6', '#cccccc');
	switchImage('menu_r1_c7', imPath+'menu_r1_c7.gif');
	setBgColor('menu_r1_c8', '#cccccc');
	switchImage('menu_r1_c9', imPath+'menu_r1_c9.gif');
	setBgColor('menu_r1_c10', '#cccccc');
	switchImage('menu_r1_c11', imPath+'menu_r1_c11.gif');
}

function toolsMenu(imPath) {
	moveDown('menu1');
	moveUp('menu2');
	moveDown('menu3');
	moveDown('menu4');
	moveDown('menu5');
	switchImage('menu_r1_c3', imPath+'menu_r1_c3_up2.gif');
	setBgColor('menu_r1_c4', '#990099');
	switchImage('menu_r1_c5', imPath+'menu_r1_c5_up.gif');
	setBgColor('menu_r3_c1', '#990099');
	setBgColor('menu_r1_c2', '#cccccc');
	setBgColor('menu_r1_c6', '#cccccc');
	switchImage('menu_r1_c7', imPath+'menu_r1_c7.gif');
	setBgColor('menu_r1_c8', '#cccccc');
	switchImage('menu_r1_c9', imPath+'menu_r1_c9.gif');
	setBgColor('menu_r1_c10', '#cccccc');
	switchImage('menu_r1_c11', imPath+'menu_r1_c11.gif');
}

function measuringImpactMenu(imPath) {
	moveDown('menu1');
	moveDown('menu2');
	moveUp('menu3');
	moveDown('menu4');
	moveDown('menu5');
	switchImage('menu_r1_c5', imPath+'menu_r1_c5_up2.gif');
	setBgColor('menu_r1_c6', '#FF6600');
	switchImage('menu_r1_c7', imPath+'menu_r1_c7_up.gif');
	setBgColor('menu_r3_c1', '#FF6600');
	setBgColor('menu_r1_c2', '#cccccc');
	switchImage('menu_r1_c3', imPath+'menu_r1_c3.gif');
	setBgColor('menu_r1_c4', '#cccccc');
	setBgColor('menu_r1_c8', '#cccccc');
	switchImage('menu_r1_c9', imPath+'menu_r1_c9.gif');
	setBgColor('menu_r1_c10', '#cccccc');
	switchImage('menu_r1_c11', imPath+'menu_r1_c11.gif');
}

function myToolkitMenu(imPath) {
	moveDown('menu1');
	moveDown('menu2');
	moveDown('menu3');
	moveUp('menu4');
	moveDown('menu5');
	switchImage('menu_r1_c7', imPath+'menu_r1_c7_up2.gif');
	setBgColor('menu_r1_c8', '#DD0A0A');
	switchImage('menu_r1_c9', imPath+'menu_r1_c9_up.gif');
	setBgColor('menu_r3_c1', '#DD0A0A');
	setBgColor('menu_r1_c2', '#cccccc');
	switchImage('menu_r1_c3', imPath+'menu_r1_c3.gif');
	setBgColor('menu_r1_c4', '#cccccc');
	switchImage('menu_r1_c5', imPath+'menu_r1_c5.gif');
	setBgColor('menu_r1_c6', '#cccccc');
	setBgColor('menu_r1_c10', '#cccccc');
	switchImage('menu_r1_c11', imPath+'menu_r1_c11.gif');
}

function myImpactMapMenu(imPath) {
	moveDown('menu1');
	moveDown('menu2');
	moveDown('menu3');
	moveDown('menu4');
	moveUp('menu5');
	switchImage('menu_r1_c9', imPath+'menu_r1_c9_up2.gif');
	setBgColor('menu_r1_c10', '#00A0C6');
	switchImage('menu_r1_c11', imPath+'menu_r1_c11_up.gif');
	setBgColor('menu_r3_c1', '#00A0C6');
	setBgColor('menu_r1_c2', '#cccccc');
	switchImage('menu_r1_c3', imPath+'menu_r1_c3.gif');
	setBgColor('menu_r1_c4', '#cccccc');
	switchImage('menu_r1_c5', imPath+'menu_r1_c5.gif');
	setBgColor('menu_r1_c6', '#cccccc');
	switchImage('menu_r1_c7', imPath+'menu_r1_c7.gif');
	setBgColor('menu_r1_c8', '#cccccc');
}

