
function isEmail(str)
{
    var isEmail = (((((str.indexOf("@") != -1) && (str.indexOf(".") != -1)) && 	(((str.lastIndexOf("@")-str.lastIndexOf("."))<-1))) && str.indexOf("@")!=0) && (str.length-str.lastIndexOf(".")>1));

     if (isEmail){
	return (true);
     }

     else{
	return (false);
     }
}



function FeedbackForm_Validator(theForm)
{

 if (theForm.first_name.value == "")
 {
    alert("Please enter your First Name.");
    theForm.first_name.focus();
    return (false);
 }
 if (theForm.last_name.value == "")
 {
    alert("Please enter your Last Name.");
    theForm.last_name.focus();
    return (false);
 }
 if (theForm.company.value == "")
 {
    alert("Please enter your Company/Organization name.");
    theForm.company.focus();
    return (false);
  }
  if (theForm.title.value == "")
  {
    alert("Please enter your Job Title.");
    theForm.title.focus();
    return (false);
  }
  if (theForm.phone.value == "")
  {
    alert("Please enter your Daytime Phone Number.");
    theForm.phone.focus();
    return (false);
  }
  var str=theForm.submit_by.value;
  if (str == "")
  {
	alert("Please enter your email address.");
	theForm.submit_by.focus();	
	return(false);
  }
	
  if (isEmail(str) == false)
  {
	alert("" + str + " is an invalid Email Address!");
	theForm.submit_by.focus();
	return (false);
  }  
  if (theForm.country.selectedIndex < 0 ) 		/*|| theForm.country.selectedIndex == 0)*/
  {
    alert("Please select your Country.");
    theForm.country.focus();
    return (false);
  }
  if ((theForm.country.value == "United States" || theForm.country.value == "Canada") && (theForm.state.selectedIndex == 0)) 
  {
		alert("Please select your State/Province.");
		theForm.state.focus();
		return (false);
  }
  return (true);
}



function getvalues_onchange()

