///////////////////


// This part gets the IP
function IPblock()
{
var ip = '<!--#echo var="REMOTE_ADDR"-->';



if(ip=="95.211.0.141")
{
	alert("You are treated as spammer as per DesingPresentation's terms and conditions. ");
return false;	
}
else 
{
true;	
}
//alert("Your IP address is "+ip);
}










function checkexpertlogin()
{
var string =document.loginform.txtemail.value;
//this function is used  in dp.com cad expert login dp-expert-login.asp
if(string.length<=0)
{
alert("Kindly enter E-mail address.");	
return false;
}

else if(document.loginform.txtpassword.value.length<=0)
{
 alert("kindly enter password.");
 return false;
}
else
{
return true;	
}

}
function checkexpertpass()
{///this function is used in dp.com for cad expert dp-changepassword.asp page 
var msg='';
//alert(msg);
var opass=document.loginform.txtoldpass.value;
if(opass.length<=0)
{
msg+="Kindly enter old password.\r\n";	
}
var npass=document.loginform.txtnewpass.value;
if(npass.length<=0)
{
msg+="Kindly enter new password.\r\n";	
}
var cpass=document.loginform.txtnewcpass.value;
if(cpass.length<=0)
{
msg+="Kindly enter confirm password.\r\n";	
}
if(npass!=cpass)
{
//	alert(npass+);
msg+="New and confirm Password are not same. "
}
if(msg.length>0)
{
alert(msg);	
return false;
}
else
{
return true;	
}
}

function chkemailaddress()
{
	///this is use for dp.com cad expert forgot password ..
	var msg='';
	var	 string=document.loginform.txtemail.value;
	//alert(string);
	if (string.length<=0)
	{
		alert("kindly enter E-mail addres.\r\n");
		return false;
	}
	
//alert(string);
	else if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
	{
		return true;
	}
		else
	{
			 alert("Please Enter Valid E-mail ID\r\n");	
			 return false;
	}	

	

}


function check_quick1()
{ var msg='';
	var emailID=document.q_form.textfield6;
	if (document.q_form.ffile.value == "")
    {
	    msg+=("Please Browse Your File.\r\n");		
	    document.q_form.ffile.focus();
	   // return false;
    }	
     if (document.q_form.textfield.value == "")
    {
	    msg+=("Please Enter Your Name.\r\n");		
	    document.q_form.textfield.focus();
	   // return false;
    }
    
 
     if (document.q_form.textfield3.value == "")
    {
	    msg+=("Please Enter Your Company.\r\n");		
	    document.q_form.textfield3.focus();
	   // return false;
    }
	 if (document.q_form.textfield5.value == "")
    {
	    msg+=("Please Enter Your Phone No.\r\n");		
	    document.q_form.textfield5.focus();
	   // return false;
    }	
     if ((emailID.value==null)||(emailID.value==""))
	{
		msg+=("Please Enter your E-mail ID\r\n");		
		document.q_form.textfield6.focus();
		//return false
	}
//////	 if (echeck(emailID.value)==false)
//////	{
//////		document.q_form.textfield6.focus();
//////		//return false
//////	}    
//////	 if (echeck(document.q_form.textfield6.value)==false)
//////    {
//////       	document.q_form.textfield6.focus();
//////       // return false;
//////    }
    
   
	 if (document.q_form.Dist_country.value == "-Select Country-")
    {
	    msg+=("Please Select Your Country.\r\n");		
	    document.q_form.Dist_country.focus();
	   // return false;
    }
    
	 if (document.q_form.textarea2.value == "")
    {
	    msg+=("Please enter your address.\r\n");		
	    document.q_form.textarea2.focus();
	    //return false;
    }
    
	 if(document.getElementById("textarea3").value=="")
	{
		msg+=("Please provide a brief description!\r\n");
		document.getElementById("textarea3").focus();
	//	return false;
	}
	/*
	 if(document.getElementById("holdCAP").value.toLowerCase()!=document.getElementById("testtext").value.toLowerCase())
	{
		alert("Sorry That Was Not The Correct Verification Code.");		
		document.getElementById("testtext").focus();
		return false;
	}
	*/
	if(msg.length>0)
	{
	alert(msg);
	return false;
		}
	else
	{
	return true;
	}
	 if(q_form.ffile.value!="")
    {	
		
		var fileAndPath = new String(q_form.ffile.value);	
		//find the index of the last "\"
		var lastPathDelimiter = fileAndPath.lastIndexOf("\\");
		//get everything after the last "\"
		var txt_filenameOnly = fileAndPath.substring(lastPathDelimiter+1);
		//get . position
		var lastPathdot = fileAndPath.lastIndexOf(".");
		// get everything after the last "."
		var extOnly = fileAndPath.substring(lastPathdot+1);
		
		if(extOnly =="exe" || extOnly =="bat" || extOnly =="sys" || extOnly =="ini" || extOnly =="ins")
		{
			alert(".exe, .bat, .sys, .ini, .ins Files Are Not Allowed. Please Upload zip Files Of Your Project.");
			q_form.ffile.focus();
			return false;
		}		
		else
		{		
			return true;
		}
	}

	else
	{
		return true;
	}
	
}

