1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

[per-object-permissions] Removing YUI toolkit code.

git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Christopher Long 2006-08-11 14:07:47 +00:00
parent e46e6f6a3f
commit 03e1b7f821
67 changed files with 0 additions and 30591 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,181 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.txt
version: 0.11.0
*/
YAHOO.widget.AutoComplete=function(inputEl,containerEl,oDataSource,oConfigs){if(inputEl&&containerEl&&oDataSource){if(oDataSource&&(oDataSource instanceof YAHOO.widget.DataSource)){this.dataSource=oDataSource;}
else{return;}
if(YAHOO.util.Dom.inDocument(inputEl)){if(typeof inputEl=="string"){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+inputEl;this._oTextbox=document.getElementById(inputEl);}
else{this._sName=(inputEl.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+inputEl.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._oTextbox=inputEl;}}
else{return;}
if(YAHOO.util.Dom.inDocument(containerEl)){if(typeof containerEl=="string"){this._oContainer=document.getElementById(containerEl);}
else{this._oContainer=containerEl;}
if(this._oContainer.style.display=="none"){}}
else{return;}
if(typeof oConfigs=="object"){for(var sConfig in oConfigs){if(sConfig){this[sConfig]=oConfigs[sConfig];}}}
this._initContainer();this._initProps();this._initList();this._initContainerHelpers();var oSelf=this;var oTextbox=this._oTextbox;var oContent=this._oContainer._oContent;YAHOO.util.Event.addListener(oTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf);YAHOO.util.Event.addListener(oTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf);YAHOO.util.Event.addListener(oTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf);YAHOO.util.Event.addListener(oTextbox,"focus",oSelf._onTextboxFocus,oSelf);YAHOO.util.Event.addListener(oTextbox,"blur",oSelf._onTextboxBlur,oSelf);YAHOO.util.Event.addListener(oContent,"mouseover",oSelf._onContainerMouseover,oSelf);YAHOO.util.Event.addListener(oContent,"mouseout",oSelf._onContainerMouseout,oSelf);YAHOO.util.Event.addListener(oContent,"scroll",oSelf._onContainerScroll,oSelf);YAHOO.util.Event.addListener(oContent,"resize",oSelf._onContainerResize,oSelf);if(oTextbox.form){YAHOO.util.Event.addListener(oTextbox.form,"submit",oSelf._onFormSubmit,oSelf);}
this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);oTextbox.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;}
else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.5;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.iFrameSrc="about:blank";YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.getName=function(){return this._sName;};YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.getListItems=function(){return this._aListItems;};YAHOO.widget.AutoComplete.prototype.getListItemData=function(oListItem){if(oListItem._oResultData){return oListItem._oResultData;}
else{return false;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(sHeader){if(sHeader){if(this._oContainer._oContent._oHeader){this._oContainer._oContent._oHeader.innerHTML=sHeader;this._oContainer._oContent._oHeader.style.display="block";}}
else{this._oContainer._oContent._oHeader.innerHTML="";this._oContainer._oContent._oHeader.style.display="none";}};YAHOO.widget.AutoComplete.prototype.setFooter=function(sFooter){if(sFooter){if(this._oContainer._oContent._oFooter){this._oContainer._oContent._oFooter.innerHTML=sFooter;this._oContainer._oContent._oFooter.style.display="block";}}
else{this._oContainer._oContent._oFooter.innerHTML="";this._oContainer._oContent._oFooter.style.display="none";}};YAHOO.widget.AutoComplete.prototype.setBody=function(sBody){if(sBody){if(this._oContainer._oContent._oBody){this._oContainer._oContent._oBody.innerHTML=sBody;this._oContainer._oContent._oBody.style.display="block";this._oContainer._oContent.style.display="block";}}
else{this._oContainer._oContent._oBody.innerHTML="";this._oContainer._oContent.style.display="none";}
this._maxResultsDisplayed=0;};YAHOO.widget.AutoComplete.prototype.formatResult=function(oResultItem,sQuery){var sResult=oResultItem[0];if(sResult){return sResult;}
else{return"";}};YAHOO.widget.AutoComplete.prototype.sendQuery=function(sQuery){if(sQuery){this._sendQuery(sQuery);}
else{return;}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._oTextbox=null;YAHOO.widget.AutoComplete.prototype._bFocused=true;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._oContainer=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._aListItems=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sSavedQuery=null;YAHOO.widget.AutoComplete.prototype._oCurItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._initProps=function(){var minQueryLength=this.minQueryLength;if(isNaN(minQueryLength)||(minQueryLength<1)){minQueryLength=1;}
var maxResultsDisplayed=this.maxResultsDisplayed;if(isNaN(this.maxResultsDisplayed)||(this.maxResultsDisplayed<1)){this.maxResultsDisplayed=10;}
var queryDelay=this.queryDelay;if(isNaN(this.queryDelay)||(this.queryDelay<0)){this.queryDelay=0.5;}
var aDelimChar=(this.delimChar)?this.delimChar:null;if(aDelimChar){if(typeof aDelimChar=="string"){this.delimChar=[aDelimChar];}
else if(aDelimChar.constructor!=Array){this.delimChar=null;}}
var animSpeed=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(isNaN(animSpeed)||(animSpeed<0)){animSpeed=0.3;}
if(!this._oAnim){oAnim=new YAHOO.util.Anim(this._oContainer._oContent,{},this.animSpeed);this._oAnim=oAnim;}
else{this._oAnim.duration=animSpeed;}}
if(this.forceSelection&&this.delimChar){}
if(this.alwaysShowContainer&&(this.useShadow||this.useIFrame)){}
if(this.alwaysShowContainer){this._bContainerOpen=true;}};YAHOO.widget.AutoComplete.prototype._initContainerHelpers=function(){if(this.useShadow&&!this._oContainer._oShadow){var oShadow=document.createElement("div");oShadow.className="yui-ac-shadow";this._oContainer._oShadow=this._oContainer.appendChild(oShadow);}
if(this.useIFrame&&!this._oContainer._oIFrame){var oIFrame=document.createElement("iframe");oIFrame.src=this.iFrameSrc;oIFrame.frameBorder=0;oIFrame.scrolling="no";oIFrame.style.position="absolute";oIFrame.style.width="100%";oIFrame.style.height="100%";this._oContainer._oIFrame=this._oContainer.appendChild(oIFrame);}};YAHOO.widget.AutoComplete.prototype._initContainer=function(){if(!this._oContainer._oContent){var oContent=document.createElement("div");oContent.className="yui-ac-content";oContent.style.display="none";this._oContainer._oContent=this._oContainer.appendChild(oContent);var oHeader=document.createElement("div");oHeader.className="yui-ac-hd";oHeader.style.display="none";this._oContainer._oContent._oHeader=this._oContainer._oContent.appendChild(oHeader);var oBody=document.createElement("div");oBody.className="yui-ac-bd";this._oContainer._oContent._oBody=this._oContainer._oContent.appendChild(oBody);var oFooter=document.createElement("div");oFooter.className="yui-ac-ft";oFooter.style.display="none";this._oContainer._oContent._oFooter=this._oContainer._oContent.appendChild(oFooter);}
else{}};YAHOO.widget.AutoComplete.prototype._initList=function(){this._aListItems=[];while(this._oContainer._oContent._oBody.hasChildNodes()){var oldListItems=this.getListItems();if(oldListItems){for(var oldi=oldListItems.length-1;oldi>=0;i--){oldListItems[oldi]=null;}}
this._oContainer._oContent._oBody.innerHTML="";}
var oList=document.createElement("ul");oList=this._oContainer._oContent._oBody.appendChild(oList);for(var i=0;i<this.maxResultsDisplayed;i++){var oItem=document.createElement("li");oItem=oList.appendChild(oItem);this._aListItems[i]=oItem;this._initListItem(oItem,i);}
this._maxResultsDisplayed=this.maxResultsDisplayed;};YAHOO.widget.AutoComplete.prototype._initListItem=function(oItem,nItemIndex){var oSelf=this;oItem.style.display="none";oItem._nItemIndex=nItemIndex;oItem.mouseover=oItem.mouseout=oItem.onclick=null;YAHOO.util.Event.addListener(oItem,"mouseover",oSelf._onItemMouseover,oSelf);YAHOO.util.Event.addListener(oItem,"mouseout",oSelf._onItemMouseout,oSelf);YAHOO.util.Event.addListener(oItem,"click",oSelf._onItemMouseclick,oSelf);};YAHOO.widget.AutoComplete.prototype._onItemMouseover=function(v,oSelf){if(oSelf.prehighlightClassName){oSelf._togglePrehighlight(this,"mouseover");}
else{oSelf._toggleHighlight(this,"to");}
oSelf.itemMouseOverEvent.fire(oSelf,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseout=function(v,oSelf){if(oSelf.prehighlightClassName){oSelf._togglePrehighlight(this,"mouseout");}
else{oSelf._toggleHighlight(this,"from");}
oSelf.itemMouseOutEvent.fire(oSelf,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseclick=function(v,oSelf){oSelf._toggleHighlight(this,"to");oSelf._selectItem(this);};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(v,oSelf){oSelf._bOverContainer=true;};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(v,oSelf){oSelf._bOverContainer=false;if(oSelf._oCurItem){oSelf._toggleHighlight(oSelf._oCurItem,"to");}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(v,oSelf){oSelf._oTextbox.focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(v,oSelf){oSelf._toggleContainerHelpers(oSelf._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(v,oSelf){var nKeyCode=v.keyCode;switch(nKeyCode){case 9:if(oSelf.delimChar&&(oSelf._nKeyCode!=nKeyCode)){if(oSelf._bContainerOpen){YAHOO.util.Event.stopEvent(v);}}
if(oSelf._oCurItem){oSelf._selectItem(oSelf._oCurItem);}
else{oSelf._clearList();}
break;case 13:if(oSelf._nKeyCode!=nKeyCode){if(oSelf._bContainerOpen){YAHOO.util.Event.stopEvent(v);}}
if(oSelf._oCurItem){oSelf._selectItem(oSelf._oCurItem);}
else{oSelf._clearList();}
break;case 27:oSelf._clearList();return;case 39:oSelf._jumpSelection();break;case 38:YAHOO.util.Event.stopEvent(v);oSelf._moveSelection(nKeyCode);break;case 40:YAHOO.util.Event.stopEvent(v);oSelf._moveSelection(nKeyCode);break;default:break;}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(v,oSelf){var nKeyCode=v.keyCode;switch(nKeyCode){case 9:case 13:if((oSelf._nKeyCode!=nKeyCode)){YAHOO.util.Event.stopEvent(v);}
break;case 38:case 40:YAHOO.util.Event.stopEvent(v);break;default:break;}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(v,oSelf){oSelf._initProps();var nKeyCode=v.keyCode;oSelf._nKeyCode=nKeyCode;var sChar=String.fromCharCode(nKeyCode);var sText=this.value;if(oSelf._isIgnoreKey(nKeyCode)||(sText.toLowerCase()==oSelf._sCurQuery)){return;}
else{oSelf.textboxKeyEvent.fire(oSelf,nKeyCode);}
if(oSelf.queryDelay>0){var nDelayID=setTimeout(function(){oSelf._sendQuery(sText);},(oSelf.queryDelay*1000));if(oSelf._nDelayID!=-1){clearTimeout(oSelf._nDelayID);}
oSelf._nDelayID=nDelayID;}
else{oSelf._sendQuery(sText);}};YAHOO.widget.AutoComplete.prototype._isIgnoreKey=function(nKeyCode){if((nKeyCode==9)||(nKeyCode==13)||(nKeyCode==16)||(nKeyCode==17)||(nKeyCode>=18&&nKeyCode<=20)||(nKeyCode==27)||(nKeyCode>=33&&nKeyCode<=35)||(nKeyCode>=36&&nKeyCode<=38)||(nKeyCode==40)||(nKeyCode>=44&&nKeyCode<=45)){return true;}
return false;};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(v,oSelf){oSelf._oTextbox.setAttribute("autocomplete","off");oSelf._bFocused=true;oSelf.textboxFocusEvent.fire(oSelf);};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(v,oSelf){if(!oSelf._bOverContainer||(oSelf._nKeyCode==9)){if(!oSelf._bItemSelected){if(!oSelf._bContainerOpen||(oSelf._bContainerOpen&&!oSelf._textMatchesOption())){if(oSelf.forceSelection){oSelf._clearSelection();}
else{oSelf.unmatchedItemSelectEvent.fire(oSelf,oSelf._sCurQuery);}}}
if(oSelf._bContainerOpen){oSelf._clearList();}
oSelf._bFocused=false;oSelf.textboxBlurEvent.fire(oSelf);}};YAHOO.widget.AutoComplete.prototype._onFormSubmit=function(v,oSelf){if(oSelf.allowBrowserAutocomplete){oSelf._oTextbox.setAttribute("autocomplete","on");}
else{oSelf._oTextbox.setAttribute("autocomplete","off");}};YAHOO.widget.AutoComplete.prototype._sendQuery=function(sQuery){var aDelimChar=(this.delimChar)?this.delimChar:null;if(aDelimChar){var nDelimIndex=-1;for(var i=aDelimChar.length-1;i>=0;i--){var nNewIndex=sQuery.lastIndexOf(aDelimChar[i]);if(nNewIndex>nDelimIndex){nDelimIndex=nNewIndex;}}
if(aDelimChar[i]==" "){for(var j=aDelimChar.length-1;j>=0;j--){if(sQuery[nDelimIndex-1]==aDelimChar[j]){nDelimIndex--;break;}}}
if(nDelimIndex>-1){var nQueryStart=nDelimIndex+1;while(sQuery.charAt(nQueryStart)==" "){nQueryStart+=1;}
this._sSavedQuery=sQuery.substring(0,nQueryStart);sQuery=sQuery.substr(nQueryStart);}
else if(sQuery.indexOf(this._sSavedQuery)<0){this._sSavedQuery=null;}}
if(sQuery.length<this.minQueryLength){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}
this._clearList();return;}
sQuery=encodeURIComponent(sQuery);this._nDelayID=-1;this.dataRequestEvent.fire(this,sQuery);this.dataSource.getResults(this._populateList,sQuery,this);};YAHOO.widget.AutoComplete.prototype._clearList=function(){this._oContainer._oContent.scrollTop=0;var aItems=this._aListItems;if(aItems&&(aItems.length>0)){for(var i=aItems.length-1;i>=0;i--){aItems[i].style.display="none";}}
if(this._oCurItem){this._toggleHighlight(this._oCurItem,"from");}
this._oCurItem=null;this._nDisplayedItems=0;this._sCurQuery=null;this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._populateList=function(sQuery,aResults,oSelf){if(aResults===null){oSelf.dataErrorEvent.fire(oSelf,sQuery);}
if(!oSelf._bFocused||!aResults){return;}
var isOpera=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);var contentStyle=oSelf._oContainer._oContent.style;contentStyle.width=(!isOpera)?null:"";contentStyle.height=(!isOpera)?null:"";var sCurQuery=decodeURIComponent(sQuery);oSelf._sCurQuery=sCurQuery;oSelf._bItemSelected=false;if(oSelf._maxResultsDisplayed!=oSelf.maxResultsDisplayed){oSelf._initList();}
var nItems=Math.min(aResults.length,oSelf.maxResultsDisplayed);oSelf._nDisplayedItems=nItems;if(nItems>0){oSelf._initContainerHelpers();var aItems=oSelf._aListItems;for(var i=nItems-1;i>=0;i--){var oItemi=aItems[i];var oResultItemi=aResults[i];oItemi.innerHTML=oSelf.formatResult(oResultItemi,sCurQuery);oItemi.style.display="list-item";oItemi._sResultKey=oResultItemi[0];oItemi._oResultData=oResultItemi;}
for(var j=aItems.length-1;j>=nItems;j--){var oItemj=aItems[j];oItemj.innerHTML=null;oItemj.style.display="none";oItemj._sResultKey=null;oItemj._oResultData=null;}
if(oSelf.autoHighlight){var oFirstItem=aItems[0];oSelf._toggleHighlight(oFirstItem,"to");oSelf.itemArrowToEvent.fire(oSelf,oFirstItem);oSelf._typeAhead(oFirstItem,sQuery);}
else{oSelf._oCurItem=null;}
oSelf._toggleContainer(true);}
else{oSelf._clearList();}
oSelf.dataReturnEvent.fire(oSelf,sQuery,aResults);};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var sValue=this._oTextbox.value;var sChar=(this.delimChar)?this.delimChar[0]:null;var nIndex=(sChar)?sValue.lastIndexOf(sChar,sValue.length-2):-1;if(nIndex>-1){this._oTextbox.value=sValue.substring(0,nIndex);}
else{this._oTextbox.value="";}
this._sSavedQuery=this._oTextbox.value;this.selectionEnforceEvent.fire(this);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var foundMatch=false;for(var i=this._nDisplayedItems-1;i>=0;i--){var oItem=this._aListItems[i];var sMatch=oItem._sResultKey.toLowerCase();if(sMatch==this._sCurQuery.toLowerCase()){foundMatch=true;break;}}
return(foundMatch);};YAHOO.widget.AutoComplete.prototype._typeAhead=function(oItem,sQuery){if(!this.typeAhead){return;}
var oTextbox=this._oTextbox;var sValue=this._oTextbox.value;if(!oTextbox.setSelectionRange&&!oTextbox.createTextRange){return;}
var nStart=sValue.length;this._updateValue(oItem);var nEnd=oTextbox.value.length;this._selectText(oTextbox,nStart,nEnd);var sPrefill=oTextbox.value.substr(nStart,nEnd);this.typeAheadEvent.fire(this,sQuery,sPrefill);};YAHOO.widget.AutoComplete.prototype._selectText=function(oTextbox,nStart,nEnd){if(oTextbox.setSelectionRange){oTextbox.setSelectionRange(nStart,nEnd);}
else if(oTextbox.createTextRange){var oTextRange=oTextbox.createTextRange();oTextRange.moveStart("character",nStart);oTextRange.moveEnd("character",nEnd-oTextbox.value.length);oTextRange.select();}
else{oTextbox.select();}};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(bShow){var bFireEvent=false;var width=this._oContainer._oContent.offsetWidth+"px";var height=this._oContainer._oContent.offsetHeight+"px";if(this.useIFrame&&this._oContainer._oIFrame){bFireEvent=true;if(this.alwaysShowContainer||bShow){this._oContainer._oIFrame.style.width=width;this._oContainer._oIFrame.style.height=height;}
else{this._oContainer._oIFrame.style.width=0;this._oContainer._oIFrame.style.height=0;}}
if(this.useShadow&&this._oContainer._oShadow){bFireEvent=true;if(this.alwaysShowContainer||bShow){this._oContainer._oShadow.style.width=width;this._oContainer._oShadow.style.height=height;}
else{this._oContainer._oShadow.style.width=0;this._oContainer._oShadow.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(bShow){if(this.alwaysShowContainer){if(bShow){this.containerExpandEvent.fire(this);}
else{this.containerCollapseEvent.fire(this);}
this._bContainerOpen=bShow;return;}
var oContainer=this._oContainer;if(!bShow&&!this._bContainerOpen){oContainer._oContent.style.display="none";return;}
var oAnim=this._oAnim;if(oAnim&&oAnim.getEl()&&(this.animHoriz||this.animVert)){if(!bShow){this._toggleContainerHelpers(bShow);}
if(oAnim.isAnimated()){oAnim.stop();}
var oClone=oContainer._oContent.cloneNode(true);oContainer.appendChild(oClone);oClone.style.top="-9000px";oClone.style.display="block";var wExp=oClone.offsetWidth;var hExp=oClone.offsetHeight;var wColl=(this.animHoriz)?0:wExp;var hColl=(this.animVert)?0:hExp;oAnim.attributes=(bShow)?{width:{to:wExp},height:{to:hExp}}:{width:{to:wColl},height:{to:hColl}};if(bShow&&!this._bContainerOpen){oContainer._oContent.style.width=wColl+"px";oContainer._oContent.style.height=hColl+"px";}
else{oContainer._oContent.style.width=wExp+"px";oContainer._oContent.style.height=hExp+"px";}
oContainer.removeChild(oClone);oClone=null;var oSelf=this;var onAnimComplete=function(){oAnim.onComplete.unsubscribeAll();if(bShow){oSelf.containerExpandEvent.fire(oSelf);}
else{oContainer._oContent.style.display="none";oSelf.containerCollapseEvent.fire(oSelf);}
oSelf._toggleContainerHelpers(bShow);};oContainer._oContent.style.display="block";oAnim.onComplete.subscribe(onAnimComplete);oAnim.animate();this._bContainerOpen=bShow;}
else{if(bShow){oContainer._oContent.style.display="block";this.containerExpandEvent.fire(this);}
else{oContainer._oContent.style.display="none";this.containerCollapseEvent.fire(this);}
this._toggleContainerHelpers(bShow);this._bContainerOpen=bShow;}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(oNewItem,sType){var sHighlight=this.highlightClassName;if(this._oCurItem){YAHOO.util.Dom.removeClass(this._oCurItem,sHighlight);}
if((sType=="to")&&sHighlight){YAHOO.util.Dom.addClass(oNewItem,sHighlight);this._oCurItem=oNewItem;}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(oNewItem,sType){if(oNewItem==this._oCurItem){return;}
var sPrehighlight=this.prehighlightClassName;if((sType=="mouseover")&&sPrehighlight){YAHOO.util.Dom.addClass(oNewItem,sPrehighlight);}
else{YAHOO.util.Dom.removeClass(oNewItem,sPrehighlight);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(oItem){var oTextbox=this._oTextbox;var sDelimChar=(this.delimChar)?this.delimChar[0]:null;var sSavedQuery=this._sSavedQuery;var sResultKey=oItem._sResultKey;oTextbox.focus();oTextbox.value="";if(sDelimChar){if(sSavedQuery){oTextbox.value=sSavedQuery;}
oTextbox.value+=sResultKey+sDelimChar;if(sDelimChar!=" "){oTextbox.value+=" ";}}
else{oTextbox.value=sResultKey;}
if(oTextbox.type=="textarea"){oTextbox.scrollTop=oTextbox.scrollHeight;}
var end=oTextbox.value.length;this._selectText(oTextbox,end,end);this._oCurItem=oItem;};YAHOO.widget.AutoComplete.prototype._selectItem=function(oItem){this._bItemSelected=true;this._updateValue(oItem);this.itemSelectEvent.fire(this,oItem,oItem._oResultData);this._clearList();};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(!this.typeAhead){return;}
else{this._clearList();}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(nKeyCode){if(this._bContainerOpen){var oCurItem=this._oCurItem;var nCurItemIndex=-1;if(oCurItem){nCurItemIndex=oCurItem._nItemIndex;}
var nNewItemIndex=(nKeyCode==40)?(nCurItemIndex+1):(nCurItemIndex-1);if(nNewItemIndex<-2||nNewItemIndex>=this._nDisplayedItems){return;}
if(oCurItem){this._toggleHighlight(oCurItem,"from");this.itemArrowFromEvent.fire(this,oCurItem);}
if(nNewItemIndex==-1){if(this.delimChar&&this._sSavedQuery){if(!this._textMatchesOption()){this._oTextbox.value=this._sSavedQuery;}
else{this._oTextbox.value=this._sSavedQuery+this._sCurQuery;}}
else{this._oTextbox.value=this._sCurQuery;}
this._oCurItem=null;return;}
if(nNewItemIndex==-2){this._clearList();return;}
var oNewItem=this._aListItems[nNewItemIndex];if((YAHOO.util.Dom.getStyle(this._oContainer._oContent,"overflow")=="auto")&&(nNewItemIndex>-1)&&(nNewItemIndex<this._nDisplayedItems)){if(nKeyCode==40){if((oNewItem.offsetTop+oNewItem.offsetHeight)>(this._oContainer._oContent.scrollTop+this._oContainer._oContent.offsetHeight)){this._oContainer._oContent.scrollTop=(oNewItem.offsetTop+oNewItem.offsetHeight)-this._oContainer._oContent.offsetHeight;}
else if((oNewItem.offsetTop+oNewItem.offsetHeight)<this._oContainer._oContent.scrollTop){this._oContainer._oContent.scrollTop=oNewItem.offsetTop;}}
else{if(oNewItem.offsetTop<this._oContainer._oContent.scrollTop){this._oContainer._oContent.scrollTop=oNewItem.offsetTop;}
else if(oNewItem.offsetTop>(this._oContainer._oContent.scrollTop+this._oContainer._oContent.offsetHeight)){this._oContainer._oContent.scrollTop=(oNewItem.offsetTop+oNewItem.offsetHeight)-this._oContainer._oContent.offsetHeight;}}}
this._toggleHighlight(oNewItem,"to");this.itemArrowToEvent.fire(this,oNewItem);if(this.typeAhead){this._updateValue(oNewItem);}}};YAHOO.widget.DataSource=function(){};YAHOO.widget.DataSource.prototype.ERROR_DATANULL="Response data was null";YAHOO.widget.DataSource.prototype.ERROR_DATAPARSE="Response data could not be parsed";YAHOO.widget.DataSource.prototype.maxCacheEntries=15;YAHOO.widget.DataSource.prototype.queryMatchContains=false;YAHOO.widget.DataSource.prototype.queryMatchSubset=false;YAHOO.widget.DataSource.prototype.queryMatchCase=false;YAHOO.widget.DataSource.prototype.getName=function(){return this._sName;};YAHOO.widget.DataSource.prototype.toString=function(){return"DataSource "+this._sName;};YAHOO.widget.DataSource.prototype.getResults=function(oCallbackFn,sQuery,oParent){var aResults=this._doQueryCache(oCallbackFn,sQuery,oParent);if(aResults.length===0){this.queryEvent.fire(this,oParent,sQuery);this.doQuery(oCallbackFn,sQuery,oParent);}};YAHOO.widget.DataSource.prototype.doQuery=function(oCallbackFn,sQuery,oParent){};YAHOO.widget.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[];}
if(this._aCacheHelper){this._aCacheHelper=[];}
this.cacheFlushEvent.fire(this);};YAHOO.widget.DataSource.prototype.queryEvent=null;YAHOO.widget.DataSource.prototype.cacheQueryEvent=null;YAHOO.widget.DataSource.prototype.getResultsEvent=null;YAHOO.widget.DataSource.prototype.getCachedResultsEvent=null;YAHOO.widget.DataSource.prototype.dataErrorEvent=null;YAHOO.widget.DataSource.prototype.cacheFlushEvent=null;YAHOO.widget.DataSource._nIndex=0;YAHOO.widget.DataSource.prototype._sName=null;YAHOO.widget.DataSource.prototype._aCache=null;YAHOO.widget.DataSource.prototype._init=function(){var maxCacheEntries=this.maxCacheEntries;if(isNaN(maxCacheEntries)||(maxCacheEntries<0)){maxCacheEntries=0;}
if(maxCacheEntries>0&&!this._aCache){this._aCache=[];}
this._sName="instance"+YAHOO.widget.DataSource._nIndex;YAHOO.widget.DataSource._nIndex++;this.queryEvent=new YAHOO.util.CustomEvent("query",this);this.cacheQueryEvent=new YAHOO.util.CustomEvent("cacheQuery",this);this.getResultsEvent=new YAHOO.util.CustomEvent("getResults",this);this.getCachedResultsEvent=new YAHOO.util.CustomEvent("getCachedResults",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.cacheFlushEvent=new YAHOO.util.CustomEvent("cacheFlush",this);};YAHOO.widget.DataSource.prototype._addCacheElem=function(resultObj){var aCache=this._aCache;if(!aCache||!resultObj||!resultObj.query||!resultObj.results){return;}
if(aCache.length>=this.maxCacheEntries){aCache.shift();}
aCache.push(resultObj);};YAHOO.widget.DataSource.prototype._doQueryCache=function(oCallbackFn,sQuery,oParent){var aResults=[];var bMatchFound=false;var aCache=this._aCache;var nCacheLength=(aCache)?aCache.length:0;var bMatchContains=this.queryMatchContains;if((this.maxCacheEntries>0)&&aCache&&(nCacheLength>0)){this.cacheQueryEvent.fire(this,oParent,sQuery);if(!this.queryMatchCase){var sOrigQuery=sQuery;sQuery=sQuery.toLowerCase();}
for(var i=nCacheLength-1;i>=0;i--){var resultObj=aCache[i];var aAllResultItems=resultObj.results;var matchKey=(!this.queryMatchCase)?encodeURIComponent(resultObj.query.toLowerCase()):encodeURIComponent(resultObj.query);if(matchKey==sQuery){bMatchFound=true;aResults=aAllResultItems;if(i!=nCacheLength-1){aCache.splice(i,1);this._addCacheElem(resultObj);}
break;}
else if(this.queryMatchSubset){for(var j=sQuery.length-1;j>=0;j--){var subQuery=sQuery.substr(0,j);if(matchKey==subQuery){bMatchFound=true;for(var k=aAllResultItems.length-1;k>=0;k--){var aRecord=aAllResultItems[k];var sKeyIndex=(this.queryMatchCase)?encodeURIComponent(aRecord[0]).indexOf(sQuery):encodeURIComponent(aRecord[0]).toLowerCase().indexOf(sQuery);if((!bMatchContains&&(sKeyIndex===0))||(bMatchContains&&(sKeyIndex>-1))){aResults.unshift(aRecord);}}
resultObj={};resultObj.query=sQuery;resultObj.results=aResults;this._addCacheElem(resultObj);break;}}
if(bMatchFound){break;}}}
if(bMatchFound){this.getCachedResultsEvent.fire(this,oParent,sOrigQuery,aResults);oCallbackFn(sOrigQuery,aResults,oParent);}}
return aResults;};YAHOO.widget.DS_XHR=function(sScriptURI,aSchema,oConfigs){if(typeof oConfigs=="object"){for(var sConfig in oConfigs){this[sConfig]=oConfigs[sConfig];}}
if(!aSchema||(aSchema.constructor!=Array)){return;}
else{this.schema=aSchema;}
this.scriptURI=sScriptURI;this._init();};YAHOO.widget.DS_XHR.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_XHR.prototype.TYPE_JSON=0;YAHOO.widget.DS_XHR.prototype.TYPE_XML=1;YAHOO.widget.DS_XHR.prototype.TYPE_FLAT=2;YAHOO.widget.DS_XHR.prototype.ERROR_DATAXHR="XHR response failed";YAHOO.widget.DS_XHR.prototype.connTimeout=0;YAHOO.widget.DS_XHR.prototype.scriptURI=null;YAHOO.widget.DS_XHR.prototype.scriptQueryParam="query";YAHOO.widget.DS_XHR.prototype.scriptQueryAppend="";YAHOO.widget.DS_XHR.prototype.responseType=YAHOO.widget.DS_XHR.prototype.TYPE_JSON;YAHOO.widget.DS_XHR.prototype.responseStripAfter="\n<!--";YAHOO.widget.DS_XHR.prototype.doQuery=function(oCallbackFn,sQuery,oParent){var isXML=(this.responseType==this.TYPE_XML);var sUri=this.scriptURI+"?"+this.scriptQueryParam+"="+sQuery;if(this.scriptQueryAppend.length>0){sUri+="&"+this.scriptQueryAppend;}
var oResponse=null;var oSelf=this;var responseSuccess=function(oResp){if(!oSelf._oConn||(oResp.tId!=oSelf._oConn.tId)){oSelf.dataErrorEvent.fire(oSelf,oParent,sQuery,oSelf.ERROR_DATANULL);return;}
for(var foo in oResp){}
if(!isXML){oResp=oResp.responseText;}
else{oResp=oResp.responseXML;}
if(oResp===null){oSelf.dataErrorEvent.fire(oSelf,oParent,sQuery,oSelf.ERROR_DATANULL);return;}
var aResults=oSelf.parseResponse(sQuery,oResp,oParent);var resultObj={};resultObj.query=decodeURIComponent(sQuery);resultObj.results=aResults;if(aResults===null){oSelf.dataErrorEvent.fire(oSelf,oParent,sQuery,oSelf.ERROR_DATAPARSE);return;}
else{oSelf.getResultsEvent.fire(oSelf,oParent,sQuery,aResults);oSelf._addCacheElem(resultObj);oCallbackFn(sQuery,aResults,oParent);}};var responseFailure=function(oResp){oSelf.dataErrorEvent.fire(oSelf,oParent,sQuery,oSelf.ERROR_DATAXHR);return;};var oCallback={success:responseSuccess,failure:responseFailure};if(!isNaN(this.connTimeout)&&this.connTimeout>0){oCallback.timeout=this.connTimeout;}
if(this._oConn){YAHOO.util.Connect.abort(this._oConn);}
oSelf._oConn=YAHOO.util.Connect.asyncRequest("GET",sUri,oCallback,null);};YAHOO.widget.DS_XHR.prototype.parseResponse=function(sQuery,oResponse,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var nEnd=((this.responseStripAfter!=="")&&(oResponse.indexOf))?oResponse.indexOf(this.responseStripAfter):-1;if(nEnd!=-1){oResponse=oResponse.substring(0,nEnd);}
switch(this.responseType){case this.TYPE_JSON:var jsonList;if(window.JSON&&(navigator.userAgent.toLowerCase().indexOf('khtml')==-1)){var jsonObjParsed=JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break;}
else{jsonList=eval("jsonObjParsed."+aSchema[0]);}}
else{try{while(oResponse.substring(0,1)==" "){oResponse=oResponse.substring(1,oResponse.length);}
if(oResponse.indexOf("{")<0){bError=true;break;}
if(oResponse.indexOf("{}")===0){break;}
var jsonObjRaw=eval("("+oResponse+")");if(!jsonObjRaw){bError=true;break;}
jsonList=eval("(jsonObjRaw."+aSchema[0]+")");}
catch(e){bError=true;break;}}
if(!jsonList){bError=true;break;}
for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue="";}
aResultItem.unshift(dataFieldValue);}
aResults.unshift(aResultItem);}
break;case this.TYPE_XML:var xmlList=oResponse.getElementsByTagName(aSchema[0]);if(!xmlList){bError=true;break;}
for(var k=xmlList.length-1;k>=0;k--){var result=xmlList.item(k);var aFieldSet=[];for(var m=aSchema.length-1;m>=1;m--){var sValue=null;var xmlAttr=result.attributes.getNamedItem(aSchema[m]);if(xmlAttr){sValue=xmlAttr.value;}
else{var xmlNode=result.getElementsByTagName(aSchema[m]);if(xmlNode&&xmlNode.item(0)&&xmlNode.item(0).firstChild){sValue=xmlNode.item(0).firstChild.nodeValue;}
else{sValue="";}}
aFieldSet.unshift(sValue);}
aResults.unshift(aFieldSet);}
break;case this.TYPE_FLAT:if(oResponse.length>0){var newLength=oResponse.length-aSchema[0].length;if(oResponse.substr(newLength)==aSchema[0]){oResponse=oResponse.substr(0,newLength);}
var aRecords=oResponse.split(aSchema[0]);for(var n=aRecords.length-1;n>=0;n--){aResults[n]=aRecords[n].split(aSchema[1]);}}
break;default:break;}
sQuery=null;oResponse=null;oParent=null;if(bError){return null;}
else{return aResults;}};YAHOO.widget.DS_XHR.prototype._oConn=null;YAHOO.widget.DS_JSFunction=function(oFunction,oConfigs){if(typeof oConfigs=="object"){for(var sConfig in oConfigs){this[sConfig]=oConfigs[sConfig];}}
if(!oFunction||(oFunction.constructor!=Function)){return;}
else{this.dataFunction=oFunction;this._init();}};YAHOO.widget.DS_JSFunction.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSFunction.prototype.dataFunction=null;YAHOO.widget.DS_JSFunction.prototype.doQuery=function(oCallbackFn,sQuery,oParent){var oFunction=this.dataFunction;var aResults=[];aResults=oFunction(sQuery);if(aResults===null){this.dataErrorEvent.fire(this,oParent,sQuery,this.ERROR_DATANULL);return;}
var resultObj={};resultObj.query=decodeURIComponent(sQuery);resultObj.results=aResults;this._addCacheElem(resultObj);this.getResultsEvent.fire(this,oParent,sQuery,aResults);oCallbackFn(sQuery,aResults,oParent);return;};YAHOO.widget.DS_JSArray=function(aData,oConfigs){if(typeof oConfigs=="object"){for(var sConfig in oConfigs){this[sConfig]=oConfigs[sConfig];}}
if(!aData||(aData.constructor!=Array)){return;}
else{this.data=aData;this._init();}};YAHOO.widget.DS_JSArray.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSArray.prototype.data=null;YAHOO.widget.DS_JSArray.prototype.doQuery=function(oCallbackFn,sQuery,oParent){var aData=this.data;var aResults=[];var bMatchFound=false;var bMatchContains=this.queryMatchContains;if(!this.queryMatchCase){sQuery=sQuery.toLowerCase();}
for(var i=aData.length-1;i>=0;i--){var aDataset=[];if(typeof aData[i]=="string"){aDataset[0]=aData[i];}
else{aDataset=aData[i];}
var sKeyIndex=(this.queryMatchCase)?encodeURIComponent(aDataset[0]).indexOf(sQuery):encodeURIComponent(aDataset[0]).toLowerCase().indexOf(sQuery);if((!bMatchContains&&(sKeyIndex===0))||(bMatchContains&&(sKeyIndex>-1))){aResults.unshift(aDataset);}}
this.getResultsEvent.fire(this,oParent,sQuery,aResults);oCallbackFn(sQuery,aResults,oParent);};

View File

@ -1,169 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
Version 0.11.0
*/
.yui-cal2upwrapper {*height:1%;} /* IE */
.yui-cal2upwrapper:after {content:'.';clear:both;display:block;visibility:hidden;height:0;} /* others */
.yui-calcontainer {
float:left;
padding:5px;
background-color:#F7F9FB;
border:1px solid #7B9EBD;
}
.yui-calcontainer .title {
font:100% sans-serif;
color:#000;
font-weight:bold;
margin-bottom:5px;
height:auto;
width:304px;
position:relative;
}
.yui-calcontainer .title .close-icon {
position:absolute;
right:0;
top:0;
border:none;
}
.yui-calcontainer .cal2up {
float:left;
}
.yui-calendar .calnavleft {
position:absolute;
background-repeat:no-repeat;
cursor:pointer;
top:2px;
bottom:0;
width:9px;
height:12px;
left:2px;
}
.yui-calendar .calnavright {
position:absolute;
background-repeat:no-repeat;
cursor:pointer;
top:2px;
bottom:0;
width:9px;
height:12px;
right:2px;
}
/* Calendar element styles */
.yui-calendar {
font:100% sans-serif;
text-align:center;
border-spacing:0;
border-collapse:separate;
}
.yui-calendar td.calcell {
width:1.5em;
height:1em;
border:1px solid #E0E0E0;
background-color:#FFF;
}
.yui-calendar td.calcell a {
color:#003DB8;
text-decoration:none;
}
.yui-calendar td.calcell.today {
border:1px solid #000;
}
.yui-calendar td.calcell.oom {
cursor:default;
color:#999;
background-color:#EEE;
border:1px solid #E0E0E0;
}
.yui-calendar td.calcell.selected {
color:#003DB8;
background-color:#FFF19F;
border:1px solid #FF9900;
}
.yui-calendar td.calcell.calcellhover {
cursor:pointer;
color:#FFF;
background-color:#FF9900;
border:1px solid #FF9900;
}
/* Added to perform some correction for Opera 8.5
hover redraw bug */
table.yui-calendar:hover {
background-color:#FFF;
}
.yui-calendar td.calcell.calcellhover a {
color:#FFF;
}
.yui-calendar td.calcell.restricted {
text-decoration:line-through;
}
.yui-calendar td.calcell.previous {
color:#CCC;
}
.yui-calendar td.calcell.highlight1 { background-color:#CCFF99; }
.yui-calendar td.calcell.highlight2 { background-color:#99CCFF; }
.yui-calendar td.calcell.highlight3 { background-color:#FFCCCC; }
.yui-calendar td.calcell.highlight4 { background-color:#CCFF99; }
.yui-calendar .calhead {
border:1px solid #E0E0E0;
vertical-align:middle;
background-color:#FFF;
}
.yui-calendar .calheader {
position:relative;
width:100%;
text-align:center;
}
.yui-calendar .calheader img {
border:none;
}
.yui-calendar .calweekdaycell {
color:#666;
font-weight:normal;
}
.yui-calendar .calfoot {
background-color:#EEE;
}
.yui-calendar .calrowhead, .yui-calendar .calrowfoot {
color:#666;
font-size:9px;
font-style:italic;
font-weight:normal;
width:15px;
}
.yui-calendar .calrowhead {
border-right-width:2px;
}
/*Specific changes for calendar running under fonts/reset */
.yui-calendar a:hover {background:inherit;}
p#clear {clear:left; padding-top:10px;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

View File

@ -1,155 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.0
*/
YAHOO.widget.DateMath=new function(){this.DAY="D";this.WEEK="W";this.YEAR="Y";this.MONTH="M";this.ONE_DAY_MS=1000*60*60*24;this.add=function(date,field,amount){var d=new Date(date.getTime());switch(field){case this.MONTH:var newMonth=date.getMonth()+amount;var years=0;if(newMonth<0){while(newMonth<0){newMonth+=12;years-=1;}}else if(newMonth>11){while(newMonth>11){newMonth-=12;years+=1;}}
d.setMonth(newMonth);d.setFullYear(date.getFullYear()+years);break;case this.DAY:d.setDate(date.getDate()+amount);break;case this.YEAR:d.setFullYear(date.getFullYear()+amount);break;case this.WEEK:d.setDate(date.getDate()+(amount*7));break;}
return d;};this.subtract=function(date,field,amount){return this.add(date,field,(amount*-1));};this.before=function(date,compareTo){var ms=compareTo.getTime();if(date.getTime()<ms){return true;}else{return false;}};this.after=function(date,compareTo){var ms=compareTo.getTime();if(date.getTime()>ms){return true;}else{return false;}};this.between=function(date,dateBegin,dateEnd){if(this.after(date,dateBegin)&&this.before(date,dateEnd)){return true;}else{return false;}};this.getJan1=function(calendarYear){return new Date(calendarYear,0,1);};this.getDayOffset=function(date,calendarYear){var beginYear=this.getJan1(calendarYear);var dayOffset=Math.ceil((date.getTime()-beginYear.getTime())/this.ONE_DAY_MS);return dayOffset;};this.getWeekNumber=function(date,calendarYear,weekStartsOn){date.setHours(12,0,0,0);if(!weekStartsOn){weekStartsOn=0;}
if(!calendarYear){calendarYear=date.getFullYear();}
var weekNum=-1;var jan1=this.getJan1(calendarYear);var jan1Offset=jan1.getDay()-weekStartsOn;var jan1DayOfWeek=(jan1Offset>=0?jan1Offset:(7+jan1Offset));var endOfWeek1=this.add(jan1,this.DAY,(6-jan1DayOfWeek));endOfWeek1.setHours(23,59,59,999);var month=date.getMonth();var day=date.getDate();var year=date.getFullYear();var dayOffset=this.getDayOffset(date,calendarYear);if(dayOffset<0||this.before(date,endOfWeek1)){weekNum=1;}else{weekNum=2;var weekBegin=new Date(endOfWeek1.getTime()+1);var weekEnd=this.add(weekBegin,this.WEEK,1);while(!this.between(date,weekBegin,weekEnd)){weekBegin=this.add(weekBegin,this.WEEK,1);weekEnd=this.add(weekEnd,this.WEEK,1);weekNum+=1;}}
return weekNum;};this.isYearOverlapWeek=function(weekBeginDate){var overlaps=false;var nextWeek=this.add(weekBeginDate,this.DAY,6);if(nextWeek.getFullYear()!=weekBeginDate.getFullYear()){overlaps=true;}
return overlaps;};this.isMonthOverlapWeek=function(weekBeginDate){var overlaps=false;var nextWeek=this.add(weekBeginDate,this.DAY,6);if(nextWeek.getMonth()!=weekBeginDate.getMonth()){overlaps=true;}
return overlaps;};this.findMonthStart=function(date){var start=new Date(date.getFullYear(),date.getMonth(),1);return start;};this.findMonthEnd=function(date){var start=this.findMonthStart(date);var nextMonth=this.add(start,this.MONTH,1);var end=this.subtract(nextMonth,this.DAY,1);return end;};this.clearTime=function(date){date.setHours(0,0,0,0);return date;};}
YAHOO.widget.Calendar_Core=function(id,containerId,monthyear,selected){if(arguments.length>0){this.init(id,containerId,monthyear,selected);}}
YAHOO.widget.Calendar_Core.IMG_ROOT=(window.location.href.toLowerCase().indexOf("https")==0?"https://a248.e.akamai.net/sec.yimg.com/i/":"http://us.i1.yimg.com/us.yimg.com/i/");YAHOO.widget.Calendar_Core.DATE="D";YAHOO.widget.Calendar_Core.MONTH_DAY="MD";YAHOO.widget.Calendar_Core.WEEKDAY="WD";YAHOO.widget.Calendar_Core.RANGE="R";YAHOO.widget.Calendar_Core.MONTH="M";YAHOO.widget.Calendar_Core.DISPLAY_DAYS=42;YAHOO.widget.Calendar_Core.STOP_RENDER="S";YAHOO.widget.Calendar_Core.prototype={Config:null,parent:null,index:-1,cells:null,weekHeaderCells:null,weekFooterCells:null,cellDates:null,id:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,pageDate:null,_pageDate:null,minDate:null,maxDate:null,selectedDates:null,_selectedDates:null,shellRendered:false,table:null,headerCell:null};YAHOO.widget.Calendar_Core.prototype.init=function(id,containerId,monthyear,selected){this.setupConfig();this.id=id;this.cellDates=new Array();this.cells=new Array();this.renderStack=new Array();this._renderStack=new Array();this.oDomContainer=document.getElementById(containerId);this.today=new Date();YAHOO.widget.DateMath.clearTime(this.today);var month;var year;if(monthyear){var aMonthYear=monthyear.split(this.Locale.DATE_FIELD_DELIMITER);month=parseInt(aMonthYear[this.Locale.MY_MONTH_POSITION-1]);year=parseInt(aMonthYear[this.Locale.MY_YEAR_POSITION-1]);}else{month=this.today.getMonth()+1;year=this.today.getFullYear();}
this.pageDate=new Date(year,month-1,1);this._pageDate=new Date(this.pageDate.getTime());if(selected){this.selectedDates=this._parseDates(selected);this._selectedDates=this.selectedDates.concat();}else{this.selectedDates=new Array();this._selectedDates=new Array();}
this.wireDefaultEvents();this.wireCustomEvents();};YAHOO.widget.Calendar_Core.prototype.wireDefaultEvents=function(){this.doSelectCell=function(e,cal){var cell=this;var index=cell.index;var d=cal.cellDates[index];var date=new Date(d[0],d[1]-1,d[2]);if(!cal.isDateOOM(date)&&!YAHOO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_RESTRICTED)&&!YAHOO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_OOB)){if(cal.Options.MULTI_SELECT){var link=cell.getElementsByTagName("A")[0];link.blur();var cellDate=cal.cellDates[index];var cellDateIndex=cal._indexOfSelectedFieldArray(cellDate);if(cellDateIndex>-1){cal.deselectCell(index);}else{cal.selectCell(index);}}else{var link=cell.getElementsByTagName("A")[0];link.blur()
cal.selectCell(index);}}}
this.doCellMouseOver=function(e,cal){var cell=this;var index=cell.index;var d=cal.cellDates[index];var date=new Date(d[0],d[1]-1,d[2]);if(!cal.isDateOOM(date)&&!YAHOO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_RESTRICTED)&&!YAHOO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_OOB)){YAHOO.util.Dom.addClass(cell,cal.Style.CSS_CELL_HOVER);}}
this.doCellMouseOut=function(e,cal){YAHOO.util.Dom.removeClass(this,cal.Style.CSS_CELL_HOVER);}
this.doNextMonth=function(e,cal){cal.nextMonth();}
this.doPreviousMonth=function(e,cal){cal.previousMonth();}}
YAHOO.widget.Calendar_Core.prototype.wireCustomEvents=function(){}
YAHOO.widget.Calendar_Core.prototype.setupConfig=function(){this.Config=new Object();this.Config.Style={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTED:"selected",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_CONTAINER:"yui-calcontainer",CSS_2UPWRAPPER:"yui-cal2upwrapper",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"};this.Style=this.Config.Style;this.Config.Locale={MONTHS_SHORT:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],MONTHS_LONG:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKDAYS_1CHAR:["S","M","T","W","T","F","S"],WEEKDAYS_SHORT:["Su","Mo","Tu","We","Th","Fr","Sa"],WEEKDAYS_MEDIUM:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],WEEKDAYS_LONG:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],DATE_DELIMITER:",",DATE_FIELD_DELIMITER:"/",DATE_RANGE_DELIMITER:"-",MY_MONTH_POSITION:1,MY_YEAR_POSITION:2,MD_MONTH_POSITION:1,MD_DAY_POSITION:2,MDY_MONTH_POSITION:1,MDY_DAY_POSITION:2,MDY_YEAR_POSITION:3};this.Locale=this.Config.Locale;this.Config.Options={MULTI_SELECT:false,SHOW_WEEKDAYS:true,START_WEEKDAY:0,SHOW_WEEK_HEADER:false,SHOW_WEEK_FOOTER:false,HIDE_BLANK_WEEKS:false,NAV_ARROW_LEFT:YAHOO.widget.Calendar_Core.IMG_ROOT+"us/tr/callt.gif",NAV_ARROW_RIGHT:YAHOO.widget.Calendar_Core.IMG_ROOT+"us/tr/calrt.gif"};this.Options=this.Config.Options;this.customConfig();if(!this.Options.LOCALE_MONTHS){this.Options.LOCALE_MONTHS=this.Locale.MONTHS_LONG;}
if(!this.Options.LOCALE_WEEKDAYS){this.Options.LOCALE_WEEKDAYS=this.Locale.WEEKDAYS_SHORT;}
if(this.Options.START_WEEKDAY>0){for(var w=0;w<this.Options.START_WEEKDAY;++w){this.Locale.WEEKDAYS_SHORT.push(this.Locale.WEEKDAYS_SHORT.shift());this.Locale.WEEKDAYS_MEDIUM.push(this.Locale.WEEKDAYS_MEDIUM.shift());this.Locale.WEEKDAYS_LONG.push(this.Locale.WEEKDAYS_LONG.shift());}}};YAHOO.widget.Calendar_Core.prototype.customConfig=function(){};YAHOO.widget.Calendar_Core.prototype.buildMonthLabel=function(){var text=this.Options.LOCALE_MONTHS[this.pageDate.getMonth()]+" "+this.pageDate.getFullYear();return text;};YAHOO.widget.Calendar_Core.prototype.buildDayLabel=function(workingDate){var day=workingDate.getDate();return day;};YAHOO.widget.Calendar_Core.prototype.buildShell=function(){this.table=document.createElement("TABLE");this.table.cellSpacing=0;YAHOO.widget.Calendar_Core.setCssClasses(this.table,[this.Style.CSS_CALENDAR]);this.table.id=this.id;this.buildShellHeader();this.buildShellBody();this.buildShellFooter();YAHOO.util.Event.addListener(window,"unload",this._unload,this);};YAHOO.widget.Calendar_Core.prototype.buildShellHeader=function(){var head=document.createElement("THEAD");var headRow=document.createElement("TR");var headerCell=document.createElement("TH");var colSpan=7;if(this.Config.Options.SHOW_WEEK_HEADER){this.weekHeaderCells=new Array();colSpan+=1;}
if(this.Config.Options.SHOW_WEEK_FOOTER){this.weekFooterCells=new Array();colSpan+=1;}
headerCell.colSpan=colSpan;YAHOO.widget.Calendar_Core.setCssClasses(headerCell,[this.Style.CSS_HEADER_TEXT]);this.headerCell=headerCell;headRow.appendChild(headerCell);head.appendChild(headRow);if(this.Options.SHOW_WEEKDAYS){var row=document.createElement("TR");var fillerCell;YAHOO.widget.Calendar_Core.setCssClasses(row,[this.Style.CSS_WEEKDAY_ROW]);if(this.Config.Options.SHOW_WEEK_HEADER){fillerCell=document.createElement("TH");YAHOO.widget.Calendar_Core.setCssClasses(fillerCell,[this.Style.CSS_WEEKDAY_CELL]);row.appendChild(fillerCell);}
for(var i=0;i<this.Options.LOCALE_WEEKDAYS.length;++i){var cell=document.createElement("TH");YAHOO.widget.Calendar_Core.setCssClasses(cell,[this.Style.CSS_WEEKDAY_CELL]);cell.innerHTML=this.Options.LOCALE_WEEKDAYS[i];row.appendChild(cell);}
if(this.Config.Options.SHOW_WEEK_FOOTER){fillerCell=document.createElement("TH");YAHOO.widget.Calendar_Core.setCssClasses(fillerCell,[this.Style.CSS_WEEKDAY_CELL]);row.appendChild(fillerCell);}
head.appendChild(row);}
this.table.appendChild(head);};YAHOO.widget.Calendar_Core.prototype.buildShellBody=function(){this.tbody=document.createElement("TBODY");for(var r=0;r<6;++r){var row=document.createElement("TR");for(var c=0;c<this.headerCell.colSpan;++c){var cell;if(this.Config.Options.SHOW_WEEK_HEADER&&c===0){cell=document.createElement("TH");this.weekHeaderCells[this.weekHeaderCells.length]=cell;}else if(this.Config.Options.SHOW_WEEK_FOOTER&&c==(this.headerCell.colSpan-1)){cell=document.createElement("TH");this.weekFooterCells[this.weekFooterCells.length]=cell;}else{cell=document.createElement("TD");this.cells[this.cells.length]=cell;YAHOO.widget.Calendar_Core.setCssClasses(cell,[this.Style.CSS_CELL]);YAHOO.util.Event.addListener(cell,"click",this.doSelectCell,this);YAHOO.util.Event.addListener(cell,"mouseover",this.doCellMouseOver,this);YAHOO.util.Event.addListener(cell,"mouseout",this.doCellMouseOut,this);}
row.appendChild(cell);}
this.tbody.appendChild(row);}
this.table.appendChild(this.tbody);};YAHOO.widget.Calendar_Core.prototype.buildShellFooter=function(){};YAHOO.widget.Calendar_Core.prototype.renderShell=function(){this.oDomContainer.appendChild(this.table);this.shellRendered=true;};YAHOO.widget.Calendar_Core.prototype.render=function(){if(!this.shellRendered){this.buildShell();this.renderShell();}
this.resetRenderers();this.cellDates.length=0;var workingDate=YAHOO.widget.DateMath.findMonthStart(this.pageDate);this.renderHeader();this.renderBody(workingDate);this.renderFooter();this.onRender();};YAHOO.widget.Calendar_Core.prototype.renderHeader=function(){this.headerCell.innerHTML="";var headerContainer=document.createElement("DIV");headerContainer.className=this.Style.CSS_HEADER;headerContainer.appendChild(document.createTextNode(this.buildMonthLabel()));this.headerCell.appendChild(headerContainer);};YAHOO.widget.Calendar_Core.prototype.renderBody=function(workingDate){this.preMonthDays=workingDate.getDay();if(this.Options.START_WEEKDAY>0){this.preMonthDays-=this.Options.START_WEEKDAY;}
if(this.preMonthDays<0){this.preMonthDays+=7;}
this.monthDays=YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();this.postMonthDays=YAHOO.widget.Calendar_Core.DISPLAY_DAYS-this.preMonthDays-this.monthDays;workingDate=YAHOO.widget.DateMath.subtract(workingDate,YAHOO.widget.DateMath.DAY,this.preMonthDays);var weekRowIndex=0;for(var c=0;c<this.cells.length;++c){var cellRenderers=new Array();var cell=this.cells[c];this.clearElement(cell);cell.index=c;cell.id=this.id+"_cell"+c;this.cellDates[this.cellDates.length]=[workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];if(workingDate.getDay()==this.Options.START_WEEKDAY){var rowHeaderCell=null;var rowFooterCell=null;if(this.Options.SHOW_WEEK_HEADER){rowHeaderCell=this.weekHeaderCells[weekRowIndex];this.clearElement(rowHeaderCell);}
if(this.Options.SHOW_WEEK_FOOTER){rowFooterCell=this.weekFooterCells[weekRowIndex];this.clearElement(rowFooterCell);}
if(this.Options.HIDE_BLANK_WEEKS&&this.isDateOOM(workingDate)&&!YAHOO.widget.DateMath.isMonthOverlapWeek(workingDate)){continue;}else{if(rowHeaderCell){this.renderRowHeader(workingDate,rowHeaderCell);}
if(rowFooterCell){this.renderRowFooter(workingDate,rowFooterCell);}}}
var renderer=null;if(workingDate.getFullYear()==this.today.getFullYear()&&workingDate.getMonth()==this.today.getMonth()&&workingDate.getDate()==this.today.getDate()){cellRenderers[cellRenderers.length]=this.renderCellStyleToday;}
if(this.isDateOOM(workingDate)){cellRenderers[cellRenderers.length]=this.renderCellNotThisMonth;}else{for(var r=0;r<this.renderStack.length;++r){var rArray=this.renderStack[r];var type=rArray[0];var month;var day;var year;switch(type){case YAHOO.widget.Calendar_Core.DATE:month=rArray[1][1];day=rArray[1][2];year=rArray[1][0];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day&&workingDate.getFullYear()==year){renderer=rArray[2];this.renderStack.splice(r,1);}
break;case YAHOO.widget.Calendar_Core.MONTH_DAY:month=rArray[1][0];day=rArray[1][1];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day){renderer=rArray[2];this.renderStack.splice(r,1);}
break;case YAHOO.widget.Calendar_Core.RANGE:var date1=rArray[1][0];var date2=rArray[1][1];var d1month=date1[1];var d1day=date1[2];var d1year=date1[0];var d1=new Date(d1year,d1month-1,d1day);var d2month=date2[1];var d2day=date2[2];var d2year=date2[0];var d2=new Date(d2year,d2month-1,d2day);if(workingDate.getTime()>=d1.getTime()&&workingDate.getTime()<=d2.getTime()){renderer=rArray[2];if(workingDate.getTime()==d2.getTime()){this.renderStack.splice(r,1);}}
break;case YAHOO.widget.Calendar_Core.WEEKDAY:var weekday=rArray[1][0];if(workingDate.getDay()+1==weekday){renderer=rArray[2];}
break;case YAHOO.widget.Calendar_Core.MONTH:month=rArray[1][0];if(workingDate.getMonth()+1==month){renderer=rArray[2];}
break;}
if(renderer){cellRenderers[cellRenderers.length]=renderer;}}}
if(this._indexOfSelectedFieldArray([workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()])>-1){cellRenderers[cellRenderers.length]=this.renderCellStyleSelected;}
if(this.minDate){this.minDate=YAHOO.widget.DateMath.clearTime(this.minDate);}
if(this.maxDate){this.maxDate=YAHOO.widget.DateMath.clearTime(this.maxDate);}
if((this.minDate&&(workingDate.getTime()<this.minDate.getTime()))||(this.maxDate&&(workingDate.getTime()>this.maxDate.getTime()))){cellRenderers[cellRenderers.length]=this.renderOutOfBoundsDate;}else{cellRenderers[cellRenderers.length]=this.renderCellDefault;}
for(var x=0;x<cellRenderers.length;++x){var ren=cellRenderers[x];if(ren.call(this,workingDate,cell)==YAHOO.widget.Calendar_Core.STOP_RENDER){break;}}
workingDate=YAHOO.widget.DateMath.add(workingDate,YAHOO.widget.DateMath.DAY,1);if(workingDate.getDay()==this.Options.START_WEEKDAY){weekRowIndex+=1;}
YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL);if(c>=0&&c<=6){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_TOP);}
if((c%7)==0){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_LEFT);}
if(((c+1)%7)==0){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_RIGHT);}
var postDays=this.postMonthDays;if(postDays>=7&&this.Options.HIDE_BLANK_WEEKS){var blankWeeks=Math.floor(postDays/7);for(var p=0;p<blankWeeks;++p){postDays-=7;}}
if(c>=((this.preMonthDays+postDays+this.monthDays)-7)){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_BOTTOM);}}};YAHOO.widget.Calendar_Core.prototype.renderFooter=function(){};YAHOO.widget.Calendar_Core.prototype._unload=function(e,cal){for(var c in cal.cells){c=null;}
cal.cells=null;cal.tbody=null;cal.oDomContainer=null;cal.table=null;cal.headerCell=null;cal=null;};YAHOO.widget.Calendar_Core.prototype.renderOutOfBoundsDate=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOB);cell.innerHTML=workingDate.getDate();return YAHOO.widget.Calendar_Core.STOP_RENDER;}
YAHOO.widget.Calendar_Core.prototype.renderRowHeader=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_ROW_HEADER);var useYear=this.pageDate.getFullYear();if(!YAHOO.widget.DateMath.isYearOverlapWeek(workingDate)){useYear=workingDate.getFullYear();}
var weekNum=YAHOO.widget.DateMath.getWeekNumber(workingDate,useYear,this.Options.START_WEEKDAY);cell.innerHTML=weekNum;if(this.isDateOOM(workingDate)&&!YAHOO.widget.DateMath.isMonthOverlapWeek(workingDate)){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOM);}};YAHOO.widget.Calendar_Core.prototype.renderRowFooter=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_ROW_FOOTER);if(this.isDateOOM(workingDate)&&!YAHOO.widget.DateMath.isMonthOverlapWeek(workingDate)){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOM);}};YAHOO.widget.Calendar_Core.prototype.renderCellDefault=function(workingDate,cell){cell.innerHTML="";var link=document.createElement("a");link.href="javascript:void(null);";link.name=this.id+"__"+workingDate.getFullYear()+"_"+(workingDate.getMonth()+1)+"_"+workingDate.getDate();link.appendChild(document.createTextNode(this.buildDayLabel(workingDate)));cell.appendChild(link);};YAHOO.widget.Calendar_Core.prototype.renderCellStyleHighlight1=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT1);};YAHOO.widget.Calendar_Core.prototype.renderCellStyleHighlight2=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT2);};YAHOO.widget.Calendar_Core.prototype.renderCellStyleHighlight3=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT3);};YAHOO.widget.Calendar_Core.prototype.renderCellStyleHighlight4=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT4);};YAHOO.widget.Calendar_Core.prototype.renderCellStyleToday=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_TODAY);};YAHOO.widget.Calendar_Core.prototype.renderCellStyleSelected=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_SELECTED);};YAHOO.widget.Calendar_Core.prototype.renderCellNotThisMonth=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOM);cell.innerHTML=workingDate.getDate();return YAHOO.widget.Calendar_Core.STOP_RENDER;};YAHOO.widget.Calendar_Core.prototype.renderBodyCellRestricted=function(workingDate,cell){YAHOO.widget.Calendar_Core.setCssClasses(cell,[this.Style.CSS_CELL,this.Style.CSS_CELL_RESTRICTED]);cell.innerHTML=workingDate.getDate();return YAHOO.widget.Calendar_Core.STOP_RENDER;};YAHOO.widget.Calendar_Core.prototype.addMonths=function(count){this.pageDate=YAHOO.widget.DateMath.add(this.pageDate,YAHOO.widget.DateMath.MONTH,count);this.resetRenderers();this.onChangePage();};YAHOO.widget.Calendar_Core.prototype.subtractMonths=function(count){this.pageDate=YAHOO.widget.DateMath.subtract(this.pageDate,YAHOO.widget.DateMath.MONTH,count);this.resetRenderers();this.onChangePage();};YAHOO.widget.Calendar_Core.prototype.addYears=function(count){this.pageDate=YAHOO.widget.DateMath.add(this.pageDate,YAHOO.widget.DateMath.YEAR,count);this.resetRenderers();this.onChangePage();};YAHOO.widget.Calendar_Core.prototype.subtractYears=function(count){this.pageDate=YAHOO.widget.DateMath.subtract(this.pageDate,YAHOO.widget.DateMath.YEAR,count);this.resetRenderers();this.onChangePage();};YAHOO.widget.Calendar_Core.prototype.nextMonth=function(){this.addMonths(1);};YAHOO.widget.Calendar_Core.prototype.previousMonth=function(){this.subtractMonths(1);};YAHOO.widget.Calendar_Core.prototype.nextYear=function(){this.addYears(1);};YAHOO.widget.Calendar_Core.prototype.previousYear=function(){this.subtractYears(1);};YAHOO.widget.Calendar_Core.prototype.reset=function(){this.selectedDates.length=0;this.selectedDates=this._selectedDates.concat();this.pageDate=new Date(this._pageDate.getTime());this.onReset();};YAHOO.widget.Calendar_Core.prototype.clear=function(){this.selectedDates.length=0;this.pageDate=new Date(this.today.getTime());this.onClear();};YAHOO.widget.Calendar_Core.prototype.select=function(date){this.onBeforeSelect();var aToBeSelected=this._toFieldArray(date);for(var a=0;a<aToBeSelected.length;++a){var toSelect=aToBeSelected[a];if(this._indexOfSelectedFieldArray(toSelect)==-1){this.selectedDates[this.selectedDates.length]=toSelect;}}
if(this.parent){this.parent.sync(this);}
this.onSelect();return this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototype.selectCell=function(cellIndex){this.onBeforeSelect();this.cells=this.tbody.getElementsByTagName("TD");var cell=this.cells[cellIndex];var cellDate=this.cellDates[cellIndex];var dCellDate=this._toDate(cellDate);var selectDate=cellDate.concat();this.selectedDates.push(selectDate);if(this.parent){this.parent.sync(this);}
this.renderCellStyleSelected(dCellDate,cell);this.onSelect();this.doCellMouseOut.call(cell,null,this);return this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototype.deselect=function(date){this.onBeforeDeselect();var aToBeSelected=this._toFieldArray(date);for(var a=0;a<aToBeSelected.length;++a){var toSelect=aToBeSelected[a];var index=this._indexOfSelectedFieldArray(toSelect);if(index!=-1){this.selectedDates.splice(index,1);}}
if(this.parent){this.parent.sync(this);}
this.onDeselect();return this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototype.deselectCell=function(i){this.onBeforeDeselect();this.cells=this.tbody.getElementsByTagName("TD");var cell=this.cells[i];var cellDate=this.cellDates[i];var cellDateIndex=this._indexOfSelectedFieldArray(cellDate);var dCellDate=this._toDate(cellDate);var selectDate=cellDate.concat();if(cellDateIndex>-1){if(this.pageDate.getMonth()==dCellDate.getMonth()&&this.pageDate.getFullYear()==dCellDate.getFullYear()){YAHOO.util.Dom.removeClass(cell,this.Style.CSS_CELL_SELECTED);}
this.selectedDates.splice(cellDateIndex,1);}
if(this.parent){this.parent.sync(this);}
this.onDeselect();return this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototype.deselectAll=function(){this.onBeforeDeselect();var count=this.selectedDates.length;this.selectedDates.length=0;if(this.parent){this.parent.sync(this);}
if(count>0){this.onDeselect();}
return this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototype._toFieldArray=function(date){var returnDate=new Array();if(date instanceof Date){returnDate=[[date.getFullYear(),date.getMonth()+1,date.getDate()]];}else if(typeof date=='string'){returnDate=this._parseDates(date);}else if(date instanceof Array){for(var i=0;i<date.length;++i){var d=date[i];returnDate[returnDate.length]=[d.getFullYear(),d.getMonth()+1,d.getDate()];}}
return returnDate;};YAHOO.widget.Calendar_Core.prototype._toDate=function(dateFieldArray){if(dateFieldArray instanceof Date){return dateFieldArray;}else{return new Date(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2]);}};YAHOO.widget.Calendar_Core.prototype._fieldArraysAreEqual=function(array1,array2){var match=false;if(array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]){match=true;}
return match;};YAHOO.widget.Calendar_Core.prototype._indexOfSelectedFieldArray=function(find){var selected=-1;for(var s=0;s<this.selectedDates.length;++s){var sArray=this.selectedDates[s];if(find[0]==sArray[0]&&find[1]==sArray[1]&&find[2]==sArray[2]){selected=s;break;}}
return selected;};YAHOO.widget.Calendar_Core.prototype.isDateOOM=function(date){var isOOM=false;if(date.getMonth()!=this.pageDate.getMonth()){isOOM=true;}
return isOOM;};YAHOO.widget.Calendar_Core.prototype.onBeforeSelect=function(){if(!this.Options.MULTI_SELECT){this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}};YAHOO.widget.Calendar_Core.prototype.onSelect=function(){};YAHOO.widget.Calendar_Core.prototype.onBeforeDeselect=function(){};YAHOO.widget.Calendar_Core.prototype.onDeselect=function(){};YAHOO.widget.Calendar_Core.prototype.onChangePage=function(){var me=this;this.renderHeader();if(this.renderProcId){clearTimeout(this.renderProcId);}
this.renderProcId=setTimeout(function(){me.render();me.renderProcId=null;},1);};YAHOO.widget.Calendar_Core.prototype.onRender=function(){};YAHOO.widget.Calendar_Core.prototype.onReset=function(){this.render();};YAHOO.widget.Calendar_Core.prototype.onClear=function(){this.render();};YAHOO.widget.Calendar_Core.prototype.validate=function(){return true;};YAHOO.widget.Calendar_Core.prototype._parseDate=function(sDate){var aDate=sDate.split(this.Locale.DATE_FIELD_DELIMITER);var rArray;if(aDate.length==2){rArray=[aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];rArray.type=YAHOO.widget.Calendar_Core.MONTH_DAY;}else{rArray=[aDate[this.Locale.MDY_YEAR_POSITION-1],aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];rArray.type=YAHOO.widget.Calendar_Core.DATE;}
return rArray;};YAHOO.widget.Calendar_Core.prototype._parseDates=function(sDates){var aReturn=new Array();var aDates=sDates.split(this.Locale.DATE_DELIMITER);for(var d=0;d<aDates.length;++d){var sDate=aDates[d];if(sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var aRange=sDate.split(this.Locale.DATE_RANGE_DELIMITER);var dateStart=this._parseDate(aRange[0]);var dateEnd=this._parseDate(aRange[1]);var fullRange=this._parseRange(dateStart,dateEnd);aReturn=aReturn.concat(fullRange);}else{var aDate=this._parseDate(sDate);aReturn.push(aDate);}}
return aReturn;};YAHOO.widget.Calendar_Core.prototype._parseRange=function(startDate,endDate){var dStart=new Date(startDate[0],startDate[1]-1,startDate[2]);var dCurrent=YAHOO.widget.DateMath.add(new Date(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.DateMath.DAY,1);var dEnd=new Date(endDate[0],endDate[1]-1,endDate[2]);var results=new Array();results.push(startDate);while(dCurrent.getTime()<=dEnd.getTime()){results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);dCurrent=YAHOO.widget.DateMath.add(dCurrent,YAHOO.widget.DateMath.DAY,1);}
return results;};YAHOO.widget.Calendar_Core.prototype.resetRenderers=function(){this.renderStack=this._renderStack.concat();};YAHOO.widget.Calendar_Core.prototype.clearElement=function(cell){cell.innerHTML="&nbsp;";cell.className="";};YAHOO.widget.Calendar_Core.prototype.addRenderer=function(sDates,fnRender){var aDates=this._parseDates(sDates);for(var i=0;i<aDates.length;++i){var aDate=aDates[i];if(aDate.length==2){if(aDate[0]instanceof Array){this._addRenderer(YAHOO.widget.Calendar_Core.RANGE,aDate,fnRender);}else{this._addRenderer(YAHOO.widget.Calendar_Core.MONTH_DAY,aDate,fnRender);}}else if(aDate.length==3){this._addRenderer(YAHOO.widget.Calendar_Core.DATE,aDate,fnRender);}}};YAHOO.widget.Calendar_Core.prototype._addRenderer=function(type,aDates,fnRender){var add=[type,aDates,fnRender];this.renderStack.unshift(add);this._renderStack=this.renderStack.concat();};YAHOO.widget.Calendar_Core.prototype.addMonthRenderer=function(month,fnRender){this._addRenderer(YAHOO.widget.Calendar_Core.MONTH,[month],fnRender);};YAHOO.widget.Calendar_Core.prototype.addWeekdayRenderer=function(weekday,fnRender){this._addRenderer(YAHOO.widget.Calendar_Core.WEEKDAY,[weekday],fnRender);};YAHOO.widget.Calendar_Core.setCssClasses=function(element,aStyles){element.className="";var className=aStyles.join(" ");element.className=className;};YAHOO.widget.Calendar_Core.prototype.clearAllBodyCellStyles=function(style){for(var c=0;c<this.cells.length;++c){YAHOO.util.Dom.removeClass(this.cells[c],style);}};YAHOO.widget.Calendar_Core.prototype.setMonth=function(month){this.pageDate.setMonth(month);};YAHOO.widget.Calendar_Core.prototype.setYear=function(year){this.pageDate.setFullYear(year);};YAHOO.widget.Calendar_Core.prototype.getSelectedDates=function(){var returnDates=new Array();for(var d=0;d<this.selectedDates.length;++d){var dateArray=this.selectedDates[d];var date=new Date(dateArray[0],dateArray[1]-1,dateArray[2]);returnDates.push(date);}
returnDates.sort();return returnDates;};YAHOO.widget.Calendar_Core._getBrowser=function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1)
return'opera';else if(ua.indexOf('msie')!=-1)
return'ie';else if(ua.indexOf('safari')!=-1)
return'safari';else if(ua.indexOf('gecko')!=-1)
return'gecko';else
return false;}
YAHOO.widget.Calendar_Core.prototype.toString=function(){return"Calendar_Core "+this.id;}
YAHOO.widget.Cal_Core=YAHOO.widget.Calendar_Core;YAHOO.widget.Calendar=function(id,containerId,monthyear,selected){if(arguments.length>0){this.init(id,containerId,monthyear,selected);}}
YAHOO.widget.Calendar.prototype=new YAHOO.widget.Calendar_Core();YAHOO.widget.Calendar.prototype.buildShell=function(){this.border=document.createElement("DIV");this.border.className=this.Style.CSS_CONTAINER;this.table=document.createElement("TABLE");this.table.cellSpacing=0;YAHOO.widget.Calendar_Core.setCssClasses(this.table,[this.Style.CSS_CALENDAR]);this.border.id=this.id;this.buildShellHeader();this.buildShellBody();this.buildShellFooter();};YAHOO.widget.Calendar.prototype.renderShell=function(){this.border.appendChild(this.table);this.oDomContainer.appendChild(this.border);this.shellRendered=true;};YAHOO.widget.Calendar.prototype.renderHeader=function(){this.headerCell.innerHTML="";var headerContainer=document.createElement("DIV");headerContainer.className=this.Style.CSS_HEADER;if(this.linkLeft){YAHOO.util.Event.removeListener(this.linkLeft,"mousedown",this.previousMonth);}
this.linkLeft=document.createElement("A");this.linkLeft.innerHTML="&nbsp;";YAHOO.util.Event.addListener(this.linkLeft,"mousedown",this.previousMonth,this,true);this.linkLeft.style.backgroundImage="url("+this.Options.NAV_ARROW_LEFT+")";this.linkLeft.className=this.Style.CSS_NAV_LEFT;if(this.linkRight){YAHOO.util.Event.removeListener(this.linkRight,"mousedown",this.nextMonth);}
this.linkRight=document.createElement("A");this.linkRight.innerHTML="&nbsp;";YAHOO.util.Event.addListener(this.linkRight,"mousedown",this.nextMonth,this,true);this.linkRight.style.backgroundImage="url("+this.Options.NAV_ARROW_RIGHT+")";this.linkRight.className=this.Style.CSS_NAV_RIGHT;headerContainer.appendChild(this.linkLeft);headerContainer.appendChild(document.createTextNode(this.buildMonthLabel()));headerContainer.appendChild(this.linkRight);this.headerCell.appendChild(headerContainer);};YAHOO.widget.Cal=YAHOO.widget.Calendar;YAHOO.widget.CalendarGroup=function(pageCount,id,containerId,monthyear,selected){if(arguments.length>0){this.init(pageCount,id,containerId,monthyear,selected);}}
YAHOO.widget.CalendarGroup.prototype.init=function(pageCount,id,containerId,monthyear,selected){this.id=id;this.selectedDates=new Array();this.containerId=containerId;this.pageCount=pageCount;this.pages=new Array();for(var p=0;p<pageCount;++p){var cal=this.constructChild(id+"_"+p,this.containerId+"_"+p,monthyear,selected);cal.parent=this;cal.index=p;cal.pageDate.setMonth(cal.pageDate.getMonth()+p);cal._pageDate=new Date(cal.pageDate.getFullYear(),cal.pageDate.getMonth(),cal.pageDate.getDate());this.pages.push(cal);}
this.doNextMonth=function(e,calGroup){calGroup.nextMonth();};this.doPreviousMonth=function(e,calGroup){calGroup.previousMonth();};};YAHOO.widget.CalendarGroup.prototype.setChildFunction=function(fnName,fn){for(var p=0;p<this.pageCount;++p){this.pages[p][fnName]=fn;}}
YAHOO.widget.CalendarGroup.prototype.callChildFunction=function(fnName,args){for(var p=0;p<this.pageCount;++p){var page=this.pages[p];if(page[fnName]){var fn=page[fnName];fn.call(page,args);}}}
YAHOO.widget.CalendarGroup.prototype.constructChild=function(id,containerId,monthyear,selected){return new YAHOO.widget.Calendar_Core(id,containerId,monthyear,selected);};YAHOO.widget.CalendarGroup.prototype.setMonth=function(month){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.setMonth(month+p);}};YAHOO.widget.CalendarGroup.prototype.setYear=function(year){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];if((cal.pageDate.getMonth()+1)==1&&p>0)
{year+=1;}
cal.setYear(year);}};YAHOO.widget.CalendarGroup.prototype.render=function(){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.render();}};YAHOO.widget.CalendarGroup.prototype.select=function(date){var ret;for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];ret=cal.select(date);}
return ret;};YAHOO.widget.CalendarGroup.prototype.selectCell=function(cellIndex){var ret;for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];ret=cal.selectCell(cellIndex);}
return ret;};YAHOO.widget.CalendarGroup.prototype.deselect=function(date){var ret;for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];ret=cal.deselect(date);}
return ret;};YAHOO.widget.CalendarGroup.prototype.deselectAll=function(){var ret;for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];ret=cal.deselectAll();}
return ret;};YAHOO.widget.CalendarGroup.prototype.deselectCell=function(cellIndex){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.deselectCell(cellIndex);}
return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.reset=function(){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.reset();}};YAHOO.widget.CalendarGroup.prototype.clear=function(){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.clear();}};YAHOO.widget.CalendarGroup.prototype.nextMonth=function(){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.nextMonth();}};YAHOO.widget.CalendarGroup.prototype.previousMonth=function(){for(var p=this.pages.length-1;p>=0;--p)
{var cal=this.pages[p];cal.previousMonth();}};YAHOO.widget.CalendarGroup.prototype.nextYear=function(){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.nextYear();}};YAHOO.widget.CalendarGroup.prototype.previousYear=function(){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.previousYear();}};YAHOO.widget.CalendarGroup.prototype.sync=function(caller){var calendar;if(caller)
{this.selectedDates=caller.selectedDates.concat();}else{var hash=new Object();var combinedDates=new Array();for(var p=0;p<this.pages.length;++p)
{calendar=this.pages[p];var values=calendar.selectedDates;for(var v=0;v<values.length;++v)
{var valueArray=values[v];hash[valueArray.toString()]=valueArray;}}
for(var val in hash)
{combinedDates[combinedDates.length]=hash[val];}
this.selectedDates=combinedDates.concat();}
for(p=0;p<this.pages.length;++p)
{calendar=this.pages[p];if(!calendar.Options.MULTI_SELECT){calendar.clearAllBodyCellStyles(calendar.Config.Style.CSS_CELL_SELECTED);}
calendar.selectedDates=this.selectedDates.concat();}
return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.getSelectedDates=function(){var returnDates=new Array();for(var d=0;d<this.selectedDates.length;++d)
{var dateArray=this.selectedDates[d];var date=new Date(dateArray[0],dateArray[1]-1,dateArray[2]);returnDates.push(date);}
returnDates.sort();return returnDates;};YAHOO.widget.CalendarGroup.prototype.addRenderer=function(sDates,fnRender){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.addRenderer(sDates,fnRender);}};YAHOO.widget.CalendarGroup.prototype.addMonthRenderer=function(month,fnRender){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.addMonthRenderer(month,fnRender);}};YAHOO.widget.CalendarGroup.prototype.addWeekdayRenderer=function(weekday,fnRender){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.addWeekdayRenderer(weekday,fnRender);}};YAHOO.widget.CalendarGroup.prototype.wireEvent=function(eventName,fn){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal[eventName]=fn;}};YAHOO.widget.CalendarGroup.prototype.toString=function(){return"CalendarGroup "+this.id;}
YAHOO.widget.CalGrp=YAHOO.widget.CalendarGroup;YAHOO.widget.Calendar2up_Cal=function(id,containerId,monthyear,selected){if(arguments.length>0)
{this.init(id,containerId,monthyear,selected);}}
YAHOO.widget.Calendar2up_Cal.prototype=new YAHOO.widget.Calendar_Core();YAHOO.widget.Calendar2up_Cal.prototype.renderHeader=function(){this.headerCell.innerHTML="";var headerContainer=document.createElement("DIV");headerContainer.className=this.Style.CSS_HEADER;if(this.index==0){if(this.linkLeft){YAHOO.util.Event.removeListener(this.linkLeft,"mousedown",this.parent.doPreviousMonth);}
this.linkLeft=document.createElement("A");this.linkLeft.innerHTML="&nbsp;";this.linkLeft.style.backgroundImage="url("+this.Options.NAV_ARROW_LEFT+")";this.linkLeft.className=this.Style.CSS_NAV_LEFT;YAHOO.util.Event.addListener(this.linkLeft,"mousedown",this.parent.doPreviousMonth,this.parent);headerContainer.appendChild(this.linkLeft);}
headerContainer.appendChild(document.createTextNode(this.buildMonthLabel()));if(this.index==1){if(this.linkRight){YAHOO.util.Event.removeListener(this.linkRight,"mousedown",this.parent.doNextMonth);}
this.linkRight=document.createElement("A");this.linkRight.innerHTML="&nbsp;";this.linkRight.style.backgroundImage="url("+this.Options.NAV_ARROW_RIGHT+")";this.linkRight.className=this.Style.CSS_NAV_RIGHT;YAHOO.util.Event.addListener(this.linkRight,"mousedown",this.parent.doNextMonth,this.parent);headerContainer.appendChild(this.linkRight);}
this.headerCell.appendChild(headerContainer);};YAHOO.widget.Calendar2up=function(id,containerId,monthyear,selected){if(arguments.length>0)
{this.buildWrapper(containerId);this.init(2,id,containerId,monthyear,selected);}}
YAHOO.widget.Calendar2up.prototype=new YAHOO.widget.CalendarGroup();YAHOO.widget.Calendar2up.CSS_2UPWRAPPER="yui-cal2upwrapper";YAHOO.widget.Calendar2up.CSS_CONTAINER="yui-calcontainer";YAHOO.widget.Calendar2up.CSS_2UPCONTAINER="cal2up";YAHOO.widget.Calendar2up.CSS_2UPTITLE="title";YAHOO.widget.Calendar2up.CSS_2UPCLOSE="close-icon";YAHOO.widget.Calendar2up.prototype.constructChild=function(id,containerId,monthyear,selected){var cal=new YAHOO.widget.Calendar2up_Cal(id,containerId,monthyear,selected);return cal;};YAHOO.widget.Calendar2up.prototype.buildWrapper=function(containerId){var outerContainer=document.getElementById(containerId);outerContainer.className=YAHOO.widget.Calendar2up.CSS_2UPWRAPPER;var innerContainer=document.createElement("DIV");innerContainer.className=YAHOO.widget.Calendar2up.CSS_CONTAINER;innerContainer.id=containerId+"_inner";var cal1Container=document.createElement("DIV");cal1Container.id=containerId+"_0";cal1Container.className=YAHOO.widget.Calendar2up.CSS_2UPCONTAINER;cal1Container.style.marginRight="10px";var cal2Container=document.createElement("DIV");cal2Container.id=containerId+"_1";cal2Container.className=YAHOO.widget.Calendar2up.CSS_2UPCONTAINER;outerContainer.appendChild(innerContainer);innerContainer.appendChild(cal1Container);innerContainer.appendChild(cal2Container);this.innerContainer=innerContainer;this.outerContainer=outerContainer;}
YAHOO.widget.Calendar2up.prototype.render=function(){this.renderHeader();YAHOO.widget.CalendarGroup.prototype.render.call(this);this.renderFooter();};YAHOO.widget.Calendar2up.prototype.renderHeader=function(){if(!this.title){this.title="";}
if(!this.titleDiv)
{this.titleDiv=document.createElement("DIV");if(this.title=="")
{this.titleDiv.style.display="none";}}
this.titleDiv.className=YAHOO.widget.Calendar2up.CSS_2UPTITLE;this.titleDiv.innerHTML=this.title;if(this.outerContainer.style.position=="absolute")
{var linkClose=document.createElement("A");linkClose.href="javascript:void(null)";YAHOO.util.Event.addListener(linkClose,"click",this.hide,this);var imgClose=document.createElement("IMG");imgClose.src=YAHOO.widget.Calendar_Core.IMG_ROOT+"us/my/bn/x_d.gif";imgClose.className=YAHOO.widget.Calendar2up.CSS_2UPCLOSE;linkClose.appendChild(imgClose);this.linkClose=linkClose;this.titleDiv.appendChild(linkClose);}
this.innerContainer.insertBefore(this.titleDiv,this.innerContainer.firstChild);}
YAHOO.widget.Calendar2up.prototype.hide=function(e,cal){if(!cal)
{cal=this;}
cal.outerContainer.style.display="none";}
YAHOO.widget.Calendar2up.prototype.renderFooter=function(){}
YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;

