//<!--
var snifferLoaded = 1;
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav= ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav2 = (is_nav && (is_major == 2));
var is_nav3 = (is_nav && (is_major == 3));
var is_nav4 = (is_nav && (is_major == 4));
var is_nav4up = (is_nav && (is_major >= 4));
var is_navonly= (is_nav && ((agt.indexOf(";nav") != -1) ||
(agt.indexOf("; nav") != -1)) );
var is_nav6 = (is_nav && (is_major == 5));
var is_nav6up = (is_nav && (is_major >= 5));
var is_gecko = (agt.indexOf('gecko') != -1);
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3= (is_ie && (is_major < 4));
var is_ie4= (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up= (is_ie && (is_major >= 4));
var is_ie5= (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5= (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up= (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6= (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up= (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
var is_aol = (agt.indexOf("aol") != -1);
var is_aol3= (is_aol && is_ie3);
var is_aol4= (is_aol && is_ie4);
var is_aol5= (agt.indexOf("aol 5") != -1);
var is_aol6= (agt.indexOf("aol 6") != -1);
var is_opera = (agt.indexOf("opera") != -1);
var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
var is_webtv = (agt.indexOf("webtv") != -1);
var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1));
var is_AOLTV = is_TVNavigator;
var is_hotjava = (agt.indexOf("hotjava") != -1);
var is_hotjava3 = (is_hotjava && (is_major == 3));
var is_hotjava3up = (is_hotjava && (is_major >= 3));
var is_js;
if (is_nav2 || is_ie3) is_js = 1.0;
else if (is_nav3) is_js = 1.1;
else if (is_opera5up) is_js = 1.3;
else if (is_opera) is_js = 1.1;
else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
else if (is_hotjava3up) is_js = 1.4;
else if (is_nav6 || is_gecko) is_js = 1.5;
else if (is_nav6up) is_js = 1.5;
else if (is_ie5up) is_js = 1.3
else is_js = 0.0;
var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
var is_win16 = ((agt.indexOf("win16")!=-1) ||
 (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) ||
 (agt.indexOf("windows 16-bit")!=-1) );

var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
(agt.indexOf("windows 16-bit")!=-1));

var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));
var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1));

var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
var is_win32 = (is_win95 || is_winnt || is_win98 ||
((is_major >= 4) && (navigator.platform == "Win32")) ||
(agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));

var is_os2 = ((agt.indexOf("os/2")!=-1) ||
(navigator.appVersion.indexOf("OS/2")!=-1) ||
(agt.indexOf("ibm-webexplorer")!=-1));

var is_mac= (agt.indexOf("mac")!=-1);
// hack ie5 js version for mac
if (is_mac && is_ie5up) is_js = 1.4;
var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) ||
 (agt.indexOf("68000")!=-1)));
var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) ||
(agt.indexOf("powerpc")!=-1)));

var is_sun = (agt.indexOf("sunos")!=-1);
var is_sun4= (agt.indexOf("sunos 4")!=-1);
var is_sun5= (agt.indexOf("sunos 5")!=-1);
var is_suni86= (is_sun && (agt.indexOf("i86")!=-1));
var is_irix= (agt.indexOf("irix") !=-1);// SGI
var is_irix5 = (agt.indexOf("irix 5") !=-1);
var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1));
var is_hpux= (agt.indexOf("hp-ux")!=-1);
var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1));
var is_hpux10= (is_hpux && (agt.indexOf("10.")!=-1));
var is_aix = (agt.indexOf("aix") !=-1);// IBM
var is_aix1= (agt.indexOf("aix 1") !=-1);
var is_aix2= (agt.indexOf("aix 2") !=-1);
var is_aix3= (agt.indexOf("aix 3") !=-1);
var is_aix4= (agt.indexOf("aix 4") !=-1);
var is_linux = (agt.indexOf("inux")!=-1);
var is_sco = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1);
var is_unixware = (agt.indexOf("unix_system_v")!=-1);
var is_mpras= (agt.indexOf("ncr")!=-1);
var is_reliant= (agt.indexOf("reliantunix")!=-1);
var is_dec = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) ||
 (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) ||
 (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1));