{
   var LocArray = new Array(" ", "Atlanta, GA",
				 "Atlanta, GA",
				 "Atlanta, GA",
				  
				 "Atlanta, GA",
				 "Atlanta, GA",
 				 "Atlanta, GA", 

				 "Atlanta, GA", 
				 "Atlanta, GA", 

				 "Atlanta, GA", 
				 "Atlanta, GA",
				 "Atlanta, GA",
				  
				 "Atlanta, GA", 
				 "Atlanta, GA", 

				 "Atlanta, GA", 
				 "Atlanta, GA",
				 "Atlanta, GA",
				  
				 "Atlanta, GA",
				 "Atlanta, GA", 
				 "Atlanta, GA", 
				 
				 "Atlanta, GA", 
				 "Atlanta, GA", 
				 "Atlanta, GA", 

				 "Atlanta, GA",
				 "Atlanta, GA",
				 "Atlanta, GA", 			 

				 "Atlanta, GA", 
				 "Atlanta, GA", 
				 
				 "Atlanta, GA",
				 "Atlanta, GA",
				 "Atlanta, GA", 
				 
				 "Atlanta, GA",
				 "Atlanta, GA",
				 "Atlanta, GA", 
				 
				 "Atlanta, GA",
				 "Atlanta, GA",
				 "Atlanta, GA", 
				 
				 "Atlanta, GA",
				 "Atlanta, GA",
				 "Atlanta, GA", 
				 
				 "Atlanta, GA",
				 "Atlanta, GA",
				 "Atlanta, GA", 
				 
				 "Atlanta, GA",
				 "Atlanta, GA",
				 "Atlanta, GA", 
				 
				 "Atlanta, GA", 
				 "Atlanta, GA",
				  
				 "Atlanta, GA", 
				 "Atlanta, GA",
				 "Atlanta, GA", 
				 
				 "Atlanta, GA", 
				 "Atlanta, GA",
				 
				 "Atlanta, GA", 
				 "Atlanta, GA",
				 
				 "Atlanta, GA", 
				 "Atlanta, GA",
				 
				 "Atlanta, GA", 
				 "Atlanta, GA",
				 
				 "Atlanta, GA", 
				 "Atlanta, GA",
				 
				 "Atlanta, GA", 
				 "Atlanta, GA",
				 "Atlanta, GA", 
				 
				 "Atlanta, GA", 
				 "Atlanta, GA",  
				 
				 "Atlanta, GA",
				 "Atlanta, GA",
				 "Atlanta, GA")

	
   var DateArray = new Array(" ", "October 11-12, 2005",
				  "January 23-24, 2006",
				  "June 22-23, 2006",
				  
				  "October 10-14, 2005",
				  "February 13-17, 2005",

				  "December 05, 2005",
				  "March 10, 2006",
				  
				  "November 21-22, 2005",
				  "March 30-31, 2006",
				  "July 10-11, 2006",

				  "December 8, 2005",
				  "March 10, 2006",
				  				  
				  "October 10, 2005",				  
				  "December 12, 2005",
				  "February 3, 2006",
				  
				  "November 15, 2005",
				  "February 13, 2006",				  
				  "July 14, 2006",
				  
				  "November 15, 2005",
				  "February 13, 2006",				  
				  "July 14, 2006",
				  
				  "November 18, 2005",
				  "March 6, 2006",
				  "July 10, 2006",
				  
				  "January 5-6, 2006",				  
				  "May 11-12, 2006",
				  
				  "October 10-14, 2005",
				  "March 13-17, 2006",
				  "July 10-14, 2006",
				  
				  "November 3-4, 2005",
				  "January 12-13, 2006",
				  "April 13-14 2006",
				  
				  "September 23, 2005",
				  "Decenber 12, 2005",
				  "April 24, 2006",
				  
				  "December 19-20, 2005",
				  "March 6-7, 2006",
				  "June 8-9, 2006",
				  
				  "November 17-18, 2005",
				  "February 16-17, 2006",
				  "June 12-13, 2006",
				  
				  "December 16, 2005",
				  "March 24, 2006",
				  "July 17, 2006",
				  
				  "October 31, 2005",
				  "March 3, 2006",
				  
				  "October 24-28, 2005",				  
				  "January 23-27, 2006",
				  "May 15-19, 2006",
				  
				  "October 17, 2005",
				  "March 13, 2006",				  
				  
				  "October 19-21, 2005",
				  "February 22-24, 2006",
				  
				  "October 31-November 1, 2005",
				  "March 20-21, 2006",
				  
				  "November 10-11, 2005",
				  "March 13-14,2006",
				  
				  "November 29, 2005",
				  "February 20, 2006",
				  
				  "October 11-13, 2005",
				  "January 22-24, 2006",
				  "June 21-23, 2006",
				  
				  "November 28, 2005", 
				  "February 13, 2006",
				  
				  "October 11-13, 2005",				  
				  "January 22-24, 2006",
				  "June 21-23, 2006")


   var DescArray = new Array(" ", 
	"ISO 9001:2000 INTERNAL AUDITOR TRAINING at Atlanta, GA (QSE-IA-2000-002)",
	"ISO 9001:2000 INTERNAL AUDITOR TRAINING at Atlanta, GA (QSE-IA-2000-003)",
	"ISO 9001:2000 INTERNAL AUDITOR TRAINING at Atlanta, GA (QSE-IA-2000-004)",

	"ISO 9001:2000 LEAD AUDITOR TRAINING(ANSI-RAB ACCREDITED) at Atlanta, GA (QSE-P-1100-002)",
	"ISO 9001:2000 LEAD AUDITOR TRAINING(ANSI-RAB ACCREDITED) at Atlanta, GA (QSE-P-1100-003)",
	
	"DOCUMENTATION SIMPLIFICATION TECHNIQUES at Atlanta, GA (QSE-ISO-2002-003)",
	"DOCUMENTATION SIMPLIFICATION TECHNIQUES at Atlanta, GA (QSE-ISO-2002-004)",
	
	"HOW TO BECOME AN EFFECTIVE ISO MANAGEMENT REPRESENTATIVE at Atlanta, GA (QSE-EMR-2004-003)",
	"HOW TO BECOME AN EFFECTIVE ISO MANAGEMENT REPRESENTATIVE at Atlanta, GA (QSE-EMR-2004-004)",
	"HOW TO BECOME AN EFFECTIVE ISO MANAGEMENT REPRESENTATIVE at Atlanta, GA (QSE-EMR-2004-005)",
	
	"HOW TO CONDUCT EFFECTIVE MANAGEMENT REVIEW MEETINGS at Atlanta, GA (QSE-CEM-2004-003)",
	"HOW TO CONDUCT EFFECTIVE MANAGEMENT REVIEW MEETINGS at Atlanta, GA (QSE-CEM-2004-004)",
	
	"ENHANCING CUSTOMER SATISFACTION at Atlanta, GA (QSE-ECS-0702-002)",
	"ENHANCING CUSTOMER SATISFACTION at Atlanta, GA (QSE-ECS-0702-003)",
	"ENHANCING CUSTOMER SATISFACTION at Atlanta, GA (QSE-ECS-0702-004)",
	
	"ROOT CAUSE ANALYSIS, CORRECTIVE ACTION & PREVENTIVE ACTION at Atlanta, GA (QSE-CPA-0601-002)",
	"ROOT CAUSE ANALYSIS, CORRECTIVE ACTION & PREVENTIVE ACTION at Atlanta, GA (QSE-CPA-0601-003)",
	"ROOT CAUSE ANALYSIS, CORRECTIVE ACTION & PREVENTIVE ACTION at Atlanta, GA (QSE-CPA-0601-004)",
	
	"CORRECTIVE/PREVENTIVE ACTION FOR PROCESS PERFORMANCE IMPROVEMENT at Atlanta, GA (QSE-CPI-2005-001)",
	"CORRECTIVE/PREVENTIVE ACTION FOR PROCESS PERFORMANCE IMPROVEMENT at Atlanta, GA (QSE-CPI-2005-002)",
	"CORRECTIVE/PREVENTIVE ACTION FOR PROCESS PERFORMANCE IMPROVEMENT at Atlanta, GA (QSE-CPI-2005-003)",
		
	"EFFECTIVE IMPLEMENTATION TECHNIQUES: TS 16949:2002 at Atlanta, GA (QSE-EIT-2005-002)",
	"EFFECTIVE IMPLEMENTATION TECHNIQUES: TS 16949:2002 at Atlanta, GA (QSE-EIT-2005-003)",
	"EFFECTIVE IMPLEMENTATION TECHNIQUES: TS 16949:2002 at Atlanta, GA (QSE-EIT-2005-004)",
	
	"ISO/TS 16949:2002 INTERNAL AUDITOR TRAINING at Atlanta, GA (QSE-IAT-2005-002)",
	"ISO/TS 16949:2002 INTERNAL AUDITOR TRAINING at Atlanta, GA (QSE-IAT-2005-003)",
	
	"ISO/TS 16949:2002 LEAD AUDITOR TRAINING at Atlanta, GA (QSE-P-1101-002)",
	"ISO/TS 16949:2002 LEAD AUDITOR TRAINING at Atlanta, GA (QSE-P-1101-003)",
	"ISO/TS 16949:2002 LEAD AUDITOR TRAINING at Atlanta, GA (QSE-P-1101-004)",
	
	"CORE TOOL TRAINING WITH EMPHASIS ON TS16949 REQUIREMENTS at Atlanta, GA (QSE-TSC-2004-002)",
	"CORE TOOL TRAINING WITH EMPHASIS ON TS16949 REQUIREMENTS at Atlanta, GA (QSE-TSC-2004-003)",
	"CORE TOOL TRAINING WITH EMPHASIS ON TS16949 REQUIREMENTS at Atlanta, GA (QSE-TSC-2004-004)",
	
	"EFFECTIVE IMPLEMENTATION TECHNIQUES: ISO 13485:2003 at Atlanta, GA (QSE-EII-2005-001)",
	"EFFECTIVE IMPLEMENTATION TECHNIQUES: ISO 13485:2003 at Atlanta, GA (QSE-EII-2005-002)",
	"EFFECTIVE IMPLEMENTATION TECHNIQUES: ISO 13485:2003 at Atlanta, GA (QSE-EII-2005-003)",
	
	"HOW TO COMBINE LEAN AND ISO - LEAN ISO  at Atlanta, GA (QSE-LNI-2004-002)",
	"HOW TO COMBINE LEAN AND ISO - LEAN ISO  at Atlanta, GA (QSE-LNI-2004-003)",
	"HOW TO COMBINE LEAN AND ISO - LEAN ISO  at Atlanta, GA (QSE-LNI-2004-004)",
	
	"LEAN ENTERPRISE IMPLEMENTATION: 10 STEP APPROACH at Atlanta, GA (QSE-LNM-2005-003)",
	"LEAN ENTERPRISE IMPLEMENTATION: 10 STEP APPROACH at Atlanta, GA (QSE-LNM-2005-004)",
	"LEAN ENTERPRISE IMPLEMENTATION: 10 STEP APPROACH at Atlanta, GA (QSE-LNM-2005-005)",
	
	"HOW TO MEASURE LEAN TOOLS APPLICATION EFFECTIVENESS at Atlanta, GA (QSE-MAL-2004-002)",
	"HOW TO MEASURE LEAN TOOLS APPLICATION EFFECTIVENESS at Atlanta, GA (QSE-MAL-2004-003)",
	"HOW TO MEASURE LEAN TOOLS APPLICATION EFFECTIVENESS at Atlanta, GA (QSE-MAL-2004-004)",
	
	"EFFECTIVE IMPLEMENTATION TECHNIQUES TO SIX SIGMA at Atlanta, GA (QSE-EIS-2004-003)",
	"EFFECTIVE IMPLEMENTATION TECHNIQUES TO SIX SIGMA at Atlanta, GA (QSE-EIS-2004-004)",
	
	"COMPLETE OSHA-REQUIRED SAFETY TRAINING at Atlanta, GA (QSE-COR-2005-002)",
	"COMPLETE OSHA-REQUIRED SAFETY TRAINING at Atlanta, GA (QSE-COR-2005-003)",
	"COMPLETE OSHA-REQUIRED SAFETY TRAINING at Atlanta, GA (QSE-COR-2005-004)",
	
	"INDUSTRIAL ERGONOMIC TRAINING at Atlanta, GA (QSE-IET-2005-001)",
	"INDUSTRIAL ERGONOMIC TRAINING at Atlanta, GA (QSE-IET-2005-002)",
	
	"BEHAVIOR OBSERVATION TRAINING at Atlanta, GA (QSE-BOT-2005-001)",
	"BEHAVIOR OBSERVATION TRAINING at Atlanta, GA (QSE-BOT-2005-002)",
	
	"HAZARDOUS ENERGY CONTROL at Atlanta, GA (QSE-HEC-2005-001)",
	"HAZARDOUS ENERGY CONTROL at Atlanta, GA (QSE-HEC-2005-002)",
	
	"SPC - PROBLEM SOLVING TECHNIQUES FOR LEAN at Atlanta, GA (QSE-SPL-2005-001)",
	"SPC - PROBLEM SOLVING TECHNIQUES FOR LEAN at Atlanta, GA (QSE-SPL-2005-002)",
	
	"EFFECTIVE IMPLEMENTATION TECHNIQUES:AS9100:2004 at Atlanta, GA (QSE-EAS-2005-001)",
	"EFFECTIVE IMPLEMENTATION TECHNIQUES:AS9100:2004 at Atlanta, GA (QSE-EAS-2005-002)",
		
	"INTERNAL AUDITOR TRAINING WITH EMPHASIS ON AS9100 REQUIREMENTS at Atlanta, GA (QSE-IAA-2005-001)",
	"INTERNAL AUDITOR TRAINING WITH EMPHASIS ON AS9100 REQUIREMENTS at Atlanta, GA (QSE-IAA-2005-002",
	"INTERNAL AUDITOR TRAINING WITH EMPHASIS ON AS9100 REQUIREMENTS at Atlanta, GA (QSE-IAA-2005-003)",

	"EFFECTIVE IMPLEMENTATION TECHNIQUES: ISO14001:2004 at Atlanta, GA (QSE-EIE-2005-001)",
	"EFFECTIVE IMPLEMENTATION TECHNIQUES: ISO14001:2004 at Atlanta, GA (QSE-EIE-2005-002)",

	"INTERNAL AUDITOR TRAINING WITH EMPHASIS ON ISO14001 AND OHSA18001 REQUIREMENTS at Atlanta, GA (QSE-IAE-2005-001)",
	"INTERNAL AUDITOR TRAINING WITH EMPHASIS ON ISO14001 AND OHSA18001 REQUIREMENTS at Atlanta, GA (QSE-IAE-2005-002)",	
	"INTERNAL AUDITOR TRAINING WITH EMPHASIS ON ISO14001 AND OHSA18001 REQUIREMENTS at Atlanta, GA (QSE-EII-2005-003)")


   var ActDateArray = new Array(" ","10112005", 
				  "01232006",
				  "06222006",  

				   "10102005",
 				  "02132006",

 				  "12052005",
 				  "03102006",

 				  "11212005",
 				  "03302006",
				  "07102006",
				  
				  "12082005",
				  "03102006",
				  				  
				  "10102005",
				  "12122005",
				  "03032006",
				  
				  "11152005",
				  "02132006",
				  "07142006",
				  
				  "11152005",
				  "02132006",
				  "07142006",
				  				  
				  "10182005",
				  "03062006",
				  "07102006",
				  
				  "01052006",
 				  "05112006",
				  
				  "10102005",
				  "03132006",
				  "07102006",
				  
				  "11032005",
				  "01122006",
				  "04132006",
				  
				  "09232005",
				  "12122005",
				  "04242006",
				  				  		  
				  "12192005",				  
 				  "03062006",
				  "06082006",				  
 				  	  				  
 				  "11172005",
				  "02162006",
				  "06122006",
				  				  
				  "12162005",
				  "03242006",
				  "07172006",
				  				  
				  "10312006",
				  "03032006",
				  				  
				  "10242005",				  
				  "01232006",
				  "05152006",
				  				  
				  "10172005",
				  "03132006",
				  				  
				  "10192005",
				  "02222006",
				  				  
				  "10312005",
				  "03202006",
				  
				  "11102005",
				  "03132006",
				  				  
				  "11292005",
				  "02202006",
				  				  
				  "10112005",
				  "01222006",
				  "06212006",
				  				  
				  "11282005",
				  "02132006",
				  				  
				  "10112005",
				  "02222006",
				  "06212006")


   var AmountArray = new Array(0,895.00, 
				895.00,
				895.00, 

				1595.00, 
				1595.00, 

				495.00, 
				495.00, 

				895.00,
				895.00,
				895.00,
				
				495.00, 
				495.00,
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00,
								
				895.00, 
				895.00, 

				1695.00,
				1695.00, 
				1695.00, 
				
				895.00,
				895.00,
				895.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				895.00,
				895.00,
				895.00,
				
				895.00,
				895.00,
				895.00,
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
								
				1595.00, 
				1595.00, 
				1595.00, 
				
				495.00, 
				495.00,
								
				1195.00,
				1195.00,
				
				895.00,
				895.00,
								
				895.00,
				895.00,
								
				495.00, 
				495.00,
								
				1195.00,
				1195.00,
				1195.00,
				
				495.00, 
				495.00,
								
				1195.00, 
				1195.00,
				1195.00)



   var DiscAmtArray = new Array(0,895.00, 
				895.00,
				895.00, 

				1595.00, 
				1595.00, 

				495.00, 
				495.00, 

				895.00,
				895.00,
				895.00,
				
				495.00, 
				495.00,
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00,
								
				895.00, 
				895.00, 

				1695.00,
				1695.00, 
				1695.00, 
				
				895.00,
				895.00,
				895.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				895.00,
				895.00,
				895.00,
				
				895.00,
				895.00,
				895.00,
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
								
				1595.00, 
				1595.00, 
				1595.00, 
				
				495.00, 
				495.00,
								
				1195.00,
				1195.00,
				
				895.00,
				895.00,
								
				895.00,
				895.00,
								
				495.00, 
				495.00,
								
				1195.00,
				1195.00,
				1195.00,
				
				495.00, 
				495.00,
								
				1195.00, 
				1195.00,
				1195.00)

   var qseNdx = document.RegisterForm.qseCourse.selectedIndex;
   var Amt_x;
   var ActDate_x;

   window.document.RegisterForm.qseLocation.value = LocArray[qseNdx];

   window.document.RegisterForm.qseDate.value = DateArray[qseNdx];
   ActDate_x = ActDateArray[qseNdx];
   CurrentDate_x = window.document.RegisterForm.x_hiddate.value;

   if (calc_days(CurrentDate_x, ActDate_x) < 0) {
     alert('Choosen Date is less than Current Date');
   }
   else {    
     if (calc_days(CurrentDate_x, ActDate_x) >= 30) {
	Amt_x = DiscAmtArray[qseNdx];
     }
     else {
	Amt_x = AmountArray[qseNdx];	
     }
    
     window.document.RegisterForm.qseAmount.value = "$"+Amt_x;

     if (qseNdx >= 1) {
        window.document.RegisterForm.qsePersons.value = 1;
        window.document.RegisterForm.x_Amount.value = Amt_x;
        window.document.RegisterForm.x_Description.value = DescArray[qseNdx];
     }
     else {
        window.document.RegisterForm.qsePersons.value = " ";  
        window.document.RegisterForm.qseAmount.value = " ";
     }
   }     //check if ActDate < Current Date

}  	//getvalues_onchange() function end




