//--------------for login focus-------------//

function user_login_focus()

{

	document.user_login.user_name.focus();

}

//-----------------------------------------//





//----------------popup for Quality---------------//

function isAlphaNumeric(elem, helperMsg){

	var alphaExp = /^[0-9a-zA-Z]+$/;

	if(elem.value.match(alphaExp)){

		return true;

	}else{

		alert(helperMsg);

		elem.focus();

		return false;

	}

}

function isInteger(s)

{

      var i;

	s = s.toString();

      for (i = 0; i < s.length; i++)

      {

         var c = s.charAt(i);

         if (isNaN(c)) 

	   {

		alert("Given value must be an Integer.");

		return false;

	   }

      }

      return true;

}





//email = document.f1.email.value

//AtPos = email.indexOf("@")

//StopPos = email.lastIndexOf(".")



//if (AtPos == -1 || StopPos == -1) {

//Message = "Not a valid email address"

//}



//}







function new_qualityWindow(URL,WIN_NAME)

{



	var HEIGHT=screen.height;

	var POPUP_HEIGHT = HEIGHT-400;

	var POPUP_WIDTH = 750;

	var HEIGHT_POP=screen.height;

	HEIGHT_POP=(HEIGHT_POP/2) - (POPUP_HEIGHT/2);

	var WIDTH_POP=screen.width;

	WIDTH_POP=(WIDTH_POP/2) - (POPUP_WIDTH/2);

	window.open(URL,WIN_NAME,'top='+HEIGHT_POP+', left='+WIDTH_POP+', width='+POPUP_WIDTH+',height='+POPUP_HEIGHT+',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');

	return false;

}











function new_awardWindow(URL,WIN_NAME)

{



	var HEIGHT=screen.height;

	var POPUP_HEIGHT = HEIGHT-300;

	var POPUP_WIDTH = 750;

	var HEIGHT_POP=screen.height;

	HEIGHT_POP=(HEIGHT_POP/2) - (POPUP_HEIGHT/2);

	var WIDTH_POP=screen.width;

	WIDTH_POP=(WIDTH_POP/2) - (POPUP_WIDTH/2);

	window.open(URL,WIN_NAME,'top='+HEIGHT_POP+', left='+WIDTH_POP+', width='+POPUP_WIDTH+',height='+POPUP_HEIGHT+',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');

	return false;

}



function checkEmail(myForm) {

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)){

return (true)

}

alert("Invalid E-mail Address! Please re-enter.")

return (false)

}



//-----------------------------------------------//

//-----------------------------------------------//

function next_regpage()

{

var user=document.userregistration.user_name.value.length;

var username=document.userregistration.user_name.value;

var email=document.userregistration.email.value.length;

var mail=document.userregistration.email.value;

var pass=document.userregistration.user_pass.value.length;

var repass=document.userregistration.repass.value.length;

var password=document.userregistration.user_pass.value;

var repassword=document.userregistration.repass.value;

var name=document.userregistration.name.value.length;

var comp_name=document.userregistration.comp_name.value.length;

var contact_person=document.userregistration.contact_person.value.length;

var designation=document.userregistration.designation.value.length;

var add1=document.userregistration.add1.value.length;

var add2=document.userregistration.add2.value.length;

var city=document.userregistration.city.value.length;

var country=document.userregistration.country.value.length;

var state=document.userregistration.state.value.length;

var zip_code=document.userregistration.zip_code.value.length;

var phone_no=document.userregistration.phone_no.value.length;

var fax=document.userregistration.fax.value.length;

var heard_abt=document.userregistration.heard_abt.value.length;

var secquestion=document.userregistration.secquestion.value.length;

var secquestionanswer=document.userregistration.secquestionanswer.value.length;

var alphaExp = /^[0-9a-zA-Z]+$/;

var AtPos = mail.indexOf("@")

var StopPos = mail.lastIndexOf(".")

if(user==0 || user==null)

{

	alert("PLEASE CHOOSE USERNAME");

	document.userregistration.user_name.focus();

	return false;

}

else if(!username.match(alphaExp))

{

	alert("Plaease enter valid user name");

	return false;

}

else if(email==0 || email==null)

{

	alert("PLEASE ENTER YOUR EMAIL");

	document.userregistration.email.focus();

	return false;

}

else if (AtPos == -1 || StopPos == -1) {

 alert("Not a valid email address");

 document.userregistration.email.focus();

 return false;

}

else if(pass==0 || pass==null)

{

	alert("PLEASE ENTER YOUR PASSWORD");

	document.userregistration.user_pass.focus();

	return false;

}

else if(!(pass>=4))

{

	alert("PASSWORD MUST BE MORE THAN 4 CHARCTERS");

	document.userregistration.user_pass.focus();

	return false;

}

else if(repass==0 || repass==null)

{

	alert("PLEASE ENTER YOUR REPASSWORD");

	document.userregistration.repass.focus();

	return false;

}

else if(repassword != password)

{

	alert("PASSWORD AND RE-TYPE PASSWORD MUST BE SAME");

	document.userregistration.repass.focus();

	return false;

}

else if(name==0 || name==null)

{

	alert("PLEASE ENTER YOUR NAME");

	document.userregistration.name.focus();

	return false;

}

else if(comp_name==0 || comp_name==null)

{

	alert("PLEASE ENTER YOUR COMPANY NAME");

	document.userregistration.comp_name.focus();

	return false;

}

else if(contact_person==0 || contact_person==null)

{

	alert("PLEASE ENTER CONTACT PERSON NAME");

	document.userregistration.contact_person.focus();

	return false;

}

else if(designation==0 || designation==null)

{

	alert("PLEASE ENTER DESIGNATION");

	document.userregistration.designation.focus();

	return false;

}

else if(add1==0 || add1==null)

{

	alert("PLEASE ENTER ADDRESS");

	document.userregistration.add1.focus();

	return false;

}

else if(city==0 || city==null)

{

	alert("PLEASE ENTER CITY");

	document.userregistration.city.focus();

	return false;

}

else if(country==0 || country==null)

{

	alert("PLEASE SELECT COUNTRY");

	document.userregistration.country.focus();

	return false;

}

else if(state==0 || state==null)

{

	alert("PLEASE ENTER STATE");

	document.userregistration.state.focus();

	return false;

}



else if(zip_code==0 || zip_code==null)

{

	alert("PLEASE ENTER ZIP-CODE");

	document.userregistration.zip_code.focus();

	return false;

}

else if(phone_no==0 || phone_no==null)

{

	alert("PLEASE ENTER PHONE NUMBER");

	document.userregistration.phone_no.focus();

	return false;

}

else if(secquestion==0 || secquestion==null)

{

	alert("PLEASE SELECT YOUR SECURITY QUESTION");

	document.userregistration.secquestion.focus();

	return false;

}

else if(secquestionanswer==0 || secquestionanswer==null)

{

	alert("PLEASE ENTER ANSWER FOR YOUR SECURITY QUESTION");

	document.userregistration.secquestionanswer.focus();

	return false;

}

else

{

 document.userregistration.submit();

 document.userregistration.action="./user_registration_deliaddress.jsp";

 return true;

}

}