View File

@ -1,803 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.1
*/
/**
* The Connection Manager provides a simplified interface to the XMLHttpRequest
* object. It handles cross-browser instantiantion of XMLHttpRequest, negotiates the
* interactive states and server response, returning the results to a pre-defined
* callback you create.
* @ class
*/
YAHOO.util.Connect =
{
/**
* Array of MSFT ActiveX ids for XMLHttpRequest.
* @private
* @type array
*/
_msxml_progid:[
'MSXML2.XMLHTTP.3.0',
'MSXML2.XMLHTTP',
'Microsoft.XMLHTTP'
],
/**
* Object literal of HTTP header(s)
* @private
* @type object
*/
_http_header:{},
/**
* Determines if HTTP headers are set.
* @private
* @type boolean
*/
_has_http_headers:false,
/**
* Property that that determines if a default header of
* Content-Type of 'application/x-www-form-urlencoded'
* will be added to any client HTTP headers sent.
* @private
* @type boolean
*/
_default_post_header:true,
/**
* Property modified by setForm() to determine if the data
* should be submitted as an HTML form.
* @private
* @type boolean
*/
_isFormSubmit:false,
/**
* Property modified by setForm() to determine if a file(s)
* upload is expected.
* @private
* @type boolean
*/
_isFileUpload:false,
/**
* Property modified by setForm() to set a reference to the HTML
* form node if the desired action is file upload.
* @private
* @type object
*/
_formNode:null,
/**
* Property modified by setForm() to set the HTML form data
* for each transaction.
* @private
* @type string
*/
_sFormData:null,
/**
* Collection of polling references to the polling mechanism in handleReadyState.
* @private
* @type string
*/
_poll:[],
/**
* Queue of timeout references for each transaction with a defined timeout value.
* @private
* @type string
*/
_timeOut:[],
/**
* The polling frequency, in milliseconds, for HandleReadyState.
* when attempting to determine a transaction's XHR readyState.
* The default is 50 milliseconds.
* @private
* @type int
*/
_polling_interval:50,
/**
* A transaction counter that increments the transaction id for each transaction.
* @private
* @type int
*/
_transaction_id:0,
/**
* Member to add an ActiveX id to the existing xml_progid array.
* In the event(unlikely) a new ActiveX id is introduced, it can be added
* without internal code modifications.
* @public
* @param string id The ActiveX id to be added to initialize the XHR object.
* @return void
*/
setProgId:function(id)
{
this._msxml_progid.unshift(id);
YAHOO.log('ActiveX Program Id ' + id + ' added to _msxml_progid.', 'info', 'Connection');
},
/**
* Member to enable or disable the default POST header.
* @public
* @param boolean b Use default header - true or false .
* @return void
*/
setDefaultPostHeader:function(b)
{
YAHOO.log('Default POST header set to ' + b, 'info', 'Connection');
this._default_post_header = b;
},
/**
* Member to modify the default polling interval.
* @public
* @param {int} i The polling interval in milliseconds.
* @return void
*/
setPollingInterval:function(i)
{
if(typeof i == 'number' && isFinite(i)){
this._polling_interval = i;
YAHOO.log('Default polling interval set to ' + i, 'info', 'Connection');
}
},
/**
* Instantiates a XMLHttpRequest object and returns an object with two properties:
* the XMLHttpRequest instance and the transaction id.
* @private
* @param {int} transactionId Property containing the transaction id for this transaction.
* @return connection object
*/
createXhrObject:function(transactionId)
{
var obj,http;
try
{
// Instantiates XMLHttpRequest in non-IE browsers and assigns to http.
http = new XMLHttpRequest();
// Object literal with http and tId properties
obj = { conn:http, tId:transactionId };
YAHOO.log('XHR object created for transaction ' + transactionId, 'info', 'Connection');
}
catch(e)
{
for(var i=0; i<this._msxml_progid.length; ++i){
try
{
// Instantiates XMLHttpRequest for IE and assign to http.
http = new ActiveXObject(this._msxml_progid[i]);
// Object literal with http and tId properties
obj = { conn:http, tId:transactionId };
YAHOO.log('ActiveX XHR object created for transaction ' + transactionId, 'info', 'Connection');
break;
}
catch(e){}
}
}
finally
{
return obj;
}
},
/**
* This method is called by asyncRequest to create a
* valid connection object for the transaction. It also passes a
* transaction id and increments the transaction id counter.
* @private
* @return object
*/
getConnectionObject:function()
{
var o;
var tId = this._transaction_id;
try
{
o = this.createXhrObject(tId);
if(o){
this._transaction_id++;
}
}
catch(e){}
finally
{
return o;
}
},
/**
* Method for initiating an asynchronous request via the XHR object.
* @public
* @param {string} method HTTP transaction method
* @param {string} uri Fully qualified path of resource
* @param callback User-defined callback function or object
* @param {string} postData POST body
* @return {object} Returns the connection object
*/
asyncRequest:function(method, uri, callback, postData)
{
var o = this.getConnectionObject();
if(!o){
YAHOO.log('Unable to create connection object.', 'error', 'Connection');
return null;
}
else{
if(this._isFormSubmit){
if(this._isFileUpload){
this.uploadFile(o.tId, callback, uri);
this.releaseObject(o);
return;
}
//If the specified HTTP method is GET, setForm() will return an
//encoded string that is concatenated to the uri to
//create a querystring.
if(method == 'GET'){
uri += "?" + this._sFormData;
}
else if(method == 'POST'){
postData = this._sFormData;
}
this._sFormData = '';
}
o.conn.open(method, uri, true);
if(this._isFormSubmit || (postData && this._default_post_header)){
this.initHeader('Content-Type','application/x-www-form-urlencoded');
YAHOO.log('Initialize default header Content-Type to application/x-www-form-urlencoded.', 'info', 'Connection');
if(this._isFormSubmit){
this._isFormSubmit = false;
}
}
//Verify whether the transaction has any user-defined HTTP headers
//and set them.
if(this._has_http_headers){
this.setHeader(o);
}
this.handleReadyState(o, callback);
postData?o.conn.send(postData):o.conn.send(null);
return o;
}
},
/**
* This method serves as a timer that polls the XHR object's readyState
* property during a transaction, instead of binding a callback to the
* onreadystatechange event. Upon readyState 4, handleTransactionResponse
* will process the response, and the timer will be cleared.
*
* @private
* @param {object} o The connection object
* @param callback User-defined callback object
* @return void
*/
handleReadyState:function(o, callback)
{
var timeOut = callback.timeout;
var oConn = this;
try
{
if(timeOut !== undefined){
this._timeOut[o.tId] = window.setTimeout(function(){ oConn.abort(o, callback, true) }, timeOut);
}
this._poll[o.tId] = window.setInterval(
function(){
if(o.conn && o.conn.readyState == 4){
window.clearInterval(oConn._poll[o.tId]);
oConn._poll.splice(o.tId);
if(timeOut){
oConn._timeOut.splice(o.tId);
}
oConn.handleTransactionResponse(o, callback);
}
}
,this._polling_interval);
}
catch(e)
{
window.clearInterval(oConn._poll[o.tId]);
oConn._poll.splice(o.tId);
if(timeOut){
oConn._timeOut.splice(o.tId);
}
oConn.handleTransactionResponse(o, callback);
}
},
/**
* This method attempts to interpret the server response and
* determine whether the transaction was successful, or if an error or
* exception was encountered.
*
* @private
* @param {object} o The connection object
* @param {object} callback - User-defined callback object
* @param {boolean} determines if the transaction was aborted.
* @return void
*/
handleTransactionResponse:function(o, callback, isAbort)
{
// If no valid callback is provided, then do not process any callback handling.
if(!callback){
this.releaseObject(o);
YAHOO.log('No callback object to process. Transaction complete.', 'warn', 'Connection');
return;
}
var httpStatus, responseObject;
try
{
if(o.conn.status !== undefined && o.conn.status != 0){
httpStatus = o.conn.status;
}
else{
httpStatus = 13030;
}
}
catch(e){
// 13030 is the custom code to indicate the condition -- in Mozilla/FF --
// when the o object's status and statusText properties are
// unavailable, and a query attempt throws an exception.
httpStatus = 13030;
}
if(httpStatus >= 200 && httpStatus < 300){
responseObject = this.createResponseObject(o, callback.argument);
if(callback.success){
if(!callback.scope){
callback.success(responseObject);
YAHOO.log('Success callback. HTTP code is ' + httpStatus, 'info', 'Connection');
}
else{
// If a scope property is defined, the callback will be fired from
// the context of the object.
callback.success.apply(callback.scope, [responseObject]);
YAHOO.log('Success callback with scope. HTTP code is ' + httpStatus, 'info', 'Connection');
}
}
}
else{
switch(httpStatus){
// The following case labels are wininet.dll error codes that may be encountered.
// Server timeout
case 12002:
// 12029 to 12031 correspond to dropped connections.
case 12029:
case 12030:
case 12031:
// Connection closed by server.
case 12152:
// See above comments for variable status.
case 13030:
responseObject = this.createExceptionObject(o.tId, callback.argument, isAbort);
if(callback.failure){
if(!callback.scope){
callback.failure(responseObject);
YAHOO.log('Failure callback. Exception detected. Status code is ' + httpStatus, 'warn', 'Connection');
}
else{
callback.failure.apply(callback.scope,[responseObject]);
YAHOO.log('Failure callback with scope. Exception detected. Status code is ' + httpStatus, 'warn', 'Connection');
}
}
break;
default:
responseObject = this.createResponseObject(o, callback.argument);
if(callback.failure){
if(!callback.scope){
callback.failure(responseObject);
YAHOO.log('Failure callback. HTTP status code is ' + httpStatus, 'warn', 'Connection');
}
else{
callback.failure.apply(callback.scope,[responseObject]);
YAHOO.log('Failure callback with scope. HTTP status code is ' + httpStatus, 'warn', 'Connection');
}
}
}
}
this.releaseObject(o);
},
/**
* This method evaluates the server response, creates and returns the results via
* its properties. Success and failure cases will differ in the response
* object's property values.
* @private
* @param {object} o The connection object
* @param {} callbackArg User-defined argument or arguments to be passed to the callback
* @return object
*/
createResponseObject:function(o, callbackArg)
{
var obj = {};
var headerObj = {};
try
{
var headerStr = o.conn.getAllResponseHeaders();
var header = headerStr.split('\n');
for(var i=0; i < header.length; i++){
var delimitPos = header[i].indexOf(':');
if(delimitPos != -1){
headerObj[header[i].substring(0,delimitPos)] = header[i].substring(delimitPos + 2);
}
}
}
catch(e){}
obj.tId = o.tId;
obj.status = o.conn.status;
obj.statusText = o.conn.statusText;
obj.getResponseHeader = headerObj;
obj.getAllResponseHeaders = headerStr;
obj.responseText = o.conn.responseText;
obj.responseXML = o.conn.responseXML;
if(typeof callbackArg !== undefined){
obj.argument = callbackArg;
}
return obj;
},
/**
* If a transaction cannot be completed due to dropped or closed connections,
* there may be not be enough information to build a full response object.
* The failure callback will be fired and this specific condition can be identified
* by a status property value of 0.
*
* If an abort was successful, the status property will report a value of -1.
*
* @private
* @param {int} tId Transaction Id
* @param callbackArg The user-defined arguments
* @param isAbort Determines if the exception is an abort.
* @return object
*/
createExceptionObject:function(tId, callbackArg, isAbort)
{
var COMM_CODE = 0;
var COMM_ERROR = 'communication failure';
var ABORT_CODE = -1;
var ABORT_ERROR = 'transaction aborted';
var obj = {};
obj.tId = tId;
if(isAbort){
obj.status = ABORT_CODE;
obj.statusText = ABORT_ERROR;
}
else{
obj.status = COMM_CODE;
obj.statusText = COMM_ERROR;
}
if(callbackArg){
obj.argument = callbackArg;
}
return obj;
},
/**
* Public method that stores the custom HTTP headers for each transaction.
* @public
* @param {string} label The HTTP header label
* @param {string} value The HTTP header value
* @return void
*/
initHeader:function(label,value)
{
if(this._http_header[label] === undefined){
this._http_header[label] = value;
}
else{
this._http_header[label] = value + "," + this._http_header[label];
}
this._has_http_headers = true;
},
/**
* Accessor that sets the HTTP headers for each transaction.
* @private
* @param {object} o The connection object for the transaction.
* @return void
*/
setHeader:function(o)
{
for(var prop in this._http_header){
if(this._http_header.propertyIsEnumerable){
o.conn.setRequestHeader(prop, this._http_header[prop]);
YAHOO.log('HTTP header ' + prop + ' set with value of ' + this._http_header[prop], 'info', 'Connection');
}
}
delete this._http_header;
this._http_header = {};
this._has_http_headers = false;
},
/**
* This method assembles the form label and value pairs and
* constructs an encoded string.
* asyncRequest() will automatically initialize the
* transaction with a HTTP header Content-Type of
* application/x-www-form-urlencoded.
* @public
* @param {string || object} form id or name attribute, or form object.
* @param {string} optional boolean to indicate SSL environment.
* @param {string} optional qualified path of iframe resource for SSL in IE.
* @return void
*/
setForm:function(formId, isUpload, secureUri)
{
this._sFormData = '';
if(typeof formId == 'string'){
// Determine if the argument is a form id or a form name.
// Note form name usage is deprecated by supported
// here for legacy reasons.
var oForm = (document.getElementById(formId) || document.forms[formId]);
}
else if(typeof formId == 'object'){
var oForm = formId;
}
else{
YAHOO.log('Unable to create form object ' + formId, 'warn', 'Connection');
return;
}
// If the isUpload argument is true, setForm will call createFrame to initialize
// an iframe as the form target.
//
// The argument secureURI is also required by IE in SSL environments
// where the secureURI string is a fully qualified HTTP path, used to set the source
// of the iframe, to a stub resource in the same domain.
if(isUpload){
(typeof secureUri == 'string')?this.createFrame(secureUri):this.createFrame();
this._isFormSubmit = true;
this._isFileUpload = true;
this._formNode = oForm;
return;
}
var oElement, oName, oValue, oDisabled;
var hasSubmit = false;
// Iterate over the form elements collection to construct the
// label-value pairs.
for (var i=0; i<oForm.elements.length; i++){
oDisabled = oForm.elements[i].disabled;
// If the name attribute is not populated, the form field's
// value will not be submitted.
oElement = oForm.elements[i];
oName = oForm.elements[i].name;
oValue = oForm.elements[i].value;
// Do not submit fields that are disabled or
// do not have a name attribute value.
if(!oDisabled && oName !== undefined)
{
switch (oElement.type)
{
case 'select-one':
case 'select-multiple':
for(var j=0; j<oElement.options.length; j++){
if(oElement.options[j].selected){
this._sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oElement.options[j].value || oElement.options[j].text) + '&';
}
}
break;
case 'radio':
case 'checkbox':
if(oElement.checked){
this._sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oValue) + '&';
}
break;
case 'file':
// stub case as XMLHttpRequest will only send the file path as a string.
case undefined:
// stub case for fieldset element which returns undefined.
case 'reset':
// stub case for input type reset button.
case 'button':
// stub case for input type button elements.
break;
case 'submit':
if(hasSubmit == false){
this._sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oValue) + '&';
hasSubmit = true;
}
break;
default:
this._sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oValue) + '&';
break;
}
}
}
this._isFormSubmit = true;
this._sFormData = this._sFormData.substr(0, this._sFormData.length - 1);
YAHOO.log('Form initialized for transaction. POST message is: ' + this._sFormData, 'info', 'Connection');
},
/**
* Creates an iframe to be used for form file uploads. It is remove from the
* document upon completion of the upload transaction.
*
* @private
* @param {string} optional qualified path of iframe resource for SSL in IE.
* @return void
*/
createFrame:function(secureUri){
// IE does not allow the setting of id and name attributes as DOM
// properties. A different iframe creation pattern is required for IE.
if(window.ActiveXObject){
var io = document.createElement('<IFRAME name="ioFrame" id="ioFrame">');
if(secureUri){
// IE will throw a security exception in an SSL environment if the
// iframe source isn't set to a valid resource.
io.src = secureUri;
}
}
else{
var io = document.createElement('IFRAME');
io.id = 'ioFrame';
io.name = 'ioFrame';
}
io.style.position = 'absolute';
io.style.top = '-1000px';
io.style.left = '-1000px';
document.body.appendChild(io);
},
/**
* Uploads HTML form, including files/attachments, targeting the
* iframe created in createFrame.
*
* @private
* @param {int} id The transaction id.
* @param {object} callback - User-defined callback object.
* @param {string} uri Fully qualified path of resource.
* @return void
*/
uploadFile:function(id, callback, uri){
// Initialize the HTML form properties in case they are
// not defined in the HTML form.
this._formNode.action = uri;
this._formNode.enctype = 'multipart/form-data';
this._formNode.method = 'POST';
this._formNode.target = 'ioFrame';
this._formNode.submit();
// Reset form status properties.
this._formNode = null;
this._isFileUpload = false;
this._isFormSubmit = false;
// Create the upload callback handler that fires when the iframe
// receives the load event. Subsequently, the event handler is detached
// and the iframe removed from the document.
var uploadCallback = function()
{
var oResponse =
{
tId: id,
responseText: document.getElementById("ioFrame").contentWindow.document.body.innerHTML,
argument: callback.argument
}
if(callback.upload){
if(!callback.scope){
callback.upload(oResponse);
YAHOO.log('Upload callback.', 'info', 'Connection');
}
else{
callback.upload.apply(callback.scope, [oResponse]);
YAHOO.log('Upload callback with object scope.', 'info', 'Connection');
}
}
YAHOO.util.Event.removeListener("ioFrame", "load", uploadCallback);
window.ioFrame.location.replace('#');
setTimeout("document.body.removeChild(document.getElementById('ioFrame'))",100);
};
// Bind the onload handler to the iframe to detect the file upload response.
YAHOO.util.Event.addListener("ioFrame", "load", uploadCallback);
},
/**
* Public method to terminate a transaction, if it has not reached readyState 4.
* @public
* @param {object} o The connection object returned by asyncRequest.
* @param {object} callback User-defined callback object.
* @param {string} isTimeout boolean to indicate if abort was a timeout.
* @return void
*/
abort:function(o, callback, isTimeout)
{
if(this.isCallInProgress(o)){
window.clearInterval(this._poll[o.tId]);
this._poll.splice(o.tId);
if(isTimeout){
this._timeOut.splice(o.tId);
}
o.conn.abort();
this.handleTransactionResponse(o, callback, true);
YAHOO.log('Transaction ' + o.tId + ' aborted.', 'info', 'Connection');
return true;
}
else{
YAHOO.log('Transaction ' + o.tId + ' abort failed.', 'warn', 'Connection');
return false;
}
},
/**
* Public method to check if the transaction is still being processed.
* @public
* @param {object} o The connection object returned by asyncRequest
* @return boolean
*/
isCallInProgress:function(o)
{
// if the XHR object assigned to the transaction has not been dereferenced,
// then check its readyState status. Otherwise, return false.
if(o.conn){
return o.conn.readyState != 4 && o.conn.readyState != 0;
}
else{
//The XHR object has been destroyed.
return false;
}
},
/**
* Dereference the XHR instance and the connection object after the transaction is completed.
* @private
* @param {object} o The connection object
* @return void
*/
releaseObject:function(o)
{
//dereference the XHR instance.
o.conn = null;
YAHOO.log('Connection object for transaction ' + o.tId + ' destroyed.', 'info', 'Connection');
//dereference the connection object.
o = null;
}
};

