
/*
Macromedia(r) Flash(r) JavaScript Integration Kit License


Copyright (c) 2005 Macromedia, inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment:

"This product includes software developed by Macromedia, Inc.
(http://www.macromedia.com)."

Alternately, this acknowledgment may appear in the software itself, if and
wherever such third-party acknowledgments normally appear.

4. The name Macromedia must not be used to endorse or promote products derived
from this software without prior written permission. For written permission,
please contact devrelations@macromedia.com.

5. Products derived from this software may not be called "Macromedia" or
"Macromedia Flash", nor may "Macromedia" or "Macromedia Flash" appear in their
name.

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MACROMEDIA OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

--

This code is part of the Flash / JavaScript Integration Kit:
http://www.macromedia.com/go/flashjavascript/

Created by:

Christian Cantrell
http://weblogs.macromedia.com/cantrell/
mailto:cantrell@macromedia.com

Mike Chambers
http://weblogs.macromedia.com/mesh/
mailto:mesh@macromedia.com

Macromedia
*/

/**
 * Create a new Exception object.
 * name: The name of the exception.
 * message: The exception message.
 */
function Exception(name, message)
{
    if (name)
        this.name = name;
    if (message)
        this.message = message;
}

/**
 * Set the name of the exception. 
 */
Exception.prototype.setName = function(name)
{
    this.name = name;
}

/**
 * Get the exception's name. 
 */
Exception.prototype.getName = function()
{
    return this.name;
}

/**
 * Set a message on the exception. 
 */
Exception.prototype.setMessage = function(msg)
{
    this.message = msg;
}

/**
 * Get the exception message. 
 */
Exception.prototype.getMessage = function()
{
    return this.message;
}

/**
 * Generates a browser-specific Flash tag. Create a new instance, set whatever
 * properties you need, then call either toString() to get the tag as a string, or
 * call write() to write the tag out.
 */

/**
 * Creates a new instance of the FlashTag.
 * src: The path to the SWF file.
 * width: The width of your Flash content.
 * height: the height of your Flash content.
 */
function FlashTag(src, width, height)
{
    this.src       = src;
    this.width     = width;
    this.height    = height;
    this.version   = '7,0,14,0';
    this.id        = null;
    this.bgcolor   = 'ffffff';
    this.flashVars = null;
}

/**
 * Sets the Flash version used in the Flash tag.
 */
FlashTag.prototype.setVersion = function(v)
{
    this.version = v;
}

/**
 * Sets the ID used in the Flash tag.
 */
FlashTag.prototype.setId = function(id)
{
    this.id = id;
}

/**
 * Sets the background color used in the Flash tag.
 */
FlashTag.prototype.setBgcolor = function(bgc)
{
    this.bgcolor = bgc;
}

/**
 * Sets any variables to be passed into the Flash content. 
 */
FlashTag.prototype.setFlashvars = function(fv)
{
    this.flashVars = fv;
}

/**
 * Get the Flash tag as a string. 
 */
FlashTag.prototype.toString = function()
{
    var ie = (navigator.appName.indexOf ("Microsoft") != -1) ? 1 : 0;
    var flashTag = new String();
    if (ie)
    {
        flashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        if (this.id != null)
        {
            flashTag += 'id="'+this.id+'" ';
        }
        flashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version+'" ';
        flashTag += 'width="'+this.width+'" ';
        flashTag += 'height="'+this.height+'">';
        flashTag += '<param name="movie" value="'+this.src+'"/>';
        flashTag += '<param name="quality" value="high"/>';
        flashTag += '<param name="bgcolor" value="#'+this.bgcolor+'"/>';
        if (this.flashVars != null)
        {
            flashTag += '<param name="flashvars" value="'+this.flashVars+'"/>';
        }
        flashTag += '</object>';
    }
    else
    {
        flashTag += '<embed src="'+this.src+'" ';
        flashTag += 'quality="high" '; 
        flashTag += 'bgcolor="#'+this.bgcolor+'" ';
        flashTag += 'width="'+this.width+'" ';
        flashTag += 'height="'+this.height+'" ';
        flashTag += 'type="application/x-shockwave-flash" ';
        if (this.flashVars != null)
        {
            flashTag += 'flashvars="'+this.flashVars+'" ';
        }
        if (this.id != null)
        {
            flashTag += 'name="'+this.id+'" ';
        }
        flashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        flashTag += '</embed>';
    }
    return flashTag;
}

