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.");
        return false;
    } else {
        return true;
    } //else
}


function showsubs(dropdown, type)
{
    for(var LIidx = 0; LIidx < dropdown.childNodes.length; LIidx ++)
    {
        if(dropdown.childNodes[LIidx].tagName == "UL")
        {
            var menu = dropdown.childNodes[LIidx];
            if(type == "hide")
                menu.className = "";
            else
                menu.className = "hidden";
            for(var ULidx = 0; ULidx < menu.childNodes.length; ULidx ++)
            {
                if(type == "hide")
                    menu.childNodes[ULidx].className = "hidden";
                else
                    menu.childNodes[ULidx].className = "";
            }
        }
    }
}

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:#efefce;margin:0;padding:0;text-align:center;}\">");
    writeln("<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\"><h2>"+caption+"</h2></div></div>");
    writeln("</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";    
    }
}
function ShowHide(divID, tID, aID, background) 
{
    var newState;
    var thisA = document.getElementById(aID);
        
    if (thisA.firstChild.data == '[Hide]')
    {
        newState = 'none';
        thisA.firstChild.data = '[More Info]';
    } else {
        newState = 'block';
        thisA.firstChild.data = '[Hide]';
    }
    if (document.all)  //IS IE 4 or 5 (or 6 beta)
    {
        eval( "document.all." + tID + ".style.display = '" + newState + "'");
		if(background == "on")
		{
	        eval( "document.all." + tID + ".className = 'optionalexpanded'");
		}
    }
    if (document.getElementById && !document.all) 
    {
        var theDiv = document.getElementById(tID);
        theDiv.style.display = newState;
		if(background == "on")
		{
    	    theDiv.className = "optionalexpanded";
		}
    }
}

var emailRegex = /^[\w-_\.]{1,}@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$/
function SubmitNewsletter() {
    if (!emailRegex.test(document.forms.EmailUpdatesForm.NewsletterEmail.value)) {
        alert("Please enter a valid email address.");
    } else {
        document.forms.EmailLabsForm.OptinForm_txtEmailAddress1.value = document.forms.EmailUpdatesForm.NewsletterEmail.value;
        document.forms.EmailLabsForm.submit();
    } //else
}

function mv_promosection(str1,str3){
	var promosection = str1;
	var xmlPath = str3;
	         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="175" height="256" id="mainflash" align="middle" data="' + promosection + '">'
         }
         else
         {
             var oeTags = '<object  width="175" height="256" id="mainflash" align="middle" data="' + promosection + '">'
         }       
 
         oeTags = oeTags
         + '<param name="allowScriptAccess" value="sameDomain" />'
         + '<param name="movie" value="' + promosection + '" />'
         + '<param name="quality" value="high" />'
         + '<param name="wmode" value="transparent" />'
         + '<param name="FlashVars" value="promoXMLLocal=' + xmlPath + '" />'
         + '<embed src="' + promosection + '" wmode="transparent" quality="high" width="175" height="256" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="promoXMLLocal=' + xmlPath + '">'
         + '</object>'
         document.write(oeTags);   // embed the flash movie
}


function mv_promosection2(str1,str2,str3) {
	var promosection = str1;
	var promosectionGIF = str2;
	var xmlPath = str3;
	         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="175" height="256" id="mainflash" align="middle" data="' + promosection + '">'
             }
             else
             {
                 var oeTags = '<object  width="175" height="256" id="mainflash" align="middle" data="' + promosection + '">'
             }       
     
             oeTags = oeTags
             + '<param name="allowScriptAccess" value="sameDomain" />'
             + '<param name="movie" value="' + promosection + '" />'
             + '<param name="quality" value="high" />'
             + '<param name="wmode" value="transparent" />'
             + '<param name="FlashVars" value="promoXMLLocal=' + xmlPath + '" />'             
             + '<embed src="' + promosection + '" wmode="transparent" quality="high" width="175" height="256" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="promoXMLLocal=' + xmlPath + '">'
             + '</object>'
             document.write(oeTags);   // embed the flash movie
         } 
         else
         {
             //flash cannot play...kick out alternate content
             document.write('<img src="' + promosectionGIF + '" alt="Promotional Buttons" width="175" height="256" border="0" usemap="#promos" />');
         }

}

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="wmode" value="transparent" />'
         + '<param name="quality" value="high" />'
         + '<param name="bgcolor" value="#dbd4c2" />'
         + '<embed src="' + FlashFileName + '" quality="high" bgcolor="#dbd4c2" 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) {
	