var is_sinix = (agt.indexOf("sinix")!=-1);
var is_freebsd = (agt.indexOf("freebsd")!=-1);
var is_bsd = (agt.indexOf("bsd")!=-1);
var is_unix= ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux ||
 is_sco ||is_unixware || is_mpras || is_reliant ||
 is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);

var is_vms = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1));

//--> end hide JavaScript






dynCalendar_layers= new Array();
dynCalendar_mouseoverStatus = 0;
dynCalendar_mouseX= 0;
dynCalendar_mouseY= 0;
var snifferLoaded;

function dynCalendar(objName, callbackFunc, numberYears, formName, imgDir)
{
this.today= new Date();
this.date = this.today.getDate();
this.month= this.today.getMonth();
this.year = this.today.getFullYear();

this.objName= objName;
this.formName = formName;
this.callbackFunc = callbackFunc;
this.imagesPath = imgDir;
this.layerID= 'dynCalendar_layer_' + dynCalendar_layers.length;

this.offsetX= 5;
this.offsetY= 5;

this.useMonthCombo= 1;
this.useYearCombo = 1;
this.yearComboRange = numberYears-1;

this.currentMonth = this.month;
this.currentYear= this.year;

// Public Methods
this.show= dynCalendar_show;
this.writeHTML = dynCalendar_writeHTML;
this.setOffset = dynCalendar_setOffset;
this.setOffsetX= dynCalendar_setOffsetX;
this.setOffsetY= dynCalendar_setOffsetY;
this.setImagesPath = dynCalendar_setImagesPath;
this.setMonthCombo = dynCalendar_setMonthCombo;
this.setYearCombo= dynCalendar_setYearCombo;
this.setCurrentMonth = dynCalendar_setCurrentMonth;
this.setCurrentYear= dynCalendar_setCurrentYear;
this.setYearComboRange = dynCalendar_setYearComboRange;
this._getLayer = dynCalendar_getLayer;
this._hideLayer= dynCalendar_hideLayer;
this._showLayer= dynCalendar_showLayer;
this._setLayerPosition = dynCalendar_setLayerPosition;
this._setHTML= dynCalendar_setHTML;
this._getDaysInMonth = dynCalendar_getDaysInMonth;
this._mouseover= dynCalendar_mouseover;
dynCalendar_layers[dynCalendar_layers.length] = this;
if(snifferLoaded) {
this.writeHTML();
}
}


