function XavierNonsense(){a='13b8fb66af56aeab5fe6371942091eca0462cd06fb808a031619b89ee7b9ac8d356ba63c';a='bd8bc51dfc8891f3ec38434f8073115f9bb442da45aa5ba0b30e42f05ca8f2841525df2e';};function XavierJsLatModified(){return '1272570850';};/** see: http://andreaslagerkvist.com/jquery/center/ */jQuery.fn.center=function(absolute){return this.each(function(){var t=jQuery(this);if(jQuery.browser.msie && jQuery.browser.version=="6.0"){absolute=1;}t.css({position:absolute ? 'absolute':'fixed',left:'50%',top:'50%',zIndex:'99'}).css({marginLeft:'-'+(t.outerWidth()/2)+'px', marginTop:'-'+(t.outerHeight()/2)+'px'});if (absolute){t.css({marginTop:parseInt(t.css('marginTop'),10)+jQuery(window).scrollTop(), marginLeft:parseInt(t.css('marginLeft'),10)+jQuery(window).scrollLeft()});}});};
/**
 * 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
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 * used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 * If set to null or omitted, the cookie will be a session cookie and will not be retained
 * when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 * require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
 if (typeof value != 'undefined') { // name and value given, set cookie
 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(); // use expires attribute, max-age is not supported by IE
 }
 // CAUTION: Needed to parenthesize options.path and options.domain
 // in the following expressions, otherwise they evaluate to undefined
 // in the packed version for some reason...
 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 { // only name given, get cookie
 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]);
 // Does this cookie string begin with the name we want?
 if (cookie.substring(0, name.length + 1) == (name + '=')) {
 cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
 break;
 }
 }
 }
 return cookieValue;
 }
};
/**
 * All materials custom written for Irrigation Direct by Xavier Berkeley
 *
 * @copyright 2009 Xavier Berkeley, LLC
 */
 /* All on-ready functions that we want to load to initialize the page should be included here 
 - note that prototype will aslo be generating some onready events that are default with 
 magento and will run asynchronously from this onready */

function XbShippingObject()
{
 this.phrases=new Object();
 this.data=new Object();
 this.paint=function(){
 this.loadCartSubtotal();
 this._updateCostsHTML();
 this._updateMessagesHTML();
 this._prepareForm();
 this._clearMask();
 jQuery(".btn-remove").bind("click",XBPrepareDelete);
 return this;
 };
 this.init=function(){
 this.loadData();
 //window.miniZipForm = new VarienForm('mini-ship-form', true);
 this.set('originalSubtotal',this.get('subtotal')).set('originalZipCode',this.get('zipCode')).set('noFailureMessages',true);
 if(this.hasValidZip() && this.isFreeUnknown()){
 this.checkZip();
 }
 this.promptForZipIfNecessary();
 if(jQuery.cookie("shipzippagewait")){jQuery.cookie("shipzippagewait",Math.max(jQuery.cookie("shipzippagewait")-1,1),{path:'/'});}else{jQuery.cookie("shipzippagewait",1,{path:'/'});}
 return this;
 };
 this.loadData=function(){
 if(typeof XBShippingData=='object'){
 for(datagroup in XBShippingData){
 for(data in XBShippingData[datagroup]){
 this.set(data,XBShippingData[datagroup][data]);
 }
 }
 }
 if(typeof XBShippingMessages=='object'){
 for(datagroup in XBShippingMessages){
 for(data in XBShippingMessages[datagroup]){
 this.setPhrase(data,XBShippingMessages[datagroup][data]);
 }
 }
 }
 this.loadCartSubtotal();
 this.setValuesFromCookie();
 return this;
 };
 this.promptForZipIfNecessary=function(){if(this.get('promptForZip')==1&&!this.hasValidZip()&&jQuery.cookie("shipzippagewait")==1){this.showZipDialog();}};
 this.showZipDialog=function(){try{jQuery("#shipping-zone-mask").appendTo("body").height(jQuery(document).height()).show();jQuery("#shipping-zone-wrapper").appendTo("body").center().css("z-index","9999").show();jQuery("#shipping-zone-zip").focus();}catch(e){}};
 this.hideZipDialog=function(){jQuery("#shipping-zone-wrapper").hide();jQuery("#shipping-zone-mask").hide();jQuery.cookie("shipzippagewait",25,{path:'/'});};
 this.loadCartSubtotal=function(){
 cartSub=parseFloat(((jQuery("a#minicart-cart span.price").html()).substring(1)).replace(',',''));
 if(cartSub!=this.get('subtotal')){
 this.set('subtotal',cartSub).set('shippingEstimate',0.00);
 }else{
 this.set('subtotal',cartSub);
 }
 };
 this.getSpendMoreAmount=function(){
 formatted=((arguments.length>0)&&(arguments[0]==true));
 try{
 amount=(this.isFreeShippingAmount())?0.0000:(this.get('freeShippingMinimum')-this.get('subtotal'));
 return formatted ? XBUtil.formatCurrency(amount,2):amount;
 }catch(e){
 if(formatted){
 return XBUtil.formatCurrency(0.0000,2);
 }else{
 return 0.0000
 }
 }
 };
 this.isValidZip=function(){
 z=arguments[0];
 if(!z){
 return false;
 }
 if(z.length<5||z.length>10){
 return false;
 }
 return true;
 };
 this.hasValidZip=function(){
 return this.isValidZip(this.get('zipCode'));
 };
 this.get=function(){
 try{
 return this.data[arguments[0]];
 }catch(e){
 return 0;
 }
 };
 this.set=function(){
 this.data[arguments[0]]=arguments[1];
 return this;
 };
 this.setPhrase=function(){
 this.phrases[arguments[0]]=arguments[1];
 return this;
 };
 this.getPhrase=function(){
 if(arguments.length==2){
 try{
 return XBUtil.sprintf(this.phrases[arguments[0]],arguments[1]);
 }catch(e){
 return '';
 }
 }else{
 try{
 return this.phrases[arguments[0]];
 }catch(e){
 return '';
 }
 }
 };
 this.getFreeShippingMessage=function(){
 //if(!this.shouldShowFreeMessage()&&this.get('noFailureMessages')){
 // return '';
 //}
 if(this.isFreeNotAllowed()){
 return this.getPhrase('noFreeQualify');
 }
 else if(this.isFreeShipping()){
 return this.getPhrase('freeAvailable');
 }
 else if(this.isFreeAllowed()){
 return this.getPhrase('freeQualify',new Array(this.getSpendMoreAmount(true)));
 }
 else if(this.isFreeShippingAmount()){
 return this.getPhrase('freeMayBeAvailable');
 }
 return '';
 };
 this.getRateQuoteMessage=function(){
 return this.getPhrase('quoteStatusError');
 };
 this.getShippingAmount=function(){
 try{
 if(this.isFreeShipping()){
 return 0.00;
 }
 return this.get('shippingEstimate');
 }catch(e){
 return 0.00;
 }
 };
 this.getShippingDisplayAmount=function(){
 };
 this.shouldShowFreeMessage=function(){
 return !this.isFreeNotAllowed();
 };
 this.isFreeShippingAmount=function(){
 return this.get('subtotal')>=this.get('freeShippingMinimum');
 };
 this.isFreeShipping=function(){
 return (this.isFreeAllowed()&&this.isFreeShippingAmount());
 };
 this.isFreeAllowed=function(){
 return this.get('freeShippingAvailable')==1;
 };
 this.isFreeNotAllowed=function(){
 return this.get('freeShippingAvailable')==2;
 };
 this.isFreeUnknown=function(){
 return this.get('freeShippingAvailable')==0;
 };
 this.isUSPSAllowed=function(){
 return(this.get('weight')&&(this.get('weight')<2.0001)&&!this.isEmptyCart());
 };
 this.isEmptyCart=function(){
 return this.get('subtotal')<0.01;
 };
 this.isQuoteValid=function(){
 try{
 return this.get('subtotal')==this.get('originalSubtotal');
 }catch(e){
 return true;
 }
 };
 this.isFreeZipValid=function(){
 try{
 return this.get('zipCode')==this.get('originalZipCode');
 }catch(e){
 return true;
 }
 };
 this.isFreeZipReloadAllowed=function(){
 return false ;
 if(this.get('forceFreeZipReload')){
 return true;
 } 
 return false;
 };
 this.setValuesFromCookie=function(){
 if(!this.get('cookieValue')){
 return this;
 }
 if(this.hasValidZip()){
 return this;
 }
 try{
 cv=this.get('cookieValue').split("___");
 if(this.isValidZip(cv[0])){
 this.set('zipCode',cv[0]);
 if(cv.length>1){
 st=parseInt(cv[1]);
 if(st<3&&st>-1){
 this.set('freeShippingAvailable',st);
 }
 }
 }
 }catch(e){}
 return this;
 };
 this.isQuoteReloadAllowed=function(){
 return true ;
 return (!this.isEmptyCart()&&!this.isFreeShipping()&&(!this.isQuoteValid()||!this.isFreeZipValid()))
 };
 this.checkZip=function(){
 jQuery("#minicart-show").stopTime("hide");
 if(arguments.length>0){
 if(this.isValidZip(arguments[0])){
 this.set('zipCode',arguments[0]);
 }else{
 return false;
 }
 }
 if(!this.hasValidZip()){
 this.set('shippingEstimate',0.00).paint();
 return false;
 }
 if(this.isFreeZipReloadAllowed()){
 this._prepareMask();
 this._checkFreeShipping();
 }
 if(this.isQuoteReloadAllowed()){
 this._prepareMask();
 this.set('originalZipCode',this.get('zipCode')).set('originalSubtotal',this.get('subtotal'));
 this._checkRateQuote();
 }
 };
 this._checkFreeShipping=function(){
 jQuery.getJSON("/shippingzip",{is_ajax:1,zip_code:this.get('zipCode')},function(data){
 XBS.set('noFailureMessages',false).set('state',data[0]['state_abbreviation']).set('city',data[0]['city_name']).set('freeShippingAvailable',parseInt(data[0]['status'])).paint().set('noFailureMessages',true).set('originalZipCode',data[0]['zip_code']);
 });
 };
 this._checkRateQuote=function(){ 
 jQuery.getJSON("/xbcheckout/onepage/miniSaveShipping/",{is_ajax:1,zip_code:this.get('zipCode')},function(data){
 try{
 if(data.status=='success'){
 XBS.set('shippingEstimate',parseFloat(data.rate)).set('quoteStatus',null).set('state',data.state_abbreviation).set('city',data.city_name).set('freeShippingAvailable',parseInt(data.freeShippingAvailable)).set('title',data.title).set('code',data.code).paint();
 }
 else{
 XBS.set('quoteStatus',data.status).set('shippingEstimate',0.00).set('freeShippingAvailable',data.freeShippingAvailable).paint();
 jQuery("#mini-ship-messages-js-quote").html('<div class="error-msg" style="margin:5px;">'+XBS.getRateQuoteMessage()+'</div>');
 }
 }catch(e){
 alert(e);
 XBS.set('subtotal',0.0000).set('shippingEstimate',0.00).paint();
 }
 });};
 this._setPriceDefaults=function(){
 if(isNaN(this.get('subtotal'))){
 this.set('subtotal',0.0000);
 }
 if(isNaN(this.get('shippingEstimate'))){
 this.set('shippingEstimate',0.00);
 }
 };
 this._updateCostsHTML=function(){
 this._setPriceDefaults();
 jQuery("#mini-ship-subtotal-product").html(XBUtil.formatCurrency(this.get('subtotal')));
 var sTitle="";
 if(this.isFreeShipping()){
 sCost='FREE';
 sTitle="UPS Ground";
 }else if((parseFloat(this.get('subtotal'))==0.0)&&this.hasValidZip()){
 sCost=XBUtil.formatCurrency(0.00,2);
 }else if(this.get('quoteStatus')){
 sCost=XBUtil.formatCurrency(0.00,2);
 }else if(this.get('shippingEstimate')>0){
 sCost=XBUtil.formatCurrency(this.get('shippingEstimate'));
 sTitle=this.get('shippingTitle')+" ("+this.get('weight').toString()+"lbs)";
 }else if(this.hasValidZip()){
 sCost=XBUtil.formatCurrency(0.00,2);
 }else{
 sCost=this.getPhrase('defaultPrice');
 }
 jQuery("#mini-ship-subtotal-shipping").attr("title",sTitle).html(sCost);
 jQuery("#mini-ship-subtotal-total").html(XBUtil.formatCurrency(this.get('subtotal')+this.getShippingAmount()));
 
 };
 this._updateMessagesHTML=function(){
 if(this.isFreeShipping()){
 msgclass='success-msg';
 jQuery(".userShippingMessage").html(this.getFreeShippingMessage()).removeClass("noticemsg").addClass("successmsg").css("visibility","visible") ;
 }else if(this.isFreeAllowed()){
 msgclass='notice-msg';
 jQuery(".userShippingMessage").html(this.getFreeShippingMessage()).removeClass("successmsg").addClass("noticemsg").css("visibility","visible") ;
 }else{
 msgclass='nothing';
 if(!this.hasValidZip()){jQuery(".userShippingMessage").css("visibility","visible");}else{jQuery(".userShippingMessage").css("visibility","hidden");}
 }
 jQuery("#mini-ship-messages-js").html(jQuery("<div>").addClass(msgclass).css("margin","5px").html(this.getFreeShippingMessage()));
 if(this.get('city') == ''){jQuery("#shippingLocation").click(function(){XBS.showZipDialog();}).html('<span id="ship-to-link" title="click to change your shipping location">Enter your Shipping Destination</span>');}else{jQuery("#shippingLocation").click(function(){XBS.showZipDialog();}).html('<span id="ship-to-link" title="click to change your shipping location">Shipping to:</span> '+this.get('city')+', '+this.get('state'));}
 
 };
 this._prepareForm=function(){
 jQuery("#mini-ship-input-zip").attr("value",(this.hasValidZip())?this.get('zipCode'):"Zip Code").bind("focus",XBZipFocus);
 jQuery("#mini-ship-form").unbind("submit").bind("submit",function(){
 XBS.checkZip(jQuery("#mini-ship-input-zip").attr("value"));return false;
 });
 jQuery("div.xbButton.xbButtonCalculateShipping").unbind("click").bind("click",function(){
 XBS.checkZip(jQuery("#mini-ship-input-zip").attr("value"));
 return false;
 });
 };
 this._prepareMask=function(){
 jQuery("#mini-ship-messages-js-quote").html("");
 jQuery("#mini-ship-messages-js").html("");
 jQuery("#mini-ship-mask").height(jQuery("#mini-ship").height()).show();
 };
 this._clearMask=function(){
 jQuery("#mini-ship-mask").hide();
 };
 this.prepareDelete=function(){
 this.set('subtotal',0.0000).set('shippingEstimate',0.00).paint();
 };
};
function XBPrepareDelete(){
 if(typeof XBS=='undefined'){
 window.XBS=new XbShippingObject();
 }
 XBS.prepareDelete();
};
function XBZipFocus(){
 jQuery(this).unbind("blur",XBZipFocus);
 if(jQuery(this).attr("value")=="Zip Code"){
 jQuery(this).attr("value","");
 }
};
jQuery(document).ready(function(){
 window.XBS=new XbShippingObject() ;
 XBS.init().paint();
});