/**
 * Write the Flash tag out. Pass in a reference to the document to write to. 
 */
FlashTag.prototype.write = function(doc)
{
    doc.write(this.toString());
}

/**
 * The FlashSerializer serializes JavaScript variables of types object, array, string,
 * number, date, boolean, null or undefined into XML. 
 */

/**
 * Create a new instance of the FlashSerializer.
 * useCdata: Whether strings should be treated as character data. If false, strings are simply XML encoded.
 */
function FlashSerializer(useCdata)
{
    this.useCdata = useCdata;
}

/**
 * Serialize an array into a format that can be deserialized in Flash. Supported data types are object,
 * array, string, number, date, boolean, null, and undefined. Returns a string of serialized data.
 */
FlashSerializer.prototype.serialize = function(args)
{
    var qs = new String();

    for (var i = 0; i < args.length; ++i)
    {
        switch(typeof(args[i]))
        {
            case 'undefined':
                qs += 't'+(i)+'=undf';
                break;
            case 'string':
                qs += 't'+(i)+'=str&d'+(i)+'='+escape(args[i]);
                break;
            case 'number':
                qs += 't'+(i)+'=num&d'+(i)+'='+escape(args[i]);
                break;
            case 'boolean':
                qs += 't'+(i)+'=bool&d'+(i)+'='+escape(args[i]);
                break;
            case 'object':
                if (args[i] == null)
                {
                    qs += 't'+(i)+'=null';
                }
                else if (args[i] instanceof Date)
                {
                    qs += 't'+(i)+'=date&d'+(i)+'='+escape(args[i].getTime());
                }
                else // array or object
                {
                    try
                    {
                        qs += 't'+(i)+'=xser&d'+(i)+'='+escape(this._serializeXML(args[i]));
                    }
                    catch (exception)
                    {
                        throw new Exception("FlashSerializationException",
                                            "The following error occurred during complex object serialization: " + exception.getMessage());
                    }
                }
                break;
            default:
                throw new Exception("FlashSerializationException",
                                    "You can only serialize strings, numbers, booleans, dates, objects, arrays, nulls, and undefined.");
        }

        if (i != (args.length - 1))
        {
            qs += '&';
        }
    }

    return qs;
}

/**
 * Private
 */
FlashSerializer.prototype._serializeXML = function(obj)
{
    var doc = new Object();
    doc.xml = '<fp>'; 
    this._serializeNode(obj, doc, null);
    doc.xml += '</fp>'; 
    return doc.xml;
}

/**
 * Private
 */
FlashSerializer.prototype._serializeNode = function(obj, doc, name)
{
    switch(typeof(obj))
    {
        case 'undefined':
            doc.xml += '<undf'+this._addName(name)+'/>';
            break;
        case 'string':
            doc.xml += '<str'+this._addName(name)+'>'+this._escapeXml(obj)+'</str>';
            break;
        case 'number':
            doc.xml += '<num'+this._addName(name)+'>'+obj+'</num>';
            break;
        case 'boolean':
            doc.xml += '<bool'+this._addName(name)+' val="'+obj+'"/>';
            break;
        case 'object':
            if (obj == null)
            {
                doc.xml += '<null'+this._addName(name)+'/>';
            }
            else if (obj instanceof Date)
            {
                doc.xml += '<date'+this._addName(name)+'>'+obj.getTime()+'</date>';
            }
            else if (obj instanceof Array)
            {
                doc.xml += '<array'+this._addName(name)+'>';
                for (var i = 0; i < obj.length; ++i)
                {
                    this._serializeNode(obj[i], doc, null);
                }
                doc.xml += '</array>';
            }
            else
            {
                doc.xml += '<obj'+this._addName(name)+'>';
                for (var n in obj)
                {
                    if (typeof(obj[n]) == 'function')
                        continue;
                    this._serializeNode(obj[n], doc, n);
                }
                doc.xml += '</obj>';
            }
            break;
        default:
            throw new Exception("FlashSerializationException",
                                "You can only serialize strings, numbers, booleans, objects, dates, arrays, nulls and undefined");
            break;
    }
}

