var MM_contentVersion = 4;
var MM_FlashCanPlay=false;
 
function show_map(c) {
  document.images['imgWorldMap'].src = '../images/locations/WM_' + c + '.gif';
}

function check_flash()
{
 	var plugin = navigator.plugins ; 
    if ( plugin )
    {
       if(navigator.plugins["Shockwave Flash"])//flash (version>2) in plugins
		{
			var flashDescription = navigator.plugins["Shockwave Flash"].description;         
			// A flash plugin-description looks like this: Shockwave Flash 4.0 r5
			// We can get the major version by grabbing the character before the period
			// note that we don't bother with minor version detection. 
			// Do that in your movie with $version or getVersion().
			var MM_PluginVersion = parseInt(flashDescription.substring(16));       
			MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
		} 
	}
}

//if ie on windows, check activeX object
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('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion )))\n');
		document.write('</SCR' + 'IPT\> \n'); //break the tag so the javascript not end
}
else
{
    //check plugin array
	check_flash();
}



//based on the check result, output flash or alternative gif files
// DJJ CA MERGE 2004203, added culture parameter to create_world_map
function create_world_map( culture )
{
// In this section we set up the content to be placed dynamically on the page.
// Customize movie tags and alternate html content below.
    var session=document.resForm["flashmap_paramRockValue"].value;
	if ( MM_FlashCanPlay )
	{
		//embed the flash file
  		var oeTags = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			    + 'WIDTH="408" HEIGHT="195"'
			    + 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			    + '<PARAM name="movie" value="/images/locations/worldmap_' + culture + '.swf">'
			    + '<PARAM name="wmode" value="transparent">'
			    + '<PARAM name="quality" value="high">'
			    + '<PARAM name="BGCOLOR" value="#f3f8fe">'    			  
			    + '<PARAM name="FlashVars" value='
			    + '"'
			    + session
			    +'"'
			    + '>'
			     + '<EMBED SRC="/images/locations/worldmap_' + culture + '.swf"'
			    + 'WIDTH="408" HEIGHT="195"'
			    + 'runat="server"'
			    + 'wmode="transparent"'			 
			    + 'QUALITY="high"'
			    + 'bgcolor="#f3f8fe"'
			    + 'FlashVars='
			    + '"'
			    + session
			    + '"'
			    + 'TYPE="application/x-shockwave-flash"'    
			    + 'PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">'
			    + '<\/EMBED>'
			    +  '<noembed>'
			    +  '<img src="/images/locations/WM_default_' + culture + '.gif"'
			    +  'width="408" height="195"'
			    +   'usemap="#WM_default" style="border-style:none" id="imgWorldMap">'
			    +  '<\/noembed>'
			    + '<\/OBJECT>';
		document.write(oeTags);   // embed the flash movie
	}
	else
	{
          
		// flash is too old or we can't detect the plugin
	    // NOTE: height, width are required!
	    var alternateContent = '<IMG SRC="/images/locations/WM_Default_' + culture + '.gif" WIDTH="408" HEIGHT="195"'
                                    + 'usemap="#WM_default" style="border-style:none"'
                                    + 'id="imgWorldMap"  >';
                                
 
	    document.write(alternateContent);  // insert non-flash content
	}
}

function create_header_flash()
{
	//display either the best-rate-guarantee flash banner or standard banner within the page header
	if ( MM_FlashCanPlay )
	{
		//browser supports and can play flash; embed the flash file
  		var oeTags = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			    + 'WIDTH="321" HEIGHT="73"'
			    + 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			    + '<PARAM name="movie" value="/images/bestrateguarantee/brg_banner_flash.swf">'
			    + '<PARAM name="quality" value="high">'
			    + '<EMBED SRC="/images/bestrateguarantee/brg_banner_flash.swf" WIDTH="321" HEIGHT="73" RUNAT="server" QUALITY="high" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"><\/EMBED>'
			    + '<NOEMBED><img src="/images/bestrateguarantee/brg_banner.jpg" width="321" height="73"><\/NOEMBED>'
			    + '<\/OBJECT>';
			    
		//embed the flash movie
		document.write(oeTags);
	}
	else
	{
		//flash is too old or we can't detect the plugin; embed the standard image (height and width required)
	    var alternateContent = '<a href="/bestrateguarantee/brg.aspx"><IMG ALT="Best Rate Guarantee" SRC="/images/bestrateguarantee/brg_banner.jpg" WIDTH="321 HEIGHT="70" BORDER="0"></a>';
	    
	    //embed the standard image
	    document.write(alternateContent);
	}
}

function create_TRlogo_flash()
{
   
	//display either the Top Right Logo flash movie or standard image within the page header
	if ( MM_FlashCanPlay )
	{
		//browser supports and can play flash; embed the flash file
  		var oeTags = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			    + 'WIDTH="159" HEIGHT="73"'
			    + 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			    + '<PARAM name="movie" value="/images/smallanimatedlogo.swf">'
			    + '<PARAM name="quality" value="high">'
			    + '<EMBED SRC="/images/smallanimatedlogo.swf" WIDTH="159" HEIGHT="73" RUNAT="server" QUALITY="high" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"><\/EMBED>'
			    + '<NOEMBED><img src="/images/dollar.com_logo.gif" width="159" height="73"><\/NOEMBED>'
			    + '<\/OBJECT>';
			    
		//embed the flash movie
		document.write(oeTags);
	}
	else
	{
		//flash is too old or we can't detect the plugin; embed the standard image (height and width required)
	    var alternateContent = '<a href="/index.aspx"><IMG ALT="Find the right auto rental for you with Dollar Rent A Car." SRC="/images/dollar.com_logo.gif" WIDTH="159" HEIGHT="73" BORDER="0"></a>';
	    
	    //embed the standard image
	    document.write(alternateContent);
	}
}
function create_StyleSeries()
{
   	//display either the Top Right Logo flash movie or standard image within the page header
	if ( MM_FlashCanPlay )
	{
		//browser supports and can play flash; embed the flash file
  		var oeTags = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			    + 'WIDTH="375" HEIGHT="125"'
			    + 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			    + '<PARAM name="movie" value="/images/DlrFlaHome.swf">'
			    + '<PARAM name="quality" value="high">'
			    + '<EMBED SRC="/images/DlrFlaHome.swf" WIDTH="375" HEIGHT="125" RUNAT="server" QUALITY="high" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"><\/EMBED>'
			    + '<NOEMBED><img src="/Images/BDisplay/dollar_4business_370.gif" width="375" height="125"><\/NOEMBED>'
			    + '<\/OBJECT>';
			    
		//embed the flash movie
		document.write(oeTags);
	}
	else
	{
		//flash is too old or we can't detect the plugin; embed the standard image (height and width required)
	    var alternateContent = '<a href="/index.aspx"><IMG ALT="" SRC="/Images/BDisplay/dollar_4business_370.gif" WIDTH="375" HEIGHT="125" BORDER="0"></a>';
	    
	    //embed the standard image
	    document.write(alternateContent);
	}
}

