_cf_loadingtexthtml=""; 
function submitMe() {
	var d = document.mainform;	
	//var d = document.mainform;	
	var smethod = d.ShippingMethod.selectedIndex;				
		if (d.ShippingMethod.options[smethod].value==0){
			alert("Please choose the Shipping method");
			d.ShippingMethod.focus();
			return false;
		}	

	var ptype = d.ccPymntType.selectedIndex;				
		if (d.ccPymntType.options[ptype].value==0){
			alert("Please choose the the payment type");
			d.ccPymntType.focus();
			return false;
		}	
		if (d.ccNum.value==""){
			alert("Enter your valid Credit Card number");
			d.ccNum.focus();
			return false;
		}	

		if(isNaN(d.ccNum.value)){
			alert("Only valid Credit Card numbers are allowed");
			d.ccNum.focus();
			return false;
		}			
	var xmonth = d.ccMonth.selectedIndex;			
		if (d.ccMonth.options[xmonth].value==0){
			alert("Please choose the month your card expires");
			d.ccMonth.focus();
			return false;
		}	
	var xyear = d.ccYear.selectedIndex;		
		if (d.ccYear.options[xyear].value==0){
			alert("Please choose the year your card expires");
			d.ccYear.focus();
			return false;
		}	
	if ((d.ccCode.value=="")||(d.ccCode.value.length <3)){
			alert("Enter the 3 or 4 digit code at the back of your Credit Card");
			d.ccCode.focus();
			return false;
		}		
	if (d.ccFname.value=="")	{
			alert("Enter your first name as it appears on your Credit Card");
			d.ccFname.focus();
			return false;
		}			
	if (d.ccLname.value=="")	{
			alert("Enter your last name as it appears on your Credit Card");
			d.ccLname.focus();
			return false;
		}			
	if (d.ccAddr.value==""){
			alert("Please enter your credit card billing address");
			d.ccAddr.focus();
			return false;
		}			
	
	if (d.ccCity.value==""){
			alert("City is a required field");
			d.ccCity.focus();
			return false;
		}	
		
	var xCountry = d.ccCountry.selectedIndex;		
		if (d.ccCountry.options[xCountry].value==0){
			alert("Country is a required field");
			d.ccCountry.focus();
			return false;
		}			
		
	var xState = d.ccState.selectedIndex;		
		if (d.ccState.options[xState].value==0){
			alert("State is a required field");
			d.ccState.focus();
			return false;
		}					
		
	if (d.ccZip.value=="")	{
			alert("Enter your Credit Card billing zip code");
			d.ccZip.focus();
			return false;
		}					
	if (d.ccPhone.value=="")	{
			alert("Phone number is required");
			d.ccPhone.focus();
			return false;
		}	
	if (d.Bill_Email.value=="")	{
			alert("Email is required");
			d.Bill_Email.focus();
			return false;
		}			
	
	if (d.shpFName.value=="")	{
			alert("Enter the shipping first name");
			d.shpFName.focus();
			return false;
		}			
	if (d.shpLName.value=="")	{
			alert("Enter the shipping last name");
			d.shpLName.focus();
			return false;
		}			
	if (d.shpAddr1.value==""){
			alert("Enter the shipping address");
			d.shpAddr1.focus();
			return false;
		}			
	
	if (d.shpCity.value==""){
			alert("City is a required field");
			d.shpCity.focus();
			return false;
		}	
		
	var zCountry = d.shpCountry.selectedIndex;		
		if (d.shpCountry.options[zCountry].value==0){
			alert("Shipping Country is a required field");
			d.shpCountry.focus();
			return false;
		}			
		
	var zState = d.shpState.selectedIndex;		
		if (d.shpState.options[zState].value==0){
			alert("Shipping State is a required field");
			d.shpState.focus();
			return false;
		}					
		
	if (d.shpZip.value=="")	{
			alert("Enter your the shipping zip code");
			d.shpZip.focus();
			return false;
		}					
	var clr = d.shpcolor.options[d.shpcolor.selectedIndex].value;	
	var smet = d.ShippingMethod.options[d.ShippingMethod.selectedIndex].value;	
	var ptp = d.ccPymntType.options[d.ccPymntType.selectedIndex].value;				
	var cnum =	d.ccNum.value;
	var xmon = d.ccMonth.options[d.ccMonth.selectedIndex].value;
	var xyr = d.ccYear.options[d.ccYear.selectedIndex].value;		
	var xcode = d.ccCode.value;		
	var xFnm = d.ccFname.value;				
	var xLnm = d.ccLname.value;			
	var xAdd = d.ccAddr.value;	
	var xAdd2 = d.ccAddr2.value;		
	var xCity = d.ccCity.value;		
	var xCtry = d.ccCountry.options[d.ccCountry.selectedIndex].value;	
	var xSt = d.ccState.options[d.ccState.selectedIndex].value;		
	var xccZip = d.ccZip.value;		
	var xPhne = d.ccPhone.value;	
	var xemail = d.Bill_Email.value;
	var xqty = d.qty.value;	
	var xshpFN=d.shpFName.value;		
	var xshpLN=d.shpLName.value;		
	var xshpAdd=d.shpAddr1.value;	
	var xshpAdd2=d.shpAddr2.value;	
	var xshpCity=d.shpCity.value;		
	var xshpCtry=d.shpCountry.options[d.shpCountry.selectedIndex].value;		
	var xshpSt=d.shpState.options[d.shpState.selectedIndex].value;		
	var xshpZip=d.shpZip.value;		
	   try {
	      ColdFusion.Window.destroy('ConfirmPurchase',true);
	   } catch(e) { }
	   // URL ISSUE, Append all the data to CFWINDOW Page .
	   	ColdFusion.Window.create('ConfirmPurchase','Confirm Payment and Shipping Information','ConfirmPurchase.cfm?xqty='+xqty+'&xclr='+clr+'&xsmet='+smet+'&xptp='+ptp+'&xcnum='+cnum+'&xmon='+xmon+'&xyr='+xyr+'&xcode='+xcode+'&xFnm='+xFnm+'&xLnm='+xLnm+'&xAdd='+xAdd+'&xAdd2='+xAdd2+'&xCity='+xCity+'&xCtry='+xCtry+'&xSt='+xSt+'&xccZip='+xccZip+'&xPhne='+xPhne+'&xshpFN='+xshpFN+'&xshpLN='+xshpLN+'&xshpAdd='+xshpAdd+'&xshpAdd2='+xshpAdd2+'&xshpCity='+xshpCity+'&xshpCtry='+xshpCtry+'&xshpSt='+xshpSt+'&xshpZip='+xshpZip+'&xemail='+xemail,{height:800,width:900,modal:true,closable:false,draggable:true,resizable:true,center:true});	
		ob = ColdFusion.Window.getWindowObject('ConfirmPurchase');// Force the CFWINDOW to CENTER --
    	ob.center();	// Force the CFWINDOW to CENTER --
}	