function deliver_address()

{

var txtCompanyName=document.userregistrationdel.txtCompanyName.value.length;

var txtContactPerson=document.userregistrationdel.txtContactPerson.value.length;

var txtDesignation=document.userregistrationdel.txtDesignation.value.length;

var txtAddress1=document.userregistrationdel.txtAddress1.value.length;

var ddlCountry=document.userregistrationdel.ddlCountry.value.length;

var txtState=document.userregistrationdel.txtState.value.length;

var txtCity=document.userregistrationdel.txtCity.value.length;

var txtZip=document.userregistrationdel.txtZip.value.length;

var txtTel=document.userregistrationdel.txtTel.value.length;

var txtFax=document.userregistrationdel.txtFax.value.length;

var txtEmail=document.userregistrationdel.txtEmail.value.length;

var Email=document.userregistrationdel.txtEmail.value;



var txtCompanyNameDel=document.userregistrationdel.txtCompanyNameDel.value.length;

var txtContactPersonDel=document.userregistrationdel.txtContactPersonDel.value.length;

var txtDesignationDel=document.userregistrationdel.txtDesignationDel.value.length;

var txtAddress1Del=document.userregistrationdel.txtAddress1Del.value.length;

var ddlCountryDel=document.userregistrationdel.ddlCountryDel.value.length;

var txtStateDel=document.userregistrationdel.txtStateDel.value.length;

var txtCityDel=document.userregistrationdel.txtCityDel.value.length;

var txtZipDel=document.userregistrationdel.txtZipDel.value.length;

var txtTelDel=document.userregistrationdel.txtTelDel.value.length;

var txtEmailDel=document.userregistrationdel.txtEmailDel.value.length;

var EmailDel=document.userregistrationdel.txtEmailDel.value;

var missinginfo = "";

var AtPos = Email.indexOf("@")

var StopPos = Email.lastIndexOf(".")

var AtPos1 = EmailDel.indexOf("@")

var StopPos1 = EmailDel.lastIndexOf(".")



if(txtCompanyName==0 || txtCompanyName==null)

{

	alert("PLEASE ENTER COMPANY NAME");

	document.userregistrationdel.txtCompanyName.focus();

	return false;

}

if(txtContactPerson==0 || txtContactPerson==null)

{

	alert("PLEASE ENTER CONTACT PERSON");

	document.userregistrationdel.txtContactPerson.focus();

	return false;

}

if(txtDesignation==0 || txtDesignation==null)

{

	alert("PLEASE ENTER DESIGNATION");

	document.userregistrationdel.txtDesignation.focus();

	return false;

}

if(txtAddress1==0 || txtAddress1==null)

{

	alert("PLEASE ENTER ADDRESS");

	document.userregistrationdel.txtAddress1.focus();

	return false;

}

if(ddlCountry==0 || ddlCountry==null)

{

	alert("PLEASE SELECT COUNTRY");

	document.userregistrationdel.ddlCountry.focus();

	return false;

}

if(txtState==0 || txtState==null)

{

	alert("PLEASE ENTER STATE");

	document.userregistrationdel.txtState.focus();

	return false;

}

if(txtCity==0 || txtCity==null)

{

	alert("PLEASE ENTER CITY");

	document.userregistrationdel.txtCity.focus();

	return false;

}

if(txtZip==0 || txtZip==null)

{

	alert("PLEASE ENTER ZIP-CODE");

	document.userregistrationdel.txtZip.focus();

	return false;

}

if(txtTel==0 || txtTel==null)

{

	alert("PLEASE ENTER PHONE NUMBER");

	document.userregistrationdel.txtTel.focus();

	return false;

}

if(txtEmail==0 || txtEmail==null)

{

	alert("PLEASE ENTER EMAIL");

	document.userregistrationdel.txtEmail.focus();

	return false;

}

if (AtPos == -1 || StopPos == -1)

{

 alert("Not a valid email address");

 document.userregistrationdel.txtEmail.focus();

 return false;

}

if(txtCompanyNameDel==0 || txtCompanyNameDel==null)

{

	alert("PLEASE ENTER COMPANY NAME");

	document.userregistrationdel.txtCompanyNameDel.focus();

	return false;

}

if(txtContactPersonDel==0 || txtContactPersonDel==null)

{

	alert("PLEASE ENTER CONTACT PERSON");

	document.userregistrationdel.txtContactPersonDel.focus();

	return false;

}

if(txtDesignationDel==0 || txtDesignationDel==null)

{

	alert("PLEASE ENTER DESIGNATION");

	document.userregistrationdel.txtDesignationDel.focus();

	return false;

}

if(txtAddress1Del==0 || txtAddress1Del==null)

{

	alert("PLEASE ENTER ADDRESS");

	document.userregistrationdel.txtAddress1.focus();

	return false;

}

if(ddlCountryDel==0 || ddlCountryDel==null)

{

	alert("PLEASE SELECT COUNTRY");

	document.userregistrationdel.ddlCountryDel.focus();

	return false;

}

if(txtStateDel==0 || txtStateDel==null)

{

	alert("PLEASE ENTER STATE");

	document.userregistrationdelDel.txtState.focus();

	return false;

}

if(txtCityDel==0 || txtCityDel==null)

{

	alert("PLEASE ENTER CITY");

	document.userregistrationdel.txtCityDel.focus();

	return false;

}

if(txtZipDel==0 || txtZipDel==null)

{

	alert("PLEASE ENTER ZIP-CODE");

	document.userregistrationdel.txtZipDel.focus();

	return false;

}

if(txtTel==0 || txtTel==null)

{

	alert("PLEASE ENTER PHONE NUMBER");

	document.userregistrationdel.txtTelDel.focus();

	return false;

}

if(txtEmailDel==0 || txtEmailDel==null)

{

	alert("PLEASE ENTER EMAIL");

	document.userregistrationdel.txtEmailDel.focus();

	return false;

}

if (AtPos1 == -1 || StopPos1 == -1)

{

 alert("Not a valid email address");

 document.userregistrationdel.txtEmailDel.focus();

 return false;

}

if(!document.userregistrationdel.user_agree.checked)

{

 alert("You must agree to the terms");

 return false;

} 

else

{

return true;

}

}

