var emailRegex = /^[\w-_\.]{1,}@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$/
function SubmitEmail() {
    if (!emailRegex.test(document.forms.param.email.value)) {
        alert("Please enter a valid email address.");
    } else {
        document.forms.param.submit();
    } //else
}

//Email Signup code moved from Main Template for SEO Project
var emailRegex = /^[\w-_\.]{1,}@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$/
function SubmitNewsletter() {
    if (!emailRegex.test(document.forms.Form1.NewsletterEmail.value)) {
        alert("Please enter a valid email address.");
    } else {
        document.forms.EmailLabsForm.email.value = document.forms.Form1.NewsletterEmail.value;
        document.forms.EmailLabsForm.submit();
    } //else
}

  var browser = navigator.appName + ' ' + parseFloat(navigator.appVersion);

  function ShortDate()
  {
     var today = new Date();
     var year = today.getYear();
     var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
     if(year<1000)
         year+=1900;
     document.write(months[today.getMonth()] + " " + today.getDate() + ", " + (year+""));
  }
 function ImageWindow(iSrc,width,height,alt,caption)
 {
    var win = null;
    var isHeight = height;
    var isWidth = width;
    var iHeight = parseInt(height)+100;
    var iWidth = parseInt(width)+40;
    if (iWidth < 420)
        iWidth = 420;
    if (win != null)
        win.document.clear();
    if (win)
        win.resizeTo(iWidth,iHeight);
    else
        win = window.open("about:blank","","width="+iWidth+",height=" +iHeight+ ",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no,left=100,top=100");
  with (win.document)
  {
    open();
    writeln("<html><head><title>"+caption+"</title><link href=\"screen.css\" rel=\"stylesheet\" type=\"text/css\"></"+"head>");
    writeln("<" + "body style=\"background-color:#D5CAB7;margin:0;padding:0;text-align:center;}\"><div class=\"popup\">");
    writeln("<div class=\"clear\"></div><div class=\"closewindow\"><a href=\"javascript:void();\" onclick=\"self.close();\">close window</a></div>");
    writeln("<h1><img src=\""+iSrc+"\" width=\""+isWidth+"\" height=\""+isHeight+"\" alt=\""+alt+"\" class=\"hero\"></h1>");
    writeln("<div class=\"primary\"><div class=\"container\"><h1>"+caption+"</h1></div></div>");
    writeln("</div></body></html>");
    close();
  }
 }
 function ShowDIV(divID) {
    if (browser.indexOf("Netscape 4")==0)
    {
        if(document.layers[divID] != null)
           document.layers[divID].display="inline";
    }
    else
    {
        if(document.getElementById(divID) != null)
           document.getElementById(divID).style.display = "inline";
    }
 }
 function HideDIV(divID) {
    if (browser.indexOf("Netscape 4")==0)
    {
        if(document.layers[divID] != null)
           document.layers[divID].display="none";
    }
    else
    {
        if(document.getElementById(divID) != null) 
           document.getElementById(divID).style.display= "none";
    }
 }
 function Highlight(divID) {
    if (browser.indexOf("Netscape 4")==0)
    {
        if(document.layers[divID] != null)
            document.layers[divID].color="#FE8F00";
    }
    else
    {
        if(document.getElementById(divID) != null)
           document.getElementById(divID).style.color= "#FE8F00";    
    }
}

//var emailRegex = /^[\w-_\.]{1,}@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$/
//function emailPost(email) {
//    if (!emailRegex.test(email)) {
//        alert("Please enter a valid email address.");
//    } else {
//        document.forms.EmailLabsForm.OptinForm_txtEmailAddress1.value = email;
//        document.forms.EmailLabsForm.submit();
//    }
//}

var emailRegex = /^[\w-_\.]{1,}@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$/
function emailPost(email) {
    if (!emailRegex.test(email)) {
        alert("Please enter a valid email address.");
    } else {
        document.forms.EmailLabsForm.email.value = email;
        document.forms.EmailLabsForm.submit();
    }
}

//Reservation Flash routines

function mv_reservation(FImageWidth,FImageHeight,BPassThruURL,FFName) {
FlashImageWidth = FImageWidth;
FlashImageHeight = FImageHeight;
BookingEnginePassThruURL = BPassThruURL;
FlashFileName = FFName;

  if (navigator.appVersion.indexOf("MSIE")!=-1)
         {
             var oeTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" id="mainflash" align="middle" data="' + FlashFileName + '">'
         }
         else
         {
             var oeTags = '<object  width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" id="mainflash" align="middle" data="' + FlashFileName + '">'
         }       
 
         oeTags = oeTags
         + '<param name="allowScriptAccess" value="sameDomain" />'
         + '<param name="FlashVars" value="POSTURL=' + BookingEnginePassThruURL + '">'
         + '<param name="movie" value="' + FlashFileName + '" />'
         + '<param name="quality" value="high" />'
         + '<param name="bgcolor" value="#dbd4c2" />'
         + '<embed src="' + FlashFileName + '" quality="high" bgcolor="#ffffff" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" name="mainFlash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="POSTURL=' + BookingEnginePassThruURL + '">'
         + '</object>'
         document.write(oeTags);   // embed the flash movie

	}
	