function dynCalendar_show()
{
var month, year;
var monthnames, numdays, thisMonth, firstOfMonth;
var ret, row, i, cssClass, linkHTML, previousMonth, previousYear;
var nextMonth, nextYear, prevImgHTML, prevLinkHTML, nextImgHTML, nextLinkHTML;
var monthComboOptions, monthCombo, yearComboOptions, yearCombo, yearLink, html;
if (this.objName == 'calendarArrive') {
this.currentDay = document.forms[this.formName].fd.selectedIndex;
this.currentMonth = document.forms[this.formName].fm.selectedIndex;
this.currentYear = document.forms[this.formName].fy.options[document.forms[this.formName].fy.selectedIndex].text;
} else if (this.objName == 'calendarDepart') {
this.currentDay = document.forms[this.formName].td.selectedIndex;
this.currentMonth = document.forms[this.formName].tm.selectedIndex;
this.currentYear = document.forms[this.formName].ty.options[document.forms[this.formName].ty.selectedIndex].text;
}
this.currentMonth = month = arguments[0] != null ? arguments[0] : this.currentMonth;
this.currentYear= year= arguments[1] != null ? arguments[1] : this.currentYear;
monthnames = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
numdays= this._getDaysInMonth(month, year);
thisMonth= new Date(year, month, 1);
firstOfMonth = thisMonth.getDay();
ret = new Array(new Array());
for(i=0; i<firstOfMonth; i++){
ret[0][ret[0].length] = '<td>&nbsp;</td>';
}
row = 0;
i = 1;
while(i <= numdays){
if(ret[row].length == 7){
ret[++row] = new Array();
}
cssClass = (i == this.date && month == this.month && year == this.year) ? 'dynCalendar_today' : 'dynCalendar_day';
if(new Date(year,month,i+1) < this.today) {
linkHTML = i++;
}else if(i == this.currentDay+1) {
linkHTML = '<a class="dynlinks" href="javascript: '+ this.callbackFunc +'('+ i +', '+ (Number(month) + 1) +', '+ year +', \''+ this.objName +'\', \''+ this.formName +'\'); '+ this.objName +'._hideLayer()" onMouseOver="window.status=\''+ i +' '+ monthnames[Number(month)] +' '+ year +'\'; return true" onMouseOut="window.status=\'\'; return true"><font color=red>' + (i++) + '</font></a>';
}else{
linkHTML = '<a class="dynlinks" href="javascript: '+ this.callbackFunc +'('+ i +', '+ (Number(month) + 1) +', '+ year +', \''+ this.objName +'\', \''+ this.formName +'\'); '+ this.objName +'._hideLayer()" onMouseOver="window.status=\''+ i +' '+ monthnames[Number(month)] +' '+ year +'\'; return true" onMouseOut="window.status=\'\'; return true">' + (i++) + '</a>';
}
ret[row][ret[row].length] = '<td align="center" class="' + cssClass + '">' + linkHTML + '</td>';
}
for(i=0; i<ret.length; i++){
ret[i] = ret[i].join('\n') + '\n';
}
previousYear= thisMonth.getFullYear();
previousMonth = thisMonth.getMonth() - 1;
if(previousMonth < 0){
previousMonth = 11;
previousYear--;
}
nextYear= thisMonth.getFullYear();
nextMonth = thisMonth.getMonth() + 1;
if(nextMonth > 11){
nextMonth = 0;
nextYear++;
}
if(thisMonth > new Date(this.year,this.month,1)) {
prevImgHTML= '<img src="' + this.imagesPath + '/prev.gif" alt="' + monthnames[previousMonth] + ' ' + previousYear + '" border="0" />';
}else{
prevImgHTML= '';
}
if(previousYear >= this.year){
prevLinkHTML = '<a href="javascript: ' + this.objName + '.show(' + previousMonth + ', ' + previousYear + ')" onMouseOver="window.status=\'Previous Month\'; return true" onMouseOut="window.status=\'\'; return true">' + prevImgHTML + '</a>';
}else{
prevLinkHTML = '';
}

nextImgHTML= '<img src="' + this.imagesPath + '/next.gif" alt="' + monthnames[nextMonth] + ' ' + nextYear + '" border="0" />';
if(nextYear <= (this.year + this.yearComboRange)){
nextLinkHTML = '<a href="javascript: ' + this.objName + '.show(' + nextMonth + ', ' + nextYear + ')" onMouseOver="window.status=\'Next Month\'; return true" onMouseOut="window.status=\'\'; return true">' + nextImgHTML + '</a>';
}else{
nextLinkHTML = '';
}
if (this.useMonthCombo) {
monthComboOptions = '';
for (i=0; i<12; i++) {
selected = (i == thisMonth.getMonth() ? 'selected="selected"' : '');
monthComboOptions += '<option value="' + i + '" ' + selected + '>' + monthnames[i] + '</option>';
}
monthCombo = '<select class="dynCalendar_select" name="months" onchange="' + this.objName + '.show(this.options[this.selectedIndex].value, ' + this.objName + '.currentYear)">' + monthComboOptions + '</select>';
} else {
monthCombo = monthnames[thisMonth.getMonth()];
}
if (this.useYearCombo) {
yearComboOptions = '';
for (i = curYear ; i <= (curYear + this.yearComboRange); i++) {
selected = (i == thisMonth.getFullYear() ? 'selected="selected"' : '');
yearComboOptions += '<option value="' + i + '" ' + selected + '>' + i + '</option>';
}
yearCombo = '<select class="dynCalendar_select" style="border: 1px groove" name="years" onchange="' + this.objName + '.show(' + this.objName + '.currentMonth, this.options[this.selectedIndex].value)">' + yearComboOptions + '</select>';
 }
yearLink = thisMonth.getFullYear();
html = '';
//html += "year:"+year+" month:"+ month+" this.year:"+this.year+" this.month:"+this.month;
html += '<table border="0" bgcolor="#eeeeee" width="200" style="border-collapse: collapse">';
html += '<tr><td class="dynCalendar_header">&nbsp;' + prevLinkHTML + '</td><td colspan="5" align="center" class="dynCalendar_header" NOWRAP>' + monthCombo + ' ' + yearCombo + '</td><td align="right" class="dynCalendar_header">' + nextLinkHTML + '&nbsp;</td></tr>';
html += '<tr>';
html += '<td class="dynCalendar_dayname" width="14%">Sun</td>';
html += '<td class="dynCalendar_dayname" width="15%">Mon</td>';
html += '<td class="dynCalendar_dayname" width="14%">Tue</td>';
html += '<td class="dynCalendar_dayname" width="14%">Wed</td>';
html += '<td class="dynCalendar_dayname" width="14%">Thu</td>';
html += '<td class="dynCalendar_dayname" width="15%">Fri</td>';
html += '<td class="dynCalendar_dayname" width="14%">Sat</td></tr>';
html += '<tr>' + ret.join('</tr>\n<tr>') + '</tr>';
html += '</table>';
html += '<table border="0" bgcolor="#eeeeee" width="200" style="border-collapse: collapse">';
html += '<tr>';
// Set link to last year
html += '<td align="center" class="dynCalendar_dayname" width="33%">';
if(yearLink-1 >= this.year){
html += '<a href="javascript: ' + this.objName + '.show(' + this.month + ', ' + (yearLink - 1) + ')" onMouseOver="window.status=\'Previous Year\'; return true" onMouseOut="window.status=\'\'; return true">';
html += '<b>&lt;&lt;</b> ';
html += yearLink - 1 ;
html += '</a>';
}else{
html += yearLink - 1;
}
html += '</td>';
html += '<td width="33%" class="dynCalendar_dayname" align="center">';
html += '<a class="dynlinks" href="javascript: ' + this.objName + '.show(' + this.month + ', ' + this.year + ')" onMouseOver="window.status=\'Current Date\'; return true" onMouseOut="window.status=\'\'; return true">';
html += 'Today';
html += '</a>';
html += '</td>';
html += '<td align="center" class="dynCalendar_dayname">';
if(yearLink+1 <= (this.year + this.yearComboRange)){
html += '<a class="dynlinks" href="javascript: ' + this.objName + '.show(' + this.month + ', ' + (yearLink + 1) + ')" onMouseOver="window.status=\'Next Year\'; return true" onMouseOut="window.status=\'\'; return true">';
html += yearLink + 1;
html += ' <b>&gt;&gt;</b> ';
html += '</a>';
}else{
html += yearLink + 1;
}
html += '</td>';
html += '</tr>';
html += '</table>';

this._setHTML(html);
if (!arguments[0] && !arguments[1]) {
this._showLayer();
this._setLayerPosition();
}
}
function dynCalendar_writeHTML()
{
if (is_ie5up || is_nav6up || is_gecko) {
document.write('<a href="javascript: ' + this.objName + '.show()"><img src="' + this.imagesPath + 'input.jpg" border="0" width="18" height="18" onMouseOver="window.status=\'Set Dates\'; return true" onMouseOut="window.status=\'\'; return true" /></a>');
document.write('<div class="dynCalendar" id="' + this.layerID + '" onmouseover="' + this.objName + '._mouseover(true)" onmouseout="' + this.objName + '._mouseover(false)"></div>');
}
}
function dynCalendar_setOffset(Xoffset, Yoffset)
{
this.setOffsetX(Xoffset);
this.setOffsetY(Yoffset);
}
function dynCalendar_setOffsetX(Xoffset)
{
this.offsetX = Xoffset;
}
function dynCalendar_setOffsetY(Yoffset)
{
this.offsetY = Yoffset;
}