View File

@ -1,87 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.1
*/
YAHOO.util.Connect={_msxml_progid:['MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'],_http_header:{},_has_http_headers:false,_default_post_header:true,_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:[],_timeOut:[],_polling_interval:50,_transaction_id:0,setProgId:function(id)
{this._msxml_progid.unshift(id);},setDefaultPostHeader:function(b)
{this._default_post_header=b;},setPollingInterval:function(i)
{if(typeof i=='number'&&isFinite(i)){this._polling_interval=i;}},createXhrObject:function(transactionId)
{var obj,http;try
{http=new XMLHttpRequest();obj={conn:http,tId:transactionId};}
catch(e)
{for(var i=0;i<this._msxml_progid.length;++i){try
{http=new ActiveXObject(this._msxml_progid[i]);obj={conn:http,tId:transactionId};break;}
catch(e){}}}
finally
{return obj;}},getConnectionObject:function()
{var o;var tId=this._transaction_id;try
{o=this.createXhrObject(tId);if(o){this._transaction_id++;}}
catch(e){}
finally
{return o;}},asyncRequest:function(method,uri,callback,postData)
{var o=this.getConnectionObject();if(!o){return null;}
else{if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(o.tId,callback,uri);this.releaseObject(o);return;}
if(method=='GET'){uri+="?"+this._sFormData;}
else if(method=='POST'){postData=this._sFormData;}
this._sFormData='';}
o.conn.open(method,uri,true);if(this._isFormSubmit||(postData&&this._default_post_header)){this.initHeader('Content-Type','application/x-www-form-urlencoded');if(this._isFormSubmit){this._isFormSubmit=false;}}
if(this._has_http_headers){this.setHeader(o);}
this.handleReadyState(o,callback);postData?o.conn.send(postData):o.conn.send(null);return o;}},handleReadyState:function(o,callback)
{var timeOut=callback.timeout;var oConn=this;try
{if(timeOut!==undefined){this._timeOut[o.tId]=window.setTimeout(function(){oConn.abort(o,callback,true)},timeOut);}
this._poll[o.tId]=window.setInterval(function(){if(o.conn&&o.conn.readyState==4){window.clearInterval(oConn._poll[o.tId]);oConn._poll.splice(o.tId);if(timeOut){oConn._timeOut.splice(o.tId);}
oConn.handleTransactionResponse(o,callback);}},this._polling_interval);}
catch(e)
{window.clearInterval(oConn._poll[o.tId]);oConn._poll.splice(o.tId);if(timeOut){oConn._timeOut.splice(o.tId);}
oConn.handleTransactionResponse(o,callback);}},handleTransactionResponse:function(o,callback,isAbort)
{if(!callback){this.releaseObject(o);return;}
var httpStatus,responseObject;try
{if(o.conn.status!==undefined&&o.conn.status!=0){httpStatus=o.conn.status;}
else{httpStatus=13030;}}
catch(e){httpStatus=13030;}
if(httpStatus>=200&&httpStatus<300){responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);}
else{callback.success.apply(callback.scope,[responseObject]);}}}
else{switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,isAbort);if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
else{callback.failure.apply(callback.scope,[responseObject]);}}
break;default:responseObject=this.createResponseObject(o,callback.argument);if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
else{callback.failure.apply(callback.scope,[responseObject]);}}}}
this.releaseObject(o);},createResponseObject:function(o,callbackArg)
{var obj={};var headerObj={};try
{var headerStr=o.conn.getAllResponseHeaders();var header=headerStr.split('\n');for(var i=0;i<header.length;i++){var delimitPos=header[i].indexOf(':');if(delimitPos!=-1){headerObj[header[i].substring(0,delimitPos)]=header[i].substring(delimitPos+2);}}}
catch(e){}
obj.tId=o.tId;obj.status=o.conn.status;obj.statusText=o.conn.statusText;obj.getResponseHeader=headerObj;obj.getAllResponseHeaders=headerStr;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof callbackArg!==undefined){obj.argument=callbackArg;}
return obj;},createExceptionObject:function(tId,callbackArg,isAbort)
{var COMM_CODE=0;var COMM_ERROR='communication failure';var ABORT_CODE=-1;var ABORT_ERROR='transaction aborted';var obj={};obj.tId=tId;if(isAbort){obj.status=ABORT_CODE;obj.statusText=ABORT_ERROR;}
else{obj.status=COMM_CODE;obj.statusText=COMM_ERROR;}
if(callbackArg){obj.argument=callbackArg;}
return obj;},initHeader:function(label,value)
{if(this._http_header[label]===undefined){this._http_header[label]=value;}
else{this._http_header[label]=value+","+this._http_header[label];}
this._has_http_headers=true;},setHeader:function(o)
{for(var prop in this._http_header){if(this._http_header.propertyIsEnumerable){o.conn.setRequestHeader(prop,this._http_header[prop]);}}
delete this._http_header;this._http_header={};this._has_http_headers=false;},setForm:function(formId,isUpload,secureUri)
{this._sFormData='';if(typeof formId=='string'){var oForm=(document.getElementById(formId)||document.forms[formId]);}
else if(typeof formId=='object'){var oForm=formId;}
else{return;}
if(isUpload){(typeof secureUri=='string')?this.createFrame(secureUri):this.createFrame();this._isFormSubmit=true;this._isFileUpload=true;this._formNode=oForm;return;}
var oElement,oName,oValue,oDisabled;var hasSubmit=false;for(var i=0;i<oForm.elements.length;i++){oDisabled=oForm.elements[i].disabled;oElement=oForm.elements[i];oName=oForm.elements[i].name;oValue=oForm.elements[i].value;if(!oDisabled&&oName)
{switch(oElement.type)
{case'select-one':case'select-multiple':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oElement.options[j].value||oElement.options[j].text)+'&';}}
break;case'radio':case'checkbox':if(oElement.checked){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';}
break;case'file':case undefined:case'reset':case'button':break;case'submit':if(hasSubmit==false){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';hasSubmit=true;}
break;default:this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';break;}}}
this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);},createFrame:function(secureUri){if(window.ActiveXObject){var io=document.createElement('<IFRAME name="ioFrame" id="ioFrame">');if(secureUri){io.src=secureUri;}}
else{var io=document.createElement('IFRAME');io.id='ioFrame';io.name='ioFrame';}
io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';document.body.appendChild(io);},uploadFile:function(id,callback,uri){this._formNode.action=uri;this._formNode.enctype='multipart/form-data';this._formNode.method='POST';this._formNode.target='ioFrame';this._formNode.submit();this._formNode=null;this._isFileUpload=false;this._isFormSubmit=false;var uploadCallback=function()
{var oResponse={tId:id,responseText:document.getElementById("ioFrame").contentWindow.document.body.innerHTML,argument:callback.argument}
if(callback.upload){if(!callback.scope){callback.upload(oResponse);}
else{callback.upload.apply(callback.scope,[oResponse]);}}
YAHOO.util.Event.removeListener("ioFrame","load",uploadCallback);window.ioFrame.location.replace('#');setTimeout("document.body.removeChild(document.getElementById('ioFrame'))",100);};YAHOO.util.Event.addListener("ioFrame","load",uploadCallback);},abort:function(o,callback,isTimeout)
{if(this.isCallInProgress(o)){window.clearInterval(this._poll[o.tId]);this._poll.splice(o.tId);if(isTimeout){this._timeOut.splice(o.tId);}
o.conn.abort();this.handleTransactionResponse(o,callback,true);return true;}
else{return false;}},isCallInProgress:function(o)
{if(o.conn){return o.conn.readyState!=4&&o.conn.readyState!=0;}
else{return false;}},releaseObject:function(o)
{o.conn=null;o=null;}};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 971 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 B

