/* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 0.12.2 */ if(typeof YAHOO=="undefined"){var YAHOO={};} YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i0){param=args[0];} ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);} if(false===ret){if(!this.silent){} return false;}}} return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i=0){cacheItem=listeners[index];} if(!el||!cacheItem){return false;} if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i0);} var notAvail=[];for(var i=0,len=onAvailStack.length;i0){for(var i=0,len=listeners.length;i0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);} j=j-1;} l=null;EU.clearCache();} for(i=0,len=legacyEvents.length;i-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;} if(propertyCache[property]){return propertyCache[property];} while(patterns.HYPHEN.exec(property)){property=property.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());} propertyCache[property]=property;return property;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];} return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}} return val/100;break;default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};} if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(typeof el.style.filter=='string'){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}} break;default:el.style[property]=val;}};}else{setStyle=function(el,property,val){el.style[property]=val;};} YAHOO.util.Dom={get:function(el){if(!el){return null;} if(typeof el!='string'&&!(el instanceof Array)){return el;} if(typeof el=='string'){return document.getElementById(el);} else{var collection=[];for(var i=0,len=el.length;i=this.left&®ion.right<=this.right&®ion.top>=this.top&®ion.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];} this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();function $boolean(value){return value?true:false;}function $Array(value){if(value.constructor==Array){return value;}else{if(value===null||typeof (value)=="undefined"){return[];}else{if(typeof (value)!="string"&&typeof (value.length)=="number"){var a=[],i,n;for(i=0,n=value.length;i0){format.maxDepth--;aValue=($String)(aValue,format);format.maxDepth++;}if(str.length){str+=format.separator;}str+=key+format.joiner+aValue;}}}return format.prefix+str+format.suffix;}function $Nodes(descriptor,parentNode){var nodes;if(typeof (descriptor)=="string"){nodes=(document.getElementById(descriptor)||new site9.CssSelector(descriptor).selectAll(parentNode));}else{nodes=descriptor;}return($Array)(nodes);}function $Node(descriptor,parentNode){var nodes=($Nodes)(descriptor,parentNode);return(nodes.length?nodes[0]:null);}function isNaO(obj){return(obj===null||typeof (obj)!=="object");}function _(descriptor){if(typeof (descriptor)=="string"||(descriptor&&descriptor.constructor==String)){return document.getElementById(descriptor);}return descriptor;}function __(descriptor,startingAt){return ___(descriptor,startingAt)[0];}function ___(descriptor,startingAt){if(typeof (descriptor)=="string"||(descriptor&&descriptor.constructor==String)){return new site9.CssSelector(descriptor).selectAll(startingAt);}return[descriptor];}(function(){Object.___getThis=function(_arg,_this,_disallow){if(_arg){return _arg;}else{if(_this!=_disallow){return _this;}else{return null;}}};Object.overlay=function(properties,_this){_this=Object.___getThis(_this,this,Object);for(var key in properties){var oldValue=_this[key];var newValue=properties[key];if(!isNaO(oldValue)&&!isNaO(newValue)){newValue=Object.overlay(newValue,oldValue);}_this[key]=newValue;}return _this;};Object.overlay({create:function(prototype){function Ctor(){}Ctor.prototype=prototype||Object.prototype;return new Ctor();},copyTo:function(object,_this){_this=Object.___getThis(_this,this,Object);object=object||{};for(var aKey in _this){var value=_this[aKey];if(object[aKey]!=value){object[aKey]=value;}}return object;},swap:function(object,keys,_this){_this=Object.___getThis(_this,this,Object);for(var i=0;i=theString.length&&this.substring(0,theString.length)==theString);},endsWith:function(theString){return(this.length>=theString.length&&this.substring(this.length-theString.length)==theString);},toTitleCase:function(){return this.length?this.substring(0,1).toUpperCase()+this.substring(1):this;},spliced:function(start,len,toInsert){if(!toInsert){toInsert="";}if(!start){start=0;}if(!len){len=0;}return this.replace(new RegExp("(.{"+start+"})(.{"+len+"})(.*)"),"$1"+toInsert+"$3");}},String.prototype);Object.overlay({indexOf:function(theObject){for(var i=0;i=0;i--){if(anObj==this[i]){this.splice(i,1);removed=anObj;}}return removed;},removeDuplicates:function(){var removed=[];for(var i=0,n=this.length;i"+this.title()+"');win.document.close();return win;},toString:function(){return"["+this.title()+"]";}},site9.DebugConsole.prototype);site9.DebugConsole._namedConsoles={};site9.DebugConsole.withName=function(consoleName,create){if(!consoleName){consoleName="out";}var console=this._namedConsoles[consoleName];if(!console&&create){console=new site9.DebugConsole(consoleName);}return console;};if((/[?&]site9.debug.enabled=(yes|true|1)\b/i).test(window.location.search)||window.location.hostname.lastIndexOf(".")0){site9.debug(this._window.document.value);this._window.document.value="";}};}else{site9.debug=site9.clearDebug=function(){};}try{site9.debug("Using built-in Node constants (ELEMENT_NODE: "+Node.ELEMENT_NODE+")");site9._NodeConstants=Node;}catch(e){site9._NodeConstants={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11};}site9.isStructuralNode=function(theNode){var ntype=theNode.nodeType;return(ntype==site9._NodeConstants.ELEMENT_NODE||ntype==site9._NodeConstants.DOCUMENT_NODE||ntype==site9._NodeConstants.DOCUMENT_FRAGMENT_NODE);};site9.nodeAncestry=function(theNode,stoppingBefore){var list=[];if(theNode){while((theNode=theNode.parentNode)&&(theNode!=stoppingBefore)){list.push(theNode);}}return list;};site9.nodePath=function(theNode,stoppingBefore){var path=site9.nodeAncestry(theNode,stoppingBefore);path.reverse();path.push(theNode);return path;};site9.nodePathString=function(theNode,stoppingBefore){if(typeof (theNode)=="string"){return theNode;}return path=site9.nodePath(theNode,stoppingBefore).forEach(function(){return site9.nodeDescription(this);}).join("/");};site9.nodeTreeString=function(theNode,depth){var buffer="";if(!depth){depth="";buffer+=site9.nodePathString(theNode);}else{buffer+=depth;buffer+=site9.nodeDescription(theNode);}buffer+="\r\n";depth+="\t";for(var i=0;i"){theNode=theNode.nextSibling;}else{if(instr=="v"){theNode=theNode.childNodes[0];}else{if(instr=="<"){theNode=theNode.previousSibling;}else{site9.debug("site9.navigateNodes: Unknown instruction '"+instr+"'");}}}}if(!theNode){return null;}}while(!site9.isStructuralNode(theNode));}return theNode;};site9.navigateNodesCss=function(instructions,theNode){instructions=unescape(instructions);instructions=instuctions.replace(//g,"v");instructions=instuctions.replace(/-/g,"<").replace(/\+/g,">");return site9.navigateNodes(instructions,theNode);};site9.CssSelector=function(params){if(site9.CssSelector.DEBUG){site9.debug("Creating CssSelector from: ",params);}this.simpleSels=[];params=site9.CssSelector._prepareParams(params);while(site9.CssSelector._peek(params)!=""){this.simpleSels.push(new site9._SimpleCssSelector(params));site9.CssSelector._skip(params,site9.CssSelector.SEPARATOR);}if(site9.CssSelector.DEBUG){site9.debug("CssSelector: ",this);}};Object.overlay({SEPARATOR:/[,\s]/,SPACE:/\s/,_prepareParams:function(params){if(!params._pos){if(typeof (params)=="string"){params={format:params};}else{if(!params){params={format:""};}else{if(params.selecting){var path=site9.nodePath(params.selecting,params.relativeTo||document);delete params.selecting;path.forEach(function(){return site9.nodeDescription(this,{id:true,className:true});});params.format="> "+path.join(" > ");}}}params.format=this._preproc(params.format);params._pos={i:0,n:params.format.length};site9.CssSelector._skip(params,site9.CssSelector.SPACE);}return params;},_preproc:function(text){var b=[],bn=0,x=/\\/,q=/["']/,w=/\w/,esc=null,pesc=null,quote=null;for(var i=0,n=text.length;i0;}for(var i=0;i=0;i1--){var possible=[];for(var i2=0;i2^\s\-+`~]/,EoSEL:/^[,<>^\s\-+`~]?$/,DEBUG:site9._SimpleCssSelector.DEBUG},site9._BasicCssSelector);Object.overlay({_tagName:"*",_joiner:" ",selectAll:function(theNode){if(site9._BasicCssSelector.DEBUG){site9.debug(this,".selectAll(): ",theNode);}var possible=this._join(theNode,this._joiner);var selected=[];for(var i=0;i":return theNode.childNodes;case"<":return[theNode.parentNode];case"+":do{theNode=theNode.nextSibling;}while(theNode&&!site9.isStructuralNode(theNode));return(theNode?[theNode]:[]);case"-":do{theNode=theNode.previousSibling;}while(theNode&&!site9.isStructuralNode(theNode));return(theNode?[theNode]:[]);case"~":if(!theNode.parentNode){return[];}var sibs=[].concat(theNode.parentNode.childNodes);var index=sibs.indexOf(theNode)+1;sibs=(index0)?sibs.slice(0,index):[];default:site9.debug("********** WARNING: ",this,": Unsupported joiner: ",theJoiner," **********");return[];}},_inverseJoiner:function(){switch(this._joiner){case".":return".";case" ":return"^";case"^":return" ";case">":return"<";case"<":return">";case"+":return"-";case"-":return"+";case"~":return"`";case"`":return"~";}site9.debug("********** WARNING: ",this,": Unsupported joiner: ",theJoiner," **********");return null;},toString:function(){if(this._joiner=="."){return"";}var str="";if(this._joiner&&this._joiner!=" "){str+=this._joiner+" ";}return str+this.cssMatchers.join("");},copy:function(){var theCopy=new site9._BasicCssSelector();theCopy._joiner=this._joiner;for(var i=0;i=0){this._nthChild=(b+1);}else{this._nthChild=(0-b);}}else{throw"site9.CssSelector: The pseudo-class '"+pseudo+"' in not supported";}break;}break;case"#":ts=["id","=",site9.CssSelector._read(params,site9._CssMatcher.EoMATCHER)];break;case".":ts=["class","~=",site9.CssSelector._read(params,site9._CssMatcher.EoMATCHER)];break;default:site9.CssSelector._unread(params,c);ts=["tagName",(c=="*"?"":"="),site9.CssSelector._read(params,site9._CssMatcher.EoMATCHER)];break;}if(ts){this._attribute=ts[0];this._matchType=ts[1];this._value=ts[2];this._property=this._attribute.toLowerCase();this._property=site9._CssMatcher.ATTR_2_PROP[this._property]||this._property;switch(this._matchType){case"":this._condition={test:function(val){return val!="";}};break;case"~=":this._condition=new RegExp("(^|\\s)"+RegExp.escape(this._value)+"(\\s|$)");break;case"|=":this._condition=new RegExp("^"+RegExp.escape(this._value)+"(-|$)");break;case"=":this._condition={_val:this._value,test:function(val,consideringCase){return(consideringCase?(val==this._val):(val&&(val.toUpperCase()==this._val.toUpperCase())));}};break;default:throw"site9.CssSelector: The attribute matching operator '"+this._matchType+"' is not supported";break;}}if(site9._CssMatcher.DEBUG){site9.debug("_CssMatcher: ",this);}};Object.overlay({EoWORD:/[^\w\-]/,EoOPERATOR:/[^~\|=]/,EoMATCHER:/^[,<>^\s+`~\[.:#]?$/,EoATTR_SEL:/\]/,EoPAREN:/\)/,NUMBER:/^-?\d+$/,ATTR_2_PROP:{"class":"className","tagname":"tagName","for":"htmlFor","alink":"aLink","vlink":"vLink","bgcolor":"bgColor"},DEBUG:site9._BasicCssSelector.DEBUG},site9._CssMatcher);Object.overlay({matchesNode:function(theNode){if(site9._CssMatcher.DEBUG){site9.debug(this,"._matchesNode(): ",theNode);}if(this._nthChild){var sibs=theNode.parentNode.childNodes;var nth=this._nthChild;var start,delta;if(nth>0){start=0;delta=1;}else{start=sibs.length-1;delta=-1;nth=-nth;}for(var i=start;0<=i&&i0){return":nth-child("+this._nthChild+")";}if(this._nthChild<0){return":nth-last-child("+(-this._nthChild)+")";}switch(this._attribute){case"tagName":if(this._matchType=="="){return site9.CssSelector._preproc('"'+this._value+'"');}else{if(this._matchType==""){return"*";}}break;case"id":if(this._matchType=="="){return"#"+site9.CssSelector._preproc('"'+this._value+'"');}break;case"class":if(this._matchType=="~="){return"."+site9.CssSelector._preproc('"'+this._value+'"');}break;}if(this._attribute){return"["+site9.CssSelector._preproc('"'+this._attribute+'"')+this._matchType+site9.CssSelector._preproc('"'+this._value+'"')+"]";}return"";},copy:function(){var theCopy=new site9._CssMatcher();theCopy._attribute=this._attribute;theCopy._condition=this._condition;theCopy._nthChild=this._nthChild;theCopy._matchType=this._matchType;theCopy._value=this._value;return theCopy;}},site9._CssMatcher.prototype);site9.css={SEL:site9.CssSelector,selectAll:function(format,theNode){return new site9.css.SEL(format).selectAll(theNode);},selectFirst:function(format,theNode){return new site9.css.SEL(format).selectFirst(theNode);},className:{swap:function(el,class1,class2){var cn=el.className;var swap="#=_";while(cn.indexOf(swap)!=-1){swap=(swap+swap);}if(class1){cn=cn.replace(new RegExp("(^|\\s)"+RegExp.escape(class1)+"(\\s|$)","g"),"$1"+swap+"$2");}if(class2){cn=cn.replace(new RegExp("(^|\\s)"+RegExp.escape(class2)+"(\\s|$)","g"),"$1"+(class1||"")+"$2");}cn=cn.replace(new RegExp(swap,"g"),(class2||""));el.className=cn;},contains:function(el,aClass){return new RegExp("(^|\\s)"+RegExp.escape(aClass)+"(\\s|$)").test(el.className);},add:function(el,aClass){el.className+=(" "+aClass);},remove:function(el,aClass){this.swap(el,aClass,null);}}};site9.validEmail=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;site9.validURL=/^https?:\/\/[a-zA-Z0-9.\-]+\/[a-zA-Z0-9._\/\?\&;=#\-]*$/;site9.verifyEmail=function(emailAddress){site9.deprecated("site9.verifyEmail",null,"Use site9.validEmail.test(...) instead");return site9.validEmail.test(emailAddress);};site9.verifyEmailWithAlert=function(emailAddress){if(site9.validEmail.test(emailAddress)){return true;}alert("'"+emailAddress+"' does not appear to be a valid e-mail address. Please double-check it.\r\n\r\nE-mail addresses are usually something like 'name@example.com'");return false;};site9.verifyURL=function(theURL){site9.deprecated("site9.verifyURL",null,"Use site9.validURL.test(...) instead");return site9.validURL.test(emailAddress);};site9.verifyURLWithAlert=function(theURL){if(site9.validURL.test(theURL)){return true;}alert("'"+theURL+"' does not appear to be a valid URL. Please double-check it.\r\n\r\nComplete URLs must start with 'http://' or 'https://' and have at least a forward-slash after the host name, like 'http://www.example.com/'.");return false;};site9.verifyText=function(theText,maxLength){return(theText.length<=maxLength);};site9.verifyTextWithAlert=function(theText,maxLength){if(verifyText(theText,maxLength)){return true;}theText=theText.substring(maxLength-20,maxLength);alert("The text you provided is too long. Everything after '..."+theText+"' will be cut off.");return false;};site9.paginatedConfirm=function(pageHeader,text,linesPP){var lines=text.split("\r\n").join("\n").split("\r").join("\n").split("\n");if(lines.length1){theUrl=hash[0];hash="#"+hash[1];}else{hash="";}var a=theUrl.search(new RegExp("[?&]"+fieldName+"([=&].*)?$"))+1;if(a>0){var b=theUrl.indexOf("&",a);if(b==-1){b=theUrl.length-1;a--;}theUrl=theUrl.substring(0,a)+theUrl.substring(b+1);}if(fieldValue){theUrl+=(theUrl.indexOf("?")>=0?"&":"?")+fieldName+"="+escape(fieldValue,1);}return theUrl+hash;},getUrlField:function(theUrl,fieldName){theUrl=theUrl.replace(/^[^?]*\?/,"");fieldName=escape(fieldName,1);if(theUrl.length>0){var pairs=theUrl.split("&");for(var i=0;i=new Date().getTime()){site9.debug(this,".pageWillUnload: Form was submitted: ",this._formWasSubmitted);}else{if(site9.nodeAncestry(this._form).indexOf(document)==-1){site9.debug(this,".pageWillUnload: Form is an orphan: ",site9.nodeAncestry(this._form));}else{return((event||window.event).returnValue=this.unloadMessage);}}}}},addFCKInstance:function(fckInstance){this._fckInstances.push(fckInstance);fckInstance.Events.AttachEvent("OnSelectionChange",this._fckChanged);},_fckChanged:function(fckInstance){if(fckInstance.IsDirty()){fckInstance.UpdateLinkedField();fckInstance.LinkedField.onchange();}},_resetAllFCKInstances:function(){for(var i=0;i4||typeof (opts)=="number"){opts={priority:arguments[3],condition:arguments[4],thisArg:arguments[5],args:arguments[6]};}else{opts=opts||{};}var attachment=new site9.events._Attachment(node,eventName,handler,opts.priority,opts.condition,opts.thisArg,opts.args);if(typeof (node)=="string"&&this._pending){this._pending.push(attachment);}else{this._attach(attachment);}return attachment;},dettach:function(attachment){var node=attachment.node;var eventName=attachment.eventName;var attachments;if(typeof (node)=="string"){attachments=this._pending;for(var i=0;i1){attachments.splice(i,1);}else{delete node[eventName];}return true;}}}}site9.debug("***** WARNING: Could not dettach the attachment: ",attachment,", perhaps it was already dettached? ... attachments: ",attachments);return false;},_patchWindowFocus:function(){this._patchWindowFocus=function(){};var attachment=new site9.events._Attachment(window,"focus",function(event){if(!site9.events._windowHasFocus){site9.events._windowHasFocus=true;if(window.on_focus){return window.on_focus(event);}}},-1000);attachment.eventName="onfocus";this._attach(attachment);var attachment=new site9.events._Attachment(window,"blur",function(event){if(site9.events._windowHasFocus){site9.events._windowHasFocus=false;if(window.on_blur){return window.on_blur(event);}}},-1000);attachment.eventName="onblur";this._attach(attachment);},_attach:function(attachment){var node=attachment.node;var eventName=attachment.eventName;if(typeof (node)=="string"){attachment.node=node=site9.getElementBySelector(node);}var attachable=node[eventName];if(!attachable||!attachable.__attachments){var defaultHandler=attachable;attachable=this._createHandlerFn(eventName);attachable.__attachments=[];if(typeof (defaultHandler)=="function"){attachable.__attachments.push(new site9.events._Attachment(node,eventName,defaultHandler,0));}node[eventName]=attachable;}for(var i=0;iattachment.priority){attachable.__attachments.splice(i,0,attachment);return ;}}attachable.__attachments.push(attachment);},_createHandlerFn:function(eventName){return function(){return site9.events._dispatch(this,eventName,arguments);};},_loadPending:function(){var attachments=this._pending;delete this._pending;for(var i=0;i0){return obj[0];}}}return null;}};site9.events._Attachment=function(node,eventName,handler,priority,condition,thisArg,args){this.node=node;this.setEventName(eventName);this.setHandler(handler);this.priority=priority||0;if(condition){this.setCondition(condition);}this.thisArg=thisArg;this.args=args;};Object.overlay({toString:function(attachment){attachment=attachment||this;return(attachment.node+"."+attachment.eventName+"+="+attachment.handler+"("+attachment.priority+")");},setEventName:function(newEventName){newEventName=newEventName.toLowerCase();if(!newEventName.startsWith("on")){newEventName=("on"+newEventName);}this.eventName=newEventName;},setHandler:function(newHandler){if(typeof (newHandler)=="string"){newHandler=new Function("event",newHandler);}this.handler=newHandler;},setCondition:function(newCondition){if(typeof (newCondition)=="string"){newCondition=new Function("results",newCondition);}this.condition=newCondition;},trigger:function(){return this.handler.apply(this.thisArg||this.node,this.args||arguments);}},site9.events._Attachment.prototype);site9.events.SimpleEventListener=function(target,action){this._target=target;if(typeof (action)=="string"){if(/^\w+$/.test(action)&&(action in target)&&("apply" in target[action])){action=target[action];}else{action=new Function("event",action);}}this._action=action;};Object.overlay({handleEvent:function(event){this._action.apply(this._target,arguments);}},site9.events.SimpleEventListener.prototype);var nextTimerId=1;site9.events.Timer=function(params){params=params||{};this.interval=params.interval||0.1;this.repeatCount=params.repeatCount;this._id=nextTimerId++;};Object.overlay({__map:{}},site9.events.Timer);Object.overlay({_thread:null,_expectedFiring:null,toString:function(){return"site9.events.Timer:"+this._id;},run:function(repeatCount){this.stop();this.setRepeatCount(repeatCount);var ms=this.getInterval()*1000;var now=new Date().getTime();if(!this._expectedFiring){this._expectedFiring=now;}else{if(this._expectedFiring0){site9.events.Timer.__map[this._id]=this;this._expectedFiring=now+ms;this._thread=window.setTimeout("site9.events.Timer.__map["+this._id+"]._tick()",this.interval*1000);}else{if(this.getInterval()!=0||!this.isRepeating()){this._expectedFiring=now;this._tick();}else{site9.debug(this+": BAD CONFIGURATION -- not firing");}}},stop:function(){if(this._thread){window.clearTimeout(this._thread);delete this._expectedFiring;this._clear();}},isRunning:function(){return($boolean)(this._thread);},isRepeating:function(){return this.getRepeatCount()!=0;},getRepeatCount:function(){return this.repeatCount;},setRepeatCount:function(newRepeatCount){this.repeatCount=Math.max(newRepeatCount||0,-1);},getInterval:function(){return this.interval;},setInterval:function(newInterval){var wasRunning=this.isRunning();if(wasRunning){this.stop();}this.interval=newInterval;if(wasRunning){this.run(this.getRepeatCount());}},_clear:function(){delete this._thread;delete site9.events.Timer.__map[this._id];},_tick:function(){this._clear();if(this.ontick){this.ontick();}else{site9.debug(this+" ticked, but no one was listening!");}if(this.isRepeating()){this.run(this.getRepeatCount()-1);}if(!this.isRunning()){delete this._expectedFiring;}}},site9.events.Timer.prototype);if(window.jQuery){jQuery(function(){if(document.onready){document.onready();}});}else{site9.events.attach(window,"load",function(){if(document.onready){document.onready();}},{priority:-1});}site9.events.attach(document,"ready",site9.events._loadPending,{thisArg:site9.events,priority:-1});site9.HttpConnection=function(async,allowsQueuing,onload,onerror){this._id="id:"+site9.HttpConnection.nextId++;this._async=async;this._usesQ=allowsQueuing;this._q=[];this._reusable=0;if(onload){this.onload=onload;}else{if(async){this.onload=function(){site9.debug("site9.HttpConnection taking no action onload!");};}}if(onerror){this.onerror=onerror;}else{if(async){this.onerror=function(){site9.debug("site9.HttpConnection taking no action onerror.");};}}};Object.overlay({get:function(url){this.push(this.queuedGET(url));return this;},post:function(url,data){this.push(this.queuedPOST(url,data));return this;},submit:function(form){return post(form.action,site9.forms.urlEncode(form));},onload:function(){},onerror:function(){},succeeded:function(){return(200<=this.xmlHttp.status&&this.xmlHttp.status<300);},getCurrentRequest:function(){return this._current;},createGET:function(url){return{method:"GET",url:url,data:null};},createPOST:function(url,data){return{method:"POST",url:url,data:data};},push:function(request){if(!this._usesQ){this.stop(true);}this._q.push(request);if(!this._current){this._resume();}},unshift:function(request){if(!this._usesQ){this.stop(true);}this._q.unshift(request);if(!this._current){this._resume();}},stop:function(all){if(this.xmlHttp){this.xmlHttp.abort();}if(all){this._q=[];}this._resume();return this;},_resume:function(){this._checkAttachmentTo("load");this._checkAttachmentTo("error");delete this._current;if(this._q.length>0){var request=this._q.shift();this._current=request;switch(this._reusable){case 0:try{this.xmlHttp=new XMLHttpRequest();this._reusable=1;}catch(e1){try{this.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");this._reusable=0;}catch(e2){try{this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");this._reusable=0;}catch(e3){site9.debug("No XML HTTP found.");return ;}}}case 1:this.xmlHttp.onreadystatechange=new Function("site9.HttpConnection.onreadystatechange('"+this._id+"');");case 2:site9.HttpConnection.active[this._id]=this;}this.xmlHttp.open(request.method,request.url,this._async);this.xmlHttp.send(request.data);if(!this._async){site9.HttpConnection.onreadystatechange(this._id);}}},_checkAttachmentTo:function(eventName){var checkName="_"+eventName+"Attachment";var fnName="on"+eventName;if(this[checkName]!=this[fnName]){site9.events.attach(this,eventName,"this._resume();",10);this[checkName]=this[fnName];}},toString:function(){return"[site9.HttpConnection ("+this._id+")]";}},site9.HttpConnection.prototype);Object.overlay({nextId:0,active:{},onreadystatechange:function(id){var context=site9.HttpConnection.active[id];if(!context){return ;}if(context.xmlHttp.readyState==4){if(context.succeeded()){context.onload(context,1,2,3,4,5);}else{context.onerror(context,1,2,3,4,5);}delete site9.HttpConnection.active[id];}}},site9.HttpConnection);site9.pseudoHover=function(){var ieVersion=-1;if(navigator.appName=="Microsoft Internet Explorer"){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null){ieVersion=parseFloat(RegExp.$1);}}if(ieVersion>-1&&ieVersion<=6){var navComponents=new site9.CssSelector(".s9_hover_container").selectAll(document);for(var n=0;n0){args+=", ";}args+=typeof (theCallerArgs[i]);}site9.debug("\r\n\r\n---\r\nWarning: Deprecated function: "+theName+"( "+args+" ) called from "+(theCallerCaller?theCallerCaller:"?")+(message?"\r\n"+message:"")+"\r\n---\r\n\r\n");if(typeof (replacedBy)=="function"){return replacedBy.apply(this,theCaller.arguments);}};site9._firstInList=function(theList){site9.deprecated("site9._firstInList",null,"Use theList[0] instead");return theList[0];};site9._getElementsByAttributes=function(theNode,isDirect,theTag,theIds,theClasses){site9.deprecated("site9._getElementsByAttributes",null,"Use new site9.CssSelector( selectorText ).selectAll( theNode ) instead");var selectorText=theTag;if(isDirect){selectorText=">"+selectorText;}for(var i=0;ithis.max){newState=(this.wrap?this.min:this.max);}if(newState0){if(typeof (params.updating)!="undefined"){params.updating=___(params.updating,params.sender);for(var i=0;i *"});this._applyChange(parser,params);}}delete this._active;},_applyChange:function(parser,params){if(params.selecting){params.inserting=params.selecting.selectAll(parser);}else{params.inserting=[];}if(params.after){params.before=__(params.after,params.sender).nextSibling||null;}if(params.before){params.before=__(params.before,params.sender)||null;}params.under=params.under||params.before.parentNode;params.replacing=params.replacing.where(function(parent){return site9.nodeAncestry(this).indexOf(parent)+1;},[params.under]);if(!params.before&&!params.after&¶ms.replacing.length){params.before=params.replacing.lastObject().nextSibling||null;}params.replacing.forEach(function(){this.parentNode.removeChild(this);return null;});params.inserting.forEach(function(parent,nextSibling){parent.insertBefore(this,nextSibling);return null;},[params.under,params.before]);}};site9.Notifications={_div:null,_wrapper:null,_outer:null,_timeouts:[],_timer:null,post:function(notification){if(!this._checkpoint()){window.alert(notification.userLevelDecription);}else{if(typeof (notification)==="string"){notification={name:notification};}var newMsgDiv=document.createElement("div");newMsgDiv.className=this._cssClassNames(notification.level);newMsgDiv.appendChild(document.createTextNode(notification.userLevelDescription||notification.name));this._div.appendChild(newMsgDiv);if(notification.timeout){this._timeouts.push({message:newMsgDiv,at:new Date().getTime()+(notification.timeout*1000)});}this._checkpoint();}},clear:function(theMsg){if(!theMsg){this._timeouts=[];while(this._checkpoint()&&this._div.childNodes.length){this._div.removeChild(this._div.childNodes[0]);}}else{try{this._div.removeChild(theMsg);this._checkpoint();}catch(e){}}},_checkpoint:function(){if(!this._wrapper){this._wrapper=__("#s9_notifications");if(!this._wrapper){return false;}var node=this._wrapper;node=document.createElement("div");this._wrapper.parentNode.appendChild(node);node.appendChild(this._wrapper);node.className+="x_dynamic";if(node&&node.parentNode!=document.body){document.body.appendChild(node);}}if(!this._div){this._div=__(".s9_notifications",this._wrapper);if(!this._div){return false;}}if(this._timeouts.length){var now=new Date().getTime();var timeouts=this._timeouts;this._timeouts=[];var remainingTimeouts=[];for(var i=0;i0){_19+="flashvars=\""+_1c+"\"";}_19+="/>"; }else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");} _19=""; _19+=""; var _1d=this.getParams(); for(var key in _1d){_19+="";} var _1f=this.getVariablePairs().join("&"); if(_1f.length>0){_19+="";}_19+="";} return _19; },write:function(_20){ if(this.getAttribute("useExpressInstall")){ var _21=new deconcept.PlayerVersion([6,0,65]); if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){ this.setAttribute("doExpressInstall",true); this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))); document.title=document.title.slice(0,47)+" - Flash Player Installation"; this.addVariable("MMdoctitle",document.title);}} if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){ var n=(typeof _20=="string")?document.getElementById(_20):_20; n.innerHTML=this.getSWFHTML();return true; }else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}} return false;}}; deconcept.SWFObjectUtil.getPlayerVersion=function(){ var _23=new deconcept.PlayerVersion([0,0,0]); if(navigator.plugins&&navigator.mimeTypes.length){ var x=navigator.plugins["Shockwave Flash"]; if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));} }else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");} catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); _23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";} catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");} catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}} return _23;}; deconcept.PlayerVersion=function(_27){ this.major=_27[0]!=null?parseInt(_27[0]):0; this.minor=_27[1]!=null?parseInt(_27[1]):0; this.rev=_27[2]!=null?parseInt(_27[2]):0; }; deconcept.PlayerVersion.prototype.versionIsValid=function(fv){ if(this.majorfv.major){return true;} if(this.minorfv.minor){return true;} if(this.rev1){var temp=ix_slideshow_bundle_index;while(temp==ix_slideshow_bundle_index){temp=Math.floor(Math.random()*ix_sliddeshow_sources.length);}ix_slideshow_bundle_index=temp;}else{ix_slideshow_bundle_index=((ix_slideshow_bundle_index+1)%ix_sliddeshow_sources.length);}var wrapping_element=ix_slideshow_div;if(ix_sliddeshow_hrefs.length>0){wrapping_element=ix_slideshow_div.getElementsByTagName("a")[0];wrapping_element.href=ix_sliddeshow_hrefs[ix_slideshow_bundle_index];}var images=wrapping_element.getElementsByTagName("img");images[0].src=ix_sliddeshow_sources[ix_slideshow_bundle_index];images[0].alt=ix_sliddeshow_alts[ix_slideshow_bundle_index];ix_slideshow_div.style.visibility="visible";ix_slideshow_div.style.display="block";}else{site9.debug("ix_slideshow_main: Big trouble! Cannot find 'ix_slideshow_div'");}}site9.ProductGallery=function(regEntry,wodec){this._regEntry=regEntry;this._wodec=wodec;};site9.ProductGallery.prototype={imagePath:null,containerId:null,largeViewBaseUrl:"",mainImageHeight:null,unavailableImages:null,_orientations:null,_sizes:null,_altTags:null,_widths:null,_wodec:null,_regEntry:null,_smallImageElement:null,_fileExtension:".jpg",_filePrefix:"",_defaultOrientationIndex:0};site9.ProductGallery.instance=null;site9.ProductGallery.prototype.init=function(){site9.ProductGallery.instance=this;this.build();};site9.ProductGallery.prototype.build=function(){var rolloverWrapper=document.createElement("ul");rolloverWrapper.id="ProductImageWrapper";var smallImageWrapper=document.createElement("div");smallImageWrapper.className="productImage";this._smallImageElement=document.createElement("img");this._smallImageElement.className="ixSmallImage";if(this._widths&&this._widths[1]){this._smallImageElement.width=this._widths[1];}if(this.mainImageHeight){this._smallImageElement.height=this.mainImageHeight;}this._smallImageElement.src=this.defaultImageUrl();this._smallImageElement.name=this._defaultOrientationIndex;if(this._sizes.length==3){this._smallImageElement.onclick=site9.ProductGallery.prototype.viewLargeImage;}smallImageWrapper.appendChild(this._smallImageElement);for(i=0;i0&&this.unavailableImages.indexOf(src)>-1){img.style.visiblity="hidden";img.style.display="none";}img.title=this._altTags[i];img.alt=this._altTags[i];var li=document.createElement("li");li.appendChild(img);rolloverWrapper.appendChild(li);if(this.unavailableImages&&this.unavailableImages.length>0&&this.unavailableImages.indexOf(src)>-1){li.style.visiblity="hidden";li.style.display="none";}if(i==0){li.className="firstChild";}}var li=document.createElement("li");li.style.visible="hidden";li.style.display="none";li.className="viewLarge";rolloverWrapper.appendChild(li);li=document.createElement("li");li.style.visible="hidden";li.style.display="none";li.className="viewZoom";rolloverWrapper.appendChild(li);var container=new site9.CssSelector("."+this._wodec).selectFirst();container.appendChild(smallImageWrapper);container.appendChild(rolloverWrapper);if(this._sizes.length==3){container.appendChild(document.createElement("p"));}};site9.ProductGallery.prototype.buildImageUrl=function(orientation,sizeIndex){var url=this.imagePath+this._filePrefix+orientation+this._sizes[sizeIndex]+this._fileExtension;return(url);};site9.ProductGallery.prototype.getParentComponent=function(element){var result=null;var container=site9.getParentBySelector(".ProductGallery",element);if(typeof (container)!="undefined"){container=site9.getElementBySelector(".ix_module_id",container);if(typeof (container)!="undefined"){var wodec=container.id;result=site9.launchCompRegistry[wodec];}else{site9.debug("no child found");}}else{site9.debug("no parent found");}return(result);};site9.ProductGallery.prototype.rollImage=function(event){if(typeof (event)=="undefined"){event=window.event;}var target=(typeof (event.target)!="undefined"?event.target:event.srcElement);var component=site9.ProductGallery.prototype.getParentComponent(target);orientation=target.name;src=component.productGallery.buildImageUrl(orientation,1);component.productGallery._smallImageElement.src=src;component.productGallery._smallImageElement.alt=component.productGallery._altTags[component.productGallery._orientations.indexOf(orientation)];};site9.ProductGallery.prototype.restoreImage=function(event){if(typeof (event)=="undefined"){event=window.event;}var target=(typeof (event.target)!="undefined"?event.target:event.srcElement);var component=site9.ProductGallery.prototype.getParentComponent(target);src=component.productGallery.defaultImageUrl();};site9.ProductGallery.prototype.viewLargeImage=function(event){if(typeof (event)=="undefined"){event=window.event;}var target=(event.target||event.srcElement);component=site9.ProductGallery.prototype.getParentComponent(target);orientation=target.name;url=component.productGallery.buildImageUrl(orientation,2);window.open(url,"LargeView","width=540,height=670,resizable=1").focus();};site9.ProductGallery.prototype.setFileExtension=function(extension){this._fileExtension=extension;if(this._fileExtension.indexOf(".")!=0){this._fileExtension="."+this._fileExtension;}};site9.ProductGallery.prototype.setFilePrefix=function(prefix){this._filePrefix=prefix;};site9.ProductGallery.prototype.setWidths=function(widths){this._widths=widths.split(",");for(i=0;i=_this._height){_this._offset=0;_this._wrapperElement.removeChild(_this._scrollingContainer);var temp=_this._scrollingContainer;_this._scrollingContainer=_this._passiveContainer;_this._passiveContainer=temp;_this._wrapperElement.appendChild(_this._passiveContainer);_this._passiveContainer.style.marginTop="auto";}else{++_this._offset;}_this._scrollingContainer.style.marginTop="-"+_this._offset+"px";};site9.Elephant={restoreFormValues:function(formName,data){var f=document.forms.namedItem(unescape(formName));for(var key in data){var aKey=unescape(key);if(!aKey.startsWith("_")){var el=f.elements.namedItem(unescape(key));if(!el){site9.debug("Sorry, no form element named: ",key);}else{site9.forms.setElValue(el,unescape(data[key]));}}}}};function ix_showMovie(src,title,width,height,fallbackImageTag){document.writeln('');document.writeln(' ');document.writeln(' ');document.writeln(' ');document.writeln(' ');if(typeof (fallbackImageTag)!="undefined"){document.writeln(fallbackImageTag);}document.writeln("");}site9.YearlyCalendar={MONTHS:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],MONTHS_WITH_31_DAYS:["Jan","Mar","May","Jul","Aug","Oct","Dec"],displayGroupName:null,releaseFacetQueryValue:null,revokeFacetQueryValue:null,disableEmptyDates:null,_moduleId:null,_wodec:null,_innerDiv:null,_outerDiv:null,init:function(moduleId,wodec,displayGroupName,releaseFacetQueryValue,revokeFacetQueryValue,disableEmptyDates){this._moduleId=moduleId;this._wodec=wodec;this.displayGroupName=displayGroupName;this.releaseFacetQueryValue=releaseFacetQueryValue;this.revokeFacetQueryValue=revokeFacetQueryValue;this.disableEmptyDates=disableEmptyDates;this._outerDiv=document.getElementById(moduleId);this.createCalendar("inner_"+moduleId);return(this);},createCalendar:function(innerDivId){this._innerDiv=document.createElement("div");this._innerDiv.id=innerDivId;this._innerDiv.className="ix_calendar_year_view";this.addYear(new Date().getFullYear(),this._innerDiv);this._outerDiv.appendChild(this._innerDiv);},addYear:function(year,container){var calContainer=document.createElement("div");var label=document.createElement("p");label.className="year";var text=document.createTextNode(year);label.appendChild(text);var table=document.createElement("table");table.cellSpacing=0;table.cellPadding=0;table.border=0;this.tableHeader(table);this.tableBody(table,year);this.tableFooter(table);calContainer.appendChild(label);calContainer.appendChild(table);container.appendChild(calContainer);return(container);},tableHeader:function(table){},tableBody:function(table,year){var row=null;for(var i=0;i-1);}return(result);},linkBuilder:function(year,month){var destination="./?";if(typeof (this.revokeFacetQueryValue)!="undefined"){destination+=this.displayGroupName+"_FT_=";destination+=this.releaseFacetQueryValue+"_et_"+this.monthAsDigit(month)+"."+this.lastDayOfMonth(year,month)+"."+year;if(typeof (this.revokeFacetQueryValue)!="undefined"){destination+="&";}}if(typeof (this.revokeFacetQueryValue)!="undefined"){destination+=this.displayGroupName+"_FT_=";destination+=this.revokeFacetQueryValue+"_st_"+this.monthAsDigit(month)+".01."+year;}destination+="&"+this.displayGroupName+"_S_A=releaseDate";return(destination);},monthAsDigit:function(month){var result=""+(this.MONTHS.indexOf(month)+1);if(result.length==1){result="0"+result;}return(result);},lastDayOfMonth:function(year,month){var result="30";if(this.MONTHS_WITH_31_DAYS.indexOf(month)>-1){result="31";}else{if(month=="Feb"){result="28";if(year%4==0&&(year%100!=0||year%400==0)){result="29";}}}return(result);}};site9.MonthlyCalendar={displayGroupName:null,releaseFacetQueryValue:null,revokeFacetQueryValue:null,_pagedate:"",_selected:"",_selector:"st_",init:function(wodec,displayGroupName,releaseFacetQueryValue,revokeFacetQueryValue){var wrappingElement=new site9.CssSelector("."+wodec).selectFirst();if(typeof (wrappingElement.id)=="undefined"||wrappingElement.id==""){wrappingElement.id="outer_"+wodec;}var outerId=wrappingElement.id;var innerId="inner_"+wodec;this.deriveInitialDatesFromURL();this.releaseFacetQueryValue=releaseFacetQueryValue;this.revokeFacetQueryValue=revokeFacetQueryValue;this.displayGroupName=displayGroupName;var minDate=eval("window.minDate_"+wodec);var maxDate=eval("window.maxDate_"+wodec);var blackoutDates=eval("window.blackoutDates_"+wodec);var calendar=null;if(typeof (minDate)!="undefined"&&typeof (maxDate)!="undefined"&&typeof (blackoutDates)!="undefined"){calendar=new YAHOO.widget.Calendar(innerId,outerId,{pagedate:this._pagedate,selected:this._selected,minDate:minDate,maxDate:maxDate});calendar.selectEvent.subscribe(this.calendarSelect);calendar.addRenderer(blackoutDates,calendar.renderBodyCellRestricted);}else{calendar=new YAHOO.widget.Calendar(innerId,outerId);}return(calendar);},renderBodyCellRestricted:function(date,cell){return(YAHOO.widget.Calendar.STOP_RENDER);},deriveInitialDatesFromURL:function(){var url=document.URL;var index=url.indexOf("st_");if(index>-1){var selectorSegment=url.substring(index,url.length);selectorSegment=selectorSegment.substring(selectorSegment.indexOf("_")+1,selectorSegment.length);index=selectorSegment.indexOf("_");if(index==-1){index=selectorSegment.length;}var dateSegment=selectorSegment.substring(0,index);dateSegment=dateSegment.replace(/\./g,"/");this._selected=dateSegment.replace(/0?(.*\/)0?(.*\/.*)/,"$1$2");this._pagedate=dateSegment.replace(/0?(.*)\/.*(\/.*)/,"$1$2");site9.debug(this._selected);site9.debug(this._pagedate);}},calendarSelect:function(name,object){var date=new String(object[0]).split(",");var year=date[0].trim();var month=date[1].trim();var day=date[2].trim();if(month.length==1){month="0"+month;}if(day.length==1){day="0"+day;}var destination="./?";if(typeof (site9.MonthlyCalendar.revokeFacetQueryValue)!="undefined"){destination+=site9.MonthlyCalendar.displayGroupName+"_FT_=";destination+=site9.MonthlyCalendar.releaseFacetQueryValue+"_et_"+month+"."+day+"."+year;if(typeof (site9.MonthlyCalendar.revokeFacetQueryValue)!="undefined"){destination+="&";}}if(typeof (site9.MonthlyCalendar.revokeFacetQueryValue)!="undefined"){destination+=site9.MonthlyCalendar.displayGroupName+"_FT_=";destination+=site9.MonthlyCalendar.revokeFacetQueryValue+"_st_"+month+"."+day+"."+year;}destination+="&"+site9.MonthlyCalendar.displayGroupName+"_S_A=releaseDate";window.location.href=destination;window.event.returnValue=false;}};site9.AjaxLink={ajaxPost:function(theForm,url,constrainToViewport,targetDivId,positionDivId,displayType,transition,height,width,callingElement){if(!url){url=theForm.action;}YAHOO.util.Connect.setForm(theForm,false);site9.AjaxLink.ajaxSendReq("POST",constrainToViewport,false,url,targetDivId,positionDivId,displayType,transition,height,width,callingElement);},ajaxGet:function(url,constrainToViewport,useCache,targetDivId,positionDivId,displayType,transition,height,width,callingElement){site9.AjaxLink.ajaxSendReq("GET",constrainToViewport,useCache,url,targetDivId,positionDivId,displayType,transition,height,width,callingElement);},ajaxSendReq:function(method,constrainToViewport,useCache,url,targetDivId,positionDivId,displayType,transition,height,width,callingElement){if(!site9.AjaxLink.responseCache){site9.AjaxLink.responseCache=new Array();site9.AjaxLink.responseCount=0;}var response=site9.AjaxLink.responseCache[url];if(response&&useCache){if(response=="LOCK"){return ;}response.body.style.overflow="auto";response.show();}else{site9.AjaxLink.responseCache[url]="LOCK";var divIdVal=targetDivId;if(!divIdVal||divIdVal=="null"){divIdVal="xyzzy"+site9.AjaxLink.responseCount++;}var hasPositionDiv=true;if(!positionDivId||positionDivId==null){hasPositionDiv=false;}if(!document.getElementById(positionDivId)){hasPositionDiv=false;}var positioner=null;if(hasPositionDiv){positioner=positionDivId;}else{positioner=site9.getParentByTagName("div",callingElement);}var existingTargetDiv=document.getElementById(divIdVal);var params=new Array();params["visible"]=false;params["constraintoviewport"]=constrainToViewport;params["underlay"]="matte";if(width&&width!="nullpx"){params["width"]=width;}if(height&&height!="nullpx"){params["height"]=width;}var overlay=new YAHOO.widget.Panel(divIdVal,params);overlay.beforeShowEvent.subscribe(function(){YAHOO.util.Dom.setStyle(this.body,"overflow","auto");},overlay,true);overlay.beforeHideEvent.subscribe(function(){YAHOO.util.Dom.setStyle(this.body,"overflow","hidden");},overlay,true);overlay.setBody(" Loading");overlay.element.style.background="#fff";if(existingTargetDiv){overlay.render();}else{overlay.render(document.body);}if(displayType=="center"){overlay.center();}else{if(displayType=="fixed"){overlay.cfg.setProperty("fixedcenter",true);}else{overlay.cfg.setProperty("context",[positioner,displayType.substring(0,2),displayType.substring(2)]);}}if(transition&&transition!="null"){overlay.cfg.setProperty("effect",{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.4});}overlay.s9_useCache=useCache;overlay.hideEvent.subscribe(site9.AjaxLink.ajaxHide,overlay,true);site9.AjaxLink.responseCache[url]=overlay;overlay.show();var transaction=YAHOO.util.Connect.asyncRequest(method,url,new site9.AjaxLink.callback(url),null);}},ajaxHide:function(event){if(!this.s9_useCache){this.destroy();}},ajaxClose:function(url){var panel=site9.AjaxLink.responseCache[url];if(panel){panel.hide();}},ajaxHideParent:function(element){var panelContainer=site9.getParentBySelector(".panel-container",element);if(panelContainer){var panelCache=site9.AjaxLink.responseCache;for(var i in panelCache){var aPanel=panelCache[i];if(aPanel.element&&aPanel.element.id==panelContainer.id){aPanel.hide();}}}},callback:function(url){this.url=url;this.success=function(o){var panel=site9.AjaxLink.responseCache[url];panel.setBody(o.responseText);panel.show();window.onload=null;site9.execJS(panel.body);if(window.onload){window.onload();}panel.syncPosition();panel.cfg.refireEvent("iframe");};this.failure=function(o){site9.AjaxLink.responseCache[url].setBody("This request failed to load");};}};site9.launchCompRegistry={registerComponent:function(id){return(this[id]={events:{},handlers:{},containerElement:document.getElementById(id)});}};site9.ProductForm=function(regEntry,choiceCombinations,variantId){this._regEntry=regEntry;this._choiceCombinations=choiceCombinations;if(variantId){this._initSku=this.getSkuForVariantId(variantId);}if(this._initSku){site9.events.attach(window,"load",this.initHandler,null,null,this);}else{site9.events.attach(window,"load",this.setoption,null,null,this);}};site9.ProductForm.prototype={setquantity:function(qty){this._regEntry.events.onsetquantity(qty);},setoption:function(optionName,optionValue){this.setvariant(optionName,optionValue);this._regEntry.events.onsetoption(optionName,optionValue);},hasVariants:function(){return this._choiceCombinations.length>0;},setvariant:function(optionName,optionValue){var selectedChoices=new Array();var selectBoxes=new site9.CssSelector(".ix_product_option").selectAll(this._regEntry.containerElement);for(var i=0;i>>>>> fetch returned status "+o.status+" for "+costObject.elementId);costObject.fetch();}else{if(o.status==202){var x=new String(o.responseText);if(x&&x.length>0&&x.charAt(0)=="#"){var newElementId=costObject.elementId.substr(0,costObject.elementId.indexOf("_")+1)+o.responseText.substr(1,o.responseText.length);var newUrl=costObject.url.replace(costObject.elementId,newElementId);costObject.url=newUrl;site9.debug(">>>>> costObject.url = "+costObject.url);}costObject.fetch();}else{if(o.status==200){if(o.responseText&&o.responseText.length>0){site9.debug(">>>>>> got the shipping cost for "+costObject.elementId);this.element.innerHTML=o.responseText;costObject.updateDestPostalCode();if(costObject.completionCallback!=null&&typeof (costObject.completionCallback)!="undefined"){costObject.completionCallback();}}if(typeof (costObject.progIndic)!="undefined"){costObject.progIndic.parentNode.removeChild(costObject.progIndic);}}}}};this.failure=function(o){if(o.status<=0){site9.debug(">>>>> fetch timeout, status = "+o.status+", o.responseText = "+o.responseText);costObject.fetch();}else{site9.debug(">>>>>> fetch failed, status = "+o.status+" for "+costObject.elementId);this.element.innerHTML="*";if(typeof (costObject.progIndic)!="undefined"){costObject.progIndic.parentNode.removeChild(costObject.progIndic);}this.element=new site9.CssSelector(".FetchShippingCostFaultMessage").selectFirst();this.element.style.visibility="visible";this.element.style.display="block";if(o.responseText&&o.responseText.trim().length>0&&this.element.innerHTML.indexOf(o.responseText.trim())==-1){this.element.innerHTML+=" ("+o.responseText.trim()+")";}if(costObject.haltOnShippingCostFault==true){this.element=new site9.CssSelector(".PaymentInformationTable").selectFirst();this.element.style.visibility="hidden";this.element.style.display="none";this.element=new site9.CssSelector(".ContinueButton").selectFirst();this.element.disabled=true;}if(costObject.completionCallback!=null&&typeof (costObject.completionCallback)!="undefined"){costObject.completionCallback();}}};};