
var menuIndex=0;


function doStatic(){

var k = 0;

for(k=0;k<staticdata.length;k++){



document.write('<p id="'+ staticdata[k].id + '" class="navItem" onmouseover="handleMouseOver(this.id)" onmouseout="handleMouseOut(this.id)"><a href="' +staticdata[k].file + '" >'+staticdata[k].menutitle + '</a></p>');



	}



}



function doFlyout(){


var k = 0;

for(k=0;k<flyoutdata[menuIndex].length;k++){



document.write('<p id="'+ flyoutdata[menuIndex][k].id + '" class="navItem" onmouseover="if (checkMouseEnter(this, event)) {this.style.backgroundColor=\'#66cdaa\';this.firstChild.style.backgroundColor=\'#66cdaa\' }" onmouseout="if (checkMouseLeave(this, event)) {this.style.backgroundColor=\'#104e8b\';this.firstChild.style.backgroundColor=\'#104e8b\';}"><a href="./' + flyoutdata[menuIndex][k].file + '" >'+flyoutdata[menuIndex][k].menutitle + '</a></p>');



	}

}


function handleMouseOver(obj){

//	alert(obj  +" : in");
	document.getElementById(obj).style.backgroundColor='#66cdaa' ;
	document.getElementById(obj).firstChild.style.backgroundColor='#66cdaa';
//	alert(document.getElementById(obj).style['background-color']);

	if (obj=="arch"){
		
		
		document.getElementById('hiddenArchMenu').style.visibility="visible";
		document.getElementById('hiddenAspectsMenu').style.visibility="hidden";

	}
	if (obj=="aspects"){
		
		
		document.getElementById('hiddenAspectsMenu').style.visibility="visible";
		document.getElementById('hiddenArchMenu').style.visibility="hidden";

	}

	
	

	

}

function handleMouseOut(obj){


	//alert(obj  +" : out, active is "+activeObj);
	
	var col1 = '#104e8b';
	var col2 = '#104e8b';
	
	if (obj=="aboutus"){
		col1 = '#66cdaa';
		col2 = '#66cdaa';	
	}
	
	document.getElementById(obj).style.backgroundColor=col1 ;
	document.getElementById(obj).firstChild.style.backgroundColor=col2;

	if (document.getElementById(obj).parentNode.id=="menu"){

		if (obj=="aspects"){
			document.getElementById('hiddenArchMenu').style.visibility="hidden";
		}
		else if (obj=="arch"){
			document.getElementById('hiddenAspectsMenu').style.visibility="hidden";

	 	}
		else{


		document.getElementById('hiddenAspectsMenu').style.visibility="hidden";
		document.getElementById('hiddenArchMenu').style.visibility="hidden";
		}
	}
	

	
}

function hide(obj){

	obj.style.visibility='hidden';
}


function containsDOM (container, containee) {
  var isParent = false;
  do {
    if ((isParent = container == containee))
      break;
    containee = containee.parentNode;
  }
  while (containee != null);
  return isParent;
}

function checkMouseEnter (element, evt) {
  if (element.contains && evt.fromElement) {
    return !element.contains(evt.fromElement);
  }
  else if (evt.relatedTarget) {
    return !containsDOM(element, evt.relatedTarget);
  }
}

function checkMouseLeave (element, evt) {
  if (element.contains && evt.toElement) {
    return !element.contains(evt.toElement);
  }
  else if (evt.relatedTarget) {
    return !containsDOM(element, evt.relatedTarget);
  }
}


function doIEThing(){

if (navigator.appVersion.indexOf("MSIE") != -1){


	document.getElementById("hiddenArchMenu").style.top='-700px';
	document.getElementById("hiddenArchMenu").style.left='168px';
	document.getElementById("hiddenArchMenu").style.position='relative';
	document.getElementById("hiddenAspectsMenu").style.top='-800px';
	document.getElementById("hiddenAspectsMenu").style.left='168px';
	document.getElementById("hiddenAspectsMenu").style.position='relative';
}
}