var XBUtil={
formatCurrency:function(){
 fixed=2;if(arguments.length>1){fixed=arguments[1];}
 try{
 dc=parseFloat(arguments[0].toString().replace(/\$|\,/g,'')).toFixed(fixed).toString().split('.');
 if(isNaN(dc[0])){rval=0.0;return "$"+rval.toFixed(fixed).toString();}
 dollar=dc[0];cents=dc[1];var rgx = /(\d+)(\d{3})/;
 while (rgx.test(dollar)){dollar=dollar.replace(rgx, '$1'+','+'$2');}
 return "$"+dollar+"."+cents;
 }catch(e){rval=0.0;return "$"+rval.toFixed(fixed).toString();}
 },
sprintf:function(){
 str='';s=arguments[0];if(!s){return '';}s=s.split('%s');r=arguments[1];r.push('');for(i=0;i<s.length;i++){str+=s[i]+r[i]}return str;
 }
};
/* End of XBShipping */

function updateQuickCart( content ) {
 jQuery(".quickCart .cartwrap").css("visibility","hidden");
 jQuery(".quickCart, #minicart-show, #minicart-chad").unbind("mouseenter").unbind("mouseleave");
 
 jQuery(".quickCart").slideUp(300, function() {
 jQuery("#minicart").html( content );
 createQuickcartLinks();
 //XBShipping.updateSubtotal();
 //XBShipping.prepareQuickCartShipping();
 //XBShipping.getRate();
 try{XBS.init().paint().checkZip();}catch(e){}
 jQuery("#minicart-show").trigger("click");
 setupQuickcartEvents();
 startCartHideTimer(7500);
 });
}

// start timer to hide cart
function startCartHideTimer(duration) {
 if ( jQuery("#mini-ship-input-zip:focus").size() > 0 ) {
 return false;
 }
 jQuery("#minicart-show").stopTime("hide");
 jQuery("#minicart-show").oneTime(duration, "hide", function() {
 jQuery(".quickCart .cartwrap").css("visibility","hidden");
 jQuery(".quickCart").slideUp(300, function() {
 jQuery("#minicart-show").stopTime("ch-hide");
 jQuery("#minicart-chad").slideDown(200, function() {
 startChadHideTimer(6000);
 });
 });
 jQuery(document).unbind("click");
 createQuickcartLinks();
 setupQuickcartEvents();
 });
}

// set up click toggle functionality for #minicart-show
function createQuickcartLinks() {
 jQuery("#minicart-show, #minicart-chad").unbind("click").click( function() {
 jQuery("#minicart-show").unbind("click");
 jQuery(this).stopTime("hide");
 jQuery(".quickCart .cartwrap").css("visibility","hidden");
 jQuery(".quickCart").slideDown(500, function() {
 // on click anywhere but the update cart OK box or quickCart, hide quickCart
 jQuery(document).unbind("click").click( function(e) {
 setupQuickcartEvents();
 if ( jQuery(e.target).parents("#minicart").size() == 0 && jQuery(e.target).parents(".ajaxcartpro_confirm").size() == 0 ) {
 jQuery(".quickCart .cartwrap").css("visibility","hidden");
 jQuery(".quickCart").slideUp(300);
 createQuickcartLinks();
 jQuery(document).unbind("click");
 }
 });
 jQuery("#minicart-show, #minicart-chad").unbind("click").click( function() {
 jQuery("#minicart-show").unbind("click");
 jQuery(document).unbind("click");
 jQuery(".quickCart .cartwrap").css("visibility","hidden");
 jQuery(".quickCart").slideUp(300, function(){
 createQuickcartLinks();
 setupQuickcartEvents();
 });
 });
 jQuery(".quickCart .cartwrap").hide().css("visibility","visible").fadeIn(200);
 });
 });
 jQuery("#minicartinner button.cart-button").attr("onclick","").unbind("click").click( xbCartLink );

}

function showProgressBlockFor(el) {
 jQuery(el).next("dd.complete").slideToggle(200);
}
function setupQuickcartEvents() {
 // set width of quickCart so it looks right on first use in ie
 jQuery(".quickCart").css("width","240px");
 
 // Stop timer when mouse enters quickcart or minicart-show, start when it leaves
 jQuery(".quickCart, #minicart-show, #minicart-chad").unbind("mouseenter").unbind("mouseleave").hover( function() { 
 jQuery("#minicart-chad").slideDown(200);
 jQuery("#minicart-show").stopTime("hide");
 jQuery("#minicart-show").stopTime("ch-hide");
 // console.log("stop");
 }, function() {
 jQuery("#minicart-show").stopTime("hide");
 jQuery("#minicart-show").stopTime("ch-hide");
 startCartHideTimer(2000);
 startChadHideTimer(6000);
 });
}
function jtest(){
//alert(XBShipping.AVAILABLE);
}
// tierPricing charts
 function hideTierPriceCharts() {
 jQuery(".listTierPrice").each( function() {
 if ( jQuery(this).parents(".tierPricesIcon").size() > 0 ) {
 jQuery(this).css("visibility","hidden");
 }
 else {
 jQuery(this).css("visibility","visible").css("display","block");
 }
 });
 jQuery(document).unbind("click");
 }
 
 function setUpTierPriceCharts() {
 hideTierPriceCharts();
 jQuery(".tierPricesIcon").each( function() {
 jQuery(this).unbind("click").click( function() {
 hideTierPriceCharts();
 jQuery(this).children(".listTierPrice").css("visibility","visible");
 setTimeout('jQuery(document).click( function(e) { if ( jQuery(e.target).hasClass(".tierPricing") == false && jQuery(e.target).parents(".tierPricing").size() == 0 ) { hideTierPriceCharts(); setUpTierPriceCharts(); } });',100);
 });
 });
 }
 
 function setupCartTierPrices() {
 // initial setup of tier price blocks for the cart
 jQuery(".checkout-cart-index .cart-table .listTierPrice").each( function() {
 jQuery(this).append('<div class="yourPrice" style="width: 110px; position: absolute; display: none;"><div class="yourPriceText" style="padding: 1px 5px; float: left; text-align: left; width: 90px; font-size: 10px; color: #000000; font-weight: normal; line-height: 12px;">Your price</div><div style="float: right; width: 10px; color: #FF0000; font-weight: bold; line-height: 12px; font-size: 12px;">&raquo;</div></div>');
 });
 // Alignment fix for IE
 if ( jQuery.browser.msie ) {
 jQuery(".yourPrice").css("padding-top","2px");
 }
 
 // Set up "update cart" links for each row
 /*jQuery(".updateCart").each( function() {
 jQuery(this).click( function() {
 jQuery(this).parents("form").submit();
 return false;
 });
 });
 */
 // and the big one at the bottom
 jQuery(".update-cart").click( function() {
 jQuery("#cartForm").submit();
 });
 // On product page, highlight appropriate tier price for your quantity
 jQuery(".checkout-cart-index .cart-table .qtyBox .qty").each( function() {
 jQuery(this).change( function() {
 var qty = jQuery(this).val();
 var origQty = jQuery(this).siblings(".hqty").text();
 // Show or hide update cart button depending on whether quantity have changed
 if ( qty != origQty ) {
 // jQuery(this).parents("td").find(".updateCart").show();
 jQuery(this).parents("tr").addClass("needs-update");
 if ( jQuery.browser.msie && Number( jQuery.browser.version ) < 8 ) {
 jQuery("tr.needs-update").each( function() {
 jQuery(this).find("td").css("background-color","#FAFAEC");
 });
 }
 }
 else {
 if ( jQuery.browser.msie && Number( jQuery.browser.version ) < 8 ) {
 jQuery("tr.needs-update").each( function() {
 jQuery(this).find("td").css("background-color","#FFF");
 });
 }
 jQuery(this).parents("tr").removeClass("needs-update");
 }
 jQuery(this).parents("tr").find(".tierPricing").find(".tierPriceQty").each( function() {
 var tierRange = jQuery(this).html().replace(/,/g,"").replace(/\s/g,"").replace(/\t/g,"").split("-");
 if ( jQuery(this).html().indexOf("+") != -1 ) {
 tierRange = new Array();
 tierRange[0] = jQuery(this).html().replace(/\s/g,"").replace(/,/g,"").replace(/\t/g,"").replace(/\+/g,"");
 tierRange[1] = '999999999999';
 }
 if ( Number( qty ) >= Number( tierRange[0] ) && Number( qty ) <= Number( tierRange[1] ) ) {
 
 jQuery(this).siblings(".tierPrice").find(".price").addClass("active");
 var thisPrice = jQuery(this).siblings(".tierPrice").find(".price").text().replace("$","");
 if ( jQuery(this).parents("table").find(".price.active").parents("tr").next("tr").size() > 0 ) {
 var nextLowest = jQuery(this).parents("table").find(".price.active").parents("tr").next("tr").find(".price").html().replace("$","");
 }
 jQuery(this).parents("table").parents("td").find(".yourPrice").find(".yourPriceText").html("Your price").css("text-align","right");
 if ( nextLowest && Number(tierRange[1]) < 999999999999 ) {
 var toBuy = (Number(tierRange[1])+1) - Number(qty);
 var savings = ( Number( thisPrice ) - Number( nextLowest ) ) / Number( thisPrice );
 if ( toBuy < 5 ) {
 toBuy = "only "+ toBuy;
 }
 jQuery(this).parents("table").parents("td").find(".yourPrice").find(".yourPriceText").html("Buy "+ toBuy +" more to save "+ (Number(savings)*100).toFixed(0) + "% on these").css("text-align","left");
 }
 jQuery(this).parents("table").parents("td").find(".yourPrice").css("top", jQuery(this).parents("tr").find(".tierPrice").position()["top"]).css("left", jQuery(this).parents("tr").position()["left"]-115).show();
 }
 else {
 jQuery(this).siblings(".tierPrice").find(".price").removeClass("active");
 }
 });
 });
 });
 
 // Now trigger it onload
 jQuery(".checkout-cart-index .cart-table .qtyBox .qty").each( function() {
 jQuery(this).trigger("change");
 });
 setupQuantityBoxes();
 }
 
 function setupQuantityBoxes() {
 jQuery("input.qty").bind("blur",function(){if(isNaN(jQuery(this).attr("value"))){jQuery(this).attr("value","1");}
 });
 jQuery(".qtyBox span.plus").unbind("click").click(function(){
 var p=jQuery(this).parent().children("input");
 p.attr("value",isNaN(parseInt(p.attr("value"))+1)?1:parseInt(p.attr("value"))+1).change();
 });
 jQuery(".qtyBox span.minus").unbind("click").click(function(){
 var p=jQuery(this).parent().children("input");
 p.attr("value",isNaN(parseInt(p.attr("value"))+1)?1:(parseInt(p.attr("value"))-1)<1?1:parseInt(p.attr("value"))-1).change();
 });
 }
 
 function swapZoomForThumbPic( linkId ) {
 if ( jQuery("#"+linkId).size() == 0 ) {
 return false;
 }
 var linkEl = jQuery("#"+linkId);
 jQuery("#image").attr("src", linkEl.attr("href")).attr("title", linkEl.attr("title"));
 try {
 jQuery('.product-image-zoom').css('line-height', jQuery('.product-img-box').css('height') ); 
 }
 catch(err) {} 
 return false;
 }
 
 function hideRequiredInsertOptional() {
 jQuery("form .form-list, #freehat_form, #catalogrequest_form").find("label").each( function() {
 if ( jQuery(this).siblings(".required-entry, .validate-select").size() == 0 && jQuery(document).find(".required").size() > 0 && jQuery(this).parents("#checkout-payment-method-load").size() == 0 ) {
 if ( jQuery(this).html().indexOf("(Optional)") == -1 ) {
 jQuery(this).html(jQuery(this).html() +"<span class='label-explanation'> (Optional)</span>");
 }
 }
 else {
 jQuery(document).find(".required").hide();
 }
 });
 }
 
 // Checkout: Shipping method: Create a message on top for free shipping
 function createhippingMethodMessage() {
 if(typeof window.XBS =='undefined'){window.XBS=newXbShippingObject();XBS.init();}
 if(XBS.shouldShowFreeMessage()) {
 jQuery("#shipping-method-note").html(XBS.getFreeShippingMessage()).show();
 } 
 
 
// if ( XBShipping.getAmountMoreToSpendForFreeShipping() > 0 ) {
// jQuery("#shipping-method-note").html("Spend another $"+ XBShipping.getAmountMoreToSpendForFreeShipping() +" to get FREE shipping").show();
// }
// else {
// jQuery("#shipping-method-note").html("You have qualified for FREE shipping.").show();
// }
// 
 }
 
 // start timer to hide minicart chad (click here to view cart & shipping)
 function startChadHideTimer(duration) {
 // console.log("start");
 jQuery("#minicart-show").stopTime("ch-hide");
 jQuery("#minicart-show").oneTime(duration, "ch-hide", function() {
 jQuery("#minicart-chad").slideUp(200);
 });
 }