/**
 * Private
 */
FlashSerializer.prototype._addName= function(name)
{
    if (name != null)
    {
        return ' name="'+name+'"';
    }
    return '';
}

/**
 * Private
 */
FlashSerializer.prototype._escapeXml = function(str)
{
    if (this.useCdata)
        return '<![CDATA['+str+']]>';
    else
        return str.replace(/&/g,'&amp;').replace(/</g,'&lt;');
}

/**
 * The FlashProxy object is what proxies function calls between JavaScript and Flash.
 * It handles all argument serialization issues.
 */

/**
 * Instantiates a new FlashProxy object. Pass in a uniqueID and the name (including the path)
 * of the Flash proxy SWF. The ID is the same ID that needs to be passed into your Flash content as lcId.
 */
function FlashProxy(uid, proxySwfName)
{
    this.uid = uid;
    this.proxySwfName = proxySwfName;
    this.flashSerializer = new FlashSerializer(false);
}

/**
 * Call a function in your Flash content.  Arguments should be:
 * 1. ActionScript function name to call,
 * 2. any number of additional arguments of type object,
 *    array, string, number, boolean, date, null, or undefined. 
 */
FlashProxy.prototype.call = function()
{

    if (arguments.length == 0)
    {
        throw new Exception("Flash Proxy Exception",
                            "The first argument should be the function name followed by any number of additional arguments.");
    }

    var qs = 'lcId=' + escape(this.uid) + '&functionName=' + escape(arguments[0]);

    if (arguments.length > 1)
    {
        var justArgs = new Array();
        for (var i = 1; i < arguments.length; ++i)
        {
            justArgs.push(arguments[i]);
        }
        qs += ('&' + this.flashSerializer.serialize(justArgs));
    }

    var divName = '_flash_proxy_' + this.uid;
    if(!document.getElementById(divName))
    {
        var newTarget = document.createElement("div");
        newTarget.id = divName;
        document.body.appendChild(newTarget);
    }
    var target = document.getElementById(divName);
    var ft = new FlashTag(this.proxySwfName, 1, 1);
    ft.setVersion('6,0,65,0');
    ft.setFlashvars(qs);
    target.innerHTML = ft.toString();
}

/**
 * This is the function that proxies function calls from Flash to JavaScript.
 * It is called implicitly.
 */
FlashProxy.callJS = function()
{
    var functionToCall = eval(arguments[0]);
    var argArray = new Array();
    for (var i = 1; i < arguments.length; ++i)
    {
        argArray.push(arguments[i]);
    }
    try {
				//alert('bar');
			//functionToCall.apply(functionToCall, argArray);
			eval(arguments[0]+"()");
		} catch(e) {
					eval(arguments[0]+"(" + argArray.toString() + ")");
		}
}



