// BoK Form Validation Code
// For Contact page and Registration form

function openWindow(url,name,w,h){
	var t				= (screen.height - h) / 2;
	var l				= (screen.width - w) / 2;
	
	window.open(url, name, 'width='+w+', height='+h+', left='+l+', top='+t+', 1, 0, 0, 0, scrollbars=1');
}

function openWin(url,name,w,h){
	var t				= (screen.height - h) / 2;
	var l				= (screen.width - w) / 2;
	
	window.open(url, name, 'width='+w+', height='+h+', left='+l+', top='+t+', 0, 0, 0, 0, scrollbars=0');
}

function validate(){
	if(document.forms[1].cbody.value == ""){
		alert("The Comments field cannot be left blank.");
		document.forms[1].cbody.select();
	} else {
		setFields();
	}
}

function setFields(){
	document.vs.cname.value					= document.forms[1].cname.value;
	document.vs.cmail.value					= document.forms[1].cmail.value;
	document.vs.cbodytext.value				= document.forms[1].cbody.value;
	document.forms[1].submit();
}