function Goto( url ) {
	window.location.href = url;
}

function NavBar( tableCellRef, hoverFlag, navStyle ) {
	if ( hoverFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#9999FF';
				break;
			default:
//				tableCellRef.style.backgroundColor = '#000099';
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#000000';
				}
		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#888888';
				break;
			default:
//				tableCellRef.style.backgroundColor = '#000099';
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#000000';
				}
		}
	}
}

function NavBarClick( tableCellRef, navStyle, url ) {
	NavBar( tableCellRef, 0, navStyle );
	Goto( url );
}


function ExpandMenu(id) {

     if (document.all){
     	if(document.all[id].style.display == 'none'){
         	document.all[id].style.display = '';
       }
       else {
       	document.all[id].style.display = 'none';
       }
     
     } else if (document.getElementById){
       	if(document.getElementById(id).style.display == 'none'){
       		document.getElementById(id).style.display = 'block';
       	}
       else {
         document.getElementById(id).style.display = 'none';
       }
    }
}


var flagExpanded = 0;

function menuExpansion()
{
	timeA = new Date();
	var preload = new Image();
	preload.src = "http://www.conceptualnetworking.com/phrase6.gif";
  	timeB = new Date();
  	loadTime = timeB - timeA + 10;
	
	setTimeout("menu.hideCaption()", loadTime + 120);	
  	
	if( flagExpanded == 0 )
	{
		flagExpanded = 1;
		setTimeout("menu.expand()",loadTime + 15);
		setTimeout("menu.subMenus[4].expand()",loadTime + 560);
		setTimeout("menu.subMenus[1].expand()",loadTime + 1105);
		setTimeout("menu.subMenus[4].subMenus[1].expand()",loadTime + 1650);
		setTimeout("menu.subMenus[4].subMenus[1].collapse()", loadTime + 2300);
		setTimeout("menu.subMenus[1].collapse()",loadTime + 2850);
		setTimeout("menu.subMenus[4].collapse()",loadTime + 3395);
		//setTimeout("menu.collapse()",loadTime + 3950);
		setTimeout("menu.setCaption('ConceptualNetworking')", 3950);
		setTimeout("menu.showCaption()",loadTime + 4100);
	}
}