////////////////

/////////////////////


////order form check fields 
function check_quickOrder()
{ var msg='';

	var emailID=document.o_form.txtOmail;
	
     if (document.o_form.txtfname.value == "")
    {
	    msg+=("Please Enter Your First Name.\r\n");		
	    document.o_form.txtfname.focus();
	   // return false;
    }

      if (document.o_form.txtlname.value == "")
    {
	    msg+=("Please Enter Your Last Name.\r\n");		
	    document.o_form.txtlname.focus();
	   // return false;
    }

 
     if (document.o_form.txtOcompany.value == "")
    {
	    msg+=("Please Enter Your Company.\r\n");		
	    document.o_form.txtOcompany.focus();
	   // return false;
    }

  if (document.o_form.txtPO.value == "")
    {
	    msg+=("Please Enter Your PO(Work Order).\r\n");		
	    document.o_form.txtPO.focus();
	   // return false;
    }

    
	 if (document.o_form.txtOphno.value == "")
    {
	    msg+=("Please Enter Your Phone No.\r\n");		
	    document.o_form.txtOphno.focus();
	   // return false;
    }	


  
	 if (document.o_form.txtOadd1.value == "")
    {
	    msg+=("Please enter your address 1.\r\n");		
	    document.o_form.txtOadd1.focus();
	    //return false;
    }


     if ((emailID.value==null)||(emailID.value==""))
	{
		msg+=("Please Enter your E-mail ID\r\n");		
		document.o_form.txtOmail.focus();
		//return false
	}
	
		
		
//////	 if (echeck(emailID.value)==false)
//////	{
//////		document.o_form.textfield6.focus();
//////		//return false
//////	}    
//////	 if (echeck(document.o_form.textfield6.value)==false)
//////    {
//////       	document.o_form.textfield6.focus();
//////       // return false;
//////    }
    


	 if (document.o_form.txtOcity.value == "")
    {
	    msg+=("Please enter your City.\r\n");		
	    document.o_form.txtOcity.focus();
	    //return false;
    }

	 if (document.o_form.txtOState.value == "")
    {
	    msg+=("Please enter your state.\r\n");		
	    document.o_form.txtOState.focus();
	    //return false;
    }

   //txtOzip
	 if (document.o_form.txtOzip.value == "")
    {
	    msg+=("Please enter your ZIP.\r\n");		
	    document.o_form.txtOzip.focus();
	    //return false;
    }

	 if (document.o_form.ODist_country.value == "-Select Country-")
    {
	    msg+=("Please Select Your Country.\r\n");		
	    document.o_form.ODist_country.focus();
	   // return false;
    }
    
if(document.o_form.ffile2.value=="")
    {	
	   msg+=("Please Select Your File.\r\n");	
	document.o_form.ffile2.focus();
    
	}
	if(document.getElementById("txtVerCode").value=="")
	{
		msg+=("Please enter verification code.");
	}
	else
	{
    if(document.getElementById("holdCAP").value!=document.getElementById("txtVerCode").value)
{
msg+=("Please enter correct verification code.");
document.getElementById("txtVerCode").focus();
}
	}
	/*
	
		 if(document.getElementById("textarea3").value=="")
	{
		msg+=("Please provide a brief description!\r\n");
		document.getElementById("textarea3").focus();
	//	return false;
	}
	 if(document.getElementById("holdCAP").value.toLowerCase()!=document.getElementById("testtext").value.toLowerCase())
	{
		alert("Sorry That Was Not The Correct Verification Code.");		
		document.getElementById("testtext").focus();
		return false;
	}
	*/

	if(msg.length>0)
	{
	alert(msg);
	return false;
		}
	else
	{
	return true;
	}
	 if(document.o_form.ffile.value!="")
    {	
		
		var fileAndPath = new String(o_form.ffile2.value);	
		//find the index of the last "\"
		var lastPathDelimiter = fileAndPath.lastIndexOf("\\");
		//get everything after the last "\"
		var txt_filenameOnly = fileAndPath.substring(lastPathDelimiter+1);
		//get . position
		var lastPathdot = fileAndPath.lastIndexOf(".");
		// get everything after the last "."
		var extOnly = fileAndPath.substring(lastPathdot+1);
		
		if(extOnly =="exe" || extOnly =="bat" || extOnly =="sys" || extOnly =="ini" || extOnly =="ins")
		{
			alert(".exe, .bat, .sys, .ini, .ins Files Are Not Allowed. Please Upload zip Files Of Your Project.");
			o_form.ffile2.focus();
			return false;
		}		
		else
		{		
			return true;
		}
	}

	else
	{
		return true;
	}
	
}

