var bV=parseInt(navigator.appVersion);
var bName = navigator.appName;
var bType;

if(bName =="Netscape" && bV>=5){
bType="NS6"
}
if(bName =="Netscape" && bV<5)
{
	bType="NS4"
}
if(bName.indexOf("Explorer") != -1)
{
	bType="IE4"

}


function show(id){
	 if (bType=="NS4") { document.layers[id].visibility = "show" }
  	 else { document.getElementById(id).style.visibility = "visible";
	 document.getElementById(id).style.display='' }
 }

function hide(id){
    if (bType=="NS4") { document.layers[id].visibility = "hide" }
    else { document.getElementById(id).style.visibility = "hidden";
	document.getElementById(id).style.display='none'  }
}

var imagePath = "/images/";

//img swap
if (document.images) {
normal = new MakeArray(10)
switchImg = new MakeArray(10)

               
normal[1].src = imagePath + "nav1_off.gif"
normal[2].src = imagePath + "nav2_off.gif"
normal[3].src = imagePath + "nav3_off.gif"
normal[4].src = imagePath + "nav4_off.gif"
normal[5].src = imagePath + "nav5_off.gif"
normal[6].src = imagePath + "nav6_off.gif"

switchImg[1].src = imagePath + "nav1_on.gif"
switchImg[2].src = imagePath + "nav2_on.gif"
switchImg[3].src = imagePath + "nav3_on.gif"
switchImg[4].src = imagePath + "nav4_on.gif"
switchImg[5].src = imagePath + "nav5_on.gif"
switchImg[6].src = imagePath + "nav6_on.gif"
}

//SWITCH FUNCTION  
              
function MakeArray(n) {
this.length = n
for (var i = 1; i<=n; i++) {
this[i] = new Image()
}
return this
}

function msover(num) {

for(nn=1;nn<4;++nn){
	if(nn == num){
		show('navsub' + num)
	}
	else{
		hide('navsub' + nn)
	}
}

if (num != current_section) {

document.images['nav'+num].src = switchImg[num].src
}
}
function msout(num) {
if (num != current_section) {
document.images['nav'+num].src = normal[num].src
}     
            
}

function msoverSub(num) {
if (num != current_sub) {

document.images['nav'+ current_section + '-' + num].src = imagePath + "nav" + current_section + "-" + num + "_on.gif"
}
}
function msoutSub(num) {
if (num != current_sub) {
document.images['nav'+ current_section + '-' + num].src = imagePath + "nav" + current_section + "-" + num + "_off.gif"
}                   
}

function msoverSubTop(section,num) {

document.images['sub'+ section + '-' + num].src = imagePath + "navsub" + section + "-" + num + "_on.gif";
//alert(document.images['sub'+ section + '-' + num].src)

}
function msoutSubTop(section,num) {
document.images['sub'+ section + '-' + num].src = imagePath + "navsub" + section + "-" + num + "_off.gif"                 
}


var subsection_lengths = new Array(null,4,4,7,1,1,1);
var section_names = new Array(null,"company","solutions","products","partners","careers","contact");
var current_section = 0;
var current_sub = 0;


var query_string_array = top.location.search.substring(1).split("&"); ////on=1,subon=2

for (var ii=0; ii<query_string_array.length; ++ii) {
	var section_port_url = query_string_array[ii];
	var temp_array = section_port_url.split("=",2);
	
	if ("section" == temp_array[0]) {
		current_section = temp_array[1];
		//break;
	}
	if ("sub" == temp_array[0]) {
		current_sub = temp_array[1];
		
		
	}
	
}


var subHrefs1 = new Array(null,"index.html","mission.html","methodology.html","management.html");
var subHrefs2 = new Array(null,"index.html","build.html","secure.html","extend.html");
var subHrefs3 = new Array(null,"index.html","telephony.html","storage.html","wireless.html","network.html","staffing.html","cable.html");
var subHrefs4 = new Array(null,"index.html");
var subHrefs5 = new Array(null,"index.html");
var subHrefs6 = new Array(null,"index.html");
var subHrefs = new Array(null,subHrefs1,subHrefs2,subHrefs3,subHrefs4,subHrefs5,subHrefs6);

var WinProcess = null;
var count = 0;
function openWin (htmlFile,fileHeight,fileWidth) {
	if ( WinProcess != null ) {
		if ( ! WinProcess.closed ) {
		WinProcess.window.close();
		}
	}
	count++;
	WinProcess = window.open( "" , count, "resizeable=no,scrollbars,height=" + fileHeight +",width=" + fileWidth +"");
	WinProcess = window.open( htmlFile , count, "resizeable=no,scrollbars,height=" + fileHeight +",width=" + fileWidth +"");
}