function retCancel()

{

document.next_form.action = "express_order.jsp";

}



function pwdinfovalidate()

{

		if(document.change_pwd_form.old_pwd.value=="")

		{

		    alert("Please Enter the Old Password");

			document.change_pwd_form.old_pwd.focus();

			return false;

		}

		if(document.change_pwd_form.new_pwd.value=="")

		{

			alert("Please Enter the New Password");

			document.change_pwd_form.new_pwd.focus();

			return false;

		}

		

		if(document.change_pwd_form.confirm_pwd.value=="")

		{

			alert("Please Retype the New Password");

			document.change_pwd_form.confirm_pwd.focus();

			return false;

		}

		var newPassword = document.change_pwd_form.new_pwd.value;

		var confirmPassword = document.change_pwd_form.confirm_pwd.value;

		

		if(newPassword!=confirmPassword)

		{

			alert("New Password & Confirm Password should be the same");

			document.change_pwd_form.confirm_pwd.focus();

			return false;

		}

		

		

}





function pwdinfovalidate1()

{

		if(document.change_pwd_form1.old_pwd.value=="")

		{

		    alert("Please Enter the Old Password");

			document.change_pwd_form1.old_pwd.focus();

			return false;

		}

		if(document.change_pwd_form1.new_pwd.value=="")

		{

			alert("Please Enter the New Password");

			document.change_pwd_form1.new_pwd.focus();

			return false;

		}

		

		if(document.change_pwd_form1.confirm_pwd.value=="")

		{

			alert("Please Retype the New Password");

			document.change_pwd_form1.confirm_pwd.focus();

			return false;

		}

		var newPassword = document.change_pwd_form1.new_pwd.value;

		var confirmPassword = document.change_pwd_form1.confirm_pwd.value;

		

		if(newPassword!=confirmPassword)

		{

			alert("New Password & Confirm Password should be the same");

			document.change_pwd_form1.confirm_pwd.focus();

			return false;

		}

		

		

}





function validate()

{

var email_id=document.passwordforgot.emailID.value;

var secure_que=document.passwordforgot.secquestionforpass.value;

var secure_answer=document.passwordforgot.secquestionanswerforpass.value;

if(email_id=="")

{

 alert("Please u have to enter User ID");

 return false;

}

else if(secure_que=="")

{

 alert("Please u have to select your security question");

 return false;

}

else if(secure_answer=="")

{

 alert("Please u have to enter your security answer");

 return false;

}



return true;



/*if(secure_que=="")

{

 alert("Please u have to select your security question");

 return false;

}

else

{

return true;

}*/

}

function calculate_price()