FlashImageWidth = FImageWidth;
FlashImageHeight = FImageHeight;
BookingEnginePassThruURL = BPassThruURL;
FlashImageAlt = FImageAlt;
FlashImageFileName = FFileName;
BookOnlineButton = BButton;
BookingEngineURL = BURL;
FlashFileName = FFName;
     <!--
        
         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="wmode" value="transparent" />'
                 + '<param name="quality" value="high" />'
                 + '<param name="bgcolor" value="#dbd4c2" />'
                 + '<embed src="' + FlashFileName + '" quality="high" bgcolor="#dbd4c2" 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
         }
         else
         {
             //flash cannot play...kick out alternate content
             document.write('<a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"><img src="' + FlashImageFileName + '" alt="' + FlashImageAlt + '" border="0" width="' + FlashImageWidth + '" height="' + FlashImageHeight + '"/></a>');
             document.write('<a href="' + BookingEngineURL + '" target="_blank"><img src="' + BookOnlineButton + '" alt="Book Online" border="0"/></a>');
         }
     //-->

}
function mv_flashFile(strFileName,strWidth,strHeight,strURL){
    var flashFile = strFileName;
    var flashWidth = strWidth;
    var flashHeight = strHeight;
    var flashAnchor = strURL;
             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="' + flashWidth+ '" height="' + flashHeight+ '" id="navflash" align="middle" data="' + flashFile + '" onClick="window.open(' + flashAnchor +')">'
         }
         else
         {
             var oeTags = '<object  width="' + flashWidth+ '" height="' + flashHeight+ '" id="mainflash" align="middle" data="' + flashFile + '" onClick="window.open(' + flashAnchor + ')">'
         }       
 
         oeTags = oeTags
         + '<param name="allowScriptAccess" value="sameDomain" />'
         + '<param name="FlashVars" value="POSTURL=' + flashAnchor + '">'
         + '<param name="movie" value="' + flashFile + '" />'
         + '<param name="quality" value="high" />'
         + '<param name="wmode" value="transparent" />'
         + '<embed src="' + flashFile + '" wmode="transparent" quality="high" width="' + flashWidth+ '" height="' + flashHeight+ '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="POSTURL=' + flashAnchor + '">'
             
         + '</object>'
         document.write(oeTags);   // embed the flash movie         
}
function mv_flashFile2(strFileName,strImageName,strWidth,strHeight,strImageAlt,strURL) {
    var flashFile = strFileName;
    var flashFileGIF = strImageName;
    var flashWidth = strWidth;
    var flashHeight = strHeight;
    var flashAlt = strImageAlt;
    var flashAnchor = strURL;
	 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="' + flashWidth+ '" height="' + flashHeight+ '" id="sideflash" align="middle" data="' + flashFile + '">'
	     }
	     else
	     {
		 var oeTags = '<object  width="' + flashWidth+ '" height="' + flashHeight+ '" id="mainflash" align="middle" data="' + flashFile + '">'
	     }       

	     oeTags = oeTags
	     + '<param name="allowScriptAccess" value="sameDomain" />'
	     + '<param name="FlashVars" value="POSTURL=' + flashAnchor + '">'
	     + '<param name="movie" value="' + flashFile + '" />'
	     + '<param name="quality" value="high" />'
	     + '<param name="wmode" value="transparent" />'
	     + '<embed src="' + flashFile + '" wmode="transparent" quality="high" width="' + flashWidth+ '" height="' + flashHeight+ '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="POSTURL=' + flashAnchor + '">'
	     + '</object>'
	     document.write(oeTags);   // embed the flash movie
	 } 
	 else
	 {
	     //flash cannot play...kick out alternate content
	     document.write('<img src="' + flashFileGIF + '" alt="' + flashAlt+ '" width="' + flashWidth+ '" height="' + flashHeight+ '" border="0" />');
	 }
}