function result(form)
	{
		
	if(!valuname())
		{
		document.getElementById("txtUserID").focus();
		return false;
		 }
		 
	if(!valname())
		{ 
		document.getElementById("txtName").focus();
		return false; 
		}
		
	if(!valpass())
	{ 
		document.getElementById("txtPW").focus();
		return false;
	}
	
	if(!valcpass())
	{
		document.getElementById("txtCPW").focus();
		return false; 
	}
	
	if(!valckpass())
		{
		document.getElementById("txtCPW").value="";
		document.getElementById("txtPW").value="";
		document.getElementById("txtPW").focus();
		return false;
		}


	if(!valemail())
		{
		document.getElementById("txtEmail").focus();
		return false;
		}
		
	if(!valphone())
		{
		document.getElementById("txtPhone").focus();
		return false;
		}
		
	if(!valorg())
		{
		document.getElementById("txtOrg").focus();
		return false; 
		}
		
	if(!valorg_prof_stm())
		{ 
		document.getElementById("drpProfStream").focus();
		return false; 
		}
		
	if(!valorg_prof())
		{ 
		document.getElementById("drpProf").focus();
		return false; 
		}
		
	var orglevel = document.getElementById("org_level").value;
	if (orglevel == "0")
		{
		alert("Please select level in organisation!");
		document.getElementById("org_level").focus();
		return false; 
		}
		
	 
	if(!valind_seg())
		{ 
		document.getElementById("ind_seg").focus();
		return false; 
		}
		
	var ITSpend = document.getElementById("drpTurnOver").value;
	if (ITSpend == "0")
		{
		alert("Select annual turnover of your company!");
		document.getElementById("drpTurnOver").focus();
		return false; 
		}
		
	return true;

}

function valuname()
	{
	var n  = document.getElementById("txtUserID").value;

	if (n == "" || n==" ")
		{
	 	alert("Enter your User Name!");
		return false; 
		}
	return true; 
	}
	
function valname()
	{
	var n = document.getElementById("txtName").value;
	if (n == "" || n == " ")
		{
		alert("Enter your Name!");
		return false; 
		}
	if (n.length>49)
		{
		alert("Name should be less than 50 letters");
		return false; 
		}
	return true; 
	}
	
function valpass()
	{
	var p = document.getElementById("txtPW").value;
	
	if (p == "" || p==" ")
		{ 
		alert("Select a Password");   
		return false; 
		}
	txtPW = document.getElementById("txtPW").value
	if(txtPW.length >10)
		{
		alert("Password should not be more than 10 characters")
		document.getElementById("txtPW").value="";
		return false;
		}
	return true;
	}
	
function valcpass()
	{
	var pc = document.getElementById("txtCPW").value;
	if (pc == "" || pc==" ")
		{
		alert("Enter Confirmation password");   
		return false; 
		}
	return true; 
	}

function valckpass()
	{
	var p = document.getElementById("txtPW").value;
	var pc = document.getElementById("txtCPW").value;
	if(p != pc)
		{
		alert("Your Password and Confirm Password does not match, do retype again"); 
		return false; 
		}
	return true; 
	}

function valemail()
	{
	var e= document.getElementById("txtEmail").value;
	var ePat = /^([\w-\.]+)@([\w-]+)\.([\w-\.]+)$/g;
    var matchEmail=e.match(ePat);
	if (matchEmail == null)
{
alert("Invalid E-mail Address! Please re-enter.")
return false;
}
	return true; }
	
function valphone()
	{
	var n = document.getElementById("txtPhone").value;
	if (n == "" || n == " ")
		{
		alert("Enter your phone number!");
		return false; 
		}
	if (n.length < 6)
		{
		alert("Enter your valid phone number!");
		return false; 
		}
	return true; 
	}
	
function valorg()
	{
	var o = document.getElementById("txtOrg").value;
	if (o.length == 0)
		{
		alert("Mention your Organisation!");
		return false; 
		}
	else if (o.length > 49)
		{
		alert("Organisation should be less than 50 letter!");
		return false; 
		}

	return true; 
	}
	
function valorg_prof_stm()
	{ 
	var ps=document.getElementById("drpProfStream").value;
	if(ps=="0")
		{
		alert("Please specify Professional Stream!")
		return false; 
		}
	return true; 
	}
	
function valorg_prof()
	{
	 var pr=document.getElementById("drpProf").value;
	if(pr.length == 0)
		{
		alert("Please specify your Designation!")
		return false; 
		}
	return true; 
	}


function valind_seg()
	{ 
	var a3 = document.getElementById("ind_seg").value;
	if(a3=="0")
		{ 
		alert("Please select your Industry Segment!")
		return false; 
		}
	return true; 
	}

function valpl_org()
	{ 
	var lpa3= document.getElementById("pl_org").value;
	if(lpa3=="0")
		{ 
		alert("Please specify No. of employees\nin your organisation!")
		return false; 
		}
	return true; 
	}