/**
 * FlashObject v1.2.3: Flash detection and embed - http://blog.deconcept.com/flashobject/
 *
 * FlashObject is (c) 2005 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof com == "undefined") var com = new Object();
if(typeof com.deconcept == "undefined") com.deconcept = new Object();
if(typeof com.deconcept.util == "undefined") com.deconcept.util = new Object();
if(typeof com.deconcept.FlashObjectUtil == "undefined") com.deconcept.FlashObjectUtil = new Object();
com.deconcept.FlashObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, redirectUrl, detectKey){
   this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
   this.skipDetect = com.deconcept.util.getRequestParameter(this.DETECT_KEY);
   this.params = new Object();
   this.variables = new Object();
   this.attributes = new Array();

   if(swf) this.setAttribute('swf', swf);
   if(id) this.setAttribute('id', id);
   if(w) this.setAttribute('width', w);
   if(h) this.setAttribute('height', h);
   if(ver) this.setAttribute('version', new com.deconcept.PlayerVersion(ver.toString().split(".")));
   if(c) this.addParam('bgcolor', c);
   var q = quality ? quality : 'high';
   this.addParam('quality', q);
   this.setAttribute('redirectUrl', '');
   if(redirectUrl) this.setAttribute('redirectUrl', redirectUrl);
   if(useExpressInstall) {
   // check to see if we need to do an express install
   var expressInstallReqVer = new com.deconcept.PlayerVersion([6,0,65]);
   var installedVer = com.deconcept.FlashObjectUtil.getPlayerVersion();
      if (installedVer.versionIsValid(expressInstallReqVer) && !installedVer.versionIsValid(this.getAttribute('version'))) {
         this.setAttribute('doExpressInstall', true);
      }
   } else {
      this.setAttribute('doExpressInstall', false);
   }
}
com.deconcept.FlashObject.prototype.setAttribute = function(name, value){
	this.attributes[name] = value;
}
com.deconcept.FlashObject.prototype.getAttribute = function(name){
	return this.attributes[name];
}
com.deconcept.FlashObject.prototype.getAttributes = function(){
	return this.attributes;
}
com.deconcept.FlashObject.prototype.addParam = function(name, value){
	this.params[name] = value;
}
com.deconcept.FlashObject.prototype.getParams = function(){
	return this.params;
}
com.deconcept.FlashObject.prototype.getParam = function(name){
	return this.params[name];
}
com.deconcept.FlashObject.prototype.addVariable = function(name, value){
	this.variables[name] = value;
}
com.deconcept.FlashObject.prototype.getVariable = function(name){
	return this.variables[name];
}
com.deconcept.FlashObject.prototype.getVariables = function(){
	return this.variables;
}
com.deconcept.FlashObject.prototype.getParamTags = function(){
   var paramTags = ""; var key; var params = this.getParams();
   for(key in params) {
        paramTags += '<param name="' + key + '" value="' + params[key] + '" />';
    }
   return paramTags;
}
com.deconcept.FlashObject.prototype.getVariablePairs = function(){
	var variablePairs = new Array();
	var key;
	var variables = this.getVariables();
	for(key in variables){
		variablePairs.push(key +"="+ variables[key]);
	}
	return variablePairs;
}
com.deconcept.FlashObject.prototype.getHTML = function() {
    var flashHTML = "";
    if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
        if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
        flashHTML += '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') + '" name="'+ this.getAttribute('id') +'"';
		var params = this.getParams();
        for(var key in params){ flashHTML += ' '+ key +'="'+ params[key] +'"'; }
		pairs = this.getVariablePairs().join("&");
        if (pairs.length > 0){ flashHTML += ' flashvars="'+ pairs +'"'; }
        flashHTML += '></embed>';
    } else { // PC IE
        if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
        flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') +'">';
        flashHTML += '<param name="movie" value="' + this.getAttribute('swf') + '" />';
		var tags = this.getParamTags();
        if(tags.length > 0){ flashHTML += tags; }
		var pairs = this.getVariablePairs().join("&");
        if(pairs.length > 0){ flashHTML += '<param name="flashvars" value="'+ pairs +'" />'; }
        flashHTML += '</object>';
    }
    return flashHTML;
}
com.deconcept.FlashObject.prototype.write = function(elementId){
	if(this.skipDetect || this.getAttribute('doExpressInstall') || com.deconcept.FlashObjectUtil.getPlayerVersion().versionIsValid(this.getAttribute('version'))){
		if(document.getElementById){
		   if (this.getAttribute('doExpressInstall')) {
		      this.addVariable("MMredirectURL", escape(window.location));
		      document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		      this.addVariable("MMdoctitle", document.title);
		   }
			document.getElementById(elementId).innerHTML = this.getHTML();
		}
	}else{
		if(this.getAttribute('redirectUrl') != "") {
			document.location.replace(this.getAttribute('redirectUrl'));
		}
	}
}
/* ---- detection functions ---- */
com.deconcept.FlashObjectUtil.getPlayerVersion = function(){
   var PlayerVersion = new com.deconcept.PlayerVersion(0,0,0);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (window.ActiveXObject){
	   try {
   	   var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
   		PlayerVersion = new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
	   } catch (e) {}
	}
	return PlayerVersion;
}
com.deconcept.PlayerVersion = function(arrVersion){
	this.major = parseInt(arrVersion[0]) || 0;
	this.minor = parseInt(arrVersion[1]) || 0;
	this.rev = parseInt(arrVersion[2]) || 0;
}
com.deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
com.deconcept.util.getRequestParameter = function(param){
	var q = document.location.search || document.location.href.hash;
	if(q){
		var startIndex = q.indexOf(param +"=");
		var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
		if (q.length > 1 && startIndex > -1) {
			return q.substring(q.indexOf("=", startIndex)+1, endIndex);
		}
	}
	return "";
}