function gettotamount()
{


   var ActDateArray = new Array(" ","10112005", 
				  "01232006",
				  "06222006",  

				   "10102005",
 				  "02132006",

 				  "12052005",
 				  "03102006",

 				  "11212005",
 				  "03302006",
				  "07102006",
				  
				  "12082005",
				  "03102006",
				  				  
				  "10102005",
				  "12122005",
				  "03032006",
				  
				  "11152005",
				  "02132006",
				  "07142006",
				  
				  "11152005",
				  "02132006",
				  "07142006",
				  				  
				  "10182005",
				  "03062006",
				  "07102006",
				  
				  "01052006",
 				  "05112006",
				  
				  "10102005",
				  "03132006",
				  "07102006",
				  
				  "11032005",
				  "01122006",
				  "04132006",
				  
				  "09232005",
				  "12122005",
				  "04242006",
				  				  		  
				  "12192005",				  
 				  "03062006",
				  "06082006",				  
 				  	  				  
 				  "11172005",
				  "02162006",
				  "06122006",
				  				  
				  "12162005",
				  "03242006",
				  "07172006",
				  				  
				  "10312006",
				  "03032006",
				  				  
				  "10242005",				  
				  "01232006",
				  "05152006",
				  				  
				  "10172005",
				  "03132006",
				  				  
				  "10192005",
				  "02222006",
				  				  
				  "10312005",
				  "03202006",
				  
				  "11102005",
				  "03132006",
				  				  
				  "11292005",
				  "02202006",
				  				  
				  "10112005",
				  "01222006",
				  "06212006",
				  				  
				  "11282005",
				  "02132006",
				  				  
				  "10112005",
				  "02222006",
				  "06212006")

   var AmountArray = new Array(0,895.00, 
				895.00,
				895.00, 

				1595.00, 
				1595.00, 

				495.00, 
				495.00, 

				895.00,
				895.00,
				895.00,
				
				495.00, 
				495.00,
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00,
								
				895.00, 
				895.00, 

				1695.00,
				1695.00, 
				1695.00, 
				
				895.00,
				895.00,
				895.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				895.00,
				895.00,
				895.00,
				
				895.00,
				895.00,
				895.00,
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
								
				1595.00, 
				1595.00, 
				1595.00, 
				
				495.00, 
				495.00,
								
				1195.00,
				1195.00,
				
				895.00,
				895.00,
								
				895.00,
				895.00,
								
				495.00, 
				495.00,
								
				1195.00,
				1195.00,
				1195.00,
				
				495.00, 
				495.00,
								
				1195.00, 
				1195.00,
				1195.00)



   var DiscAmtArray = new Array(0,895.00, 
				895.00,
				895.00, 

				1595.00, 
				1595.00, 

				495.00, 
				495.00, 

				895.00,
				895.00,
				895.00,
				
				495.00, 
				495.00,
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
				495.00,
								
				895.00, 
				895.00, 

				1695.00,
				1695.00, 
				1695.00, 
				
				895.00,
				895.00,
				895.00, 
				
				495.00, 
				495.00,
				495.00, 
				
				895.00,
				895.00,
				895.00,
				
				895.00,
				895.00,
				895.00,
				
				495.00, 
				495.00,
				495.00, 
				
				495.00, 
				495.00,
								
				1595.00, 
				1595.00, 
				1595.00, 
				
				495.00, 
				495.00,
								
				1195.00,
				1195.00,
				
				895.00,
				895.00,
								
				895.00,
				895.00,
								
				495.00, 
				495.00,
								
				1195.00,
				1195.00,
				1195.00,
				
				495.00, 
				495.00,
								
				1195.00, 
				1195.00,
				1195.00)
				
  var qseNdx = document.RegisterForm.qseCourse.selectedIndex;
  var qseVarPersons = document.RegisterForm.qsePersons.value;

  var Amt_x;

  var CurrentDate_x = window.document.RegisterForm.x_hiddate.value;
  var ActDate_x = ActDateArray[qseNdx];

    if (calc_days(CurrentDate_x, ActDate_x) >= 30) {
 	Amt_x = DiscAmtArray[qseNdx];
     }
     else {
	Amt_x = AmountArray[qseNdx];	
     }


  var qseTotAmount = Amt_x * qseVarPersons;


   if (! check(RegisterForm.qsePersons.value))
   {        
      if (RegisterForm.qsePersons.value > '0')
      {
        window.document.RegisterForm.qseAmount.value = "$"+qseTotAmount;
        window.document.RegisterForm.x_Amount.value = qseTotAmount;
      }
  }
  else
  {
     alert("Please enter number for the No.of Persons"); 
  }
    
}

