function jumpBox(list) {

  location.href = list.options[list.selectedIndex].value

}



function validate()

{
	
	if(document.DSFORM.fname.value=="")

	{

		alert("Please enter your First Name");

		document.DSFORM.fname.focus();

	}

	else if(document.DSFORM.lname.value=="")

	{

		alert("Please enter your Last Name");

		document.DSFORM.lname.focus();

	}

		else if(document.DSFORM.title.value=="")

	{

		alert("Please enter your Job Title");

		document.DSFORM.title.focus();

	}

		else if(document.DSFORM.email.value=="")

	{

		alert("Please enter your Email Address");

		document.DSFORM.email.focus();

	}

		else if (echeck(document.DSFORM.email.value)==false){

		document.DSFORM.email=""

		document.DSFORM.email.focus();

	}

	

	else if(document.DSFORM.phone.value=="")

	{

		alert("Please enter your Phone");

		document.DSFORM.phone.focus();

	}

		else if(document.DSFORM.question.value=="")

	{

		alert("Please select your question");

		document.DSFORM.question.focus();

	}

		else if(document.DSFORM.myquestion.value=="")

	{

		alert("Question Text box is left blank");

		document.DSFORM.myquestion.focus();

	}

	else

	{

		document.DSFORM.cmdSubmit.value="Login";

		document.DSFORM.submit();

	}

}





function validatewhitepaperform()

{

	if(document.DSFORM.fname.value=="")

	{

		alert("Please enter your First Name");

		document.DSFORM.fname.focus();

	}

		else if(document.DSFORM.lname.value=="")

	{

		alert("Please enter your Last Name");

		document.DSFORM.lname.focus();

	}

		else if(document.DSFORM.title.value=="")

	{

		alert("Please enter your Job Title");

		document.DSFORM.title.focus();

	}

	

		else if(document.DSFORM.email.value=="")

	{

		alert("Please enter your Email Address");

		document.DSFORM.email.focus();

	}

		else if (checkEmail(document.DSFORM.email.value)==false){

		document.DSFORM.email=""

		document.DSFORM.email.focus();

	}

		else if(document.DSFORM.phone.value=="")

	{

		alert("Please enter your Telephone");

		document.DSFORM.phone.focus();

	}

	else

	{	

		document.DSFORM.cmdSubmit.value="Login";

		document.DSFORM.submit();

	}

}







function validate1()

{

	if(document.DSFORM.fname.value=="")

	{

		alert("Please enter your First Name");

		document.DSFORM.fname.focus();

	}

	else if(document.DSFORM.lname.value=="")

	{

		alert("Please enter your Last Name");

		document.DSFORM.lname.focus();

	}

		else if(document.DSFORM.title.value=="")

	{

		alert("Please enter your Job Title");

		document.DSFORM.title.focus();

	}

		else if(document.DSFORM.email.value=="")

	{

		alert("Please enter your Email Address");

		document.DSFORM.email.focus();

	}

		else if(document.DSFORM.phone.value=="")

	{

		alert("Please enter your Telephone");

		document.DSFORM.phone.focus();

	}



	else

	{

		document.DSFORM.cmdSubmit.value="Login";

		document.DSFORM.submit();

	}

}

function checkEmail(inputvalue){	
    var pattern=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
    if(pattern.test(inputvalue)){         
		return true;  
    }else{   
		alert("Invalid E-mail ID")
		   return false;
    }
}


function echeck(str) {

		
		str=str.replace(/^\s+|\s+$/, '');
		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					

	}