function checkformlink() {
	if (document.frmlink.counter.value>=1){
		alert("Sorry, the form only one submit!.");
		return false;	
	}else {
		// url
		if (document.frmlink.linkurl.value.length <1) { 
			alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your URL link."); 
			document.frmlink.linkurl.focus(); return false; 
		}
		// title
		if (document.frmlink.linktitle.value.length <1) { 
			alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your Site title."); 
			document.frmlink.linktitle.focus(); return false; 
		}
		// desdription
		if (document.frmlink.linkdesc.value.length <1) { 
			alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your Site description."); 
			document.frmlink.linkdesc.focus(); return false; 
		}
		
		// email
		if (document.frmlink.linkemail.value.length <1) { 
			alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your email address."); 
			document.frmlink.linkemail.focus(); return false; 
		}	
		else { 
			dmn = document.frmlink.linkemail.value.substr(document.frmlink.linkemail.value.indexOf("@")+1,document.frmlink.linkemail.value.length);
			if((document.frmlink.linkemail.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) {
				alert("Please type a valid email address.\nEx : (yourname@opensource.com)."); document.frmlink.linkemail.focus(); return false; 
			}
		}
		// contact
		if (document.frmlink.linkcontact.value.length <1) { 
			alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your contact person.");
			document.frmlink.linkcontact.focus(); return false; 
		}
		document.frmlink.submit();
		}
}

function checkformbooking() {
	// full name
	if (document.frmbooking.bookname.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your Full name."); 
		document.frmbooking.bookname.focus(); return false; 
	}
	// email
	if (document.frmbooking.bookemail.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your email address."); 
		document.frmbooking.bookemail.focus(); return false; 
	}	
	else { 
		dmn = document.frmbooking.bookemail.value.substr(document.frmbooking.bookemail.value.indexOf("@")+1,document.frmbooking.bookemail.value.length);
		if((document.frmbooking.bookemail.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) {
			alert("Please type a valid email address.\nEx : (yourname@opensource.com)."); document.frmbooking.bookemail.focus(); return false; 
		}
	}
	// street addr
	if (document.frmbooking.bookadd.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your street address."); 
		document.frmbooking.bookadd.focus(); return false; 
	}
	// arrival date
	if (document.frmbooking.bookcekinmonth.value.length <1){ 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your arrival of month."); 
		document.frmbooking.bookcekinmonth.focus(); return false; 
	}else {
		if(document.frmbooking.bookcekinday.value.length <1){
			alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your arrival of day."); 
			document.frmbooking.bookcekinday.focus(); return false; 
		}
	}	
	// daparture date
	if (document.frmbooking.bookcekoutmonth.value.length <1){ 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your departure of month."); 
		document.frmbooking.bookcekoutmonth.focus(); return false; 
	}else {
		if(document.frmbooking.bookcekoutday.value.length <1){
			alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your departure of day."); 
			document.frmbooking.bookcekoutday.focus(); return false; 
		}
	}
	// security code
	if (document.frmbooking.security_code.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease security code."); 
		document.frmbooking.security_code.focus(); return false; 
	}
	document.frmbooking.submit();
}
function checkSubsc() {
	// name
	if (document.frmsubscribe.name.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your name."); 
		document.frmsubscribe.name.focus(); return false; 
	}
	// email
	if (document.frmsubscribe.email.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your email address."); 
		document.frmsubscribe.email.focus(); return false; 
	}	
	else { 
		dmn = document.frmsubscribe.email.value.substr(document.frmsubscribe.email.value.indexOf("@")+1,document.frmsubscribe.email.value.length);
		if((document.frmsubscribe.email.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) {
			alert("Please type a valid email address.\nEx : (yourname@balinter.com)."); document.frmsubscribe.email.focus(); return false; 
		}
	}
	// secure
	if (document.frmsubscribe.security_code.value.length <1) { 
		alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your secure code to prevent spamming."); 
		document.frmsubscribe.security_code.focus(); return false; 
	}
	document.frmsubscribe.submit();
}