View File

@ -1,210 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
Version 0.11.0
*/
.overlay {
position:absolute;
display:block;
}
.tt {
visibility:hidden;
position:absolute;
color:#333;
background-color:#FDFFB4;
font-family:arial,helvetica,verdana,sans-serif;
padding:2px;
border:1px solid #FCC90D;
font:100% sans-serif;
width:auto;
}
* html body.masked select {
visibility:hidden;
}
* html div.panel-container select {
visibility:inherit;
}
* html div.drag select {
visibility:hidden;
}
* html div.hide-select select {
visibility:hidden;
}
.mask {
z-index:0;
display:none;
position:absolute;
top:0;
left:0;
-moz-opacity: 0.5;
opacity:.50;
filter: alpha(opacity=50);
background-color:#CCC;
}
.hide-scrollbars * {
overflow:hidden;
}
.hide-scrollbars textarea, .hide-scrollbars select {
overflow:hidden;
display:none;
}
.show-scrollbars textarea, .show-scrollbars select {
overflow:visible;
}
.panel-container {
position:absolute;
background-color:transparent;
z-index:6;
visibility:hidden;
overflow:visible;
width:auto;
}
.panel-container.matte {
padding:3px;
background-color:#FFF;
}
.panel-container.matte .underlay {
display:none;
}
.panel-container.shadow {
padding:0px;
background-color:transparent;
}
.panel-container.shadow .underlay {
visibility:inherit;
position:absolute;
background-color:#CCC;
top:3px;left:3px;
z-index:0;
width:100%;
height:100%;
-moz-opacity: 0.7;
opacity:.70;
filter:alpha(opacity=70);
}
.panel {
visibility:hidden;
border-collapse:separate;
position:relative;
left:0px;top:0px;
font:1em Arial;
background-color:#FFF;
border:1px solid #000;
z-index:1;
overflow:auto;
}
.panel .hd {
background-color:#3d77cb;
color:#FFF;
font-size:100%;
line-height:100%;
border:1px solid #FFF;
border-bottom:1px solid #000;
font-weight:bold;
overflow:hidden;
padding:4px;
}
.panel .bd {
overflow:hidden;
padding:4px;
}
.panel .bd p {
margin:0 0 1em;
}
.panel .close {
position:absolute;
top:5px;
right:4px;
z-index:6;
height:12px;
width:12px;
margin:0px;
padding:0px;
background-repeat:no-repeat;
cursor:pointer;
visibility:inherit;
}
.panel .close.nonsecure {
background-image:url(http://us.i1.yimg.com/us.yimg.com/i/nt/ic/ut/alt3/close12_1.gif);
}
.panel .close.secure {
background-image:url(https://a248.e.akamai.net/sec.yimg.com/i/nt/ic/ut/alt3/close12_1.gif);
}
.panel .ft {
padding:4px;
overflow:hidden;
}
.simple-dialog .bd .icon {
background-repeat:no-repeat;
width:16px;
height:16px;
margin-right:10px;
float:left;
}
.dialog .ft, .simple-dialog .ft {
padding-bottom:5px;
padding-right:5px;
text-align:right;
}
.dialog form, .simple-dialog form {
margin:0;
}
.button-group button {
font:100 76% verdana;
text-decoration:none;
background-color: #E4E4E4;
color: #333;
cursor: hand;
vertical-align: middle;
border: 2px solid #797979;
border-top-color:#FFF;
border-left-color:#FFF;
margin:2px;
padding:2px;
}
.button-group button.default {
font-weight:bold;
}
.button-group button:hover, .button-group button.hover {
border:2px solid #90A029;
background-color:#EBF09E;
border-top-color:#FFF;
border-left-color:#FFF;
}
.button-group button:active {
border:2px solid #E4E4E4;
background-color:#BBB;
border-top-color:#333;
border-left-color:#333;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 B

View File

@ -1,292 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
Version 0.11.1
*/
YAHOO.util.Config=function(owner){if(owner){this.init(owner);}}
YAHOO.util.Config.prototype={owner:null,configChangedEvent:null,queueInProgress:false,addProperty:function(key,propertyObject){},getConfig:function(){},getProperty:function(key){},resetProperty:function(key){},setProperty:function(key,value,silent){},queueProperty:function(key,value){},refireEvent:function(key){},applyConfig:function(userConfig,init){},refresh:function(){},fireQueue:function(){},subscribeToConfigEvent:function(key,handler,obj,override){},unsubscribeFromConfigEvent:function(key,handler,obj){},checkBoolean:function(val){if(typeof val=='boolean'){return true;}else{return false;}},checkNumber:function(val){if(isNaN(val)){return false;}else{return true;}}}
YAHOO.util.Config.prototype.init=function(owner){this.owner=owner;this.configChangedEvent=new YAHOO.util.CustomEvent("configChanged");this.queueInProgress=false;var config={};var initialConfig={};var eventQueue=[];var fireEvent=function(key,value){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){property.event.fire(value);}}
this.addProperty=function(key,propertyObject){key=key.toLowerCase();config[key]=propertyObject;propertyObject.event=new YAHOO.util.CustomEvent(key);propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner,true);}
this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}}
this.getConfig=function(){var cfg={};for(var prop in config){var property=config[prop]
if(typeof property!='undefined'&&property.event){cfg[prop]=property.value;}}
return cfg;}
this.getProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){return property.value;}else{return undefined;}}
this.resetProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){this.setProperty(key,initialConfig[key].value);}else{return undefined;}}
this.setProperty=function(key,value,silent){key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{var property=config[key];if(typeof property!='undefined'&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){fireEvent(key,value);this.configChangedEvent.fire([key,value]);}
return true;}}else{return false;}}}
this.queueProperty=function(key,value){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){if(typeof value!='undefined'&&property.validator&&!property.validator(value)){return false;}else{if(typeof value!='undefined'){property.value=value;}else{value=property.value;}
var foundDuplicate=false;for(var i=0;i<eventQueue.length;i++){var queueItem=eventQueue[i];if(queueItem){var queueItemKey=queueItem[0];var queueItemValue=queueItem[1];if(queueItemKey.toLowerCase()==key){eventQueue[i]=null;eventQueue.push([key,(typeof value!='undefined'?value:queueItemValue)]);foundDuplicate=true;break;}}}
if(!foundDuplicate&&typeof value!='undefined'){eventQueue.push([key,value]);}}
if(property.supercedes){for(var s=0;s<property.supercedes.length;s++){var supercedesCheck=property.supercedes[s];for(var q=0;q<eventQueue.length;q++){var queueItemCheck=eventQueue[q];if(queueItemCheck){var queueItemCheckKey=queueItemCheck[0];var queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey.toLowerCase()==supercedesCheck.toLowerCase()){eventQueue.push([queueItemCheckKey,queueItemCheckValue]);eventQueue[q]=null;break;}}}}}
return true;}else{return false;}}
this.refireEvent=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event&&typeof property.value!='undefined'){if(this.queueInProgress){this.queueProperty(key);}else{fireEvent(key,property.value);}}}
this.applyConfig=function(userConfig,init){if(init){initialConfig=userConfig;}
for(var prop in userConfig){this.queueProperty(prop,userConfig[prop]);}}
this.refresh=function(){for(var prop in config){this.refireEvent(prop);}}
this.fireQueue=function(){this.queueInProgress=true;for(var i=0;i<eventQueue.length;i++){var queueItem=eventQueue[i];if(queueItem){var key=queueItem[0];var value=queueItem[1];var property=config[key];property.value=value;fireEvent(key,value);}}
this.queueInProgress=false;eventQueue=new Array();}
this.subscribeToConfigEvent=function(key,handler,obj,override){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){if(!YAHOO.util.Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override);}
return true;}else{return false;}}
this.unsubscribeFromConfigEvent=function(key,handler,obj){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){return property.event.unsubscribe(handler,obj);}else{return false;}}
this.toString=function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]";}
return output;}
this.outputEventQueue=function(){var output="";for(var q=0;q<eventQueue.length;q++){var queueItem=eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", ";}}
return output;}}
YAHOO.util.Config.alreadySubscribed=function(evt,fn,obj){for(var e=0;e<evt.subscribers.length;e++){var subsc=evt.subscribers[e];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true;break;}}
return false;}
YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig);}}
YAHOO.widget.Module.IMG_ROOT="http://us.i1.yimg.com/us.yimg.com/i/";YAHOO.widget.Module.IMG_ROOT_SSL="https://a248.e.akamai.net/sec.yimg.com/i/";YAHOO.widget.Module.CSS_MODULE="module";YAHOO.widget.Module.CSS_HEADER="hd";YAHOO.widget.Module.CSS_BODY="bd";YAHOO.widget.Module.CSS_FOOTER="ft";YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL=null;YAHOO.widget.Module.prototype={constructor:YAHOO.widget.Module,element:null,header:null,body:null,footer:null,id:null,childNodesInDOM:null,imageRoot:YAHOO.widget.Module.IMG_ROOT,beforeInitEvent:null,initEvent:null,appendEvent:null,beforeRenderEvent:null,renderEvent:null,changeHeaderEvent:null,changeBodyEvent:null,changeFooterEvent:null,changeContentEvent:null,destroyEvent:null,beforeShowEvent:null,showEvent:null,beforeHideEvent:null,hideEvent:null,initEvents:function(){this.beforeInitEvent=new YAHOO.util.CustomEvent("beforeInit");this.initEvent=new YAHOO.util.CustomEvent("init");this.appendEvent=new YAHOO.util.CustomEvent("append");this.beforeRenderEvent=new YAHOO.util.CustomEvent("beforeRender");this.renderEvent=new YAHOO.util.CustomEvent("render");this.changeHeaderEvent=new YAHOO.util.CustomEvent("changeHeader");this.changeBodyEvent=new YAHOO.util.CustomEvent("changeBody");this.changeFooterEvent=new YAHOO.util.CustomEvent("changeFooter");this.changeContentEvent=new YAHOO.util.CustomEvent("changeContent");this.destroyEvent=new YAHOO.util.CustomEvent("destroy");this.beforeShowEvent=new YAHOO.util.CustomEvent("beforeShow");this.showEvent=new YAHOO.util.CustomEvent("show");this.beforeHideEvent=new YAHOO.util.CustomEvent("beforeHide");this.hideEvent=new YAHOO.util.CustomEvent("hide");},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows";}else if(ua.indexOf("macintosh")!=-1){return"mac";}else{return false;}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera';}else if(ua.indexOf('msie 7')!=-1){return'ie7';}else if(ua.indexOf('msie')!=-1){return'ie';}else if(ua.indexOf('safari')!=-1){return'safari';}else if(ua.indexOf('gecko')!=-1){return'gecko';}else{return false;}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")==0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty("visible",{value:true,handler:this.configVisible,validator:this.cfg.checkBoolean});this.cfg.addProperty("effect",{suppressEvent:true,supercedes:["visible"]});this.cfg.addProperty("monitorresize",{value:true,handler:this.configMonitorResize});},init:function(el,userConfig){this.initEvents();this.beforeInitEvent.fire(YAHOO.widget.Module);this.cfg=new YAHOO.util.Config(this);if(this.isSecure){this.imageRoot=YAHOO.widget.Module.IMG_ROOT_SSL;}
if(typeof el=="string"){var elId=el;el=document.getElementById(el);if(!el){el=document.createElement("DIV");el.id=elId;}}
this.element=el;if(el.id){this.id=el.id;}
var childNodes=this.element.childNodes;if(childNodes){for(var i=0;i<childNodes.length;i++){var child=childNodes[i];switch(child.className){case YAHOO.widget.Module.CSS_HEADER:this.header=child;break;case YAHOO.widget.Module.CSS_BODY:this.body=child;break;case YAHOO.widget.Module.CSS_FOOTER:this.footer=child;break;}}}
this.initDefaultConfig();YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true);}
if(!YAHOO.util.Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}
this.initEvent.fire(YAHOO.widget.Module);},initResizeMonitor:function(){if(this.browser!="opera"){var resizeMonitor=document.getElementById("_yuiResizeMonitor");if(!resizeMonitor){resizeMonitor=document.createElement("iframe");var bIE=(this.browser.indexOf("ie")===0);if(this.isSecure&&this.RESIZE_MONITOR_SECURE_URL&&bIE){resizeMonitor.src=this.RESIZE_MONITOR_SECURE_URL;}
resizeMonitor.id="_yuiResizeMonitor";resizeMonitor.style.visibility="hidden";document.body.appendChild(resizeMonitor);resizeMonitor.style.width="10em";resizeMonitor.style.height="10em";resizeMonitor.style.position="absolute";var nLeft=-1*resizeMonitor.offsetWidth,nTop=-1*resizeMonitor.offsetHeight;resizeMonitor.style.top=nTop+"px";resizeMonitor.style.left=nLeft+"px";resizeMonitor.style.borderStyle="none";resizeMonitor.style.borderWidth="0";YAHOO.util.Dom.setStyle(resizeMonitor,"opacity","0");resizeMonitor.style.visibility="visible";if(!bIE){var doc=resizeMonitor.contentWindow.document;doc.open();doc.close();}}
if(resizeMonitor&&resizeMonitor.contentWindow){this.resizeMonitor=resizeMonitor;YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow,"resize",this.onDomResize,this,true);}}},onDomResize:function(e,obj){var nLeft=-1*this.resizeMonitor.offsetWidth,nTop=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left=nLeft+"px";},setHeader:function(headerContent){if(!this.header){this.header=document.createElement("DIV");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
if(typeof headerContent=="string"){this.header.innerHTML=headerContent;}else{this.header.innerHTML="";this.header.appendChild(headerContent);}
this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire();},appendToHeader:function(element){if(!this.header){this.header=document.createElement("DIV");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
this.header.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire();},setBody:function(bodyContent){if(!this.body){this.body=document.createElement("DIV");this.body.className=YAHOO.widget.Module.CSS_BODY;}
if(typeof bodyContent=="string")
{this.body.innerHTML=bodyContent;}else{this.body.innerHTML="";this.body.appendChild(bodyContent);}
this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire();},appendToBody:function(element){if(!this.body){this.body=document.createElement("DIV");this.body.className=YAHOO.widget.Module.CSS_BODY;}
this.body.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire();},setFooter:function(footerContent){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
if(typeof footerContent=="string"){this.footer.innerHTML=footerContent;}else{this.footer.innerHTML="";this.footer.appendChild(footerContent);}
this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire();},appendToFooter:function(element){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
this.footer.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire();},render:function(appendToNode,moduleElement){this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element;}
var me=this;var appendTo=function(element){if(typeof element=="string"){element=document.getElementById(element);}
if(element){element.appendChild(me.element);me.appendEvent.fire();}}
if(appendToNode){appendTo(appendToNode);}else{if(!YAHOO.util.Dom.inDocument(this.element)){return false;}}
if(this.header&&!YAHOO.util.Dom.inDocument(this.header)){var firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild);}else{moduleElement.appendChild(this.header);}}
if(this.body&&!YAHOO.util.Dom.inDocument(this.body)){if(this.footer&&YAHOO.util.Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer);}else{moduleElement.appendChild(this.body);}}
if(this.footer&&!YAHOO.util.Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer);}
this.renderEvent.fire();return true;},destroy:function(){if(this.element){var parent=this.element.parentNode;}
if(parent){parent.removeChild(this.element);}
this.element=null;this.header=null;this.body=null;this.footer=null;this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor();}else{YAHOO.util.Event.removeListener(this.resizeMonitor,"resize",this.onDomResize);this.resizeMonitor=null;}}}
YAHOO.widget.Module.prototype.toString=function(){return"Module "+this.id;}
YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig);}
YAHOO.extend(YAHOO.widget.Overlay,YAHOO.widget.Module);YAHOO.widget.Overlay.IFRAME_SRC="promo/m/irs/blank.gif";YAHOO.widget.Overlay.TOP_LEFT="tl";YAHOO.widget.Overlay.TOP_RIGHT="tr";YAHOO.widget.Overlay.BOTTOM_LEFT="bl";YAHOO.widget.Overlay.BOTTOM_RIGHT="br";YAHOO.widget.Overlay.CSS_OVERLAY="overlay";YAHOO.widget.Overlay.prototype.beforeMoveEvent=null;YAHOO.widget.Overlay.prototype.moveEvent=null;YAHOO.widget.Overlay.prototype.init=function(el,userConfig){YAHOO.widget.Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Overlay);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true);}
if(this.platform=="mac"&&this.browser=="gecko"){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}
this.initEvent.fire(YAHOO.widget.Overlay);}
YAHOO.widget.Overlay.prototype.initEvents=function(){YAHOO.widget.Overlay.superclass.initEvents.call(this);this.beforeMoveEvent=new YAHOO.util.CustomEvent("beforeMove",this);this.moveEvent=new YAHOO.util.CustomEvent("move",this);}
YAHOO.widget.Overlay.prototype.initDefaultConfig=function(){YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);this.cfg.addProperty("x",{handler:this.configX,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("y",{handler:this.configY,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("xy",{handler:this.configXY,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("context",{handler:this.configContext,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("fixedcenter",{value:false,handler:this.configFixedCenter,validator:this.cfg.checkBoolean,supercedes:["iframe","visible"]});this.cfg.addProperty("width",{handler:this.configWidth,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("height",{handler:this.configHeight,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("zIndex",{value:null,handler:this.configzIndex});this.cfg.addProperty("constraintoviewport",{value:false,handler:this.configConstrainToViewport,validator:this.cfg.checkBoolean,supercedes:["iframe","x","y","xy"]});this.cfg.addProperty("iframe",{value:(this.browser=="ie"?true:false),handler:this.configIframe,validator:this.cfg.checkBoolean,supercedes:["zIndex"]});}
YAHOO.widget.Overlay.prototype.moveTo=function(x,y){this.cfg.setProperty("xy",[x,y]);}
YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"show-scrollbars");YAHOO.util.Dom.addClass(this.element,"hide-scrollbars");}
YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"hide-scrollbars");YAHOO.util.Dom.addClass(this.element,"show-scrollbars");}
YAHOO.widget.Overlay.prototype.configVisible=function(type,args,obj){var visible=args[0];var currentVis=YAHOO.util.Dom.getStyle(this.element,"visibility");var effect=this.cfg.getProperty("effect");var effectInstances=new Array();if(effect){if(effect instanceof Array){for(var i=0;i<effect.length;i++){var eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration);}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration);}}
var isMacGecko=(this.platform=="mac"&&this.browser=="gecko");if(visible){if(isMacGecko){this.showMacGeckoScrollbars();}
if(effect){if(visible){if(currentVis!="visible"){this.beforeShowEvent.fire();for(var i=0;i<effectInstances.length;i++){var e=effectInstances[i];if(i==0&&!YAHOO.util.Config.alreadySubscribed(e.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){e.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}
e.animateIn();}}}}else{if(currentVis!="visible"){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(isMacGecko){this.hideMacGeckoScrollbars();}
if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();for(var i=0;i<effectInstances.length;i++){var e=effectInstances[i];if(i==0&&!YAHOO.util.Config.alreadySubscribed(e.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){e.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}
e.animateOut();}}}else{if(currentVis=="visible"){this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","hidden");this.cfg.refireEvent("iframe");this.hideEvent.fire();}}}}
YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent=function(){if(this.cfg.getProperty("visible")){this.center();}}
YAHOO.widget.Overlay.prototype.configFixedCenter=function(type,args,obj){var val=args[0];if(val){this.center();if(!YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true);}}else{YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);}}
YAHOO.widget.Overlay.prototype.configHeight=function(type,args,obj){var height=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");}
YAHOO.widget.Overlay.prototype.configWidth=function(type,args,obj){var width=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");}
YAHOO.widget.Overlay.prototype.configzIndex=function(type,args,obj){var zIndex=args[0];var el=this.element;if(!zIndex){zIndex=YAHOO.util.Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0;}}
if(this.iframe){if(zIndex<=0){zIndex=1;}
YAHOO.util.Dom.setStyle(this.iframe,"zIndex",(zIndex-1));}
YAHOO.util.Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);}
YAHOO.widget.Overlay.prototype.configXY=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);}
YAHOO.widget.Overlay.prototype.configX=function(type,args,obj){var x=args[0];var y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);}
YAHOO.widget.Overlay.prototype.configY=function(type,args,obj){var x=this.cfg.getProperty("x");var y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);}
YAHOO.widget.Overlay.prototype.configIframe=function(type,args,obj){var val=args[0];var el=this.element;var showIframe=function(){if(this.iframe){this.iframe.style.display="block";}}
var hideIframe=function(){if(this.iframe){this.iframe.style.display="none";}}
if(val){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,showIframe,this)){this.showEvent.subscribe(showIframe,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,hideIframe,this)){this.hideEvent.subscribe(hideIframe,this,true);}
var x=this.cfg.getProperty("x");var y=this.cfg.getProperty("y");if(!x||!y){this.syncPosition();x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");}
if(!isNaN(x)&&!isNaN(y)){if(!this.iframe){this.iframe=document.createElement("iframe");if(this.isSecure){this.iframe.src=this.imageRoot+YAHOO.widget.Overlay.IFRAME_SRC;}
var parent=el.parentNode;if(parent){parent.appendChild(this.iframe);}else{document.body.appendChild(this.iframe);}
YAHOO.util.Dom.setStyle(this.iframe,"position","absolute");YAHOO.util.Dom.setStyle(this.iframe,"border","none");YAHOO.util.Dom.setStyle(this.iframe,"margin","0");YAHOO.util.Dom.setStyle(this.iframe,"padding","0");YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(this.cfg.getProperty("visible")){showIframe.call(this);}else{hideIframe.call(this);}}
var iframeDisplay=YAHOO.util.Dom.getStyle(this.iframe,"display");if(iframeDisplay=="none"){this.iframe.style.display="block";}
YAHOO.util.Dom.setXY(this.iframe,[x,y]);var width=el.clientWidth;var height=el.clientHeight;YAHOO.util.Dom.setStyle(this.iframe,"width",(width+2)+"px");YAHOO.util.Dom.setStyle(this.iframe,"height",(height+2)+"px");if(iframeDisplay=="none"){this.iframe.style.display="none";}}}else{if(this.iframe){this.iframe.style.display="none";}
this.showEvent.unsubscribe(showIframe,this);this.hideEvent.unsubscribe(hideIframe,this);}}
YAHOO.widget.Overlay.prototype.configConstrainToViewport=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}}
YAHOO.widget.Overlay.prototype.configContext=function(type,args,obj){var contextArgs=args[0];if(contextArgs){var contextEl=contextArgs[0];var elementMagnetCorner=contextArgs[1];var contextMagnetCorner=contextArgs[2];if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner],true);}
if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner);}}}}
YAHOO.widget.Overlay.prototype.align=function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context");if(contextArgs){var context=contextArgs[0];var element=this.element;var me=this;if(!elementAlign){elementAlign=contextArgs[1];}
if(!contextAlign){contextAlign=contextArgs[2];}
if(element&&context){var elementRegion=YAHOO.util.Dom.getRegion(element);var contextRegion=YAHOO.util.Dom.getRegion(context);var doAlign=function(v,h){switch(elementAlign){case YAHOO.widget.Overlay.TOP_LEFT:me.moveTo(h,v);break;case YAHOO.widget.Overlay.TOP_RIGHT:me.moveTo(h-element.offsetWidth,v);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:me.moveTo(h,v-element.offsetHeight);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:me.moveTo(h-element.offsetWidth,v-element.offsetHeight);break;}}
switch(contextAlign){case YAHOO.widget.Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case YAHOO.widget.Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break;}}}}
YAHOO.widget.Overlay.prototype.enforceConstraints=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];var width=parseInt(this.cfg.getProperty("width"));if(isNaN(width)){width=0;}
var offsetHeight=this.element.offsetHeight;var offsetWidth=(width>0?width:this.element.offsetWidth);var viewPortWidth=YAHOO.util.Dom.getViewportWidth();var viewPortHeight=YAHOO.util.Dom.getViewportHeight();var scrollX=window.scrollX||document.documentElement.scrollLeft;var scrollY=window.scrollY||document.documentElement.scrollTop;var topConstraint=scrollY+10;var leftConstraint=scrollX+10;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-10;var rightConstraint=scrollX+viewPortWidth-offsetWidth-10;if(x<leftConstraint){x=leftConstraint;}else if(x>rightConstraint){x=rightConstraint;}
if(y<topConstraint){y=topConstraint;}else if(y>bottomConstraint){y=bottomConstraint;}
this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.cfg.setProperty("xy",[x,y],true);}
YAHOO.widget.Overlay.prototype.center=function(){var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var viewPortWidth=YAHOO.util.Dom.getClientWidth();var viewPortHeight=YAHOO.util.Dom.getClientHeight();var elementWidth=this.element.offsetWidth;var elementHeight=this.element.offsetHeight;var x=(viewPortWidth/2)-(elementWidth/2)+scrollX;var y=(viewPortHeight/2)-(elementHeight/2)+scrollY;this.element.style.left=parseInt(x)+"px";this.element.style.top=parseInt(y)+"px";this.syncPosition();this.cfg.refireEvent("iframe");}
YAHOO.widget.Overlay.prototype.syncPosition=function(){var pos=YAHOO.util.Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true);}
YAHOO.widget.Overlay.prototype.onDomResize=function(e,obj){YAHOO.widget.Overlay.superclass.onDomResize.call(this,e,obj);this.cfg.refireEvent("iframe");}
YAHOO.widget.Overlay.prototype.destroy=function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}
this.iframe=null;YAHOO.widget.Overlay.superclass.destroy.call(this);};YAHOO.widget.Overlay.prototype.toString=function(){return"Overlay "+this.id;}
YAHOO.widget.Overlay.windowScrollEvent=new YAHOO.util.CustomEvent("windowScroll");YAHOO.widget.Overlay.windowResizeEvent=new YAHOO.util.CustomEvent("windowResize");YAHOO.widget.Overlay.windowScrollHandler=function(e){YAHOO.widget.Overlay.windowScrollEvent.fire();}
YAHOO.widget.Overlay.windowResizeHandler=function(e){YAHOO.widget.Overlay.windowResizeEvent.fire();}
YAHOO.widget.Overlay._initialized==null;if(YAHOO.widget.Overlay._initialized==null){YAHOO.util.Event.addListener(window,"scroll",YAHOO.widget.Overlay.windowScrollHandler);YAHOO.util.Event.addListener(window,"resize",YAHOO.widget.Overlay.windowResizeHandler);YAHOO.widget.Overlay._initialized=true;}
YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig);}
YAHOO.widget.OverlayManager.CSS_FOCUSED="focused";YAHOO.widget.OverlayManager.prototype={constructor:YAHOO.widget.OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},getActive:function(){},focus:function(overlay){},remove:function(overlay){},blurAll:function(){},init:function(userConfig){this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay;}
this.focus=function(overlay){var o=this.find(overlay);if(o){this.blurAll();activeOverlay=o;YAHOO.util.Dom.addClass(activeOverlay.element,YAHOO.widget.OverlayManager.CSS_FOCUSED);this.overlays.sort(this.compareZIndexDesc);var topZIndex=YAHOO.util.Dom.getStyle(this.overlays[0].element,"zIndex");if(!isNaN(topZIndex)&&this.overlays[0]!=overlay){activeOverlay.cfg.setProperty("zIndex",(parseInt(topZIndex)+1));}
this.overlays.sort(this.compareZIndexDesc);}}
this.remove=function(overlay){var o=this.find(overlay);if(o){var originalZ=YAHOO.util.Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true);this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,this.overlays.length-1);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null);o.focusEvent=null
o.blurEvent=null;o.focus=null;o.blur=null;}}
this.blurAll=function(){activeOverlay=null;for(var o=0;o<this.overlays.length;o++){YAHOO.util.Dom.removeClass(this.overlays[o].element,YAHOO.widget.OverlayManager.CSS_FOCUSED);}}
var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=new Array();}
if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc);}},register:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){overlay.cfg.addProperty("manager",{value:this});overlay.focusEvent=new YAHOO.util.CustomEvent("focus");overlay.blurEvent=new YAHOO.util.CustomEvent("blur");var mgr=this;overlay.focus=function(){mgr.focus(this);this.focusEvent.fire();}
overlay.blur=function(){mgr.blurAll();this.blurEvent.fire();}
var focusOnDomEvent=function(e,obj){overlay.focus();}
var focusevent=this.cfg.getProperty("focusevent");YAHOO.util.Event.addListener(overlay.element,focusevent,focusOnDomEvent,this,true);var zIndex=YAHOO.util.Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex));}else{overlay.cfg.setProperty("zIndex",0);}
this.overlays.push(overlay);return true;}else if(overlay instanceof Array){var regcount=0;for(var i=0;i<overlay.length;i++){if(this.register(overlay[i])){regcount++;}}
if(regcount>0){return true;}}else{return false;}},find:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){for(var o=0;o<this.overlays.length;o++){if(this.overlays[o]==overlay){return this.overlays[o];}}}else if(typeof overlay=="string"){for(var o=0;o<this.overlays.length;o++){if(this.overlays[o].id==overlay){return this.overlays[o];}}}
return null;},compareZIndexDesc:function(o1,o2){var zIndex1=o1.cfg.getProperty("zIndex");var zIndex2=o2.cfg.getProperty("zIndex");if(zIndex1>zIndex2){return-1;}else if(zIndex1<zIndex2){return 1;}else{return 0;}},showAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].show();}},hideAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].hide();}},toString:function(){return"OverlayManager";}}
YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
function handleKeyPress(e,obj){var keyPressed=e.charCode||e.keyCode;if(!keyData.shift)keyData.shift=false;if(!keyData.alt)keyData.alt=false;if(!keyData.ctrl)keyData.ctrl=false;if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){if(keyPressed==keyData.keys[i]){keyEvent.fire(keyPressed,e);break;}}}else{if(keyPressed==keyData.keys){keyEvent.fire(keyPressed,e);}}}}
this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
this.enabled=true;}
this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
this.enabled=false;}
this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+(attachTo.id?"["+attachTo.id+"]":"");}}
YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.prototype.enabled=null;YAHOO.util.KeyListener.prototype.enable=function(){};YAHOO.util.KeyListener.prototype.disable=function(){};YAHOO.util.KeyListener.prototype.enabledEvent=null;YAHOO.util.KeyListener.prototype.disabledEvent=null;YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig);}
YAHOO.extend(YAHOO.widget.Tooltip,YAHOO.widget.Overlay);YAHOO.widget.Tooltip.CSS_TOOLTIP="tt";YAHOO.widget.Tooltip.prototype.init=function(el,userConfig){if(document.readyState&&document.readyState!="complete"){var deferredInit=function(){this.init(el,userConfig);}
YAHOO.util.Event.addListener(window,"load",deferredInit,this,true);}else{YAHOO.widget.Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Tooltip);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.render(this.cfg.getProperty("container"));this.initEvent.fire(YAHOO.widget.Tooltip);}}
YAHOO.widget.Tooltip.prototype.initDefaultConfig=function(){YAHOO.widget.Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty("preventoverlap",{value:true,validator:this.cfg.checkBoolean,supercedes:["x","y","xy"]});this.cfg.addProperty("showdelay",{value:200,handler:this.configShowDelay,validator:this.cfg.checkNumber});this.cfg.addProperty("autodismissdelay",{value:5000,handler:this.configAutoDismissDelay,validator:this.cfg.checkNumber});this.cfg.addProperty("hidedelay",{value:250,handler:this.configHideDelay,validator:this.cfg.checkNumber});this.cfg.addProperty("text",{handler:this.configText,suppressEvent:true});this.cfg.addProperty("container",{value:document.body,handler:this.configContainer});}
YAHOO.widget.Tooltip.prototype.configText=function(type,args,obj){var text=args[0];if(text){this.setBody(text);}}
YAHOO.widget.Tooltip.prototype.configContainer=function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true);}}
YAHOO.widget.Tooltip.prototype.configContext=function(type,args,obj){var context=args[0];if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true);}else{this.cfg.setProperty("context",[context],true);}
context=this.cfg.getProperty("context");}
if(this._context){for(var c=0;c<this._context.length;++c){var el=this._context[c];YAHOO.util.Event.removeListener(el,"mouseover",this.onContextMouseOver);YAHOO.util.Event.removeListener(el,"mousemove",this.onContextMouseMove);YAHOO.util.Event.removeListener(el,"mouseout",this.onContextMouseOut);}}
this._context=context;for(var c=0;c<this._context.length;++c){var el=this._context[c];YAHOO.util.Event.addListener(el,"mouseover",this.onContextMouseOver,this);YAHOO.util.Event.addListener(el,"mousemove",this.onContextMouseMove,this);YAHOO.util.Event.addListener(el,"mouseout",this.onContextMouseOut,this);}}}
YAHOO.widget.Tooltip.prototype.onContextMouseMove=function(e,obj){obj.pageX=YAHOO.util.Event.getPageX(e);obj.pageY=YAHOO.util.Event.getPageY(e);}
YAHOO.widget.Tooltip.prototype.onContextMouseOver=function(e,obj){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null;}
var context=this;YAHOO.util.Event.addListener(context,"mousemove",obj.onContextMouseMove,obj);if(context.title){obj._tempTitle=context.title;context.title="";}
obj.showProcId=obj.doShow(e,context);}
YAHOO.widget.Tooltip.prototype.onContextMouseOut=function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null;}
if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null;}
if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null;}
obj.hideProcId=setTimeout(function(){obj.hide();},obj.cfg.getProperty("hidedelay"));}
YAHOO.widget.Tooltip.prototype.doShow=function(e,context){var yOffset=25;if(this.browser=="opera"&&context.tagName=="A"){yOffset+=12;}
var me=this;return setTimeout(function(){if(me._tempTitle){me.setBody(me._tempTitle);}else{me.cfg.refireEvent("text");}
me.moveTo(me.pageX,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY);}
YAHOO.util.Event.removeListener(context,"mousemove",me.onContextMouseMove);me.show();me.hideProcId=me.doHide();},this.cfg.getProperty("showdelay"));}
YAHOO.widget.Tooltip.prototype.doHide=function(){var me=this;return setTimeout(function(){me.hide();},this.cfg.getProperty("autodismissdelay"));}
YAHOO.widget.Tooltip.prototype.preventOverlap=function(pageX,pageY){var height=this.element.offsetHeight;var elementRegion=YAHOO.util.Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;var mousePoint=new YAHOO.util.Point(pageX,pageY);if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5))}}
YAHOO.widget.Tooltip.prototype.toString=function(){return"Tooltip "+this.id;}
YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig);}
YAHOO.extend(YAHOO.widget.Panel,YAHOO.widget.Overlay);YAHOO.widget.Panel.CSS_PANEL="panel";YAHOO.widget.Panel.CSS_PANEL_CONTAINER="panel-container";YAHOO.widget.Panel.prototype.showMaskEvent=null;YAHOO.widget.Panel.prototype.hideMaskEvent=null;YAHOO.widget.Panel.prototype.init=function(el,userConfig){YAHOO.widget.Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Panel);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.beforeRenderEvent.subscribe(function(){var draggable=this.cfg.getProperty("draggable");if(draggable){if(!this.header){this.setHeader("&nbsp;");}}},this,true);this.initEvent.fire(YAHOO.widget.Panel);}
YAHOO.widget.Panel.prototype.initEvents=function(){YAHOO.widget.Panel.superclass.initEvents.call(this);this.showMaskEvent=new YAHOO.util.CustomEvent("showMask");this.hideMaskEvent=new YAHOO.util.CustomEvent("hideMask");this.dragEvent=new YAHOO.util.CustomEvent("drag");}
YAHOO.widget.Panel.prototype.initDefaultConfig=function(){YAHOO.widget.Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty("close",{value:true,handler:this.configClose,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("draggable",{value:true,handler:this.configDraggable,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("underlay",{value:"shadow",handler:this.configUnderlay,supercedes:["visible"]});this.cfg.addProperty("modal",{value:false,handler:this.configModal,validator:this.cfg.checkBoolean,supercedes:["visible"]});this.cfg.addProperty("keylisteners",{handler:this.configKeyListeners,suppressEvent:true,supercedes:["visible"]});}
YAHOO.widget.Panel.prototype.configClose=function(type,args,obj){var val=args[0];var doHide=function(e,obj){obj.hide();}
if(val){if(!this.close){this.close=document.createElement("DIV");YAHOO.util.Dom.addClass(this.close,"close");if(this.isSecure){YAHOO.util.Dom.addClass(this.close,"secure");}else{YAHOO.util.Dom.addClass(this.close,"nonsecure");}
this.close.innerHTML="&nbsp;";this.innerElement.appendChild(this.close);YAHOO.util.Event.addListener(this.close,"click",doHide,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}}
YAHOO.widget.Panel.prototype.configDraggable=function(type,args,obj){var val=args[0];if(val){if(this.header){YAHOO.util.Dom.setStyle(this.header,"cursor","move");this.registerDragDrop();}}else{if(this.dd){this.dd.unreg();}
if(this.header){YAHOO.util.Dom.setStyle(this.header,"cursor","auto");}}}
YAHOO.widget.Panel.prototype.configUnderlay=function(type,args,obj){var val=args[0];switch(val.toLowerCase()){case"shadow":YAHOO.util.Dom.removeClass(this.element,"matte");YAHOO.util.Dom.addClass(this.element,"shadow");if(!this.underlay){this.underlay=document.createElement("DIV");this.underlay.className="underlay";this.underlay.innerHTML="&nbsp;";this.element.appendChild(this.underlay);}
this.sizeUnderlay();break;case"matte":YAHOO.util.Dom.removeClass(this.element,"shadow");YAHOO.util.Dom.addClass(this.element,"matte");break;case"none":default:YAHOO.util.Dom.removeClass(this.element,"shadow");YAHOO.util.Dom.removeClass(this.element,"matte");break;}}
YAHOO.widget.Panel.prototype.configModal=function(type,args,obj){var modal=args[0];if(modal){this.buildMask();if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMask,this)){this.showEvent.subscribe(this.showMask,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMask,this)){this.hideEvent.subscribe(this.hideMask,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent,this.sizeMask,this)){YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent,this.sizeMask,this)){YAHOO.widget.Overlay.windowScrollEvent.subscribe(this.sizeMask,this,true);}}else{this.beforeShowEvent.unsubscribe(this.showMask,this);this.hideEvent.unsubscribe(this.hideMask,this);YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.sizeMask);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.sizeMask);}}
YAHOO.widget.Panel.prototype.configKeyListeners=function(type,args,obj){var listeners=args[0];if(listeners){if(listeners instanceof Array){for(var i=0;i<listeners.length;i++){var listener=listeners[i];if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true);}
if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true);}}}else{if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true);}
if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true);}}}}
YAHOO.widget.Panel.prototype.buildWrapper=function(){var elementParent=this.element.parentNode;var elementClone=this.element.cloneNode(true);this.innerElement=elementClone;this.innerElement.style.visibility="inherit";YAHOO.util.Dom.addClass(this.innerElement,YAHOO.widget.Panel.CSS_PANEL);var wrapper=document.createElement("DIV");wrapper.className=YAHOO.widget.Panel.CSS_PANEL_CONTAINER;wrapper.id=elementClone.id+"_c";wrapper.appendChild(elementClone);if(elementParent){elementParent.replaceChild(wrapper,this.element);}
this.element=wrapper;var childNodes=this.innerElement.childNodes;if(childNodes){for(var i=0;i<childNodes.length;i++){var child=childNodes[i];switch(child.className){case YAHOO.widget.Module.CSS_HEADER:this.header=child;break;case YAHOO.widget.Module.CSS_BODY:this.body=child;break;case YAHOO.widget.Module.CSS_FOOTER:this.footer=child;break;}}}
this.initDefaultConfig();}
YAHOO.widget.Panel.prototype.sizeUnderlay=function(){if(this.underlay&&this.browser!="gecko"&&this.browser!="safari"){this.underlay.style.width=this.innerElement.offsetWidth+"px";this.underlay.style.height=this.innerElement.offsetHeight+"px";}}
YAHOO.widget.Panel.prototype.onDomResize=function(e,obj){YAHOO.widget.Panel.superclass.onDomResize.call(this,e,obj);var me=this;setTimeout(function(){me.sizeUnderlay();},0);};YAHOO.widget.Panel.prototype.registerDragDrop=function(){if(this.header){this.dd=new YAHOO.util.DD(this.element.id,this.id);if(!this.header.id){this.header.id=this.id+"_h";}
var me=this;this.dd.startDrag=function(){if(me.browser=="ie"){YAHOO.util.Dom.addClass(me.element,"drag");}
if(me.cfg.getProperty("constraintoviewport")){var offsetHeight=me.element.offsetHeight;var offsetWidth=me.element.offsetWidth;var viewPortWidth=YAHOO.util.Dom.getViewportWidth();var viewPortHeight=YAHOO.util.Dom.getViewportHeight();var scrollX=window.scrollX||document.documentElement.scrollLeft;var scrollY=window.scrollY||document.documentElement.scrollTop;var topConstraint=scrollY+10;var leftConstraint=scrollX+10;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-10;var rightConstraint=scrollX+viewPortWidth-offsetWidth-10;this.minX=leftConstraint
this.maxX=rightConstraint;this.constrainX=true;this.minY=topConstraint;this.maxY=bottomConstraint;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}
me.dragEvent.fire("startDrag",arguments);}
this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&this.browser=="gecko"){this.showMacGeckoScrollbars();}
me.dragEvent.fire("onDrag",arguments);}
this.dd.endDrag=function(){if(me.browser=="ie"){YAHOO.util.Dom.removeClass(me.element,"drag");}
me.dragEvent.fire("endDrag",arguments);}
this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}}
YAHOO.widget.Panel.prototype.buildMask=function(){if(!this.mask){this.mask=document.createElement("DIV");this.mask.id=this.id+"_mask";this.mask.className="mask";this.mask.innerHTML="&nbsp;";var maskClick=function(e,obj){YAHOO.util.Event.stopEvent(e);}
YAHOO.util.Event.addListener(this.mask,maskClick,this);document.body.appendChild(this.mask);}}
YAHOO.widget.Panel.prototype.hideMask=function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();YAHOO.util.Dom.removeClass(document.body,"masked");}}
YAHOO.widget.Panel.prototype.showMask=function(){if(this.cfg.getProperty("modal")&&this.mask){YAHOO.util.Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}}
YAHOO.widget.Panel.prototype.sizeMask=function(){if(this.mask){this.mask.style.height=YAHOO.util.Dom.getDocumentHeight()+"px";this.mask.style.width=YAHOO.util.Dom.getDocumentWidth()+"px";}}
YAHOO.widget.Panel.prototype.configHeight=function(type,args,obj){var height=args[0];var el=this.innerElement;YAHOO.util.Dom.setStyle(el,"height",height);this.cfg.refireEvent("underlay");this.cfg.refireEvent("iframe");}
YAHOO.widget.Panel.prototype.configWidth=function(type,args,obj){var width=args[0];var el=this.innerElement;YAHOO.util.Dom.setStyle(el,"width",width);this.cfg.refireEvent("underlay");this.cfg.refireEvent("iframe");}
YAHOO.widget.Panel.prototype.render=function(appendToNode){return YAHOO.widget.Panel.superclass.render.call(this,appendToNode,this.innerElement);}
YAHOO.widget.Panel.prototype.toString=function(){return"Panel "+this.id;}
YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig);}
YAHOO.extend(YAHOO.widget.Dialog,YAHOO.widget.Panel);YAHOO.widget.Dialog.CSS_DIALOG="dialog";YAHOO.widget.Dialog.prototype.beforeSubmitEvent=null;YAHOO.widget.Dialog.prototype.submitEvent=null;YAHOO.widget.Dialog.prototype.manualSubmitEvent=null;YAHOO.widget.Dialog.prototype.asyncSubmitEvent=null;YAHOO.widget.Dialog.prototype.formSubmitEvent=null;YAHOO.widget.Dialog.prototype.cancelEvent=null;YAHOO.widget.Dialog.prototype.initDefaultConfig=function(){YAHOO.widget.Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null,scope:this}
this.doSubmit=function(){var method=this.cfg.getProperty("postmethod");switch(method){case"async":YAHOO.util.Connect.setForm(this.form.name);var cObj=YAHOO.util.Connect.asyncRequest('POST',this.form.action,this.callback);this.asyncSubmitEvent.fire();break;case"form":this.form.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}}
this.cfg.addProperty("postmethod",{value:"async",validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false;}else{return true;}}});this.cfg.addProperty("buttons",{value:"none",handler:this.configButtons});}
YAHOO.widget.Dialog.prototype.initEvents=function(){YAHOO.widget.Dialog.superclass.initEvents.call(this);this.beforeSubmitEvent=new YAHOO.util.CustomEvent("beforeSubmit");this.submitEvent=new YAHOO.util.CustomEvent("submit");this.manualSubmitEvent=new YAHOO.util.CustomEvent("manualSubmit");this.asyncSubmitEvent=new YAHOO.util.CustomEvent("asyncSubmit");this.formSubmitEvent=new YAHOO.util.CustomEvent("formSubmit");this.cancelEvent=new YAHOO.util.CustomEvent("cancel");}
YAHOO.widget.Dialog.prototype.init=function(el,userConfig){YAHOO.widget.Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Dialog);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.renderEvent.subscribe(this.registerForm,this,true);this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.beforeRenderEvent.subscribe(function(){var buttonCfg=this.cfg.getProperty("buttons");if(buttonCfg&&buttonCfg!="none"){if(!this.footer){this.setFooter("");}}},this,true);this.initEvent.fire(YAHOO.widget.Dialog);}
YAHOO.widget.Dialog.prototype.registerForm=function(){var form=this.element.getElementsByTagName("FORM")[0];if(!form){var formHTML="<form name=\"frm_"+this.id+"\" action=\"\"></form>";this.body.innerHTML+=formHTML;form=this.element.getElementsByTagName("FORM")[0];}
this.firstFormElement=function(){for(var f=0;f<form.elements.length;f++){var el=form.elements[f];if(el.focus){if(el.type&&el.type!="hidden"){return el;break;}}}
return null;}();this.lastFormElement=function(){for(var f=form.elements.length-1;f>=0;f--){var el=form.elements[f];if(el.focus){if(el.type&&el.type!="hidden"){return el;break;}}}
return null;}();this.form=form;if(this.cfg.getProperty("modal")&&this.form){var me=this;var firstElement=this.firstFormElement||this.firstButton;if(firstElement){this.preventBackTab=new YAHOO.util.KeyListener(firstElement,{shift:true,keys:9},{fn:me.focusLast,scope:me,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true);}
var lastElement=this.lastButton||this.lastFormElement;if(lastElement){this.preventTabOut=new YAHOO.util.KeyListener(lastElement,{shift:false,keys:9},{fn:me.focusFirst,scope:me,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true);}}}
YAHOO.widget.Dialog.prototype.configButtons=function(type,args,obj){var buttons=args[0];if(buttons!="none"){this.buttonSpan=null;this.buttonSpan=document.createElement("SPAN");this.buttonSpan.className="button-group";for(var b=0;b<buttons.length;b++){var button=buttons[b];var htmlButton=document.createElement("BUTTON");if(button.isDefault){htmlButton.className="default";this.defaultHtmlButton=htmlButton;}
htmlButton.appendChild(document.createTextNode(button.text));YAHOO.util.Event.addListener(htmlButton,"click",button.handler,this,true);this.buttonSpan.appendChild(htmlButton);button.htmlButton=htmlButton;if(b==0){this.firstButton=button.htmlButton;}
if(b==(buttons.length-1)){this.lastButton=button.htmlButton;}}
this.setFooter(this.buttonSpan);this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay");}else{if(this.buttonSpan){if(this.buttonSpan.parentNode){this.buttonSpan.parentNode.removeChild(this.buttonSpan);}
this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}}
YAHOO.widget.Dialog.prototype.configOnSuccess=function(type,args,obj){};YAHOO.widget.Dialog.prototype.configOnFailure=function(type,args,obj){};YAHOO.widget.Dialog.prototype.doSubmit=function(){};YAHOO.widget.Dialog.prototype.focusFirst=function(type,args,obj){if(args){var e=args[1];if(e){YAHOO.util.Event.stopEvent(e);}}
if(this.firstFormElement){this.firstFormElement.focus();}else{this.focusDefaultButton();}}
YAHOO.widget.Dialog.prototype.focusLast=function(type,args,obj){if(args){var e=args[1];if(e){YAHOO.util.Event.stopEvent(e);}}
var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){this.focusLastButton();}else{if(this.lastFormElement){this.lastFormElement.focus();}}}
YAHOO.widget.Dialog.prototype.focusDefaultButton=function(){if(this.defaultHtmlButton){this.defaultHtmlButton.focus();}}
YAHOO.widget.Dialog.prototype.blurButtons=function(){var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){var html=buttons[0].htmlButton;if(html){html.blur();}}}
YAHOO.widget.Dialog.prototype.focusFirstButton=function(){var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){var html=buttons[0].htmlButton;if(html){html.focus();}}}
YAHOO.widget.Dialog.prototype.focusLastButton=function(){var buttons=this.cfg.getProperty("buttons");if(buttons&&buttons instanceof Array){var html=buttons[buttons.length-1].htmlButton;if(html){html.focus();}}}
YAHOO.widget.Dialog.prototype.validate=function(){return true;}
YAHOO.widget.Dialog.prototype.submit=function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();this.hide();return true;}else{return false;}}
YAHOO.widget.Dialog.prototype.cancel=function(){this.cancelEvent.fire();this.hide();}
YAHOO.widget.Dialog.prototype.getData=function(){var form=this.form;var data={};if(form){for(var i in this.form){var formItem=form[i];if(formItem){if(formItem.tagName){switch(formItem.tagName){case"INPUT":switch(formItem.type){case"checkbox":data[i]=formItem.checked;break;case"textbox":case"text":case"hidden":data[i]=formItem.value;break;}
break;case"TEXTAREA":data[i]=formItem.value;break;case"SELECT":var val=new Array();for(var x=0;x<formItem.options.length;x++){var option=formItem.options[x];if(option.selected){var selval=option.value;if(!selval||selval==""){selval=option.text;}
val[val.length]=selval;}}
data[i]=val;break;}}else if(formItem[0]&&formItem[0].tagName){switch(formItem[0].tagName){case"INPUT":switch(formItem[0].type){case"radio":for(var r=0;r<formItem.length;r++){var radio=formItem[r];if(radio.checked){data[radio.name]=radio.value;break;}}
break;case"checkbox":var cbArray=new Array();for(var c=0;c<formItem.length;c++){var check=formItem[c];if(check.checked){cbArray[cbArray.length]=check.value;}}
data[formItem[0].name]=cbArray;break;}}}}}}
return data;}
YAHOO.widget.Dialog.prototype.toString=function(){return"Dialog "+this.id;}
YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig);}
YAHOO.extend(YAHOO.widget.SimpleDialog,YAHOO.widget.Dialog);YAHOO.widget.SimpleDialog.ICON_BLOCK="nt/ic/ut/bsc/blck16_1.gif";YAHOO.widget.SimpleDialog.ICON_ALARM="nt/ic/ut/bsc/alrt16_1.gif";YAHOO.widget.SimpleDialog.ICON_HELP="nt/ic/ut/bsc/hlp16_1.gif";YAHOO.widget.SimpleDialog.ICON_INFO="nt/ic/ut/bsc/info16_1.gif";YAHOO.widget.SimpleDialog.ICON_WARN="nt/ic/ut/bsc/warn16_1.gif";YAHOO.widget.SimpleDialog.ICON_TIP="nt/ic/ut/bsc/tip16_1.gif";YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG="simple-dialog";YAHOO.widget.SimpleDialog.prototype.initDefaultConfig=function(){YAHOO.widget.SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty("icon",{value:"none",handler:this.configIcon,suppressEvent:true});this.cfg.addProperty("text",{value:"",handler:this.configText,suppressEvent:true,supercedes:["icon"]});}
YAHOO.widget.SimpleDialog.prototype.init=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.SimpleDialog);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(YAHOO.widget.SimpleDialog);}
YAHOO.widget.SimpleDialog.prototype.registerForm=function(){YAHOO.widget.SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>";}
YAHOO.widget.SimpleDialog.prototype.configIcon=function(type,args,obj){var icon=args[0];if(icon&&icon!="none"){var iconHTML="<img src=\""+this.imageRoot+icon+"\" class=\"icon\" />";this.body.innerHTML=iconHTML+this.body.innerHTML;}}
YAHOO.widget.SimpleDialog.prototype.configText=function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon");}}
YAHOO.widget.SimpleDialog.prototype.toString=function(){return"SimpleDialog "+this.id;}
YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim;}
this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass;}
YAHOO.widget.ContainerEffect.prototype.init=function(){this.beforeAnimateInEvent=new YAHOO.util.CustomEvent("beforeAnimateIn");this.beforeAnimateOutEvent=new YAHOO.util.CustomEvent("beforeAnimateOut");this.animateInCompleteEvent=new YAHOO.util.CustomEvent("animateInComplete");this.animateOutCompleteEvent=new YAHOO.util.CustomEvent("animateOutComplete");this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);}
YAHOO.widget.ContainerEffect.prototype.animateIn=function(){this.beforeAnimateInEvent.fire();this.animIn.animate();}
YAHOO.widget.ContainerEffect.prototype.animateOut=function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();}
YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn=function(type,args,obj){}
YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn=function(type,args,obj){}
YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn=function(type,args,obj){}
YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut=function(type,args,obj){}
YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut=function(type,args,obj){}
YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut=function(type,args,obj){}
YAHOO.widget.ContainerEffect.prototype.toString=function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]";}
return output;}
YAHOO.widget.ContainerEffect.FADE=function(overlay,dur){var fade=new YAHOO.widget.ContainerEffect(overlay,{attributes:{opacity:{from:0,to:1}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{opacity:{to:0}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element);fade.handleStartAnimateIn=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay");}
if(obj.overlay.underlay){obj.initialUnderlayOpacity=YAHOO.util.Dom.getStyle(obj.overlay.underlay,"opacity");obj.overlay.underlay.style.filter=null;}
YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","visible");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",0);}
fade.handleCompleteAnimateIn=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
if(obj.overlay.underlay){YAHOO.util.Dom.setStyle(obj.overlay.underlay,"opacity",obj.initialUnderlayOpacity);}
obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();}
fade.handleStartAnimateOut=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(obj.overlay.underlay){obj.overlay.underlay.style.filter=null;}}
fade.handleCompleteAnimateOut=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","hidden");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",1);obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire();};fade.init();return fade;};YAHOO.widget.ContainerEffect.SLIDE=function(overlay,dur){var x=overlay.cfg.getProperty("x")||YAHOO.util.Dom.getX(overlay.element);var y=overlay.cfg.getProperty("y")||YAHOO.util.Dom.getY(overlay.element);var clientWidth=YAHOO.util.Dom.getClientWidth();var offsetWidth=overlay.element.offsetWidth;var slide=new YAHOO.widget.ContainerEffect(overlay,{attributes:{points:{to:[x,y]}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=(-25-offsetWidth)+"px";obj.overlay.element.style.top=y+"px";}
slide.handleTweenAnimateIn=function(type,args,obj){var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var currentX=pos[0];var currentY=pos[1];if(YAHOO.util.Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","visible");}
obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe");}
slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();}
slide.handleStartAnimateOut=function(type,args,obj){var clientWidth=YAHOO.util.Dom.getViewportWidth();var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var x=pos[0];var y=pos[1];var currentTo=obj.animOut.attributes.points.to;obj.animOut.attributes.points.to=[(clientWidth+25),y];}
slide.handleTweenAnimateOut=function(type,args,obj){var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var x=pos[0];var y=pos[1];obj.overlay.cfg.setProperty("xy",[x,y],true);obj.overlay.cfg.refireEvent("iframe");}
slide.handleCompleteAnimateOut=function(type,args,obj){YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","hidden");var offsetWidth=obj.overlay.element.offsetWidth;obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire();};slide.init();return slide;}

View File

@ -1,153 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
Version 0.11.1
*/
YAHOO.util.Config=function(owner){if(owner){this.init(owner);}}
YAHOO.util.Config.prototype={owner:null,configChangedEvent:null,queueInProgress:false,addProperty:function(key,propertyObject){},getConfig:function(){},getProperty:function(key){},resetProperty:function(key){},setProperty:function(key,value,silent){},queueProperty:function(key,value){},refireEvent:function(key){},applyConfig:function(userConfig,init){},refresh:function(){},fireQueue:function(){},subscribeToConfigEvent:function(key,handler,obj,override){},unsubscribeFromConfigEvent:function(key,handler,obj){},checkBoolean:function(val){if(typeof val=='boolean'){return true;}else{return false;}},checkNumber:function(val){if(isNaN(val)){return false;}else{return true;}}}
YAHOO.util.Config.prototype.init=function(owner){this.owner=owner;this.configChangedEvent=new YAHOO.util.CustomEvent("configChanged");this.queueInProgress=false;var config={};var initialConfig={};var eventQueue=[];var fireEvent=function(key,value){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){property.event.fire(value);}}
this.addProperty=function(key,propertyObject){key=key.toLowerCase();config[key]=propertyObject;propertyObject.event=new YAHOO.util.CustomEvent(key);propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner,true);}
this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}}
this.getConfig=function(){var cfg={};for(var prop in config){var property=config[prop]
if(typeof property!='undefined'&&property.event){cfg[prop]=property.value;}}
return cfg;}
this.getProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){return property.value;}else{return undefined;}}
this.resetProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){this.setProperty(key,initialConfig[key].value);}else{return undefined;}}
this.setProperty=function(key,value,silent){key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{var property=config[key];if(typeof property!='undefined'&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){fireEvent(key,value);this.configChangedEvent.fire([key,value]);}
return true;}}else{return false;}}}
this.queueProperty=function(key,value){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){if(typeof value!='undefined'&&property.validator&&!property.validator(value)){return false;}else{if(typeof value!='undefined'){property.value=value;}else{value=property.value;}
var foundDuplicate=false;for(var i=0;i<eventQueue.length;i++){var queueItem=eventQueue[i];if(queueItem){var queueItemKey=queueItem[0];var queueItemValue=queueItem[1];if(queueItemKey.toLowerCase()==key){eventQueue[i]=null;eventQueue.push([key,(typeof value!='undefined'?value:queueItemValue)]);foundDuplicate=true;break;}}}
if(!foundDuplicate&&typeof value!='undefined'){eventQueue.push([key,value]);}}
if(property.supercedes){for(var s=0;s<property.supercedes.length;s++){var supercedesCheck=property.supercedes[s];for(var q=0;q<eventQueue.length;q++){var queueItemCheck=eventQueue[q];if(queueItemCheck){var queueItemCheckKey=queueItemCheck[0];var queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey.toLowerCase()==supercedesCheck.toLowerCase()){eventQueue.push([queueItemCheckKey,queueItemCheckValue]);eventQueue[q]=null;break;}}}}}
return true;}else{return false;}}
this.refireEvent=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event&&typeof property.value!='undefined'){if(this.queueInProgress){this.queueProperty(key);}else{fireEvent(key,property.value);}}}
this.applyConfig=function(userConfig,init){if(init){initialConfig=userConfig;}
for(var prop in userConfig){this.queueProperty(prop,userConfig[prop]);}}
this.refresh=function(){for(var prop in config){this.refireEvent(prop);}}
this.fireQueue=function(){this.queueInProgress=true;for(var i=0;i<eventQueue.length;i++){var queueItem=eventQueue[i];if(queueItem){var key=queueItem[0];var value=queueItem[1];var property=config[key];property.value=value;fireEvent(key,value);}}
this.queueInProgress=false;eventQueue=new Array();}
this.subscribeToConfigEvent=function(key,handler,obj,override){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){if(!YAHOO.util.Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override);}
return true;}else{return false;}}
this.unsubscribeFromConfigEvent=function(key,handler,obj){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){return property.event.unsubscribe(handler,obj);}else{return false;}}
this.toString=function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]";}
return output;}
this.outputEventQueue=function(){var output="";for(var q=0;q<eventQueue.length;q++){var queueItem=eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", ";}}
return output;}}
YAHOO.util.Config.alreadySubscribed=function(evt,fn,obj){for(var e=0;e<evt.subscribers.length;e++){var subsc=evt.subscribers[e];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true;break;}}
return false;}
YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig);}}
YAHOO.widget.Module.IMG_ROOT="http://us.i1.yimg.com/us.yimg.com/i/";YAHOO.widget.Module.IMG_ROOT_SSL="https://a248.e.akamai.net/sec.yimg.com/i/";YAHOO.widget.Module.CSS_MODULE="module";YAHOO.widget.Module.CSS_HEADER="hd";YAHOO.widget.Module.CSS_BODY="bd";YAHOO.widget.Module.CSS_FOOTER="ft";YAHOO.widget.Module.RESIZE_MONITOR_SECURE_URL=null;YAHOO.widget.Module.prototype={constructor:YAHOO.widget.Module,element:null,header:null,body:null,footer:null,id:null,childNodesInDOM:null,imageRoot:YAHOO.widget.Module.IMG_ROOT,beforeInitEvent:null,initEvent:null,appendEvent:null,beforeRenderEvent:null,renderEvent:null,changeHeaderEvent:null,changeBodyEvent:null,changeFooterEvent:null,changeContentEvent:null,destroyEvent:null,beforeShowEvent:null,showEvent:null,beforeHideEvent:null,hideEvent:null,initEvents:function(){this.beforeInitEvent=new YAHOO.util.CustomEvent("beforeInit");this.initEvent=new YAHOO.util.CustomEvent("init");this.appendEvent=new YAHOO.util.CustomEvent("append");this.beforeRenderEvent=new YAHOO.util.CustomEvent("beforeRender");this.renderEvent=new YAHOO.util.CustomEvent("render");this.changeHeaderEvent=new YAHOO.util.CustomEvent("changeHeader");this.changeBodyEvent=new YAHOO.util.CustomEvent("changeBody");this.changeFooterEvent=new YAHOO.util.CustomEvent("changeFooter");this.changeContentEvent=new YAHOO.util.CustomEvent("changeContent");this.destroyEvent=new YAHOO.util.CustomEvent("destroy");this.beforeShowEvent=new YAHOO.util.CustomEvent("beforeShow");this.showEvent=new YAHOO.util.CustomEvent("show");this.beforeHideEvent=new YAHOO.util.CustomEvent("beforeHide");this.hideEvent=new YAHOO.util.CustomEvent("hide");},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows";}else if(ua.indexOf("macintosh")!=-1){return"mac";}else{return false;}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera';}else if(ua.indexOf('msie 7')!=-1){return'ie7';}else if(ua.indexOf('msie')!=-1){return'ie';}else if(ua.indexOf('safari')!=-1){return'safari';}else if(ua.indexOf('gecko')!=-1){return'gecko';}else{return false;}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")==0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty("visible",{value:true,handler:this.configVisible,validator:this.cfg.checkBoolean});this.cfg.addProperty("effect",{suppressEvent:true,supercedes:["visible"]});this.cfg.addProperty("monitorresize",{value:true,handler:this.configMonitorResize});},init:function(el,userConfig){this.initEvents();this.beforeInitEvent.fire(YAHOO.widget.Module);this.cfg=new YAHOO.util.Config(this);if(this.isSecure){this.imageRoot=YAHOO.widget.Module.IMG_ROOT_SSL;}
if(typeof el=="string"){var elId=el;el=document.getElementById(el);if(!el){el=document.createElement("DIV");el.id=elId;}}
this.element=el;if(el.id){this.id=el.id;}
var childNodes=this.element.childNodes;if(childNodes){for(var i=0;i<childNodes.length;i++){var child=childNodes[i];switch(child.className){case YAHOO.widget.Module.CSS_HEADER:this.header=child;break;case YAHOO.widget.Module.CSS_BODY:this.body=child;break;case YAHOO.widget.Module.CSS_FOOTER:this.footer=child;break;}}}
this.initDefaultConfig();YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true);}
if(!YAHOO.util.Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}
this.initEvent.fire(YAHOO.widget.Module);},initResizeMonitor:function(){if(this.browser!="opera"){var resizeMonitor=document.getElementById("_yuiResizeMonitor");if(!resizeMonitor){resizeMonitor=document.createElement("iframe");var bIE=(this.browser.indexOf("ie")===0);if(this.isSecure&&this.RESIZE_MONITOR_SECURE_URL&&bIE){resizeMonitor.src=this.RESIZE_MONITOR_SECURE_URL;}
resizeMonitor.id="_yuiResizeMonitor";resizeMonitor.style.visibility="hidden";document.body.appendChild(resizeMonitor);resizeMonitor.style.width="10em";resizeMonitor.style.height="10em";resizeMonitor.style.position="absolute";var nLeft=-1*resizeMonitor.offsetWidth,nTop=-1*resizeMonitor.offsetHeight;resizeMonitor.style.top=nTop+"px";resizeMonitor.style.left=nLeft+"px";resizeMonitor.style.borderStyle="none";resizeMonitor.style.borderWidth="0";YAHOO.util.Dom.setStyle(resizeMonitor,"opacity","0");resizeMonitor.style.visibility="visible";if(!bIE){var doc=resizeMonitor.contentWindow.document;doc.open();doc.close();}}
if(resizeMonitor&&resizeMonitor.contentWindow){this.resizeMonitor=resizeMonitor;YAHOO.util.Event.addListener(this.resizeMonitor.contentWindow,"resize",this.onDomResize,this,true);}}},onDomResize:function(e,obj){var nLeft=-1*this.resizeMonitor.offsetWidth,nTop=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left=nLeft+"px";},setHeader:function(headerContent){if(!this.header){this.header=document.createElement("DIV");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
if(typeof headerContent=="string"){this.header.innerHTML=headerContent;}else{this.header.innerHTML="";this.header.appendChild(headerContent);}
this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire();},appendToHeader:function(element){if(!this.header){this.header=document.createElement("DIV");this.header.className=YAHOO.widget.Module.CSS_HEADER;}
this.header.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire();},setBody:function(bodyContent){if(!this.body){this.body=document.createElement("DIV");this.body.className=YAHOO.widget.Module.CSS_BODY;}
if(typeof bodyContent=="string")
{this.body.innerHTML=bodyContent;}else{this.body.innerHTML="";this.body.appendChild(bodyContent);}
this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire();},appendToBody:function(element){if(!this.body){this.body=document.createElement("DIV");this.body.className=YAHOO.widget.Module.CSS_BODY;}
this.body.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire();},setFooter:function(footerContent){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
if(typeof footerContent=="string"){this.footer.innerHTML=footerContent;}else{this.footer.innerHTML="";this.footer.appendChild(footerContent);}
this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire();},appendToFooter:function(element){if(!this.footer){this.footer=document.createElement("DIV");this.footer.className=YAHOO.widget.Module.CSS_FOOTER;}
this.footer.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire();},render:function(appendToNode,moduleElement){this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element;}
var me=this;var appendTo=function(element){if(typeof element=="string"){element=document.getElementById(element);}
if(element){element.appendChild(me.element);me.appendEvent.fire();}}
if(appendToNode){appendTo(appendToNode);}else{if(!YAHOO.util.Dom.inDocument(this.element)){return false;}}
if(this.header&&!YAHOO.util.Dom.inDocument(this.header)){var firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild);}else{moduleElement.appendChild(this.header);}}
if(this.body&&!YAHOO.util.Dom.inDocument(this.body)){if(this.footer&&YAHOO.util.Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer);}else{moduleElement.appendChild(this.body);}}
if(this.footer&&!YAHOO.util.Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer);}
this.renderEvent.fire();return true;},destroy:function(){if(this.element){var parent=this.element.parentNode;}
if(parent){parent.removeChild(this.element);}
this.element=null;this.header=null;this.body=null;this.footer=null;this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor();}else{YAHOO.util.Event.removeListener(this.resizeMonitor,"resize",this.onDomResize);this.resizeMonitor=null;}}}
YAHOO.widget.Module.prototype.toString=function(){return"Module "+this.id;}
YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig);}
YAHOO.extend(YAHOO.widget.Overlay,YAHOO.widget.Module);YAHOO.widget.Overlay.IFRAME_SRC="promo/m/irs/blank.gif";YAHOO.widget.Overlay.TOP_LEFT="tl";YAHOO.widget.Overlay.TOP_RIGHT="tr";YAHOO.widget.Overlay.BOTTOM_LEFT="bl";YAHOO.widget.Overlay.BOTTOM_RIGHT="br";YAHOO.widget.Overlay.CSS_OVERLAY="overlay";YAHOO.widget.Overlay.prototype.beforeMoveEvent=null;YAHOO.widget.Overlay.prototype.moveEvent=null;YAHOO.widget.Overlay.prototype.init=function(el,userConfig){YAHOO.widget.Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.Overlay);YAHOO.util.Dom.addClass(this.element,YAHOO.widget.Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true);}
if(this.platform=="mac"&&this.browser=="gecko"){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}
this.initEvent.fire(YAHOO.widget.Overlay);}
YAHOO.widget.Overlay.prototype.initEvents=function(){YAHOO.widget.Overlay.superclass.initEvents.call(this);this.beforeMoveEvent=new YAHOO.util.CustomEvent("beforeMove",this);this.moveEvent=new YAHOO.util.CustomEvent("move",this);}
YAHOO.widget.Overlay.prototype.initDefaultConfig=function(){YAHOO.widget.Overlay.superclass.initDefaultConfig.call(this);this.cfg.addProperty("x",{handler:this.configX,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("y",{handler:this.configY,validator:this.cfg.checkNumber,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("xy",{handler:this.configXY,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("context",{handler:this.configContext,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("fixedcenter",{value:false,handler:this.configFixedCenter,validator:this.cfg.checkBoolean,supercedes:["iframe","visible"]});this.cfg.addProperty("width",{handler:this.configWidth,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("height",{handler:this.configHeight,suppressEvent:true,supercedes:["iframe"]});this.cfg.addProperty("zIndex",{value:null,handler:this.configzIndex});this.cfg.addProperty("constraintoviewport",{value:false,handler:this.configConstrainToViewport,validator:this.cfg.checkBoolean,supercedes:["iframe","x","y","xy"]});this.cfg.addProperty("iframe",{value:(this.browser=="ie"?true:false),handler:this.configIframe,validator:this.cfg.checkBoolean,supercedes:["zIndex"]});}
YAHOO.widget.Overlay.prototype.moveTo=function(x,y){this.cfg.setProperty("xy",[x,y]);}
YAHOO.widget.Overlay.prototype.hideMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"show-scrollbars");YAHOO.util.Dom.addClass(this.element,"hide-scrollbars");}
YAHOO.widget.Overlay.prototype.showMacGeckoScrollbars=function(){YAHOO.util.Dom.removeClass(this.element,"hide-scrollbars");YAHOO.util.Dom.addClass(this.element,"show-scrollbars");}
YAHOO.widget.Overlay.prototype.configVisible=function(type,args,obj){var visible=args[0];var currentVis=YAHOO.util.Dom.getStyle(this.element,"visibility");var effect=this.cfg.getProperty("effect");var effectInstances=new Array();if(effect){if(effect instanceof Array){for(var i=0;i<effect.length;i++){var eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration);}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration);}}
var isMacGecko=(this.platform=="mac"&&this.browser=="gecko");if(visible){if(isMacGecko){this.showMacGeckoScrollbars();}
if(effect){if(visible){if(currentVis!="visible"){this.beforeShowEvent.fire();for(var i=0;i<effectInstances.length;i++){var e=effectInstances[i];if(i==0&&!YAHOO.util.Config.alreadySubscribed(e.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){e.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}
e.animateIn();}}}}else{if(currentVis!="visible"){this.beforeShowEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(isMacGecko){this.hideMacGeckoScrollbars();}
if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();for(var i=0;i<effectInstances.length;i++){var e=effectInstances[i];if(i==0&&!YAHOO.util.Config.alreadySubscribed(e.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){e.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}
e.animateOut();}}}else{if(currentVis=="visible"){this.beforeHideEvent.fire();YAHOO.util.Dom.setStyle(this.element,"visibility","hidden");this.cfg.refireEvent("iframe");this.hideEvent.fire();}}}}
YAHOO.widget.Overlay.prototype.doCenterOnDOMEvent=function(){if(this.cfg.getProperty("visible")){this.center();}}
YAHOO.widget.Overlay.prototype.configFixedCenter=function(type,args,obj){var val=args[0];if(val){this.center();if(!YAHOO.util.Config.alreadySubscribed(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowResizeEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(YAHOO.widget.Overlay.windowScrollEvent,this.doCenterOnDOMEvent,this)){YAHOO.widget.Overlay.windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true);}}else{YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);}}
YAHOO.widget.Overlay.prototype.configHeight=function(type,args,obj){var height=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");}
YAHOO.widget.Overlay.prototype.configWidth=function(type,args,obj){var width=args[0];var el=this.element;YAHOO.util.Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");}
YAHOO.widget.Overlay.prototype.configzIndex=function(type,args,obj){var zIndex=args[0];var el=this.element;if(!zIndex){zIndex=YAHOO.util.Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0;}}
if(this.iframe){if(zIndex<=0){zIndex=1;}
YAHOO.util.Dom.setStyle(this.iframe,"zIndex",(zIndex-1));}
YAHOO.util.Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);}
YAHOO.widget.Overlay.prototype.configXY=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);}
YAHOO.widget.Overlay.prototype.configX=function(type,args,obj){var x=args[0];var y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);}
YAHOO.widget.Overlay.prototype.configY=function(type,args,obj){var x=this.cfg.getProperty("x");var y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");YAHOO.util.Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);}
YAHOO.widget.Overlay.prototype.configIframe=function(type,args,obj){var val=args[0];var el=this.element;var showIframe=function(){if(this.iframe){this.iframe.style.display="block";}}
var hideIframe=function(){if(this.iframe){this.iframe.style.display="none";}}
if(val){if(!YAHOO.util.Config.alreadySubscribed(this.showEvent,showIframe,this)){this.showEvent.subscribe(showIframe,this,true);}
if(!YAHOO.util.Config.alreadySubscribed(this.hideEvent,hideIframe,this)){this.hideEvent.subscribe(hideIframe,this,true);}
var x=this.cfg.getProperty("x");var y=this.cfg.getProperty("y");if(!x||!y){this.syncPosition();x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");}
if(!isNaN(x)&&!isNaN(y)){if(!this.iframe){this.iframe=document.createElement("iframe");if(this.isSecure){this.iframe.src=this.imageRoot+YAHOO.widget.Overlay.IFRAME_SRC;}
var parent=el.parentNode;if(parent){parent.appendChild(this.iframe);}else{document.body.appendChild(this.iframe);}
YAHOO.util.Dom.setStyle(this.iframe,"position","absolute");YAHOO.util.Dom.setStyle(this.iframe,"border","none");YAHOO.util.Dom.setStyle(this.iframe,"margin","0");YAHOO.util.Dom.setStyle(this.iframe,"padding","0");YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(this.cfg.getProperty("visible")){showIframe.call(this);}else{hideIframe.call(this);}}
var iframeDisplay=YAHOO.util.Dom.getStyle(this.iframe,"display");if(iframeDisplay=="none"){this.iframe.style.display="block";}
YAHOO.util.Dom.setXY(this.iframe,[x,y]);var width=el.clientWidth;var height=el.clientHeight;YAHOO.util.Dom.setStyle(this.iframe,"width",(width+2)+"px");YAHOO.util.Dom.setStyle(this.iframe,"height",(height+2)+"px");if(iframeDisplay=="none"){this.iframe.style.display="none";}}}else{if(this.iframe){this.iframe.style.display="none";}
this.showEvent.unsubscribe(showIframe,this);this.hideEvent.unsubscribe(hideIframe,this);}}
YAHOO.widget.Overlay.prototype.configConstrainToViewport=function(type,args,obj){var val=args[0];if(val){if(!YAHOO.util.Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}}
YAHOO.widget.Overlay.prototype.configContext=function(type,args,obj){var contextArgs=args[0];if(contextArgs){var contextEl=contextArgs[0];var elementMagnetCorner=contextArgs[1];var contextMagnetCorner=contextArgs[2];if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner],true);}
if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner);}}}}
YAHOO.widget.Overlay.prototype.align=function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context");if(contextArgs){var context=contextArgs[0];var element=this.element;var me=this;if(!elementAlign){elementAlign=contextArgs[1];}
if(!contextAlign){contextAlign=contextArgs[2];}
if(element&&context){var elementRegion=YAHOO.util.Dom.getRegion(element);var contextRegion=YAHOO.util.Dom.getRegion(context);var doAlign=function(v,h){switch(elementAlign){case YAHOO.widget.Overlay.TOP_LEFT:me.moveTo(h,v);break;case YAHOO.widget.Overlay.TOP_RIGHT:me.moveTo(h-element.offsetWidth,v);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:me.moveTo(h,v-element.offsetHeight);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:me.moveTo(h-element.offsetWidth,v-element.offsetHeight);break;}}
switch(contextAlign){case YAHOO.widget.Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case YAHOO.widget.Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case YAHOO.widget.Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case YAHOO.widget.Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break;}}}}
YAHOO.widget.Overlay.prototype.enforceConstraints=function(type,args,obj){var pos=args[0];var x=pos[0];var y=pos[1];var width=parseInt(this.cfg.getProperty("width"));if(isNaN(width)){width=0;}
var offsetHeight=this.element.offsetHeight;var offsetWidth=(width>0?width:this.element.offsetWidth);var viewPortWidth=YAHOO.util.Dom.getViewportWidth();var viewPortHeight=YAHOO.util.Dom.getViewportHeight();var scrollX=window.scrollX||document.documentElement.scrollLeft;var scrollY=window.scrollY||document.documentElement.scrollTop;var topConstraint=scrollY+10;var leftConstraint=scrollX+10;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-10;var rightConstraint=scrollX+viewPortWidth-offsetWidth-10;if(x<leftConstraint){x=leftConstraint;}else if(x>rightConstraint){x=rightConstraint;}
if(y<topConstraint){y=topConstraint;}else if(y>bottomConstraint){y=bottomConstraint;}
this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.cfg.setProperty("xy",[x,y],true);}
YAHOO.widget.Overlay.prototype.center=function(){var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var viewPortWidth=YAHOO.util.Dom.getClientWidth();var viewPortHeight=YAHOO.util.Dom.getClientHeight();var elementWidth=this.element.offsetWidth;var elementHeight=this.element.offsetHeight;var x=(viewPortWidth/2)-(elementWidth/2)+scrollX;var y=(viewPortHeight/2)-(elementHeight/2)+scrollY;this.element.style.left=parseInt(x)+"px";this.element.style.top=parseInt(y)+"px";this.syncPosition();this.cfg.refireEvent("iframe");}
YAHOO.widget.Overlay.prototype.syncPosition=function(){var pos=YAHOO.util.Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true);}
YAHOO.widget.Overlay.prototype.onDomResize=function(e,obj){YAHOO.widget.Overlay.superclass.onDomResize.call(this,e,obj);this.cfg.refireEvent("iframe");}
YAHOO.widget.Overlay.prototype.destroy=function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}
this.iframe=null;YAHOO.widget.Overlay.superclass.destroy.call(this);};YAHOO.widget.Overlay.prototype.toString=function(){return"Overlay "+this.id;}
YAHOO.widget.Overlay.windowScrollEvent=new YAHOO.util.CustomEvent("windowScroll");YAHOO.widget.Overlay.windowResizeEvent=new YAHOO.util.CustomEvent("windowResize");YAHOO.widget.Overlay.windowScrollHandler=function(e){YAHOO.widget.Overlay.windowScrollEvent.fire();}
YAHOO.widget.Overlay.windowResizeHandler=function(e){YAHOO.widget.Overlay.windowResizeEvent.fire();}
YAHOO.widget.Overlay._initialized==null;if(YAHOO.widget.Overlay._initialized==null){YAHOO.util.Event.addListener(window,"scroll",YAHOO.widget.Overlay.windowScrollHandler);YAHOO.util.Event.addListener(window,"resize",YAHOO.widget.Overlay.windowResizeHandler);YAHOO.widget.Overlay._initialized=true;}
YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig);}
YAHOO.widget.OverlayManager.CSS_FOCUSED="focused";YAHOO.widget.OverlayManager.prototype={constructor:YAHOO.widget.OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},getActive:function(){},focus:function(overlay){},remove:function(overlay){},blurAll:function(){},init:function(userConfig){this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay;}
this.focus=function(overlay){var o=this.find(overlay);if(o){this.blurAll();activeOverlay=o;YAHOO.util.Dom.addClass(activeOverlay.element,YAHOO.widget.OverlayManager.CSS_FOCUSED);this.overlays.sort(this.compareZIndexDesc);var topZIndex=YAHOO.util.Dom.getStyle(this.overlays[0].element,"zIndex");if(!isNaN(topZIndex)&&this.overlays[0]!=overlay){activeOverlay.cfg.setProperty("zIndex",(parseInt(topZIndex)+1));}
this.overlays.sort(this.compareZIndexDesc);}}
this.remove=function(overlay){var o=this.find(overlay);if(o){var originalZ=YAHOO.util.Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true);this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,this.overlays.length-1);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null);o.focusEvent=null
o.blurEvent=null;o.focus=null;o.blur=null;}}
this.blurAll=function(){activeOverlay=null;for(var o=0;o<this.overlays.length;o++){YAHOO.util.Dom.removeClass(this.overlays[o].element,YAHOO.widget.OverlayManager.CSS_FOCUSED);}}
var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=new Array();}
if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc);}},register:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){overlay.cfg.addProperty("manager",{value:this});overlay.focusEvent=new YAHOO.util.CustomEvent("focus");overlay.blurEvent=new YAHOO.util.CustomEvent("blur");var mgr=this;overlay.focus=function(){mgr.focus(this);this.focusEvent.fire();}
overlay.blur=function(){mgr.blurAll();this.blurEvent.fire();}
var focusOnDomEvent=function(e,obj){overlay.focus();}
var focusevent=this.cfg.getProperty("focusevent");YAHOO.util.Event.addListener(overlay.element,focusevent,focusOnDomEvent,this,true);var zIndex=YAHOO.util.Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex));}else{overlay.cfg.setProperty("zIndex",0);}
this.overlays.push(overlay);return true;}else if(overlay instanceof Array){var regcount=0;for(var i=0;i<overlay.length;i++){if(this.register(overlay[i])){regcount++;}}
if(regcount>0){return true;}}else{return false;}},find:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){for(var o=0;o<this.overlays.length;o++){if(this.overlays[o]==overlay){return this.overlays[o];}}}else if(typeof overlay=="string"){for(var o=0;o<this.overlays.length;o++){if(this.overlays[o].id==overlay){return this.overlays[o];}}}
return null;},compareZIndexDesc:function(o1,o2){var zIndex1=o1.cfg.getProperty("zIndex");var zIndex2=o2.cfg.getProperty("zIndex");if(zIndex1>zIndex2){return-1;}else if(zIndex1<zIndex2){return 1;}else{return 0;}},showAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].show();}},hideAll:function(){for(var o=0;o<this.overlays.length;o++){this.overlays[o].hide();}},toString:function(){return"OverlayManager";}}
YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
function handleKeyPress(e,obj){var keyPressed=e.charCode||e.keyCode;if(!keyData.shift)keyData.shift=false;if(!keyData.alt)keyData.alt=false;if(!keyData.ctrl)keyData.ctrl=false;if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){if(keyPressed==keyData.keys[i]){keyEvent.fire(keyPressed,e);break;}}}else{if(keyPressed==keyData.keys){keyEvent.fire(keyPressed,e);}}}}
this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
this.enabled=true;}
this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
this.enabled=false;}
this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+(attachTo.id?"["+attachTo.id+"]":"");}}
YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.prototype.enabled=null;YAHOO.util.KeyListener.prototype.enable=function(){};YAHOO.util.KeyListener.prototype.disable=function(){};YAHOO.util.KeyListener.prototype.enabledEvent=null;YAHOO.util.KeyListener.prototype.disabledEvent=null;