function RegisterForm_Validator()
{  
  if(RegisterForm.qseCourse.selectedIndex<1) {
	alert("Please select course from the list ");
	return false;
  }

  if( isNaN(RegisterForm.qsePersons.value) || ( parseInt(RegisterForm.qsePersons.value)<1 ) ) {
	alert("Number of persons should atleast 1 ");
	return false;
  }
  else{
     gettotamount();
  }

} 


function CheckNumber(fldObject)
{  
   //NUMBER VALIDATION


  var VarNumber = fldObject.value;
  if(VarNumber=="") {
  	return false;
  }
  if (VarNumber!="")
  {
    var Num;
    Num=VarNumber;

    var valid = "0123456789";
    var hyphencount = 0;
    for (var i=0; i < Num.length; i++) 
    {
	 var temp = "" + Num.substring(i, i+1);
	  if (valid.indexOf(temp) <= "0")
	   {
		  alert("Invalid characters in your Number.  Please try again.");
		  return false;
	   }
    } // end for loop
  }   // end if
 
  return true; 
 }  // end function




 //  check for valid numeric strings	

function IsNumeric(strString)
{
 
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
   {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
      {
         blnResult = false;
         alert("Enter Numeric");
      }
   }
   return blnResult;
 }




function check(wrkValue) {

 if (isNaN(wrkValue))   
 {
     return true;
 }  
 return false;  

}




