
	function getSection(SubSectionID) {				
		document.getElementById("SubSection").value = SubSectionID;				
		document.frm.action="genpage.asp";
		document.frm.submit();					
	}
	function SubmitFeedback(SubSectionID,Tag) {		
		document.getElementById("SubSection").value = SubSectionID;				
		document.getElementById("FeedbackTag").value = Tag;						
		document.frm.action="genpage.asp";	
		document.frm.submit();				
	}		
	function dropOnChange(obj) {
		window.location.href = "#" + obj.options[obj.selectedIndex].value;
	}	

	function SavePackage() {
		document.getElementById("SubSection").value = 103;				
		document.getElementById("PaymentTag").value = 1;						
		document.frm.action="genpage.asp";	
		document.frm.submit();						
	}
	
	

	function ProcessPackage() {	
		if (document.getElementById("txtFirstname").value=="") {
			alert('Enter a valid first name.');
			document.frm.txtFirstname.focus();
			return(false);			
		}
		if (document.getElementById("txtLastname").value=="") {
			alert('Enter a valid last name.');
			document.frm.txtLastname.focus();
			return(false);						
		}
		if (document.getElementById("txtJobTitle").value=="") {
			alert('Enter a valid job title.');
			document.frm.txtJobTitle.focus();
			return(false);						
		}		
		if (document.getElementById("txtOrgName").value=="") {
			alert('Enter a valid organisation name.');
			document.frm.txtOrgName.focus();
			return(false);						
		}
		if (document.getElementById("txtAddress").value=="") {
			alert('Enter a valid address.');
			document.frm.txtAddress.focus();
			return(false);						
		}
		/*
		if (document.getElementById("txtPostCode").value=="") {
			alert('Enter a valid post code');
			document.frm.txtPostCode.focus();
			return(false);						
		}
		if (document.getElementById("cboCountry").selectedIndex==0) {
			alert('Enter a valid country');
			document.frm.cboCountry.focus();
			return(false);						
		}
		*/
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		var address = document.frm.txtEmail.value;		
   		if(reg.test(address) == false) {
      		alert('Enter a valid email address.');
			document.frm.txtEmail.focus();
      		return(false);   		
		}		
		if (isNaN(document.getElementById("txtPhone").value) || document.getElementById("txtPhone").value=="") {
			alert('Enter a valid phone');
			document.frm.txtPhone.focus();
			return(false);						
		}	
		/*
		if (document.getElementById("txtFax").value=="") {
			alert('Enter a valid fax');
			document.frm.txtFax.focus();
			return(false);						
		}				
		if (isNaN(document.getElementById("txtMobile").value) || document.getElementById("txtMobile").value=="") {
      		alert('Please enter a valid mobile number.');
			document.frm.txtMobile.focus();
      		return(false);   					
		}			
		if (document.getElementById("txtWebsite").value=="") {
			alert('Enter a valid website');
			document.frm.txtWebsite.focus();
			return(false);						
		}	
		*/
		for (i=0;i<document.frm.rdoPaymentOption.length;i++) {
			if (document.frm.rdoPaymentOption[i].checked==true)	validPaymentOption = 1;		
		}
		if (validPaymentOption!=1) {
				alert('Pick a payment option');
				return(false);			
		} 

		var no=document.frm.os0;
		var packagetype=no.options[no.selectedIndex].text;
		document.getElementById("PackageType").value = packagetype;
		for (i=0;i<document.frm.rdoPaymentOption.length;i++) {
			if (document.frm.rdoPaymentOption[i].checked==true)	PaymentOption=i
		}	
		/*
		if (PaymentOption==1) {
			document.frm.action="https://www.paypal.com/cgi-bin/webscr";	
			document.frm.submit();							
		} else {
			document.getElementById("SubSection").value = 102;				
			document.getElementById("PaymentTag").value = 1;						
			document.frm.action="genpage.asp";	
			document.frm.submit();	
		}
		*/
		document.getElementById("SubSection").value = 102;				
		document.getElementById("PaymentTag").value = 1;						
		document.frm.action="genpage.asp";	
		document.frm.submit();			
	}
	
	function ProcessPaypal() {
		document.frm.action="https://www.paypal.com/cgi-bin/webscr";	
		document.frm.submit();		
	}


	function ProcessSelectSpeaker() {	
		if (document.getElementById("txtFirstname").value=="") {
			alert('Enter a valid first name.');
			document.frm.txtFirstname.focus();
			return(false);			
		}
		if (document.getElementById("txtLastname").value=="") {
			alert('Enter a valid last name.');
			document.frm.txtLastname.focus();
			return(false);						
		}
		if (document.getElementById("txtCompanyName").value=="") {
			alert('Enter a valid company name.');
			document.frm.txtCompanyName.focus();
			return(false);						
		}		
		if (document.getElementById("txtJobTitle").value=="") {
			alert('Enter a valid job title.');
			document.frm.txtJobTitle.focus();
			return(false);						
		}		
		if (document.getElementById("txtAddress").value=="") {
			alert('Enter a valid mailing address.');
			document.frm.txtAddress.focus();
			return(false);						
		}
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		var address = document.frm.txtEmail.value;		
   		if(reg.test(address) == false) {
      		alert('Enter a valid email address.');
			document.frm.txtEmail.focus();
      		return(false);   		
		}		
		if (isNaN(document.getElementById("txtPhone").value) || document.getElementById("txtPhone").value=="") {			
			alert('Enter a valid direct phone number');
			document.frm.txtPhone.focus();
			return(false);						
		} else {
			document.getElementById("SubSection").value = 104;				
			document.frm.action="genpage.asp";	
			document.frm.submit();	
		}
	}


	function SaveSelectSpeaker() {
		document.getElementById("SubSection").value = 105;				
		document.getElementById("SpeakerTag").value = 1;						
		document.frm.action="genpage.asp";	
		document.frm.submit();								
	}

	function MoreInformation() {
		document.getElementById("SubSection").value = 12;				
		document.frm.action="genpage.asp";	
		document.frm.submit();								
	}

	function ProcessHotelBooking() {	
		var guestCount, vFName, vMName, vLName;
		var x,y;
		x = document.getElementById("txtArrivalDateTime").value;
		y = document.getElementById("txtDepartureDateTime").value;		
		guestCount = document.getElementById("guestCount").value;		
		for (i=1;i<=guestCount;i++) {
			vFName = document.getElementById("firstName"+i).value;	
			vMName = document.getElementById("middleName"+i).value;	
			vLName = document.getElementById("lastName"+i).value;	
			if (vFName=="" || vMName=="" || vLName=="") {
				alert('Enter a valid name for guest ' + i);
				return(false);
			}
		}
		
		if (document.getElementById("txtOrgName").value=="") {
			alert('Enter a valid organisation name.');
			document.frm.txtOrgName.focus();
			return(false);						
		}		
		if (document.getElementById("txtAddress").value=="") {
			alert('Enter a valid address.');
			document.frm.txtAddress.focus();
			return(false);						
		}
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		var address = document.frm.txtEmail.value;		
   		if(reg.test(address) == false) {
      		alert('Enter a valid email address.');
			document.frm.txtEmail.focus();
      		return(false);   		
		}		
		if (isNaN(document.getElementById("txtPhone").value) || document.getElementById("txtPhone").value=="") {
			alert('Enter a valid direct phone number');
			document.frm.txtPhone.focus();
			return(false);						
		}
		if (document.getElementById("txtArrivalDateTime").value=="") {			
			alert('Enter a valid arrival date time');
			document.frm.txtArrivalDateTime.focus();
			return(false);						
		}
		if (document.getElementById("txtDepartureDateTime").value=="") {			
			alert('Enter a valid departure date time');
			document.frm.txtDepartureDateTime.focus();
			return(false);						
		}
		/*
		if (document.getElementById("txtArrivalDateTime").value < document.getElementById("txtDepartureDateTime").value) {
			alert('Arrival date time must be greater than Departure date time.');
			document.frm.txtArrivalDateTime.focus();
			return(false);						
		}
		*/
		if (document.getElementById("txtExpirationMonth").value=="mm") document.getElementById("txtExpirationMonth").value = ""
		if (document.getElementById("txtExpirationYear").value=="yy") document.getElementById("txtExpirationYear").value = ""
		
		if (document.getElementById("txtExpirationMonth").value!="") {
			if (isNaN(document.getElementById("txtExpirationMonth").value)  || document.getElementById("txtExpirationMonth").value<=12) {
				alert('Enter a valid expiration month.');
				document.frm.txtExpirationMonth.focus();
				return(false);						
			}
		}	
		if (document.getElementById("txtExpirationYear").value!="") {
			if (isNaN(document.getElementById("txtExpirationYear").value)) {
				alert('Enter a valid expiration year.');
				document.frm.txtExpirationYear.focus();
				return(false);						
			}
		} else {						
			//alert(x);
			//alert(y);
			document.getElementById("txtArrivalDateTime").disabled=false;
			document.getElementById("txtDepartureDateTime").disabled=false;
			//document.getElementById("txtArrivalDateTime").value=x;
			//document.getElementById("txtDepartureDateTime").value=y;
			document.getElementById("zArrivalTime").value=document.getElementById("txtArrivalDateTime").value;
			document.getElementById("zDepartureTime").value=document.getElementById("txtDepartureDateTime").value;
			document.getElementById("SubSection").value = 106;					
			document.frm.action="genpage.asp";	
			document.frm.submit();					
		}
	}

	function SaveHotelBooking() {
		document.getElementById("SubSection").value = 107;				
		document.frm.action="genpage.asp";	
		document.frm.submit();								
	}


	function delayer(){
    	window.location = "default.asp"
	}





	// Copyright 1999 - 2002 by Ray Stott, Pop-up Windows Script ver 2.0
	// OK to use if this copyright is included
	// Script is available at http://www.crays.com/jsc          
	
	var popWin = null    // use this when referring to pop-up window
	var winCount = 0
	var winName = "popWin"

	function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
	  var d_winLeft = 20  // default, pixels from screen left to window left
	  var d_winTop = 20   // default, pixels from screen top to window top
	  winName = "popWin" + winCount++ //unique name for each pop-up window
	  closePopWin()           // close any previously opened pop-up window
	  if (openPopWin.arguments.length >= 4)  // any additional features? 
	    winFeatures = "," + winFeatures
	  else 
	    winFeatures = "" 
	  if (openPopWin.arguments.length == 6)  // location specified
	    winFeatures += getLocation(winWidth, winHeight, winLeft, winTop)
	  else
	    winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop) +" resizable=no"
		//document.write(winFeatures);
	  popWin = window.open(winURL, winName, "width=" + winWidth 
	           + ",height=" + winHeight + winFeatures)
	  }

	function closePopWin(){    // close pop-up window if it is open 
	  if (navigator.appName != "Microsoft Internet Explorer" 
	      || parseInt(navigator.appVersion) >=4) //do not close if early IE
	    if(popWin != null) if(!popWin.closed) popWin.close() 
	  }

	function getLocation(winWidth, winHeight, winLeft, winTop){
	  return ""
	  }

	  
	function getLocation(winWidth, winHeight, winLeft, winTop){
	  var winLocation = ""
	  if (winLeft < 0)
	    winLeft = screen.width - winWidth + winLeft
	  if (winTop < 0)
	    winTop = screen.height - winHeight + winTop
	  if (winTop == "cen")
	    winTop = (screen.height - winHeight)/2 - 20
	  if (winLeft == "cen")
	    winLeft = (screen.width - winWidth)/2
	  if (winLeft>0 & winTop>0)
	    winLocation =  ",screenX=" + winLeft + ",left=" + winLeft	
	                + ",screenY=" + winTop + ",top=" + winTop
	  else
	    winLocation = ""
	  return winLocation
	  }