View File

@ -1,947 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
Version: 0.11.1
*/
/**
* @class Provides helper methods for DOM elements.
*/
YAHOO.util.Dom = function() {
var ua = navigator.userAgent.toLowerCase();
var isOpera = (ua.indexOf('opera') > -1);
var isSafari = (ua.indexOf('safari') > -1);
var isIE = (window.ActiveXObject);
var id_counter = 0;
var util = YAHOO.util; // internal shorthand
var property_cache = {}; // to cache case conversion for set/getStyle
var logger = {};
logger.log = function() {YAHOO.log.apply(window, arguments)};
var toCamel = function(property) {
var convert = function(prop) {
var test = /(-[a-z])/i.exec(prop);
return prop.replace(RegExp.$1, RegExp.$1.substr(1).toUpperCase());
};
while(property.indexOf('-') > -1) {
property = convert(property);
}
return property;
//return property.replace(/-([a-z])/gi, function(m0, m1) {return m1.toUpperCase()}) // cant use function as 2nd arg yet due to safari bug
};
var toHyphen = function(property) {
if (property.indexOf('-') > -1) { // assume hyphen
return property;
}
var converted = '';
for (var i = 0, len = property.length;i < len; ++i) {
if (property.charAt(i) == property.charAt(i).toUpperCase()) {
converted = converted + '-' + property.charAt(i).toLowerCase();
} else {
converted = converted + property.charAt(i);
}
}
return converted;
//return property.replace(/([a-z])([A-Z]+)/g, function(m0, m1, m2) {return (m1 + '-' + m2.toLowerCase())});
};
// improve performance by only looking up once
var cacheConvertedProperties = function(property) {
property_cache[property] = {
camel: toCamel(property),
hyphen: toHyphen(property)
};
};
return {
/**
* Returns an HTMLElement reference
* @alias YAHOO.util.Dom.get
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID for getting a DOM reference, an actual DOM reference, or an Array of IDs and/or HTMLElements.
* @return {HTMLElement/Array} A DOM reference to an HTML element or an array of HTMLElements.
*/
get: function(el) {
if (!el) { return null; } // nothing to work with
if (typeof el != 'string' && !(el instanceof Array) ) { // assuming HTMLElement or HTMLCollection, so pass back as is
logger.log('get(' + el + ') returning ' + el, 'info', 'Dom');
return el;
}
if (typeof el == 'string') { // ID
logger.log('get("' + el + '") returning ' + document.getElementById(el), 'info', 'Dom');
return document.getElementById(el);
}
else { // array of ID's and/or elements
var collection = [];
for (var i = 0, len = el.length; i < len; ++i) {
collection[collection.length] = util.Dom.get(el[i]);
}
logger.log('get("' + el + '") returning ' + collection, 'info', 'Dom');
return collection;
}
logger.log('element ' + el + ' not found', 'error', 'Dom');
return null; // safety, should never happen
},
/**
* Normalizes currentStyle and ComputedStyle.
* @alias YAHOO.util.Dom.getStyle
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
* @param {String} property The style property whose value is returned.
* @return {String/Array} The current value of the style property for the element(s).
*/
getStyle: function(el, property) {
var f = function(el) {
var value = null;
var dv = document.defaultView;
if (!property_cache[property]) {
cacheConvertedProperties(property);
}
var camel = property_cache[property]['camel'];
var hyphen = property_cache[property]['hyphen'];
if (property == 'opacity' && el.filters) {// IE opacity
value = 1;
try {
value = el.filters.item('DXImageTransform.Microsoft.Alpha').opacity / 100;
} catch(e) {
try {
value = el.filters.item('alpha').opacity / 100;
} catch(e) {}
}
} else if (el.style[camel]) { // camelCase for valid styles
value = el.style[camel];
}
else if (isIE && el.currentStyle && el.currentStyle[camel]) { // camelCase for currentStyle; isIE to workaround broken Opera 9 currentStyle
value = el.currentStyle[camel];
}
else if ( dv && dv.getComputedStyle ) { // hyphen-case for computedStyle
var computed = dv.getComputedStyle(el, '');
if (computed && computed.getPropertyValue(hyphen)) {
value = computed.getPropertyValue(hyphen);
}
}
logger.log('getStyle ' + property + ' returning ' + value, 'info', 'Dom');
return value;
};
return util.Dom.batch(el, f, util.Dom, true);
},
/**
* Wrapper for setting style properties of HTMLElements. Normalizes "opacity" across modern browsers.
* @alias YAHOO.util.Dom.setStyle
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
* @param {String} property The style property to be set.
* @param {String} val The value to apply to the given property.
*/
setStyle: function(el, property, val) {
if (!property_cache[property]) {
cacheConvertedProperties(property);
}
var camel = property_cache[property]['camel'];
var f = function(el) {
switch(property) {
case 'opacity' :
if (isIE && typeof el.style.filter == 'string') { // in case not appended
el.style.filter = 'alpha(opacity=' + val * 100 + ')';
if (!el.currentStyle || !el.currentStyle.hasLayout) {
el.style.zoom = 1; // when no layout or cant tell
}
} else {
el.style.opacity = val;
el.style['-moz-opacity'] = val;
el.style['-khtml-opacity'] = val;
}
break;
default :
el.style[camel] = val;
}
logger.log('setStyle setting ' + property + ' to ' + val, 'info', 'Dom');
};
util.Dom.batch(el, f, util.Dom, true);
},
/**
* Gets the current position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
* @alias YAHOO.util.Dom.getXY
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
* @return {Array} The XY position of the element(s)
*/
getXY: function(el) {
var f = function(el) {
// has to be part of document to have pageXY
if (el.offsetParent === null || this.getStyle(el, 'display') == 'none') {
logger.log('getXY failed: element not available', 'error', 'Dom');
return false;
}
var parentNode = null;
var pos = [];
var box;
if (el.getBoundingClientRect) { // IE
box = el.getBoundingClientRect();
var doc = document;
if ( !this.inDocument(el) && parent.document != document) {// might be in a frame, need to get its scroll
doc = parent.document;
if ( !this.isAncestor(doc.documentElement, el) ) {
logger.log('getXY failed: element not available', 'error', 'Dom');
return false;
}
}
var scrollTop = Math.max(doc.documentElement.scrollTop, doc.body.scrollTop);
var scrollLeft = Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft);
return [box.left + scrollLeft, box.top + scrollTop];
}
else { // safari, opera, & gecko
pos = [el.offsetLeft, el.offsetTop];
parentNode = el.offsetParent;
if (parentNode != el) {
while (parentNode) {
pos[0] += parentNode.offsetLeft;
pos[1] += parentNode.offsetTop;
parentNode = parentNode.offsetParent;
}
}
if (isSafari && this.getStyle(el, 'position') == 'absolute' ) { // safari doubles in some cases
pos[0] -= document.body.offsetLeft;
pos[1] -= document.body.offsetTop;
}
}
if (el.parentNode) { parentNode = el.parentNode; }
else { parentNode = null; }
while (parentNode && parentNode.tagName.toUpperCase() != 'BODY' && parentNode.tagName.toUpperCase() != 'HTML')
{ // account for any scrolled ancestors
pos[0] -= parentNode.scrollLeft;
pos[1] -= parentNode.scrollTop;
if (parentNode.parentNode) { parentNode = parentNode.parentNode; }
else { parentNode = null; }
}
logger.log('getXY returning ' + pos, 'info', 'Dom');
return pos;
};
return util.Dom.batch(el, f, util.Dom, true);
},
/**
* Gets the current X position of an element based on page coordinates. The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
* @alias YAHOO.util.Dom.getX
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
* @return {String/Array} The X position of the element(s)
*/
getX: function(el) {
return util.Dom.getXY(el)[0];
},
/**
* Gets the current Y position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
* @alias YAHOO.util.Dom.getY
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
* @return {String/Array} The Y position of the element(s)
*/
getY: function(el) {
return util.Dom.getXY(el)[1];
},
/**
* Set the position of an html element in page coordinates, regardless of how the element is positioned.
* The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
* @alias YAHOO.util.Dom.setXY
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
* @param {Array} pos Contains X & Y values for new position (coordinates are page-based)
* @param {Boolean} noRetry By default we try and set the position a second time if the first fails
*/
setXY: function(el, pos, noRetry) {
var f = function(el) {
var style_pos = this.getStyle(el, 'position');
if (style_pos == 'static') { // default to relative
this.setStyle(el, 'position', 'relative');
style_pos = 'relative';
}
var pageXY = this.getXY(el);
if (pageXY === false) { // has to be part of doc to have pageXY
logger.log('setXY failed: element not available', 'error', 'Dom');
return false;
}
var delta = [ // assuming pixels; if not we will have to retry
parseInt( this.getStyle(el, 'left'), 10 ),
parseInt( this.getStyle(el, 'top'), 10 )
];
if ( isNaN(delta[0]) ) {// in case of 'auto'
delta[0] = (style_pos == 'relative') ? 0 : el.offsetLeft;
}
if ( isNaN(delta[1]) ) { // in case of 'auto'
delta[1] = (style_pos == 'relative') ? 0 : el.offsetTop;
}
if (pos[0] !== null) { el.style.left = pos[0] - pageXY[0] + delta[0] + 'px'; }
if (pos[1] !== null) { el.style.top = pos[1] - pageXY[1] + delta[1] + 'px'; }
var newXY = this.getXY(el);
// if retry is true, try one more time if we miss
if (!noRetry && (newXY[0] != pos[0] || newXY[1] != pos[1]) ) {
this.setXY(el, pos, true);
}
logger.log('setXY setting position to ' + pos, 'info', 'Dom');
};
util.Dom.batch(el, f, util.Dom, true);
},
/**
* Set the X position of an html element in page coordinates, regardless of how the element is positioned.
* The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
* @alias YAHOO.util.Dom.setX
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
* @param {Int} x to use as the X coordinate for the element(s).
*/
setX: function(el, x) {
util.Dom.setXY(el, [x, null]);
},
/**
* Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
* The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
* @alias YAHOO.util.Dom.setY
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
* @param {Int} x to use as the Y coordinate for the element(s).
*/
setY: function(el, y) {
util.Dom.setXY(el, [null, y]);
},
/**
* Returns the region position of the given element.
* The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
* @alias YAHOO.util.Dom.getRegion
* @param {String/HTMLElement/Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
* @return {Region/Array} A Region or array of Region instances containing "top, left, bottom, right" member data.
*/
getRegion: function(el) {
var f = function(el) {
var region = new YAHOO.util.Region.getRegion(el);
logger.log('getRegion returning ' + region, 'info', 'Dom');
return region;
};
return util.Dom.batch(el, f, util.Dom, true);
},
/**
* Returns the width of the client (viewport).
* Now using getViewportWidth. This interface left intact for back compat.
* @alias YAHOO.util.Dom.getClientWidth
* @return {Int} The width of the viewable area of the page.
*/
getClientWidth: function() {
return util.Dom.getViewportWidth();
},
/**
* Returns the height of the client (viewport).
* Now using getViewportHeight. This interface left intact for back compat.
* @alias YAHOO.util.Dom.getClientHeight
* @return {Int} The height of the viewable area of the page.
*/
getClientHeight: function() {
return util.Dom.getViewportHeight();
},
/**
* Returns a array of HTMLElements with the given class
* For optimized performance, include a tag and/or root node if possible
* @alias YAHOO.util.Dom.getElementsByClassName
* @param {String} className The class name to match against
* @param {String} tag (optional) The tag name of the elements being collected
* @param {String/HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point
* @return {Array} An array of elements that have the given class name
*/
getElementsByClassName: function(className, tag, root) {
var method = function(el) { return util.Dom.hasClass(el, className) };
return util.Dom.getElementsBy(method, tag, root);
},
/**
* Determines whether an HTMLElement has the given className
* @alias YAHOO.util.Dom.hasClass
* @param {String/HTMLElement/Array} el The element or collection to test
* @param {String} className the class name to search for
* @return {Boolean/Array} A boolean value or array of boolean values
*/
hasClass: function(el, className) {
var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
var f = function(el) {
logger.log('hasClass returning ' + re.test(el['className']), 'info', 'Dom');
return re.test(el['className']);
};
return util.Dom.batch(el, f, util.Dom, true);
},
/**
* Adds a class name to a given element or collection of elements
* @alias YAHOO.util.Dom.addClass
* @param {String/HTMLElement/Array} el The element or collection to add the class to
* @param {String} className the class name to add to the class attribute
*/
addClass: function(el, className) {
var f = function(el) {
if (this.hasClass(el, className)) { return; } // already present
logger.log('addClass adding ' + className, 'info', 'Dom');
el['className'] = [el['className'], className].join(' ');
};
util.Dom.batch(el, f, util.Dom, true);
},
/**
* Removes a class name from a given element or collection of elements
* @alias YAHOO.util.Dom.removeClass
* @param {String/HTMLElement/Array} el The element or collection to remove the class from
* @param {String} className the class name to remove from the class attribute
*/
removeClass: function(el, className) {
var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', 'g');
var f = function(el) {
if (!this.hasClass(el, className)) { return; } // not present
logger.log('removeClass removing ' + className, 'info', 'Dom');
var c = el['className'];
el['className'] = c.replace(re, ' ');
if ( this.hasClass(el, className) ) { // in case of multiple adjacent
this.removeClass(el, className);
}
};
util.Dom.batch(el, f, util.Dom, true);
},
/**
* Replace a class with another class for a given element or collection of elements.
* If no oldClassName is present, the newClassName is simply added.
* @alias YAHOO.util.Dom.replaceClass
* @param {String/HTMLElement/Array} el The element or collection to remove the class from
* @param {String} oldClassName the class name to be replaced
* @param {String} newClassName the class name that will be replacing the old class name
*/
replaceClass: function(el, oldClassName, newClassName) {
var re = new RegExp('(?:^|\\s+)' + oldClassName + '(?:\\s+|$)', 'g');
var f = function(el) {
logger.log('replaceClass replacing ' + oldClassName + ' with ' + newClassName, 'info', 'Dom');
if ( !this.hasClass(el, oldClassName) ) {
this.addClass(el, newClassName); // just add it if nothing to replace
return; // note return
}
el['className'] = el['className'].replace(re, ' ' + newClassName + ' ');
if ( this.hasClass(el, oldClassName) ) { // in case of multiple adjacent
this.replaceClass(el, oldClassName, newClassName);
}
};
util.Dom.batch(el, f, util.Dom, true);
},
/**
* Generates a unique ID
* @alias YAHOO.util.Dom.generateId
* @param {String/HTMLElement/Array} el (optional) An optional element array of elements to add an ID to (no ID is added if one is already present)
* @param {String} prefix (optional) an optional prefix to use (defaults to "yui-gen")
* @return {String/Array} The generated ID, or array of generated IDs (or original ID if already present on an element)
*/
generateId: function(el, prefix) {
prefix = prefix || 'yui-gen';
el = el || {};
var f = function(el) {
if (el) {
el = util.Dom.get(el);
} else {
el = {}; // just generating ID in this case
}
if (!el.id) {
el.id = prefix + id_counter++;
logger.log('generateId generating ' + el.id, 'info', 'Dom');
} // dont override existing
logger.log('generateId returning ' + el.id, 'info', 'Dom');
return el.id;
};
return util.Dom.batch(el, f, util.Dom, true);
},
/**
* Determines whether an HTMLElement is an ancestor of another HTML element in the DOM hierarchy
* @alias YAHOO.util.Dom.isAncestor
* @param {String/HTMLElement} haystack The possible ancestor
* @param {String/HTMLElement} needle The possible descendent
* @return {Boolean} Whether or not the haystack is an ancestor of needle
*/
isAncestor: function(haystack, needle) {
haystack = util.Dom.get(haystack);
if (!haystack || !needle) { return false; }
var f = function(needle) {
if (haystack.contains && !isSafari) { // safari "contains" is broken
logger.log('isAncestor returning ' + haystack.contains(needle), 'info', 'Dom');
return haystack.contains(needle);
}
else if ( haystack.compareDocumentPosition ) {
logger.log('isAncestor returning ' + !!(haystack.compareDocumentPosition(needle) & 16), 'info', 'Dom');
return !!(haystack.compareDocumentPosition(needle) & 16);
}
else { // loop up and test each parent
var parent = needle.parentNode;
while (parent) {
if (parent == haystack) {
logger.log('isAncestor returning true', 'info', 'Dom');
return true;
}
else if (parent.tagName.toUpperCase() == 'HTML') {
logger.log('isAncestor returning false', 'info', 'Dom');
return false;
}
parent = parent.parentNode;
}
logger.log('isAncestor returning false', 'info', 'Dom');
return false;
}
};
return util.Dom.batch(needle, f, util.Dom, true);
},
/**
* Determines whether an HTMLElement is present in the current document
* @alias YAHOO.util.Dom.inDocument
* @param {String/HTMLElement} el The element to search for
* @return {Boolean} Whether or not the element is present in the current document
*/
inDocument: function(el) {
var f = function(el) {
return this.isAncestor(document.documentElement, el);
};
return util.Dom.batch(el, f, util.Dom, true);
},
/**
* Returns a array of HTMLElements that pass the test applied by supplied boolean method
* For optimized performance, include a tag and/or root node if possible
* @alias YAHOO.util.Dom.getElementsBy
* @param {Function} method A boolean method to test elements with
* @param {String} tag (optional) The tag name of the elements being collected
* @param {String/HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point
*/
getElementsBy: function(method, tag, root) {
tag = tag || '*';
root = util.Dom.get(root) || document;
var nodes = [];
var elements = root.getElementsByTagName(tag);
if ( !elements.length && (tag == '*' && root.all) ) {
elements = root.all; // IE < 6
}
for (var i = 0, len = elements.length; i < len; ++i)
{
if ( method(elements[i]) ) { nodes[nodes.length] = elements[i]; }
}
logger.log('getElementsBy returning ' + nodes, 'info', 'Dom');
return nodes;
},
/**
* Returns an array of elements that have had the supplied method applied.
* The method is called with the element(s) as the first arg, and the optional param as the second ( method(el, o) )
* @alias YAHOO.util.Dom.batch
* @param {String/HTMLElement/Array} el (optional) An element or array of elements to apply the method to
* @param {Function} method The method to apply to the element(s)
* @param {Generic} (optional) o An optional arg that is passed to the supplied method
* @param {Boolean} (optional) override Whether or not to override the scope of "method" with "o"
* @return {HTMLElement/Array} The element(s) with the method applied
*/
batch: function(el, method, o, override) {
var id = el;
el = util.Dom.get(el);
var scope = (override) ? o : window;
if (!el || el.tagName || !el.length) { // is null or not a collection (tagName for SELECT and others that can be both an element and a collection)
if (!el) {
logger.log(id + ' not available', 'error', 'Dom');
return false;
}
return method.call(scope, el, o);
}
var collection = [];
for (var i = 0, len = el.length; i < len; ++i) {
if (!el[i]) {
id = id[i];
logger.log(id + ' not available', 'error', 'Dom');
}
collection[collection.length] = method.call(scope, el[i], o);
}
return collection;
},
/**
* Returns the height of the document.
* @alias YAHOO.util.Dom.getDocumentHeight
* @return {Int} The height of the actual document (which includes the body and its margin).
*/
getDocumentHeight: function() {
var scrollHeight=-1,windowHeight=-1,bodyHeight=-1;
var marginTop = parseInt(util.Dom.getStyle(document.body, 'marginTop'), 10);
var marginBottom = parseInt(util.Dom.getStyle(document.body, 'marginBottom'), 10);
var mode = document.compatMode;
if ( (mode || isIE) && !isOpera ) { // (IE, Gecko)
switch (mode) {
case 'CSS1Compat': // Standards mode
scrollHeight = ((window.innerHeight && window.scrollMaxY) ? window.innerHeight+window.scrollMaxY : -1);
windowHeight = [document.documentElement.clientHeight,self.innerHeight||-1].sort(function(a, b){return(a-b);})[1];
bodyHeight = document.body.offsetHeight + marginTop + marginBottom;
break;
default: // Quirks
scrollHeight = document.body.scrollHeight;
bodyHeight = document.body.clientHeight;
}
} else { // Safari & Opera
scrollHeight = document.documentElement.scrollHeight;
windowHeight = self.innerHeight;
bodyHeight = document.documentElement.clientHeight;
}
var h = [scrollHeight,windowHeight,bodyHeight].sort(function(a, b){return(a-b);});
logger.log('getDocumentHeight returning ' + h[2], 'info', 'Dom');
return h[2];
},
/**
* Returns the width of the document.
* @alias YAHOO.util.Dom.getDocumentWidth
* @return {Int} The width of the actual document (which includes the body and its margin).
*/
getDocumentWidth: function() {
var docWidth=-1,bodyWidth=-1,winWidth=-1;
var marginRight = parseInt(util.Dom.getStyle(document.body, 'marginRight'), 10);
var marginLeft = parseInt(util.Dom.getStyle(document.body, 'marginLeft'), 10);
var mode = document.compatMode;
if (mode || isIE) { // (IE, Gecko, Opera)
switch (mode) {
case 'CSS1Compat': // Standards mode
docWidth = document.documentElement.clientWidth;
bodyWidth = document.body.offsetWidth + marginLeft + marginRight;
winWidth = self.innerWidth || -1;
break;
default: // Quirks
bodyWidth = document.body.clientWidth;
winWidth = document.body.scrollWidth;
break;
}
} else { // Safari
docWidth = document.documentElement.clientWidth;
bodyWidth = document.body.offsetWidth + marginLeft + marginRight;
winWidth = self.innerWidth;
}
var w = [docWidth,bodyWidth,winWidth].sort(function(a, b){return(a-b);});
logger.log('getDocumentWidth returning ' + w[2], 'info', 'Dom');
return w[2];
},
/**
* Returns the current height of the viewport.
* @alias YAHOO.util.Dom.getViewportHeight
* @return {Int} The height of the viewable area of the page (excludes scrollbars).
*/
getViewportHeight: function() {
var height = -1;
var mode = document.compatMode;
if ( (mode || isIE) && !isOpera ) {
switch (mode) { // (IE, Gecko)
case 'CSS1Compat': // Standards mode
height = document.documentElement.clientHeight;
break;
default: // Quirks
height = document.body.clientHeight;
}
} else { // Safari, Opera
height = self.innerHeight;
}
logger.log('getViewportHeight returning ' + height, 'info', 'Dom');
return height;
},
/**
* Returns the current width of the viewport.
* @alias YAHOO.util.Dom.getViewportWidth
* @return {Int} The width of the viewable area of the page (excludes scrollbars).
*/
getViewportWidth: function() {
var width = -1;
var mode = document.compatMode;
if (mode || isIE) { // (IE, Gecko, Opera)
switch (mode) {
case 'CSS1Compat': // Standards mode
width = document.documentElement.clientWidth;
break;
default: // Quirks
width = document.body.clientWidth;
}
} else { // Safari
width = self.innerWidth;
}
logger.log('getViewportWidth returning ' + width, 'info', 'Dom');
return width;
}
};
}();
/**
* @class A region is a representation of an object on a grid. It is defined
* by the top, right, bottom, left extents, so is rectangular by default. If
* other shapes are required, this class could be extended to support it.
*
* @param {int} t the top extent
* @param {int} r the right extent
* @param {int} b the bottom extent
* @param {int} l the left extent
* @constructor
*/
YAHOO.util.Region = function(t, r, b, l) {
/**
* The region's top extent
* @type int
*/
this.top = t;
/**
* The region's top extent as index, for symmetry with set/getXY
* @type int
*/
this[1] = t;
/**
* The region's right extent
* @type int
*/
this.right = r;
/**
* The region's bottom extent
* @type int
*/
this.bottom = b;
/**
* The region's left extent
* @type int
*/
this.left = l;
/**
* The region's left extent as index, for symmetry with set/getXY
* @type int
*/
this[0] = l;
};
/**
* Returns true if this region contains the region passed in
*
* @param {Region} region The region to evaluate
* @return {boolean} True if the region is contained with this region,
* else false
*/
YAHOO.util.Region.prototype.contains = function(region) {
return ( region.left >= this.left &&
region.right <= this.right &&
region.top >= this.top &&
region.bottom <= this.bottom );
// this.logger.debug("does " + this + " contain " + region + " ... " + ret);
};
/**
* Returns the area of the region
*
* @return {int} the region's area
*/
YAHOO.util.Region.prototype.getArea = function() {
return ( (this.bottom - this.top) * (this.right - this.left) );
};
/**
* Returns the region where the passed in region overlaps with this one
*
* @param {Region} region The region that intersects
* @return {Region} The overlap region, or null if there is no overlap
*/
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;
}
};
/**
* Returns the region representing the smallest region that can contain both
* the passed in region and this region.
*
* @param {Region} region The region that to create the union with
* @return {Region} The union region
*/
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);
};
/**
* toString
* @return string the region properties
*/
YAHOO.util.Region.prototype.toString = function() {
return ( "Region {" +
"top: " + this.top +
", right: " + this.right +
", bottom: " + this.bottom +
", left: " + this.left +
"}" );
};
/**
* Returns a region that is occupied by the DOM element
*
* @param {HTMLElement} el The element
* @return {Region} The region that the element occupies
* @static
*/
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);
};
/////////////////////////////////////////////////////////////////////////////
/**
* @class
*
* A point is a region that is special in that it represents a single point on
* the grid.
*
* @param {int} x The X position of the point
* @param {int} y The Y position of the point
* @constructor
* @extends Region
*/
YAHOO.util.Point = function(x, y) {
if (x instanceof Array) { // accept output from Dom.getXY
y = x[1];
x = x[0];
}
/**
* The X position of the point, which is also the right, left and index zero (for Dom.getXY symmetry)
* @type int
*/
this.x = this.right = this.left = this[0] = x;
/**
* The Y position of the point, which is also the top, bottom and index one (for Dom.getXY symmetry)
* @type int
*/
this.y = this.top = this.bottom = this[1] = y;
};
YAHOO.util.Point.prototype = new YAHOO.util.Region();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.0
*/
body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}pre, code {font:115% monospace;*font-size:100%;}body * {line-height:1.22em;}