function openpop(url)
 {
 pop=window.open(url, "popup", "Toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no,width=550,height=500");
 window.setTimeout("closewin()", 120000);   //  close new window in 120 seconds
 }




 function closewin()
 {
 pop.close();           // by reopening the window, it will prevent errors you would get of the window were already closed.
}



function ProposalForm_Validator(theForm)
{

 if (theForm.Contact_Name.value == "")
 {
    alert("Please enter your Contact Name.");
    theForm.Contact_Name.focus();
    return (false);
 }
 if (theForm.Company_Name.value == "")
 {
    alert("Please enter your Company Name.");
    theForm.Company_Name.focus();
    return (false);
 }

  var str=theForm.propemail.value;
  if (str == "")
  {
	alert("Please enter your email address.");
	theForm.propemail.focus();	
	return(false);
  }
	
  if (isEmail(str) == false)
  {
	alert("" + str + " is an invalid Email Address!");
	theForm.propemail.focus();
	return (false);
  }  

  if (theForm.country.selectedIndex < 1 ) 		/*|| theForm.country.selectedIndex == 0)*/
  {
    alert("Please select your Country.");
    theForm.country.focus();
    return (false);
  }

  if ((theForm.country.value == "United States" || theForm.country.value == "Canada") && (theForm.State.selectedIndex <= 0)) 
  {
		alert("Please select your State/Province.");
		theForm.state.focus();
		return (false);
  }


/*  if ((theForm.country.value != "United States" || theForm.country.value != "Canada") && (theForm.if_other_state.value==""))
  {
		alert("Please enter State/Province, if not US/Canada.");
		theForm.state.value = "None";
		theForm.if_other_state.focus();
		return (false);
  }
  return (true); */



}                      // end of function ProposalForm_Validator()



