// microsite.js
function LaunchPopup(url, width, height, scrollbars) {
	//intial check 
	var m_h = height;
	var m_w = width; 
	var m_sb = scrollbars; 
	try
	{ 
		if ( m_h == "") 
			throw "e";
		if ( m_w == "") 
			throw "e";
		if ( m_sb == "")
			m_sb ="yes";
		
		var _h = m_h;
		var _w = m_w;
		var _sb = m_sb;
		var _t = 80;
		var _l = 80;  
		var options = 'height=' + _h + ',width=' + _w + ',top=' + _t + ',left=' + _l + ',toolbar=no,scrollbars=' + _sb + ',status=no,location=no,menubar=no,';
		window.open(url, '', options);
	}
	catch(e)
	{
		//show full screen 
		showMain(url);
	}	
				
}
			
function showMain(URLen) {
	
	var windowNamen="mainwindow";
	var browserName=navigator.appName;
	var operatingSystem=navigator.platform;
	var version = parseFloat(navigator.appVersion);
	var winWidth = window.screen.availWidth;
	var winHeight = window.screen.availHeight;

	// Netscape check version 4.0+ on Win
	if (browserName.indexOf("Netscape")!=-1 && version>=4.0 && operatingSystem.indexOf("Mac")!=-1)
	 {
	 window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + winWidth +',height='+winHeight+',screenX=0,screenY=0,top=0,left=0,resizable=0')
	 }

	// MSIE Mac check
	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Mac")!=-1)
	 {
	 window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + winWidth +',height='+ winHeight +',screenX=0,screenY=0,top=0,left=0')
	 }

	// Netscape Mac check
	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Mac")!=-1)
	 {
	 winWidth = screen.width;
	 winHeight = screen.height;
	 window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight +',top=0,left=0');
	 }

	// MSIE Windows
	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Win")!=-1)
	 {
	 winWidth = screen.width;
	 winHeight = screen.height;
	 var win = window.open(URLen,windowNamen,'titlebar=no,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,top=0,left=0,width=' + winWidth +',height='+ winHeight +',screenX=0,screenY=0,top=0,left=0')
	 }

	// Netscape Windows
	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Win")!=-1)
	 {
	 winWidth = screen.width;
	 winHeight = screen.height;		 
	 window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight +',top=0,left=0');
	 }
	else
	 {
	  var popwin = window.open(URLen,windowNamen,'resizable=0');
	 }
	 window.winWidth = winWidth;
	 window.winHeight = winHeight;
}

function returnWindowLocationURLToFlash() { 
    return window.location.href.toString();
}
//added these from the topnav.js for errors 
function overlayTopNav()
{
    var style = document.getElementById("topNavBar").style;
    style.zIndex = 10001;
    if (IsIET() == 0)
    {
        if (document.getElementById('LeftNavContent'))
        {
            document.getElementById('LeftNavContent').style.overflow = "visible";
        }
    }
}
function IsIET()
{
	version = 0;
	if (navigator.appVersion.indexOf("MSIE") >= 0)
	{
		var temp = navigator.appVersion.split("MSIE");
		version = parseFloat(temp[1]);
	}
	return version;
}

