var xmlHttp

function popUp2(message) {

var x = 20;
var y = 20;

	var windowparam = "width=" + 500 + ",height=" + 700 + ",scrollbars=yes,menubar=no,left="+x+",top="+y+",screenX="+x+",screenY="+y;
	popwin = window.open(message, "popwin", windowparam)
	popwin.opener = self;
	popwin.focus()
}

function GetXmlHttpObject() { 
	var objXMLHttp=null
	if (window.XMLHttpRequest) {
		objXMLHttp=new XMLHttpRequest()
	} else if (window.ActiveXObject) {
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}


function validate_email(field,alerttxt) {
	with (field) { 
		apos=value.indexOf("@");
		dotpos=value.lastIndexOf(".");
		if (apos<1||dotpos-apos<2) {alert(alerttxt);return false;}
		else { return true; }
	}
}
function validate_form(thisform,fieldtovalidate)
{
	with (thisform)
	{
	if (validate_email(fieldtovalidate,"Not a valid e-mail address!")==false)
	  { return false;}
	}
}
function clearout(x) { 
	//alert(x);
	document.getElementById(x).style.background="white";
}


mainNav = function() {
	$("#topnav li").bind("mouseenter",function(){
                this.className += " over";
				
	}).bind("mouseleave",function(){
                this.className = this.className.replace(" over", "");
	});
}

newsNav = function() {
	$(".dropdown").bind("mouseenter",function(){
                this.className += " over";
	}).bind("mouseleave",function(){
                this.className = this.className.replace(" over", "");
	});
}