function onblur_proposalchg(){

  var qseState = document.ProposalForm.state.value;

  if (qseState != "None"){
     if (qseState=="AB" || qseState=="BC" || qseState=="IA" || qseState=="MB" || qseState=="NB" || qseState=="NF" || 			qseState=="NS" || qseState=="NT" || qseState=="ON" || qseState=="PE" || qseState=="PQ" || qseState=="YT"){
        window.document.ProposalForm.country.value = "Canada";
     }           // qsestate criteria
     else {
        window.document.ProposalForm.country.value = "United States";
     }

  }           // qsestate != none

}




function onblur_feedbackchg(){

  var qseState = document.FeedbackForm.state.value;

  if (qseState != "None"){
     if (qseState=="AB" || qseState=="BC" || qseState=="IA" || qseState=="MB" || qseState=="NB" || qseState=="NF" || 			qseState=="NS" || qseState=="NT" || qseState=="ON" || qseState=="PE" || qseState=="PQ" || qseState=="YT"){
        window.document.FeedbackForm.country.value = "Canada";
     }           // qsestate criteria
     else {
        window.document.FeedbackForm.country.value = "United States";
     }

  }           // qsestate != none

}


function onblur_feedbackcountry(){

  var qseCountry = document.FeedbackForm.country.value;
  var qseState = document.FeedbackForm.state.value;
  var qseotherstate = document.FeedbackForm.if_other_state.value;

  if (qseCountry != "None"){
     if (qseCountry=="United States" || qseCountry=="Canada"){
        window.document.FeedbackForm.if_other_state.value = "";
        if (qseState == "None"){
	   FeedbackForm.state.focus();
        }
        else {
           FeedbackForm.comments.focus();
        }


     }           // qsestate criteria
     else {
        window.document.FeedbackForm.state.value = "None";
        if (qseotherstate == ""){
    	   FeedbackForm.if_other_state.focus();
        }
        else {
           FeedbackForm.comments.focus();
        }

     }

  }           // qsecountry != none

}         // end of the function onblur_feedbackcountry