{

var ddDimension = document.getElementById("ddDimension").options[document.getElementById("ddDimension").selectedIndex].text;

var ddPCBType = document.getElementById("ddPCBType").options[document.getElementById("ddPCBType").selectedIndex].text;

var boardLength = document.getElementById("boardLength").value;

var boardWidth = document.getElementById("boardWidth").value;

var ddNoOfLayers = document.getElementById("ddNoOfLayers").options[document.getElementById("ddNoOfLayers").selectedIndex].text;

var ddBoardThickNess = document.getElementById("ddBoardThickNess").options[document.getElementById("ddBoardThickNess").selectedIndex].text;

var ddStartCopperThickness = document.getElementById("ddStartCopperThickness").options[document.getElementById("ddStartCopperThickness").selectedIndex].text;

var NoofPCB = document.getElementById("NoofPCB").value;

var ddSurfacefinish = document.getElementById("ddSurfaceFinish").options[document.getElementById("ddSurfaceFinish").selectedIndex].text;

var ddDeliveryAddress = document.getElementById("ddDeliveryAddress").options[document.getElementById("ddDeliveryAddress").selectedIndex].value;

var ddDeliveryTerm = document.getElementById("ddDeliveryTerm").options[document.getElementById("ddDeliveryTerm").selectedIndex].text;

var ddSmallestHoleSize = document.getElementById("ddSmallestHoleSize").options[document.getElementById("ddSmallestHoleSize").selectedIndex].text;

var ddSmallestLineSpace = document.getElementById("ddSmallestLineSpace").options[document.getElementById("ddSmallestLineSpace").selectedIndex].text;

var ddSolderMaskSides = document.getElementById("ddSolderMaskSides").options[document.getElementById("ddSolderMaskSides").selectedIndex].text;

var ddSolderMaskColor = document.getElementById("ddSolderMaskColor").options[document.getElementById("ddSolderMaskColor").selectedIndex].text;

var ddSmdSides = document.getElementById("ddSmdSides").options[document.getElementById("ddSmdSides").selectedIndex].text;

var ddGoldFinger = document.getElementById("ddGoldFinger").options[document.getElementById("ddGoldFinger").selectedIndex].text;

var ddMaterial = document.getElementById("ddMaterial").options[document.getElementById("ddMaterial").selectedIndex].text;

var ddSilkscreenSides = document.getElementById("ddSilkscreenSides").options[document.getElementById("ddSilkscreenSides").selectedIndex].text;

var ddSilkscreenColor = document.getElementById("ddSilkscreenColor").options[document.getElementById("ddSilkscreenColor").selectedIndex].text;

var ddSmdPitch = document.getElementById("ddSmdPitch").options[document.getElementById("ddSmdPitch").selectedIndex].text;

var ddFinalFab = document.getElementById("ddFinalFab").options[document.getElementById("ddFinalFab").selectedIndex].text;

var noofcuts = document.getElementById("noofcuts").value;



var PCBName = document.Expressorder_pg_form.PCBName.value.length;

var PCBType = document.Expressorder_pg_form.ddPCBType .value.length;

var Dimension = document.Expressorder_pg_form.ddDimension.value.length;

var BoardLength = document.Expressorder_pg_form.boardLength.value.length;

var BoardWidth = document.Expressorder_pg_form.boardWidth.value.length;

var NoOfLayers = document.Expressorder_pg_form.ddNoOfLayers.value.length;

var BoardThickNess = document.Expressorder_pg_form.ddBoardThickNess.value;

var StartCopperThickness = document.Expressorder_pg_form.ddStartCopperThickness.value.length;

var SurfaceFinish = document.Expressorder_pg_form.ddSurfaceFinish.value.length;

var noofcuts1 = document.Expressorder_pg_form.noofcuts.value.length;

var noofpcb = document.Expressorder_pg_form.NoofPCB.value;

var DeliveryAddress = document.Expressorder_pg_form.ddDeliveryAddress.value.length;

var DeliveryTerm = document.Expressorder_pg_form.ddDeliveryTerm.value.length;

var Transport = document.Expressorder_pg_form.ddTransport.value.length;

var TransportService = document.Expressorder_pg_form.ddTransportService.value.length;

var SmallestHoleSize = document.Expressorder_pg_form.ddSmallestHoleSize.value.length;

var SmallestLineSpace = document.Expressorder_pg_form.ddSmallestLineSpace.value.length;

var SolderMaskSides = document.Expressorder_pg_form.ddSolderMaskSides.value.length;

var SolderMaskColor = document.Expressorder_pg_form.ddSolderMaskColor.value.length;

var SmdSides = document.Expressorder_pg_form.ddSmdSides.value.length;

var GoldFinger = document.Expressorder_pg_form.ddGoldFinger.value.length;

var Material = document.Expressorder_pg_form.ddMaterial.value.length;

var SilkscreenSides = document.Expressorder_pg_form.ddSilkscreenSides.value.length;

var SilkscreenColor = document.Expressorder_pg_form.ddSilkscreenColor.value.length;

var SmdPitch = document.Expressorder_pg_form.ddSmdPitch.value.length;

var FinalFab = document.Expressorder_pg_form.ddFinalFab.value.length;





if(PCBName==0 || PCBName=="")

{

	alert("PLEASE ENTER PCB NAME");

	document.Expressorder_pg_form.PCBName.focus();

	return false;

}

if(PCBType==0 || PCBType=="")

{

	alert("PLEASE SELECT PCB TYPE");

	document.Expressorder_pg_form.ddPCBType.focus();

	return false;

}

if(Dimension==0 || Dimension=="")

{

	alert("PLEASE SELECT BOARD DIMENSIONS");

	document.Expressorder_pg_form.ddDimension.focus();

	return false;

}

if(BoardLength==0 || BoardLength=="")

{

	alert("PLEASE ENTER BOARD LENGTH");

	document.Expressorder_pg_form.boardLength.focus();

	return false;

}

if(BoardWidth==0 || BoardWidth=="")

{

	alert("PLEASE ENTER BOARD WIDTH");

	document.Expressorder_pg_form.boardWidth.focus();

	return false;

}

if(NoOfLayers==0 || NoOfLayers=="")

{

	alert("PLEASE SELECT NUMBER OF LAYERS");

	document.Expressorder_pg_form.ddNoOfLayers.focus();

	return false;

}



if(BoardThickNess==0 || BoardThickNess=="")

{

	alert("PLEASE ENTER BOARD THICKNESS");

	document.Expressorder_pg_form.ddBoardThickNess.focus();

	return false;

}

if(SmallestHoleSize==0 || SmallestHoleSize=="")

{

	alert("PLEASE SELECT VALUE FOR HOLE SIZE");

	document.Expressorder_pg_form.ddSmallestHoleSize.focus();

	return false;

}

if(SmallestLineSpace==0 || SmallestLineSpace=="")

{

	alert("PLEASE SELECT VALUE LINE/SPACE");

	document.Expressorder_pg_form.ddSmallestLineSpace.focus();

	return false;

}

if(SolderMaskSides==0 || SolderMaskSides=="")

{

	alert("PLEASE SELECT SOLDER MASK SIDES");

	document.Expressorder_pg_form.ddSolderMaskSides.focus();

	return false;

}

if(SolderMaskColor==0 || SolderMaskColor=="")

{

	alert("PLEASE SELECT SOLDER MASK COLOR");

	document.Expressorder_pg_form.ddSolderMaskColor.focus();

	return false;

}

if(SmdSides==0 || SmdSides=="")

{

	alert("PLEASE SELECT SMD SIDES");

	document.Expressorder_pg_form.ddSmdSides.focus();

	return false;

}

if(SurfaceFinish==0 || SurfaceFinish=="")

{

	alert("PLEASE ENTER SURFACE FINISH");

	document.Expressorder_pg_form.ddSurfaceFinish.focus();

	return false;

}

if(GoldFinger==0 || GoldFinger=="")

{

	alert("PLEASE SELECT VALUE FOR GOLD FINGER");

	document.Expressorder_pg_form.ddGoldFinger.focus();

	return false;

}

if(noofpcb==0 || noofpcb=="")

{

	alert("PLEASE ENTER NO OF PCB'S");

	document.Expressorder_pg_form.NoofPCB.focus();

	return false;

}

if(Material==0 || Material=="")

{

	alert("PLEASE SELECT MATERIAL YOU PREFER");

	document.Expressorder_pg_form.ddMaterial.focus();

	return false;

}



if(StartCopperThickness==0 || StartCopperThickness=="")

{

	alert("PLEASE ENTER START COPPER THICKNESS");

	document.Expressorder_pg_form.ddStartCopperThickness.focus();

	return false;

}



if(noofcuts1==0 || noofcuts1=="")

{

	alert("PLEASE ENTER NUMBER OF CUTS");

	document.Expressorder_pg_form.noofcuts.focus();

	return false;

}

if(SilkscreenSides==0 || SilkscreenSides=="")

{

	alert("PLEASE SELECT SILK SCREEN SIDES");

	document.Expressorder_pg_form.ddSilkscreenSides.focus();

	return false;

}

if(SilkscreenColor==0 || SilkscreenColor=="")

{

	alert("PLEASE SELECT SILK SCREEN COLOR");

	document.Expressorder_pg_form.ddSilkscreenColor.focus();

	return false;

}

if(SmdPitch==0 || SmdPitch=="")

{

	alert("PLEASE VALUE FOR SMD PITCH");

	document.Expressorder_pg_form.ddSmdPitch.focus();

	return false;

}

if(FinalFab==0 || FinalFab=="")

{

	alert("PLEASE SELECT FINAL FAB");

	document.Expressorder_pg_form.ddFinalFab.focus();

	return false;

}

if(DeliveryAddress==0 || DeliveryAddress=="")

{

	alert("PLEASE SELECT DELIVERY ADDRESS");

	document.Expressorder_pg_form.ddDeliveryAddress.focus();

	return false;

}

if(DeliveryTerm==0 || DeliveryTerm=="")

{

	alert("PLEASE ENTER NO OF DAYS PCB TO BE DELIVERED");

	document.Expressorder_pg_form.ddDeliveryTerm.focus();

	return false;

}

if(Transport==0 || Transport=="")

{

	alert("PLEASE SELECT THE MODE OF PAYMENT FOR TRANSPORT");

	document.Expressorder_pg_form.ddTransport.focus();

	return false;

}

if(TransportService==0 || TransportService=="")

{

	alert("PLEASE SELECT THE TRANSPORT SERVICE YOU PREFER");

	document.Expressorder_pg_form.ddTransportService.focus();

	return false;

}

else

{

	

//document.Expressorder_pg_form.submit();

//document.Expressorder_pg_form.action="price_calculation.jsp";

//return true;	

window.open('price_calculation.jsp?ddPCBType='+ddPCBType+'&ddDimension='+ddDimension+'&boardLength='+boardLength+'&boardWidth='+boardWidth+'&ddNoOfLayers='+ddNoOfLayers+'&ddBoardThickNess='+ddBoardThickNess+'&ddStartCopperThickness='+ddStartCopperThickness+'&NoofPCB='+NoofPCB+'&ddSurfacefinish='+ddSurfacefinish+'&ddDeliveryAddress='+ddDeliveryAddress+'&ddDeliveryTerm='+ddDeliveryTerm+'&ddSmallestHoleSize='+ddSmallestHoleSize+'&ddSmallestLineSpace='+ddSmallestLineSpace+'&ddSolderMaskSides='+ddSolderMaskSides+'&ddSolderMaskColor='+ddSolderMaskColor+'&ddSmdSides='+ddSmdSides+'&ddGoldFinger='+ddGoldFinger+'&ddMaterial='+ddMaterial+'&ddSilkscreenSides='+ddSilkscreenSides+'&ddSilkscreenColor='+ddSilkscreenColor+'&ddSmdPitch='+ddSmdPitch+'&ddFinalFab='+ddFinalFab+'&noofcuts='+noofcuts,'mywindow','width=700,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');

//document.Expressorder_pg_form.submit();

//document.Expressorder_pg_form.action="'price_calculate.jsp?PCBType='+PCBType+'&Dimx='+Dimx+'&Dimy='+Dimy+'&BThick='+BThick+'&CopThick='+CopThick+'&NoofPCB='+NoofPCB+'&SurFinish='+SurFinish+'&DelAdr='+DelAdr+'&DelTerm='+DelTerm'";

return false;

}

}