//end of microsite.js ﻿//JavaScript to extend the gradient to the full height of the block		
function VerticalGradient()
{
    if (null != document.getElementById("NoSideNavBodyContent"))
    {
        var contentHeightNLN = document.getElementById("NoSideNavBodyContent").offsetHeight;
        var contentHeightPXNLN = document.getElementById("NoSideNavBodyContent").offsetHeight + "px";

        document.getElementById("NoSideNavBodyLeft").height = contentHeightNLN;
        document.getElementById("NoSideNavBodyLeft").style.height = contentHeightPXNLN;
        document.getElementById("NoSideNavBodyRight").height = contentHeightNLN;
        document.getElementById("NoSideNavBodyRight").style.height = contentHeightPXNLN;
    }

    if (null != document.getElementById("LeftNavContent"))
    {
        var tempHeight = document.getElementById("LeftNavContent").offsetHeight;
        if ((tempHeight < 458) && (null == document.getElementById("promoGradientIndicator")))
        {
            tempHeight = 458;
        }
        var contentHeightLN = tempHeight;
        var contentHeightPXLN = tempHeight + "px";

        document.getElementById("LeftNavBodyLeft").height = contentHeightLN;
        document.getElementById("LeftNavBodyLeft").style.height = contentHeightPXLN;
        document.getElementById("LeftNavBodyRight").height = contentHeightLN;
        document.getElementById("LeftNavBodyRight").style.height = contentHeightPXLN;
    }

    if (null != document.getElementById("LeftNavInnerContent"))
    {
        var tempHeight = document.getElementById("LeftNavInnerContent").offsetHeight;
        if ((tempHeight < 450) && (null == document.getElementById("promoGradientIndicator")))
        {
            if (null == document.getElementById("pageToolsIdentifier"))
            {
                document.getElementById("LeftNavInnerContent").className = "LeftNavInnerContentExtendedNoPageTools";
                if (null != document.getElementById("LeftNavPageToolsArea"))
                {
                    document.getElementById("LeftNavPageToolsArea").className = null;
                }
            }
            else
            {
                document.getElementById("LeftNavInnerContent").className = "LeftNavInnerContentExtendedPageTools";
                document.getElementById("LeftNavPageToolsArea").className = "LeftNavPageToolsAreaSpaced";
            }
        }
        else
        {
            if (null == document.getElementById("pageToolsIdentifier"))
            {
                document.getElementById("LeftNavInnerContent").className = null;
                if (null != document.getElementById("LeftNavPageToolsArea"))
                {
                    document.getElementById("LeftNavPageToolsArea").className = null;
                }
            }
            else
            {
                document.getElementById("LeftNavInnerContent").className = "LeftNavInnerContentPageTools";
                document.getElementById("LeftNavPageToolsArea").className = "LeftNavPageToolsAreaSpaced";
            }
        }
    }

    if (null != document.getElementById("LeftNavPageToolsArea"))
    {
        if (null != document.getElementById("pageToolsIdentifier"))
        {
            document.getElementById("LeftNavPageToolsArea").className = "LeftNavPageToolsAreaSpaced";
        }
        else
        {
            document.getElementById("LeftNavPageToolsArea").className = null;
        }
    }

    if (null != document.getElementById("FSPromoLeftNavContent"))
    {
        var tempHeight = document.getElementById("FSPromoLeftNavContent").offsetHeight;
        if (tempHeight < 458)
        {
            tempHeight = 458;
        }
        var contentHeightLN = tempHeight;
        var contentHeightPXLN = tempHeight + "px";

        document.getElementById("FSPromoLeftNavBodyLeft").height = contentHeightLN;
        document.getElementById("FSPromoLeftNavBodyLeft").style.height = contentHeightPXLN;
        document.getElementById("FSPromoLeftNavBodyRight").height = contentHeightLN;
        document.getElementById("FSPromoLeftNavBodyRight").style.height = contentHeightPXLN;
    }
}

//Method to pop-up a new window
function PopUpWindow(url, name, popheight, popwidth, scrollbars)
{
    var wintop = (window.screen.availHeight - popheight) / 4;
    var winleft = (window.screen.availWidth - popwidth) / 2;
    window.open(url, name, 'height=' + popheight + ',width=' + popwidth + ',top=' + wintop + ',left=' + winleft + ',toolbar=no,scrollbars=' + scrollbars + ',status=no,location=no,menubar=no');
}

function StartupGradient()
{
    VerticalGradient();
}

addLoadEvent(StartupGradient);

