function IsBlank(vValue){
	var fnd=true;
	var ln=vValue.length;
	if (ln){for (i=0;i < ln ;i++){
	if (vValue.substr(i,1) !=" "){fnd=false; break;	}}}
	return fnd;
}
function chkfrm(){
	var frm = document.forms[0];
	var fd=false;

	if (IsBlank(frm.txt_name.value)){
		alert("Enter your name");frm.txt_name.focus();return false;}
	if (IsBlank(frm.txt_company.value)){
		alert("Enter company");frm.txt_company.focus();return false;}
	if (IsBlank(frm.txt_email.value)){
		alert("Enter email");frm.txt_email.focus();return false;}
	var sTemp=new String(frm.txt_email.value)
	if (!IsBlank(sTemp)){
		var ivld=false,subarr,tarr = sTemp.split("@");
		if (tarr.length>1){
		for (i=0; i < tarr.length; i++ ){
		subarr = tarr[i].split(".");
		if ( (i>0 && subarr.length >1) || (i==0 && subarr.length)){
		for (j=0; j < subarr.length; j++ ){
		if (subarr[j].length==0){ ivld=true; break;}}} else ivld=true;
		}}else ivld=true;
		if (ivld){ alert("Invalid email"); frm.txt_email.focus();return false;}
	}
	if (IsBlank(frm.txt_position.value)){
		alert("Enter position");frm.txt_position.focus();return false;}
	if (IsBlank(frm.txt_phone.value)){
		alert("Enter contact number");frm.txt_phone.focus();return false;}
	if (IsBlank(frm.txt_industry.value)){
		alert("Select your industry");frm.txt_industry.focus();return false;}
	if (IsBlank(frm.txt_product.value)){
		alert("Select a product");frm.txt_product.focus();return false;}
	if (IsBlank(frm.txt_comments.value)){
		alert("Enter your enquiry");frm.txt_comments.focus();return false;}

return true;
}

function Init(){
	var frm=document.forms[0];

	var dt=new Date();
	frm.year.value=dt.getFullYear();
	if (dt.getMonth() + 1 > 11) {
		frm.month.selectedIndex=0;frm.year.value++;
	}
	else frm.month.selectedIndex = dt.getMonth()+1;
	return true;
}