function result(form){
if(!valuname())
{ document.form1.uname.focus();
return false; }
if(!valname())
{ document.form1.name.focus();
return false; }
if(!valpass())
{ document.form1.pw.focus();
return false; }
if(!valcpass())
{ document.form1.pwc.focus();
return false; }
if(!valckpass())
{ document.form1.pwc.value="";
document.form1.pw.value="";
document.form1.pw.focus();
return false; }
if(!valemail())
{ document.form1.email.focus();
return false;}

if(!valcaptha())
{ 
return false; }

return true; }

function result_gtr(form_gtr){
if (!valit_invst())
{ document.form2.user.focus();
return false; } 

if (!valress_cntr())
{ document.form2.data_wh.focus();
return false; }
if (!valdf_part())
{ document.form2.participate[0].focus();
return false; } 


return true; }


function result_df(form_df){
if (!valdf_part())
{ document.form2.participate[0].focus();
return false; } 
return true; }

function valuname()
{var n=document.form1.uname.value;
if (n.length == 0)
{ alert("Enter your User Name!");
return false; }
return true; }
function valcaptha()
{
var n=document.form1.captcha.value;
k = total;
if (n.length == 0 )
{ 
return false;
}
else if (n != k )
{
return false;
}
return true;
}
function valpass()
{var p = document.form1.pw.value;
if (p.length == 0)
{ alert("Select a Password");   
return false; }
return true; }
function valcpass()
{var pc = document.form1.pwc.value;
if (pc.length == 0)
{ alert("Enter Confirmation password");   
return false; }
return true; }
function valckpass()
{var p = document.form1.pw.value;
var pc = document.form1.pwc.value;
if(p != pc)
{ alert("Your Password and Confirm Password does not match, do retype again"); 
return false; }
return true; }
function valname()
{ var n=document.form1.name.value;
if (n.length == 0)
{ alert("Enter your Name!");
return false; }
return true; }
function valemail()
{ var e=document.form1.email.value;
var count1=0
var count2=0
if(e.length==0)
{ alert("Enter your email ID");
return false; }
for(var i=0; i<e.length;i++)
{ var ch=e.charAt(i)
if(ch == "@")
count1++;
if(ch == ".")
count2++; }
if ((count1 !=1) || (count2 < 1))
{ alert("Enter Correct email ID")
return false; }
return true; }
function valage()
{ var a2=document.form1.age.value;
if(a2=="ag")
{ alert("Please select your Age!")
return false; }
return true; }
function valsex()
{ var a1=document.form1.sex.value;
if(a1=="sx")
{ alert("Specify your Gender!")
return false; }
return true; }
function valadde()
{ var ad=document.form1.adde.value;
if (ad.length == 0)
{ alert("Specify your address!");
return false; }
return true; }
function valchkcity()
{var cct = document.form1.city.value;
//var occt = document.form1.othCity.value;
if(((cct=="ct")&&(occt==""))||(occt==" "))
{ alert("Specify which City!"); 
return false; }
return true; }
function valchkstate()
{var sst = document.form1.state.value;
//var osst = document.form1.othState.value;
if(((sst=="st")&&(osst==""))||(osst==" "))
{ alert("Specify which State!"); 
return false; }
return true; }
function valpcode()
{ var pc=document.form1.pcode.value;
if (pc.length == 0)
{ alert("Specify Pincode!");
return false; }
return true; }
function valcont()
{ var a=document.form1.cont.value;
if(a=="select")
{ alert("Select your Country!")
return false; }
return true; }
function valorg_prof_stm()
{ var ps=document.form1.org_prof_stm.value;
if(ps=="0")
{ alert("Please specify Professional Stream!")
return false; }
return true; }
function valorg_prof()
{ var pr=document.form1.org_prof.value;
if(pr=="0")
{ alert("Please specify your profession!")
return false; }
return true; }
function valincome()
{ var incm=document.form1.income.value;
if(incm=="0")
{ alert("Please select your Income group!")
return false; }
return true; }
function valind_seg()
{ var a3=document.form1.ind_seg.value;
if(a3=="0")
{ alert("Please select your Industry Segment!")
return false; }
return true; }

catopt = new Array;
catopt[0] = "Select";
catopt[1] = "ISP, ASP's, iDC and Callcenters";
catopt[2] = "Information Technology";
catopt[3] = "Hardware";
catopt[4] = "Insurance";
catopt[5] = "Financial Services";
catopt[6] = "Automobile and Ancillaries";
catopt[7] = "Pharmaceuticals and Biotech";
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 Consultant";
catopt[14] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Ad agencies";
catopt[15] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Advertising";
catopt[16] = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Media";
catopt[17] = "Government";
catopt[18] = "Telecommunications";
catopt[19] = "Other";
catoptv = new Array;
catoptv[0] = "0";
catoptv[1] = "ISP,ASP's,iDC_and_Callcenters";
catoptv[2] = "Information_Technology";
catoptv[3] = "Hardware";
catoptv[4] = "Insurance";
catoptv[5] = "Financial_Services";
catoptv[6] = "Automobile_and_Ancillaries";
catoptv[7] = "Pharmaceuticals_and_Biotech";
catoptv[8] = "Manufacturing";
catoptv[9] = "0";
catoptv[10] = "Hotel";
catoptv[11] = "Hospital";
catoptv[12] = "Health_Care";
catoptv[13] = "Placement_Consultant";
catoptv[14] = "Ad_agencies";
catoptv[15] = "Advertising";
catoptv[16] = "Media";
catoptv[17] = "Government";
catoptv[18] = "Telecommunications";
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 == 19))
    {
    siteopt = new Array;
    siteopt[0] = new Option("NA");
    }

  if ((menuNum == 4)||(menuNum == 5)||(menuNum == 6)||(menuNum == 7)||(menuNum == 8)||(menuNum == 17))
    {
    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 == 18))
    {
    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; }
}