function onblur_proposalcountry(){

  var qseCountry = document.ProposalForm.country.value;
  var qseState = document.ProposalForm.state.value;
  var qseotherstate = document.ProposalForm.if_other_state.value;

  if (qseCountry != "None"){
     if (qseCountry=="United States" || qseCountry=="Canada"){
        window.document.ProposalForm.if_other_state.value = "";
        if (qseState == "None"){
	   ProposalForm.state.focus();
        }
        else {
           ProposalForm.comments.focus();
        }

     }           // qsestate criteria
     else {
        window.document.ProposalForm.state.value = "None";
        if (qseotherstate == ""){
	   ProposalForm.if_other_state.focus();
        }
        else {
           ProposalForm.comments.focus();
        }


     }

  }           // qsestate != none

}         // end of the function onblur_proposalcountry




//given two dates (day1,day2) in form mmddyyyy, compute days between
function calc_days(date1, date2){
 
 var curdate = date1;
 var ind01 = date1.indexOf("/");
 var dat1 = date1.substring(0, ind01);
 var d2 = date1.substring(ind01 + 1, curdate.length);
 var ind02 = d2.indexOf("/");
 var dat2 = d2.substring(0, ind02);
 var d3 = d2.substring(ind02 + 1, d2.length);
 var dat3 = d3.substring(0, d3.length); 

 var dat1 = parseFloat(dat1.toString());
 var dat2 = parseFloat(dat2.toString());
 var dat3 = parseFloat(dat3.toString());

 var day1 = dat1 * 1000000 + dat2 * 10000 + dat3;

 var day2 = parseFloat(date2.toString());
 if(isNaN(day1)){day1=0}; //required for netscape navigator
 if(isNaN(day2)){day2=0}; //required for netscape navigator
 if(day1==0){
   window.alert("Bad date: Enter two dates in the form mmddyyyy & try again");
   return;
 };
 if(day2==0){
   window.alert("Bad date: Enter two dates in the form mmddyyyy & try again");
   return;
 };
 jd1=toJul(day1);
 jd2=toJul(day2);
 delta=Math.abs(jd1-jd2);
 return delta;
}