function dynCalendar_setImagesPath(path)
{
this.imagesPath = path;
}

function dynCalendar_setMonthCombo(useMonthCombo)
{
this.useMonthCombo = useMonthCombo;
}
function dynCalendar_setYearCombo(useYearCombo)
{
this.useYearCombo = useYearCombo;
}
function dynCalendar_setCurrentMonth(month)
{
this.currentMonth = month;
}
function dynCalendar_setCurrentYear(year)
{
this.currentYear = year;
}

function dynCalendar_setYearComboRange(range)
{
this.yearComboRange = range;
}

function dynCalendar_getLayer()
{
var layerID = this.layerID;

if (document.getElementById(layerID)) {

return document.getElementById(layerID);

} else if (document.all(layerID)) {
return document.all(layerID);
}
}
function dynCalendar_hideLayer()
{
this._getLayer().style.visibility = 'hidden';
}

function dynCalendar_showLayer()
{
this._getLayer().style.visibility = 'visible';
}

function dynCalendar_setLayerPosition()
{
this._getLayer().style.top= (dynCalendar_mouseY + this.offsetY) + 'px';
this._getLayer().style.left = (dynCalendar_mouseX + this.offsetX) + 'px';
}

function dynCalendar_setHTML(html)
{
this._getLayer().innerHTML = html;
}