View File

@ -1,7 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.0
*/
body{text-align:center;}#doc{width:57.69em;*width:56.3em;min-width:750px;margin:auto;text-align:left;}#hd,#bd{margin-bottom:1em;text-align:left;}#ft{font-size:77%;font-family:verdana;clear:both;}.yui-t1 #yui-main .yui-b, .yui-t2 #yui-main .yui-b, .yui-t3 #yui-main .yui-b, .yui-t4 .yui-b, .yui-t5 .yui-b, .yui-t6 .yui-b{float:right;}.yui-t1 .yui-b, .yui-t2 .yui-b, .yui-t3 .yui-b, .yui-t4 #yui-main .yui-b, .yui-t5 #yui-main .yui-b, .yui-t6 #yui-main .yui-b{float:left;}.yui-t1 #yui-main .yui-b{width:76%;min-width:570px;}.yui-t1 .yui-b{width:21.33%;min-width:160px;}.yui-t2 #yui-main .yui-b, .yui-t4 #yui-main .yui-b{width:73.4%;min-width:550px;}.yui-t2 .yui-b, .yui-t4 .yui-b{width:24%;min-width:180px;}.yui-t3 #yui-main .yui-b, .yui-t6 #yui-main .yui-b{width:57.6%;min-width:430px;}.yui-t3 .yui-b, .yui-t6 .yui-b{width:40%;min-width:300px;}.yui-t5 #yui-main .yui-b{width:65.4%;min-width:490px;}.yui-t5 .yui-b{width:32%;min-width:240px;}.yui-g .yui-u, .yui-g .yui-g, .yui-ge .yui-u, .yui-gf .yui-u{float:right;display:inline;}.yui-g .first, .yui-gd .first, .yui-ge .first, .yui-gf .first{float:left;}.yui-g .yui-u, .yui-g .yui-g{width:49.1%;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-gb .yui-u, .yui-gc .yui-u, .yui-gd .yui-u{float:left;margin-left:2%;*margin-left:1.895%;width:32%;}.yui-gb .first, .yui-gc .first, .yui-gd .first{margin-left:0;}.yui-gc .first, .yui-gd .yui-u{width:66%;}.yui-gd .first{width:32%;}.yui-ge .yui-u{width:24%;}.yui-ge .first, .yui-gf .yui-u{width:74.2%;}.yui-gf .first{width:24%;}.yui-ge .first{width:74.2%;}#bd:after, .yui-g:after, .yui-gb:after, .yui-gc:after, .yui-gd:after, .yui-ge:after, .yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#bd, .yui-g, .yui-gb, .yui-gc, .yui-gd, .yui-ge, .yui-gf{zoom:1;}