//given two dates (day1,day2) in form mmddyyyy, compute days between
function calc_days1(date2){
 var nday1 = new Date()
 var date = nday1.getDate();
 alert(date);
 var month = nday1.getMonth();
 month = month + 1;
 alert(month);
 var year = nday1.getYear();
 alert(year);
 var day1 = month * 1000000 + date * 10000 + year;
 alert(day1);
 var day2 = parseFloat(date2.toString());
 if(isNaN(day1)){day1=0}; //required for netscape navigator
 if(isNaN(day2)){day2=0}; //required for netscape navigator
 if(day1==0){
   window.alert("Bad date: Enter two dates in the form mmddyyyy & try again");
   return;
 };
 if(day2==0){
   window.alert("Bad date: Enter two dates in the form mmddyyyy & try again");
   return;
 };
 jd1=toJul(day1);
 jd2=toJul(day2);
 delta=Math.abs(jd1-jd2);
 return delta;
}




//input is date in form mmddyyyy; output is julian day number & fraction
function toJul(mmddyyyy){
  mm=Math.floor(mmddyyyy/1000000);
  dd=Math.floor((mmddyyyy-(mm*1000000))/10000);
  t1=((mm*100)+dd)*10000; //mmdd0000
  yyyy=Math.floor(mmddyyyy-t1);
  if((mm==1) || mm==2){ 
    yyyyp = yyyy - 1; 
    mmp = mm + 12;
  } else {
    yyyyp=yyyy; mmp=mm;
  };
  yyyymmdd=(yyyy*10000)+(mm*100)+dd;
  if(yyyymmdd >=15821015 ){
    a = Math.floor(yyyyp/100);
    b = 2 - a + Math.floor(a/4);
  } else {
     b=0;
  };
  t2 = 365.25 * yyyyp;
  if(yyyyp<0){
    t2 = t2 - 0.75;
  };
  c = Math.floor(t2);
  t1 = 30.6001 * (mmp + 1);
  d = Math.floor(t1);
  jd= b+c+d+dd+1720994.5;
  return jd;
}