function dynCalendar_getDaysInMonth(month, year)
{
monthdays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
if (month != 1) {
return monthdays[month];
} else {
return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 29 : 28);
}
}
function dynCalendar_mouseover(status)
{
dynCalendar_mouseoverStatus = status;
return true;
}
if(snifferLoaded == 1) {
/**
* onMouseMove event handler
*/
dynCalendar_oldOnmousemove = document.onmousemove ? document.onmousemove : new Function;

document.onmousemove = function ()
{
if (is_ie5up || is_nav6up || is_gecko) {
if (arguments[0]) {
dynCalendar_mouseX = arguments[0].pageX;
dynCalendar_mouseY = arguments[0].pageY;
} else {
dynCalendar_mouseX = event.clientX + document.body.scrollLeft;
dynCalendar_mouseY = event.clientY + document.body.scrollTop;
arguments[0] = null;
}
dynCalendar_oldOnmousemove();
}
}


dynCalendar_oldOnclick = document.onclick ? document.onclick : new Function;

document.onclick = function ()
{
if (is_ie5up || is_nav6up || is_gecko) {
if(!dynCalendar_mouseoverStatus){
for(i=0; i<dynCalendar_layers.length; ++i){
dynCalendar_layers[i]._hideLayer();
}
}
dynCalendar_oldOnclick(arguments[0] ? arguments[0] : null);
}
}
}


/*!SWFObject v2.0 <http://code.google.com/p/swfobject/>
Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/

var swfobject = function() {

var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
FLASH_MIME_TYPE = "application/x-shockwave-flash",
EXPRESS_INSTALL_ID = "SWFObjectExprInst",

win = window,
doc = document,
nav = navigator,

domLoadFnArr = [],
regObjArr = [],
timer = null,
storedAltContent = null,
storedAltContentId = null,
isDomLoaded = false,
isExpressInstallActive = false;

/* Centralized function for browser feature detection
- Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features
- User agent string detection is only used when no alternative is possible
- Is executed directly for optimal performance
*/
var ua = function() {
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF && typeof doc.appendChild != UNDEF && typeof doc.replaceChild != UNDEF && typeof doc.removeChild != UNDEF && typeof doc.cloneNode != UNDEF,
playerVersion = [0,0,0],
d = null;
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
if (d) {
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
}
}
else if (typeof win.ActiveXObject != UNDEF) {
var a = null, fp6Crash = false;
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
}
catch(e) {
try { 
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
playerVersion = [6,0,21];
a.AllowScriptAccess = "always";  // Introduced in fp6.0.47
}
catch(e) {
if (playerVersion[0] == 6) {
fp6Crash = true;
}
}
if (!fp6Crash) {
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
}
catch(e) {}
}
}
if (!fp6Crash && a) { // a will return null when ActiveX is disabled
try {
d = a.GetVariable("$version");  // Will crash fp6.0.21/23/29
if (d) {
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
catch(e) {}
}
}
var u = nav.userAgent.toLowerCase(),
p = nav.platform.toLowerCase(),
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
ie = false,
windows = p ? /win/.test(p) : /win/.test(u),
mac = p ? /mac/.test(p) : /mac/.test(u);
/*@cc_on
ie = true;
@if (@_win32)
windows = true;
@elif (@_mac)
mac = true;
@end
@*/
return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac };
}();

/* Cross-browser onDomLoad
- Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/
- Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari)
*/ 
var onDomLoad = function() {
if (!ua.w3cdom) {
return;
}
addDomLoadEvent(main);
if (ua.ie && ua.win) {
try {  // Avoid a possible Operation Aborted error
doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors 
var s = getElementById("__ie_ondomload");
if (s) {
s.onreadystatechange = function() {
if (this.readyState == "complete") {
this.parentNode.removeChild(this);
callDomLoadFunctions();
}
};
}
}
catch(e) {}
}
if (ua.webkit && typeof doc.readyState != UNDEF) {
timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10);
}
if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);
}
addLoadEvent(callDomLoadFunctions);
}();