function xbCartLink(){
 try{var uenc='/add/uenc/'+uencPage.replace(",","");}catch(e) {var uenc='';}
 document.location.href='/checkout/cart'+ uenc;
 }
jQuery(document).ready(function(){
 // Remove any default values in form fields put there bay shippingZip ajax call
 jQuery(".form-list input").each( function() {
 if( jQuery(this).val() == 'id_default_ship_estimate__000000' ) {
 jQuery(this).val("");
 }
 }); 
 
 // Change checkout links on click
 jQuery("div.ajaxcartpro_confirm button.cart-button").attr("onclick","").unbind("click").click( xbCartLink );
 // Fix buttons inside <a> tags for crappy ie
 if(jQuery.browser.msie){
 jQuery('button').each( function() {
 if ( jQuery(this).attr("onclick") == undefined && jQuery(this).parent().get(0).tagName == 'A' ) {
 jQuery(this).click( function() {
 document.location.href=jQuery(this).parents("a").attr("href");
 });
 }
 });
 }
 
 // alert( jQuery.browser.version );

 //a=setTimeout("jtest()",1000*15);
 // Set up valve and controller header toggle popups
 jQuery(".category-headerbox").find(".toggle").each( function() {
 jQuery(this).css("position","absolute").css("left",jQuery(".category-headerbox-txt").position()["left"] +10 ).css("top","10px") ;
 });
 jQuery(".category-headerbox").find(".switch").each( function() {
 if(jQuery.browser.msie){
 jQuery(this).css("left",Number( jQuery(this).css("left").replace("px","") )+ 8 + "px").css("font-size","24px").css("width","20px");
 }
 jQuery(this).mouseover( function() {
 jQuery("#toggle-"+ jQuery(this).attr("id")).fadeIn(200);
 });
 jQuery(this).mouseout( function() {
 jQuery("#toggle-"+ jQuery(this).attr("id")).fadeOut(200);
 });
 });
 
 /*
 var thisPage = window.location.pathname;
 var $origHREFs=Array();
 
 jQuery("#newNavList li a").each(function() {
 var target = jQuery(this).children("span").attr("class") ;
 $origHREFs[target]=jQuery(this).attr("href");
 jQuery(this).attr("href","#"+target);
 });
 
 var $navTabs = jQuery("#newNav").tabs({event: 'mouseover'}); var defaultTab = $navTabs.tabs('option','selected');
 jQuery("#newNavList li a").each(function() {
 jQuery(this).click(function(){location.href=$origHREFs[jQuery(this).children("span").attr("class")];}).css('cursor','pointer');
 });
 jQuery("#newNav").bind("mouseleave",function(){$navTabs.tabs('select',defaultTab);});
 
 // An extra bit to identify the active subcategory by URL (matching link to window location in top nav)
 jQuery("#newNav .ui-tabs-panel.ui-widget-content").not("ui-tabs-hide").find("ul li").each( function() {
 var link = jQuery(this).find("a").attr("href");
 // alert( "http://"+ window.location.hostname + thisPage.substring( 0, thisPage.lastIndexOf("\/") ) );
 var thisPageArr = thisPage.split("/");
 // We'll add to this string on each loop until we find a match btwn link and the page's url
 var lookingFor = "";
 for ( var i=0;i<thisPageArr.length;i++ ) {
 lookingFor += thisPageArr[i];
 if ( link == lookingFor || link == "http://"+ window.location.hostname + lookingFor ) {
 jQuery(this).find("a").addClass("active");
 break;
 }
 lookingFor += "/";
 }
 });
 */
 // jQuery("#left_nav").treeview();
 
 /* 11/12/09 - JO: moved these next 2 items down, nav should go first */
 createQuickcartLinks();
 setupQuickcartEvents();
 
 /*
 jQuery("#minicart li").removeClass("ui-state-default, ui-corner-top");
 // Add class "active" to the current category's link
 jQuery("#left_nav.treeview li.active a:first").addClass("active");
 
 // An extra bit to identify the active subcategory by URL (matching link to window location
 jQuery("#left_nav.treeview li.active ul li").each( function() {
 var link = jQuery(this).find("a").attr("href");
 // alert( link +" "+ "http://"+ window.location.hostname+ "/"+ thisPage );
 if ( link == thisPage || link == "http://"+ window.location.hostname + thisPage ) {
 jQuery(this).find("a").addClass("active");
 }
 });
 */
 //other tabs
 jQuery(".tabset").tabs();
 if ( jQuery(".tabset ul:first").find("li").size() == 1 ) {
 jQuery(".tabset ul:first").find("li").addClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active");
 jQuery("#product_description").addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");
 }
 
 setupQuantityBoxes();
 // Change the class aw_ajax_cart updates when the cart changes. Default is set in js/aw_ajaxcartpro/ajaxcartpro-1....js
 aw_cartDivClass = ".minicartinner";
 
 
 jQuery("div.showTierPrices input.qty").each( function() {
 jQuery(this).bind("click",function(){
 try{setUpTierPriceCharts();} 
 catch(e){};
 jQuery("#"+jQuery(this).attr("id")+"tierPrices").trigger("click");
 });
 jQuery(this).bind("change",function(){
 setUpTierPriceCharts();
 jQuery("#"+jQuery(this).attr("id")+"tierPrices").trigger("click");
 });
 });
 
 
 // initial setup of tier price blocks
 setUpTierPriceCharts();
 jQuery(".product-view .product-shop .listTierPrice").append('<div id="yourPrice" style="width: 80px; color: #F4A804; font-weight: bold; line-height: 20px; position: absolute; display: none;">Your price &raquo;</div>');
 
 // On product page, highlight appropriate tier price for your quantity
 jQuery(".product-view .product-shop .add-to-cart #qty").change( function() {
 var qty = jQuery(".product-view .product-shop .add-to-cart #qty").val();
 jQuery(".product-view .product-shop .listTierPrice .tierPricing .tierPriceQty").each( function() {
 var tierRange = jQuery(this).html().replace(/\s/g,"").replace(/\t/g,"").split("-");
 if ( jQuery(this).html().indexOf("+") != -1 ) {
 tierRange = new Array();
 tierRange[0] = jQuery(this).html().replace(/\s/g,"").replace(/\t/g,"").replace(/\+/g,"");
 tierRange[1] = '1000000';
 }
 jQuery(this).removeClass("active");
 if ( Number( qty ) >= Number( tierRange[0] ) && Number( qty ) <= Number( tierRange[1] ) ) {
 jQuery(this).css("border","1px solid #F4A804").css("border-right","0"); 
 jQuery(this).parents("tr").find("td.tierPrice").css("border","1px solid #F4A804").css("border-left","0");
 jQuery("#yourPrice").css("top", jQuery(this).position()["top"]).css("left", jQuery(this).position()["left"]-80).show();
 }
 else {
 jQuery(this).parents("tr").find("td").css("border","0").css("border-bottom","1px dotted #AFAFAD");
 }
 });
 });
 // Now trigger it onload
 jQuery(".product-view .product-shop .add-to-cart #qty").trigger("change");
 
 // Run function to set up tier prices for cart
 setTimeout('setupCartTierPrices();',2000);
 
 // decoration: stripe the charts, add both so that differetn styles can decide if odds or evens get the color:
 jQuery("table.xb-chart tbody tr:even").addClass("xb-stripe-even") ;
 jQuery("table.xb-chart tbody tr:odd").addClass("xb-stripe-odd") ;
 // get the shipping info in the Quick Cart
 //XBShipping.__init();
 //XBShipping.prepareQuickCartShipping() ;
 
 // if this is a cart page, the "checkout object will be present
 if (typeof checkout != "undefined") {
 // Mage's setMethod is used in conjnction with radio buttons for "check out as guest" and "register". We will overwrite it to respond to "whichMethod", which we'll pass with buttons
 checkout.setMethod = function( whichMethod ){
 // alert("setMethod overwtitten");
 if ( whichMethod == 'guest' ) {
 this.method = 'guest';
 var request = new Ajax.Request(
 this.saveMethodUrl,
 {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'guest'}}
 );
 Element.hide('register-customer-password');
 Element.show('checkout-register-toggle');
 this.gotoSection('billing');
 }
 else if ( whichMethod == 'register' ) {
 this.method = 'register'; 
 var request = new Ajax.Request(
 this.saveMethodUrl,
 {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'register'}}
 );
 Element.show('register-customer-password');
 Element.hide('checkout-register-toggle');
 this.gotoSection('billing');
 }
 else{
 alert(Translator.translate('Please choose to register or to checkout as a guest'));
 return false;
 }
 };
 
 // Overwrite shippingMethod.validate in /skin/frontend/default/xavierberkeley/js/opcheckout.js to use a dropdown list instead of radio buttons (what were they thinking?)
 shippingMethod.validate = function(){
 var methods = document.getElementsByName('shipping_method');
 if (methods.length==0) {
 alert(Translator.translate('Your order can not be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.'));
 return false;
 }
 
 if(!this.validator.validate()) {
 return false;
 }
 
 if ( jQuery("#s_method").val() != "" ) {
 return true;
 }
 alert(Translator.translate('Please specify shipping method.'));
 return false;
 };
 
 // Overwrite payment.init() in /skin/frontend/default/xavierberkeley/js/opcheckout.js
 payment.init = function(){
 var elements = Form.getElements(this.form);
 if ($(this.form)) {
 $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
 }
 var method = null;
 method = jQuery("#p_method").val();
 if (method) this.switchMethod(method);
 
 jQuery("#p_method").change( function() {
 payment.switchMethod( jQuery("#p_method").val() );
 });
 };
 
 // Overwrite payment.validate in /skin/frontend/default/xavierberkeley/js/opcheckout.js
 payment.validate = function(){
 var methods = document.getElementsByName('payment[method]');
 if (methods.length==0) {
 alert(Translator.translate('Your order can not be completed at this time as there is no payment methods available for it.'));
 return false;
 }
 if ( jQuery("#p_method").val() != "" ) {
 return true;
 }
 alert(Translator.translate('Please specify payment method.'));
 return false;
 }
 
 // Overwrite the gotoSection and back functions to make sure the "checkoutsteps block at the top of the page updates when the active section does
 checkout.gotoSection = function(section) {
 if ( section == "shipping_method" ) {
 createhippingMethodMessage();
 }
 jQuery(".opc-state").removeClass("active");
 jQuery("#opc-state-"+ section).addClass("active");
 section = $('opc-'+section);
 section.addClassName('allow');
 this.accordion.openSection(section);
 }
 
 checkout.back = function() {
 if (this.loadWaiting) return;
 this.accordion.openPrevSection(true);
 var activeStep = jQuery(".section.active").attr("id").replace("opc-","opc-state-");
 jQuery(".opc-state").removeClass("active");
 jQuery("#"+ activeStep).addClass("active");
 if ( activeStep.indexOf("shipping_method") != -1 ) {
 createhippingMethodMessage();
 }
 }
 
 shipping.syncWithBilling = function() {
 $('billing-address-select') && this.newAddress(!$('billing-address-select').value);
 $('shipping:same_as_billing').checked = true;
 if (!$('billing-address-select') || !$('billing-address-select').value) {
 arrElements = Form.getElements(this.form);
 for (var elemIndex in arrElements) {
 if (arrElements[elemIndex].id) {
 var sourceField = $(arrElements[elemIndex].id.replace(/^shipping:/, 'billing:'));
 if (sourceField){
 arrElements[elemIndex].value = sourceField.value;
 }
 }
 }
 //$('shipping:country_id').value = $('billing:country_id').value;
 shippingRegionUpdater.update();
 $('shipping:region_id').value = $('billing:region_id').value;
 $('shipping:region').value = $('billing:region').value;
 //shippingForm.elementChildLoad($('shipping:country_id'), this.setRegionValue.bind(this));
 } else {
 $('shipping-address-select').value = $('billing-address-select').value;
 }
 hideRequiredInsertOptional();
 }
 
 shipping.save = function(){
 if ($('shipping:telephone').value == '' ) {
 $('shipping:telephone').value = 0;
 }
 if (checkout.loadWaiting!=false) return;
 var validator = new Validation(this.form);
 if (validator.validate()) {
 checkout.setLoadWaiting('shipping');
 var request = new Ajax.Request(
 this.saveUrl,
 {
 method:'post',
 onComplete: this.onComplete,
 onSuccess: this.onSave,
 onFailure: checkout.ajaxFailure.bind(checkout),
 parameters: Form.serialize(this.form)
 }
 );
 }
 }
 
 billing.save = function() {
 if (checkout.loadWaiting!=false) return;
 // put in a dummy phone number if not entered
 if ($('billing:telephone').value == '' ) {
 $('billing:telephone').value = 0;
 }
 
 var validator = new Validation(this.form);
 if (validator.validate()) {
 if (checkout.method=='register' && $('billing:customer_password').value != $('billing:confirm_password').value) {
 alert(Translator.translate('Error: Passwords do not match'));
 return;
 }
 checkout.setLoadWaiting('billing');
 
 // if ($('billing:use_for_shipping') && $('billing:use_for_shipping').checked) {
 // $('billing:use_for_shipping').value=1;
 // }
 
 var request = new Ajax.Request(
 this.saveUrl,
 {
 method: 'post',
 onComplete: this.onComplete,
 onSuccess: this.onSave,
 onFailure: checkout.ajaxFailure.bind(checkout),
 parameters: Form.serialize(this.form)
 }
 );
 }
 }
 
 /*
 billing.newAddress = function(isNew){
 if (isNew) {
 this.resetSelectedAddress();
 Element.show('billing-new-address-form');
 billing.setAddress( jQuery("#billing-address-select").val() );
 } else {
 Element.show('billing-new-address-form');
 billing.setAddress( jQuery("#billing-address-select").val() );
 }
 }
 
 
 billing.setAddress( jQuery("#billing-address-select").val() );
 Element.show('billing-new-address-form');
 
 jQuery("#billing-address-select").change( function() {
 billing.setAddress( jQuery("#billing-address-select").val() );
 });
 */
 }
 
 // Try to set the line-height in product zoom box so it fits image
 try {
 jQuery(".product-image-zoom").css("line-height", jQuery(".product-img-box").css("height") );
 }
 catch(err) {
 // do something
 }
 
 // If there are no additional images add lightbox to the main image
 if ( jQuery(".product-image-zoom").size() > 0 && jQuery(".more-views img").size() == 0 ) {
 jQuery(".product-image-zoom #image").wrap('<a href="'+ jQuery(".product-image-zoom #image").attr("src") +'" title="'+ jQuery(".product-image-zoom #image").attr("title").replace(/\"/g,'&quot;') +'" class="lightbox"></a>');
 }
 
 // Having the same image twice in the carousel for products bothered me but I wanted the large (default) one to still have lightbox...
 jQuery(".product-image-zoom #image").click( function() {
 // get the last bit of the src attribute
 var zoomPic = jQuery(this);
 var thisSrc = jQuery(this).attr("src");
 thisSrc = thisSrc.substring( thisSrc.lastIndexOf("/") );
 // Loop through the thumbnails until you find the same src
 jQuery(".more-views img").each( function() {
 if ( jQuery(this).attr("src").substring( jQuery(this).attr("src").lastIndexOf("/") ) == thisSrc ) {
 // trigger a click on that one
 jQuery(this).parents("a").trigger("click");
 };
 })
 });

 jQuery("a.lightbox").lightBox({
 overlayBgColor: '#000',
 overlayOpacity: 0.6,
 maxHeight: screen.height * 0.9,
 maxWidth: screen.width * 0.9,
 imageLoading: '/skin/frontend/default/xavierberkeley/images/lightbox-ico-loading.gif',
 imageBtnClose: '/skin/frontend/default/xavierberkeley/images/lightbox-btn-close.gif',
 imageBtnPrev: '/skin/frontend/default/xavierberkeley/images/lightbox-btn-prev.gif',
 imageBtnNext: '/skin/frontend/default/xavierberkeley/images/lightbox-btn-next.gif',
 containerResizeSpeed: 350,
 fixedNavigation: true
 });
 
 /*
 // VERY TEMPORARY ie6 fixes (playing around to get layout right, will fix CSS properly when what needs adjustment is established)
 if ( jQuery.browser.msie && jQuery.browser.version=="6.0") {
 jQuery(".page").css("width","1010px");
 jQuery(".col2-left-layout .col-main").css("margin-right","0px").css("width","715px");
 jQuery(".col-left").css("margin","0px 5px");
 jQuery(".content-right-box").css("margin-left","10px");
 }
 */
 // OK, we're going to hide all red asterisks (rewuired inputs) and put "(optional)" afeter each non-required field's label
 hideRequiredInsertOptional();
 
 
 // Hacky but elegent, this little bit truncates values in the address select menu in checkout
 jQuery("#opc .address-select > option").each( function() {
 if ( String(jQuery(this).text()).length > 105 ) {
 jQuery(this).text( jQuery(this).text().substring(0,102) +"..." );
 }
 });
 
 if ( jQuery("#newNavToo ul.sf-navbar li.current").size() == 0 ) {
 jQuery("#newNavToo ul.sf-navbar li:first").addClass("current");
 }
 // Social Networking links. Have to add these via js cuz magento caches calls to getCurrentUrl();
 var pageTitle = escape(document.title.replace(/\u2013/g,'-').replace(/\u2018/g,'\'').replace(/\u2019/g,'\'').replace(/\u201C/g,'"').replace(/\u201D/g,'"').replace(/[^\x20-\x7F]/g,'_'));
 var pageLocation = escape(document.location);
 // To add a link, add it to this array with a properly constructed URL. Put an icon in the image folder under its key.
 var shareSites = {
 email: '#email-this-page',
 digg: 'http://digg.com/submit?phase=2&url='+ pageLocation +'&title='+ pageTitle ,
 delicious: 'http://del.icio.us/submit?url='+ pageLocation +'&title='+ pageTitle ,
 stumbleUpon: 'http://www.stumbleupon.com/submit?url='+ pageLocation +'&title='+ pageTitle ,
 twitter: 'http://twitter.com/home?status=Currently+reading+'+ pageLocation
 };
 // Append each link to the shareTools div in the footer
 for (var a in shareSites) {
 jQuery("#shareTools").append('<a class="sharelink" href="'+ shareSites[a] +'" target="_blank" id="share-link-'+ a +'"><img src="/skin/frontend/default/xavierberkeley/images/icon_share_'+ a +'.gif" alt="'+ a +'" /></a>');
 }
 jQuery("#share-link-email").click(emailPage);
 jQuery("#printTools").click(function(){window.print();});
 jQuery("div.video-teaser a").each(function(){
 jQuery(this).mouseover(function(){jQuery(this).find("img.play-video-button").attr('src','/video/thumbnails-play/_play-button-hover.png');});
 jQuery(this).mouseout(function(){jQuery(this).find("img.play-video-button").attr('src','/video/thumbnails-play/_play-button.png');});
 });
}); // end document ready