function mv_reservation2(FImageWidth,FImageHeight,BPassThruURL,FImageAlt,FFileName,BButton,BURL,FFName,sbReserve) {
FlashImageWidth = FImageWidth;
FlashImageHeight = FImageHeight;
BookingEnginePassThruURL = BPassThruURL;
FlashImageAlt = FImageAlt;
FlashImageFileName = FFileName;
BookOnlineButton = BButton;
BookingEngineURL = BURL;
FlashFileName = FFName;
sidebar_reservations = sbReserve;
         if ( MM_FlashCanPlay ) 
         {
             //flash can play...write the object tag
             if (navigator.appVersion.indexOf("MSIE")!=-1)
             {
                 var oeTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" id="mainflash" align="middle" data="' + FlashFileName + '">'
             }
             else
             {
                 var oeTags = '<object  width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" id="mainflash" align="middle" data="' + FlashFileName + '">'
             }       
             oeTags = oeTags
                 + '<param name="allowScriptAccess" value="sameDomain" />'
                 + '<param name="FlashVars" value="POSTURL=' + BookingEnginePassThruURL + '">'
                 + '<param name="movie" value="' + FlashFileName + '" />'
                 + '<param name="quality" value="high" />'
                 + '<param name="bgcolor" value="#dbd4c2" />'
                 + '<embed src="' + FlashFileName + '" quality="high" bgcolor="#ffffff" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" name="mainFlash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="POSTURL=' + BookingEnginePassThruURL + '"/>'
                 + '</object>'

            document.write('<div class="top"><img src="' + sidebar_reservations + '" alt="Reservations" width="205" height="31" /></div>');
            document.write('<div class="content">');
            document.write('<div class="container">');

            document.write(oeTags);   // embed the flash movie

            document.write('</div>');
            document.write('</div>');
         } 
         else
         {
             //flash cannot play...kick out alternate content
             document.write('<div class="content">');
             document.write('<a href="javascript:document.doFlash.submit();"><img src="' + FlashImageFileName + '" alt="' + FlashImageAlt + '" border="0" width="205" height="222"/></a>');
             document.write('<div class="container">');
             document.write('<a href="' + BookingEngineURL + '" target="_blank"><img src="' + BookOnlineButton + '" alt="Book Online" border="0"/></a>');
             document.write('</div>');
             document.write('</div>');
         }
}

function int_flash_vars(FImageWidth,FImageHeight,FFile,BPassThruURL,PList) {
FlashImageWidth = FImageWidth;
FlashImageHeight = FImageHeight;
FlashFile = FFile;
BookingEnginePassThruURL = BPassThruURL;
PromotionList = PList;
     
 if (navigator.appVersion.indexOf("MSIE")!=-1)
         {
             var oeTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" id="mainflash" align="middle" data="' + FlashFile + '">'
         }
         else
         {
             var oeTags = '<object  width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" id="mainflash" align="middle" data="' + FlashFile + '">'
         }       
 
         oeTags = oeTags
         + '<param name="allowScriptAccess" value="sameDomain" />'
         + '<param name="FlashVars" value="POSTURL=' + BookingEnginePassThruURL + '<!IoRangeNoRedDotMode>&promoXMLLocal=' + PromotionList + '<!/IoRangeNoRedDotMode>">'
         + '<param name="movie" value="' + FlashFile + '" />'
         + '<param name="quality" value="high" />'
         + '<param name="bgcolor" value="#dbd4c2" />'
         + '<embed src="' + FlashFile + '" quality="high" bgcolor="#ffffff" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" name="mainFlash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="POSTURL=' + BookingEnginePassThruURL + '&promoXMLLocal=' + PromotionList + '">'
         + '</object>'
         document.write(oeTags);   // embed the flash movie
     
}

function load_flash_vars(FImageWidth,FImageHeight,FFile,BPassThruURL,PList,FImageAlt,FImage) {
FlashImageWidth = FImageWidth;
FlashImageHeight = FImageHeight;
FlashFile = FFile;
BookingEnginePassThruURL = BPassThruURL;
PromotionList = PList;
FlashImageAlt = FImageAlt;
FlashImage = FImage;
          if ( MM_FlashCanPlay ) 
         {
             //flash can play...write the object tag
             if (navigator.appVersion.indexOf("MSIE")!=-1)
             {
                 var oeTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" id="mainflash" align="middle" data="' + FlashFile + '">'
             }
             else
             {
                 var oeTags = '<object  width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" id="mainflash" align="middle" data="' + FlashFile + '">'
             }       
             oeTags = oeTags
                 + '<param name="allowScriptAccess" value="sameDomain" />'
                 + '<param name="FlashVars" value="POSTURL=' + BookingEnginePassThruURL + '&promoXMLLocal=' + PromotionList + '">'
                 + '<param name="movie" value="' + FlashFile + '" />'
                 + '<param name="quality" value="high" />'
                 + '<param name="bgcolor" value="#dbd4c2" />'
                 + '<embed src="' + FlashFile + '" quality="high" bgcolor="#ffffff" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" name="mainFlash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars"POSTURL=' + BookingEnginePassThruURL + '&promoXMLLocal=' + PromotionList + '"/>'
                 + '</object>'
             document.write(oeTags);   // embed the flash movie
         } 
         else
         {
             //flash cannot play...kick out alternate content
             document.write('<img src="images/' + FlashImageFileName + '" alt="' + FlashImageAlt + '" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '" border="0" usemap="#noflash" />');
         }
}