function callDomLoadFunctions() {
if (isDomLoaded) {
return;
}
if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we don't want to fire it too early
var s = createElement("span");
try { // Avoid a possible Operation Aborted error
var t = doc.getElementsByTagName("body")[0].appendChild(s);
t.parentNode.removeChild(t);
}
catch (e) {
return;
}
}
isDomLoaded = true;
if (timer) {
clearInterval(timer);
timer = null;
}
var dl = domLoadFnArr.length;
for (var i = 0; i < dl; i++) {
domLoadFnArr[i]();
}
}

function addDomLoadEvent(fn) {
if (isDomLoaded) {
fn();
}
else { 
domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
}
}

/* Cross-browser onload
- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- Will fire an event as soon as a web page including all of its assets are loaded 
 */
function addLoadEvent(fn) {
if (typeof win.addEventListener != UNDEF) {
win.addEventListener("load", fn, false);
}
else if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("load", fn, false);
}
else if (typeof win.attachEvent != UNDEF) {
win.attachEvent("onload", fn);
}
else if (typeof win.onload == "function") {
var fnOld = win.onload;
win.onload = function() {
fnOld();
fn();
};
}
else {
win.onload = fn;
}
}

/* Main function
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
*/
function main() { // Static publishing only
var rl = regObjArr.length;
for (var i = 0; i < rl; i++) { // For each registered object element
var id = regObjArr[i].id;
if (ua.pv[0] > 0) {
var obj = getElementById(id);
if (obj) {
regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";
regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";
if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >= Flash content version: Houston, we have a match!
if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
fixParams(obj);
}
setVisibility(id, true);
}
else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
showExpressInstall(regObjArr[i]);
}
else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
displayAltContent(obj);
}
}
}
else {  // If no fp is installed, we let the object element do its job (show alternative content)
setVisibility(id, true);
}
}
}

/* Fix nested param elements, which are ignored by older webkit engines
- This includes Safari up to and including version 1.2.2 on Mac OS 10.3
- Fall back to the proprietary embed element
*/
function fixParams(obj) {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var e = createElement("embed"), a = nestedObj.attributes;
if (a) {
var al = a.length;
for (var i = 0; i < al; i++) {
if (a[i].nodeName.toLowerCase() == "data") {
e.setAttribute("src", a[i].nodeValue);
}
else {
e.setAttribute(a[i].nodeName, a[i].nodeValue);
}
}
}
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var j = 0; j < cl; j++) {
if (c[j].nodeType == 1 && c[j].nodeName.toLowerCase() == "param") {
e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));
}
}
}
obj.parentNode.replaceChild(e, obj);
}
}

/* Fix hanging audio/video threads and force open sockets and NetConnections to disconnect
- Occurs when unloading a web page in IE using fp8+ and innerHTML/outerHTML
- Dynamic publishing only
*/
function fixObjectLeaks(id) {
if (ua.ie && ua.win && hasPlayerVersion("8.0.0")) {
win.attachEvent("onunload", function () {
var obj = getElementById(id);
if (obj) {
for (var i in obj) {
if (typeof obj[i] == "function") {
obj[i] = function() {};
}
}
obj.parentNode.removeChild(obj);
}
});
}
}

/* Show the Adobe Express Install dialog
- Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
*/
function showExpressInstall(regObj) {
isExpressInstallActive = true;
var obj = getElementById(regObj.id);
if (obj) {
if (regObj.altContentId) {
var ac = getElementById(regObj.altContentId);
if (ac) {
storedAltContent = ac;
storedAltContentId = regObj.altContentId;
}
}
else {
storedAltContent = abstractAltContent(obj);
}
if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {
regObj.width = "310";
}
if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {
regObj.height = "137";
}
doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
dt = doc.title,
fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,
replaceId = regObj.id;
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
if (ua.ie && ua.win && obj.readyState != 4) {
var newObj = createElement("div");
replaceId += "SWFObjectNew";
newObj.setAttribute("id", replaceId);
obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be replaced by the object element that loads expressinstall.swf
obj.style.display = "none";
win.attachEvent("onload", function() { obj.parentNode.removeChild(obj); });
}
createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId);
}
}