function emailPage(){
subject = escape(document.title.replace(/\u2013/g,'-').replace(/\u2018/g,'\'').replace(/\u2019/g,'\'').replace(/\u201C/g,'"').replace(/\u201D/g,'"').replace(/[^\x20-\x7F]/g,'_'));
str = 'mailto:?subject=' + subject + '&body=' + subject + '%0D%0Ahttp://' + location.host + location.pathname +'?src=em' ;
location.href=str;return false;} 

function xbDLToggle(id){jQuery("#definition"+id).toggle();if(jQuery("#definition"+id).css("display")=="none"){jQuery("#term"+id).removeClass("dton");}else{jQuery("#term"+id).addClass("dton");}}


function TrustLogo(logo,code,autoMove){host=location.host;return tLUC(logo,code,code,autoMove);}function TrustLogo_MouseOver(ev,code){return tLL(ev,code);}function TrustLogo_MouseMove(ev,code){return tLM(ev,code);}function TrustLogo_MouseOut(ev,code){return tLN(ev,code);};function TrustLogo_Credentials(ev,code){return tLWC(ev,code);};function tLL(ev,tLb){tLeB(ev,tLiB(tLMC,tLb),tLRC(tLb));}function tLM(ev,tLb){tLXB(ev);}function tLN(ev,tLb){tLTC(tLRC(tLb));}function tLWC(ev,tLa){tLXC(tLiB(tLLC,tLa));}function tLXC(URL){window.open(URL,'tl_wnd_credentials'+(new Date()).getTime(),tLYC);}var tLB="SCAS";var tLC="SCAS";
var tLD="SC";var tLE="SC";var tLF="SCOP";var tLG="SCOP";var tLH="SCCC";var tLI="SCCC";var tLnC='http://www.trustlogo.com/';if(window.location.protocol.toLowerCase()=="https:"){tLnC='https://secure.comodo.com/';}var tLbC=tLnC+"trustlogo/images/popup/";var tLlC=tLnC+"trustlogo/javascript/tl_tl_popupParent.htm#";var tLyC=tLnC+"trustlogo/logos/";var tLMC=tLnC+'ttb_searcher/trustlogo?';var tLLC=tLMC+"v_querytype=W&";tLMC=tLMC+"v_querytype=C&";var tLNC='&x=6&y=5';
var tLgC=120;
var tLeC=445;var tLhC=580;if (window.attachEvent){var tLhC=620;var tLeC=460;}

var tLP=290;var tLQ=210;

