// JavaScript Document
function showHostNavPanel(){
	document.getElementById("hosting_nav").style.display = "block";
}

function hideHostNavPanel(){
	if((getPageName() != "hosted-solutions.php") && (getPageName() != "exchange_pop_page.php"))
		document.getElementById("hosting_nav").style.display = "none";
}

function getPageName(){
	var sPath = window.location.pathname;
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
	return sPage;
}
function set_display(){
	var width = window.screen.availWidth;
	var w = width;
	if(navigator.appName == "Netscape")w = 800;
	var padding = (width-800)/2;
        //padding = padding + '%';
	document.getElementById("main_container").style.paddingLeft = 50; 
}
// JavaScript Document
// JavaScript Document
function unselect_all(){
	document.getElementById("exchange_pop").className = "hosting-exchange-pop";
	document.getElementById("disaster_recovery").className = "hosting-disaster-recovery";
	document.getElementById("spam_filtering").className = "hosting-spam-filtering";
	document.getElementById("virus_protection").className = "hosting-virus-protection";
	document.getElementById("encryption").className = "hosting-encryption";
}
function select_nav(id){
	unselect_all();
	if(id == "exchange_pop"){
		document.getElementById("exchange_pop").className = "hosting-exchange-pop-selected";
	}
	else if(id == "disaster_recovery"){
		document.getElementById("disaster_recovery").className = "hosting-disaster-recovery-selected";
		document.getElementById('content-div-temp').style.display = "none";
		document.getElementById('content-div').style.display = "block";
	}
	else if(id == "spam_filtering"){
		document.getElementById("spam_filtering").className = "hosting-spam-filtering-selected";
		document.getElementById('content-div-temp').style.display = "none";
		document.getElementById('content-div').style.display = "block";
	}
	else if(id == "virus_protection"){
		document.getElementById("virus_protection").className = "hosting-virus-protection-selected";
		document.getElementById('content-div-temp').style.display = "none";
		document.getElementById('content-div').style.display = "block";
	}
	else if(id == "encryption"){
		document.getElementById("encryption").className = "hosting-encryption-selected";
		document.getElementById('content-div-temp').style.display = "none";
		document.getElementById('content-div').style.display = "block";
	}
}
function popWin(divId) {
   var popvid = null;
   if (typeof(divId)=='string') { divId=document.getElementById(divId); }
   if (!popvid||popvid.closed) {
      popvid=window.open('','MessageWatcher','width=870,height=540,status=no,resizeable=yes');
   }
   popvid.document.body.style.backgroundColor='black';
   popvid.focus();
   popvid.document.body.innerHTML='<BR><center>'+divId.innerHTML+'</center>';
   return false;
}

window.onunload=function() {
   // if the user is navigating away from the page, check to see if we
   // opened a video window and if we did, make sure it's closed.
   if (popvid) {
      popvid.close();
   }
}