function next()

{

var Dimension = document.getElementById("ddDimension").options[document.getElementById("ddDimension").selectedIndex].text;

var PCBType = document.getElementById("ddPCBType").options[document.getElementById("ddPCBType").selectedIndex].text;

var boardLength = document.getElementById("boardLength").value;

var boardWidth = document.getElementById("boardWidth").value;

var ddNoOfLayers = document.getElementById("ddNoOfLayers").options[document.getElementById("ddNoOfLayers").selectedIndex].text;

var BThick = document.getElementById("ddBoardThickNess").options[document.getElementById("ddBoardThickNess").selectedIndex].text;

var CopThick = document.getElementById("ddStartCopperThickness").options[document.getElementById("ddStartCopperThickness").selectedIndex].text;

var NoofPCB = document.getElementById("NoofPCB").value;

var SurFinish = document.getElementById("ddSurfaceFinish").options[document.getElementById("ddSurfaceFinish").selectedIndex].text;

var DelAdr = document.getElementById("ddDeliveryAddress").options[document.getElementById("ddDeliveryAddress").selectedIndex].value;

var DelTerm = document.getElementById("ddDeliveryTerm").options[document.getElementById("ddDeliveryTerm").selectedIndex].text;

var PCBName = document.Expressorder_pg_form.PCBName.value.length;

var ddPCBType = document.Expressorder_pg_form.ddPCBType .value.length;

var ddDimension = document.Expressorder_pg_form.ddDimension.value.length;

var BoardLength = document.Expressorder_pg_form.boardLength.value.length;

var BoardWidth = document.Expressorder_pg_form.boardWidth.value.length;

var NoOfLayers = document.Expressorder_pg_form.ddNoOfLayers.value.length;

var ddBoardThickNess = document.Expressorder_pg_form.ddBoardThickNess.value;

var ddStartCopperThickness = document.Expressorder_pg_form.ddStartCopperThickness.value.length;

var ddSurfaceFinish = document.Expressorder_pg_form.ddSurfaceFinish.value.length;

var noofcuts = document.Expressorder_pg_form.noofcuts.value.length;

var NoofPCB = document.Expressorder_pg_form.NoofPCB.value;

var ddDeliveryAddress = document.Expressorder_pg_form.ddDeliveryAddress.value.length;

var ddDeliveryTerm = document.Expressorder_pg_form.ddDeliveryTerm.value.length;

var ddTransport = document.Expressorder_pg_form.ddTransport.value.length;

var ddTransportService = document.Expressorder_pg_form.ddTransportService.value.length;

var ddSmallestHoleSize = document.Expressorder_pg_form.ddSmallestHoleSize.value.length;

var ddSmallestLineSpace = document.Expressorder_pg_form.ddSmallestLineSpace.value.length;

var ddSolderMaskSides = document.Expressorder_pg_form.ddSolderMaskSides.value.length;

var ddSolderMaskColor = document.Expressorder_pg_form.ddSolderMaskColor.value.length;

var ddSmdSides = document.Expressorder_pg_form.ddSmdSides.value.length;

var ddGoldFinger = document.Expressorder_pg_form.ddGoldFinger.value.length;

var ddMaterial = document.Expressorder_pg_form.ddMaterial.value.length;

var ddSilkscreenSides = document.Expressorder_pg_form.ddSilkscreenSides.value.length;

var ddSilkscreenColor = document.Expressorder_pg_form.ddSilkscreenColor.value.length;

var ddSmdPitch = document.Expressorder_pg_form.ddSmdPitch.value.length;

var ddFinalFab = document.Expressorder_pg_form.ddFinalFab.value.length;



if(PCBName==0 || PCBName=="")

{

	alert("PLEASE ENTER PCB NAME");

	document.Expressorder_pg_form.PCBName.focus();

	return false;

}

if(ddPCBType==0 || ddPCBType=="")

{

	alert("PLEASE SELECT PCB TYPE");

	document.Expressorder_pg_form.ddPCBType.focus();

	return false;

}

if(ddDimension==0 || ddDimension=="")

{

	alert("PLEASE SELECT BOARD DIMENSIONS");

	document.Expressorder_pg_form.ddDimension.focus();

	return false;

}

if(BoardLength==0 || BoardLength=="")

{

	alert("PLEASE ENTER BOARD LENGTH");

	document.Expressorder_pg_form.boardLength.focus();

	return false;

}

if(BoardWidth==0 || BoardWidth=="")

{

	alert("PLEASE ENTER BOARD WIDTH");

	document.Expressorder_pg_form.boardWidth.focus();

	return false;

}

if(NoOfLayers==0 || NoOfLayers=="")

{

	alert("PLEASE SELECT NUMBER OF LAYERS");

	document.Expressorder_pg_form.ddNoOfLayers.focus();

	return false;

}



if(ddBoardThickNess==0 || ddBoardThickNess=="")

{

	alert("PLEASE ENTER BOARD THICKNESS");

	document.Expressorder_pg_form.ddBoardThickNess.focus();

	return false;

}

if(ddSmallestHoleSize==0 || ddSmallestHoleSize=="")

{

	alert("PLEASE SELECT VALUE FOR HOLE SIZE");

	document.Expressorder_pg_form.ddSmallestHoleSize.focus();

	return false;

}

if(ddSmallestLineSpace==0 || ddSmallestLineSpace=="")

{

	alert("PLEASE SELECT VALUE LINE/SPACE");

	document.Expressorder_pg_form.ddSmallestLineSpace.focus();

	return false;

}

if(ddSolderMaskSides==0 || ddSolderMaskSides=="")

{

	alert("PLEASE SELECT SOLDER MASK SIDES");

	document.Expressorder_pg_form.ddSolderMaskSides.focus();

	return false;

}

if(ddSolderMaskColor==0 || ddSolderMaskColor=="")

{

	alert("PLEASE SELECT SOLDER MASK COLOR");

	document.Expressorder_pg_form.ddSolderMaskColor.focus();

	return false;

}

if(ddSmdSides==0 || ddSmdSides=="")

{

	alert("PLEASE SELECT SMD SIDES");

	document.Expressorder_pg_form.ddSmdSides.focus();

	return false;

}

if(ddSurfaceFinish==0 || ddSurfaceFinish=="")

{

	alert("PLEASE ENTER SURFACE FINISH");

	document.Expressorder_pg_form.ddSurfaceFinish.focus();

	return false;

}

if(ddGoldFinger==0 || ddGoldFinger=="")

{

	alert("PLEASE SELECT VALUE FOR GOLD FINGER");

	document.Expressorder_pg_form.ddGoldFinger.focus();

	return false;

}

if(NoofPCB==0 || NoofPCB=="")

{

	alert("PLEASE ENTER NO OF PCB'S");

	document.Expressorder_pg_form.NoofPCB.focus();

	return false;

}

if(ddMaterial==0 || ddMaterial=="")

{

	alert("PLEASE SELECT MATERIAL YOU PREFER");

	document.Expressorder_pg_form.ddMaterial.focus();

	return false;

}



if(ddStartCopperThickness==0 || ddStartCopperThickness=="")

{

	alert("PLEASE ENTER START COPPER THICKNESS");

	document.Expressorder_pg_form.ddStartCopperThickness.focus();

	return false;

}

if(noofcuts==0 || noofcuts=="")

{

	alert("PLEASE ENTER NUMBER OF CUTS");

	document.Expressorder_pg_form.noofcuts.focus();

	return false;

}

if(ddSilkscreenSides==0 || ddSilkscreenSides=="")

{

	alert("PLEASE SELECT SILK SCREEN SIDES");

	document.Expressorder_pg_form.ddSilkscreenSides.focus();

	return false;

}

if(ddSilkscreenColor==0 || ddSilkscreenColor=="")

{

	alert("PLEASE SELECT SILK SCREEN COLOR");

	document.Expressorder_pg_form.ddSilkscreenColor.focus();

	return false;

}

if(ddSmdPitch==0 || ddSmdPitch=="")

{

	alert("PLEASE VALUE FOR SMD PITCH");

	document.Expressorder_pg_form.ddSmdPitch.focus();

	return false;

}

if(ddFinalFab==0 || ddFinalFab=="")

{

	alert("PLEASE SELECT FINAL FAB");

	document.Expressorder_pg_form.ddFinalFab.focus();

	return false;

}

if(ddDeliveryAddress==0 || ddDeliveryAddress=="")

{

	alert("PLEASE SELECT DELIVERY ADDRESS");

	document.Expressorder_pg_form.ddDeliveryAddress.focus();

	return false;

}

if(ddDeliveryTerm==0 || ddDeliveryTerm=="")

{

	alert("PLEASE ENTER NO OF DAYS PCB TO BE DELIVERED");

	document.Expressorder_pg_form.ddDeliveryTerm.focus();

	return false;

}

if(ddTransport==0 || ddTransport=="")

{

	alert("PLEASE SELECT THE MODE OF PAYMENT FOR TRANSPORT");

	document.Expressorder_pg_form.ddTransport.focus();

	return false;

}

if(ddTransportService==0 || ddTransportService=="")

{

	alert("PLEASE SELECT THE TRANSPORT SERVICE YOU PREFER");

	document.Expressorder_pg_form.ddTransportService.focus();

	return false;

}

else

{

document.Expressorder_pg_form.submit();

document.Expressorder_pg_form.action="order.jsp";

return true;

}

}

