// DROP DOWN MENUS JS

function showMenu(object) {
 hideAll();
 show[object]=1;
 if (document.getElementById('dd_'+object)) {
  n_coords=findPos(document.getElementById('n_'+object));
  document.getElementById('dd_'+object).style.left=n_coords[0];
  document.getElementById('dd_'+object).style.visibility='visible';
 }
}

function hideMenu(object) {
 if (show[object]==0) {
  document.getElementById("n_"+object).style.color="";
  document.getElementById("n_"+object).style.backgroundColor="";
  if (document.getElementById('dd_'+object)) {
   document.getElementById('dd_'+object).style.visibility='hidden';
  }
 }
}

function preHide(object) {
 show[object]=0;
 setTimeout("hideMenu('"+object+"')",500);
}

function navOver(object) {
 showMenu(object);
 document.getElementById("n_"+object).style.color="#043333";
 document.getElementById("n_"+object).style.backgroundColor="#9DCDCD";
}

function navOut(object) {
 preHide(object);
}

function miOver(object) {
 document.getElementById(object).style.color="#043333";
 document.getElementById(object).style.backgroundColor="#9DCDCD";
}

function miOut(object) {
 document.getElementById(object).style.color="";
 document.getElementById(object).style.backgroundColor="";
}

//IE FLASH WORKAROUND
function embedIntro() {
 document.write('<embed src="img/intro.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="650" height="220" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
}

function findPos(obj) {
 var curleft = curtop = 0;
 if (obj.offsetParent) {
  do {
   curleft += obj.offsetLeft;
   curtop += obj.offsetTop;
  } while (obj = obj.offsetParent);
 }
 return [curleft,curtop];
}