/* Functions to abstract and display alternative content
*/
function displayAltContent(obj) {
if (ua.ie && ua.win && obj.readyState != 4) {
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
var el = createElement("div");
obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced by the alternative content
el.parentNode.replaceChild(abstractAltContent(obj), el);
obj.style.display = "none";
win.attachEvent("onload", function() { obj.parentNode.removeChild(obj); });
}
else {
obj.parentNode.replaceChild(abstractAltContent(obj), obj);
}
}

function abstractAltContent(obj) {
var ac = createElement("div");
if (ua.win && ua.ie) {
ac.innerHTML = obj.innerHTML;
}
else {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var i = 0; i < cl; i++) {
if (!(c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param") && !(c[i].nodeType == 8)) {
ac.appendChild(c[i].cloneNode(true));
}
}
}
}
}
return ac;
}

/* Cross-browser dynamic SWF creation
*/
function createSWF(attObj, parObj, id) {
var r, el = getElementById(id);
if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
attObj.id = id;
}
if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not combine: fall back to outerHTML
var att = "";
for (var i in attObj) {
if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries, like Object.prototype.toJSONString = function() {}
if (i == "data") {
parObj.movie = attObj[i];
}
else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
att += ' class="' + attObj[i] + '"';
}
else if (i != "classid") {
att += ' ' + i + '="' + attObj[i] + '"';
}
}
}
var par = "";
for (var j in parObj) {
if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
par += '<param name="' + j + '" value="' + parObj[j] + '" />';
}
}
el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
fixObjectLeaks(attObj.id); // This bug affects dynamic publishing only
r = getElementById(attObj.id);
}
else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements: fall back to the proprietary embed element
var e = createElement("embed");
e.setAttribute("type", FLASH_MIME_TYPE);
for (var k in attObj) {
if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
if (k == "data") {
e.setAttribute("src", attObj[k]);
}
else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
e.setAttribute("class", attObj[k]);
}
else if (k != "classid") { // Filter out IE specific attribute
e.setAttribute(k, attObj[k]);
}
}
}
for (var l in parObj) {
if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other potential libraries
if (l != "movie") { // Filter out IE specific param element
e.setAttribute(l, parObj[l]);
}
}
}
el.parentNode.replaceChild(e, el);
r = e;
}
else { // Well-behaving browsers
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
for (var m in attObj) {
if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other potential libraries
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
o.setAttribute("class", attObj[m]);
}
else if (m != "classid") { // Filter out IE specific attribute
o.setAttribute(m, attObj[m]);
}
}
}
for (var n in parObj) {
if (parObj[n] != Object.prototype[n] && n != "movie") { // Filter out prototype additions from other potential libraries and IE specific param element
createObjParam(o, n, parObj[n]);
}
}
el.parentNode.replaceChild(o, el);
r = o;
}
return r;
}

function createObjParam(el, pName, pValue) {
var p = createElement("param");
p.setAttribute("name", pName);
p.setAttribute("value", pValue);
el.appendChild(p);
}

function getElementById(id) {
return doc.getElementById(id);
}

function createElement(el) {
return doc.createElement(el);
}

function hasPlayerVersion(rv) {
var pv = ua.pv, v = rv.split(".");
v[0] = parseInt(v[0], 10);
v[1] = parseInt(v[1], 10);
v[2] = parseInt(v[2], 10);
return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
}

function createCSS(sel, decl) {
if (ua.ie && ua.mac) {
return;
}
var h = doc.getElementsByTagName("head")[0], s = createElement("style");
s.setAttribute("type", "text/css");
s.setAttribute("media", "screen");
if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {
s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
}
h.appendChild(s);
if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
var ls = doc.styleSheets[doc.styleSheets.length - 1];
if (typeof ls.addRule == OBJECT) {
ls.addRule(sel, decl);
}
}
}

function setVisibility(id, isVisible) {
var v = isVisible ? "visible" : "hidden";
if (isDomLoaded) {
getElementById(id).style.visibility = v;
}
else {
createCSS("#" + id, "visibility:" + v);
}
}