catopt = new Array;
catopt[0] = "Select";
catopt[1] = "ISP, ASP, iDC or Call Centre";
catopt[2] = "Software or ITES";
catopt[3] = "Hardware";
catopt[4] = "Telecommunications";
catopt[5] = "Insurance";
catopt[6] = "Financial Services";
catopt[7] = "Automobile and Ancillaries";
catopt[8] = "Manufacturing";
catopt[9] = "&nbsp;&nbsp;- Services -";
catopt[10] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Hotel";
catopt[11] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Hospital";
catopt[12] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Health Care";
catopt[13] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Placement/ Management Consultant";
catopt[14] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Ad agency";
catopt[15] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Advertising";
catopt[16] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Media";
catopt[17] = "Government";
catopt[18] = "Public sector";
catopt[19] = "Other";
catoptv = new Array;
catoptv[0] = "0";
catoptv[1] = "ISP,ASP's,iDC_and_Callcenters";
catoptv[2] = "Software_or_ITES";
catoptv[3] = "Hardware";
catoptv[4] = "Telecommunications";
catoptv[5] = "Insurance";
catoptv[6] = "Financial_Services";
catoptv[7] = "Automobile and Ancillaries";
catoptv[8] = "Manufacturing";
catoptv[9] = "0";
catoptv[10] = "Hotel";
catoptv[11] = "Hospital";
catoptv[12] = "Health_Care";
catoptv[13] = "Placement_Management_Consultant";
catoptv[14] = "Ad_agency";
catoptv[15] = "Advertising";
catoptv[16] = "Media";
catoptv[17] = "Government";
catoptv[18] = "Public_sector";
catoptv[19] = "Other";

siteopt = new Array;
siteopt[0] = "NA"
var trueLength = siteopt.length;
var lst = siteopt.length;
function changeMenu()
	  {
	  siteopt.length = 0;
	  menuNum = document.form1.ind_seg.selectedIndex; 
	  if (menuNum == null) 
		return;
	  if ((menuNum == 0)||(menuNum == 9)||(menuNum == 20))
	    {
		    siteopt = new Array;
		    siteopt[0] = new Option("NA");
	    }

	  if ((menuNum == 4)||(menuNum == 5)||(menuNum == 6)||(menuNum == 7)||(menuNum == 8)||(menuNum == 17)||(menuNum == 18))
	    {
		    siteopt = new Array;
		    siteopt[0] = new Option("0-99");
		    siteopt[1] = new Option("100-499");
		    siteopt[2] = new Option("> 500");
		    siteopt[3] = new Option("NA");
	    }

	  if ((menuNum == 1)||(menuNum == 2)||(menuNum == 3)||(menuNum == 10)||(menuNum == 11)||(menuNum == 12)||(menuNum == 13)||(menuNum == 14)||(menuNum == 15)||(menuNum == 16)||(menuNum == 19))
		    {
		    siteopt = new Array;
		    siteopt[0] = new Option("0-49");
		    siteopt[1] = new Option("50-299");
		    siteopt[2] = new Option("> 300");
		    siteopt[3] = new Option("NA");
		    }

	  tot = siteopt.length;
	  for (i = lst; i > 0; i--)
		    {
		    document.form1.pl_org.options[i] = null;
		    }
	  for (i = 0; i < tot; i++)
		    {
		    document.form1.pl_org.options[i] = siteopt[i];
		    }
	  document.form1.pl_org.options[0].selected = true;
	  lst = siteopt.length;
	}	

function valit_invst()
	{
	var r=document.form2.user.checked;
	var t=document.form2.fst_rec.checked;
	var co=document.form2.infl.checked;
	var cp=document.form2.fn_app.checked;
	if ((r) || (t) || (co) || (cp))
		{
		 return true; 
		}
		else
		{
		alert("Specify your participation preference in decision making!") }
		return false; 
		}

function valress_cntr()
	{	 
	var res1=document.form2.data_wh.checked;
	var res2=document.form2.dbms.checked;
	var res3=document.form2.out_src.checked;
	var res4=document.form2.call_cnt1.checked;
	var res5=document.form2.fin_ser.checked;
	var res6=document.form2.hlt_cr.checked;
	var res7=document.form2.internet.checked;
	var res8=document.form2.net_wrk.checked;
	var res9=document.form2.erp.checked;
	var res10=document.form2.lan.checked;
	var res11=document.form2.knlg_mng.checked;
	if ((res1) || (res2) || (res3) || (res4) || (res5) || (res6) || (res7) || (res8) || (res9) || (res10) || (res11))
		{ return true; }
	else
		{
	 	alert("Specify your Reading preference in Resource Center!") }
		return false; 
		}

function valdf_part()
	{
	var parti = 0
	for(var p=0; p<4; p++)
		{
		if (document.form2.participate[p].checked)
			{
			parti = 1
			break
			}
		}
	if (parti == 1)
		{	
		return true;
		}
	else
		{ 
		alert("Specify your Forum preference!")
		return false; 
		}
	}
