

htab1 = false;
htab2 = false;
htab3 = false;
htab4 = false;
function swapIDValue(tval,wtab){
/*
	document.getElementById('htab1').style.backgroundColor='#FFF1B2';
	document.getElementById('htab2').style.backgroundColor='#FFF1B2'
	document.getElementById('htab3').style.backgroundColor='#FFF1B2'
	document.getElementById('htab1').className ="home_click";
	document.getElementById('htab2').className ="tabs";
	document.getElementById('htab3').className ="tabs";
	document.getElementById('htab4').className ="tabs";
	document.getElementById(wtab).style.backgroundColor='#FFF1B2'
	if(wtab == "htab1"){
		tval.className='home_static';
		tval.style.textDecoration='none';
	}else{
		tval.style.textDecoration='none';
		tval.className='static';
	}
	htab1 = false;
	htab2 = false;
	htab3 = false;
	htab4 = false;
	wtab = true;*/
}

function handleMOver(tval,id,wtab){
	if(!eval("htab"+id)){
		if(wtab == "htab1"){
			tval.className = "home_click";
		}else{
			tval.className = "tabs";
		}
		tval.style.backgroundColor='#FFF1B2';
		tval.style.color = "#333333";
		tval.style.textDecoration ='underline';
		tval.style.cursor='hand';		
		tval.style.cursor='pointer';
	}
	if(id == 2){//dealing with the free trial tab
		tval.style.backgroundColor='#FFF1B2';
		tval.style.color = "#333333";
		tval.style.textDecoration ='underline';
		tval.style.cursor='hand';		
		tval.style.cursor='pointer';
	}
}

function handleMOut(tval,id){
	for(i=1;i<=4;i++){
		if(!eval("htab"+id)){
			tval.style.backgroundColor='#d1e7b9'
			tval.style.textDecoration ='none';
			tval.style.color = "#333333";
		}
	}
	//style below were created when we wanted to affect the color free trial tab mouseover and mouseout
/*	if(id == 2){//dealing with the free trial tab
			tval.style.backgroundColor='#FECE32'
			tval.style.textDecoration ='none';
			tval.style.color = "#333333";
	}
*/
}
function doPop(popwhat){
 indexdemo = popwhat.indexOf("demomercial");
if(indexdemo >-1){
	CH_w = 650;
}else{
	CH_w = 650;
}
	newWin = window.open(popwhat,"newwin","toolbar=no,width="+CH_w+",height=500,scrollbars=yes,resizable=yes");
}

/*
		function getOffsetLeft (el,whichBox) {
			obj_x =  document.getElementById(el);
		  	var obj_hor = obj_x.offsetLeft;
			obj_wh = obj_x.offsetWidth;
		  	while ((obj_x = obj_x.offsetParent) != null)
		    obj_hor += obj_x.offsetLeft;
			pad = 5;
			if (document.getElementById("ftab")) {
				document.getElementById("ftab").style.left = obj_hor + 15;//(obj_hor + obj_wh);
			}
		}
		function getOffsetTop (el,whichBox) {
			getOffsetLeft (el,whichBox);
			obj_y = document.getElementById(el);
		 	var obj_vert = obj_y.offsetTop;
		  	while((obj_y = obj_y.offsetParent) != null)
		  	obj_vert += obj_y.offsetTop;
			if (document.getElementById("ftab")) {
				itemHeight = document.getElementById("ftab").offsetHeight;
		    	document.getElementById("ftab").style.top = obj_vert - itemHeight;
			}
		}
*/

docPath = String(document.URL).toLowerCase();
isLog = docPath.indexOf("login");
isComm = docPath.indexOf("acdcom");
isMailpage = docPath.indexOf("email");
isProfile = docPath.indexOf("profile");
isProcessing = docPath.indexOf("processing");
comPageArray = new Array("acdcom","Email");
inComm = false;

function hideLinks(what){
	for(i=0;i<comPageArray.length;i++){
		if(docPath.indexOf(comPageArray[i]) > -1){
			inComm = true;
			break;
		}
	}
	if(inComm){
		//document.getElementById(what).style.display ="none";
		if(isProfile >-1 || isProcessing >-1){
			document.getElementById('homelinka').style.display ="none";
			document.getElementById('homelinkb').style.display ="block";
		}else{
			document.getElementById('homelinka').style.display ="block";
			document.getElementById('homelinkb').style.display ="none";
		}
	}else{
		//document.getElementById(what).style.display ="block";
		document.getElementById('homelinka').style.display ="block";
		document.getElementById('homelinkb').style.display ="none";
	}
}
