function validatefrm(t,secverify)
{
	if(t.name.value=="")
	{
		alert("Please specify your Name....");
		t.name.focus();
		return 0;
	}
	if(secverify==1 || secverify==4 || secverify==5 || secverify==6)
		if(t.organisationname.value=="")
		{
			alert("Please specify your organisation name...");
			t.organisationname.focus();
			return 0;
		}
		var emailID=t.email
		if (echeck(emailID.value)==false)
		{
			emailID.value=""
			emailID.focus()
			return false
		}
	if(secverify==1)
		if(t.phones.value=="")
		{
			alert("Please specify your contact phone/ mobile number for immediate response...");
			t.phones.focus();
			return 0;
		}

	if(secverify==5)
		if(t.requirementdetails.value=="")
		{
			alert("Please specify your Tele-calling requirement in brief...");
			t.requirementdetails.focus();
			return 0;
		}


	  if(secverify==1)
	  	{
	Item = t.sectorname.selectedIndex; 
	Result1 = t.sectorname.options[Item].text; 

    if (Result1 == "---- Select ----") 
	{
		alert("Please specify your Sector Name....");
		t.sectorname.focus();
		return false;
	}
	}
	if(secverify==2)
  	{
		if(t.dkeyword.value=="")
		{
			alert("Please specify your desired Keyword....");
			t.dkeyword.focus();
			return 0;
		}
	Item = t.shortcode.selectedIndex; 
	Result1 = t.shortcode.options[Item].text; 

    if (Result1 == "--- Select ---") 
	{
		alert("Please specify Short Code you wish to opt....");
		t.shortcode.focus();
		return false;
	}
	}
	if(secverify==3)
  	{
		if(t.dqty.value=="" || (t.dqty.value>='a' && t.dqty.value<='z') || (t.dqty.value>='A' && t.dqty.value<='Z'))
		{
			alert("Please specify your Numeric desired Bulk SMS Quantity....");
			t.dqty.focus();
			return 0;
		}
		if(t.dcountry.value=="")
		{
			alert("Please specify your desired Bulk sms Target Country....");
			t.dcountry.focus();
			return 0;
		}
	}

	  if(secverify==4)
	  	{
	Item = t.sectorname.selectedIndex; 
	Result1 = t.sectorname.options[Item].text; 

    if (Result1 == "---- Select ----") 
	{
		alert("Please specify desired Sector Name for Support....");
		t.sectorname.focus();
		return false;
	}
	Item = t.severity.selectedIndex; 
	Result1 = t.severity.options[Item].text; 

    if (Result1 == "---- Select ----") 
	{
		alert("Please specify severity of issues faced for best of support....");
		t.severity.focus();
		return false;
	}
	}

	if(t.comments.value=="")
	{
		alert("Please specify your Comments/ Suggestions....");
		t.comments.focus();
		return 0;
	}
	  
	if(t.strCAPTCHA.value=="")
	{
		alert("Please specify capture code as shown above - used for controlling automated postings....");
		t.strCAPTCHA.focus();
		return 0;
	}
	  
	t.submit();
	return 1;
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}

function showimg(mmid)
{
	
	window.open(mmid,"Geneology","resizable=no,toolbar=0,location=0,menubar=0,status=0,height=200,top=220,left=250,width=430,,scrollbars=0");	
}

function getimg(cntt,ipath)
{
	window.open("dispimg.asp?i=" + cntt + "&folder=" + ipath,"viewimage","resizable=yes,toolbar=0,location=0,menubar=0,status=0,height=700,top=14,left=62,width=900,,scrollbars=1");	
	//window.open("dispimg.asp?i=" + ipath,"viewimage","resizable=yes,toolbar=0,location=0,menubar=0,status=0,height=700,top=14,left=62,width=900,,scrollbars=1");	
	//window.document.getElementById('image').innerHTML="<img src='" + ipath + "' border=0>";
}

function photoview(pname)
{
	vinfo="dispimg.asp?f="+pname;
	window.open(vinfo,"Photo","resizable=yes,toolbar=0,location=0,menubar=0,status=0,height=500 ,top=220,left=250,width=830,,scrollbars=1");	
}

function form_action_first(f)
{
	f.st.value=1;
	return true;
}

function form_action_prev(f,cntr)
{
	f.st.value=cntr;
	return true;
}

function form_action_next(f,cntr)
{
	f.st.value=cntr;
	return true;
}

function form_action_last(f,cntr)
{
	f.st.value=cntr;
	return true;
}