var tLfC=60;var tLiC=160;if(tLu()){tLP=tLP+20;}var tLU=3;var tLV=3;var tLzC="";
var tLR=500;var tLS=500;/*var tLT=7000;*/var tLT=2000;var tLW=100;var tLO=new Array();function tLZC(URL){var i;for(i=0;i<tLO.length;i++){if(tLO[i].src==URL){return;}}var im=new Image();im.src=URL;tLO[tLO.length]=im;}function tLaC(tLPC){tLZC(tLbC+"seal_bg.gif");tLZC(tLbC+"warranty_level.gif");}function tLX(str){return String(str).replace(/\&/g,"&amp;").replace(/\</g,"&lt;").replace(/\>/g,"&gt;").replace(/\'/g,"&#27;").replace(/\"/g,"&#22;");}function tLY(str){return String(str).replace(/\%/g,"%25").replace(/\#/g,"%23")
.replace(/\&/g,"%26").replace(/\?/g,"%3f").replace(/\+/g,"%2b").replace(/\=/g,"%3d").replace(/\ /g,"+").replace(/\%/g,"%25");}if(tLw()){if((screen.availHeight-tLgC)<(tLhC+tLiC)){tLhC=screen.availHeight-tLiC;tLgC=0;}if((screen.availWidth-tLfC)<tLeC){tLeC=screen.availWidth;tLfC=0;}}var tLYC='toolbar=0,scrollbars=1,location=1,status=1,menubar=1,resizable=1,width='+tLeC+',height='+tLhC+',left='+tLfC+',top='+tLgC;function tLiB(tLKC,tLPC){return tLKC+'v_shortname='+tLY(tLPC)+'&v_search='+tLY(window.location.protocol+"//"+host+window.location.pathname)+tLNC;}function tLQC(tLa){return 'if(window.open(\''+tLX(tLiB(tLLC,tLa))+'\',\'tl_wnd_credentials\'+(new Date()).getTime(),\''+tLYC+'\')){};tLlB(tLTB);';
}function tLRC(tLb){var tLc="tl_popup";if(tLi()&&!tLo()){tLc=tLc+tLb;}else if(tLi()&&tLo()){tLc=tLc+tLb;}else{}return tLc;}function tL1C(s,q,l){var a=s.split(".");if(a.length<2){return "";};var tLZ=tLyC+q+"/"+l+"/"+a[a.length-1];for(var lIndex=a.length-2;lIndex>=0;lIndex--){tLZ=tLZ+"/"+a[lIndex].substr(0,2)+"/"+a[lIndex];}tLZ=tLZ+"/"+s+"."+q+"."+l+".gif";tLZ=tLZ.toLowerCase();return tLZ;}function tL0C(tLZ,tLb){if(!tLZ)return false;if(tLZ==true){tLZ="small";}if(tLZ=="small"||tLZ=="large"){tLZ=tL1C(host,tLb,tLZ);}return tLZ;}function tL9C(e,xy){if(e&&xy){xy[0]=xy[0]+e.offsetLeft;
xy[1]=xy[1]+e.offsetTop;if(e.offsetParent){xy[0]=xy[0]-e.scrollLeft;xy[1]=xy[1]-e.scrollTop;tL9C(e.offsetParent,xy);}}}function tL2C(){var tLhB=tLJB("tL4C");tLhB.style.pixelLeft=0;tLhB.style.pixelTop=0;tLhB.style.display="block";var tL6C=0;var tL7C=0;for(var tL8C=tLhB.offsetParent;tL8C;tL8C=tL8C.offsetParent){tL6C+=tL8C.clientLeft+tL8C.offsetLeft-tL8C.scrollLeft;tL7C+=tL8C.clientTop+tL8C.offsetTop-tL8C.scrollTop;}tL6C-=tL_C().clientLeft-tL_C().scrollLeft;tL7C-=tL_C().clientTop-tL_C().scrollTop;if(tLzC=="topright"){tLhB.style.pixelLeft=tL6C+tL_C().scrollLeft+tL_C().clientWidth-tLhB.offsetWidth;
tLhB.style.pixelTop=tL7C+tL_C().scrollTop;}else if(tLzC=="bottomright"){tLhB.style.pixelLeft=tL6C+tL_C().scrollLeft+tL_C().clientWidth-tLhB.offsetWidth;tLhB.style.pixelTop=tL7C+tL_C().scrollTop+tL_C().clientHeight-tLhB.offsetHeight;}else if(tLzC=="bottomleft"){tLhB.style.pixelLeft=tL6C+tL_C().scrollLeft;tLhB.style.pixelTop=tL7C+tL_C().scrollTop+tL_C().clientHeight-tLhB.offsetHeight;}else if(tLzC=="topleft"){tLhB.style.pixelLeft=tL6C+tL_C().scrollLeft;tLhB.style.pixelTop=tL7C+tL_C().scrollTop;}else{}tLhB.style.display="block";};function tL3C(){window.attachEvent("onscroll",tL2C);window.attachEvent("onresize",tL2C);
window.attachEvent("onreadystatechange",tL2C);window.attachEvent("onload",tL2C);tLIC(tL2C,100);tLIC(tL2C,250);tLIC(tL2C,500);tLIC(tL2C,1000);tLIC(tL2C,2000);tLIC(tL2C,4000);tLIC(tL2C,8000);}function tLUC(tLZ,tLa,tLb,tL5C){if(!tLy()){tL5C=false;}tLZ=tL0C(tLZ,tLb);tLaC(tLb);var tLc=tLRC(tLb);var tLOC=' style="position:absolute;z-index:0;visibility: hidden;background-color: transparent;overflow:hidden;"';if(tLi()&&!tLo()){if(tL5C){tL5C=tL5C.toString().toLowerCase();if((tL5C !="topright")&&(tL5C !="topleft")&&(tL5C !="bottomright")&&(tL5C !="bottomleft")&&(tL5C !="none")){tL5C="topright";}if(tL5C=="none"){
tL5C=false;}tLzC=tL5C;}if(!tLJB(tLc)){if(tLZ){var str="";if(tL5C){str=str+'<div id="tL4C" style="zIndex:0;position:absolute;border:none;padding:0pt;margin:0pt;background-color:transparent;display:none;">'}str=str+'<a href="javascript:'+tLQC(tLa)+'" onmouseover="tLeB(event,\''+tLX(tLiB(tLMC,tLb))+'\',\''+tLc+'\')" onmousemove="tLXB(event)"onmouseout="tLTC(\''+tLc+'\')" ondragstart="return false;"><im'+'g src="'+tLX(tLZ)+'" border=0 onmousedown="return tLKB(event,\''+tLX(tLiB(tLLC,tLa))+'\');" oncontextmenu="return tLLB(event);" /></a><!---->';if(tL5C){str=str+"</div>";tL3C();}document.write(str);
}document.write('<div id="'+tLc+'" name="'+tLc+'" '+tLOC+' onmouseover="tLoB(\''+tLc+'\')" onmousemove="tLpC(\''+tLc+'\')" onmouseout="tLpB(\''+tLc+'\')">&nbsp;</div>');}}else if(tLi()&&tLo()){var tLfB='<iframe src="'+tLX(tLiB(tLMC,tLb))+'" id="'+tLc+'tLDD" name="'+tLc+'tLDD" width="'+tLP+'" height="'+tLQ+'" frameborder="0" allowtransparency="true" style="background:transparent;width:'+tLP+';height:'+tLQ+'"></iframe>';if(!tLJB(tLc)){document.write('<div id="'+tLc+'" name="'+tLc+'" '+tLOC+' onmouseover="tLoB(\''+tLc+'\')" onmousemove="tLpC(\''+tLc+'\')" onmouseout="tLpB(\''+tLc+'\')">'+tLfB+'</div>');
}if(tLZ){document.write('<a href="javascript:'+tLQC(tLa)+'" onmouseover="tLeB(event,\''+tLX(tLiB(tLMC,tLb))+'\',\''+tLc+'\')" onmousemove="tLXB(event)" onmouseout="tLTC(\''+tLc+'\')" ondragstart="return false;"><im'+'g src="'+tLX(tLZ)+'" border=0 onmousedown="return tLKB(event,\''+tLX(tLiB(tLLC,tLa))+'\');" oncontextmenu="return tLLB(event);" /></a>');}}else{if(tLZ){document.write('<a href="javascript:'+tLQC(tLa)+'" title="Click to verify" onmouseover="if(window.status=\'Click to verify\'){}"><im'+'g src="'+tLX(tLZ)+'" border=0 oncontextmenu="return tLLB(event);" title="Click to verify" onmouseover="if(window.status=\'Click to verify\'){}"'
+'/></a><!---->');}}}function tLrC(left1,top1,width1,height1,left2,top2,width2,height2){if(left1+width1<left2)return false;if(top1+height1<top2)return false;if(left2+width2<left1)return false;if(top2+height2<top1)return false;return true;}function tLsC(sty){if(sty.display=="none")return false;if(sty.visibility=="hidden")return false;if(sty.visibility=="visible")return true;return true;}function tLtC(e){if(!tLsC(e.currentStyle))return false;while(e.currentStyle.visibility=="inherit"){e=e.parentElement;if(!e)return true;if(!tLsC(e.currentStyle))return false;}return true;}function tLuC(left,top,width,height,e,tLCD){
if(!tLCD){if(!tLtC(e))return false;}var tLBD=e.offsetLeft;var tLAD=e.offsetTop;for(var tL8C=e.offsetParent;tL8C;tL8C=tL8C.offsetParent){tLBD+=tL8C.clientLeft+tL8C.offsetLeft-tL8C.scrollLeft;tLAD+=tL8C.clientTop+tL8C.offsetTop-tL8C.scrollTop;}tLBD-=tL_C().clientLeft-tL_C().scrollLeft;tLAD-=tL_C().clientTop-tL_C().scrollTop;return tLrC(left,top,width,height,tLBD,tLAD,e.offsetWidth,e.offsetHeight);}function tLvC(left,top,width,height,coll,tLCD){for(var lIndex=0;lIndex<coll.length;lIndex++){if(tLuC(left,top,width,height,coll[lIndex],tLCD)){return true;}}return false;}function tLjC(){if(tLx()){if(false
||tL_C().clientWidth<tLP-10||tL_C().clientHeight<tLQ-10||tLvC(tLOB,tLPB,tLP,tLQ,document.getElementsByTagName("object"))||tLvC(tLOB,tLPB,tLP,tLQ,document.getElementsByTagName("embed"))||tLvC(tLOB,tLPB,tLP,tLQ,document.getElementsByTagName("applet"))||tLvC(tLOB,tLPB,tLP,tLQ,document.getElementsByTagName("select")))return true;return false;}return false;}function tLz(){if((tLi())&&!tLv()){return true;}return false;}var tLGB;function tLHB(){if(tLGB){return tLGB;};var tLFB="UNSUPPORTED:tL_B::";var tL1=tLFB;var tL2=tLFB;var tL3="MSIE5:tLtB:tLvB:tLyB:tLwB:tL3B:tL7B:tL5B:tLAC:tLBC::";var tL4="MSIE5_5:tLtB:tLvB:tLyB:tLxB:tLwB:tL3B:tL7B:tL5B:tLAC:tLBC:tLCC:tLDC::";
var tL5=tL4;var tL6=tL5;var tL7="MACIE5_1:tLtB:tLvB:tLyB:tLzB:tLwB:tL3B:tL7B:tL5B:tLAC:tLBC::";var tL8=tLFB;var tL9="OPERA6:tLvB:tL4B:tLxB:tLwB:tLyB:tL3B:tL7B:tL6B:tLsB::";var tL_=tLFB;var tLAB="NS6:tLvB:tLwB:tLyB:tL2B:tL8B:tL6B::";var tLBB=tLAB;var tLCB=tLFB;var tLDB="UP:tLtB:tLyB:tLwB:tL7B::";var tLEB="UPUP:tLtB:tLvB:tLyB:tLxB:tLwB:tL3B:tL7B:tL5B:tLAC:tLBC:tLCC:tLDC::";var tLEC=navigator.userAgent;var tLFC=navigator.appVersion;tLGB=tLFB;var tLGC=0;if(document.getElementById){tLGB=tLEB;tLGC=tLEC.indexOf("Opera ");if(tLGC !=-1){var tLjB=parseFloat(tLEC.substring(tLGC+6,tLGC+10));if(tLjB<5){tLGB=tLCB;}else if(tLjB<=5.999){
tLGB=tL8;}else if(tLjB<7){tLGB=tL9;}else{tLGB=tLEB;}}else if(navigator.appName=="Microsoft Internet Explorer"){tLGC=tLFC.indexOf("MSIE ");var tLjB=parseFloat(tLFC.substring(tLGC+5,tLGC+9));if(navigator.platform=="MacPPC"||navigator.platform=="Mac68K"){tLGB=tL7}else{tLGB=tLEB;if(tLjB<=3.5){tLGB=tL1;}else if(tLjB<=4.5){tLGB=tL2;}else if(tLjB<5.49){tLGB=tL3;}else if(tLjB<6){tLGB=tL4;}else if(tLjB<6.5){tLGB=tL5;}else{tLGB=tL6;}}}else if(navigator.appName=="Netscape"){var tLjB=parseFloat(tLFC);if(tLjB<4.7){tLGB=tLFB;}else if(tLjB<4.8){tLGB=tL_}else{tLGB=tLAB;}}else{tLGB=tLEB;}}else if(document.all){
if(navigator.appName=="Microsoft Internet Explorer"){tLGC=tLFC.indexOf("MSIE ");var tLjB=parseFloat(tLFC.substring(tLGC+5,tLGC+9));if(navigator.platform=="MacPPC"||navigator.platform=="Mac68K"){tLGB=tL7}else{tLGB=tLEB;if(tLjB<=3.5){tLGB=tL1;}else if(tLjB<=4.5){tLGB=tL2;}else if(tLjB<5.49){tLGB=tL3;}else if(tLjB<6){tLGB=tL4;}else if(tLjB<6.5){tLGB=tL5;}else{tLGB=tL6;}}}else{tLGB=tLDB;}}else if(document.layers){if(navigator.appName=="Netscape"){var tLjB=parseFloat(tLFC);if(tLjB<4.7){tLGB=tLCB;}else if(tLjB<4.8){tLGB=tL_;}else{tLGB=tLAB;}}else{tLGB=tLCB;}}else{tLGB=tLFB;}return tLGB;}function tLIB(feat){
var tLkB=tLHB();feat=":"+feat+":";if(tLkB.indexOf(feat)==-1){return false;}return true;}function tLd(){return tLIB("tLtB");};function tLe(){return tLIB("tLuB");};function tLf(){return tLIB("tLvB");};function tLh(){return tLIB("tLxB");};function tLi(){return tLIB("tLyB");};function tLj(){return tLIB("tLzB");};function tLl(){return tLIB("tL1B");};function tLm(){return tLIB("tL2B");};function tLn(){return tLIB("tL3B");};function tLo(){return tLIB("tL4B");};function tLp(){return tLIB("tL5B");};function tLq(){return tLIB("tL6B");};function tLr(){return tLIB("tL7B");};function tLs(){return tLIB("tL8B");};
function tLt(){return tLIB("tLAC");};function tLu(){return tLIB("tLsB");};function tLx(){return tLIB("tLCC");};function tLv(){return tLIB("tL_B");};function tLw(){return tLIB("tLBC");};function tLy(){return tLIB("tLDC");};function tLJB(id){if(tLf()){return document.getElementById(id);}else if(tLd()){return document.all[id];}else if(tLe()){return document.layers[id];}else{return null;}}function tLHC(id){window.clearTimeout(id);}function tLIC(str,del){return window.setTimeout(str,del);}function tLKB(ev,URL){if(!tLz())return true;if(ev.button&2){alert("This TrustLogo is protected");if(tLp()){ev.cancelBubble=true;
ev.returnValue=false;}else if(tLq()){ev.preventDefault();ev.cancelPropagation();}return false;}if(ev.button&1){return true;window.open(URL,'tl_wnd_credentials'+(new Date()).getTime(),tLYC);if(tLp()){ev.cancelBubble=true;ev.returnValue=false;}else if(tLq()){ev.preventDefault();ev.cancelPropagation();}return false;}}function tLLB(ev){if(!tLz())return;if(tLp()){ev.cancelBubble=true;ev.returnValue=false;}else if(tLq()){ev.preventDefault();ev.cancelPropagation();}return false;}function tLMB(){if(!tLz())return;tLQB=0;tLnB(tLNB,tLOB,tLPB,tLTB);}var tLNB="";var tLOB=0;var tLPB=0;var tLQB=0;var tLRB=0;var tLSB=null;
var tLTB="";var tLUB=false;var tLVB=0;var tLWB="";function tL_C(){if(document.compatMode=="CSS1Compat"){return document.body.parentElement;}else{return document.body;}}function tLXB(ev){if(!tLz())return;if(tLWB)return;var tLYB;var tLZB;var tLaB=0;var tLbB=0;var tLcB=800;var tLdB=600;if(tLn()){tLaB=tL_C().scrollLeft;tLbB=tL_C().scrollTop;tLcB=tL_C().clientWidth;tLdB=tL_C().clientHeight;tLYB=ev.clientX+tLaB;tLZB=ev.clientY+tLbB;}else if(tLm()){tLYB=ev.pageX;tLZB=ev.pageY;tLaB=window.pageXOffset;tLbB=window.pageYOffset;tLcB=window.innerWidth;tLdB=window.innerHeight;}if(tLaB+tLcB>=tLYB+tLP){tLOB=tLYB+tLU;
}else if(tLaB<=tLYB-tLP){tLOB=tLYB-tLP-tLU;}else{tLOB=tLaB+tLcB/2-tLP/2;}if(tLbB+tLdB>=tLZB+tLQ){tLPB=tLZB+tLV;}else if(tLbB<=tLZB-tLQ){tLPB=tLZB-tLQ-tLV;}else{tLPB=tLbB+tLdB/2-tLQ/2;}return true;}function tLeB(ev,tLSC,tLc){if(!tLz())return;var tLVC='src="'+tLX(tLSC)+'" id="'+tLc+'tLDD" name="'+tLc+'tLDD" width="'+tLP+'" height="'+tLQ+'"';var tLkC='src="'+tLlC+tLX(tLY(tLSC))+'" id="'+tLc+'tLDD" name="'+tLc+'tLDD" width="'+tLP+'" height="'+tLQ+'"';var tLfB='<iframe '+tLVC+' frameborder="0" allowtransparency="true" style="background:transparent;overflow:hidden;"></iframe>';var tLmC='<iframe '+tLkC+' frameborder="0" allowtransparency="true" style="background:transparent;overflow:hidden;" ' 
+'ondeactivate="tLIC(\'tLlB(\\\''+tLc+'\\\');\',1);"></iframe>';var tLgB='<layer width='+tLP+' height='+tLQ+'><layer '+tLVC+' style="position:relative;background:transparent;" onmouseover="tLoB(\''+tLc+'\')" onmouseout="tLpB(\''+tLc+'\')"></layer></layer>';if(tLjC()){tLNB=tLmC;}else if(tLi()){tLNB=tLfB;}else{return;}if(tLTB&&(tLc !=tLTB)){tLlB(tLTB);tLlB(tLc);tLmB();}if(tLUB)return;var tLhB;if(tLi()){tLhB=tLJB(tLc);if(tLhB.style.visibility=="visible"){if(tLNB !=tLWB){if(tLRB){tLHC(tLRB);tLRB=0;}tLlB(tLc);tLWB=tLNB;}else{if(tLRB){tLHC(tLRB);tLRB=0;}return;}}}tLXB(ev);tLTB=tLc;if(!tLQB){tLQB=tLIC("tLMB()",tLR);
if(tLRB){tLHC(tLRB);tLRB=0;}}}function tLnB(tLoC,x,y,tLc){if(!tLz())return;if(tLoC !=tLWB){if(tLRB){tLHC(tLRB);tLRB=0;}tLlB(tLc);}tLWB=tLoC;if(!tLz())return;var tLhB;if(tLi()){tLhB=tLJB(tLc);tLhB.style.visibility="visible";if(tLhB&&tLhB.offsetParent){var xy=new Array(-x,-y);tL9C(tLhB.offsetParent,xy);x=-xy[0];y=-xy[1];}if(tLr()){tLhB.style.pixelLeft=x;if(!tLj()){tLhB.style.pixelTop=y;}tLhB.style.pixelWidth=tLP;tLhB.style.pixelHeight=tLQ;}else{tLhB.style.left=x+"px";if(!tLj()){tLhB.style.top=y+"px";}tLhB.style.width=tLP+"px";tLhB.style.height=tLQ+"px";}tLhB.style.borderWidth='0px';if(!tLo()){tLhB.innerHTML=tLoC;
}if(tLjC()){var tLqB=tLJB(tLc+'tLDD');}tLhB.style.zIndex=0;tLhB.style.visibility="visible";}}function tLqC(){return !tLh()||tLjC();}function tLTC(tLc){if(!tLz())return;if(tLQB){tLHC(tLQB);tLQB=0;}if(tLqC()){if(!tLRB){tLRB=tLIC('tLlB("'+tLc+'")',tLT);}}else{if(!tLRB){tLRB=tLIC('tLlB("'+tLc+'")',tLS);}}}function tLpC(tLc){if(!tLz())return;if(tLRB){tLHC(tLRB);tLRB=0;}if(tLqC()&&tLRB==0){tLRB=tLIC('tLlB("'+tLc+'")',tLT);}}function tLoB(tLc){if(!tLz())return;if(tLRB){tLHC(tLRB);tLRB=0;}if(tLqC()&&tLRB==0){tLRB=tLIC('tLlB("'+tLc+'")',tLT);}}function tLpB(tLc){if(!tLz())return;if(tLqC()){if(!tLRB){tLRB=tLIC('tLlB("'+tLc+'")',tLT);
}}else{if(!tLRB){tLRB=tLIC('tLlB("'+tLc+'")',tLS);}}}function tLlB(tLc){if(!tLz())return;if(tLRB){tLRB=0;}if(tLQB&&tLTB==tLc){tLHC(tLQB);tLQB=0;}tLWB="";var tLhB;if(tLi()){tLhB=tLJB(tLc);}if(!tLz())return;if(null==tLhB){}else if(tLi()){tLhB.style.visibility="hidden";tLhB.innerHTML="";}else{tLhB.visibility="hide";}if(!tLVB){tLUB=true;tLVB=tLIC("tLmB()",tLW);}}function tLmB(){if(tLVB){tLVB=0;tLUB=false;}}
function createStyleRule(selector, declaration) {if (!document.getElementsByTagName ||!(document.createElement || document.createElementNS)) return;var agt = navigator.userAgent.toLowerCase();var is_ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera") == -1));var is_iewin=(is_ie&&(agt.indexOf("win")!=-1));var is_iemac=(is_ie&&(agt.indexOf("mac")!=-1));if (is_iemac) return;var head = document.getElementsByTagName("head")[0];var style=(typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml", "style"):document.createElement("style");
if (!is_iewin) {var styleRule = document.createTextNode(selector + " {" + declaration + "}");style.appendChild(styleRule);}style.setAttribute("type", "text/css");style.setAttribute("media", "screen"); head.appendChild(style);if (is_iewin&&document.styleSheets&&document.styleSheets.length>0){var lastStyle = document.styleSheets[document.styleSheets.length - 1];if (typeof lastStyle.addRule == "object"){lastStyle.addRule(selector, declaration);}}}
version=0;if (navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");version=parseFloat(temp[1]);}
if (version>=5.5 && (window.createPopup) && (!(document.documentElement && typeof document.documentElement.style.maxHeight!="undefined"))){document.writeln('<style type="text/css">#comodoTL{display:none;}</style>');}
else {createStyleRule("#comodoTL", "display:none;");}
/**
 * aheadWorks Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://ecommerce.aheadworks.com/LICENSE-M1.txt
 *
 * @category AW
 * @package AW_Ajaxcartpro
 * @copyright Copyright (c) 2003-2009 aheadWorks Co. (http://www.aheadworks.com)
 * @license http://ecommerce.aheadworks.com/LICENSE-M1.txt
 */
$_=function(){var F=typeof arguments[0]=="undefined"?null:arguments[0];var B=F;var C=arguments.length;var A=[];if(!C){return document}if(C>1){for(var E=0;E<C;E++){A.push($_(arguments[E]))}}else{if(B&&(B instanceof Array||(typeof B!="string"&&!(B instanceof String))&&(!(B instanceof Function))&&((typeof B.length)+"")!="undefined"&&!B.tagName)){var C=B.length;for(var E=0;E<C;E++){A.push($_(B[E]))}}else{if(C){if(B&&!B.$__OK){if(typeof B=="string"||B instanceof String){B=$_.$_STR.$__init(B)}else{if(typeof B=="number"||B instanceof Number){B=$_.$_NUMBER.$__init(B)}else{switch(typeof B){case"function":$_.$_FUNC.$__init(B);break;default:if(B.nodeType){$_.$_DOM.$__init(B)}else{$_.$_OBJ.$__init(B)}}}}if(B){B.$__OK=true;B.empty=B.empty||function(){return !this}}}A.push(B)}}}if(A.length!=1){var G=$_.$__flat(A);if(G[0]&&G[0].$__EXT&&G[0].$__TYPE){var I=G[0].$__EXT;var H=G[0].$__TYPE;for(var E=I.length-1;E>=0;E--){for(var D=G.length-1;D>=0;D--){if(G[D].$__TYPE===H){if($_[H].$_$_&&$_[H].$_$_[I[E]]){if(!$_[H].$_$_[I[E]].accepts||$_[H].$_$_[I[E]].accepts(el)){$_[H].$_$_[I[E]].init(G)}break}}}}}return G}else{return A[0]}};$_.ie=!!(navigator.appName=="Microsoft Internet Explorer"&&!window.opera);$_.ie6=$_.ie&&navigator.appVersion.match("6");$_.opera=!!window.opera;$_.gecko=!!((window.netscape&&!window.opera));$_.safari=!!(navigator.userAgent.toLowerCase().indexOf("safari")!=-1);$_.__={};$_.raise=function(B,C){var D=["Error::",B||"",(B&&C)?"::":"",(B&&C)?C:(B?"":"Unknown error")];var A=D.join("");if(console.log){console.log(A)}else{alert(A)}};$_.$_STR={$_:{},$_$_:{},$__init:function(C){var B=C instanceof String?C:new String(C);if(B){B.$__EXT=[]}B.$__TYPE="$_STR";for(var A in $_.$_STR.$_){if(!$_.$_STR.$_[A].accepts||$_.$_STR.$_[A].accepts(B)){B=$_.$_STR.$_[A].init(B);if(!B||!B.$__TYPE||B.$__TYPE!=="$_STR"){continue}B.$__EXT[B.$__EXT.length]=A}}return B}};$_.$_DOM={$_:{},$_$_:{},$__init:function(B){B.$__UID=Math.random();B.$__EXT=[];B.$__TYPE="$_DOM";for(var A in $_.$_DOM.$_){if(!$_.$_DOM.$_[A].accepts||$_.$_DOM.$_[A].accepts(B)){$_.$_DOM.$_[A].init(B);B.$__EXT[B.$__EXT.length]=A}}}};$_.$_OBJ={$_:{},$_$_:{},$__init:function(B){B.$__EXT=[];B.$__TYPE="$_OBJ";for(var A in $_.$_OBJ.$_){if(!$_.$_OBJ.$_[A].accepts||$_.$_OBJ.$_[A].accepts(B)){$_.$_OBJ.$_[A].init(B);B.$__EXT[B.$__EXT.length]=A}}}};$_.$_NUMBER={$_:{},$_$_:{},$__init:function(B){var C=B instanceof Number?B:new Number(B);C.$__EXT=[];C.$__TYPE="$_NUMBER";for(var A in $_.$_NUMBER.$_){if(!$_.$_NUMBER.$_[A].accepts||$_.$_NUMBER.$_[A].accepts(C)){$_.$_NUMBER.$_[A].init(C);C.$__EXT[C.$__EXT.length]=A}}return C}};$_.$_FUNC={$_:{},$__exec:[],$__init:function(A){return A}};$_.copy=$_.$__copy=function(C){var B=[];var A=C.length;for(var D=0;D<A;D++){B.push(C[D])}return B};$_.flat=$_.$__flat=function(A,E){var C=E||[];var B=A.length;for(var D=0;D<B;D++){if(A[D]&&A[D].length&&(typeof A[D]!="string"&&!(A[D] instanceof String))&&!A[D].nodeType){$_.flat(A[D],C)}else{if(!(A[D] instanceof Array)){C.push(A[D])}}}return C};Array.prototype.contains=function(C){var B;var A=this.length;for(B=0;B<A;B++){if(this[B]===C){return true}}return null};Array.prototype.search=function(B){var A=this.length;if(typeof B=="function"){for(i=0;i<A;i++){if(B(this[i])){return i}}}else{for(i=0;i<A;i++){if(this[i]==B){return i}}}return null};Array.prototype.intersects=function(){var D=[];var B=this.length;var F=arguments.length;for(var E=0;E<B;E++){var A=false;for(var C=0;C<F;C++){if(arguments[C]===null||arguments[C]===false){var A=true}else{if(arguments[C].contains&&typeof arguments[C].length!="undefined"){if(!arguments[C].contains(this[E])){var A=true;break}}else{if(arguments[C]!=this[E]){var A=true;break}}}}if(!A){D.push(this[E])}}if(D){if(D.length){return D}else{return[]}}else{return[]}return(D||D.length)?D:null};Array.prototype.apply=function(B){for(var A=0;A<this.length;A++){B(this[A])}};Array.prototype.empty=function(){return !this.join("").length};$_.extend=function(C,B){for(var A in B){C[A]=B[A]}return C};$_.$_DOM.$_.XMLHttp={accepts:function(A){return A.tagName&&A.tagName.toLowerCase()=="form"},init:function(A){A.getData=function(){var E=A.elements;var C=[];var F={};for(var D=E.length-1;D>=0;D--){var B=$_(E[D]);if(B.name&&B.type!="file"&&B.type!="radio"&&B.type!="button"){var H=B.VAL();if(H!==false){if(H instanceof Array){for(var G=0;G<H.length;G++){C[C.length]=encodeURIComponent(B.name)+"="+encodeURIComponent(H[G])}}else{C[C.length]=encodeURIComponent(B.name)+"="+encodeURIComponent(H)}}}else{if(B.type=="radio"){if(!F[B.name]){if(B.checked){F[B.name]=1;C[C.length]=encodeURIComponent(B.name)+"="+encodeURIComponent(B.VAL())}}}}}return C.join("&")};A.GET=function(C){var B=new $_.__.XMLHttp(A.action,A.getData());B.requestMethod="GET";if(C){B.async(C)}return B.parse()},A.POST=function(C){var B=new $_.__.XMLHttp(A.action,A.getData());if(C){B.async(C)}return B.parse()},A.SEND=function(B){return A[(A.method.toLowerCase()=="post")?"POST":"GET"](B)}}};$_.__.XMLHttp=function(A,B){this.URL=A||window.location.protocol+"//"+window.location.host+window.location.pathname;this.requestMethod=B?"POST":"GET";this.data=B?B:false;this.is_async=false;this.callBack==false;this.request=window.XMLHttpRequest?(new XMLHttpRequest()):(new ActiveXObject("Microsoft.XMLHTTP"))};$_.__.XMLHttp.prototype.async=function(A){this.callBack=(typeof A=="function")?A:false;return this};$_.__.XMLHttp.prototype.parse=function(){var B=this;if(typeof this.data!="string"){var A=0;var D="";for(var C in this.data){D=D+(A?"&":"")+encodeURIComponent(C)+"="+encodeURIComponent(this.data[C]);A++}this.data=D}if(this.requestMethod=="GET"&&this.data.length){var E=(this.URL.lastIndexOf("?")==-1)?"?":"";this.URL=this.URL+E+this.data;this.data=null}this.request.open(this.requestMethod,this.URL,(this.callBack?true:false));if((this.callBack?true:false)){this.request.onreadystatechange=function(F){return function(){F.onStateChange()}}(this)}if(typeof(this.request.setRequestHeader)!="undefined"){this.request.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}this.request.send((this.data&&this.data.length)?this.data:null);if(!this.callBack){return this.doParse()}};$_.__.XMLHttp.prototype.onStateChange=function(){if(this.request.readyState==4){if(!parseInt(this.request.status)||this.request.status==200){this.doParse()}else{if(typeof this.onError[this.request.status]=="function"){this.callBack(this.onError[this.request.status](this.URL))}return this.callBack(false)}}};$_.__.XMLHttp.prototype.doParse=function(){var parsed=null;if(this.request.status&&this.request.status!=200){if(typeof this.onError[this.request.status]=="function"){this.onError[this.request.status](this.URL)}else{return false}}else{var ct=this.request.getResponseHeader("Content-type");switch(ct){case"application/x-javascript":case"text/javascript":case"application/ecmascript":case"text/ecmascript":try{var detectChar=this.request.responseText.match(/\s*(.{1})/);var parsed=/[0-9{(['"]/.test(detectChar)?eval("("+this.request.responseText+")"):this.request.responseText}catch(e){if(e.name=="SyntaxError"){$_.raise("Transfer","Got syntax error in "+this.URL)}else{$_.raise("Transfer","Unknown error while parsing remote JS "+this.URL)}}break;default:parsed=this.request.responseText}this.parsed=parsed?parsed:null;if((typeof this.callBack)=="function"){this.callBack(this.parsed);this.callBack=null;return true}else{return this.parsed}}};$_.__.XMLHttp.prototype.onError={1403:function(A){$_.raise("Transfer","Acess denied while accessing "+A)},1404:function(A){$_.raise("Transfer","Not found while accessing "+A);return false}};$_.$_STR.$_.XMLHttp={accepts:function(A){return true},init:function(A){A.GET=function(B){return new $_.__.XMLHttp(A).async(B||null).parse()};A.POST=function(C,B){return new $_.__.XMLHttp(A,C||null).async(B||null).parse()};return A}};$_.$_DOM.$_.valueSetGet={accepts:function(A){return(["INPUT","SELECT","TEXTAREA"]).contains(A.tagName.toUpperCase())},init:function(A){A.VAL=function(C,F){if(!C){switch(A.tagName){case"SELECT":if(A.selectedIndex==-1){return false}if(A.multiple){var D=[];for(var E=0;E<A.options.length;E++){if(A.options[E].selected){D.push(A.options[E].value)}}return D}return A.options[A.selectedIndex].value;break;case"INPUT":if(A.type.toLowerCase()==="radio"&&A.form&&A.name){var B=A.form[A.name].length?A.form[A.name]:[A.form[A.name]];for(var E=0;E<B.length;E++){if(B[E].checked){return B[E].value}}return false}if(A.type.toLowerCase()=="checkbox"&&!A.checked){return false}default:return A.value}}else{switch(A.tagName){case"SELECT":for(var E=A.options.length-1;E>=0;E--){if(A.options[E].value==C){A.options[E].selected=true;break}}break;default:return A.value=C}}if(F){if(!$_.ie){var G=document.createEvent("HTMLEvents");G.initEvent("change",false,false);A.dispatchEvent(G)}else{A.fireEvent("onchange")}}};A.encode2URI=function(B){var C=A.VAL();return((A.name||B)&&(C!==false))?encodeURIComponent(A.name)+"="+encodeURIComponent(C):false};A.CRC32=function(){var B=A.encode2URI(1);return(B!==false)?$_(B).CRC32():false}}};$_.$_DOM.$_$_.valueSetGet={init:function(A){A.VAL=function(B){var C=A.length;if(!B){var E=[];var G={};for(var F=0;F<C;F++){if(A[F].type.toLowerCase()!=="radio"){var D=A[F].VAL();if(D!==false){E[E.length]=D}}else{if(!G[A.name]){G[A.name]=true;E[E.length]=A[F].VAL()}}}return $_(E)}else{for(var F=0;F<C;F++){if(A[F].type.toLowerCase()!=="radio"){}else{if(A[F].value==B){A[F].checked=true}}}}};A.encode2URI=function(){var B=A.length;var C=[];var F={};for(var D=0;D<B;D++){var E=false;if(A[D].type.toLowerCase()!=="radio"){E=A[D].encode2URI()}else{if(!F[A.name]){F[A.name]=true;E=A[D].encode2URI()}}if(E!==false){C[C.length]=A[D].encode2URI()}}return C.join("&")};A.CRC32=function(){var B=A.encode2URI();return(B!==false)?$_(B).CRC32():false}}};$_.$_DOM.$_.All={init:function(A){A.setLoading=function(){};A.$_T=function(C){var B=[];for(var D=0;D<arguments.length;D++){B.push($_.copy(A.getElementsByTagName(arguments[D])))}return B[1]?B:B[0]}}};$_.__.Mutation=function(A){this.element=A;this.FPS=30;this.duration=0;this.framesCount=0;this.movies=[];this.sequence=[]};$_.__.Mutation.prototype.set=function(F,E,C){var B=[];for(var A in F){var D=new $_.__.Mutagen();if(F[A]=="auto"){if(A=="height"){F[A]=this.element.offsetHeight+"px"}}if(D["__"+A]){if(typeof E[A]!=="undefined"){D["__"+A](F[A],E[A],C);B.push(D.movie)}}else{if(typeof E[A]!=="undefined"){D.__Number.apply(D,[A,F[A],E[A],C]);B.push(D.movie)}}}this.duration+=C*1000/this.FPS;this.sequence.push(B)};$_.__.Mutation.prototype.clear=function(){this.movies=[];this.sequence=[];this.duration=0};$_.__.Mutation.prototype.play=function(){if(this.paused||this.element.mutating){return}this.element.mutating=1;var I=[];for(var H=0;this.movies=this.sequence[H];H++){var G=this.movies[0].length;for(var E=0;E<G;E++){var C=this.movies.length;var F={};for(var B=0;B<C;B++){$_.extend(F,this.movies[B][E])}I[I.length]=F}}var A=I.length/this.FPS;var D=Math.ceil(A*1000/I.length);this.currentIndex=0;this.intId=setInterval(function(J,K){return function(){if(!J[K.currentIndex]){K.element.mutating=0;clearInterval(K.intId);K.currentIndex=0;if(K.isCyclic){K.play()}if(K.onPlay){K.onPlay()}return}K.element.CSS(J[K.currentIndex]);K.currentIndex+=1}}(I,this),D)};$_.__.Mutation.prototype._play=function(){if(this.paused||this.element.mutating){return}this.element.mutating=1;this.funcs=[];var E=0;var K=this;if(this.onPlay){setTimeout(function(){K.onPlay()},Math.ceil(this.duration))}setTimeout(function(){K.element.mutating=0},Math.ceil(this.duration));var J=null;var B=Math.ceil(1000/this.FPS);for(var I=0;this.movies=this.sequence[I];I++){var H=this.movies[0].length;for(var G=0;G<H;G++){var F=this.movies.length;for(var D=0;D<F;D++){var A=this.movies[D][G];if(J!=A){var C=function(M,L){return function(){M.CSS(L)}}(this.element,A);this.funcs.push(C);setTimeout(C,E+B*G)}var J=A}}E+=B*G}if(this.isCyclic){setTimeout(function(){K.play()},E)}};$_.__.Mutation.prototype.rewind=function(){if(this.paused||this.element.mutating){return}this.element.mutating=1;var E=0;var C=this;if(this.onRewind){setTimeout(function(){C.onRewind()},Math.ceil(this.duration))}setTimeout(function(){C.element.mutating=0},Math.ceil(this.duration));var B=Math.ceil(this.duration/this.funcs.length);var A=this.funcs.length;for(var D=0;this.funcs[D];D++){setTimeout(this.funcs[D],B*(A-D))}};$_.__.Mutation.prototype.pause=function(){this.paused=true};$_.__.Mutation.prototype.stop=function(){clearInterval(this.intId);this.element.mutating=0};$_.__.Mutation.prototype.unpause=function(){this.paused=false};$_.__.Mutagen=function(){this.movie=[]};$_.__.Mutagen.prototype.__backgroundColor=function(C,B,A){this.__Color.apply(this,["backgroundColor",C,B,A])};$_.__.Mutagen.prototype.__borderColor=function(C,B,A){this.__Color.apply(this,["borderColor",C,B,A])};$_.__.Mutagen.prototype.__color=function(C,B,A){this.__Color.apply(this,["color",C,B,A])};$_.__.Mutagen.prototype.__Color=function(D,O,N,C){var I=new RGBColor(O);var P=new RGBColor(N);var K=new RGBColor("red");var B=(P.r-I.r)/C;var J=(P.g-I.g)/C;var E=(P.b-I.b)/C;var A=I.r;var H=I.g;var M=I.b;var L="";for(var G=0;G<C;G++){A+=B;H+=J;M+=E;K.r=Math.round(A);K.g=Math.round(H);K.b=Math.round(M);var F={};F[D]=K.toHex();this.movie.push(F)}};$_.__.Mutagen.prototype.__eNumber=function(B,G,F,A){var I=G.toString().replace(/[\-0-9]+/,"");F=parseFloat(F);G=parseFloat(G);var H=(F-G)/A;var E=G;for(var D=0;D<A;D++){E+=H;var C={};C[B]=Math.round(E)+I;this.movie.push(C)}};$_.__.Mutagen.prototype.__Number=function(B,G,F,A){var I=G.toString().replace(/[\-0-9]+/,"");F=parseFloat(F);G=parseFloat(G);var H=(F-G)/A;var E=G;var J=I=="px"?1:100;for(var D=0;D<A;D++){E+=H;var C={};C[B]=Math.round(E*J)/J+I;this.movie.push(C)}};$_.$_DOM.$_.Mutation={init:function(A){A.mutate=function(){A.mutation=new $_.__.Mutation(A);var B=arguments.length-1;if(typeof arguments[B]=="function"){A.mutation.onPlay=function(G){return function(){G()}}(arguments[B]);B--}var F=Math.round(arguments[B]/(B-1));for(var D=0;D<B-1;D++){var E=arguments[D];var C=arguments[D+1];A.mutation.set(E,C,F)}A.mutation.play()};A.demutate=function(B){if(typeof B=="function"){A.mutation.onRewind=function(){B()}}A.mutation.rewind()}}};$_.$_DOM.$_$_.Mutation={init:function(A){A.mutate=function(){var C=A.length;var G=[];var D=arguments.length-1;if(typeof arguments[D]=="function"){var I=function(K){return function(){K()}}(arguments[D]);D--}var B=Math.round(arguments[D]/(D-1));for(var E=0;E<C;E++){A[E].mutation=new $_.__.Mutation(A[E]);for(var F=0;F<D-1;F++){var H=arguments[F];var J=arguments[F+1];A[E].mutation.set(H,J,B)}if(E==(C-1)){A[E].mutation.onPlay=I}G[E]=A[E].mutation}for(var F=0;F<C;F++){G[F].play()}};A.demutate=function(D){var B=A.length;for(var C=0;C<B;C++){if(typeof D=="function"&&(C==B-1)){A[C].mutation.onRewind=function(){D()}}A[C].mutation.rewind()}}}};if(!$_.ie){$_.$_DOM.$_.CSS={init:function(A){A.CSS=function(C){if(typeof C!="string"){for(var B in C){A.style[B]=C[B]}return A}else{return A.style[C]}};A.CSSSave=function(C){A.$_style={};for(var B in C){A.$_style[B]=C[B]}return A};A.CSSLoad=function(){for(var B in A.$_style){A.style[B]=A.$_style[B]}return A}}}}else{$_.$_DOM.$_.CSS={init:function(A){A.CSS=function(E){if(typeof E!="string"){for(var D in E){if("opacity"==D){var C=A.filters["DXImageTransform.Microsoft.alpha"]||A.filters.alpha;A.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+E[D]*100+")";A.style.zoom=A.style.zoom||1}else{A.style[D]=E[D]}}return A}else{if(E!="opacity"){return A.style[E]}var B=A.style.filter.match(/opacity=([0-9]+)/);if(B){return B[1]/100}}};A.CSSSave=function(C){A.$_style={};for(var B in C){A.$_style[B]=C[B]}return A};A.CSSLoad=function(){for(var B in A.$_style){A.style[B]=A.$_style[B]}return A}}}}$_.$_DOM.$_$_.CSS={init:function(A){A.CSS=function(C){for(var B=A.length-1;B>=0;B--){A[B].CSS(C)}return A}}};function RGBColor(A){this.ok=false;if(A.charAt(0)=="#"){A=A.substr(1,6)}A=A.replace(/ /g,"");A=A.toLowerCase();var C={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var E in C){if(A==E){A=C[E]}}var H=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(I){return[parseInt(I[1]),parseInt(I[2]),parseInt(I[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(I){return[parseInt(I[1],16),parseInt(I[2],16),parseInt(I[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(I){return[parseInt(I[1]+I[1],16),parseInt(I[2]+I[2],16),parseInt(I[3]+I[3],16)]}}];for(var D=0;D<H.length;D++){var F=H[D].re;var B=H[D].process;var G=F.exec(A);if(G){channels=B(G);this.r=channels[0];this.g=channels[1];this.b=channels[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var K=this.r.toString(16);var J=this.g.toString(16);var I=this.b.toString(16);if(K.length==1){K="0"+K}if(J.length==1){J="0"+J}if(I.length==1){I="0"+I}return"#"+K+J+I}}$_.$_DOM.$_.Collection=$_.$_STR.$_.Collection=$_.$_OBJ.$_.Collection=$_.$_NUMBER.$_.Collection={init:function(A){A.apply=function(B){B(A)};return A}};Array.prototype.$_=function(){return this};Array.prototype.apply=function(C){var A=this.length;for(var B=0;B<A;B++){C(this[B])}return this};$_.$_STR.$_.DOMAccess={accepts:function(A){var B=A.charAt(0);return(B=="#"||B=="."||B=="~"||B=="@"||B==">")},init:function(H){var E=H.match(/[#.~@][a-z0-9_\-]+/ig);if(E.length>=2){var I=[];for(var F=0;F<E.length;F++){I[I.length]=$_(E[F])}return $_(I[0].intersects.apply(I[0],I.slice(1)))}switch(H.charAt(0)){case"#":var B=!$_.__[H]?$_(document.getElementById(H.substr(1))):$_.__[H];break;case"@":var B=$_(document.getElementsByName(H.substr(1)));break;case"~":var K=H.substr(1).toLowerCase();switch(K){case"checkbox":case"radio":case"password":case"image":case"text":var D=$_("~input");var B=[];for(var C=0;C<D.length;C++){if(D[C].type&&D[C].type==K){B[B.length]=D[C]}}B=$_(B);break;default:var B=$_(document.getElementsByTagName(K))}break;case".":var J=new Array();var D=document.getElementsByTagName("*");var G=D.length;var A=new RegExp("(^|\\s)"+H.substr(1)+"(\\s|$)");for(F=0,C=0;F<G;F++){if(A.test(D[F].className)){J[C]=D[F];C++}}var B=$_(J);break}return B}};$_.$_STR.$_$_.DOMAccess={init:function(A){var B=[];for(var C=0;C<A.length;C++){B[B.length]=$_.$_STR.$_.DOMAccess.init(A[C])}return B}};$_.$_DOM.$_.DOMAccess={init:function(A){A.$_=function(G){if(arguments.length>1){var I=[];for(var F=0;F<arguments.length;F++){I.push(A.$_(arguments[F]))}return $_(I)}var E=G.match(/[#.~@>][a-z0-9_\-\*]+/ig);if(E.length>=2){var H=[];for(var F=0;F<E.length;F++){H[H.length]=$_(E[F])}return $_(H[0].intersects.apply(H[0],H.slice(1)))}switch(G.charAt(0)){case"~":var J=G.substr(1).toLowerCase();switch(J){case"checkbox":case"radio":case"password":case"image":case"text":var D=A.$_("~input");var B=[];for(var C=0;C<D.length;C++){if(D[C].type&&D[C].type==J){B[B.length]=D[C]}}B=$_(B);break;default:var B=$_(A.getElementsByTagName(J))}break;case">":var B=[];var D=A.childNodes;for(var F=D.length-1;F>=0;F--){if(D[F].tagName){B.push(D[F])}}B.reverse();break;case"@":var B=(function(Q,P,L){var M=new Array();if(P==null){P=document}if(L==null){L="*"}var N=P.getElementsByTagName(L);var O=N.length;var K=new RegExp("(^|\\s)"+Q+"(\\s|$)");for(F=0,C=0;F<O;F++){if(K.test(N[F].name)){M[C]=N[F];C++}}return M})(G.substr(1),A,null);break;case".":var B=(function(M,Q,L){var P=new Array();if(Q==null){Q=document}if(L==null){L="*"}var N=Q.getElementsByTagName(L);var O=N.length;var K=new RegExp("(^|\\s)"+M+"(\\s|$)");for(F=0,C=0;F<O;F++){if(K.test(N[F].className)){P[C]=N[F];C++}}return P})(G.substr(1),A,null);break}return $_(B)};A.intersects=function(B){for(var C=0;C<B.length;C++){if(A==B[C]){return A}}return null}}};$_.$_DOM.$_$_.DOMAccess={init:function(A){A.$_=function(D){var B=[];for(var C=0;C<A.length;C++){B[B.length]=A[C].$_.apply(A[C],arguments)}return $_(B)};A.intersects=Array.prototype.intersects}};
/**
 * aheadWorks Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://ecommerce.aheadworks.com/LICENSE-M1.txt
 *
 * @category AW
 * @package AW_Ajaxcartpro
 * @copyright Copyright (c) 2003-2009 aheadWorks Co. (http://www.aheadworks.com)
 * @license http://ecommerce.aheadworks.com/LICENSE-M1.txt
 */
 
var aw_cartDivClass = '.box base-mini mini-cart';
var aw_topLinkCartClass = '.top-link-cart';
var aw_addToCartButtonClass = '.form-button';
var aw_bigCartClass = '.col-main';

if (window.location.toString().search('/product_compare/') != -1){
 var win = window.opener;
}
else{
 var win = window;
}

function setLocation(url){
 if(AW_ACP.isCartPage && ((url.search('/add') != -1 ) || (url.search('/remove') != -1 )) ){
 ajaxcartsend(url+'awacp/1/is_checkout/1', 'url', '', '');
 }else if (url.search('checkout/cart/add') != -1 ){
 ajaxcartsend(url+'awacp/1', 'url', '', '');
 }else{
 window.location.href = url;
 }
}

var cnt1 = 20;
__intId = setInterval(
 /* Hangs event listener for @ADD TO CART@ links*/
 function(){
 cnt1--;
 if(typeof productAddToCartForm != 'undefined'){
 try {
 // This fix is applied to magento <1.3.1
 // $_('#product_addtocart_form').$_(aw_addToCartButtonClass).setAttribute('type', 'button');
 }catch(err){
 
 }
 productAddToCartForm.submit = function(url){
 if(this.validator && this.validator.validate()){ 
 ajaxcartsend('?awacp=1', 'form', this, '');
 }
 return false;
 }
 clearInterval(__intId);
 }
 if(!cnt1) clearInterval(__intId);
 },
 500
);

var cnt2 = 20;
__intId2 = setInterval(
 /* This hangs event listener on @DELETE@ items from cart*/
 function(){ 
 cnt2--;
 if(!$_(aw_cartDivClass).empty() || ((typeof AW_ACP !== 'undefined') && AW_ACP.isCartPage)){
 updateDeleteLinks();
 clearInterval(__intId2);
 }
 if(!cnt2) clearInterval(__intId);
 },
 500
);






function setPLocation(url, setFocus){
 if (url.search('checkout/cart/add') != -1){ //CART ADD
 window.opener.focus();
 ajaxcartsend(url+'/awacp/1', 'url', '');
 }
 else{
 if(setFocus) {
 window.opener.focus();
 }
 window.opener.location.href = url;
 }
}

function ajaxcartsend(url, type, obj){
 showProgressAnimation();
 if (type == 'form'){ 
 $_('#product_addtocart_form').action += url; 
 $_('#product_addtocart_form').POST( 
 function(resp){
 hideProgressAnimation(); 
 if (resp.r != 'success'){
 obj.form.submit();
 }
 else{
 if(AW_ACP.useConfirmation){ 
 showConfirmDialog(); 
 } 
 updateCartView(resp);
 }
 }
 );
 }
 if (type == 'url'){
 $_(url).GET(
 function(resp){
 hideProgressAnimation();
 if (resp.r != 'success'){
 win.location.href=url;
 }
 else{ 
 if(AW_ACP.useConfirmation){ 
 showConfirmDialog(); 
 } 
 updateCartView(resp);
 }
 }
 );
 }
}

function updateDeleteLinks(){
 var tmpLinks = document.links;//win.$_(aw_cartDivClass).getElementsByTagName('a',win.$_(aw_cartDivClass));
 for (i=0; i<tmpLinks.length; i++){
 if (tmpLinks[i].href.search('checkout/cart/delete') != -1){
 url = tmpLinks[i].href.replace(/\/uenc\/.+,/g, "");
 var del = url.match(/delete\/id\/\d+\//g);
 var id = del[0].match(/\d+/g);
 if (win.location.protocol == 'https:'){
 aw_base_url = aw_base_url.replace("http:", "https:");
 } 
 if(!AW_ACP.isCartPage){
 tmpLinks[i].href = 'javascript:ajaxcartprodelete("' + aw_base_url + 'ajaxcartpro/cart/remove/id/' + id +'")';
 }else{
 tmpLinks[i].href = 'javascript:ajaxcartprodelete("' + aw_base_url + 'ajaxcartpro/cart/remove/id/' + id +'/is_checkout/1")';
 }
 }
 }
}

function updateTopLinks(resp){
 // We don't need the top links to update since we're not using them.
 // win.$_(aw_topLinkCartClass).innerHTML = resp.links;
}

function updateCartView(resp){
 if(AW_ACP.isCartPage)
 return updateBigCartView(resp);
 var oldHeight = win.$_(aw_cartDivClass).offsetHeight;
 // Replacing this
 /*
 var tmpDiv = win.document.createElement('div');
 tmpDiv.innerHTML = resp.cart;
 
 var tmpParent = win.$_(aw_cartDivClass).parentNode;
 tmpParent.replaceChild(tmpDiv.firstChild, win.$_(aw_cartDivClass));
 */
 // with this
 updateQuickCart( resp.cart );
 //Details popup support
 truncateOptions();
 
 var newHeight = win.$_(aw_cartDivClass).offsetHeight;
 
 if (aw_ajaxcartpro_cartanim == 'opacity'){
 $_(win.$_(aw_cartDivClass)).mutate(
 {opacity:0}, 
 {opacity:1},
 30
 );
 }
 if (aw_ajaxcartpro_cartanim == 'grow'){
 $_(win.$_(aw_cartDivClass)).style.overflow = 'hidden';
 $_(win.$_(aw_cartDivClass)).mutate( 
 {opacity:0, height: oldHeight + 'px'},
 {opacity:1, height: newHeight + 'px'},
 30
 );
 }
 if (aw_ajaxcartpro_cartanim == 'blink'){
 $_(win.$_(aw_cartDivClass)).mutate(
 {opacity:0}, 
 {opacity:1},
 10
 );
 }
 updateDeleteLinks();
 updateTopLinks(resp);
}

function updateBigCartView(resp){
 $_(aw_bigCartClass).innerHTML = resp.cart
 if($_('#shopping-cart-table')){
 decorateTable('shopping-cart-table')
 }
 updateDeleteLinks();
 updateTopLinks(resp);
 updateAddLinks();
 // xb.js function to set up tier price blocks
 setupCartTierPrices();
}


function ajaxcartprodelete(url){ 
 showProgressAnimation();
 $_(url).GET(
 function(resp){ 
 hideProgressAnimation();
 updateCartView(resp, '');
 }
 );
}

function showProgressAnimation(){
 var pW = 260;
 var pH = 50;
 p = win.$_('.ajaxcartpro_progress');
 p.style.width = pW + 'px'; 
 p.style.height = pH + 'px';
 if ($_.ie && !navigator.appVersion.match("8")){
 p.style.position = 'absolute';
 }
 if (aw_ajaxcartpro_proganim == 'center'){ 
 p.style.top = (screen.height/2) - (pH) + 'px';
 }
 if (aw_ajaxcartpro_proganim == 'top'){ 
 p.style.top = '0px';
 }
 if (aw_ajaxcartpro_proganim == 'bottom'){
 p.style.bottom = '0px'; 
 }
 if (aw_ajaxcartpro_proganim != 'none'){
 p.style.display = 'block'; 
 }
 
}


function showConfirmDialog(){
 var pW = 260;
 var pH = 104;
 p = $_('.ajaxcartpro_confirm');
 p.style.width = pW + 'px'; 
 p.style.height = pH + 'px';
 
 if ($_.ie && !navigator.appVersion.match("8")){
 p.style.position = 'absolute';
 }else{
 p.style.position = 'fixed';
 if (aw_ajaxcartpro_proganim == 'center'){ 
 p.style.top = (screen.height/2) - (pH) + 'px';
 }
 if (aw_ajaxcartpro_proganim == 'top'){ 
 p.style.top = '0px';
 }
 if (aw_ajaxcartpro_proganim == 'bottom'){
 p.style.bottom = '0px'; 
 }
 }
 if (aw_ajaxcartpro_proganim != 'none'){
 p.style.display = 'block'; 
 }
}

function hideProgressAnimation(){
 $_('.ajaxcartpro_progress').style.display = 'none';
}

window.onload = function(){
 updateAddLinks()
 
 // Some other onclicks
 $_('#aw_acp_continue').onclick = function(e){
 e = e||event;
 if(e.preventDefault)
 e.preventDefault()
 $_('.ajaxcartpro_confirm').style.display='none'; return false;
 }
 
 $_('#aw_acp_checkout').onclick = function(e){
 $_('.ajaxcartpro_confirm').style.display='none'; return true;
 } 
 
 if(!$_(aw_cartDivClass).empty() || ((typeof AW_ACP !== 'undefined') && AW_ACP.isCartPage)){
 updateDeleteLinks();
 }
 
} 

function updateAddLinks(){
 var ats = document.links;
 for (i=ats.length-1; i>=0; i--){
 if (ats[i].href.search('checkout/cart/add') != -1){
 ats[i].onclick = function(link){
 return function(){
 setLocation(link)
 }
 }(ats[i].href);
 ats[i].href="javascript:void(0)";
 }
 }
}

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}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(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[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(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