function myaccount_update()

{

var companyName=document.updateaccount.comp_name.value.length;

var Name=document.updateaccount.name.value.length;

var Email=document.updateaccount.email.value.length;

var contactPerson=document.updateaccount.contactperson.value.length;

var Designation=document.updateaccount.designation.value.length;

var Address1=document.updateaccount.add1.value.length;

var City=document.updateaccount.city.value.length;

var Country=document.updateaccount.country.value.length;

var State=document.updateaccount.state.value.length;

var zipCode=document.updateaccount.zip_code.value.length;

var phoneNumber=document.updateaccount.phone_no.value.length;

var AtPos = Email.indexOf("@")

var StopPos = Email.lastIndexOf(".")

if(companyName==0 || companyName=="")

{

	alert("PLEASE ENTER COMPANY NAME");

	document.updateaccount.companyName.focus();

	return false;

}

if(Name==0 || Name=="")

{

	alert("PLEASE ENTER YOUR NAME");

	document.updateaccount.Name.focus();

	return false;

}

if(Email==0 || Email=="")

{

	alert("PLEASE ENTER YOUR EMAIL ADDRESS");

	document.updateaccount.Email.focus();

	return false;

}

if (AtPos == -1 || StopPos == -1)

{

 alert("Not a valid email address");

 document.updateaccount.Email.focus();

 return false;

}

if(contactPerson==0 || contactPerson=="")

{

	alert("PLEASE ENTER CONTACT PERSON NAME");

	document.updateaccount.contactPerson.focus();

	return false;

}

if(Designation==0 || Designation=="")

{

	alert("PLEASE ENTER CONTACT PERSON DESIGNATION");

	document.updateaccount.Designation.focus();

	return false;

}

if(Address1==0 || Address1=="")

{

	alert("PLEASE ENTER ADDRESS");

	document.updateaccount.Address1.focus();

	return false;

}

if(City==0 || City=="")

{

	alert("PLEASE ENTER CITY NAME");

	document.updateaccount.City.focus();

	return false;

}

if(Country==0 || Country=="")

{

	alert("PLEASE SELECT COUNTRY");

	document.updateaccount.Country.focus();

	return false;

}

if(State==0 || State=="")

{

	alert("PLEASE ENTER STATE NAME");

	document.updateaccount.State.focus();

	return false;

}

if(zipCode==0 || zipCode=="")

{

	alert("PLEASE ENTER ZIP CODE");

	document.updateaccount.zipCode.focus();

	return false;

}

if(phoneNumber==0 || phoneNumber=="")

{

	alert("PLEASE ENTER PHONE NUMBER");

	document.updateaccount.phoneNumber.focus();

	return false;

}



}