View File

@ -1,20 +0,0 @@
/* logger default styles */
/* font size is controlled here: default 77% */
#yui-log {position:absolute;top:1em;right:1em;font-size:77%;text-align:left;}
/* width is controlled here: default 31em */
.yui-log {padding:1em;width:31em;background-color:#AAA;border:1px solid black;font-family:monospace;z-index:9000;}
.yui-log p {margin:1px;padding:.1em;}
.yui-log button {font-family:monospace;}
.yui-log .yui-log-hd {margin-top:1em;padding:.5em;background-color:#575757;color:#FFF;}
/* height is controlled here: default 20em*/
.yui-log .yui-log-bd {width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}
.yui-log .yui-log-ft {margin-top:.5em;margin-bottom:1em;}
.yui-log .yui-log-ft .yui-log-categoryfilters {}
.yui-log .yui-log-ft .yui-log-sourcefilters {width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}
.yui-log .yui-log-btns {position:relative;float:right;bottom:.25em;}
.yui-log .yui-log-filtergrp {margin-right:.5em;}
.yui-log .info {background-color:#A7CC25;} /* A7CC25 green */
.yui-log .warn {background-color:#F58516;} /* F58516 orange */
.yui-log .error {background-color:#E32F0B;} /* E32F0B red */
.yui-log .time {background-color:#A6C9D7;} /* A6C9D7 blue */
.yui-log .window {background-color:#F2E886;} /* F2E886 tan */

View File

@ -1,63 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.0
*/
YAHOO.widget.Logger={loggerEnabled:true,_firebugEnabled:true,categories:["info","warn","error","time","window"],sources:["global"],_stack:[],_startTime:new Date().getTime(),_lastTime:null};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger.log=function(sMsg,sCategory,sSource){if(this.loggerEnabled){if(!sCategory){sCategory="info";}
else if(this._isNewCategory(sCategory)){this._createNewCategory(sCategory);}
var sClass="global";var sDetail=null;if(sSource){var spaceIndex=sSource.indexOf(" ");if(spaceIndex>0){sClass=sSource.substring(0,spaceIndex);sDetail=sSource.substring(spaceIndex,sSource.length);}
else{sClass=sSource;}
if(this._isNewSource(sClass)){this._createNewSource(sClass);}}
var timestamp=new Date();var logEntry={time:timestamp,category:sCategory,source:sClass,sourceDetail:sDetail,msg:sMsg};this._stack.push(logEntry);this.newLogEvent.fire(logEntry);if(this._firebugEnabled){this._printToFirebug(logEntry);}
return true;}
else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log(null,"Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableFirebug=function(){YAHOO.log("YAHOO.Logger output to Firebug has been disabled.");this._firebugEnabled=false;};YAHOO.widget.Logger.enableFirebug=function(){this._firebugEnabled=true;YAHOO.log("YAHOO.Logger output to Firebug has been enabled.");};YAHOO.widget.Logger._createNewCategory=function(category){this.categories.push(category);this.categoryCreateEvent.fire(category);};YAHOO.widget.Logger._isNewCategory=function(category){for(var i=0;i<this.categories.length;i++){if(category==this.categories[i]){return false;}}
return true;};YAHOO.widget.Logger._createNewSource=function(source){this.sources.push(source);this.sourceCreateEvent.fire(source);};YAHOO.widget.Logger._isNewSource=function(source){if(source){for(var i=0;i<this.sources.length;i++){if(source==this.sources[i]){return false;}}
return true;}};YAHOO.widget.Logger._printToFirebug=function(entry){if(window.console&&console.log){var category=entry.category;var label=entry.category.substring(0,4).toUpperCase();var time=entry.time;if(time.toLocaleTimeString){var localTime=time.toLocaleTimeString();}
else{localTime=time.toString();}
var msecs=time.getTime();var elapsedTime=(YAHOO.widget.Logger._lastTime)?(msecs-YAHOO.widget.Logger._lastTime):0;YAHOO.widget.Logger._lastTime=msecs;var output=localTime+" ("+
elapsedTime+"ms): "+
entry.source+": "+
entry.msg;console.log(output);}};YAHOO.widget.Logger._onWindowError=function(msg,url,line){try{YAHOO.widget.Logger.log(msg+' ('+url+', line '+line+')',"window");if(YAHOO.widget.Logger._origOnWindowError){YAHOO.widget.Logger._origOnWindowError();}}
catch(e){return false;}};if(window.onerror){YAHOO.widget.Logger._origOnWindowError=window.onerror;}
window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger.log("Logger initialized");YAHOO.widget.LogWriter=function(sSource){if(!sSource){YAHOO.log("Could not instantiate LogWriter due to invalid source.","error","LogWriter");return;}
this._source=sSource;};YAHOO.widget.LogWriter.prototype.toString=function(){return"LogWriter "+this._sSource;};YAHOO.widget.LogWriter.prototype.log=function(sMsg,sCategory){YAHOO.widget.Logger.log(sMsg,sCategory,this._source);};YAHOO.widget.LogWriter.prototype.getSource=function(){return this._sSource;};YAHOO.widget.LogWriter.prototype.setSource=function(sSource){if(!sSource){YAHOO.log("Could not set source due to invalid source.","error",this.toString());return;}
else{this._sSource=sSource;}};YAHOO.widget.LogWriter.prototype._source=null;YAHOO.widget.LogReader=function(containerEl,oConfig){var oSelf=this;if(typeof oConfig=="object"){for(var param in oConfig){this[param]=oConfig[param];}}
if(containerEl){if(typeof containerEl=="string"){this._containerEl=document.getElementById(containerEl);}
else if(containerEl.tagName){this._containerEl=containerEl;}
this._containerEl.className="yui-log";}
if(!this._containerEl){if(YAHOO.widget.LogReader._defaultContainerEl){this._containerEl=YAHOO.widget.LogReader._defaultContainerEl;}
else{this._containerEl=document.body.appendChild(document.createElement("div"));this._containerEl.id="yui-log";this._containerEl.className="yui-log";YAHOO.widget.LogReader._defaultContainerEl=this._containerEl;}
var containerStyle=this._containerEl.style;if(this.width){containerStyle.width=this.width;}
if(this.left){containerStyle.left=this.left;}
if(this.right){containerStyle.right=this.right;}
if(this.bottom){containerStyle.bottom=this.bottom;}
if(this.top){containerStyle.top=this.top;}
if(this.fontSize){containerStyle.fontSize=this.fontSize;}}
if(this._containerEl){if(!this._hdEl){this._hdEl=this._containerEl.appendChild(document.createElement("div"));this._hdEl.id="yui-log-hd"+YAHOO.widget.LogReader._index;this._hdEl.className="yui-log-hd";this._collapseEl=this._hdEl.appendChild(document.createElement("div"));this._collapseEl.className="yui-log-btns";this._collapseBtn=document.createElement("input");this._collapseBtn.type="button";this._collapseBtn.style.fontSize=YAHOO.util.Dom.getStyle(this._containerEl,"fontSize");this._collapseBtn.className="yui-log-button";this._collapseBtn.value="Collapse";this._collapseBtn=this._collapseEl.appendChild(this._collapseBtn);YAHOO.util.Event.addListener(oSelf._collapseBtn,'click',oSelf._onClickCollapseBtn,oSelf);this._title=this._hdEl.appendChild(document.createElement("h4"));this._title.innerHTML="Logger Console";if(YAHOO.util.DD&&(YAHOO.widget.LogReader._defaultContainerEl==this._containerEl)){var ylog_dd=new YAHOO.util.DD(this._containerEl.id);ylog_dd.setHandleElId(this._hdEl.id);this._hdEl.style.cursor="move";}}
if(!this._consoleEl){this._consoleEl=this._containerEl.appendChild(document.createElement("div"));this._consoleEl.className="yui-log-bd";if(this.height){this._consoleEl.style.height=this.height;}}
if(!this._ftEl&&this.footerEnabled){this._ftEl=this._containerEl.appendChild(document.createElement("div"));this._ftEl.className="yui-log-ft";this._btnsEl=this._ftEl.appendChild(document.createElement("div"));this._btnsEl.className="yui-log-btns";this._pauseBtn=document.createElement("input");this._pauseBtn.type="button";this._pauseBtn.style.fontSize=YAHOO.util.Dom.getStyle(this._containerEl,"fontSize");this._pauseBtn.className="yui-log-button";this._pauseBtn.value="Pause";this._pauseBtn=this._btnsEl.appendChild(this._pauseBtn);YAHOO.util.Event.addListener(oSelf._pauseBtn,'click',oSelf._onClickPauseBtn,oSelf);this._clearBtn=document.createElement("input");this._clearBtn.type="button";this._clearBtn.style.fontSize=YAHOO.util.Dom.getStyle(this._containerEl,"fontSize");this._clearBtn.className="yui-log-button";this._clearBtn.value="Clear";this._clearBtn=this._btnsEl.appendChild(this._clearBtn);YAHOO.util.Event.addListener(oSelf._clearBtn,'click',oSelf._onClickClearBtn,oSelf);this._categoryFiltersEl=this._ftEl.appendChild(document.createElement("div"));this._categoryFiltersEl.className="yui-log-categoryfilters";this._sourceFiltersEl=this._ftEl.appendChild(document.createElement("div"));this._sourceFiltersEl.className="yui-log-sourcefilters";}}
if(!this._buffer){this._buffer=[];}
YAHOO.widget.Logger.newLogEvent.subscribe(this._onNewLog,this);this._lastTime=YAHOO.widget.Logger.getStartTime();this._categoryFilters=[];var catsLen=YAHOO.widget.Logger.categories.length;if(this._categoryFiltersEl){for(var i=0;i<catsLen;i++){this._createCategoryCheckbox(YAHOO.widget.Logger.categories[i]);}}
this._sourceFilters=[];var sourcesLen=YAHOO.widget.Logger.sources.length;if(this._sourceFiltersEl){for(var j=0;j<sourcesLen;j++){this._createSourceCheckbox(YAHOO.widget.Logger.sources[j]);}}
YAHOO.widget.Logger.categoryCreateEvent.subscribe(this._onCategoryCreate,this);YAHOO.widget.Logger.sourceCreateEvent.subscribe(this._onSourceCreate,this);YAHOO.widget.LogReader._index++;this._filterLogs();};YAHOO.widget.LogReader.prototype.logReaderEnabled=true;YAHOO.widget.LogReader.prototype.width=null;YAHOO.widget.LogReader.prototype.height=null;YAHOO.widget.LogReader.prototype.top=null;YAHOO.widget.LogReader.prototype.left=null;YAHOO.widget.LogReader.prototype.right=null;YAHOO.widget.LogReader.prototype.bottom=null;YAHOO.widget.LogReader.prototype.fontSize=null;YAHOO.widget.LogReader.prototype.footerEnabled=true;YAHOO.widget.LogReader.prototype.verboseOutput=true;YAHOO.widget.LogReader.prototype.newestOnTop=true;YAHOO.widget.LogReader.prototype.pause=function(){this._timeout=null;this.logReaderEnabled=false;};YAHOO.widget.LogReader.prototype.resume=function(){this.logReaderEnabled=true;this._printBuffer();};YAHOO.widget.LogReader.prototype.hide=function(){this._containerEl.style.display="none";};YAHOO.widget.LogReader.prototype.show=function(){this._containerEl.style.display="block";};YAHOO.widget.LogReader.prototype.setTitle=function(sTitle){var regEx=/>/g;sTitle=sTitle.replace(regEx,"&gt;");regEx=/</g;sTitle=sTitle.replace(regEx,"&lt;");this._title.innerHTML=(sTitle);};YAHOO.widget.LogReader._index=0;YAHOO.widget.LogReader._defaultContainerEl=null;YAHOO.widget.LogReader.prototype._buffer=null;YAHOO.widget.LogReader.prototype._lastTime=null;YAHOO.widget.LogReader.prototype._timeout=null;YAHOO.widget.LogReader.prototype._categoryFilters=null;YAHOO.widget.LogReader.prototype._sourceFilters=null;YAHOO.widget.LogReader.prototype._containerEl=null;YAHOO.widget.LogReader.prototype._hdEl=null;YAHOO.widget.LogReader.prototype._collapseEl=null;YAHOO.widget.LogReader.prototype._collapseBtn=null;YAHOO.widget.LogReader.prototype._title=null;YAHOO.widget.LogReader.prototype._consoleEl=null;YAHOO.widget.LogReader.prototype._ftEl=null;YAHOO.widget.LogReader.prototype._btnsEl=null;YAHOO.widget.LogReader.prototype._categoryFiltersEl=null;YAHOO.widget.LogReader.prototype._sourceFiltersEl=null;YAHOO.widget.LogReader.prototype._pauseBtn=null;YAHOO.widget.LogReader.prototype._clearBtn=null;YAHOO.widget.LogReader.prototype._createCategoryCheckbox=function(category){var oSelf=this;if(this._ftEl){var parentEl=this._categoryFiltersEl;var filters=this._categoryFilters;var filterEl=parentEl.appendChild(document.createElement("span"));filterEl.className="yui-log-filtergrp";var categoryChk=document.createElement("input");categoryChk.id="yui-log-filter-"+category+YAHOO.widget.LogReader._index;categoryChk.className="yui-log-filter-"+category;categoryChk.type="checkbox";categoryChk.category=category;categoryChk=filterEl.appendChild(categoryChk);categoryChk.checked=true;filters.push(category);YAHOO.util.Event.addListener(categoryChk,'click',oSelf._onCheckCategory,oSelf);var categoryChkLbl=filterEl.appendChild(document.createElement("label"));categoryChkLbl.htmlFor=categoryChk.id;categoryChkLbl.className=category;categoryChkLbl.innerHTML=category;}};YAHOO.widget.LogReader.prototype._createSourceCheckbox=function(source){var oSelf=this;if(this._ftEl){var parentEl=this._sourceFiltersEl;var filters=this._sourceFilters;var filterEl=parentEl.appendChild(document.createElement("span"));filterEl.className="yui-log-filtergrp";var sourceChk=document.createElement("input");sourceChk.id="yui-log-filter"+source+YAHOO.widget.LogReader._index;sourceChk.className="yui-log-filter"+source;sourceChk.type="checkbox";sourceChk.source=source;sourceChk=filterEl.appendChild(sourceChk);sourceChk.checked=true;filters.push(source);YAHOO.util.Event.addListener(sourceChk,'click',oSelf._onCheckSource,oSelf);var sourceChkLbl=filterEl.appendChild(document.createElement("label"));sourceChkLbl.htmlFor=sourceChk.id;sourceChkLbl.className=source;sourceChkLbl.innerHTML=source;}};YAHOO.widget.LogReader.prototype._filterLogs=function(){if(this._consoleEl!==null){this._clearConsole();this._printToConsole(YAHOO.widget.Logger.getStack());}};YAHOO.widget.LogReader.prototype._clearConsole=function(){this._timeout=null;this._buffer=[];this._lastTime=YAHOO.widget.Logger.getStartTime();var consoleEl=this._consoleEl;while(consoleEl.hasChildNodes()){consoleEl.removeChild(consoleEl.firstChild);}};YAHOO.widget.LogReader.prototype._printBuffer=function(){this._timeout=null;if(this._consoleEl!==null){var entries=[];for(var i=0;i<this._buffer.length;i++){entries[i]=this._buffer[i];}
this._buffer=[];this._printToConsole(entries);if(!this.newestOnTop){this._consoleEl.scrollTop=this._consoleEl.scrollHeight;}}};YAHOO.widget.LogReader.prototype._printToConsole=function(aEntries){var entriesLen=aEntries.length;var sourceFiltersLen=this._sourceFilters.length;var categoryFiltersLen=this._categoryFilters.length;for(var i=0;i<entriesLen;i++){var entry=aEntries[i];var category=entry.category;var source=entry.source;var sourceDetail=entry.sourceDetail;var okToPrint=false;var okToFilterCats=false;for(var j=0;j<sourceFiltersLen;j++){if(source==this._sourceFilters[j]){okToFilterCats=true;break;}}
if(okToFilterCats){for(var k=0;k<categoryFiltersLen;k++){if(category==this._categoryFilters[k]){okToPrint=true;break;}}}
if(okToPrint){var label=entry.category.substring(0,4).toUpperCase();var time=entry.time;if(time.toLocaleTimeString){var localTime=time.toLocaleTimeString();}
else{localTime=time.toString();}
var msecs=time.getTime();var startTime=YAHOO.widget.Logger.getStartTime();var totalTime=msecs-startTime;var elapsedTime=msecs-this._lastTime;this._lastTime=msecs;var verboseOutput=(this.verboseOutput)?"<br>":"";var sourceAndDetail=(sourceDetail)?source+" "+sourceDetail:source;var output="<span class='"+category+"'>"+label+"</span> "+
totalTime+"ms (+"+
elapsedTime+") "+localTime+": "+
sourceAndDetail+": "+
verboseOutput+
entry.msg;var oNewElement=(this.newestOnTop)?this._consoleEl.insertBefore(document.createElement("p"),this._consoleEl.firstChild):this._consoleEl.appendChild(document.createElement("p"));oNewElement.innerHTML=output;}}};YAHOO.widget.LogReader.prototype._onCategoryCreate=function(type,args,oSelf){var category=args[0];if(oSelf._ftEl){oSelf._createCategoryCheckbox(category);}};YAHOO.widget.LogReader.prototype._onSourceCreate=function(type,args,oSelf){var source=args[0];if(oSelf._ftEl){oSelf._createSourceCheckbox(source);}};YAHOO.widget.LogReader.prototype._onCheckCategory=function(v,oSelf){var newFilter=this.category;var filtersArray=oSelf._categoryFilters;if(!this.checked){for(var i=0;i<filtersArray.length;i++){if(newFilter==filtersArray[i]){filtersArray.splice(i,1);break;}}}
else{filtersArray.push(newFilter);}
oSelf._filterLogs();};YAHOO.widget.LogReader.prototype._onCheckSource=function(v,oSelf){var newFilter=this.source;var filtersArray=oSelf._sourceFilters;if(!this.checked){for(var i=0;i<filtersArray.length;i++){if(newFilter==filtersArray[i]){filtersArray.splice(i,1);break;}}}
else{filtersArray.push(newFilter);}
oSelf._filterLogs();};YAHOO.widget.LogReader.prototype._onClickCollapseBtn=function(v,oSelf){var btn=oSelf._collapseBtn;if(btn.value=="Expand"){oSelf._consoleEl.style.display="block";if(oSelf._ftEl){oSelf._ftEl.style.display="block";}
btn.value="Collapse";}
else{oSelf._consoleEl.style.display="none";if(oSelf._ftEl){oSelf._ftEl.style.display="none";}
btn.value="Expand";}};YAHOO.widget.LogReader.prototype._onClickPauseBtn=function(v,oSelf){var btn=oSelf._pauseBtn;if(btn.value=="Resume"){oSelf.resume();btn.value="Pause";}
else{oSelf.pause();btn.value="Resume";}};YAHOO.widget.LogReader.prototype._onClickClearBtn=function(v,oSelf){oSelf._clearConsole();};YAHOO.widget.LogReader.prototype._onNewLog=function(type,args,oSelf){var logEntry=args[0];oSelf._buffer.push(logEntry);if(oSelf.logReaderEnabled===true&&oSelf._timeout===null){oSelf._timeout=setTimeout(function(){oSelf._printBuffer();},100);}};

View File

@ -1,288 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
Version 0.11.0
*/
/* Menu styles */
div.yuimenu {
z-index:1;
visibility:hidden;
background-color:#f6f7ee;
border:solid 1px #c4c4be;
padding:1px;
}
/* MenuBar Styles */
div.yuimenubar {
background-color:#f6f7ee;
}
/*
Application of "zoom:1" triggers "haslayout" in IE so that the module's
body clears its floated elements
*/
div.yuimenubar div.bd {
zoom:1;
}
/*
Clear the module body for other browsers
*/
div.yuimenubar div.bd:after {
content:'.';
display:block;
clear:both;
visibility:hidden;
height:0;
}
/* Matches the group title (H6) inside a Menu or MenuBar instance */
div.yuimenu h6,
div.yuimenubar h6 {
font-size:100%;
font-weight:normal;
margin:0;
border:solid 1px #c4c4be;
color:#b9b9b9;
}
div.yuimenubar h6 {
float:left;
display:inline; /* Prevent margin doubling in IE */
padding:4px 12px;
border-width:0 1px 0 0;
}
div.yuimenu h6 {
float:none;
display:block;
border-width:1px 0 0 0;
padding:5px 10px 0 10px;
}
/* Matches the UL inside a Menu or MenuBar instance */
div.yuimenubar ul {
list-style-type:none;
margin:0;
padding:0;
overflow:hidden;
}
div.yuimenu ul {
list-style-type:none;
border:solid 1px #c4c4be;
border-width:1px 0 0 0;
margin:0;
padding:10px 0;
}
div.yuimenu ul.first-of-type,
div.yuimenu ul.hastitle,
div.yuimenu h6.first-of-type {
border-width:0;
}
/* MenuItem and MenuBarItem styles */
div.yuimenu li,
div.yuimenubar li {
font-size:85%;
cursor:pointer;
cursor:hand;
white-space:nowrap;
text-align:left;
}
div.yuimenu li.yuimenuitem {
padding:2px 24px;
}
div.yuimenu li li,
div.yuimenubar li li {
font-size:100%;
}
/* Matches the help text for a menu item */
div.yuimenu li em {
font-style:normal;
margin:0 0 0 40px;
}
div.yuimenu li a em {
margin:0;
}
div.yuimenu li a,
div.yuimenubar li a {
/*
"zoom:1" triggers "haslayout" in IE to ensure that the mouseover and
mouseout events bubble to the parent LI in IE.
*/
zoom:1;
color:#000;
text-decoration:none;
}
div.yuimenu li.hassubmenu,
div.yuimenu li.hashelptext {
text-align:right;
}
div.yuimenu li.hassubmenu a.hassubmenu,
div.yuimenu li.hashelptext a.hashelptext {
float:left;
display:inline; /* Prevent margin doubling in IE */
text-align:left;
}
/* Matches focused and selected menu items */
div.yuimenu li.selected,
div.yuimenubar li.selected {
background-color:#8c8ad0;
}
div.yuimenu li.selected a.selected,
div.yuimenubar li.selected a.selected {
text-decoration:underline;
}
div.yuimenu li.selected a.selected,
div.yuimenu li.selected em.selected,
div.yuimenubar li.selected a.selected {
color:#fff;
}
/* Matches disabled menu items */
div.yuimenu li.disabled,
div.yuimenubar li.disabled {
cursor:default;
}
div.yuimenu li.disabled a.disabled,
div.yuimenu li.disabled em.disabled,
div.yuimenubar li.disabled a.disabled {
color:#b9b9b9;
cursor:default;
}
div.yuimenubar li.yuimenubaritem {
float:left;
display:inline; /* Prevent margin doubling in IE */
border-width:0 0 0 1px;
border-style:solid;
border-color:#c4c4be;
padding:4px 24px;
margin:0;
}
div.yuimenubar li.yuimenubaritem.first-of-type {
border-width:0;
}
/* Matches the submenu indicator for menu items */
div.yuimenubar li.yuimenubaritem img {
height:8px;
width:8px;
margin:0 0 0 10px;
vertical-align:middle;
}
div.yuimenu li.yuimenuitem img {
height:8px;
width:8px;
margin:0 -16px 0 10px;
border:0;
}
div.yuimenu li.checked {
position:relative;
}
div.yuimenu li.checked img.checked {
height:8px;
width:8px;
margin:0;
border:0;
position:absolute;
left:6px;
_left:-16px; /* Underscore hack b/c this is for IE 5.5 and IE 6 only */
top:.5em;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 B

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.0
*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';}

View File

@ -1,945 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.0
*/
/**
* A DragDrop implementation that can be used as a background for a
* slider. It takes a reference to the thumb instance
* so it can delegate some of the events to it. The goal is to make the
* thumb jump to the location on the background when the background is
* clicked.
*
* @extends YAHOO.util.DragDrop
* @constructor
* @param {String} id The id of the element linked to this instance
* @param {String} sGroup The group of related DragDrop items
* @param {String} sType The type of slider (horiz, vert, region)
*/
YAHOO.widget.Slider = function(sElementId, sGroup, oThumb, sType) {
if (sElementId) {
/**
* The type of the slider (horiz, vert, region)
* @type string
*/
this.type = sType;
this.init(sElementId, sGroup, true);
this.logger = new YAHOO.widget.LogWriter(this.toString());
var self = this;
/**
* a YAHOO.widget.SliderThumb instance that we will use to
* reposition the thumb when the background is clicked
*
* @type Slider
*/
this.thumb = oThumb;
// add handler for the handle onchange event
oThumb.onChange = function() {
self.onThumbChange();
};
/**
* Overrides the isTarget property in YAHOO.util.DragDrop
* @private
*/
this.isTarget = false;
/**
* Flag that determines if the thumb will animate when moved
* @type boolean
*/
this.animate = YAHOO.widget.Slider.ANIM_AVAIL;
/**
* Set to false to disable a background click thumb move
*/
this.backgroundEnabled = true;
/**
* Adjustment factor for tick animation, the more ticks, the
* faster the animation (by default)
*
* @type int
*/
this.tickPause = 40;
if (oThumb._isHoriz && oThumb.xTicks && oThumb.xTicks.length) {
this.tickPause = Math.round(360 / oThumb.xTicks.length);
} else if (oThumb.yTicks && oThumb.yTicks.length) {
this.tickPause = Math.round(360 / oThumb.yTicks.length);
}
this.logger.log("tickPause: " + this.tickPause);
// delegate thumb methods
oThumb.onMouseDown = function () { return self.focus(); };
//oThumb.b4MouseDown = function () { return self.b4MouseDown(); };
// oThumb.lock = function() { self.lock(); };
// oThumb.unlock = function() { self.unlock(); };
oThumb.onMouseUp = function() { self.thumbMouseUp(); };
oThumb.onDrag = function() { self.fireEvents(); };
oThumb.onAvailable = function() { return self.setStartSliderState(); };
}
};
//YAHOO.widget.Slider.prototype = new YAHOO.util.DragDrop();
YAHOO.extend(YAHOO.widget.Slider, YAHOO.util.DragDrop);
// YAHOO.widget.Slider.prototype.onAvailable = function() {
// this.logger.log("bg avail");
// };
/**
* Factory method for creating a horizontal slider
*
* @param {String} sBGElId the id of the slider's background element
* @param {String} sHandleElId the id of the thumb element
* @param {int} iLeft the number of pixels the element can move left
* @param {int} iRight the number of pixels the element can move right
* @param {int} iTickSize optional parameter for specifying that the element
* should move a certain number pixels at a time.
* @return {Slider} a horizontal slider control
*/
YAHOO.widget.Slider.getHorizSlider =
function (sBGElId, sHandleElId, iLeft, iRight, iTickSize) {
return new YAHOO.widget.Slider(sBGElId, sBGElId,
new YAHOO.widget.SliderThumb(sHandleElId, sBGElId,
iLeft, iRight, 0, 0, iTickSize), "horiz");
};
/**
* Factory method for creating a vertical slider
*
* @param {String} sBGElId the id of the slider's background element
* @param {String} sHandleElId the id of the thumb element
* @param {int} iUp the number of pixels the element can move up
* @param {int} iDown the number of pixels the element can move down
* @param {int} iTickSize optional parameter for specifying that the element
* should move a certain number pixels at a time.
* @return {Slider} a vertical slider control
*/
YAHOO.widget.Slider.getVertSlider =
function (sBGElId, sHandleElId, iUp, iDown, iTickSize) {
return new YAHOO.widget.Slider(sBGElId, sBGElId,
new YAHOO.widget.SliderThumb(sHandleElId, sBGElId, 0, 0,
iUp, iDown, iTickSize), "vert");
};
/**
* Factory method for creating a slider region like the one in the color
* picker example
*
* @param {String} sBGElId the id of the slider's background element
* @param {String} sHandleElId the id of the thumb element
* @param {int} iLeft the number of pixels the element can move left
* @param {int} iRight the number of pixels the element can move right
* @param {int} iUp the number of pixels the element can move up
* @param {int} iDown the number of pixels the element can move down
* @param {int} iTickSize optional parameter for specifying that the element
* should move a certain number pixels at a time.
* @return {Slider} a slider region control
*/
YAHOO.widget.Slider.getSliderRegion =
function (sBGElId, sHandleElId, iLeft, iRight, iUp, iDown, iTickSize) {
return new YAHOO.widget.Slider(sBGElId, sBGElId,
new YAHOO.widget.SliderThumb(sHandleElId, sBGElId, iLeft, iRight,
iUp, iDown, iTickSize), "region");
};
/**
* By default, animation is available if the animation library is detected.
* @type boolean
*/
YAHOO.widget.Slider.ANIM_AVAIL = true;
YAHOO.widget.Slider.prototype.setStartSliderState = function() {
this.logger.log("Fixing state");
this.setThumbCenterPoint();
/**
* The basline position of the background element, used
* to determine if the background has moved since the last
* operation.
* @type int[]
*/
this.baselinePos = YAHOO.util.Dom.getXY(this.getEl());
this.thumb.startOffset = this.thumb.getOffsetFromParent(this.baselinePos);
if (this.thumb._isRegion) {
if (this.deferredSetRegionValue) {
this.setRegionValue.apply(this, this.deferredSetRegionValue, true);
} else {
this.setRegionValue(0, 0, true);
}
} else {
if (this.deferredSetValue) {
this.setValue.apply(this, this.deferredSetValue, true);
} else {
this.setValue(0, true, true);
}
}
};
YAHOO.widget.Slider.prototype.setThumbCenterPoint = function() {
var el = this.thumb.getEl();
if (el) {
/**
* the center of the slider element is stored so we can position
* place it in the correct position when the background is clicked
*
* @type Coordinate
*/
this.thumbCenterPoint = {
x: parseInt(el.offsetWidth/2, 10),
y: parseInt(el.offsetHeight/2, 10)
};
}
};
/**
* Lock the slider, overrides YAHOO.util.DragDrop
*/
YAHOO.widget.Slider.prototype.lock = function() {
this.logger.log("locking");
this.thumb.lock();
this.locked = true;
};
/**
* Unlock the slider, overrides YAHOO.util.DragDrop
*/
YAHOO.widget.Slider.prototype.unlock = function() {
this.logger.log("unlocking");
this.thumb.unlock();
this.locked = false;
};
/**
* handles mouseup event on the slider background
*
* @private
*/
YAHOO.widget.Slider.prototype.thumbMouseUp = function() {
this.logger.log("bg mouseup");
if (!this.isLocked() && !this.moveComplete) {
this.endMove();
}
};
/**
* Returns a reference to this slider's thumb
*/
YAHOO.widget.Slider.prototype.getThumb = function() {
return this.thumb;
};
/**
* Try to focus the element when clicked so we can add
* accessibility features
*
* @private
*/
YAHOO.widget.Slider.prototype.focus = function() {
this.logger.log("focus");
// Focus the background element if possible
var el = this.getEl();
if (el.focus) {
el.focus();
}
this.verifyOffset();
if (this.isLocked()) {
return false;
} else {
this.onSlideStart();
return true;
}
};
/**
* Event that fires when the value of the slider has changed
*
* @param {int} offsetFromStart the number of pixels the thumb has moved
* from its start position. Normal horizontal and vertical sliders will only
* have the firstOffset. Regions will have both, the first is the horizontal
* offset, the second the vertical.
*/
YAHOO.widget.Slider.prototype.onChange = function (firstOffset, secondOffset) {
/* override me */
this.logger.log("onChange: " + firstOffset + ", " + secondOffset);
};
/**
* Event that fires when the at the beginning of the slider thumb move
*/
YAHOO.widget.Slider.prototype.onSlideStart = function () {
/* override me */
this.logger.log("onSlideStart");
};
/**
* Event that fires at the end of a slider thumb move
*/
YAHOO.widget.Slider.prototype.onSlideEnd = function () {
/* override me */
this.logger.log("onSlideEnd");
};
/**
* Returns the slider's thumb offset from the start position
*
* @return {int} the current value
*/
YAHOO.widget.Slider.prototype.getValue = function () {
return this.thumb.getValue();
};
/**
* Returns the slider's thumb X offset from the start position
*
* @return {int} the current horizontal offset
*/
YAHOO.widget.Slider.prototype.getXValue = function () {
return this.thumb.getXValue();
};
/**
* Returns the slider's thumb Y offset from the start position
*
* @return {int} the current vertical offset
*/
YAHOO.widget.Slider.prototype.getYValue = function () {
return this.thumb.getYValue();
};
/**
* Internal handler for the slider thumb's onChange event
* @private
*/
YAHOO.widget.Slider.prototype.onThumbChange = function () {
var t = this.thumb;
if (t._isRegion) {
t.onChange(t.getXValue(), t.getYValue());
} else {
t.onChange(t.getValue());
}
};
/**
* Provides a way to set the value of the slider in code.
*
* @param {int} newOffset the number of pixels the thumb should be
* positioned away from the initial start point
* @param {boolean} skipAnim set to true to disable the animation
* for this move action (but not others).
* @param {boolean} force ignore the locked setting and set value anyway
* @return {boolean} true if the move was performed, false if it failed
*/
YAHOO.widget.Slider.prototype.setValue = function(newOffset, skipAnim, force) {
this.logger.log("setValue " + newOffset);
if (!this.thumb.available) {
this.logger.log("defer setValue until after onAvailble");
this.deferredSetValue = arguments;
return false;
}
if (this.isLocked() && !force) {
this.logger.log("Can't set the value, the control is locked");
return false;
}
if ( isNaN(newOffset) ) {
this.logger.log("setValue, Illegal argument: " + newOffset);
return false;
}
var t = this.thumb;
var newX, newY;
this.verifyOffset();
if (t._isRegion) {
return false;
} else if (t._isHoriz) {
this.onSlideStart();
newX = t.initPageX + newOffset + this.thumbCenterPoint.x;
this.moveThumb(newX, t.initPageY, skipAnim);
} else {
this.onSlideStart();
newY = t.initPageY + newOffset + this.thumbCenterPoint.y;
this.moveThumb(t.initPageX, newY, skipAnim);
}
return true;
};
/**
* Provides a way to set the value of the region slider in code.
*
* @param {int} newOffset the number of pixels the thumb should be
* positioned away from the initial start point
* @param {int} newOffset2 the number of pixels the thumb should be
* positioned away from the initial start point (y axis for region)
* @param {boolean} skipAnim set to true to disable the animation
* for this move action (but not others).
* @param {boolean} force ignore the locked setting and set value anyway
* @return {boolean} true if the move was performed, false if it failed
*/
YAHOO.widget.Slider.prototype.setRegionValue = function(newOffset, newOffset2, skipAnim) {
if (!this.thumb.available) {
this.logger.log("defer setRegionValue until after onAvailble");
this.deferredSetRegionValue = arguments;
return false;
}
if (this.isLocked() && !force) {
this.logger.log("Can't set the value, the control is locked");
return false;
}
if ( isNaN(newOffset) ) {
this.logger.log("setRegionValue, Illegal argument: " + newOffset);
return false;
}
var t = this.thumb;
if (t._isRegion) {
this.onSlideStart();
var newX = t.initPageX + newOffset + this.thumbCenterPoint.x;
var newY = t.initPageY + newOffset2 + this.thumbCenterPoint.y;
this.moveThumb(newX, newY, skipAnim);
return true;
}
return false;
};
/**
* Checks the background position element position. If it has moved from the
* baseline position, the constraints for the thumb are reset
* @return {boolean} True if the offset is the same as the baseline.
*/
YAHOO.widget.Slider.prototype.verifyOffset = function() {
var newPos = YAHOO.util.Dom.getXY(this.getEl());
this.logger.log("newPos: " + newPos);
if (newPos[0] != this.baselinePos[0] || newPos[1] != this.baselinePos[1]) {
this.logger.log("background moved, resetting constraints");
this.thumb.resetConstraints();
this.baselinePos = newPos;
return false;
}
return true;
};
/**
* Move the associated slider moved to a timeout to try to get around the
* mousedown stealing moz does when I move the slider element between the
* cursor and the background during the mouseup event
*
* @param {int} x the X coordinate of the click
* @param {int} y the Y coordinate of the click
* @param {boolean} skipAnim don't animate if the move happend onDrag
* @private
*/
YAHOO.widget.Slider.prototype.moveThumb = function(x, y, skipAnim) {
this.logger.log("move thumb", "warn");
var t = this.thumb;
var self = this;
if (!t.available) {
this.logger.log("thumb is not available yet, aborting move");
return;
}
this.logger.log("move thumb, x: " + x + ", y: " + y);
// this.verifyOffset();
t.setDelta(this.thumbCenterPoint.x, this.thumbCenterPoint.y);
var _p = t.getTargetCoord(x, y);
var p = [_p.x, _p.y];
if (this.animate && YAHOO.widget.Slider.ANIM_AVAIL && t._graduated && !skipAnim) {
this.logger.log("graduated");
// this.thumb._animating = true;
this.lock();
setTimeout( function() { self.moveOneTick(p); }, this.tickPause );
} else if (this.animate && YAHOO.widget.Slider.ANIM_AVAIL && !skipAnim) {
this.logger.log("animating to " + p);
// this.thumb._animating = true;
this.lock();
var oAnim = new YAHOO.util.Motion(
t.id, { points: { to: p } }, 0.4, YAHOO.util.Easing.easeOut );
oAnim.onComplete.subscribe( function() { self.endMove(); } );
oAnim.animate();
} else {
t.setDragElPos(x, y);
// this.fireEvents();
this.endMove();
}
};
/**
* Move the slider one tick mark towards its final coordinate. Used
* for the animation when tick marks are defined
*
* @param {int[]} the destination coordinate
* @private
*/
YAHOO.widget.Slider.prototype.moveOneTick = function(finalCoord) {
var t = this.thumb;
var curCoord = YAHOO.util.Dom.getXY(t.getEl());
var tmp;
// var thresh = Math.min(t.tickSize + (Math.floor(t.tickSize/2)), 10);
// var thresh = 10;
// var thresh = t.tickSize + (Math.floor(t.tickSize/2));
var nextCoord = null;
if (t._isRegion) {
nextCoord = this._getNextX(curCoord, finalCoord);
var tmpX = (nextCoord) ? nextCoord[0] : curCoord[0];
nextCoord = this._getNextY([tmpX, curCoord[1]], finalCoord);
} else if (t._isHoriz) {
nextCoord = this._getNextX(curCoord, finalCoord);
} else {
nextCoord = this._getNextY(curCoord, finalCoord);
}
this.logger.log("moveOneTick: " +
" finalCoord: " + finalCoord +
" curCoord: " + curCoord +
" nextCoord: " + nextCoord);
if (nextCoord) {
// move to the next coord
// YAHOO.util.Dom.setXY(t.getEl(), nextCoord);
// var el = t.getEl();
// YAHOO.util.Dom.setStyle(el, "left", (nextCoord[0] + this.thumb.deltaSetXY[0]) + "px");
// YAHOO.util.Dom.setStyle(el, "top", (nextCoord[1] + this.thumb.deltaSetXY[1]) + "px");
this.thumb.alignElWithMouse(t.getEl(), nextCoord[0], nextCoord[1]);
// check if we are in the final position, if not make a recursive call
if (!(nextCoord[0] == finalCoord[0] && nextCoord[1] == finalCoord[1])) {
var self = this;
setTimeout(function() { self.moveOneTick(finalCoord); },
this.tickPause);
} else {
this.endMove();
}
} else {
this.endMove();
}
//this.tickPause = Math.round(this.tickPause/2);
};
/**
* Returns the next X tick value based on the current coord and the target coord.
* @private/
*/
YAHOO.widget.Slider.prototype._getNextX = function(curCoord, finalCoord) {
this.logger.log("getNextX: " + curCoord + ", " + finalCoord);
var t = this.thumb;
var thresh;
var tmp = [];
var nextCoord = null;
if (curCoord[0] > finalCoord[0]) {
thresh = t.tickSize - this.thumbCenterPoint.x;
tmp = t.getTargetCoord( curCoord[0] - thresh, curCoord[1] );
nextCoord = [tmp.x, tmp.y];
} else if (curCoord[0] < finalCoord[0]) {
thresh = t.tickSize + this.thumbCenterPoint.x;
tmp = t.getTargetCoord( curCoord[0] + thresh, curCoord[1] );
nextCoord = [tmp.x, tmp.y];
} else {
// equal, do nothing
}
return nextCoord;
};
/**
* Returns the next Y tick value based on the current coord and the target coord.
* @private/
*/
YAHOO.widget.Slider.prototype._getNextY = function(curCoord, finalCoord) {
var t = this.thumb;
// var thresh = t.tickSize;
// var thresh = t.tickSize + this.thumbCenterPoint.y;
var thresh;
var tmp = [];
var nextCoord = null;
if (curCoord[1] > finalCoord[1]) {
thresh = t.tickSize - this.thumbCenterPoint.y;
tmp = t.getTargetCoord( curCoord[0], curCoord[1] - thresh );
nextCoord = [tmp.x, tmp.y];
} else if (curCoord[1] < finalCoord[1]) {
thresh = t.tickSize + this.thumbCenterPoint.y;
tmp = t.getTargetCoord( curCoord[0], curCoord[1] + thresh );
nextCoord = [tmp.x, tmp.y];
} else {
// equal, do nothing
}
return nextCoord;
};
/**
* Resets the constraints before moving the thumb.
* @private
*/
YAHOO.widget.Slider.prototype.b4MouseDown = function(e) {
this.thumb.autoOffset();
this.thumb.resetConstraints();
};
/**
* Handles the mousedown event for the slider background
*
* @private
*/
YAHOO.widget.Slider.prototype.onMouseDown = function(e) {
// this.resetConstraints(true);
// this.thumb.resetConstraints(true);
if (! this.isLocked() && this.backgroundEnabled) {
var x = YAHOO.util.Event.getPageX(e);
var y = YAHOO.util.Event.getPageY(e);
this.logger.log("bg mousedown: " + x + "," + y);
this.focus();
this.moveThumb(x, y);
}
};
/**
* Handles the onDrag event for the slider background
*
* @private
*/
YAHOO.widget.Slider.prototype.onDrag = function(e) {
if (! this.isLocked()) {
var x = YAHOO.util.Event.getPageX(e);
var y = YAHOO.util.Event.getPageY(e);
this.moveThumb(x, y, true);
}
};
/**
* Fired when the slider movement ends
*
* @private
*/
YAHOO.widget.Slider.prototype.endMove = function () {
// this._animating = false;
this.unlock();
this.moveComplete = true;
this.fireEvents();
};
/**
* Fires the change event if the value has been changed. Ignored if we are in
* the middle of an animation as the event will fire when the animation is
* complete
*
* @private
*/
YAHOO.widget.Slider.prototype.fireEvents = function () {
var t = this.thumb;
// this.logger.log("FireEvents: " + t._isRegion);
t.cachePosition();
if (! this.isLocked()) {
if (t._isRegion) {
this.logger.log("region");
var newX = t.getXValue();
var newY = t.getYValue();
if (newX != this.previousX || newY != this.previousY) {
// this.logger.log("Firing onchange");
this.onChange( newX, newY );
}
this.previousX = newX;
this.previousY = newY;
} else {
var newVal = t.getValue();
if (newVal != this.previousVal) {
this.logger.log("Firing onchange: " + newVal);
this.onChange( newVal );
}
this.previousVal = newVal;
}
if (this.moveComplete) {
this.onSlideEnd();
this.moveComplete = false;
}
}
};
/**
* toString
* @return {string} string representation of the instance
*/
YAHOO.widget.Slider.prototype.toString = function () {
return ("Slider (" + this.type +") " + this.id);
};
/**
* A drag and drop implementation to be used as the thumb of a slider.
*
* @extends YAHOO.util.DD
* @constructor
* @param {String} id the id of the slider html element
* @param {String} sGroup the group of related DragDrop items
* @param {int} iLeft the number of pixels the element can move left
* @param {int} iRight the number of pixels the element can move right
* @param {int} iUp the number of pixels the element can move up
* @param {int} iDown the number of pixels the element can move down
* @param {int} iTickSize optional parameter for specifying that the element
* should move a certain number pixels at a time.
*/
YAHOO.widget.SliderThumb = function(id, sGroup, iLeft, iRight, iUp, iDown, iTickSize) {
if (id) {
this.init(id, sGroup);
/**
* The id of the thumbs parent HTML element (the slider background element).
* @type string
*/
this.parentElId = sGroup;
}
this.logger = new YAHOO.widget.LogWriter(this.toString());
/**
* Overrides the isTarget property in YAHOO.util.DragDrop
* @private
*/
this.isTarget = false;
/**
* The tick size for this slider
* @type int
*/
this.tickSize = iTickSize;
/**
* Informs the drag and drop util that the offsets should remain when
* resetting the constraints. This preserves the slider value when
* the constraints are reset
* @type boolean
*/
this.maintainOffset = true;
this.initSlider(iLeft, iRight, iUp, iDown, iTickSize);
this.scroll = false;
};
// YAHOO.widget.SliderThumb.prototype = new YAHOO.util.DD();
YAHOO.extend(YAHOO.widget.SliderThumb, YAHOO.util.DD);
/**
* Returns the difference between the location of the thumb and its parent.
* @param {Array} Optionally accepts the position of the parent
* @type int[]
*/
YAHOO.widget.SliderThumb.prototype.getOffsetFromParent = function(parentPos) {
var myPos = YAHOO.util.Dom.getXY(this.getEl());
var ppos = parentPos || YAHOO.util.Dom.getXY(this.parentElId);
return [ (myPos[0] - ppos[0]), (myPos[1] - ppos[1]) ];
};
/**
* The (X and Y) difference between the thumb location and its parent
* (the slider background) when the control is instantiated.
* @type int[]
*/
YAHOO.widget.SliderThumb.prototype.startOffset = null;
/**
* Flag used to figure out if this is a horizontal or vertical slider
*
* @type boolean
* @private
*/
YAHOO.widget.SliderThumb.prototype._isHoriz = false;
/**
* Cache the last value so we can check for change
*
* @type int
* @private
*/
YAHOO.widget.SliderThumb.prototype._prevVal = 0;
/**
* initial element X
*
* @type int
* @private
*/
// YAHOO.widget.SliderThumb.prototype._initX = 0;
/**
* initial element Y
*
* @type int
* @private
*/
// YAHOO.widget.SliderThumb.prototype._initY = 0;
/**
* The slider is _graduated if there is a tick interval defined
*
* @type boolean
* @private
*/
YAHOO.widget.SliderThumb.prototype._graduated = false;
/**
* Set up the slider, must be called in the constructor of all subclasses
*
* @param {int} iLeft the number of pixels the element can move left
* @param {int} iRight the number of pixels the element can move right
* @param {int} iUp the number of pixels the element can move up
* @param {int} iDown the number of pixels the element can move down
* @param {int} iTickSize the width of the tick interval.
*/
YAHOO.widget.SliderThumb.prototype.initSlider = function (iLeft, iRight, iUp, iDown,
iTickSize) {
this.setXConstraint(iLeft, iRight, iTickSize);
this.setYConstraint(iUp, iDown, iTickSize);
if (iTickSize && iTickSize > 1) {
this._graduated = true;
}
this._isHoriz = (iLeft > 0 || iRight > 0);
this._isVert = (iUp > 0 || iDown > 0);
this._isRegion = (this._isHoriz && this._isVert);
};
/**
* Clear's the slider's ticks
*/
YAHOO.widget.SliderThumb.prototype.clearTicks = function () {
YAHOO.widget.SliderThumb.superclass.clearTicks.call(this);
this._graduated = false;
};
/**
* Gets the current offset from the element's start position in
* pixels.
*
* @return {int} the number of pixels (positive or negative) the
* slider has moved from the start position.
*/
YAHOO.widget.SliderThumb.prototype.getValue = function () {
if (!this.available) { return 0; }
var val = (this._isHoriz) ? this.getXValue() : this.getYValue();
this.logger.log("getVal: " + val);
return val;
};
/**
* Gets the current X offset from the element's start position in
* pixels.
*
* @return {int} the number of pixels (positive or negative) the
* slider has moved horizontally from the start position.
*/
YAHOO.widget.SliderThumb.prototype.getXValue = function () {
if (!this.available) { return 0; }
var newOffset = this.getOffsetFromParent();
return (newOffset[0] - this.startOffset[0]);
};
/**
* Gets the current Y offset from the element's start position in
* pixels.
*
* @return {int} the number of pixels (positive or negative) the
* slider has moved vertically from the start position.
*/
YAHOO.widget.SliderThumb.prototype.getYValue = function () {
if (!this.available) { return 0; }
var newOffset = this.getOffsetFromParent();
return (newOffset[1] - this.startOffset[1]);
};
/**
* toString
* @return {string} string representation of the instance
*/
YAHOO.widget.SliderThumb.prototype.toString = function () {
return "SliderThumb " + this.id;
};
/**
* The onchange event for the handle/thumb is delegated to the YAHOO.widget.Slider
* instance it belongs to.
*
* @private
*/
YAHOO.widget.SliderThumb.prototype.onChange = function (x, y) { };
if ("undefined" == typeof YAHOO.util.Anim) {
YAHOO.widget.Slider.ANIM_AVAIL = false;
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

View File

@ -1,98 +0,0 @@
/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
/* first or middle sibling, no children */
.ygtvtn {
width:16px; height:22px;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/tn.gif) 0 0 no-repeat;
}
/* first or middle sibling, collapsable */
.ygtvtm {
width:16px; height:22px;
cursor:pointer ;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/tm.gif) 0 0 no-repeat;
}
/* first or middle sibling, collapsable, hover */
.ygtvtmh {
width:16px; height:22px;
cursor:pointer ;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/tmh.gif) 0 0 no-repeat;
}
/* first or middle sibling, expandable */
.ygtvtp {
width:16px; height:22px;
cursor:pointer ;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/tp.gif) 0 0 no-repeat;
}
/* first or middle sibling, expandable, hover */
.ygtvtph {
width:16px; height:22px;
cursor:pointer ;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/tph.gif) 0 0 no-repeat;
}
/* last sibling, no children */
.ygtvln {
width:16px; height:22px;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/ln.gif) 0 0 no-repeat;
}
/* Last sibling, collapsable */
.ygtvlm {
width:16px; height:22px;
cursor:pointer ;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/lm.gif) 0 0 no-repeat;
}
/* Last sibling, collapsable, hover */
.ygtvlmh {
width:16px; height:22px;
cursor:pointer ;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/lmh.gif) 0 0 no-repeat;
}
/* Last sibling, expandable */
.ygtvlp {
width:16px; height:22px;
cursor:pointer ;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/lp.gif) 0 0 no-repeat;
}
/* Last sibling, expandable, hover */
.ygtvlph {
width:16px; height:22px; cursor:pointer ;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/lph.gif) 0 0 no-repeat;
}
/* Loading icon */
.ygtvloading {
width:16px; height:22px;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/loading.gif) 0 0 no-repeat;
}
/* the style for the empty cells that are used for rendering the depth
* of the node */
.ygtvdepthcell {
width:16px; height:22px;
background: url(../../../../../../../i/us/nt/widg/tree/dflt/vline.gif) 0 0 no-repeat;
}
.ygtvblankdepthcell { width:16px; height:22px; }
/* the style of the div around each node */
.ygtvitem { }
/* the style of the div around each node's collection of children */
.ygtvchildren { }
* html .ygtvchildren { height:2%; }
/* the style of the text label in ygTextNode */
.ygtvlabel, .ygtvlabel:link, .ygtvlabel:visited, .ygtvlabel:hover {
margin-left:2px;
text-decoration: none;
}
.ygtvspacer { height: 10px; width: 10px; margin: 2px; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

File diff suppressed because one or more lines are too long

View File

@ -1,85 +0,0 @@
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 0.11.0
*/
/**
* The Yahoo global namespace
* @constructor
*/
var YAHOO = window.YAHOO || {};
/**
* Returns the namespace specified and creates it if it doesn't exist
*
* YAHOO.namespace("property.package");
* YAHOO.namespace("YAHOO.property.package");
*
* Either of the above would create YAHOO.property, then
* YAHOO.property.package
*
* @param {String} ns The name of the namespace
* @return {Object} A reference to the namespace object
*/
YAHOO.namespace = function(ns) {
if (!ns || !ns.length) {
return null;
}
var levels = ns.split(".");
var nsobj = YAHOO;
// YAHOO is implied, so it is ignored if it is included
for (var i=(levels[0] == "YAHOO") ? 1 : 0; i<levels.length; ++i) {
nsobj[levels[i]] = nsobj[levels[i]] || {};
nsobj = nsobj[levels[i]];
}
return nsobj;
};
/**
* Uses YAHOO.widget.Logger to output a log message, if the widget is available.
*
* @param {string} sMsg The message to log.
* @param {string} sCategory The log category for the message. Default
* categories are "info", "warn", "error", time".
* Custom categories can be used as well. (opt)
* @param {string} sSource The source of the the message (opt)
* @return {boolean} True if the log operation was successful.
*/
YAHOO.log = function(sMsg, sCategory, sSource) {
var l = YAHOO.widget.Logger;
if(l && l.log) {
return l.log(sMsg, sCategory, sSource);
} else {
return false;
}
};
/**
* Utility to set up the prototype, constructor and superclass properties to
* support an inheritance strategy that can chain constructors and methods.
*
* @param {Function} subclass the object to modify
* @param {Function} superclass the object to inherit
*/
YAHOO.extend = function(subclass, superclass) {
var f = function() {};
f.prototype = superclass.prototype;
subclass.prototype = new f();
subclass.prototype.constructor = subclass;
subclass.superclass = superclass.prototype;
if (superclass.prototype.constructor == Object.prototype.constructor) {
superclass.prototype.constructor = superclass;
}
};
YAHOO.namespace("util");
YAHOO.namespace("widget");
YAHOO.namespace("example");

View File

@ -1 +0,0 @@
/* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 0.11.0 */ var YAHOO=window.YAHOO||{};YAHOO.namespace=function(ns){if(!ns||!ns.length){return null;}var _2=ns.split(".");var _3=YAHOO;for(var i=(_2[0]=="YAHOO")?1:0;i<_2.length;++i){_3[_2[i]]=_3[_2[i]]||{};_3=_3[_2[i]];}return _3;};YAHOO.log=function(_5,_6,_7){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(_5,_6,_7);}else{return false;}};YAHOO.extend=function(_9,_10){var f=function(){};f.prototype=_10.prototype;_9.prototype=new f();_9.prototype.constructor=_9;_9.superclass=_10.prototype;if(_10.prototype.constructor==Object.prototype.constructor){_10.prototype.constructor=_10;}};YAHOO.namespace("util");YAHOO.namespace("widget");YAHOO.namespace("example");