////////////////


///////////////////////

//LOGIN CODING-----------------------------------------------------------
		function ValidatePassFail(User,Pass)
			{
				var GetUser=document.getElementById(User);
				var GetPass=document.getElementById(Pass);
				if(GetUser.value =="")
				{
					alert("Code can not be left blank")
					GetUser.focus();
					return false;
				}
				else if(GetPass.value =="" )
				{
					alert("Password can not be left blank")
					GetPass.focus();
					return false;
				}
				else
				{
				return true;
				}

			}

			function SetFocus()
			{
				document.LoginForm.uname.focus();
			}

		function login()
		{

			str = new String(document.LoginForm.uname.value)


			        str = str.substr((str.length-3),str.length);
					if(str=="r2v" || str=="r2v")
					{

			           return true;
			        }
			        else
			        {
			        	alert("Invalid Code");
			        	document.LoginForm.uname.focus();
			         	return false;
					}


			return false;

		}

		function forget()
		{
			window.open("forget.asp","Print","top=5,left=30,toolbars=no,maximize=yes,resize=yes,width=370,height=250,location=no,directories=no,scrollbars=yes");
		}
//BOOKMARK CODING-----------------------------------------------------------

 function bookmark() {
 title = "Raster2Vector"; 
 url = "http://www.rastertovector.biz/";

	if (window.sidebar) { // Mozilla Firefox Bookmark

		window.sidebar.addPanel(title, url,"");

	} else if( window.external ) { // IE Favorite

		window.external.AddFavorite( url, title); }

	else if(window.opera && window.print) { // Opera Hotlist

		return true; }

 }
//Images - PRE-LOADER CODING------------------

<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

// quick form coading

function onkeyPress(e)
{
    var key = window.event ? e.keyCode : e.which;
    if (key == 13)
    StartClick();
    e.cancelBubble = true;
    e.returnValue = false;
    return false;
}

function checkspecial(checkfield)
{
 	var iChars = "!%^[]\\\`/{}|\'~:<>?";
	for (var i = 0; i < checkfield.length; i++)
	{
		if (iChars.indexOf(checkfield.charAt(i)) != -1)
		{
			//alert("yes")
			return true;
		}			
	}					
}

function resetquick()
{
	document.q_form.reset();	
	GenNewCap();	
}



function ChkDatacad_form()
{
var msg='';
//document.getElementById("txtfname").value==""
if(document.cad_form.txtfname.value=="")
{
msg+="Please Enter First Name \r\n";
//alert(msg);
}
if(document.cad_form.txtlname.value=="")
{
msg+="Please Enter Last Name \r\n";

}
if(document.cad_form.txtemail.value=="")
{
msg+="Please Enter Email id\r\n";

}
else
{
var	 string=document.cad_form.txtemail.value;
//alert(string);
	if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) 
!= -1)
	{
		
	}
		else
	{
			  msg +=("Please Enter Valid E-mail ID\r\n");	
	}	
	
}
if(document.cad_form.txtphone.value=="")
{
msg+="Please Enter Phno number \r\n";

}



