function openWin(url, winwidth, winheight, name, scroll) {
	if (scroll == 1) {
		var scrolling = 'scrollbars\,';
	} else {
		var scrolling = '';
	}
	var window_left = (screen.width-winwidth)/2;
	var window_top = (screen.height-winheight)/2;

	window.open(url,name,'width='+winwidth+',height='+winheight+',left='+window_left+',top='+window_top+','+scrolling+'\'');
}

function closeWin(){
	close();
}

function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}


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){
	with (thisform){
	if (validate_email(email,"Please enter a valid email address")==false){
		email.focus();return false;}
	}
}


/*
function validate_required(field,alerttxt){
	with (field){
		if (value==null||value==""||value=="Your name"||value=="Your email"||value=="Your message"||value=="Enter keywords"){
			alert(alerttxt);return false;
		}else {
			return true
		}
	}
}

function validate_form(thisform){
	with (thisform){
		if (validate_required(email,"Email must be filled out!")==false){
			email.focus();return false;
		}
	}
}
*/