function dropdownlistwidth(listindex)

{



document.Expressorder_pg_form.ddPanelLength.options.length = 0;

switch (listindex)

{



case "12" :

document.Expressorder_pg_form.ddPanelLength.options[0]=new Option("------Select-------","");

document.Expressorder_pg_form.ddPanelLength.options[1]=new Option("18","18");

break;



case "18" :

document.Expressorder_pg_form.ddPanelLength.options[0]=new Option("------Select-------","");

document.Expressorder_pg_form.ddPanelLength.options[1]=new Option("12","12");

document.Expressorder_pg_form.ddPanelLength.options[2]=new Option("24","24");

break;



case "24" :

document.Expressorder_pg_form.ddPanelLength.options[0]=new Option("------Select-------","");

document.Expressorder_pg_form.ddPanelLength.options[1]=new Option("18","18");

break;



}



return true;

}



function dropdownlistlength(listindex)

{

var panelwidthsize= document.getElementById("ddPanelWidth").options[document.getElementById("ddPanelWidth").selectedIndex].value;

//document.Expressorder_pg_form.ddPanelLength.options.length = 0;

switch (listindex)

{



case "12" :

document.getElementById("PanelSize").value=panelwidthsize+"x12";

document.getElementById("h_PanelSize").value=panelwidthsize+"x12";

break;



case "18" :

document.getElementById("PanelSize").value=panelwidthsize+"x18";

document.getElementById("h_PanelSize").value=panelwidthsize+"x18";

break;



case "24" :

document.getElementById("PanelSize").value=panelwidthsize+"x24";

document.getElementById("h_PanelSize").value=panelwidthsize+"x24";

break;

}

return true;

}

function nextPage()

{

	//var PCBName = document.getElementById("h_PCBName").value;

	//var OrderPrice = document.getElementById("h_OrderPrice").value;

	document.next_form.submit();

    document.next_form.action="credit_card_page.jsp";

    return true;

	

	//window.open('credit_card_page.jsp?h_PCBName='+PCBName+'&h_OrderPrice='+OrderPrice);

}