﻿/// <reference path="jquery-1.3.2-vsdoc.js" />
function getParameterByName(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + name + "=([^&#]*)";
    var regex = new RegExp(regexS);
    var results = regex.exec(window.location.href);
    if (results == null)
        return "";
    else
        return results[1];
}
var expr = "(\.[a-z]+\\\"?\\)?)$";
/*-------------------------------------------------------------------- 
* JQuery Plugin: "EqualHeights"
* by:	Scott Jehl, Todd Parker, Maggie Costello Wachs (http://www.filamentgroup.com)
* Version: 2.0, 08.01.2008
--------------------------------------------------------------------*/
$.fn.equalHeights = function(Child) { $(this).each(function() { var currentTallest = 0; $(this).find(Child).each(function(i) { if ($(this).height() > currentTallest) { currentTallest = $(this).height(); } }); if (!Number.prototype.pxToEm) currentTallest = currentTallest.pxToEm(); /* for ie6, set height since min-height isn't supported*/if ($.browser.msie && $.browser.version == 6.0) { $(this).find(Child).css({ 'height': currentTallest }); } $(this).find(Child).css({ 'min-height': currentTallest }); }); return this; };
/*-----END---- */
(function($) { $.fn.vAlign = function() { return this.each(function(i) { var ah = $(this).height(); var ph = $(this).parent().height(); var mh = (ph - ah) / 2; $(this).css('margin-top', mh); }); }; })(jQuery);
/* This function ensures that items loaded in an AJAX panel are re-jquery-ified*/
function pageLoad(sender, args) { if (args.get_isPartialLoad()) { if (!($.browser.msie && $.browser.version == "6.0")) { $(".replacedropdown").msDropDown(); }; PEPS.rollover.init(); } }
$(document).ready(function() {
    $tabs = $('#page-tabs').tabs();
    //DD_belatedPNG.fix('#swoosh img');
    if ($.browser.msie && $.browser.version == "6.0") { $("#swoosh img").attr("src", "/_Layouts/ctassets/images/en-gb/swoosh.gif"); };
    $(".text").vAlign(); $(".w_half").vAlign();
    //PRINT ERROR
    if (getParameterByName("PrintVersion") != "1")
    { if (!($.browser.msie && $.browser.version == "6.0")) { $(".replacedropdown").msDropDown(); } }
    /*fix the events calendar*/
    $(".eventcalendar tr:first td").css("padding", "0px"); $(".eventcalendar tr:first td").css("background-color", "transparent"); $(".event_title td").css("padding", "6px"); $(".event_title td").css("width", "auto"); $(".event_nextprevious").css("background-color", "#e2e2e2");
    var SiteActionsPos = $.cookie("ActionsMenuPosition");
    if (SiteActionsPos != null && SiteActionsPos != '') { var SiteActionsPosLeft = SiteActionsPos.split(';')[0]; var SiteActionsPosTop = SiteActionsPos.split(';')[1]; $("#site_actions").css("left", SiteActionsPosLeft); $("#site_actions").css("top", SiteActionsPosTop); }
    /*set the site actions menu to be dragable (will help for smaller screens)*/
    $("#site_actions").draggable({ drag: function(event, ui) { $("#site_actions").css("opacity", "0.6"); }, stop: function(event, ui) { $.cookie("ActionsMenuPosition", ui.absolutePosition.left + ";" + ui.absolutePosition.top, { expires: 7, path: '/' }); $("#site_actions").css("opacity", "1.0"); }, cursor: "move", containment: "window" });
    $(".sitemap_third").hide();
    $(".expand").show();
    $(".expand").toggle(function() { $(this).siblings(".sitemap_third").show(); $(this).css("background-position", "0 0"); }, function() { $(this).siblings(".sitemap_third").hide(); $(this).css("background-position", "0 100%"); });
    /*set up the rollover script.*/
    //PRINT ERROR
    if (getParameterByName("PrintVersion") != "1")
    { PEPS.rollover.init(); }
    /*Set equal heights*/
    $(function() { $('.module_container').equalHeights(".groupheader"); }); $(function() { $('.module_container').equalHeights(".sm_content"); }); $(function() { $('.module_container').equalHeights(".content"); }); $(function() { $('#logincontainer').equalHeights(".content"); }); $(function() { $('.newshomeitems').equalHeights("li.w_half"); }); $(function() { $('#register_container').equalHeights(".login_column"); });
    $("ul#top_navigation li").hover(function() { $(this).css("background-color", "#d5d5d5"); var sBGImage = $(this).css("background-image"); $(this).css("background-image", sBGImage.substring(0, sBGImage.search(expr)) + '_over' + sBGImage.match(expr)[0]); }, function() { $(this).css("background-color", "#edecec"); var sBGImage = $(this).css("background-image"); $(this).css("background-image", sBGImage.replace(/_over\./, '.')); });
    $("#left_nav ul li ul li a").hover(function() {var t = $(this).parent("li");if (!t.hasClass("selected") && !t.hasClass("selected_nochild")) {$(this).addClass("hover");}}, function() { $(this).removeClass("hover"); });
    $(".main_drop li").hover(function() { $(this).addClass("selected"); }, function() { $(this).removeClass("selected"); });
    var srcImage, IsMacFireFox = false;
    if (navigator.userAgent.toLowerCase().indexOf("mac") > -1 && jQuery.browser.mozilla) { IsMacFireFox = true; }
    if (IsMacFireFox) { $("body").css("background-position", "0 -6px"); }
    $("#main_1").hover(function() { showDrop($(this), "#main_1_drop"); $(".search_results_ddl").hide(); }, function() { hideDrop($(this), "#main_1_drop"); $(".search_results_ddl").show(); });
    $("#main_2").hover(function() { showDrop($(this), "#main_2_drop"); $(".search_results_ddl").hide(); }, function() { hideDrop($(this), "#main_2_drop"); $(".search_results_ddl").show(); });
    $("#main_3").hover(function() { showDrop($(this), "#main_3_drop"); $(".search_results_ddl").hide(); }, function() { hideDrop($(this), "#main_3_drop"); $(".search_results_ddl").show(); });
    $("#main_4").hover(function() { showDrop($(this), "#main_4_drop"); $(".search_results_ddl").hide(); }, function() { hideDrop($(this), "#main_4_drop"); $(".search_results_ddl").show(); });
    $('ul#top_navigation li').each(function(i) { var item_id = "#utilityHeadItem_" + (i + 1).toString(); var drop_id = "#utilityHeadItem_" + (i + 1).toString() + "_drop"; if ($(drop_id).length > 0) { $(item_id).hover(function() { showSimpleDrop($(item_id), drop_id); }, function() { hideSimpleDrop($(this), drop_id); }); } });
    function showSimpleDrop(object, dropid) {var pos = object.position();$(dropid).css("left", pos.left);if ($.browser.msie && $.browser.version != '8.0') {$(dropid).css("top", pos.top + 35);}else if ($.browser.msie && $.browser.version == '8.0') {$(dropid).css("top", pos.top);}else if ($.browser.mozilla) {$(dropid).css("top", pos.top + 34);}else if ($.browser.opera) {$(dropid).css("top", pos.top + 35);}else {$(dropid).css("top", pos.top + 11);}$(dropid).fadeIn(200);}
    function hideSimpleDrop(object, dropid) {$(dropid).fadeOut(200);}
    function showDrop(object, dropid) { var mainRollover = object.find(".main_rollover"); srcImage = mainRollover.attr("src"); mainRollover.addClass("over"); var rolloverImage; if (srcImage.indexOf("_over") > -1) { rolloverImage = srcImage; } else { rolloverImage = srcImage.substring(0, srcImage.search(expr)) + '_over' + srcImage.match(expr)[0]; } if (!IsMacFireFox) { var pos = object.position(); $(dropid).css("left", pos.left); if ($.browser.msie && $.browser.version != '8.0') { $(dropid).css("top", pos.top + 52); $(".takeaction_select .replacedropdown").css("visibility", "hidden"); } else if ($.browser.msie && $.browser.version == '8.0') { $(dropid).css("top", pos.top); } else if ($.browser.opera) { $(dropid).css("top", pos.top + 52); } else { $(dropid).css("top", pos.top + 11); } $(dropid).fadeIn(200); } object.find(".main_rollover").attr("src", rolloverImage); }
    function hideDrop(object, dropid) { if (!IsMacFireFox) { $(dropid).fadeOut(200); } var mainRollover = object.find(".main_rollover"); mainRollover.attr("src", srcImage); mainRollover.removeClass("over"); $(".takeaction_select .replacedropdown").css("visibility", "visible"); }
    var i = 1;
    $("#rightcol_affinity .content_container").each(function() {if (i > 1) {$(this).hide();}else {$(this).prev("div").addClass("expanded");}i++;});
    $(".rightcol_section").click(function() {if (!$(this).hasClass("expanded")) {$(".rightcol_section").each(function() { $(this).removeClass("expanded"); $(this).css("background-image", "url(/_layouts/ctassets/images/en-us/backgrounds/affinity_closed.gif)"); });$("#rightcol_affinity .content_container").each(function() { $(this).slideUp("medium") });var content = $(this).parent("div").find(".content_container");$(this).addClass("expanded");$(this).css("background-image", "url(/_layouts/ctassets/images/en-us/backgrounds/affinity_open.gif)");content.slideToggle("medium");}});
    $("#sociallinks").hide();
    var share = $(this).find("#sociallinks_container .share_button");
    if (share.length > 0) {var share_img = share.attr("src");var share_hover = share_img.replace(".", "_over."); ;$("#sociallinks_container").hover(function() {var pos = $(share).position();$(this).find(".share_button").attr("src", share_hover);$("#sociallinks").css("position", "absolute");$("#sociallinks").css("top", pos.top + $(share).height() - 2);$("#sociallinks").css("left", pos.left);$("#sociallinks").slideDown("medium");}, function() { $("#sociallinks").slideUp("medium"); $(this).find(".share_button").attr("src", share_img); })}
    $("#login_link").click(function() { var pos = $(this).position(); $("#allpagelogin").css("position", "absolute"); $("#allpagelogin").css("top", pos.top + 32); $("#allpagelogin").css("left", pos.left + $("#allpagelogin").parent().position().left); /*Hide the search dropdowns*/if ($.browser.msie && $.browser.version == "6.0") { $(".search_content_type").hide(); }; $("#allpagelogin").slideDown("medium"); return false; });
    $(".close_me").click(function() { $("#allpagelogin").slideUp("medium"); if ($.browser.msie && $.browser.version == "6.0") { $(".search_content_type").show(); }; });
});
/*Pixel to Em conversion for equal heights
* javascript method: "pxToEm"
* by:
Scott Jehl (scott@filamentgroup.com) 
Maggie Wachs (maggie@filamentgroup.com)
http://www.filamentgroup.com
*
* Copyright (c) 2008 Filament Group
* Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses
*/
Number.prototype.pxToEm = String.prototype.pxToEm = function(settings) {settings = jQuery.extend({scope: 'body',reverse: false}, settings);var pxVal = (this == '') ? 0 : parseFloat(this);var scopeVal;var getWindowWidth = function() {var de = document.documentElement;return self.innerWidth || (de && de.clientWidth) || document.body.clientWidth;};if (settings.scope == 'body' && $.browser.msie && (parseFloat($('body').css('font-size')) / getWindowWidth()).toFixed(1) > 0.0) {var calcFontSize = function() {return (parseFloat($('body').css('font-size')) / getWindowWidth()).toFixed(3) * 16;};scopeVal = calcFontSize();}else { scopeVal = parseFloat(jQuery(settings.scope).css("font-size")); };var result = (settings.reverse == true) ? (pxVal * scopeVal).toFixed(2) + 'px' : (pxVal / scopeVal).toFixed(2) + 'em';return result;};
PEPS = {};
PEPS.rollover = { init: function() { this.preload(); $(".rollover").hover(function() { $(this).attr('src', PEPS.rollover.newimage($(this).attr('src'))); }, function() { $(this).attr('src', PEPS.rollover.oldimage($(this).attr('src'))); }); $(".rolloverlink").hover(function() { $(this).css('background-image', PEPS.rollover.newimage($(this).css('background-image'))); }, function() { $(this).css('background-image', PEPS.rollover.oldimage($(this).css('background-image'))); }); }, preload: function() { $(window).bind('load', function() { $('.rollover').each(function(key, elm) { $('<img>').attr('src', PEPS.rollover.newimage($(this).attr('src'))); }); $('.rolloverlink').each(function(key, elm) { $("<a>").css('background-image', PEPS.rollover.newimage($(this).css('background-image'))); }); }); }, newimage: function(src) { if (src.indexOf("_over.gif") == -1) { return src.substring(0, src.search(expr)) + '_over' + src.match(expr)[0]; } else { return src; } }, oldimage: function(src) { return src.replace(/_over\./, '.'); } };
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
jQuery.cookie = function(name, value, options) {if (typeof value != 'undefined') {options = options || {};if (value === null) {value = '';options.expires = -1;}var expires = '';if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {var date;if (typeof options.expires == 'number') {date = new Date();date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));} else {date = options.expires;}expires = '; expires=' + date.toUTCString();}var path = options.path ? '; path=' + (options.path) : '';var domain = options.domain ? '; domain=' + (options.domain) : '';var secure = options.secure ? '; secure' : '';document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');} else {var cookieValue = null;if (document.cookie && document.cookie != '') {var cookies = document.cookie.split(';');for (var i = 0; i < cookies.length; i++) {var cookie = jQuery.trim(cookies[i]);if (cookie.substring(0, name.length + 1) == (name + '=')) {cookieValue = decodeURIComponent(cookie.substring(name.length + 1));break;}}}return cookieValue;}};
function AddNewRow(RowID, VarName, VarValue) {if (VarName == null || VarName == "") {return null;}var newTR = document.createElement("tr");newTR.setAttribute("id", "tr_" + RowID);var td_Name_Label = document.createElement("td");var td_Value_Label = document.createElement("td");var td_Name = document.createElement("td");var td_Value = document.createElement("td");var td_delete = document.createElement("td");var varname_edit = document.createElement("input");var varvalue_edit = document.createElement("input");var varDelete = document.createElement("input");varDelete.setAttribute("type", "button");varDelete.setAttribute("value", "Delete");varDelete.setAttribute("id", RowID);varDelete.setAttribute("class", "vardelete");td_Name_Label.innerHTML = "Name:";td_Value_Label.innerHTML = "Value:";varname_edit.value = VarName;varvalue_edit.value = VarValue;td_Name.appendChild(varname_edit);td_Value.appendChild(varvalue_edit);td_delete.appendChild(varDelete);newTR.appendChild(td_Name_Label);newTR.appendChild(td_Name);newTR.appendChild(td_Value_Label);newTR.appendChild(td_Value);newTR.appendChild(td_delete);return newTR;}
function SetFlashManager(idPrefix, HiddenFlashVars) {var tabid = '#' + idPrefix + 'flash-tabs';$(tabid).tabs();var tbh_varsLoad = $(HiddenFlashVars);if (tbh_varsLoad != null && tbh_varsLoad.val() != null) {var load_CurrentValues = tbh_varsLoad.val();var a_loadCurrentValues = load_CurrentValues.split("|");for (var i = 0; i < a_loadCurrentValues.length; i++) {var a_varvalues = a_loadCurrentValues[i].split(";");var NewRow = AddNewRow(a_varvalues[0], a_varvalues[1], a_varvalues[2]);if (NewRow != null) {$("#" + idPrefix + "row_addNew").before(NewRow);}}}$("#" + idPrefix + "varAdd").click(function() {var varname = document.getElementById(idPrefix + "varName").value;var varvalue = document.getElementById(idPrefix + "varValue").value;var RowID = "row_" + Math.random();RowID = RowID.replace(".", "");var tbh_vars = $(HiddenFlashVars);tbh_vars.val(tbh_vars.val() + RowID + ";" + varname + ";" + varvalue + "|");var NewRow = AddNewRow(RowID, varname, varvalue);if (NewRow != null) {$("#" + idPrefix + "row_addNew").before(NewRow);}document.getElementById(idPrefix + "varName").value = '';document.getElementById(idPrefix + "varValue").value = '';});$("input[id ^='row_']").live("click", function() {var rowID = $(this).attr("id");$("#tr_" + rowID).remove();var tbh_vars = $(HiddenFlashVars);var CurrentValues = tbh_vars.val();var a_CurrentValues = CurrentValues.split("|");var x = 0;for (var i = 0; i < a_CurrentValues.Length; i++) {if (a_CurrentValues[i].indexOf(rowID) > -1) {x = i;break;}}a_CurrentValues.splice(x, 1);tbh_vars.val(a_CurrentValues.join("|"));});}
function callEmail(submitbutton, fromaddress, fromname, toaddress, toname, message, fromemailerror, fromnameerror, toemailerror, tonameerror, invalidemailerror) {$(submitbutton).click(function() { messagesend(fromaddress, fromname, toaddress, toname, message, fromemailerror, fromnameerror, toemailerror, tonameerror, invalidemailerror) });$("#emailacolleague").dialog({ bgiframe: true, autoOpen: false, modal: true, width: 554, title: "Email a colleague",close: function() {$("#messageSuccess").html('');$("#messageSuccess").hide();$("#messageForm").show();$("#messageFailure").html('');$("#messageFailure").show();$("#messageForm .error").remove();}});$("#sendcoloeaguebutton").click(function() {$('#emailacolleague').dialog('open');return false;});}
function messagesend(fromaddress, fromname, toaddress, toname, message, fromemailerror, fromnameerror, toemailerror, tonameerror, invalidemailerror) {$("#messageForm .error").remove();var bValid = true;bValid = bValid && checkComplete(fromaddress, fromemailerror);bValid = bValid && validateEmail(fromaddress, invalidemailerror, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);bValid = bValid && checkComplete(fromname, fromnameerror);bValid = bValid && checkComplete(toaddress, toemailerror);bValid = bValid && validateEmail(toaddress, invalidemailerror, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);bValid = bValid && checkComplete(toname, tonameerror);if (bValid) {var mailmessage = "FromEmail=" + $(fromaddress).val() + "&FromName=" + $(fromname).val() + "&ToEmail=" + $(toaddress).val() + "&ToName=" + $(toname).val() + "&Message=" + $(message).val() + "&Page=" + location.href;$.ajax({type: "GET",contentType: "application/json; charset=utf-8",url: "/_Layouts/CTAssets/ASHX/EmailAColleague.ashx",data: mailmessage,dataType: "json",success: function(result) {$("#messageSuccess").html(result.message);$("#messageSuccess").show("slow");$("#messageForm").hide("slow");},error: function() {$("#messageFailure").html(result.message);$("#messageFailure").show("slow");}});}return false;}
function checkComplete(element, message) {if ($(element).val() == '') {$(element).after('<span class="error" style="color:Red;">' + message + '</span>');return false;}else { return true; }}
function validateEmail(element, message, EmailRegex) {if (!EmailRegex.test($(element).val())) {$(element).after('<span class="error" style="color:Red;">' + message + '</span>');return false;}else { return true; }}
/**
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
* Author: Drew Diller
* Email: drew.diller@gmail.com
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
* Version: 0.0.8a
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
*
* Example usage:
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
**/
var DD_belatedPNG = { ns: "DD_belatedPNG", imgSize: {}, delay: 10, nodesFixed: 0, createVmlNameSpace: function() { if (document.namespaces && !document.namespaces[this.ns]) { document.namespaces.add(this.ns, "urn:schemas-microsoft-com:vml") } }, createVmlStyleSheet: function() { var b, a; b = document.createElement("style"); b.setAttribute("media", "screen"); document.documentElement.firstChild.insertBefore(b, document.documentElement.firstChild.firstChild); if (b.styleSheet) { b = b.styleSheet; b.addRule(this.ns + "\\:shape", "position:absolute;"); if ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0")) { b.addRule(this.ns + "\\:*", "{behavior:url(#default#VML)}"); } else { b.addRule(this.ns + "\\:", "{behavior:url(#default#VML)}"); } b.addRule("img." + this.ns + "_sizeFinder", "behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;"); this.screenStyleSheet = b; a = document.createElement("style"); a.setAttribute("media", "print"); document.documentElement.firstChild.insertBefore(a, document.documentElement.firstChild.firstChild); a = a.styleSheet; if ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0")) { a.addRule(this.ns + "\\:*", "{display: none !important;}"); } else { a.addRule(this.ns + "\\:", "{display: none !important;}"); } a.addRule("img." + this.ns + "_sizeFinder", "{display: none !important;}") } }, readPropertyChange: function() { var b, c, a; b = event.srcElement; if (!b.vmlInitiated) { return } if (event.propertyName.search("background") != -1 || event.propertyName.search("border") != -1) { DD_belatedPNG.applyVML(b) } if (event.propertyName == "style.display") { c = (b.currentStyle.display == "none") ? "none" : "block"; for (a in b.vml) { if (b.vml.hasOwnProperty(a)) { b.vml[a].shape.style.display = c } } } if (event.propertyName.search("filter") != -1) { DD_belatedPNG.vmlOpacity(b) } }, vmlOpacity: function(b) { if (b.currentStyle.filter.search("lpha") != -1) { var a = b.currentStyle.filter; a = parseInt(a.substring(a.lastIndexOf("=") + 1, a.lastIndexOf(")")), 10) / 100; b.vml.color.shape.style.filter = b.currentStyle.filter; b.vml.image.fill.opacity = a } }, handlePseudoHover: function(a) { setTimeout(function() { DD_belatedPNG.applyVML(a) }, 1) }, fix: function(a) { if (this.screenStyleSheet) { var c, b; c = a.split(","); for (b = 0; b < c.length; b++) { this.screenStyleSheet.addRule(c[b], "behavior:expression(DD_belatedPNG.fixPng(this))") } } }, applyVML: function(a) { a.runtimeStyle.cssText = ""; this.vmlFill(a); this.vmlOffsets(a); this.vmlOpacity(a); if (a.isImg) { this.copyImageBorders(a) } }, attachHandlers: function(i) { var d, c, g, e, b, f; d = this; c = { resize: "vmlOffsets", move: "vmlOffsets" }; if (i.nodeName == "A") { e = { mouseleave: "handlePseudoHover", mouseenter: "handlePseudoHover", focus: "handlePseudoHover", blur: "handlePseudoHover" }; for (b in e) { if (e.hasOwnProperty(b)) { c[b] = e[b] } } } for (f in c) { if (c.hasOwnProperty(f)) { g = function() { d[c[f]](i) }; i.attachEvent("on" + f, g) } } i.attachEvent("onpropertychange", this.readPropertyChange) }, giveLayout: function(a) { a.style.zoom = 1; if (a.currentStyle.position == "static") { a.style.position = "relative" } }, copyImageBorders: function(b) { var c, a; c = { borderStyle: true, borderWidth: true, borderColor: true }; for (a in c) { if (c.hasOwnProperty(a)) { b.vml.color.shape.style[a] = b.currentStyle[a] } } }, vmlFill: function(e) { if (!e.currentStyle) { return } else { var d, f, g, b, a, c; d = e.currentStyle } for (b in e.vml) { if (e.vml.hasOwnProperty(b)) { e.vml[b].shape.style.zIndex = d.zIndex } } e.runtimeStyle.backgroundColor = ""; e.runtimeStyle.backgroundImage = ""; f = true; if (d.backgroundImage != "none" || e.isImg) { if (!e.isImg) { e.vmlBg = d.backgroundImage; e.vmlBg = e.vmlBg.substr(5, e.vmlBg.lastIndexOf('")') - 5) } else { e.vmlBg = e.src } g = this; if (!g.imgSize[e.vmlBg]) { a = document.createElement("img"); g.imgSize[e.vmlBg] = a; a.className = g.ns + "_sizeFinder"; a.runtimeStyle.cssText = "behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;"; c = function() { this.width = this.offsetWidth; this.height = this.offsetHeight; g.vmlOffsets(e) }; a.attachEvent("onload", c); a.src = e.vmlBg; a.removeAttribute("width"); a.removeAttribute("height"); document.body.insertBefore(a, document.body.firstChild) } e.vml.image.fill.src = e.vmlBg; f = false } e.vml.image.fill.on = !f; e.vml.image.fill.color = "none"; e.vml.color.shape.style.backgroundColor = d.backgroundColor; e.runtimeStyle.backgroundImage = "none"; e.runtimeStyle.backgroundColor = "transparent" }, vmlOffsets: function(d) { var h, n, a, e, g, m, f, l, j, i, k; h = d.currentStyle; n = { W: d.clientWidth + 1, H: d.clientHeight + 1, w: this.imgSize[d.vmlBg].width, h: this.imgSize[d.vmlBg].height, L: d.offsetLeft, T: d.offsetTop, bLW: d.clientLeft, bTW: d.clientTop }; a = (n.L + n.bLW == 1) ? 1 : 0; e = function(b, p, q, c, s, u) { b.coordsize = c + "," + s; b.coordorigin = u + "," + u; b.path = "m0,0l" + c + ",0l" + c + "," + s + "l0," + s + " xe"; b.style.width = c + "px"; b.style.height = s + "px"; b.style.left = p + "px"; b.style.top = q + "px" }; e(d.vml.color.shape, (n.L + (d.isImg ? 0 : n.bLW)), (n.T + (d.isImg ? 0 : n.bTW)), (n.W - 1), (n.H - 1), 0); e(d.vml.image.shape, (n.L + n.bLW), (n.T + n.bTW), (n.W), (n.H), 1); g = { X: 0, Y: 0 }; if (d.isImg) { g.X = parseInt(h.paddingLeft, 10) + 1; g.Y = parseInt(h.paddingTop, 10) + 1 } else { for (j in g) { if (g.hasOwnProperty(j)) { this.figurePercentage(g, n, j, h["backgroundPosition" + j]) } } } d.vml.image.fill.position = (g.X / n.W) + "," + (g.Y / n.H); m = h.backgroundRepeat; f = { T: 1, R: n.W + a, B: n.H, L: 1 + a }; l = { X: { b1: "L", b2: "R", d: "W" }, Y: { b1: "T", b2: "B", d: "H"} }; if (m != "repeat" || d.isImg) { i = { T: (g.Y), R: (g.X + n.w), B: (g.Y + n.h), L: (g.X) }; if (m.search("repeat-") != -1) { k = m.split("repeat-")[1].toUpperCase(); i[l[k].b1] = 1; i[l[k].b2] = n[l[k].d] } if (i.B > n.H) { i.B = n.H } d.vml.image.shape.style.clip = "rect(" + i.T + "px " + (i.R + a) + "px " + i.B + "px " + (i.L + a) + "px)" } else { d.vml.image.shape.style.clip = "rect(" + f.T + "px " + f.R + "px " + f.B + "px " + f.L + "px)" } }, figurePercentage: function(d, c, f, a) { var b, e; e = true; b = (f == "X"); switch (a) { case "left": case "top": d[f] = 0; break; case "center": d[f] = 0.5; break; case "right": case "bottom": d[f] = 1; break; default: if (a.search("%") != -1) { d[f] = parseInt(a, 10) / 100 } else { e = false } } d[f] = Math.ceil(e ? ((c[b ? "W" : "H"] * d[f]) - (c[b ? "w" : "h"] * d[f])) : parseInt(a, 10)); if (d[f] % 2 === 0) { d[f]++ } return d[f] }, fixPng: function(c) { c.style.behavior = "none"; var g, b, f, a, d; if (c.nodeName == "BODY" || c.nodeName == "TD" || c.nodeName == "TR") { return } c.isImg = false; if (c.nodeName == "IMG") { if (c.src.toLowerCase().search(/\.png$/) != -1) { c.isImg = true; c.style.visibility = "hidden" } else { return } } else { if (c.currentStyle.backgroundImage.toLowerCase().search(".png") == -1) { return } } g = DD_belatedPNG; c.vml = { color: {}, image: {} }; b = { shape: {}, fill: {} }; for (a in c.vml) { if (c.vml.hasOwnProperty(a)) { for (d in b) { if (b.hasOwnProperty(d)) { f = g.ns + ":" + d; c.vml[a][d] = document.createElement(f) } } c.vml[a].shape.stroked = false; c.vml[a].shape.appendChild(c.vml[a].fill); c.parentNode.insertBefore(c.vml[a].shape, c) } } c.vml.image.shape.fillcolor = "none"; c.vml.image.fill.type = "tile"; c.vml.color.fill.on = false; g.attachHandlers(c); g.giveLayout(c); g.giveLayout(c.offsetParent); c.vmlInitiated = true; g.applyVML(c) } }; try { document.execCommand("BackgroundImageCache", false, true) } catch (r) { } DD_belatedPNG.createVmlNameSpace(); DD_belatedPNG.createVmlStyleSheet();    
// MSDropDown - jquery.dd.js
// author: Marghoob Suleman
// Date: 12th Aug, 2009
// Version: 2.0
// web: www.giftlelo.com | www.marghoobsuleman.com
; (function($) {
    var oldDiv = "";
    $.fn.dd = function(options) {
        $this = this;
        options = $.extend({height: 120,visibleRows: 7,rowHeight: 23,showIcon: true,style: ''}, options);
        var selectedValue = "";
        insideWindow = true;
        config = { postElementHolder: '_msddHolder', postID: '_msdd', postTitleID: '_title', postTitleTextID: '_titletext', postChildID: '_child', postAID: '_msa', postOPTAID: '_msopta', postInputID: '_msinput', postArrowID: '_arrow', postInputhidden: '_inp' };
        styles = { dd: 'dd', ddTitle: 'ddTitle', arrow: 'arrow', ddChild: 'ddChild', disbaled: .30 };
        attributes = { actions: "onfocus,onblur,onchange,onclick,ondblclick,onmousedown,onmouseup,onmouseover,onmousemove,onmouseout,onkeypress,onkeydown,onkeyup", prop: "size,multiple,disabled,tabindex" };
        var elementid = $(this).attr("id");
        var inlineCSS = $(this).attr("style");
        options.style += (inlineCSS == undefined) ? "" : inlineCSS;
        var allOptions = $(this).children();
        var a_array = {}; 
        createDropDown();
        function getPostID(id) {return elementid + config[id];};
        function getOptionsProperties(option) {var currentOption = option;var styles = $(currentOption).attr("style");return styles;};
        function createATags() {var childnodes = allOptions;var aTag = "";var aidfix = getPostID("postAID");var aidoptfix = getPostID("postOPTAID");var selectedText = $("#" + elementid + " option:selected").text();childnodes.each(function(current) {var currentOption = childnodes[current];if (currentOption.nodeName == "OPTGROUP") {aTag += "<div class='opta'>";aTag += "<span style='font-weight:bold;font-style:italic; clear:both;'>" + $(currentOption).attr("label") + "</span>";var optChild = $(currentOption).children();optChild.each(function(currentopt) {var currentOptOption = optChild[currentopt];var aid = aidoptfix + "_" + (current) + "_" + (currentopt);var arrow = $(currentOptOption).attr("title");arrow = (arrow.length == 0) ? "" : '<img src="' + arrow + '" align="left" /> ';var sText = $(currentOptOption).text();var sValue = $(currentOptOption).val();var sEnabledClass = ($(currentOptOption).attr("disabled") == true) ? "disabled" : "enabled";a_array[aid] = { html: arrow + sText, value: sValue, text: sText };var innerStyle = getOptionsProperties(currentOptOption);if ($.trim(selectedText) == $.trim(sText)) {aTag += '<a href="javascript:void(0);" class="selected ' + sEnabledClass + '"';} else {aTag += '<a  href="javascript:void(0);" class="' + sEnabledClass + '"';};if (innerStyle != false)aTag += ' style="' + innerStyle + '"';aTag += ' id="' + aid + '">';aTag += arrow + sText + '</a>';});aTag += "</div>";} else {var aid = aidfix + "_" + (current);var arrow = $(currentOption).attr("title");arrow = (arrow.length == 0) ? "" : '<img src="' + arrow + '" align="left" /> ';var sText = $(currentOption).text();var sValue = $(currentOption).val();var sEnabledClass = ($(currentOption).attr("disabled") == true) ? "disabled" : "enabled";a_array[aid] = { html: arrow + sText, value: sValue, text: sText };var innerStyle = getOptionsProperties(currentOption);if ($.trim(selectedText) == $.trim(sText)) {aTag += '<a href="javascript:void(0);" class="selected ' + sEnabledClass + '"';} else {aTag += '<a  href="javascript:void(0);" class="' + sEnabledClass + '"';};if (innerStyle != false)aTag += ' style="' + innerStyle + '"';aTag += ' id="' + aid + '">';aTag += arrow + sText + '</a>';};});return aTag;};
        function createTitleDiv() { var titleid = getPostID("postTitleID"); var arrowid = getPostID("postArrowID"); var titletextid = getPostID("postTitleTextID"); var inputhidden = getPostID("postInputhidden"); var sText = $("#" + elementid + " option:selected").text(); var arrow = $("#" + elementid + " option:selected").attr("title"); arrow = (arrow == undefined || arrow.length == 0 || options.showIcon == false) ? "" : '<img src="' + arrow + '" align="left" /> '; var sDiv = '<div id="' + titleid + '" class="' + styles.ddTitle + '"'; sDiv += '>'; sDiv += '<span id="' + arrowid + '" class="' + styles.arrow + '"></span><span class="textTitle" id="' + titletextid + '">' + arrow + sText + '</span></div>'; return sDiv; };
        function createDropDown() {var changeInsertionPoint = false;var id = getPostID("postID");var titleid = getPostID("postTitleID");var titletextid = getPostID("postTitleTextID");var childid = getPostID("postChildID");var arrowid = getPostID("postArrowID");var iWidth = $("#" + elementid).width();var sStyle = options.style;if ($("#" + id).length > 0) {$("#" + id).remove();changeInsertionPoint = true;}var sDiv = '<div id="' + id + '" class="' + styles.dd + '"';sDiv += (sStyle != "") ? ' style="' + sStyle + '"' : '';sDiv += '>';sDiv += createTitleDiv();sDiv += '<div id="' + childid + '" class="' + styles.ddChild + '"';sDiv += (sStyle != "") ? ' style="' + sStyle + '"' : '';sDiv += '>';sDiv += createATags();sDiv += "</div>";sDiv += "</div>";if (changeInsertionPoint == true) {var sid = getPostID("postElementHolder");$("#" + sid).after(sDiv);} else {$("#" + elementid).after(sDiv);}$("#" + id).css("width", iWidth + "px");if ($.browser.msie && $.browser.version == "6.0") {$("#" + childid).css("width", (iWidth - 4) + "px");}else {$("#" + childid).css("width", "auto");$("#" + childid).css("min-width", (iWidth - 4) + "px");}if (changeInsertionPoint == false) {setOutOfVision();addNewEvents(elementid);}if ($("#" + elementid).attr("disabled") == true) {$("#" + id).css("opacity", styles.disbaled);} else {applyEvents();$("#" + titleid).bind("mouseover", function(event) {hightlightArrow(1);});$("#" + titleid).bind("mouseout", function(event) {hightlightArrow(0);});$("#" + childid + " a.enabled").bind("click", function(event) {$("#" + childid).unbind("mouseover");setInsideWindow(false);$("#" + childid + " a.selected").removeClass("selected");$(this).addClass("selected");var sText = (options.showIcon == false) ? $(this).text() : $(this).html();setTitleText(sText);setValue();closeMe();});$("#" + childid + " a.disabled").css("opacity", styles.disbaled);$("#" + childid).bind("mouseout", function(event) { setInsideWindow(false); });$("#" + titleid).bind("click", function(event) {setInsideWindow(false);if ($("#" + childid + ":visible").length == 1) {$("#" + childid).unbind("mouseover");} else {$("#" + childid).bind("mouseover", function(event) { setInsideWindow(true); });openMe();};});$("#" + titleid).bind("mouseout", function(evt) {setInsideWindow(false);})};};
        function addNewEvents(id) {document.getElementById(id).refresh = function(e) {$("#" + this.id).dd(options);};};
        function setInsideWindow(val) {insideWindow = val;};
        function getInsideWindow() {return insideWindow;};
        function applyEvents() {var mainid = getPostID("postID");var actions_array = attributes.actions.split(",");for (var iCount = 0; iCount < actions_array.length; iCount++) {var action = actions_array[iCount];var actionFound = $("#" + elementid).attr(action);if (actionFound != undefined) {switch (action) {case "onfocus":$("#" + mainid).bind("mouseenter", function(event) {document.getElementById(elementid).focus();});break;case "onclick":$("#" + mainid).bind("click", function(event) {document.getElementById(elementid).onclick();});break;case "ondblclick":$("#" + mainid).bind("dblclick", function(event) {document.getElementById(elementid).ondblclick();});break;case "onmousedown":$("#" + mainid).bind("mousedown", function(event) {document.getElementById(elementid).onmousedown();});break;case "onmouseup":$("#" + mainid).bind("mouseup", function(event) {document.getElementById(elementid).onmouseup();});break;case "onmouseover":$("#" + mainid).bind("mouseover", function(event) {document.getElementById(elementid).onmouseover();});break;case "onmousemove":$("#" + mainid).bind("mousemove", function(event) {document.getElementById(elementid).onmousemove();});break;case "onmouseout":$("#" + mainid).bind("mouseout", function(event) {document.getElementById(elementid).onmouseout();});break;};};};};
        function setOutOfVision() {var sId = getPostID("postElementHolder");$("#" + elementid).after("<div style='height:0px; overflow:hidden' id='" + sId + "'></div>");$("#" + elementid).appendTo($("#" + sId));};
        function setTitleText(sText) {var titletextid = getPostID("postTitleTextID");$("#" + titletextid).html(sText);};
        function next() {var titletextid = getPostID("postTitleTextID");var childid = getPostID("postChildID");var allAs = $("#" + childid + " a.enabled");for (var current = 0; current < allAs.length; current++) {var currentA = allAs[current];var id = $(currentA).attr("id");if ($(currentA).hasClass("selected") && current < allAs.length - 1) {$("#" + childid + " a.selected").removeClass("selected");$(allAs[current + 1]).addClass("selected");var selectedA = $("#" + childid + " a.selected").attr("id");var sText = (options.showIcon == false) ? a_array[selectedA].text : a_array[selectedA].html;setTitleText(sText);if (parseInt(($("#" + selectedA).position().top + $("#" + selectedA).height())) >= parseInt($("#" + childid).height())) {$("#" + childid).scrollTop(($("#" + childid).scrollTop()) + $("#" + selectedA).height() + $("#" + selectedA).height());};break;};};};
        function previous() {var titletextid = getPostID("postTitleTextID");var childid = getPostID("postChildID");var allAs = $("#" + childid + " a.enabled");for (var current = 0; current < allAs.length; current++) {var currentA = allAs[current];var id = $(currentA).attr("id");if ($(currentA).hasClass("selected") && current != 0) {$("#" + childid + " a.selected").removeClass("selected");$(allAs[current - 1]).addClass("selected");var selectedA = $("#" + childid + " a.selected").attr("id");var sText = (options.showIcon == false) ? a_array[selectedA].text : a_array[selectedA].html;setTitleText(sText);if (parseInt(($("#" + selectedA).position().top + $("#" + selectedA).height())) <= 0) {$("#" + childid).scrollTop(($("#" + childid).scrollTop() - $("#" + childid).height()) - $("#" + selectedA).height());};break;};};};
        function setValue() {var childid = getPostID("postChildID");var sText = $("#" + childid + " a.selected").text();var selectedA = $("#" + childid + " a.selected").attr("id");var sValue = a_array[selectedA].value;$("#" + elementid + " option:selected").text($.trim(sText));$("#" + elementid + " option:selected").val(sValue);};
        function openMe() {var childid = getPostID("postChildID");var titleid = getPostID("postTitleID");var arrowid = getPostID("postArrowID");var titlebg = $("#" + titleid).css("background-image");var arrowbg = $("#" + arrowid).css("background-image");titlebg = titlebg.replace(".gif", "_open.gif");arrowbg = arrowbg.replace(".gif", "_open.gif");$("#" + titleid).css("background-image", titlebg);$("#" + arrowid).css("background-image", arrowbg);if (oldDiv != "" && childid != oldDiv) {$("#" + oldDiv).slideUp("fast");}if ($("#" + childid).css("display") == "none") {selectedValue = a_array[$("#" + childid + " a.selected").attr("id")].text;$(document).bind("keydown", function(event) {var keyCode = event.keyCode;if (keyCode == 39 || keyCode == 40) {event.preventDefault(); event.stopPropagation();next();};if (keyCode == 37 || keyCode == 38) {event.preventDefault(); event.stopPropagation();previous();};if (keyCode == 27 || keyCode == 13) {closeMe();setValue();};if ($("#" + elementid).attr("onkeydown") != undefined) {document.getElementById(elementid).onkeydown();};});$(document).bind("keyup", function(event) {if ($("#" + elementid).attr("onkeyup") != undefined) {document.getElementById(elementid).onkeyup();};});$(document).bind("mouseup", function(evt) {if (getInsideWindow() == false) {closeMe();}});$("#" + childid).slideDown("fast");if (childid != oldDiv) {oldDiv = childid;}};};
        function closeMe() {var childid = getPostID("postChildID");var titleid = getPostID("postTitleID");var arrowid = getPostID("postArrowID");var titlebg = $("#" + titleid).css("background-image");var arrowbg = $("#" + arrowid).css("background-image");titlebg = titlebg.replace("_open.gif", ".gif");arrowbg = arrowbg.replace("_open.gif", ".gif");$("#" + titleid).css("background-image", titlebg);$("#" + arrowid).css("background-image", arrowbg);$(document).unbind("keydown");$(document).unbind("keyup");$(document).unbind("mouseup");$("#" + childid).slideUp("fast", function(event) {checkMethodAndApply();});};
        function checkMethodAndApply() {var childid = getPostID("postChildID");if ($("#" + elementid).attr("onchange") != undefined) {var currentSelectedValue = a_array[$("#" + childid + " a.selected").attr("id")].text;if (selectedValue != currentSelectedValue) { document.getElementById(elementid).onchange(); };}if ($("#" + elementid).attr("onmouseup") != undefined) {document.getElementById(elementid).onmouseup();}if ($("#" + elementid).attr("onblur") != undefined) {$(document).bind("mouseup", function(evt) {$("#" + elementid).focus();$("#" + elementid)[0].blur();setValue();$(document).unbind("mouseup");});};};
        function hightlightArrow(ison) {};
    };
    $.fn.msDropDown = function(properties) {var dds = $(this);for (var iCount = 0; iCount < dds.length; iCount++) {var id = $(dds[iCount]).attr("id");if (properties == undefined) {$("#" + id).dd();} else {$("#" + id).dd(properties);};};};
})(jQuery);
/**
* SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
*   legal reasons.
*/
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, _b) {if (!document.getElementById) { return; }this.DETECT_KEY = _b ? _b : "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 (c) { this.addParam("bgcolor", c); }var q = _8 ? _8 : "high";this.addParam("quality", q);this.setAttribute("useExpressInstall", _7);this.setAttribute("doExpressInstall", false);var _d = (_9) ? _9 : window.location;this.setAttribute("xiRedirectUrl", _d);this.setAttribute("redirectUrl", "");if (_a) { this.setAttribute("redirectUrl", _a); }};
deconcept.SWFObject.prototype = { 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");}_19 = "<embed wmode=\"transparent\" 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"); }_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") + "\" /><param name=\"wmode\" value=\"transparent\" />";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() {if (window.opera || !document.all) { return; }var _2d = document.getElementsByTagName("OBJECT");for (var i = 0; i < _2d.length; i++) {_2d[i].style.display = "none"; for (var x in _2d[i]) {if (typeof _2d[i][x] == "function") { _2d[i][x] = function() { }; } } }};
deconcept.SWFObjectUtil.prepUnload = function() {__flash_unloadHandler = function() { };__flash_savedUnloadHandler = function() { };if (typeof window.onunload == "function") {var _30 = window.onunload;window.onunload = function() {deconcept.SWFObjectUtil.cleanupSWFs(); _30();};} else { window.onunload = deconcept.SWFObjectUtil.cleanupSWFs; } };
if (typeof window.onbeforeunload == "function") {var oldBeforeUnload = window.onbeforeunload;window.onbeforeunload = function() {deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload();};} else { window.onbeforeunload = deconcept.SWFObjectUtil.prepUnload; }
if (Array.prototype.push == null) {Array.prototype.push = function(_31) {this[this.length] = _31;return this.length;};}
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject;
var SWFObject = deconcept.SWFObject;

/*
 * jQuery Autocomplete plugin 1.1
 *
 * Copyright (c) 2009 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
 */

;(function($) {
    $.fn.extend({autocomplete: function(urlOrData, options) {var isUrl = typeof urlOrData == "string";options = $.extend({}, $.Autocompleter.defaults, {url: isUrl ? urlOrData : null,data: isUrl ? null : urlOrData,delay: isUrl ? $.Autocompleter.defaults.delay : 10,max: options && !options.scroll ? 10 : 150}, options);options.highlight = options.highlight || function(value) { return value; };options.formatMatch = options.formatMatch || options.formatItem;return this.each(function() {new $.Autocompleter(this, options);});},result: function(handler) {return this.bind("result", handler);},search: function(handler) {return this.trigger("search", [handler]);},flushCache: function() {return this.trigger("flushCache");},setOptions: function(options) {return this.trigger("setOptions", [options]);},unautocomplete: function() {return this.trigger("unautocomplete");}});
    $.Autocompleter = function(input, options) {
        var KEY = {UP: 38,DOWN: 40,DEL: 46,TAB: 9,RETURN: 13,ESC: 27,COMMA: 188,PAGEUP: 33,PAGEDOWN: 34,BACKSPACE: 8};
        // Create $ object for input element
        var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
        var timeout;
        var previousValue = "";
        var cache = $.Autocompleter.Cache(options);
        var hasFocus = 0;
        var lastKeyPressCode;
        var config = {mouseDownOnSelect: false};
        var select = $.Autocompleter.Select(options, input, selectCurrent, config);
        var blockSubmit;
        // prevent form submit in opera when selecting with return key
        $.browser.opera && $(input.form).bind("submit.autocomplete", function() {if (blockSubmit) {blockSubmit = false;return false;}});
        // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
        $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {hasFocus = 1;lastKeyPressCode = event.keyCode;switch (event.keyCode) {case KEY.UP:event.preventDefault();if (select.visible()) {select.prev();} else {onChange(0, true);}break;case KEY.DOWN:event.preventDefault();if (select.visible()) {select.next();} else {onChange(0, true);}break;case KEY.PAGEUP:event.preventDefault();if (select.visible()) {select.pageUp();} else {onChange(0, true);}break;case KEY.PAGEDOWN:event.preventDefault();if (select.visible()) {select.pageDown();} else {onChange(0, true);}break;case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:case KEY.TAB:case KEY.RETURN:if (selectCurrent()) {event.preventDefault();blockSubmit = true;return false;}break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout = setTimeout(onChange, options.delay);break;}}).focus(function() {hasFocus++;}).blur(function() {hasFocus = 0;if (!config.mouseDownOnSelect) {hideResults();}}).click(function() {if (hasFocus++ > 1 && !select.visible()) {onChange(0, true);}}).bind("search", function() {var fn = (arguments.length > 1) ? arguments[1] : null;function findValueCallback(q, data) {var result;if (data && data.length) {for (var i = 0; i < data.length; i++) {if (data[i].result.toLowerCase() == q.toLowerCase()) {result = data[i];break;}}}if (typeof fn == "function") fn(result);else $input.trigger("result", result && [result.data, result.value]);}$.each(trimWords($input.val()), function(i, value) {request(value, findValueCallback, findValueCallback);});}).bind("flushCache", function() {cache.flush();}).bind("setOptions", function() {$.extend(options, arguments[1]);if ("data" in arguments[1])cache.populate();}).bind("unautocomplete", function() {select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});
        function selectCurrent() {var selected = select.selected();if (!selected)return false;var v = selected.result;previousValue = v;if (options.multiple) {var words = trimWords($input.val());if (words.length > 1) {var seperator = options.multipleSeparator.length;var cursorAt = $(input).selection().start;var wordAt, progress = 0;$.each(words, function(i, word) {progress += word.length;if (cursorAt <= progress) {wordAt = i;return false;}progress += seperator;});words[wordAt] = v;v = words.join(options.multipleSeparator);}v += options.multipleSeparator;}$input.val(v);hideResultsNow();$input.trigger("result", [selected.data, selected.value]);return true;}
        function onChange(crap, skipPrevCheck) {if (lastKeyPressCode == KEY.DEL) {select.hide();return;}var currentValue = $input.val();if (!skipPrevCheck && currentValue == previousValue)return;previousValue = currentValue;currentValue = lastWord(currentValue);if (currentValue.length >= options.minChars) {$input.addClass(options.loadingClass);if (!options.matchCase)currentValue = currentValue.toLowerCase();request(currentValue, receiveData, hideResultsNow);} else {stopLoading();select.hide();}};
        function trimWords(value) {if (!value)return [""];if (!options.multiple)return [$.trim(value)];return $.map(value.split(options.multipleSeparator), function(word) {return $.trim(value).length ? $.trim(word) : null;});}
        function lastWord(value) {if (!options.multiple)return value;var words = trimWords(value);if (words.length == 1)return words[0];var cursorAt = $(input).selection().start;if (cursorAt == value.length) {words = trimWords(value)} else {words = trimWords(value.replace(value.substring(cursorAt), ""));}return words[words.length - 1];}
        function autoFill(q, sValue) {if (options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE) {$input.val($input.val() + sValue.substring(lastWord(previousValue).length));$(input).selection(previousValue.length, previousValue.length + sValue.length);}};
        function hideResults() {clearTimeout(timeout);timeout = setTimeout(hideResultsNow, 200);};
        function hideResultsNow() {var wasVisible = select.visible();select.hide();clearTimeout(timeout);stopLoading();if (options.mustMatch) {$input.search(function(result) {if (!result) {if (options.multiple) {var words = trimWords($input.val()).slice(0, -1);$input.val(words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : ""));}else {$input.val("");$input.trigger("result", null);}}});}};
        function receiveData(q, data) {if (data && data.length && hasFocus) {stopLoading();select.display(data, q);autoFill(q, data[0].value);select.show();} else {hideResultsNow();}};
        function request(term, success, failure) {if (!options.matchCase)term = term.toLowerCase();var data = cache.load(term);if (data && data.length) {success(term, data);} else if ((typeof options.url == "string") && (options.url.length > 0)) {var extraParams = {timestamp: +new Date()};$.each(options.extraParams, function(key, param) {extraParams[key] = typeof param == "function" ? param() : param;});$.ajax({mode: "abort",port: "autocomplete" + input.name,dataType: options.dataType,url: options.url,data: $.extend({q: lastWord(term),limit: options.max}, extraParams),success: function(data) {var parsed = options.parse && options.parse(data) || parse(data);cache.add(term, parsed);success(term, parsed);}});} else {select.emptyList();failure(term);}};
        function parse(data) {var parsed = [];var rows = data.split("\n");for (var i = 0; i < rows.length; i++) {var row = $.trim(rows[i]);if (row) {row = row.split("|");parsed[parsed.length] = {data: row,value: row[0],result: options.formatResult && options.formatResult(row, row[0]) || row[0]};}}return parsed;};
        function stopLoading() {$input.removeClass(options.loadingClass);};
    };
    $.Autocompleter.defaults = {inputClass: "ac_input",resultsClass: "ac_results",loadingClass: "ac_loading",minChars: 1,delay: 400,matchCase: false,matchSubset: true,matchContains: false,cacheLength: 10,max: 100,mustMatch: false,extraParams: {},selectFirst: true,formatItem: function(row) { return row[0]; },formatMatch: null,autoFill: false,width: 0,multiple: false,multipleSeparator: ", ",highlight: function(value, term) {return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");},scroll: true,scrollHeight: 180};
    $.Autocompleter.Cache = function(options) {
    var data = {};
    var length = 0;
    function matchSubset(s, sub) {if (!options.matchCase)s = s.toLowerCase();var i = s.indexOf(sub);if (options.matchContains == "word") {i = s.toLowerCase().search("\\b" + sub.toLowerCase());}if (i == -1) return false;return i == 0 || options.matchContains;};
    function add(q, value) {if (length > options.cacheLength) {flush();}if (!data[q]) {length++;}data[q] = value;}
    function populate() {if (!options.data) return false;var stMatchSets = {},nullData = 0;if (!options.url) options.cacheLength = 1;stMatchSets[""] = [];for (var i = 0, ol = options.data.length; i < ol; i++) {var rawValue = options.data[i];rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;var value = options.formatMatch(rawValue, i + 1, options.data.length);if (value === false)continue;var firstChar = value.charAt(0).toLowerCase();if (!stMatchSets[firstChar])stMatchSets[firstChar] = [];var row = {value: value,data: rawValue,result: options.formatResult && options.formatResult(rawValue) || value};stMatchSets[firstChar].push(row);if (nullData++ < options.max) {stMatchSets[""].push(row);}};$.each(stMatchSets, function(i, value) {options.cacheLength++;add(i, value);});}
    setTimeout(populate, 25);
    function flush() {data = {};length = 0;}
    return {flush: flush,add: add,populate: populate,load: function(q) {if (!options.cacheLength || !length)return null;if (!options.url && options.matchContains) {var csub = [];for (var k in data) {if (k.length > 0) {var c = data[k];$.each(c, function(i, x) {if (matchSubset(x.value, q)) {csub.push(x);}});}}return csub;} else if (data[q]) {return data[q];} else if (options.matchSubset) {for (var i = q.length - 1; i >= options.minChars; i--) {var c = data[q.substr(0, i)];if (c) {var csub = [];$.each(c, function(i, x) {if (matchSubset(x.value, q)) {csub[csub.length] = x;}});return csub;}}}return null;}};};
    $.Autocompleter.Select = function(options, input, select, config) {var CLASSES = {ACTIVE: "ac_over"};
    var listItems,active = -1,data,term = "",needsInit = true,element,list;
    // Create results
    function init() {if (!needsInit)return;element = $("<div/>").hide().addClass(options.resultsClass).css("position", "absolute").appendTo(document.body);list = $("<ul/>").appendTo(element).mouseover(function(event) {if (target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event) {$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function() {config.mouseDownOnSelect = true;}).mouseup(function() {config.mouseDownOnSelect = false;});if (options.width > 0)element.css("width", options.width);needsInit = false;}
    function target(event) {var element = event.target;while (element && element.tagName != "LI")element = element.parentNode;if (!element)return [];return element;}
    function moveSelect(step) {listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);if (options.scroll) {var offset = 0;listItems.slice(0, active).each(function() {offset += this.offsetHeight;});if ((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());} else if (offset < list.scrollTop()) {list.scrollTop(offset);}}};
    function movePosition(step) {active += step;if (active < 0) {active = listItems.size() - 1;} else if (active >= listItems.size()) {active = 0;}}
    function limitNumberOfItems(available) {return options.max && options.max < available? options.max: available;}

    function fillList() {list.empty();var max = limitNumberOfItems(data.length);for (var i = 0; i < max; i++) {if (!data[i])continue;var formatted = options.formatItem(data[i].data, i + 1, max, data[i].value, term);if (formatted === false)continue;var li = $("<li/>").html(options.highlight(formatted, term)).addClass(i % 2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];$.data(li, "ac_data", data[i]);}listItems = list.find("li");if (options.selectFirst) {listItems.slice(0, 1).addClass(CLASSES.ACTIVE);active = 0;}if ($.fn.bgiframe){ list.bgiframe(); }}return { display: function(d, q) { init(); data = d; term = q; fillList(); }, next: function() { moveSelect(1); }, prev: function() { moveSelect(-1); }, pageUp: function() { if (active != 0 && active - 8 < 0) { moveSelect(-active); } else { moveSelect(-8); } }, pageDown: function() { if (active != listItems.size() - 1 && active + 8 > listItems.size()) { moveSelect(listItems.size() - 1 - active); } else { moveSelect(8); } }, hide: function() { element && element.hide(); listItems && listItems.removeClass(CLASSES.ACTIVE); active = -1; }, visible: function() { return element && element.is(":visible"); }, current: function() { return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]); }, show: function() { var offset = $(input).offset(); element.css({ width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(), top: offset.top + input.offsetHeight, left: offset.left }).show(); if (options.scroll) { list.scrollTop(0); list.css({ maxHeight: options.scrollHeight, overflow: 'auto' }); if ($.browser.msie && typeof document.body.style.maxHeight === "undefined") { var listHeight = 0; listItems.each(function() { listHeight += this.offsetHeight; }); var scrollbarsVisible = listHeight > options.scrollHeight; list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight); if (!scrollbarsVisible) { listItems.width(list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right"))); } } } }, selected: function() { var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); return selected && selected.length && $.data(selected[0], "ac_data"); }, emptyList: function() { list && list.empty(); }, unbind: function() { element && element.remove(); } };};
    $.fn.selection = function(start, end) { if (start !== undefined) { return this.each(function() { if (this.createTextRange) { var selRange = this.createTextRange(); if (end === undefined || start == end) { selRange.move("character", start); selRange.select(); } else { selRange.collapse(true); selRange.moveStart("character", start); selRange.moveEnd("character", end); selRange.select(); } } else if (this.setSelectionRange) { this.setSelectionRange(start, end); } else if (this.selectionStart) { this.selectionStart = start; this.selectionEnd = end; } }); } var field = this[0]; if (field.createTextRange) { var range = document.selection.createRange(), orig = field.value, teststring = "<->", textLength = range.text.length; range.text = teststring; var caretAt = field.value.indexOf(teststring); field.value = orig; this.selection(caretAt, caretAt + textLength); return { start: caretAt, end: caretAt + textLength} } else if (field.selectionStart !== undefined) { return { start: field.selectionStart, end: field.selectionEnd} } };

})(jQuery);
function BuildFileList() {FileList.empty();var filesVal = Files.val();if (filesVal != "") {var filesArr = GetArrayOfFiles(filesVal);for (i = 0; i < filesArr.length; i++) {var strId = filesArr[i].match(/<!--([\w\d-]+)-->/)[1];var strName = filesArr[i].match(/-->(.+)$/)[1];var strHtml = "<span><a href=\"#\" title=\"Remove this file\" " +"onclick=\"return RemoveFile('" + strId +"', '" + strName + "');\">X</a>" + strName + "</span>";FileList.html(FileList.html() + strHtml);}}else {FileList.html("No files");}}
function BrowseFolder(folderId) {var keywords = "";var url = "/US/_layouts/CTAssets/ashx/fileattachments.ashx?folder=" + folderId;$('.files-browser-content').html("");$('.files-browser-loading').show();$.get(url, function(data) {if (data.length > 1) {$('.files-browser-loading').fadeOut('fast', function() {$('.files-browser-content').html(data);});}else {$('.files-browser-loading').fadeOut('fast');}});}
function GetArrayOfFiles(filesString) {var filesArr = filesString.split(",");if (filesString.length > 0) {for (i = 0; i < filesArr.length; i++) {filesArr[i] = jQuery.trim(filesArr[i]);}}return filesArr;}
function AddFile(fileId, fileName) {var filesArr = GetArrayOfFiles(Files.val());var fileString = "<!--" + fileId + "-->" + fileName;if (Files.val() == "") {Files.val(fileString);}else if (jQuery.inArray(fileString, filesArr) < 0) {Files.val(Files.val() + ", " + fileString);}BuildFileList();return false;}
function RemoveFile(fileId, fileName) {var filesArr = GetArrayOfFiles(Files.val());var fileIndex = jQuery.inArray("<!--" + fileId + "-->" + fileName, filesArr);if (fileIndex >= 0) {filesArr.splice(fileIndex, 1);}var filesVal = "";for (i = 0; i < filesArr.length; i++) {filesVal += filesArr[i] + ", ";}Files.val(filesVal.slice(0, filesVal.length - 2));BuildFileList();return false;}