function showFlashMovie()
{
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
   document.write('        codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=5,0,0,0"');
   document.write('        width="677"');
   document.write('        height="464"');
   document.write('        id="home_main">');
   document.write('   <param name="allowScriptAccess" value="sameDomain"/>');
   document.write('   <param name="movie" value="res/flash/header1.swf"/>');
   document.write('   <param name="quality" value="high"/>');
   document.write('   <param name="wmode" value="transparent"/>');
   document.write('   <embed src="res/flash/header1.swf"');
   document.write('          quality="high"');
   document.write('          wmode="transparent"');
   document.write('          width="677"');
   document.write('          height="464"');
   document.write('          name="home_main"');
   document.write('          allowScriptAccess="sameDomain"');
   document.write('          type="application/x-shockwave-flash"');
   document.write('          pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
   document.write('</object>');
}

function showCorporateFlashMovie()
{
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
   document.write('        codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=5,0,0,0"');
   document.write('        width="677"');
   document.write('        height="464"');
   document.write('        id="home_main">');
   document.write('   <param name="allowScriptAccess" value="sameDomain"/>');
   document.write('   <param name="movie" value="res/flash/header1.swf"/>');
   document.write('   <param name="quality" value="high"/>');
   document.write('   <param name="wmode" value="transparent"/>');
   document.write('   <embed src="res/flash/header1.swf"');
   document.write('          quality="high"');
   document.write('          wmode="transparent"');
   document.write('          width="677"');
   document.write('          height="464"');
   document.write('          name="home_main"');
   document.write('          allowScriptAccess="sameDomain"');
   document.write('          type="application/x-shockwave-flash"');
   document.write('          pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
   document.write('</object>');
}

         function setAction(form)
         {
             var hotelname = form.hotelname;
             form.action = hotelname[hotelname.selectedIndex].value;
         }

         //]]>

function setOptions(o)
{ 
document.searchForm.hotelname.options.length = 0;
if (o == "0") 
{ 
document.searchForm.hotelname.options[0] = new Option('', '', true, false); 
} 
if (o == "1") //mesa
{ 
document.searchForm.hotelname.options[0] = new Option('Westgate Painted Mountain Country Club', 'https://secure.netbookerng.com/hotels/westgate/paintedmountainresort/mesa/AZ/US/hseoptx_UZ/hseoid_3249526', true, true); 
} 
if (o == "2") //central fl
{ 
document.searchForm.hotelname.options[0] = new Option('Select Your Resort', '', true, false); 
document.searchForm.hotelname.options[1] = new Option('Westgate Blue Tree', 'https://secure.netbookerng.com/hotels/westgate/bluetreeatlakebuenavista/orlando/FL/US/hseoptx_UZ/hseoid_3249508', false, false); 
document.searchForm.hotelname.options[2] = new Option('Harbour Beach Resort', 'https://secure.netbookerng.com/hotels/westgate/daytonabeach/FL/US/hseoptx_UZ/hseoid_3249510', false, false);
document.searchForm.hotelname.options[3] = new Option('Westgate Lakes Resort & Spa', 'https://secure.netbookerng.com/hotels/westgate/lakesresortandspa/orlando/FL/US/hseoptx_UZ/hseoid_3249524', false, false);
document.searchForm.hotelname.options[4] = new Option('Westgate Leisure Resort', 'https://secure.netbookerng.com/hotels/westgate/leisureresort/orlando/FL/US/hseoptx_UZ/hseoid_3249505', false, false);
document.searchForm.hotelname.options[5] = new Option('Westgate Palace', 'https://secure.netbookerng.com/hotels/westgate/palace/orlando/FL/US/hseoptx_UZ/hseoid_3249527', false, false); 
document.searchForm.hotelname.options[6] = new Option('Westgate River Ranch', 'https://secure.netbookerng.com/hotels/westgate/riverranch/FL/US/hseoptx_UZ/hseoid_3249529', false, false); 
document.searchForm.hotelname.options[7] = new Option('Westgate Towers', 'https://secure.netbookerng.com/hotels/westgate/towers/kissimmee/FL/US/hseoptx_UZ/hseoid_3249532', false, false);
document.searchForm.hotelname.options[8] = new Option('Westgate Vacation Villas', 'https://secure.netbookerng.com/hotels/westgate/vacationvillas/kissimmee/FL/US/hseoptx_UZ/hseoid_3249546', false, false);    
} 
if (o == "3") //south fl
{ 
document.searchForm.hotelname.options[0] = new Option('Westgate South Beach', 'https://secure.netbookerng.com/hotels/westgate/southbeach/FL/US/hseoptx_UZ/hseoid_3249531', true, true);    
}
if (o == "4") //branson mo
{ 
document.searchForm.hotelname.options[0] = new Option('Select Your Resort', '', true, false);
document.searchForm.hotelname.options[1] = new Option('Westgate Branson Woods', 'https://secure.netbookerng.com/hotels/westgate/bransonwoodsresortandcabins/branson/MO/US/hseoptx_UZ/hseoid_3249509', false, false);    
document.searchForm.hotelname.options[2] = new Option('Westgate Branson Lakes at Emerald Pointe', 'https://secure.netbookerng.com/hotels/westgate/emeraldpointeresort/hollister/MO/US/hseoptx_UZ/hseoid_3249511', false, false);     
}
if (o == "5") //robinsville
{ 
document.searchForm.hotelname.options[0] = new Option('Westgate Tunica', 'https://secure.netbookerng.com/hotels/westgate/tunicaresort/robinsonville/MI/US/hseoptx_UZ/hseoid_3249545', true, true);    
}
if (o == "6") //vegas
{ 
document.searchForm.hotelname.options[0] = new Option('Westgate Flamingo Bay at Las Vegas', 'https://secure.netbookerng.com/hotels/westgate/flamingobay/lasvegas/NV/US/hseoptx_UZ/hseoid_4829509', true, true);    
}
if (o == "7") //vegas
{ 
document.searchForm.hotelname.options[0] = new Option('Westgate Myrtle Beach Resort & Spa', 'https://secure.netbookerng.com/hotels/westgate/myrtlebeachoceanfront/myrtlebeach/FL/US/hseoptx_UZ/hseoid_3249525', true, true);    
} 
if (o == "8") //vegas
{ 
document.searchForm.hotelname.options[0] = new Option('Select Your Resort', '', true, false);
document.searchForm.hotelname.options[1] = new Option('River Terrace Resort', 'https://secure.netbookerng.com/hotels/westgate/riverterraceresort/gatlinburg/TN/US/hseoptx_UZ/hseoid_3249506', false, false);    
document.searchForm.hotelname.options[2] = new Option('Westgate Smoky Mountain Resort & Spa', 'https://secure.netbookerng.com/hotels/westgate/smokymountainresort/gatlinburg/TN/US/hseoptx_UZ/hseoid_3249530', false, false);     
}
if (o == "9") //vegas
{ 
document.searchForm.hotelname.options[0] = new Option('Westgate Park City Resort & Spa', 'https://secure.netbookerng.com/hotels/westgate/parkcityresortandspa/parkcity/UT/US/hseoptx_UZ/hseoid_3249528', true, true);    
}
if (o == "10") //vegas
{ 
document.searchForm.hotelname.options[0] = new Option('Westgate Historic Williamsburg', 'https://secure.netbookerng.com/hotels/westgate/historicwilliamsburg/williamsburg/VI/US/hseoptx_UZ/hseoid_3249523', true, true);    
}       
}
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('Please select a resort and your travel dates before searching');
    document.MM_returnValue = (errors == '');
} } 
var bestFlashVersion = 8;
         var corporateFlashVersion = 7;
         var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

         if ( plugin )
         {
            var words = navigator.plugins["Shockwave Flash"].description.split(" ");
            for (var i = 0; i < words.length; ++i)
            {
               if (isNaN(parseInt(words[i])))
               continue;
               var PluginVersion = words[i];
            }

            var playBestFlashVersion = PluginVersion >= bestFlashVersion;
            var playCorporateFlashVersion = PluginVersion >= corporateFlashVersion;
         }
         else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1))
         {
            document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
            document.write('on error resume next \n');
            document.write('playBestFlashVersion = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & bestFlashVersion)))\n');
            document.write('playCorporateFlashVersion = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & corporateFlashVersion)))\n');
            document.write('</SCR' + 'IPT\> \n');
         }

         if ( playBestFlashVersion )
         {
           showFlashMovie();
         }
         else if ( playCorporateFlashVersion )
         {
           showCorporateFlashMovie();
         }
         else
         {
            document.write('<a href="http://get.adobe.com/flashplayer/"><img src="res/images/noflash.jpg" width="677" height="464" border="0" alt="get flash player" /></a>');
         }
			
			
               
         