//   googlesearch

var domainroot="www.cellc.co.za"
function GoogleSearch(curobj){
	curobj.q.value="site:"+domainroot+" "+curobj.qfront.value
}



//    jumpmenu

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}



//   submit email

function validEmail(email) {
	invalidChars = " /:,;"
	if (email == "") {
		return false
	}
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0) != -1) {
			return false
		}
	}
	atPos = email.indexOf("@",1)
	if (atPos == -1) {
		return false
	}
	if (email.indexOf("@",atPos+1) != -1) {
		return false
	}
	periodPos = email.indexOf(".",atPos)
	if (periodPos == -1) {
		return false
	}
	if (periodPos+3 > email.length)	{
		return false
	}
	return true
}
	
//   if (!validEmail(FormField) || FormField == "") 	
//   errormessage="<BR>Please enter a valid email<BR><BR>"}




//   footer functions
function showBusOps() {
	document.getElementById("busops").style.display = "block";
}

function hideBusOps() {
	document.getElementById("busops").style.display = "none";
}

function showAbout() {
	document.getElementById("about").style.display = "block";
}

function hideAbout() {
	document.getElementById("about").style.display = "none";
}


//show & hide DIVS
 var lastDiv = "";
 var firstDiv = "one";
 function showDiv(divName) {
     // hide last div
     if (lastDiv) {
         document.getElementById(lastDiv).className = "hiddenDiv";
     }
  if (firstDiv) {
      document.getElementById(firstDiv).className = "hiddenDiv";
 
  }
     //if value of the box is not nothing and an object with that name exists, then change the class
     if (divName && document.getElementById(divName)) {
         document.getElementById(divName).className = "visibleDiv";
         lastDiv = divName;
         }
     }


