var ver = navigator.appVersion;

if (ver.indexOf("MSIE") != -1){
    var DisplayMode = "block";
}else{
    var DisplayMode = "table-row";
}

function resetdata(){

         document.getElementById("step1").style.display = "block";
         document.getElementById("content1").style.display = "block";
         document.getElementById("expandimg1").src =  "http://www.jwindy.com/images/collapse.gif";

         document.getElementById("step2_CORP").style.display = "none";
         document.getElementById("nights_row_CORP").style.display = "none";
         document.getElementById("rooms_row_CORP").style.display = "none";
         document.getElementById("step2_EVNT").style.display = "none";
         document.getElementById("rooms_row_EVNT").style.display = "none";
         document.getElementById("step2_GENL").style.display = "none";
         document.getElementById("step3").style.display = "none";

}

function checkdatarfp(dosubmit){

        var theForm = document.rfpform;
        var emailValue = theForm.Email.value;
		if(dosubmit == true) {
                if(theForm.Name.value.length<1){
                        alert("Please enter your name.");
                        theForm.Name.focus();               
                }
                else if(theForm.Address1.value.length<1){
                        alert("Please enter your address.");
                        theForm.Address1.focus();
                }				
                 else if(theForm.City.value.length<1){
                        alert("Please enter your city.");
                        theForm.City.focus();
                }			
                 else if(theForm.State.selectedIndex == 0){
                        alert("Please select your state.");
                        theForm.State.focus();
                }
                else if(theForm.Zip.value.length<1){
                        alert("Please enter your zip code.");
                        theForm.Zip.focus();
                }				
                 else if((emailValue.indexOf( '@' ) <= 0 ) || (emailValue.indexOf('.',emailValue.indexOf('@')) <= 0 ))
                {
                        alert("Please enter a valid e-mail address.");
                        theForm.Email.focus();
                }
                 else if(theForm.AreaCode.value.length<1){
                        alert("Please enter your area code.");
                        theForm.AreaCode.focus();
                }
                 else if(theForm.Telephone1.value.length<1){
                        alert("Please enter your phone number.");
                        theForm.Telephone1.focus();
                }
                else if(theForm.Telephone2.value.length<1){
                        alert("Please enter your phone number.");
                        theForm.Telephone2.focus();
                }
				else if(theForm.ArriveDate.value.length<1){
						alert("Please enter your arrival date.");
						theForm.ArriveDate.focus();
				}
				else if(theForm.DepartDate.value.length<1){
						alert("Please enter your departure date.");
						theForm.DepartDate.focus();
				}
				else if(theForm.Attendees.value.length<1){
						alert("Please enter number of attendees.");
						theForm.Attendees.focus();
				}
				else if(theForm.SRooms.value.length<1){
						alert("Please enter number of sleeping rooms per night.");
						theForm.SRooms.focus();
				}
                else {
                        theForm.submit();
                }
        }
        else {
                showStep3();
        }
}