<!--

 function changeImages()
 {
  if (document.images)
  {
   for (var i=0; i<changeImages.arguments.length; i+=2)
   {
    document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
   }
  }
 }

 var PreloadFlag = false;

 function newImage(arg)
 {
  if (document.images)
  {
   rslt = new Image();
   rslt.src = arg;
   return rslt;
  }
 }

 function PreloadImages()
 {
  if (document.images)
  {
	// preload all rollover images
	img0 = newImage('images/btn_home_on.gif');
	img1 = newImage('images/btn_about_on.gif');
	img2 = newImage('images/btn_whychoose_on.gif');
	img3 = newImage('images/btn_site_on.gif');
	img4 = newImage('images/btn_contact_on.gif');
	PreloadFlag = true;
  }
  return true;
 }

//FOR GENERAL USE IN ACCESSING STYLE ATTRIBUTES
function getObj(name)
{
  if (document.getElementById) {
    if (document.getElementById(name) == null)
      return null;
    else
      return document.getElementById(name).style;
  }
  else if (document.all)  { return document.all[name].style; }
  else if (document.layers) { return document.layers[name];  }
  else return false;
}

// generic dhtml object grabber
function getDHTMLObj(name){
	if (document.getElementById) {
		return document.getElementById(name);
	} else if (document.all)  {
		return document.all[name];
	} else if (document.layers) {
		return document.layers[name];
	} else {
		return false;
	}
}

function getClientWidth(){
	if(document.body.clientWidth.valueOf() > 0){
		return document.body.clientWidth.valueOf()
	}else{
		return window.innerWidth;
	}
}

// USED TO TURN DIVS ON AND OFF (CALLED WITH DIV ID)
// -----------------------------------------------
function show(curMenu){
  if (document.getElementById || document.all) {
	x = new getObj(curMenu);
	if(x.visibility != "visible"){
		x.visibility = "visible";
		}
  }
  else if (document.layers) {
	x = new getObj(curMenu);
	if(x.visibility != "show"){
		x.visibility = "show";
		}
  }
}

function hide(curMenu){
	x = new getObj(curMenu);

  if (x != null)
    x.visibility = "hidden";
}

function hideAll(){
	hide('About');
	hide('Why');
	hide('Site');
	hide('mouseCatcher');
}
// -----------------------------------------------



//ROLLOVER HIGHLIGHTING CODE - DOES NOT WORK WITH NETSCAPE 4
// -----------------------------------------------
function hilite(obj){
  if (document.getElementById || document.all)
 	{
		obj.parentElement.parentElement.className = "rollover";
		show('mouseCatcher');
	}

}
function clearit(obj){
 	  if (document.getElementById || document.all)
 		{
		obj.parentElement.parentElement.className =  "";
	}
}
// -----------------------------------------------


// MENU OBJECT DEFINITION
// -----------------------------------------------
function menuObj(p_id,p_display,p_URL,p_level,p_children,p_imgstr){
	this.id=p_id;
	this.display=p_display;
	this.URL=p_URL;
	this.level=p_level;
	this.children= p_children;
	this.state = 0; //0=closed (default), 1 = open, 2 = active
	this.imgstr=p_imgstr;
//	this.getURL = (this.baseURL + this.URL);
	this.getURL = (this.URL);
	return this
}

// MENUS
var menuItems = new Array(
    new menuObj(0,"About","1",1,new Array("1","2"),null),
		new menuObj(1,"Company Profile","http://www.aspendesigngroup.com/company.php",2,null,null),
		new menuObj(2,"Professional Services","http://www.aspendesigngroup.com/profservices.php",2,null,null),

    new menuObj(3,"Why","1",1,new Array("4","5"),null),
		new menuObj(4,"Our Expertise","http://www.aspendesigngroup.com/expert.php",2,null,null),
		new menuObj(5,"Industry Resources","http://www.aspendesigngroup.com/resources.php",2,null,null),
		
    new menuObj(6,"Site","1",1,new Array("7","8"),null),
		new menuObj(7,"Privacy Policy","http://www.aspendesigngroup.com/policy.php",2,null,null),
		new menuObj(8,"Terms & Conditions","http://www.aspendesigngroup.com/terms.php",2,null,null)
)

// DRAW MENU CREATES THE TABLE WITH THE NAV FOR A GIVEN ROOT_POS (LOCATION IN ARRAY)
function drawMenu(root_pos){

	var tmpStr = '';
		menuText = "<table width=\"100%\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#0c6109\">"

		for (var i=0;i<menuItems[root_pos].children.length;i++){
			var childNum = parseInt(menuItems[root_pos].children[i]);
			menuText = menuText+ "<tr>"
			menuText = menuText+ "<td width=\"100%\"><a onMouseOver=\"hilite(this);\" onMouseOut=\"clearit(this)\" href=\"" + menuItems[childNum].URL + "\" class=\"menuLink\">" +menuItems[childNum].display + "</a></td>"
			menuText = menuText+ "</tr>"
		}
		menuText = menuText + "</table>\n"

	return menuText;
}


function menuListObj(p_obj,p_left){
	this.obj = p_obj;
	this.leftPos = p_left;
	return this;
}

function rePosMenu(){
var menuList = [
						new menuListObj(getObj("About"),302),
						new menuListObj(getObj("Why"),392),
						new menuListObj(getObj("Site"),502),
						]
						
//alert(document.body.clientWidth.valueOf());
	for(nn = 0;nn < menuList.length;nn++){
//		alert("menu=" + menuList[nn].obj.style.posLeft)

		if(getClientWidth() > 780){
			menuList[nn].obj.left = ((getClientWidth()  - 780) / 2) + menuList[nn].leftPos
		} else {
			menuList[nn].obj.left = menuList[nn].leftPos
		}
	}
}

function winResize(){
	rePosMenu();
}
<!-- window.onresize=winResize ;

<!-- var initNav = setTimeout('rePosMenu()',1000)

function click(){if (event.button==2)
{alert('Copyright 2005 Aspen Design Group, LLC, All Rights Reserved.')}}
document.onmousedown=click

function nostatus(){
    window.status='';
}	
// -->