function addLoadEvent(func)
{
    var oldonload = window.onload;
    if (typeof window.onload != 'function')
    {
        window.onload = func;
    } else
    {
        window.onload = function()
        {
            oldonload();
            func();
        }
    }
}
//end of Gradient.js
//v1.1
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AX_RunContent(){
  var ret = AC_AX_GetArgs(arguments);
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_AX_GetArgs(args){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "pluginspage":
      case "type":
      case "src":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "data":
      case "codebase":
      case "classid":
      case "id":
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  return ret;
}
//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, "", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
//SWFObject v2.0 <http://code.google.com/p/swfobject/>
var swfobject = function() { var Z = "undefined", P = "object", B = "Shockwave Flash", h = "ShockwaveFlash.ShockwaveFlash", W = "application/x-shockwave-flash", K = "SWFObjectExprInst", G = window, g = document, N = navigator, f = [], H = [], Q = null, L = null, T = null, S = false, C = false; var a = function() { var l = typeof g.getElementById != Z && typeof g.getElementsByTagName != Z && typeof g.createElement != Z && typeof g.appendChild != Z && typeof g.replaceChild != Z && typeof g.removeChild != Z && typeof g.cloneNode != Z, t = [0, 0, 0], n = null; if (typeof N.plugins != Z && typeof N.plugins[B] == P) { n = N.plugins[B].description; if (n) { n = n.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); t[0] = parseInt(n.replace(/^(.*)\..*$/, "$1"), 10); t[1] = parseInt(n.replace(/^.*\.(.*)\s.*$/, "$1"), 10); t[2] = /r/.test(n) ? parseInt(n.replace(/^.*r(.*)$/, "$1"), 10) : 0 } } else { if (typeof G.ActiveXObject != Z) { var o = null, s = false; try { o = new ActiveXObject(h + ".7") } catch (k) { try { o = new ActiveXObject(h + ".6"); t = [6, 0, 21]; o.AllowScriptAccess = "always" } catch (k) { if (t[0] == 6) { s = true } } if (!s) { try { o = new ActiveXObject(h) } catch (k) { } } } if (!s && o) { try { n = o.GetVariable("$version"); if (n) { n = n.split(" ")[1].split(","); t = [parseInt(n[0], 10), parseInt(n[1], 10), parseInt(n[2], 10)] } } catch (k) { } } } } var v = N.userAgent.toLowerCase(), j = N.platform.toLowerCase(), r = /webkit/.test(v) ? parseFloat(v.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, i = false, q = j ? /win/.test(j) : /win/.test(v), m = j ? /mac/.test(j) : /mac/.test(v); /*@cc_oni = true; @if(@_win32)q = true; @elif(@_mac)m=true;@end@*/return { w3cdom: l, pv: t, webkit: r, ie: i, win: q, mac: m} } (); var e = function() { if (!a.w3cdom) { return } J(I); if (a.ie && a.win) { try { g.write("<script id=__ie_ondomload defer=true src=//:><\/script>"); var i = c("__ie_ondomload"); if (i) { i.onreadystatechange = function() { if (this.readyState == "complete") { this.parentNode.removeChild(this); V() } } } } catch (j) { } } if (a.webkit && typeof g.readyState != Z) { Q = setInterval(function() { if (/loaded|complete/.test(g.readyState)) { V() } }, 10) } if (typeof g.addEventListener != Z) { g.addEventListener("DOMContentLoaded", V, null) } M(V) } (); function V() { if (S) { return } if (a.ie && a.win) { var m = Y("span"); try { var l = g.getElementsByTagName("body")[0].appendChild(m); l.parentNode.removeChild(l) } catch (n) { return } } S = true; if (Q) { clearInterval(Q); Q = null } var j = f.length; for (var k = 0; k < j; k++) { f[k]() } } function J(i) { if (S) { i() } else { f[f.length] = i } } function M(j) { if (typeof G.addEventListener != Z) { G.addEventListener("load", j, false) } else { if (typeof g.addEventListener != Z) { g.addEventListener("load", j, false) } else { if (typeof G.attachEvent != Z) { G.attachEvent("onload", j) } else { if (typeof G.onload == "function") { var i = G.onload; G.onload = function() { i(); j() } } else { G.onload = j } } } } } function I() { var l = H.length; for (var j = 0; j < l; j++) { var m = H[j].id; if (a.pv[0] > 0) { var k = c(m); if (k) { H[j].width = k.getAttribute("width") ? k.getAttribute("width") : "0"; H[j].height = k.getAttribute("height") ? k.getAttribute("height") : "0"; if (O(H[j].swfVersion)) { if (a.webkit && a.webkit < 312) { U(k) } X(m, true) } else { if (H[j].expressInstall && !C && O("6.0.65") && (a.win || a.mac)) { D(H[j]) } else { d(k) } } } } else { X(m, true) } } } function U(m) { var k = m.getElementsByTagName(P)[0]; if (k) { var p = Y("embed"), r = k.attributes; if (r) { var o = r.length; for (var n = 0; n < o; n++) { if (r[n].nodeName.toLowerCase() == "data") { p.setAttribute("src", r[n].nodeValue) } else { p.setAttribute(r[n].nodeName, r[n].nodeValue) } } } var q = k.childNodes; if (q) { var s = q.length; for (var l = 0; l < s; l++) { if (q[l].nodeType == 1 && q[l].nodeName.toLowerCase() == "param") { p.setAttribute(q[l].getAttribute("name"), q[l].getAttribute("value")) } } } m.parentNode.replaceChild(p, m) } } function F(i) { if (a.ie && a.win && O("8.0.0")) { G.attachEvent("onunload", function() { var k = c(i); if (k) { for (var j in k) { if (typeof k[j] == "function") { k[j] = function() { } } } k.parentNode.removeChild(k) } }) } } function D(j) { C = true; var o = c(j.id); if (o) { if (j.altContentId) { var l = c(j.altContentId); if (l) { L = l; T = j.altContentId } } else { L = b(o) } if (!(/%$/.test(j.width)) && parseInt(j.width, 10) < 310) { j.width = "310" } if (!(/%$/.test(j.height)) && parseInt(j.height, 10) < 137) { j.height = "137" } g.title = g.title.slice(0, 47) + " - Flash Player Installation"; var n = a.ie && a.win ? "ActiveX" : "PlugIn", k = g.title, m = "MMredirectURL=" + G.location + "&MMplayerType=" + n + "&MMdoctitle=" + k, p = j.id; if (a.ie && a.win && o.readyState != 4) { var i = Y("div"); p += "SWFObjectNew"; i.setAttribute("id", p); o.parentNode.insertBefore(i, o); o.style.display = "none"; G.attachEvent("onload", function() { o.parentNode.removeChild(o) }) } R({ data: j.expressInstall, id: K, width: j.width, height: j.height }, { flashvars: m }, p) } } function d(j) { if (a.ie && a.win && j.readyState != 4) { var i = Y("div"); j.parentNode.insertBefore(i, j); i.parentNode.replaceChild(b(j), i); j.style.display = "none"; G.attachEvent("onload", function() { j.parentNode.removeChild(j) }) } else { j.parentNode.replaceChild(b(j), j) } } function b(n) { var m = Y("div"); if (a.win && a.ie) { m.innerHTML = n.innerHTML } else { var k = n.getElementsByTagName(P)[0]; if (k) { var o = k.childNodes; if (o) { var j = o.length; for (var l = 0; l < j; l++) { if (!(o[l].nodeType == 1 && o[l].nodeName.toLowerCase() == "param") && !(o[l].nodeType == 8)) { m.appendChild(o[l].cloneNode(true)) } } } } } return m } function R(AE, AC, q) { var p, t = c(q); if (typeof AE.id == Z) { AE.id = q } if (a.ie && a.win) { var AD = ""; for (var z in AE) { if (AE[z] != Object.prototype[z]) { if (z == "data") { AC.movie = AE[z] } else { if (z.toLowerCase() == "styleclass") { AD += ' class="' + AE[z] + '"' } else { if (z != "classid") { AD += " " + z + '="' + AE[z] + '"' } } } } } var AB = ""; for (var y in AC) { if (AC[y] != Object.prototype[y]) { AB += '<param name="' + y + '" value="' + AC[y] + '" />' } } t.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + AD + ">" + AB + "</object>"; F(AE.id); p = c(AE.id) } else { if (a.webkit && a.webkit < 312) { var AA = Y("embed"); AA.setAttribute("type", W); for (var x in AE) { if (AE[x] != Object.prototype[x]) { if (x == "data") { AA.setAttribute("src", AE[x]) } else { if (x.toLowerCase() == "styleclass") { AA.setAttribute("class", AE[x]) } else { if (x != "classid") { AA.setAttribute(x, AE[x]) } } } } } for (var w in AC) { if (AC[w] != Object.prototype[w]) { if (w != "movie") { AA.setAttribute(w, AC[w]) } } } t.parentNode.replaceChild(AA, t); p = AA } else { var s = Y(P); s.setAttribute("type", W); for (var v in AE) { if (AE[v] != Object.prototype[v]) { if (v.toLowerCase() == "styleclass") { s.setAttribute("class", AE[v]) } else { if (v != "classid") { s.setAttribute(v, AE[v]) } } } } for (var u in AC) { if (AC[u] != Object.prototype[u] && u != "movie") { E(s, u, AC[u]) } } t.parentNode.replaceChild(s, t); p = s } } return p } function E(k, i, j) { var l = Y("param"); l.setAttribute("name", i); l.setAttribute("value", j); k.appendChild(l) } function c(i) { return g.getElementById(i) } function Y(i) { return g.createElement(i) } function O(k) { var j = a.pv, i = k.split("."); i[0] = parseInt(i[0], 10); i[1] = parseInt(i[1], 10); i[2] = parseInt(i[2], 10); return (j[0] > i[0] || (j[0] == i[0] && j[1] > i[1]) || (j[0] == i[0] && j[1] == i[1] && j[2] >= i[2])) ? true : false } function A(m, j) { if (a.ie && a.mac) { return } var l = g.getElementsByTagName("head")[0], k = Y("style"); k.setAttribute("type", "text/css"); k.setAttribute("media", "screen"); if (!(a.ie && a.win) && typeof g.createTextNode != Z) { k.appendChild(g.createTextNode(m + " {" + j + "}")) } l.appendChild(k); if (a.ie && a.win && typeof g.styleSheets != Z && g.styleSheets.length > 0) { var i = g.styleSheets[g.styleSheets.length - 1]; if (typeof i.addRule == P) { i.addRule(m, j) } } } function X(k, i) { var j = i ? "visible" : "hidden"; if (S) { c(k).style.visibility = j } else { A("#" + k, "visibility:" + j) } } return { registerObject: function(l, i, k) { if (!a.w3cdom || !l || !i) { return } var j = {}; j.id = l; j.swfVersion = i; j.expressInstall = k ? k : false; H[H.length] = j; X(l, false) }, getObjectById: function(l) { var i = null; if (a.w3cdom && S) { var j = c(l); if (j) { var k = j.getElementsByTagName(P)[0]; if (!k || (k && typeof j.SetVariable != Z)) { i = j } else { if (typeof k.SetVariable != Z) { i = k } } } } return i }, embedSWF: function(n, u, r, t, j, m, k, p, s) { if (!a.w3cdom || !n || !u || !r || !t || !j) { return } r += ""; t += ""; if (O(j)) { X(u, false); var q = (typeof s == P) ? s : {}; q.data = n; q.width = r; q.height = t; var o = (typeof p == P) ? p : {}; if (typeof k == P) { for (var l in k) { if (k[l] != Object.prototype[l]) { if (typeof o.flashvars != Z) { o.flashvars += "&" + l + "=" + k[l] } else { o.flashvars = l + "=" + k[l] } } } } J(function() { R(q, o, u); if (q.id == u) { X(u, true) } }) } else { if (m && !C && O("6.0.65") && (a.win || a.mac)) { X(u, false); J(function() { var i = {}; i.id = i.altContentId = u; i.width = r; i.height = t; i.expressInstall = m; D(i) }) } } }, getFlashPlayerVersion: function() { return { major: a.pv[0], minor: a.pv[1], release: a.pv[2]} }, hasFlashPlayerVersion: O, createSWF: function(k, j, i) { if (a.w3cdom && S) { return R(k, j, i) } else { return undefined } }, createCSS: function(j, i) { if (a.w3cdom) { A(j, i) } }, addDomLoadEvent: J, addLoadEvent: M, getQueryParamValue: function(m) { var l = g.location.search || g.location.hash; if (m == null) { return l } if (l) { var k = l.substring(1).split("&"); for (var j = 0; j < k.length; j++) { if (k[j].substring(0, k[j].indexOf("=")) == m) { return k[j].substring((k[j].indexOf("=") + 1)) } } } return "" }, expressInstallCallback: function() { if (C && L) { var i = c(K); if (i) { i.parentNode.replaceChild(L, i); if (T) { X(T, true); if (a.ie && a.win) { L.style.display = "block" } } L = null; T = null; C = false } } } } } ();
// end of swfobject2.js//SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
if (typeof deconcept == "undefined") { var deconcept = new Object(); } if (typeof deconcept.util == "undefined") { deconcept.util = new Object(); } if (typeof deconcept.SWFObjectUtil == "undefined") { deconcept.SWFObjectUtil = new Object(); } deconcept.SWFObject = function(_1, id, w, h, _5, c, _7, _8, _9, _a) { if (!document.getElementById) { return; } this.DETECT_KEY = _a ? _a : "detectflash"; this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); if (_1) { this.setAttribute("swf", _1); } if (id) { this.setAttribute("id", id); } if (w) { this.setAttribute("width", w); } if (h) { this.setAttribute("height", h); } if (_5) { this.setAttribute("version", new deconcept.PlayerVersion(_5.toString().split("."))); } this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(); if (!window.opera && document.all && this.installedVer.major > 7) { deconcept.SWFObject.doPrepUnload = true; } if (c) { this.addParam("bgcolor", c); } var q = _7 ? _7 : "high"; this.addParam("quality", q); this.setAttribute("useExpressInstall", false); this.setAttribute("doExpressInstall", false); var _c = (_8) ? _8 : window.location; this.setAttribute("xiRedirectUrl", _c); this.setAttribute("redirectUrl", ""); if (_9) { this.setAttribute("redirectUrl", _9); } }; deconcept.SWFObject.prototype = { useExpressInstall: function(_d) { this.xiSWFPath = !_d ? "expressinstall.swf" : _d; this.setAttribute("useExpressInstall", true); }, setAttribute: function(_e, _f) { this.attributes[_e] = _f; }, getAttribute: function(_10) { return this.attributes[_10]; }, addParam: function(_11, _12) { this.params[_11] = _12; }, getParams: function() { return this.params; }, addVariable: function(_13, _14) { this.variables[_13] = _14; }, getVariable: function(_15) { return this.variables[_15]; }, getVariables: function() { return this.variables; }, getVariablePairs: function() { var _16 = new Array(); var key; var _18 = this.getVariables(); for (key in _18) { _16.push(key + "=" + _18[key]); } return _16; }, getSWFHTML: function() { var _19 = ""; if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<embed type=\"application/x-shockwave-flash\" src=\"" + this.getAttribute("swf") + "\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\""; _19 += " id=\"" + this.getAttribute("id") + "\" name=\"" + this.getAttribute("id") + "\" "; var _1a = this.getParams(); for (var key in _1a) { _19 += [key] + "=\"" + _1a[key] + "\" "; } var _1c = this.getVariablePairs().join("&"); if (_1c.length > 0) { _19 += "flashvars=\"" + _1c + "\""; } _19 += "/>"; } else { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<object id=\"" + this.getAttribute("id") + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\">"; _19 += "<param name=\"movie\" value=\"" + this.getAttribute("swf") + "\" />"; var _1d = this.getParams(); for (var key in _1d) { _19 += "<param name=\"" + key + "\" value=\"" + _1d[key] + "\" />"; } var _1f = this.getVariablePairs().join("&"); if (_1f.length > 0) { _19 += "<param name=\"flashvars\" value=\"" + _1f + "\" />"; } _19 += "</object>"; } return _19; }, write: function(_20) { if (this.getAttribute("useExpressInstall")) { var _21 = new deconcept.PlayerVersion([6, 0, 65]); if (this.installedVer.versionIsValid(_21) && !this.installedVer.versionIsValid(this.getAttribute("version"))) { this.setAttribute("doExpressInstall", true); this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl"))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title); } } if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) { var n = (typeof _20 == "string") ? document.getElementById(_20) : _20; n.innerHTML = this.getSWFHTML(); return true; } else { if (this.getAttribute("redirectUrl") != "") { document.location.replace(this.getAttribute("redirectUrl")); } } return false; } }; deconcept.SWFObjectUtil.getPlayerVersion = function() { var _23 = new deconcept.PlayerVersion([0, 0, 0]); if (navigator.plugins && navigator.mimeTypes.length) { var x = navigator.plugins["Shockwave Flash"]; if (x && x.description) { _23 = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); } } else { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch (e) { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); _23 = new deconcept.PlayerVersion([6, 0, 21]); axo.AllowScriptAccess = "always"; } catch (e) { if (_23.major == 6) { return _23; } } try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch (e) { } } if (axo != null) { _23 = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); } } return _23; }; deconcept.PlayerVersion = function(_27) { this.major = _27[0] != null ? parseInt(_27[0]) : 0; this.minor = _27[1] != null ? parseInt(_27[1]) : 0; this.rev = _27[2] != null ? parseInt(_27[2]) : 0; }; 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; }; deconcept.util = { getRequestParameter: function(_29) { var q = document.location.search || document.location.hash; if (q) { var _2b = q.substring(1).split("&"); for (var i = 0; i < _2b.length; i++) { if (_2b[i].substring(0, _2b[i].indexOf("=")) == _29) { return _2b[i].substring((_2b[i].indexOf("=") + 1)); } } } return ""; } }; deconcept.SWFObjectUtil.cleanupSWFs = function() { var _2d = document.getElementsByTagName("OBJECT"); for (var i = _2d.length; i > 0; i--) { _2d[i].style.display = "none"; for (var x in _2d[i]) { if (typeof _2d[i][x] == "function") { _2d[i][x] = function() { }; } } } }; if (deconcept.SWFObject.doPrepUnload) { deconcept.SWFObjectUtil.prepUnload = function() { __flash_unloadHandler = function() { }; __flash_savedUnloadHandler = function() { }; window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs); }; window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); } if (Array.prototype.push == null) { Array.prototype.push = function(_30) { this[this.length] = _30; return this.length; }; } var getQueryParamValue = deconcept.util.getRequestParameter; var FlashObject = deconcept.SWFObject; var SWFObject = deconcept.SWFObject;
//end of swfobject v1.5// SWFFormFix v2.1.0: SWF ExternalInterface() Form Fix - http://http://www.teratechnologies.net/stevekamerman/
var EnableFullAuto	= true; 
var SWFFormFixDebug = false;
var NotLoadedWarning = true;
							
var NotLoadedMsg = "Please wait for the page to load...";
finished = false; 
timeout = 10; 
starttime = new Date().getTime();
flashObjectList = Array();
fixedList = Array();
makeFuncArr = Array();
SWFFormFixAuto2 = function(){
//alert("running...");
	if(navigator.appName.toLowerCase() != "microsoft internet explorer")return true;
	var flashObjectList = document.getElementsByTagName("object");
	for(var i=0;i<flashObjectList.length;i++){
		var obj = flashObjectList[i];
		if(obj.getAttribute('classid') == "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"){
			var id = obj.getAttribute('id');
			var alreadyfixed = false;
			for(var c=0;c<fixedList.length;c++){if(fixedList[i] == id)alreadyfixed=true;}
			if(!alreadyfixed){
				var debugtxt = '';
				for(var b in window[id]){
					if(typeof(window[id][b])=="function"){
						makeFuncArr.push(Array(obj,b));
						obj[b] = function(){
							if(NotLoadedWarning)alert(NotLoadedMsg);
							return("");
						}
					}
				}
				window[id]=obj;
				if(SWFFormFixDebug)alert("Fixed: "+id);
			}
		}
	}
	if(!finished){
		setTimeout("SWFFormFixAuto2()", 100);
	}else{
		for(var i=0;i<makeFuncArr.length;i++){
			SWFFormFix_rebuildExtFunc(makeFuncArr[i][0],makeFuncArr[i][1]);
		}
	}
	return true;
}
SWFFormFix_rebuildExtFunc = function(obj,functionName){
	eval('obj[functionName] = function(){return eval(this.CallFunction("<invoke name=\\"'+functionName+'\\" returntype=\\"javascript\\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));}');
	if(SWFFormFixDebug)alert("Rebuilt ExternalInterface() function: "+functionName);
}
SWFFormFixOnloadAppend = function() {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = function(){
			finished=true;
		}
	} else {
		window.onload = function() {
			oldonload();
			finished=true;
		}
	}
}
SWFFormFixAuto = function(){
	if(navigator.appName.toLowerCase() != "microsoft internet explorer")return true;
	var objects = document.getElementsByTagName("object");
	if(objects.length == 0) return true;
	for(i=0;i<objects.length;i++){
		if(objects[i].classid == "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"){
			window[objects[i].id] = objects[i];
		}
	}
	var out = "";
	return true;
}
SWFFormFix = function(swfname){
	if(navigator.appName.toLowerCase() != "microsoft internet explorer")return false;
	var testnodename = "SWFFormFixTESTER";
	document.write('<div id="'+testnodename+'" onclick="SWFFormFixCallback(this,\''+swfname+'\');return false;" style="display:none">&nbsp;</div>');
	document.getElementById(testnodename).onclick();
}
SWFFormFixCallback = function (obj,swfname){
	var path = document;
	var error = false;
	var testnode = obj;
	while(obj = obj.parentNode){
		if(obj.nodeName.toLowerCase() == "form"){
			if(obj.name != undefined && obj.name != null && obj.name.length > 0){
				path = path.forms[obj.name];
			}else{
				alert("Error: one of your forms does not have a name!");
				error = true;
			}
		}
	}
	testnode.parentNode.removeChild(testnode);
	if(error) return false;
	window[swfname]=path[swfname];
	return true;
}
function noCacheIE(url){
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	if(!isIE)return(url);
	var newUrl = '?';
	if(url.indexOf('?') != -1)newUrl = '&';
	var now = new Date();
	var rand = Math.random().toString().substring(2,4);
	newUrl = url+newUrl+"noCacheIE="+rand+'-'+now.getTime().toString();
	return(newUrl);
}
if(EnableFullAuto){
	SWFFormFixAuto2();
	SWFFormFixOnloadAppend();
}
//end of swfformfix2// swfutils.js
//------------------------------------------------------------------
// Created by Joel Nagy
// v 1.15
// Last Updated on Mar 5, 2009 17:33pm EST 
//------------------------------------------------------------------

// FLASH GLOBALS
var VM = 9, VN = 0, VR = 45; // VERSION MINIMUM!!!
var ExpressInstall = 'http://www.bmwusa.com/JavaScript/swfobject/expressinstall.swf';

// BROWSER DETECTIONS
var __userAgent = navigator.userAgent.toLowerCase();
function whichSafari(w) {
    w = w ? w : 0;
    var v = navigator.appVersion.toLowerCase();
    var p = v.lastIndexOf('safari/');
    var r = parseInt(v.slice(p + 7, p + 7 + 6));
    if (w > 0) {
        if (r < 500) return w == 2 ? true : false;
        else if (r < 600) return w == 3 ? true : false;
        else if (r >= 600) return w == 4 ? true : false;
    }
    if (p > 0) return true;
    return false;
}
window.safari = whichSafari();
window.safari2 = whichSafari(2);
window.safari3 = whichSafari(3);
window.ie = (document.all != null && window.opera == null);
window.ie6 = window.ie && navigator.appVersion.toLowerCase().indexOf('msie 6.') > 0;
window.macppc = __userAgent.indexOf('ppc') > 0 && __userAgent.indexOf('mac') > 0;
window.gecko = __userAgent.indexOf('gecko') > 0;

function _$(o) {
    return document.getElementById(o);
}

// FLASH LOADER
function swfload(div, swfname, swf, width, height, flashvars, params, options) {
    try {
        if (!div && !swf && !width && !height) return;
        swfname = (swfname == '' || swfname == null) ? div + 'Movie' : swfname;
        var Fv = {}, varStr = '', paramStr = '', optStr = '', attStr, verStrComma = VM + "," + VN + "," + VR + ",0", verStrDots = VM + "." + VN + "." + VR;

        if (window.ie) ExpressInstall = null;

        // Get Flash Version
        if (window.swfobject != null) { // SWFOBJECT 2.0
            Fv = swfobject.getFlashPlayerVersion();
        } else if (window.deconcept != null && !window.swfobject) { // SWFOBJECT 1.5
            var fv = deconcept.SWFObjectUtil.getPlayerVersion();
            Fv.major = fv['major'];
            Fv.minor = fv['minor'];
            Fv.release = fv['rev'];
        }

        if (!meetsFlashVer(Fv, VM, VN, VR)) { // Minimum version not met, try to load Express Install if not IE
            if (window.swfobject != null) { // SWFOBJECT 2.0
                swfobject.embedSWF(swf, swfname, width, height, verStrDots, ExpressInstall);
            } else if (window.deconcept != null && !window.swfobject) { // SWFOBJECT 1.5
                var flashobj = new SWFObject(swf, swfname, width.toString(), height.toString(), verStrDots, params['bgcolor'] ? params['bgcolor'] : "#FFFFFF");
                if (!IE) flashobj.useExpressInstall(ExpressInstall);
                window[swfname] = new Object();
                flashobj.write(div);
            }
        } else { // Embed by Hand		
            for (var flashvar in flashvars)
                varStr += flashvar + '=' + flashvars[flashvar] + '&';
            if (varStr != '')
                varStr = varStr.slice(0, varStr.length - 1)
            for (var param in params) {
                paramStr += '<param name="' + param + '" value="' + params[param] + '">';
                attStr += ' ' + param + '="' + params[param] + '"';
            }
            for (var opt in options) {
                optStr += ' ' + opt + '="' + options[opt] + '" ';
            }
            paramStr += '<param name="flashvars" value="' + varStr + '">';
            window[swfname] = new Object();
            // v3.2.1 (all but Opera 9+)
            var ieObject = ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + width + '" height="' + height + '"'; // not sure if all is needed or works, widht and height might be the issue???
            var embedTag = '<embed id="' + swfname + '" src="' + swf + '" quality="high" width="' + width + '" height="' + height + '" name="' + swfname + '"' + optStr + attStr + ' type="application/x-shockwave-flash"></embed>'; // not sure if ie needs this yet, try in 6, 7 & 8
            var ieParams = '<param name="movie" value="' + swf + '"></param>';
            var swfhtml = '<object' + (window.ie ? ieObject : '') + optStr + ' width="' + width + '" height="' + height + '" type="application/x-shockwave-flash" data="' + swf + '" id="' + swfname + '" style="visibility: visible; height: ' + height + 'px; width: ' + width + 'px;">' + paramStr + (window.ie ? ieParams : '') + (window.opera != null ? embedTag : '') + '</object>';

            var d = _$(div);
            d.innerHTML = '';
            d.innerHTML = swfhtml;
        } // ?meetsFlashVer
    } catch (e) { }
} //: swfload()

function meetsFlashVer(Fv, vm, vn, vr, ignore) {
    if (ignore == null && ((window.safari3 && meetsFlashVer(Fv, 8, 0, 22, true)) || (window.safari2 && meetsFlashVer(Fv, 9, 0, 16, true))))
        return true;
    else if (Fv.major > vm || (Fv.major >= vm && Fv.minor > vn) || (Fv.major >= vm && Fv.minor >= vn && Fv.release >= vr))
        return true;
    else
        return false;
} //: meetsFlashVer()
//end of swfutils.js
