function validatesearch(thisform){
	if (thisform.searchbox.value==''){
		alert("Please enter a keyword to search!")
		thisform.searchbox.focus();
		return false;
	}
	return true;
}
function validatenews(thisform){
	if( thisform.e_newsletter.value == "" ){
		window.alert("Please enter an email address!");
		thisform.e_newsletter.focus();
		return false;
	}else {
	    var emailexp = /.*\@.*\..*/;
	    if (!emailexp.test(thisform.e_newsletter.value)) {
	      window.alert("Invalid email address! Please enter your correct email address!");
		  thisform.e_newsletter.focus();
	      return false;
	    }   
	 }
	return true;
}
var newwin;
function smallwin(url, w, h) {
	var winl = (screen.availWidth - w - 10) * .5;
	var wint = (screen.availHeight - h - 30) * .5;
	var mybar = 'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes, resizable=yes';
	var myoption = 'height='+h+', width='+w+', top=150, left='+winl+'';
	var myfeature = mybar + ',' + myoption;
	newwin = window.open(url, 'newwin', myfeature);
}

var newtipwin;
function smalltipwin(url, w, h) {
	var winl = (screen.availWidth - w - 10) * .5;
	var wint = (screen.availHeight - h - 30) * .5;
	var mybar = 'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no, resizable=no';
	var myoption = 'height='+h+', width='+w+', top=150, left='+winl+'';
	var myfeature = mybar + ',' + myoption;
	newtipwin = window.open(url, 'newwin', myfeature);
}
function CloseWindow(){
	if (newtipwin=='[object]') newtipwin.close();
}
function openURL(a){
	document.location.href = a;
}