ns4 = document.layers;
ie4 = document.all;
nn6 = document.getElementById && !document.all; 

function hideObject() {
	if (ns4) {
		document.vavavoompost.visibility = "hide";
	}			
	else if (ie4) { 
		document.all['vavavoompost'].style.visibility = "hidden";
	} 
	else if (nn6) {
		document.getElementById('vavavoompost').style.visibility = "hidden";
	}
} 

function swapout(oldimg, newimg) {
	document.images[oldimg].src = newimg; return true;
}

function isValidEmail(email){
	var RegExp = /^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/;
	if(RegExp.test(email)){
		return true;
	}else{
		return false;
	}
}

function checkField(){
	var frm = document.frmValidate, error = "";
	if(!isValidEmail(frm.email.value)){
		error += 'Please enter a valid Email\n';
	}
	if(error != ""){
		alert(error);
		frmValidate.email.focus();
		return false;
	}else{
		// ASSIGN THE ACTION
		var action = action;
		// UPDATE THE HIDDEN FIELD
		document.getElementById("action").value = action;
		// SUBMIT THE FORM
		document.frmValidate.submit();
		return true;
	}
} 

function showwarning(){
	document.getElementById("emailwarning").style.display="block";
}		

function show(which,imgNum){
	if (document.getElementById && document.createTextNode){
		m=document.getElementById("menu");
		trig=m.getElementsByTagName("div").item(which).style.display;
		if (trig=="block") trig="none";
		else if (trig=="" || trig=="none") trig="block";
		m.getElementsByTagName("div").item(which).style.display=trig;
		var	highlighttext="minus";
		var	normaltext="plus";
		t=m.getElementsByTagName("h5").item(which);
		h=t.getElementsByTagName("a").item(0).firstChild;
		if (trig=="none"){imgNum.src=imgNum.src.replace(highlighttext,normaltext);}
		else {imgNum.src=imgNum.src.replace(normaltext,highlighttext);}
		if (trig=="none"){h.nodeValue=h.nodeValue.replace(highlighttext,normaltext);}
		else {h.nodeValue=h.nodeValue.replace(normaltext,highlighttext);}
	}
} 
