  var forSomeoneElse='no';
  function toggleRestrictions() {
    if(document.getElementById('cboRestrictions').value=='yes') {
        document.getElementById('dvRestrictionsPanel1').style.display='';
    } else {
        document.getElementById('dvRestrictionsPanel1').style.display='none';
    }
  }
  function toggleRecurringTypeSelection() {
    if(document.getElementById('cboRecurringType').options[document.getElementById('cboRecurringType').selectedIndex].value=='monthly') {
      document.getElementById('trRecurringDayOfTheMonth').style.display='';
    } else {
      document.getElementById('trRecurringDayOfTheMonth').style.display='none';
    }
  }
  function toggleTranscriptionType() {
    if(document.getElementById('cboRecieveMethodTranscription').value=='Mail') {
      document.getElementById('dvRecieveMethodPanel2').style.display='';
    } else {
      document.getElementById('dvRecieveMethodPanel2').style.display='none';
    }
  
  }
  function toggleConferenceDirector() {
    if(document.getElementById('cboTypeOfCall').value=='elite') {
      if(document.getElementById('cboConferenceDirector').value=='yes') {
        document.getElementById('dvConferenceDirectorLogins').style.display='';
        document.getElementById('dvConferenceDirectorFormat').style.display='';
        
      } else {
        document.getElementById('dvConferenceDirectorLogins').style.display='none';
        document.getElementById('dvConferenceDirectorFormat').style.display='none';
      } 
  	} else {
      document.getElementById('dvConferenceDirectorLogins').style.display='none';
        document.getElementById('dvConferenceDirectorFormat').style.display='none';
  	}
  }
  function toggleQandASession() {
  	if(document.getElementById('cboQandASession').value=='Formal') {
  		document.getElementById('dvQandASessionPanel1').style.display='';
  		document.getElementById('dvQandASessionPanel2').style.display='';
  		document.getElementById('dvAnnounce').style.display='';
  		toggleAnnounce();
  		toggleRestrictions();
  	} else {
  		document.getElementById('dvQandASessionPanel1').style.display='none';
  		document.getElementById('dvQandASessionPanel2').style.display='none';
  		document.getElementById('dvAnnounce').style.display='none';
  		document.getElementById('dvRestrictionsPanel1').style.display='none';
  	}
  }
  function toggleAnnounce() {
  	if(document.getElementById('cboQandAAnnounce').options[document.getElementById('cboQandAAnnounce').selectedIndex].value=='Other') {
  		document.getElementById('txtAnnounceOther').style.display='';
  	} else {
  		document.getElementById('txtAnnounceOther').style.display='none';
  	}
  }
  function toggleBookingInformationMailingAddress() {
    if(document.getElementById('cboBookingFirstConference').options[document.getElementById('cboBookingFirstConference').selectedIndex].value=='yes') {
      document.getElementById('trBookingInformationMailingAddress').style.display='';
    } else {
      document.getElementById('trBookingInformationMailingAddress').style.display='none';
    }
  }
  function toggleHostInformationMailingAddress() {
    if(document.getElementById('cboHostFirstConference').options[document.getElementById('cboHostFirstConference').selectedIndex].value=='yes') {
      document.getElementById('trHostingInformationMailingAddress').style.display='';
    } else {
      document.getElementById('trHostingInformationMailingAddress').style.display='none';
    }
  }
  function toggleRecordToCD() {
    if(document.getElementById('cboRecordToCD').options[document.getElementById('cboRecordToCD').selectedIndex].value=='no') {
      document.getElementById('trRecordToCDPanel1').style.display='none';
      document.getElementById('trRecordToCDPanel2').style.display='none';
      document.getElementById('trRecordToCDPanel3').style.display='none';
      
    
    } else {
      document.getElementById('trRecordToCDPanel1').style.display='';
      document.getElementById('trRecordToCDPanel2').style.display='';
      document.getElementById('trRecordToCDPanel3').style.display='';
      
    }    
  }
  function toggleDigitalReplay() {
    if(document.getElementById('cboDigitalReplay').options[document.getElementById('cboDigitalReplay').selectedIndex].value=='no') {
      document.getElementById('trDigitalReplayPanel1').style.display='none';
    
    } else {
      document.getElementById('trDigitalReplayPanel1').style.display='';

    } 
  
  }
  function fwdPanel4To5() {
  	var strError='';
  	strError='The following fields are required for this form:\r\nConference Title\r\nConference Date\r\nPlease correct these fields and continue by clicking \'Next\'';
  	if(document.getElementById('txtConferenceDate').value=='' || document.getElementById('txtConferenceTitle').value=='' ) {
  		alert(strError);
  		return 'error';
  	}
    if(document.getElementById('cboTypeOfCall').value!='operatorassisted' && document.getElementById('cboTypeOfCall').value!='elite') {
      document.getElementById('trDialOutParticipantsPanel1').style.display='none';
      document.getElementById('trDialOutParticipantsPanel2').style.display='none';
      document.getElementById('trDialOutParticipantsPanel3').style.display='none';
      document.getElementById('trDialOutParticipantsPanel4').style.display='none';
      document.getElementById('trDialOutParticipantsPanel5').style.display='none';
      
    } else {
      document.getElementById('trDialOutParticipantsPanel1').style.display='';
      document.getElementById('trDialOutParticipantsPanel2').style.display='';
      document.getElementById('trDialOutParticipantsPanel3').style.display='';
      document.getElementById('trDialOutParticipantsPanel4').style.display='';
      document.getElementById('trDialOutParticipantsPanel5').style.display='';
      
    }
    return 'step5';
  }
  	  function verifyEmails(control) {
    var tmpemails=trim(document.getElementById(control).value).split('\r\n');
    var emailregex=new RegExp('^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$');
    for(var tmpemail in tmpemails) {
      if(emailregex.test(tmpemails[tmpemail])==false) {
        return false;
      }
    }
    return true;

  }

  function textareaToArray(t){
    return t.value.split(/[\n\r]+/);
  }
  function fwdPanel3To4() {
  	var strError='';
  	strError='The following fields are required for this form:\r\nHost Name\r\nPhone Number\r\nHost Emails For Confirmation\r\n';
  	if(document.getElementById('cboHostFirstConference').value=='yes') {
  		strError+='Mailing Address\r\n';
  	} 
  	//if(document.getElementById('txtHostEmailsForConfirmation').value.match('//')==null) {
      //strError+='Proper Email Address (example@example.com)\r\n';
  	//}
  	//var checkEmail=verifyEmails('txtHostEmailsForConfirmation');
  	var checkEmail=true;
	
  	strError+='Please correct these fields and continue by clicking \'Next\'';
  	if((document.getElementById('cboHostFirstConference').value=='yes' && document.getElementById('txtMailingAddressHost').value=='') || document.getElementById('txtHostName').value=='' || document.getElementById('txtHostEmailsForConfirmation').value=='' || checkEmail==false) {
  		alert(strError);
  		return 'error';
  	} else {
  		return 'step4';
  	}
  }
  function fwdPanel1To2() {
  	var strError='The following fields are required for this form: \r\nCompany Name\r\nYour Name\r\nPhone Number\r\nEmails For Confirmation\r\n';
  	if(document.getElementById('cboBookingFirstConference').value=='yes') {
  		strError+='Mailing Address\r\n';
  	}
  	strError+='Please correct these fields and continue by clicking \'Next\'';
  	//var checkEmail=verifyEmails('txtEmailsForConfirmation');
  	var checkEmail=true;
	
	
  	if((document.getElementById('cboBookingFirstConference').value=='yes' && document.getElementById('txtMailingAddress').value=='') || document.getElementById('txtCompanyName').value=='' || document.getElementById('txtYourName').value=='' || document.getElementById('txtEmailsForConfirmation').value=='' || checkEmail==false) {
  		alert(strError);
  		return 'error';
  	} else {
		// JR adding code to note that they have entered data and should be warned when leaving form
		catchleaving=true;
		
  		return 'step2';
  	}
  	
  }
  function fwdPanel5To6() {
  	var strError='';
  	strError='The following fields are required for this form:\r\n';
  	if(document.getElementById('cboTypeOfCall').value=='reservedpasscode' && document.getElementById('cboInParticipants').options.length==0) {
  		strError+='At least 1 dial-in participant\r\nPlease correct these fields and continue by clicking \'Next\'';
  		alert(strError);
  		return 'error';
  		
  	} else if(document.getElementById('cboTypeOfCall').value!='reservedpasscode' && (document.getElementById('cboInParticipants').options.length==0 && document.getElementById('cboOutParticipants').options.length==0)){
		strError+='At least 1 dial-in participant or 1 dial-out participant\r\nPlease correct these fields and continue by clicking \'Next\'';
		alert(strError);
		return 'error';  	
  	}
    if(document.getElementById('cboTypeOfCall').value!='elite') {
      return fwdPanel6To7();
      
    } else {
      return 'step6';
      
    }
  
  }
  function fwdPanel9To10() {
    writeFinalResults();
    return 'step10';
  }
  function fwdPanel8To9() {
  	var strError='';
  	strError='The following fields are required for this form:\r\n';
  	if(document.getElementById('cboRecordToCD').value=='yes') {
  		strError+='Mailing address for CD\r\n';
  	}
  	if(document.getElementById('cboParticipantList').value=='yes') {
  		strError+='At least 1 item of information to collect\r\n';
  		strError+='Email address or fax number to recieve participant list\r\n';
  	}
  	if(document.getElementById('cboConferenceDirector').value=='yes') {
  	    strError+='Number of people/logins\r\n';
  	}
  	if(document.getElementById('cboTranscription').value=='yes') {
  	    strError+='Mailing address for transcription\r\nLanguage to be transcribed to\r\n';
  	}
  	strError+='Please correct these fields and continue by clicking \'Next\'';
  	if(document.getElementById('cboTypeOfCall').value=='elite' && ((document.getElementById('cboRecordToCD').value=='yes' && document.getElementById('txtMailingAddressForCD').value=='') || (document.getElementById('cboParticipantList').value=='yes' && document.getElementById('txtParticipantInformation1').value=='' && document.getElementById('txtParticipantInformation2').value=='' && document.getElementById('txtParticipantInformation3').value=='') || (document.getElementById('cboConferenceDirector').value=='yes' && document.getElementById('txtConferenceDirector').value=='') || (document.getElementById('cboTranscription').value=='yes' && (document.getElementById('txtRecieveTranscriptionAddress').value=='' || document.getElementById('txtTranscriptionLanguage').value=='')))) {
  	    alert(strError);
  	    return 'error';
  	}
  	return 'step9';
  }
 
  function fwdPanel6To7() {
  	var strError='The following fields are required for this form:\r\nAt least 1 speaker\r\n';
  	if(document.getElementById('cboRequireCommLine').value=='yes') {
  		strError+='Name for comm-line\r\nPhone number for comm-line\r\n';
  	}
  	strError+='Please correct these fields and continue by clicking \'Next\'';
  	if((document.getElementById('cboTypeOfCall').value=='elite' && document.getElementById('cboSpeakers').options.length==0) || (document.getElementById('cboRequireCommLine').value=='yes' && (document.getElementById('txtCommLineName').value==''))) {
  		alert(strError);
  		return 'error';
  	}
    if(document.getElementById('cboTypeOfCall').value!='operatorassisted' && document.getElementById('cboTypeOfCall').value!='elite') {
      return fwdPanel8To9();
      
    } else {
      if(document.getElementById('cboTypeOfCall').value=='elite') {
	      document.getElementById('dvAnnounceNamesPanel').style.display='none';
	      document.getElementById('dvRollCallPanel').style.display='none';
		  document.getElementById('dvCallMonitoring').style.display='none';
		  document.getElementById('dvQandASession').style.display='';
		  document.getElementById('dvQandASessionPanel1').style.display='';
		  document.getElementById('dvQandASessionPanel2').style.display='';
		  document.getElementById('dvRestrictionsPanel1').style.display='';
		  document.getElementById('dvAnnounce').style.display='';
		  
	
	    } else {
	      document.getElementById('dvAnnounceNamesPanel').style.display='';
	      document.getElementById('dvRollCallPanel').style.display='';
	      document.getElementById('dvCallMonitoring').style.display='';
	      document.getElementById('dvQandASession').style.display='none';
	      document.getElementById('dvQandASessionPanel1').style.display='none';
		  document.getElementById('dvQandASessionPanel2').style.display='none';
		  document.getElementById('dvRestrictionsPanel1').style.display='none';
		  document.getElementById('dvAnnounce').style.display='none';
	    }
      return 'step7';
      
    }
  
  }
  function toggleVoiceCapture() {
    if(document.getElementById('cboVoiceCapture').options[document.getElementById('cboVoiceCapture').selectedIndex].value!='No') {
      document.getElementById('dvVoiceCapturePanel1').style.display='';
    
    } else {
      document.getElementById('dvVoiceCapturePanel1').style.display='none';
    }
  }
  function toggleForSomeoneElse(val) {
    forSomeoneElse=val;
    if(val=='yes') {
      toggleNextBack('forward','step2','step3');
    } else {
      toggleNextBack('forward','step2','step4');
    }
  }
  function bckPanel4To3() {
    if(forSomeoneElse=='yes') {
      return 'step3';
    } else {
      return 'step2';
    }
  }
  function bckPanel8To7() {
  	if(document.getElementById('cboTypeOfCall').value=='elite') {
  			document.getElementById('dvQandASessionPanel1').style.display='';
		  document.getElementById('dvQandASessionPanel2').style.display='';
		  document.getElementById('dvRestrictionsPanel1').style.display='';
		  document.getElementById('dvAnnounce').style.display='';
		  } else {
		  		  document.getElementById('dvQandASessionPanel1').style.display='none';
		  document.getElementById('dvQandASessionPanel2').style.display='none';
		  document.getElementById('dvRestrictionsPanel1').style.display='none';
		  document.getElementById('dvAnnounce').style.display='none';
		  }
  	return 'step7';
  }
  function bckPanel9To8() {
    if(document.getElementById('cboTypeOfCall').value!='operatorassisted' && document.getElementById('cboTypeOfCall').value!='elite') {
      return 'step5';
    } else {
    	if(document.getElementById('cboTypeOfCall').value=='elite') {
    		document.getElementById('dvConferenceDirector').style.display='';
    		document.getElementById('dvConferenceDirectorFormat').style.display='';
    		document.getElementById('dvTranscription').style.display='';
    		
    	} else {
    		document.getElementById('dvConferenceDirector').style.display='none';
    		document.getElementById('dvConferenceDirectorFormat').style.display='none';
    		document.getElementById('dvTranscription').style.display='none';
    		
    	}
      return 'step8';
    }
  }
  function writeFinalResults() {
    var finalOutput='';
        finalOutput+='<h2>Booking Information</h2>';
    switch(document.getElementById('cboTypeOfCall').value) {
      case 'operatorassisted':
        finalOutput+='Call Type: Operator Assisted <br />';
      break;
      case 'elite':
        
        finalOutput+='Call Type: Elite <br />';
      break;
      case 'reservedpasscode':
        finalOutput+='Call Type: Reserved Passcode <br />';
      break;
    }
    
        finalOutput+='Company Name: ' + document.getElementById('txtCompanyName').value + '<br />';
        finalOutput+='Your Name: ' + document.getElementById('txtYourName').value + '<br />';
        finalOutput+='Phone Number: ' + document.getElementById('txtPhoneNumber').value + ', Ext: ' + document.getElementById('txtPhoneExt').value + '<br />';
        finalOutput+='Emails For Confirmation: <br /><div style="padding-left:20px">' + document.getElementById('txtEmailsForConfirmation').value.replace(/\n/g,'<br />') + '</div><br />';
        finalOutput+='First Conference with ACT? ';
        if(document.getElementById('cboBookingFirstConference').options[document.getElementById('cboBookingFirstConference').selectedIndex].value=='yes') {
          finalOutput+='Yes<br />';
          finalOutput+='Mailing Address: <br /><div style="padding-left:20px">' + document.getElementById('txtMailingAddress').value.replace(/\n/g,'<br />') + '</div><br />';
        } else {
          finalOutput+='No<br />';
        }
        
        
        finalOutput+='<h2>Host Information</h2>';
        if(forSomeoneElse=='yes') {
          finalOutput+='Host Name: ' + document.getElementById('txtHostName').value + '<br />';
          finalOutput+='Host Phone Number: ' + document.getElementById('txtPhoneNumberHost1').value +  ', Ext:' +  document.getElementById('txtPhoneHostExt').value + '<br />';
          finalOutput+='Host Emails: <br /><div style="padding-left:20px">' + document.getElementById('txtHostEmailsForConfirmation').value.replace(/\n/g,'<br />') + '</div><br />';
          finalOutput+='Host\'s First Conference with ACT? ';
          if(document.getElementById('cboHostFirstConference').options[document.getElementById('cboHostFirstConference').selectedIndex].value=='yes') {
            finalOutput+='Yes<br />';
            finalOutput+='Host Mailing Address: <br /><div style="padding-left:20px">' + document.getElementById('txtMailingAddressHost').value.replace(/\n/g,'<br />') + '</div><br />';
          } else {
            finalOutput+='No<br />';
          }
        } else {
          finalOutput+='Not booking for someone else<br />';
        }
        
        finalOutput+='<h2>Conference Details</h2>';
		finalOutput+='Conference Title: ' + document.getElementById('txtConferenceTitle').value + '<br />';
        finalOutput+='Conference Date: ' + document.getElementById('txtConferenceDate').value + '<br />';
      	finalOutput+='Conference Time: ' + document.getElementById('cboStartHour').options[document.getElementById('cboStartHour').selectedIndex].value + ':' + document.getElementById('cboStartMin').options[document.getElementById('cboStartMin').selectedIndex].value + ' ' + document.getElementById('cboStartAP').options[document.getElementById('cboStartAP').selectedIndex].value + '-' + document.getElementById('cboEndHour').options[document.getElementById('cboEndHour').selectedIndex].value + ':' + document.getElementById('cboEndMin').options[document.getElementById('cboEndMin').selectedIndex].value + ' ' + document.getElementById('cboEndAP').options[document.getElementById('cboEndAP').selectedIndex].value + '<br />';
        finalOutput+='Time Zone: ' + document.getElementById('cboTimeZone').options[document.getElementById('cboTimeZone').selectedIndex].value + '<br />';
        finalOutput+='Recurring Time: ';
        switch(document.getElementById('cboRecurringType').options[document.getElementById('cboRecurringType').selectedIndex].value) {
          case 'one':
            finalOutput+='One time <br />';
          break;
          case 'weekly':
            finalOutput+='Every week<br />';
          break;
          case 'biweekly':
            finalOutput+='Bi-weekly<br />';
          break;
          case 'monthly':
            finalOutput+='Monthly on ' + document.getElementById('cboSelectMonthDay').options[document.getElementById('cboSelectMonthDay').selectedIndex].value + '<br />';
          break;
        }
        
        finalOutput+='<h2>Call Participants</h2>';
        if(document.getElementById('cboInParticipants').options.length>0) {
            finalOutput+='Participants List (Dial-In): <br /><div style="padding-left:20px">';
            for(var tmploop=0;document.getElementById('cboInParticipants').options.length>tmploop;tmploop++) {
              finalOutput+=document.getElementById('cboInParticipants').options[tmploop].value + '<br />';
              
            }
            finalOutput+='</div><br />';
        }
        
        if(document.getElementById('cboTypeOfCall').options[document.getElementById('cboTypeOfCall').selectedIndex].value!='reservedpasscode') {
          if(document.getElementById('cboOutParticipants').options.length>0) {
              finalOutput+='Participants List (Dial-Out): <br /><div style="padding-left:20px">';
              for(var tmploop=0;document.getElementById('cboOutParticipants').options.length>tmploop;tmploop++) {
                finalOutput+=document.getElementById('cboOutParticipants').options[tmploop].value + '<br />';
                
              }
              finalOutput+='</div><br />';
          }
          if(document.getElementById('cboTypeOfCall').options[document.getElementById('cboTypeOfCall').selectedIndex].value=='elite') {
            finalOutput+='<h2>Speaker Details</h2>';
            finalOutput+='Speaker Details: <br /><div style="padding-left:20px">';
            for(var tmploop=0;document.getElementById('cboSpeakers').options.length>tmploop;tmploop++) {
              finalOutput+=document.getElementById('cboSpeakers').options[tmploop].value + '<br />';
            }
            finalOutput+='</div>';
            finalOutput+='Require A Comm Line? ';
            if(document.getElementById('cboRequireCommLine').options[document.getElementById('cboRequireCommLine').selectedIndex].value=='') {
              finalOutput+= 'Yes<br />Contact Name: ' + document.getElementById('txtCommLineName').value + '<br />Contact Number: ' + document.getElementById('txtPhoneNumberComm1').value + ', Ext: ' + document.getElementById('txtPhoneCommExt').value + '<br />';
            } else {
              finalOutput+='No<br />';
            }
          }
          finalOutput+='<h2>Conference Options</h2>';
          if(document.getElementById('cboTypeOfCall').options[document.getElementById('cboTypeOfCall').selectedIndex].value=='operatorassisted') {
            finalOutput+='Roll Call: ';
            if(document.getElementById('cboRollCall').options[document.getElementById('cboRollCall').selectedIndex].value=='operatorannounced') {
              finalOutput+='Operator announces each person in the conference at the start of the call<br />';
            } else {
              finalOutput+='No roll call<br />';
            }
          }
           if(document.getElementById('cboTypeOfCall').options[document.getElementById('cboTypeOfCall').selectedIndex].value=='operatorassisted') {
	          finalOutput+='Call Monitoring: ';
	          switch(document.getElementById('cboMonitorCall').options[document.getElementById('cboMonitorCall').selectedIndex].value) {
	            case 'nomonitor':
	              finalOutput+='No monitoring <br />';
	            break;
	            case 'standard':
	              finalOutput+='Standard monitoring (scan occasionally for sound quality issues) <br />';
	            break;
	            case 'continuous':
	              finalOutput+='Continuous monitoring (dedicated operator - additional cost)<br />';
	            break;
	          
	          }
          }
          if(document.getElementById('cboTypeOfCall').options[document.getElementById('cboTypeOfCall').selectedIndex].value=='operatorassisted') {
          finalOutput+='Announce Names: ';
            switch(document.getElementById('cboAnnounceNames').options[document.getElementById('cboAnnounceNames').selectedIndex].value) {
              case 'silence':
                finalOutput+='Silence<br />';
              break;
              case 'tones':
                finalOutput+='Tones<br />';
              break;
              case 'announce':
                finalOutput+='Announce Names<br />';
              break;
            
            }
          }
          if(document.getElementById('cboTypeOfCall').value=='elite') {
          	finalOutput+='Q&amp;A Session: ';
          	if(document.getElementById('cboQandASession').value=='Formal') {
          		finalOutput+='Formal<br />Restrictions: ';
          		if(document.getElementById('cboRestrictions').value=='no') {
          			finalOutput+='None<br />';
          		} else {
          			finalOutput+=document.getElementById('txtRestrictionKind').value + '<br />';
          		}
          		finalOutput+='Priority Questions: ' + document.getElementById('txtPriorityQuestions').value + '<br />';
          		finalOutput+='Announce: ' + document.getElementById('cboQandAAnnounce').value;
          		if(document.getElementById('cboQandAAnnounce').value=='Other') {
          			finalOutput+=', ' + document.getElementById('txtAnnounceOther').value;
          		}
          		finalOutput+='<br />';
          	} else {
          		finalOutput+='Open Line<br />';
          	}
          }
          
          finalOutput+='<h2>Additional Features</h2>';
          finalOutput+='Record To A CD? ';
          if(document.getElementById('cboRecordToCD').options[document.getElementById('cboRecordToCD').selectedIndex].value=='no') {
            finalOutput+='No<br />';
            
          } else {
            finalOutput+='Yes<br />Mailing Address For CD:<br />';
            finalOutput+='<div style="padding-left:20px">' + document.getElementById('txtMailingAddressForCD').value.replace(/\n/g,'<br />') + '</div><br />Format: ' + document.getElementById('cboCDFormat').value + '<br />Type of delivery: ' + document.getElementById('cboDeliveryType').value + '<br />Digital Replay? ';
            if(document.getElementById('cboDigitalReplay').options[document.getElementById('cboDigitalReplay').selectedIndex].value=='yes') {
              finalOutput+='Yes<br />Days available for replay?' + document.getElementById('cboDigitalReplayAvailable').options[document.getElementById('cboDigitalReplayAvailable').selectedIndex].value + '<br />';
            } else {
              finalOutput+='No<br />';
            }
          }
          
          
          finalOutput+='Replay Access: <br /><div style="padding-left:20px">';
          if(document.getElementById('chkReplayUSLocal').checked==true) {
            finalOutput+='US Local<br />';
          }
          if(document.getElementById('chkReplayUSTF').checked==true) {
            finalOutput+='US Toll Free<br />';
          }
          if(document.getElementById('chkReplayUKLocal').checked==true) {
            finalOutput+='UK Local <br />';
          }
          if(document.getElementById('chkReplayUKTF').checked==true) {
            finalOutput+='UK Toll Free <br />';
          }
          if(document.getElementById('chkReplayHKLocal').checked==true) {
            finalOutput+='Hong Kong Local <br />';
          }
          if(document.getElementById('chkReplayGermanyLocal').checked==true) {
            finalOutput+='Germany Local<br />';
          }
          if(document.getElementById('chkReplayNetherlandsLocal').checked==true) {
            finalOutput+='Netherlands Local<br />';
          }
          if(document.getElementById('chkReplayFranceLocal').checked==true) {
            finalOutput+='France Local<br />';
          }
          finalOutput+='</div><br />';
          
          finalOutput+='Voice Capture? ';
          if(document.getElementById('cboVoiceCapture').options[document.getElementById('cboVoiceCapture').selectedIndex].value!='No') {
            finalOutput+=document.getElementById('cboVoiceCapture').value + '<br />Email To Send List To: ' + document.getElementById('txtVoiceCaptureSendEmail').value + '<br />';
          } else {
            finalOutput+='No<br />';
          }
          finalOutput+='Participant List Required? ';
          if(document.getElementById('cboParticipantList').options[document.getElementById('cboParticipantList').selectedIndex].value=='yes') {
            finalOutput+='Yes<br />Email or fax to send list to: ' + document.getElementById('txtFaxOrEmailParticipant').value + '<br />';
          	 finalOutput+='Information To Collect: <br /><div style="padding-left:20px">' + document.getElementById('txtParticipantInformation1').value + '<br />' + document.getElementById('txtParticipantInformation2').value + '<br />' + document.getElementById('txtParticipantInformation3').value + '</div><br />';
        
          } else {
            finalOutput+='No<br />';
          } 
          if(document.getElementById('cboTypeOfCall').value=='elite') {
            finalOutput+='Conference Directory? ';
            if(document.getElementById('cboConferenceDirector').value=='yes') {
          	    finalOutput+='Yes<br />Number of people/logins: ' + document.getElementById('txtConferenceDirector').value + '<br />';
          	    finalOutput+='Format: ' + document.getElementById('cboConferenceDirectorFormat').value + '<br />';
          	} else {
          	    finalOutput+='None<br />';
          	}
          	finalOutput+='Transcription: ';
          	if(document.getElementById('cboTranscription').value=='yes') {
          		finalOutput+='Yes, via ' +  document.getElementById('cboRecieveMethodTranscription').value + '<br />Where to send:<br /><div style="padding-left:20px">' + document.getElementById('txtRecieveTranscriptionAddress').value.replace(/\n/g,'<br />') + '</div><br />Language: ' +  document.getElementById('txtTranscriptionLanguage').value + '<br />';
          		if(document.getElementById('cboRecieveMethodTranscription').value=='Mail') {
                finalOutput+='Shipping method: ' + document.getElementById('cboDeliveryTypeTranscription').value + '<br />';
          		} 
          	} else {
          		finalOutput+='None<br />';
          	}
          }
        }
        if(document.getElementById('txtSpecialRequest').value!='') {
        	finalOutput+='<h2>Special Request</h2>' +  document.getElementById('txtSpecialRequest').value + '<br /><br />';
        }
        document.getElementById('step10inside').innerHTML=finalOutput;

  }
  function bckPanel7To6() {
    switch(document.getElementById('cboTypeOfCall').options[document.getElementById('cboTypeOfCall').selectedIndex].value) {
      case 'elite':
        return 'step6';
      break;
      case 'operatorassisted':
        return 'step5';
      break;
    
    }
  }
  function fwdPanel7To8() {
	  var strError='The following fields are required on this form:\r\n';
	
	  if(document.getElementById('cboRestrictions').value=='yes') {
		strError+='Kind of restriction\r\n';	  
		}
	  if(document.getElementById('cboQandAAnnounce').value=='Other') {
	  	strError+='Announce type\r\n';
	  }
	  strError+='Please correct these fields and continue by clicking \'Next\'';
	  if(document.getElementById('cboQandASession').value!='Open Line' && document.getElementById('cboTypeOfCall').value=='elite' && ((document.getElementById('cboRestrictions').value=='yes' && document.getElementById('txtRestrictionKind').value=='') || (document.getElementById('cboQandAAnnounce').value=='Other' && document.getElementById('txtAnnounceOther').value==''))) {
	  	alert(strError);
	  	return 'error';
	  }
  	if(document.getElementById('cboTypeOfCall').value=='elite') {
  		document.getElementById('dvConferenceDirectorLogins').style.display='';
      document.getElementById('dvConferenceDirectorFormat').style.display='';
  		document.getElementById('dvConferenceDirector').style.display='';
    	document.getElementById('dvTranscription').style.display='';
  	} else {
      document.getElementById('dvConferenceDirectorLogins').style.display='none';
      document.getElementById('dvConferenceDirectorFormat').style.display='none';
  		document.getElementById('dvConferenceDirector').style.display='none';
    	document.getElementById('dvTranscription').style.display='none';
  	}
  	return 'step8';
  }
  function toggleNextBack(flowDirection,currentPanel,nextPanel) {

    if(flowDirection=='forward') {
      if(currentPanel=='step1' && nextPanel=='step2') {
      	nextPanel=fwdPanel1To2();
      }
      if(currentPanel=='step3' && nextPanel=='step4') {
      	nextPanel=fwdPanel3To4();
      }
      if(currentPanel=='step4' && nextPanel=='step5') {
        nextPanel=fwdPanel4To5();
      }
      if(currentPanel=='step6' && nextPanel=='step7') {
        nextPanel=fwdPanel6To7();
      }
      if(currentPanel=='step5' && nextPanel=='step6') {
        nextPanel=fwdPanel5To6();
      }
      if(currentPanel=='step8' && nextPanel=='step9') {
        nextPanel=fwdPanel8To9();
      }
      if(currentPanel=='step9' && nextPanel=='step10') {
      	fwdPanel9To10();
      }
      if(currentPanel=='step7' && nextPanel=='step8') {
      	nextPanel=fwdPanel7To8();
      }
    } else if(flowDirection=='backward') {
      if(currentPanel=='step4' && nextPanel=='step3') {
        nextPanel=bckPanel4To3();
      }
      if(currentPanel=='step9' && nextPanel=='step8') {
        nextPanel=bckPanel9To8();
      }
      if(currentPanel=='step7' && nextPanel=='step6') {
        nextPanel=bckPanel7To6();
      }
		if(currentPanel=='step8' && nextPanel=='step7') {
		nextPanel=bckPanel8To7();
		}
    }
        toggleBookingInformationMailingAddress();
    toggleHostInformationMailingAddress();
    toggleRecurringTypeSelection();
    toggleRecordToCD();
    toggleDigitalReplay();
    toggleVoiceCapture();
    toggleParticipantList();
    toggleCommLinePanel();
    toggleTranscription();
    toggleTranscriptionType();
    toggleConferenceDirector();
    toggleQandASession();
    	if(nextPanel!='error') {
    		document.getElementById(currentPanel).style.display='none';
    		document.getElementById(nextPanel).style.display='none';
		    writeFinalResults();
		    document.getElementById(currentPanel).style.display='none';
		    document.getElementById(nextPanel).style.display='';
      	}
  
  }

  function toggleTranscription() {
  	if(document.getElementById('cboTranscription').options[document.getElementById('cboTranscription').selectedIndex].value=='yes') {
  		document.getElementById('dvTranscriptionPanel1').style.display='';
  		document.getElementById('dvRecieveMethodPanel1').style.display='';
  		document.getElementById('dvRecieveMethodPanel2').style.display='';
  		
  		document.getElementById('dvTranscriptionPanel2').style.display='';
  		
  		
  	} else {
  		document.getElementById('dvTranscriptionPanel1').style.display='none';
  		document.getElementById('dvRecieveMethodPanel1').style.display='none';
  		document.getElementById('dvRecieveMethodPanel2').style.display='none';
  		document.getElementById('dvTranscriptionPanel2').style.display='none';
  		
  	}
  }
  function toggleParticipantList() {
    if(document.getElementById('cboParticipantList').options[document.getElementById('cboParticipantList').selectedIndex].value=='yes') {
      document.getElementById('dvParticipantListAfterCallPanel1').style.display='';
      document.getElementById('dvParticipantListAfterCallPanel2').style.display='';
      
    } else {
      document.getElementById('dvParticipantListAfterCallPanel1').style.display='none';
      document.getElementById('dvParticipantListAfterCallPanel2').style.display='none';
      
    }
  }
  function bodySetup() {
    document.getElementById('btnSubmit').disabled=false;
    initiatePanels();
    toggleBookingInformationMailingAddress();
    toggleHostInformationMailingAddress();
    toggleRecurringTypeSelection();
    toggleRecordToCD();
    toggleDigitalReplay();
    toggleVoiceCapture();
    toggleParticipantList();
    toggleCommLinePanel();
    toggleTranscription();
    toggleTranscriptionType();
    toggleConferenceDirector();
    toggleQandASession();
  }
  function toggleCommLinePanel() {
    if(document.getElementById('cboRequireCommLine').options[document.getElementById('cboRequireCommLine').selectedIndex].value=='yes') {
      document.getElementById('dvCommLinePanel1').style.display='';
      document.getElementById('dvCommLinePanel2').style.display='';
      
    } else {
      document.getElementById('dvCommLinePanel1').style.display='none';
      document.getElementById('dvCommLinePanel2').style.display='none';
      
    
    }
  }
  
  function initiatePanels() {
    var panelsAr=new Array("step1","step2","step3","step4","step5","step6","step7","step8","step9","step10","step11");
    for(singlePanel in panelsAr) {
      document.getElementById(panelsAr[singlePanel]).style.display='none';
    }
    document.getElementById('step1').style.display='';
  }
  function addDialinParticipant() {

    if(document.getElementById('txtDialInParticipants').value!='' && document.getElementById('cboDialInLocation').value!='') {
        var opt = document.createElement("option");
        opt.text=document.getElementById('txtDialInParticipants').value + ' Participant(s) In ' + document.getElementById('cboDialInLocation').value;
        opt.value=document.getElementById('txtDialInParticipants').value + ' Participant(s) In ' + document.getElementById('cboDialInLocation').value;
        document.getElementById('cboInParticipants').options.add(opt);  
        document.getElementById('txtDialInParticipants').value='';
    }
  
  } 
  function removeDialinParticipant() {
    if(document.getElementById('cboInParticipants').selectedIndex>=0) {
      document.getElementById('cboInParticipants').remove(document.getElementById('cboInParticipants').selectedIndex);
    }
  
  }
  
  function addDialoutParticipant() {

    if(document.getElementById('txtOutParticipantName').value!='' && document.getElementById('txtOutParticipantPhone1').value!='') {
        var opt = document.createElement("option");
        opt.text='Name: ' + document.getElementById('txtOutParticipantName').value + ' / Phone: ' + document.getElementById('txtOutParticipantPhone1').value + ', Ext:' + document.getElementById('txtPhoneOutParticipantExt').value;
        opt.value='Name: ' + document.getElementById('txtOutParticipantName').value + ' / Phone: ' + document.getElementById('txtOutParticipantPhone1').value + ', Ext:' +  document.getElementById('txtPhoneOutParticipantExt').value;
        document.getElementById('cboOutParticipants').options.add(opt);  
        document.getElementById('txtOutParticipantName').value='';
        document.getElementById('txtOutParticipantPhone1').value='';
        document.getElementById('txtPhoneOutParticipantExt').value='';
    }
  
  } 
  function removeDialoutParticipant() {
    if(document.getElementById('cboOutParticipants').selectedIndex>=0) {
      document.getElementById('cboOutParticipants').remove(document.getElementById('cboOutParticipants').selectedIndex);
    }
  
  }
  
  function addSpeaker() {

    if(document.getElementById('txtSpeakerName').value!='' && document.getElementById('txtSpeakerPhone1').value!='' && (document.getElementById('rdoDialoutYes').checked==true || document.getElementById('rdoDialoutNo').checked==true)) {
        var opt = document.createElement("option");
        opt.text='Name: ' + document.getElementById('txtSpeakerName').value + ' / Phone: ' + document.getElementById('txtSpeakerPhone1').value + ', Ext: ' +  document.getElementById('txtPhoneSpeakerExt').value + ' / Dial Out: ';
        if(document.getElementById('rdoDialoutYes').checked==true) {
          opt.text+='Yes';
        } else if(document.getElementById('rdoDialoutNo').checked==true) {
          opt.text+='No';
        } else {
          opt.text+='Unanswered';
        }
        opt.value='Name: ' + document.getElementById('txtSpeakerName').value + ' / Phone: ' + document.getElementById('txtSpeakerPhone1').value + ', Ext: ' +  document.getElementById('txtPhoneSpeakerExt').value + ' / Dial Out: ';
        if(document.getElementById('rdoDialoutYes').checked==true) {
          opt.value+='Yes';
        } else if(document.getElementById('rdoDialoutNo').checked==true) {
          opt.value+='No';
        } else {
          opt.value+='Unanswered';
        }
        document.getElementById('cboSpeakers').options.add(opt);  
    }
    document.getElementById('txtSpeakerName').value='';
    document.getElementById('txtSpeakerPhone1').value='';
    document.getElementById('txtPhoneSpeakerExt').value='';
  
  } 
  function removeSpeaker() {
    if(document.getElementById('cboSpeakers').selectedIndex>=0) {
      document.getElementById('cboSpeakers').remove(document.getElementById('cboSpeakers').selectedIndex);
    }
  
  }
  
  

