//--------------------------------------------------validate form
function validate(){
	if(document.myform.fname.value==""){
		alert("Enter a First Name")
		document.myform.fname.focus()
		return false;
	}else if(document.myform.lname.value==""){
		alert("Enter a Last Name")
		document.myform.lname.focus()
		return false;
	}else if ((document.myform.email.value.indexOf("@") == -1)||(document.myform.email.value.indexOf(".") == -1)){
		alert("Not a valid e-mail")
		document.myform.email.focus()
		return false;
	}else if(document.myform.vemail.value!=document.myform.email.value){
		alert("Check your email address again")
		document.myform.vemail.focus()
		return false;
	}
	return true;
}

//--------------------------------------------------reg validate form
function regvalidate(){
	if(document.myform.rfname.value==""){
		alert("Enter a First Name")
		document.myform.rfname.focus()
		return false;
	}else if(document.myform.rsname.value==""){
		alert("Enter a Surname")
		document.myform.rsname.focus()
		return false;
	}else if(document.myform.padd.value==""){
		alert("Enter a Postal Address")
		document.myform.padd.focus()
		return false;
	}else if ((document.myform.remail.value.indexOf("@") == -1)||(document.myform.remail.value.indexOf(".") == -1)){
		alert("Not a valid e-mail")
		document.myform.remail.focus()
		return false;
	}else if(document.myform.rvemail.value!=document.myform.remail.value){
		alert("Check your email address again")
		document.myform.rvemail.focus()
		return false;
	}
	return true;
}

//--------------------------------------------------reg validate form
function regvalidate2(){
	if(document.myform.rfname.value==""){
		alert("Enter a first name")
		document.myform.rfname.focus()
		return false;
	}else if(document.myform.rsname.value==""){
		alert("Enter a surname")
		document.myform.rsname.focus()
		return false;
	}else if(document.myform.padd.value==""){
		alert("Enter an address")
		document.myform.padd.focus()
		return false;
	}else if(document.myform.city.value==""){
		alert("Enter a city")
		document.myform.city.focus()
		return false;
	}else if(document.myform.tel.value==""){
		alert("Enter a phone number")
		document.myform.tel.focus()
		return false;
	}else if ((document.myform.remail.value.indexOf("@") == -1)||(document.myform.remail.value.indexOf(".") == -1)){
		alert("Not a valid e-mail")
		document.myform.remail.focus()
		return false;
	}else if(document.myform.rvemail.value!=document.myform.remail.value){
		alert("Check your email address again")
		document.myform.rvemail.focus()
		return false;
	}else if(document.myform.din_no.value==""){
			alert("Enter a number of people for the Conference Dinner")
			document.myform.din_no.focus()
			return false;
	}
	return true;
}


//--------------------------------------------------reg new window
function regWin(url){
	var dw=620;// new window width
 	var dh=600;// new window height
	var newwindow=window.open(url,'form','width='+dw+',height='+dh+',top=0,left=0,toolbar=no, scrollbars=yes, menubar=no, status=no, resizable=no, directories=no');
	if (window.focus){
	newwindow.focus()
	}
	return false;
}

//--------------------------------------------------sponsor
function newWin(url){
	var dw=800;// new window width
 	var dh=770;// new window height
	var newwindow=window.open(url,'news','width='+dw+',height='+dh+',top=0,left=0,toolbar=no, scrollbars=no, menubar=no, status=no, resizable=no, directories=no');
	if (window.focus){
	newwindow.focus()
	}
	return false;
}

//--------------------------------------------------tellafriend
function tellWin(url){	
	var dw=400;// new window width
 	var dh=450;// new window height
	var newwindow=window.open(url,'news','width='+dw+',height='+dh+',top=0,left=0,toolbar=no, scrollbars=no, menubar=no, status=no, resizable=no, directories=no');
	if (window.focus){
	newwindow.focus()
	}
	return false;
}

//--------------------------------------------------submenu
function submenu(target){
	if (document.getElementById){
		var showlist = document.getElementById(target).style;
		if(showlist.display=="block"){
			showlist.display="none";
		}else{
			document.getElementById('conferencesub').style.display="none";	
			showlist.display="block";
		}
		return false;
	}else{
		return true;
	}
}

function submenuout(target){
	if (document.getElementById){
		var showlist = document.getElementById(target).style;
		if(showlist.display=="block"){
			showlist.display="none";
		}else{
			document.getElementById('conferencesub').style.display="none";	
			showlist.display="block";
		}
		return false;
	}else{
		return true;
	}
}