function getTargetVersion(obj) {
    if (!obj)
        return 0;
var c = obj.childNodes;
var cl = c.length;
for (var i = 0; i < cl; i++) {
if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") {
    c = c[i].childNodes;
    cl = c.length;
    i = 0;
}     
if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "swfversion") {
   return c[i].getAttribute("value"); 
}
}
return 0;
}
    
function getExpressInstall(obj) {
    if (!obj)
        return "";
var c = obj.childNodes;
var cl = c.length;
for (var i = 0; i < cl; i++) {
if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") {
    c = c[i].childNodes;
    cl = c.length;
    i = 0;
}     
if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "expressinstall") { 
    return c[i].getAttribute("value"); 
}       
}
return "";
}

return {
/* Public API
- Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation
*/ 
registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {
if (!ua.w3cdom || !objectIdStr) {
return;
}
var obj = document.getElementById(objectIdStr);
var xi = getExpressInstall(obj);
var regObj = {};
regObj.id = objectIdStr;
regObj.swfVersion = swfVersionStr ? swfVersionStr : getTargetVersion(obj);
regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : ((xi != "") ? xi : false);
regObjArr[regObjArr.length] = regObj;
setVisibility(objectIdStr, false);
},

getObjectById: function(objectIdStr) {
var r = null;
if (ua.w3cdom && isDomLoaded) {
var o = getElementById(objectIdStr);
if (o) {
var n = o.getElementsByTagName(OBJECT)[0];
if (!n || (n && typeof o.SetVariable != UNDEF)) {
    r = o;
}
else if (typeof n.SetVariable != UNDEF) {
r = n;
}}}
return r;
},
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {
return;
}
widthStr += ""; // Auto-convert to string to make it idiot proof
heightStr += "";
if (hasPlayerVersion(swfVersionStr)) {
setVisibility(replaceElemIdStr, false);
var att = (typeof attObj == OBJECT) ? attObj : {};
att.data = swfUrlStr;
att.width = widthStr;
att.height = heightStr;
var par = (typeof parObj == OBJECT) ? parObj : {};
if (typeof flashvarsObj == OBJECT) {
for (var i in flashvarsObj) {
if (flashvarsObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries
if (typeof par.flashvars != UNDEF) {
par.flashvars += "&" + i + "=" + flashvarsObj[i];
}
else {
par.flashvars = i + "=" + flashvarsObj[i];
}}}}
addDomLoadEvent(function() {
createSWF(att, par, replaceElemIdStr);
if (att.id == replaceElemIdStr) {
setVisibility(replaceElemIdStr, true);
}});}
else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {
setVisibility(replaceElemIdStr, false);
addDomLoadEvent(function() {
var regObj = {};
regObj.id = regObj.altContentId = replaceElemIdStr;
regObj.width = widthStr;
regObj.height = heightStr;
regObj.expressInstall = xiSwfUrlStr;
showExpressInstall(regObj);
});}},
getFlashPlayerVersion: function() {
return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
},
hasFlashPlayerVersion:hasPlayerVersion,
createSWF: function(attObj, parObj, replaceElemIdStr) {
if (ua.w3cdom && isDomLoaded) {
return createSWF(attObj, parObj, replaceElemIdStr);
}
else {
return undefined;
}},
createCSS: function(sel, decl) {
if (ua.w3cdom) {
createCSS(sel, decl);
}},
addDomLoadEvent:addDomLoadEvent,
addLoadEvent:addLoadEvent,
getQueryParamValue: function(param) {
var q = doc.location.search || doc.location.hash;
if (param == null) {
return q;
}
 if(q) {
var pairs = q.substring(1).split("&");
for (var i = 0; i < pairs.length; i++) {
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
return pairs[i].substring((pairs[i].indexOf("=") + 1));
}}}return "";},

expressInstallCallback: function() {
if (isExpressInstallActive && storedAltContent) {
var obj = getElementById(EXPRESS_INSTALL_ID);
if (obj) {
obj.parentNode.replaceChild(storedAltContent, obj);
if (storedAltContentId) {
setVisibility(storedAltContentId, true);
if (ua.ie && ua.win) {
storedAltContent.style.display = "block";
}}
storedAltContent = null;
storedAltContentId = null;
isExpressInstallActive = false;
}} }};}();