/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use / backwards compatibility */
var getQueryParamValue = com.deconcept.util.getRequestParameter;
var FlashObject = com.deconcept.FlashObject;


// Popup Windows
function popup (url,width,height,name) {
	var w = window.open (url,name,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=" + width + ",height=" + height);
	w.focus();
}
// Rollovers
function preload(name,dir) {
	eval(
		name + "_on = new Image();" + 
		name + "_on.src = \"" + dir + name + "_on.gif\";" + 
		name + "_off = new Image();" + 
		name + "_off.src = \"" + dir + name + "_off.gif\";"
	);
}
function loadImage(name, img) {
	if (document.images) {
		document.images[name].src = img.src;
	}
}

function loadNavImage(name, img) {
	document.getElementById(name).src = img;
}

function drawNav() {
	currentUrl = window.location.toString();
	
	var navMusicVideos = "/i/navMusicVideos.gif";
	var navShortFeatures = "/i/navShortFeatures.gif";
	var navFeatureFilms = "/i/navFeatureFilms.gif";
	var navTelevision = "/i/navTelevision.gif";
	var navCrew = "/i/navCrew.gif";
	var navEvents = "/i/navEvents.gif";
	var navContact = "/i/navContact.gif";
	
	//Determine active buttons
	if (currentUrl.search(/music_videos/i) != -1) {
		navMusicVideos = navMusicVideos.replace(/\.gif/i, "-over.gif");
	}
	if (currentUrl.search(/shorts/i) != -1) {
		navShortFeatures = navShortFeatures.replace(/\.gif/i, "-over.gif");
	}
	if (currentUrl.search(/features/i) != -1) {
		navFeatureFilms = navFeatureFilms.replace(/\.gif/i, "-over.gif");
	}
	if (currentUrl.search(/television/i) != -1) {
		navTelevision = navTelevision.replace(/\.gif/i, "-over.gif");
	}
	if (currentUrl.search(/crew/i) != -1) {
		navCrew = navCrew.replace(/\.gif/i, "-over.gif");
	}
	if (currentUrl.search(/events/i) != -1) {
		navEvents = navEvents.replace(/\.gif/i, "-over.gif");
	}
	if (currentUrl.search(/contact/i) != -1) {
		navContact = navContact.replace(/\.gif/i, "-over.gif");
	}
	
document.write('<table id="navTable" width="877" height="117" border="0" cellpadding="0" cellspacing="0">');
document.write('<tr><td rowspan="4"><img src="/i/navLogo.gif" width="222" height="116" alt="EPI"></td><td colspan="13"><img src="/i/navExt01.gif" width="655" height="47" alt=""></td></tr>');
document.write('<tr><td colspan="5" rowspan="2"><img src="/i/navExt02.gif" width="340" height="39" alt=""></td>');
document.write('<td><a href="/crew/index.html" onmouseover="loadNavImage(\'navCrew\', \'/i/navCrew-over.gif\'); return true;" onmouseout="loadNavImage(\'navCrew\', \''+navCrew+'\'); return true;"><img id="navCrew" src="'+navCrew+'" width="84" height="22" border="0" alt="Our Crew"></a></td>');
document.write('<td rowspan="2"><img src="/i/navExt03.gif" width="7" height="39" alt=""></td>');
document.write('<td colspan="3"><a href="/events/index.html" onmouseover="loadNavImage(\'navEvents\', \'/i/navEvents-over.gif\'); return true;" onmouseout="loadNavImage(\'navEvents\', \''+navEvents+'\'); return true;"><img id="navEvents" src="'+navEvents+'" width="66" height="22" border="0" alt="Events"></a></td>');
document.write('<td rowspan="2"><img src="/i/navExt04.gif" width="7" height="39" alt=""></td>');
document.write('<td><a href="/contact/index.html" onmouseover="loadNavImage(\'navContact\', \'/i/navContact-over.gif\'); return true;" onmouseout="loadNavImage(\'navContact\', \''+navContact+'\'); return true;"><img id="navContact" src="'+navContact+'" width="98" height="22" border="0" alt="Contact Us"></a></td>');
document.write('<td rowspan="3"><img src="/i/NavExt05.gif" width="53" height="69" alt=""></td></tr>');
document.write('<tr><td><img src="/i/navExt06.gif" width="84" height="17" alt=""></td><td colspan="3"><img src="/i/navExt07.gif" width="66" height="17" alt=""></td>');
document.write('<td><img src="/i/navExt08.gif" width="98" height="17" alt=""></td></tr>');
document.write('<tr><td><a href="javascript:" onmouseover="dropdownmenu(this, event, menu1, \'248px\');loadNavImage(\'navMusicVideos\', \'/i/navMusicVideos-over.gif\'); return true;" onmouseout="delayhidemenu();loadNavImage(\'navMusicVideos\', \''+navMusicVideos+'\'); return true;"><img id="navMusicVideos" src="'+navMusicVideos+'" width="142" height="30" border="0" alt="Music Videos"></a></td>');
document.write('<td><img src="/i/navExt09.gif" width="9" height="30" alt=""></td>');
document.write('<td><a href="javascript:" onmouseover="dropdownmenu(this, event, menu2, \'218px\');loadNavImage(\'navShortFeatures\', \'/i/navShortFeatures-over.gif\'); return true;" onmouseout="delayhidemenu();loadNavImage(\'navShortFeatures\', \''+navShortFeatures+'\'); return true;"><img id="navShortFeatures" src="'+navShortFeatures+'" width="166" height="30" border="0" alt="Short Features"></a></td>');
document.write('<td><img src="/i/navExt10.gif" width="8" height="30" alt=""></td>');
document.write('<td colspan="4"><a href="javascript:" onmouseover="dropdownmenu(this, event, menu3, \'154px\');loadNavImage(\'navFeatureFilms\', \'/i/navFeatureFilms-over.gif\'); return true;" onmouseout="delayhidemenu();loadNavImage(\'navFeatureFilms\', \''+navFeatureFilms+'\'); return true;"><img id="navFeatureFilms" src="'+navFeatureFilms+'" width="154" height="30" border="0" alt="Feature Films"></a></td>');
document.write('<td><img src="/i/navExt11.gif" width="9" height="30" alt=""></td>');
document.write('<td colspan="3"><a href="javascript:" onmouseover="dropdownmenu(this, event, menu4, \'154px\');loadNavImage(\'navTelevision\', \'/i/navTelevision-over.gif\'); return true;" onmouseout="delayhidemenu();loadNavImage(\'navTelevision\', \''+navTelevision+'\'); return true;"><img id="navTelevision" src="'+navTelevision+'" width="114" height="30" border="0" alt="Television"></a></td></tr>');
document.write('<tr><td><img src="/i/spacer.gif" width="222" height="1" alt=""></td><td><img src="/i/spacer.gif" width="142" height="1" alt=""></td><td><img src="/i/spacer.gif" width="9" height="1" alt=""></td><td><img src="/i/spacer.gif" width="166" height="1" alt=""></td><td><img src="/i/spacer.gif" width="8" height="1" alt=""></td><td><img src="/i/spacer.gif" width="15" height="1" alt=""></td><td><img src="/i/spacer.gif" width="84" height="1" alt=""></td><td><img src="/i/spacer.gif" width="7" height="1" alt=""></td><td><img src="/i/spacer.gif" width="48" height="1" alt=""></td><td><img src="/i/spacer.gif" width="9" height="1" alt=""></td><td><img src="/i/spacer.gif" width="9" height="1" alt=""></td><td><img src="/i/spacer.gif" width="7" height="1" alt=""></td><td><img src="/i/spacer.gif" width="98" height="1" alt=""></td><td><img src="/i/spacer.gif" width="53" height="1" alt=""></td></tr>');
document.write('</table>');
}

function drawFooter() {
	document.write('<table cellpadding="0" cellspacing="0" border="0" align="center">');
	document.write('<tr>');
	document.write('<td><img src="/i/s.gif" width="8" height="8" alt="" border="0" /></td>');
//	document.write('<td class="footer"><a href="/index.html">Home</a> | <a href="/music_videos/index.html">Music Videos</a> | <a href="/features/index.html">Feature Films</a> | <a href="/shorts/index.html">Short Features</a> | <a href="/television/index.html">Television</a> | <a href="/crew/index.html">Crew</a> | <a href="/events/index.html">Events</a> | <a href="/contact/index.html">Contact Us</a></td>');
	document.write('<td class="footer"><a href="/index.html">Home</a> | <a href="/crew/index.html">Crew</a> | <a href="/events/index.html">Events</a> | <a href="/contact/index.html">Contact Us</a></td>');
	document.write('<td><img src="/i/s.gif" width="5" height="1" alt="" border="0" /></td>');
	document.write('</tr>');
	document.write('</table>');
}

/***********************************************
* AnyLink Drop Down Menu- � Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
var menu2=new Array()
var menu3=new Array()
var menu4=new Array()

//menu1[0]='<a href="/music_videos/mikomarks.html">Mama - <i>Miko Marks</i></a>';
menu1[0]='<div id="menu100" class="flashMenu" onMouseover="clearhidemenu()" onMouseout="delayhidemenu()"></div>';
menu1[1]='menu1Flash()';

function menu1Flash() {
var fo = new FlashObject("/navMenu.swf?xmlSource=/musicNav.xml", "menu100Flash", "250", "126", "6", "");
	fo.addParam("allowScriptAccess", "sameDomain");
	fo.addParam("flashVars", "lcId=" + lcId);
	fo.write("menu100");
	fo = null;
	delete(fo);
	
}


menu2[0]='<div id="menu200" class="flashMenu" onMouseover="clearhidemenu()" onMouseout="delayhidemenu()"></div>';
menu2[1]='menu2Flash();';


function menu2Flash() {
var fo = new FlashObject("/navMenu.swf?xmlSource=/shortsNav.xml", "menu200Flash", "250", "216", "6", "");
	fo.addParam("allowScriptAccess", "sameDomain");
	fo.addParam("flashVars", "lcId=" + lcId);
	fo.write("menu200");
	fo = null;
	delete(fo);

}


menu3[0]='<div id="menu300" class="flashMenu" onMouseover="delayhidemenu()"></div>';
menu3[1]='menu3Flash();';

function menu3Flash() {
var fo = new FlashObject("/navMenu.swf?xmlSource=/featuresNav.xml", "menu300Flash", "250", "36", "6", "");
	fo.addParam("allowScriptAccess", "sameDomain");
	fo.addParam("flashVars", "lcId=" + lcId);
	fo.write("menu300");
	fo = null;
	delete(fo);
}

menu4[0]='<div id="menu400" class="flashMenu" onMouseover="clearhidemenu()" onMouseout="delayhidemenu()"></div>';
menu4[1]='menu4Flash();';

function menu4Flash() {
var fo = new FlashObject("/navMenu.swf?xmlSource=/televisionNav.xml", "menu400Flash", "250", "72", "6", "");
	fo.addParam("allowScriptAccess", "sameDomain");
	fo.addParam("flashVars", "lcId=" + lcId);
	fo.write("menu400");
	fo = null;
	delete(fo);
}

var menuwidth='250px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=550  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6) document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout=""></div>')

function getposOffset(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
	if (ie4||ns6) {
		dropmenuobj.style.left=dropmenuobj.style.top="-500px"
	}
	
	if (menuwidth!="") {
		dropmenuobj.widthobj=dropmenuobj.style
		dropmenuobj.widthobj.width=menuwidth
	}
	
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") {
		obj.visibility=visible
	} else if (e.type=="click") {
		obj.visibility=hidden
	}
}

function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
	var edgeoffset=0
	if (whichedge=="rightedge"){
		var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
		dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
		if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure) {
			edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
		}
	} else {
		var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
		var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
			edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
			if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
				edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
		}
	}
	return edgeoffset
}

function populatemenu(what) {
	if (ie4||ns6) {
		dropmenuobj.innerHTML = "";
		for(i=0; i < what.length-1; i++) {
			dropmenuobj.innerHTML += what[i];
		}
		
		//alert(what[what.length-1]);
		
		eval(what[what.length-1]);
	}
}


function dropdownmenu(obj, e, menucontents, menuwidth){
	if (window.event) {
		event.cancelBubble=true
	}	else if (e.stopPropagation) { 
		e.stopPropagation()
	}
	if (document.getElementById('movie')) {
		//document.getElementById('movie').style.visibility="hidden";
		flashProxy.call('pauseMovie');
	}
	
	
	clearhidemenu()
	dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
	populatemenu(menucontents)
	
	if (ie4||ns6){
		showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
		var safariHack = 0;
		if (navigator.userAgent.search("Safari") != -1) {
			safariHack = 5;
		}
		dropmenuobj.x=getposOffset(obj, "left")
		dropmenuobj.y=getposOffset(obj, "top")
		dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")-40+"px"
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+safariHack+1+"px"
	}
	
	

	return clickreturnvalue()
}

function clickreturnvalue(){
	if (ie4||ns6) {
		return false
	} else {
		return true
	}
}

function contains_ns6(a, b) {
	while (b.parentNode) {
		if ((b = b.parentNode) == a) {
			return true;
		}
	}
	return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
	if (typeof dropmenuobj!="undefined") {
		if (ie4||ns6) {
			dropmenuobj.style.visibility="hidden"
		}
	}
	if (document.getElementById('movie')) {
		//document.getElementById('movie').style.visibility="visible";
		flashProxy.call('playMovie');

	}

}

function delayhidemenu() {
	if (ie4||ns6) {
		delayhide=setTimeout("hidemenu()",disappeardelay)
	}
}

function clearhidemenu(){
	if (typeof delayhide!="undefined") {
		clearTimeout(delayhide);
	} 
}

if (hidemenu_onclick=="yes") {
	document.onclick=hidemenu
}

var lcId = new Date().getTime();

var flashProxy = new FlashProxy(lcId, '/swf/JavaScriptFlashGateway.swf');
