/*******************************************************************************
* TripPlanner.js
* 
* @package arrive
* @author Preston McMurry (prestonm3@mcmurry.com)
* @version 2.0
* @copyright (C) Copyright 2008 by McMurry, Inc.
*
*******************************************************************************/

function load() {

    /*
    ** If the browser has Flash installed, and the version is a high enough
    ** number, present the fancy Flash map. Otherwise default to the simple
    ** .gif/.jpg map.
    */
    var flash_file = "media/system/StaticMedia/";

    if ( document.getElementById('FlashMapSwitch').value == 1 ) {
        flash_file += document.getElementById('FlashMapCity').value;
    } else {
        flash_file += document.getElementById('FlashMapInitial').value;
    }
        
    var Flasher = new FlashSwapper(
                6, //version - version of flash required, required
                flash_file, // fileName - the flash movie filename, required
                'MapContainer', //containerId - the ID of the element that we'll be swapping out, required.
                'myMovieName', //id - the id of the movie itself, optional.
                495, //width - movie width, optional
                287, //height - movie height, optional
                'high', //quality - movie quality, optional (low|medium|high)
                'transparent' //wmode - window mode, optional (window|opaque|transparent), requires at least version 6.
            );

    Flasher.Swap();

    /*
    ** Recent versions of IE -- as of mid-2006 -- wrap a border around the Flash,
    ** forcing the user to make an extra click to access the Flash, before being
    ** able to actually click on some action item within the Flash. This solution
    ** removes that unnecessary click.
    */
    objEmbedList = document.getElementsByTagName("embed"); 
    
    for (var i = 0; i < objEmbedList.length; i++) { 
        objEmbedList[i].outerHTML = objEmbedList[i].outerHTML; 
    }
}