if(document.cad_form.txttitle.value=="")
	{
		msg+=("Please enter job title.\r\n");
	}
	if(document.cad_form.txtcompany.value=="")
	{
		msg+=("Please enter company name.\r\n");
	}

if(document.cad_form.txtcountry.value=="No")
	{
		msg+=("Please select country.\r\n");
	}

if(document.cad_form.txtquestion.value=="")
	{
		msg+=("Please enter question.\r\n");
	}

if(document.cad_form.txthearabt.value=="No")
	{
		msg+=("Please select How you heard about Design Presentation.\r\n");
	}


if(document.cad_form.testtext.value=="")
	{
		msg+=("Please enter verification code.\r\n");
	}
	else
	{
    if(document.cad_form.holdCAP1.value!=document.cad_form.testtext.value)
{
msg+=("Please enter correct verification code.");
document.cad_form.testtext.focus();
}
	}


if(msg.length>0)
	{
	alert(msg);
	return false;
	}
	else
	{
	return true;
	}
}

function echeck(str)
{
str=str.value;
	var at="@";
	var dot=".";
	var lat=str.indexOf(at);
	var lstr=str.length;
	var ldot=str.indexOf(dot);
	//alert(str.indexOf(dot));
	//alert(lstr);
	if (str.indexOf(at)==-1)
	{
	   alert("Invalid E-mail ID");
	   document.q_form.textfield6.value='';
	      document.q_form.textfield6.focus();
	   return false;
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
	{
	   ("Invalid E-mail ID");
	   document.q_form.textfield6.value='';
	     document.q_form.textfield6.focus();
	   return false;
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==(lstr-1))
	{
		alert("Invalid E-mail ID");
		document.q_form.textfield6.value='';
		  document.q_form.textfield6.focus();
		return false;
	}
	 if (str.indexOf(at,(lat+1))!=-1)
	 {
		alert("Invalid E-mail ID");
		document.q_form.textfield6.value='';
		  document.q_form.textfield6.focus();
		return false;
	 }
	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
	 {
		alert("Invalid E-mail ID");
		document.q_form.textfield6.value='';
		  document.q_form.textfield6.focus();
		return false;
	 }
	 if (str.indexOf(dot,(lat+2))==-1)
	 {
		alert("Invalid E-mail ID");
		document.q_form.textfield6.value='';
		  document.q_form.textfield6.focus();
		return false;
	 }
	 if (str.indexOf(" ")!=-1 || str.indexOf("!")!=-1 || str.indexOf("?")!=-1 || str.indexOf("$")!=-1 || str.indexOf("^")!=-1 || str.indexOf("*")!=-1 || str.indexOf("{")!=-1)
	 {
		alert("Invalid E-mail ID");
		document.q_form.textfield6.value='';
		  document.q_form.textfield6.focus();
		return false;
	 }
	 return true;
}




function echeckOrder(str)
{
str=str.value;
	var at="@";
	var dot=".";
	var lat=str.indexOf(at);
	var lstr=str.length;
	var ldot=str.indexOf(dot);
	//alert(str.indexOf(dot));
	//alert(lstr);
	if (str.indexOf(at)==-1)
	{
	   alert("Invalid E-mail ID");
	   document.o_form.txtOmail.value='';
	      document.o_form.txtOmail.focus();
	   return false;
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
	{
	   ("Invalid E-mail ID");
	   document.o_form.txtOmail.value='';
	     document.o_form.txtOmail.focus();
	   return false;
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==(lstr-1))
	{
		alert("Invalid E-mail ID");
		document.o_form.txtOmail.value='';
		  document.o_form.txtOmail.focus();
		return false;
	}
	 if (str.indexOf(at,(lat+1))!=-1)
	 {
		alert("Invalid E-mail ID");
		document.o_form.txtOmail.value='';
		  document.o_form.txtOmail.focus();
		return false;
	 }
	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
	 {
		alert("Invalid E-mail ID");
		document.o_form.txtOmail.value='';
		  document.o_form.txtOmail.focus();
		return false;
	 }
	 if (str.indexOf(dot,(lat+2))==-1)
	 {
		alert("Invalid E-mail ID");
		document.o_form.txtOmail.value='';
		  document.o_form.txtOmail.focus();
		return false;
	 }
	 if (str.indexOf(" ")!=-1 || str.indexOf("!")!=-1 || str.indexOf("?")!=-1 || str.indexOf("$")!=-1 || str.indexOf("^")!=-1 || str.indexOf("*")!=-1 || str.indexOf("{")!=-1)
	 {
		alert("Invalid E-mail ID");
		document.o_form.txtOmail.value='';
		  document.o_form.txtOmail.focus();
		return false;
	 }
	 return true;
}

function check_quick()
{ 
	var emailID=document.q_form.textfield6;
	if (document.q_form.ffile.value == "")
    {
	    alert("Please Browse Your File.");		
	    document.q_form.ffile.focus();
	    return false;
    }	
	else if (document.q_form.textfield.value == "")
    {
	    alert("Please Enter Your Name.");		
	    document.q_form.textfield.focus();
	    return false;
    }
    else if (document.q_form.textfield3.value == "")
    {
	    alert("Please Enter Your Company.");		
	    document.q_form.textfield3.focus();
	    return false;
    }
	else if (document.q_form.textfield5.value == "")
    {
	    alert("Please Enter Your Phone No.");		
	    document.q_form.textfield5.focus();
	    return false;
    }	
    else if ((emailID.value==null)||(emailID.value==""))
	{
		alert("Please Enter your E-mail ID");		
		textfield6.focus();
		return false
	}
	else if (echeck(emailID.value)==false)
	{
		textfield6.focus();
		return false
	}    
	else if (echeck(document.q_form.textfield6.value)==false)
    {
       	document.q_form.textfield6.focus();
        return false;
    }
    
  
	
    /*	
	else if (document.q_form.txt_output.value == "-Select Output Format-")
    {
	    alert("Please Select Output Format.");		
	    document.q_form.txt_output.focus();
	    return false;
    }
	else if (document.q_form.ddate.value == "")
    {
	    alert("Please Select Delivery Date.");		
	    document.q_form.ddate.focus();
	    return false;
    }	
    
    */
	else if (document.q_form.Dist_country.value == "-Select Country-")
    {
	    alert("Please Select Your Country.");		
	    document.q_form.Dist_country.focus();
	    return false;
    }
    
	else if (document.q_form.textarea2.value == "")
    {
	    alert("Please enter your address.");		
	    document.q_form.textarea2.focus();
	    return false;
    }
    
	else if(document.getElementById("textarea3").value=="")
	{
		alert("Please provide a brief description!");
		document.getElementById("textarea3").focus();
		return false;
	}
	/*
	else if(document.getElementById("holdCAP").value.toLowerCase()!=document.getElementById("testtext").value.toLowerCase())
	{
		alert("Sorry That Was Not The Correct Verification Code.");		
		document.getElementById("testtext").focus();
		return false;
	}
	*/
	else if(q_form.ffile.value!="")
    {	
		
		var fileAndPath = new String(q_form.ffile.value);	
		//find the index of the last "\"
		var lastPathDelimiter = fileAndPath.lastIndexOf("\\");
		//get everything after the last "\"
		var txt_filenameOnly = fileAndPath.substring(lastPathDelimiter+1);
		//get . position
		var lastPathdot = fileAndPath.lastIndexOf(".");
		// get everything after the last "."
		var extOnly = fileAndPath.substring(lastPathdot+1);
		
		if(extOnly =="exe" || extOnly =="bat" || extOnly =="sys" || extOnly =="ini" || extOnly =="ins")
		{
			alert(".exe, .bat, .sys, .ini, .ins Files Are Not Allowed. Please Upload zip Files Of Your Project.");
			q_form.ffile.focus();
			return false;
		}		
		else
		{		
			return true;
		}
	}
	else
	{
		return true;
	}
}
function CheckKeyCode(event)
{
	if(event.which)
	{ // Netscape/Firefox/Opera
		key_code= event.which;
		if (key_code == 8) 
		{
			//alert(key_code);
			event.returnValue = true;
			return true;			
		}		
		else if (key_code < 48 || key_code > 57) 
		{
			//alert(key_code);
			event.returnValue = false;
			return false;			
		}		
		else
		{
			return true;			
		}
	}
	else if(event.keyCode)
	{ //IE
		key_code = event.keyCode
		if (key_code < 48 || key_code > 57) 
		{
			//alert(key_code);
			event.returnValue = false;
			return false;			
		}		
		else
		{
			//alert(key_code);
			return true;			
		}
	}	
}

function check_qty()
{
	if(document.getElementById("qty_a").value == "" && document.getElementById("qty_b").value == "" && document.getElementById("qty_c").value == "" && document.getElementById("qty_d").value == "" && document.getElementById("qty_e").value == "" && document.getElementById("qty_f").value == "")
	{
		alert("Please enter your quantity");
		return false;
	}
	else if(isNaN(document.getElementById("qty_a").value))
	{
		alert("Please enter Number Only");
		document.getElementById("qty_a").focus();
		return false;
	}
	else if(isNaN(document.getElementById("qty_b").value))
	{
		alert("Please enter Number Only");
		document.getElementById("qty_b").focus();
		return false;
	}
	else if(isNaN(document.getElementById("qty_c").value))
	{
		alert("Please enter Number Only");
		document.getElementById("qty_c").focus();
		return false;
	}
	else if(isNaN(document.getElementById("qty_d").value))
	{
		alert("Please enter Number Only");
		document.getElementById("qty_d").focus();
		return false;
	}
	else if(isNaN(document.getElementById("qty_e").value))
	{
		alert("Please enter Number Only");
		document.getElementById("qty_e").focus();
		return false;
	}
	else if(isNaN(document.getElementById("qty_f").value))
	{
		alert("Please enter Number Only");
		document.getElementById("qty_f").focus();
		return false;
	}
	else
	{
		callsum();		
		return true;
	}
}
function checktxn()
{
	if(document.getElementById("txnid").value=="")
	{
		alert("Please Enter The Paypal Txn Id!");
		document.getElementById("txnid").focus();
		return false;
	}
	else
	{
		return true;
	}
}

function checkSearch()
{
	if (document.frmSiteSearch.search.value=="")
	{
		alert("Please enter at least one keyword to search.");
		document.frmSiteSearch.search.focus();
		return false;
	}
	else
	{	
		return true;
	}
}

function echeckcomm(str)
{
str=str.value;
	var at="@";
	var dot=".";
	var lat=str.indexOf(at);
	var lstr=str.length;
	var ldot=str.indexOf(dot);
	//alert(str.indexOf(dot));
	//alert(lstr);
	if (str.indexOf(at)==-1)
	{
	   alert("Invalid E-mail ID");
	document.cadForm.txtemail.value='';
		  document.cadForm.txtemail.focus();
	
	   return false;
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
	{
	   ("Invalid E-mail ID");
	document.cadForm.txtemail.value='';
		  document.cadForm.txtemail.focus();
	   return false;
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==(lstr-1))
	{
		alert("Invalid E-mail ID");
	document.cadForm.txtemail.value='';
		  document.cadForm.txtemail.focus();
		return false;
	}
	 if (str.indexOf(at,(lat+1))!=-1)
	 {
		alert("Invalid E-mail ID");
	document.cadForm.txtemail.value='';
		  document.cadForm.txtemail.focus();
		return false;
	 }
	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
	 {
	document.cadForm.txtemail.value='';
		  document.cadForm.txtemail.focus();
		return false;
	 }
	 if (str.indexOf(dot,(lat+2))==-1)
	 {
		alert("Invalid E-mail ID");
		document.cadForm.txtemail.value='';
		  document.cadForm.txtemail.focus();
		return false;
	 }
	 if (str.indexOf(" ")!=-1 || str.indexOf("!")!=-1 || str.indexOf("?")!=-1 || str.indexOf("$")!=-1 || str.indexOf("^")!=-1 || str.indexOf("*")!=-1 || str.indexOf("{")!=-1)
	 {
		alert("Invalid E-mail ID");
		document.cadForm.txtemail.value='';
		  document.cadForm.txtemail.focus();
		return false;
	 }
	 return true;
}



