
var JSON=(function(){var pPr=false;var lvl;var indentLevel=0;var indent=function(a){if(!pPr)return a;a[a.length]=pPr==2?('                    ').substr(0,indentLevel*2):'<span style="padding-left:'+(indentLevel*15)+'px;">&nbsp;</span>';return a;};var newline=function(a){if(pPr){a[a.length]=pPr==2?'\n':'<br />';}
return a;};var highlight=function(a){if(pPr&&pPr!=2)return'<b>'+a+'</b>';return a;}
var pre=function(a){if(a.indexOf('<')>-1&&pPr!=2){return'<br /><textarea readonly="1" style="width:100%;height:10em;">'+(a.replace(/</g,'&lt;'))+'</textarea>';}
return'"'+a+'"';}
var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},s={array:function(x){var a=['['],b,f,i,l=x.length,v;a=newline(a);indentLevel++;for(i=0;i<l;i+=1){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=='string'){if(b){a[a.length]=',';a=newline(a);}
a=indent(a);a[a.length]=v;b=true;}}}
indentLevel--;a=newline(a);a=indent(a);a[a.length]=']';return a.join('');},'boolean':function(x){return String(x);},'null':function(x){return"null";},number:function(x){return isFinite(x)?String(x):'null';},object:function(x){if(x){if(x instanceof Array){return s.array(x);}
if(pPr){if(x.nodeType&&x.nodeName){return x.nodeName;}
if(indentLevel>lvl)return'. . . .';}
var a=['{'],b,f,i,v;a=newline(a);indentLevel++;for(i in x){v=x[i];f=s[typeof v];if(f){v=pPr?(typeof v=='string'?pre(v):f(v)):f(v);if(typeof v=='string'){if(b){a[a.length]=',';a=newline(a);}
a=indent(a);a.push(highlight(s.string(i)),((pPr)?' : ':':'),v);b=true;}}}
indentLevel--;a=newline(a);a=indent(a);a[a.length]='}';return a.join('');}
return'null';},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}
c=b.charCodeAt();return'\\u00'+
Math.floor(c/16).toString(16)+
(c%16).toString(16);});}
return'"'+x+'"';}};return{stringify:function(a,b,c){pPr=b;lvl=c||100;if(a==null||typeof(a)=="undefined")return a;switch(a.constructor){case Array:return s.array(a);case String:return s.string(a);case Boolean:return s.boolean(a);case Number:return s.number(a);case Object:default:return s.object(a);}},parse:function(a){if(a.constructor==String){try{return(eval('('+a+')'));}catch(e){return false;}}
return false;}};})();if(typeof YAHOO=="undefined"){var YAHOO={};}
YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}
return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.init=function(){this.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}
if(unique){ls.push(l);}}}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}
var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}
if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[],getVersion:function(name){return YAHOO.env.modules[name]||null;}};YAHOO.lang={isArray:function(obj){if(obj&&obj.constructor&&obj.constructor.toString().indexOf('Array')>-1){return true;}else{return YAHOO.lang.isObject(obj)&&obj.constructor==Array;}},isBoolean:function(obj){return typeof obj=='boolean';},isFunction:function(obj){return typeof obj=='function';},isNull:function(obj){return obj===null;},isNumber:function(obj){return typeof obj=='number'&&isFinite(obj);},isObject:function(obj){return obj&&(typeof obj=='object'||YAHOO.lang.isFunction(obj));},isString:function(obj){return typeof obj=='string';},isUndefined:function(obj){return typeof obj=='undefined';},hasOwnProperty:function(obj,prop){if(Object.prototype.hasOwnProperty){return obj.hasOwnProperty(prop);}
return!YAHOO.lang.isUndefined(obj[prop])&&obj.constructor.prototype[prop]!==obj[prop];},extend:function(subc,superc,overrides){if(!superc||!subc){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}
var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}
if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}}},augment:function(r,s){if(!s||!r){throw new Error("YAHOO.lang.augment failed, please check that "+"all dependencies are included.");}
var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;i=i+1){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}}};YAHOO.init();YAHOO.util.Lang=YAHOO.lang;YAHOO.augment=YAHOO.lang.augment;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.2.2",build:"204"});YAHOO.util.CustomEvent=function(type,oScope,silent,signature){this.type=type;this.scope=oScope||window;this.silent=silent;this.signature=signature||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}
var onsubscribeType="_YUICEOnSubscribe";if(type!==onsubscribeType){this.subscribeEvent=new YAHOO.util.CustomEvent(onsubscribeType,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,obj,override){if(!fn){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}
if(this.subscribeEvent){this.subscribeEvent.fire(fn,obj,override);}
this.subscribers.push(new YAHOO.util.Subscriber(fn,obj,override));},unsubscribe:function(fn,obj){if(!fn){return this.unsubscribeAll();}
var found=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,obj)){this._delete(i);found=true;}}
return found;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}
var args=[],ret=true,i;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}
var argslength=args.length;if(!this.silent){}
for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}
var scope=s.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var param=null;if(args.length>0){param=args[0];}
ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);}
if(false===ret){if(!this.silent){}
return false;}}}
return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}
return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}
this.subscribers.splice(index,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=obj||null;this.override=override;};YAHOO.util.Subscriber.prototype.getScope=function(defaultScope){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}
return defaultScope;};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return(this.fn==fn&&this.obj==obj);}else{return(this.fn==fn);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var loadComplete=false;var DOMReady=false;var listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var lastError=null;return{POLL_RETRYS:200,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var v=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);if(v&&v[1]){return v[1];}
return null;}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var self=this;var callback=function(){self._tryPreloadAttach();};this._interval=setInterval(callback,this.POLL_INTERVAL);}},onAvailable:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:false});retryCount=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(p_fn,p_obj,p_override){this.DOMReadyEvent.subscribe(p_fn,p_obj,p_override);},onContentReady:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:true});retryCount=this.POLL_RETRYS;this.startInterval();},addListener:function(el,sType,fn,obj,override){if(!fn||!fn.call){return false;}
if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],sType,fn,obj,override)&&ok;}
return ok;}else if(typeof el=="string"){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){YAHOO.util.Event.on(el,sType,fn,obj,override);});return true;}}
if(!el){return false;}
if("unload"==sType&&obj!==this){unloadListeners[unloadListeners.length]=[el,sType,fn,obj,override];return true;}
var scope=el;if(override){if(override===true){scope=obj;}else{scope=override;}}
var wrappedFn=function(e){return fn.call(scope,YAHOO.util.Event.getEvent(e),obj);};var li=[el,sType,fn,wrappedFn,scope];var index=listeners.length;listeners[index]=li;if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);if(legacyIndex==-1||el!=legacyEvents[legacyIndex][0]){legacyIndex=legacyEvents.length;legacyMap[el.id+sType]=legacyIndex;legacyEvents[legacyIndex]=[el,sType,el["on"+sType]];legacyHandlers[legacyIndex]=[];el["on"+sType]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),legacyIndex);};}
legacyHandlers[legacyIndex].push(li);}else{try{this._simpleAdd(el,sType,wrappedFn,false);}catch(ex){this.lastError=ex;this.removeListener(el,sType,fn);return false;}}
return true;},fireLegacyEvent:function(e,legacyIndex){var ok=true,le,lh,li,scope,ret;lh=legacyHandlers[legacyIndex];for(var i=0,len=lh.length;i<len;++i){li=lh[i];if(li&&li[this.WFN]){scope=li[this.ADJ_SCOPE];ret=li[this.WFN].call(scope,e);ok=(ok&&ret);}}
le=legacyEvents[legacyIndex];if(le&&le[2]){le[2](e);}
return ok;},getLegacyIndex:function(el,sType){var key=this.generateId(el)+sType;if(typeof legacyMap[key]=="undefined"){return-1;}else{return legacyMap[key];}},useLegacyEvent:function(el,sType){if(this.webkit&&("click"==sType||"dblclick"==sType)){var v=parseInt(this.webkit,10);if(!isNaN(v)&&v<418){return true;}}
return false;},removeListener:function(el,sType,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],sType,fn)&&ok);}
return ok;}
if(!fn||!fn.call){return this.purgeElement(el,false,sType);}
if("unload"==sType){for(i=0,len=unloadListeners.length;i<len;i++){var li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners.splice(i,1);return true;}}
return false;}
var cacheItem=null;var index=arguments[3];if("undefined"==typeof index){index=this._getCacheIndex(el,sType,fn);}
if(index>=0){cacheItem=listeners[index];}
if(!el||!cacheItem){return false;}
if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i<len;++i){li=llist[i];if(li&&li[this.EL]==el&&li[this.TYPE]==sType&&li[this.FN]==fn){llist.splice(i,1);break;}}}}else{try{this._simpleRemove(el,sType,cacheItem[this.WFN],false);}catch(ex){this.lastError=ex;return false;}}
delete listeners[index][this.WFN];delete listeners[index][this.FN];listeners.splice(index,1);return true;},getTarget:function(ev,resolveTextNode){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(node){if(node&&3==node.nodeType){return node.parentNode;}else{return node;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}
return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}
return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else if(ev.type=="mouseover"){t=ev.fromElement;}}
return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}
return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}
c=c.caller;}}
return ev;},getCharCode:function(ev){return ev.charCode||ev.keyCode||0;},_getCacheIndex:function(el,sType,fn){for(var i=0,len=listeners.length;i<len;++i){var li=listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==sType){return i;}}
return-1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+counter;++counter;el.id=id;}
return id;},_isValidCollection:function(o){return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(e){if(!loadComplete){loadComplete=true;var EU=YAHOO.util.Event;EU._ready();if(this.isIE){EU._simpleRemove(window,"load",EU._load);}}},_ready:function(e){if(!DOMReady){DOMReady=true;var EU=YAHOO.util.Event;EU.DOMReadyEvent.fire();EU._simpleRemove(document,"DOMContentLoaded",EU._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}
if(this.isIE&&!DOMReady){return false;}
this.locked=true;var tryAgain=!loadComplete;if(!tryAgain){tryAgain=(retryCount>0);}
var notAvail=[];var executeItem=function(el,item){var scope=el;if(item.override){if(item.override===true){scope=item.obj;}else{scope=item.override;}}
item.fn.call(scope,item.obj);};var i,len,item,el;for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&!item.checkReady){el=this.getEl(item.id);if(el){executeItem(el,item);onAvailStack[i]=null;}else{notAvail.push(item);}}}
for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&item.checkReady){el=this.getEl(item.id);if(el){if(loadComplete||el.nextSibling){executeItem(el,item);onAvailStack[i]=null;}}else{notAvail.push(item);}}}
retryCount=(notAvail.length===0)?0:retryCount-1;if(tryAgain){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}
this.locked=false;return true;},purgeElement:function(el,recurse,sType){var elListeners=this.getListeners(el,sType);if(elListeners){for(var i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(el,l.type,l.fn);}}
if(recurse&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],recurse,sType);}}},getListeners:function(el,sType){var results=[],searchLists;if(!sType){searchLists=[listeners,unloadListeners];}else if(sType=="unload"){searchLists=[unloadListeners];}else{searchLists=[listeners];}
for(var j=0;j<searchLists.length;++j){var searchList=searchLists[j];if(searchList&&searchList.length>0){for(var i=0,len=searchList.length;i<len;++i){var l=searchList[i];if(l&&l[this.EL]===el&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}
return(results.length)?results:null;},_unload:function(e){var EU=YAHOO.util.Event,i,j,l,len,index;for(i=0,len=unloadListeners.length;i<len;++i){l=unloadListeners[i];if(l){var scope=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){scope=l[EU.OBJ];}else{scope=l[EU.ADJ_SCOPE];}}
l[EU.FN].call(scope,EU.getEvent(e),l[EU.OBJ]);unloadListeners[i]=null;l=null;scope=null;}}
unloadListeners=null;if(listeners&&listeners.length>0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}
j=j-1;}
l=null;EU.clearCache();}
for(i=0,len=legacyEvents.length;i<len;++i){legacyEvents[i][0]=null;legacyEvents[i]=null;}
legacyEvents=null;EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(el,sType,fn,capture){el.addEventListener(sType,fn,(capture));};}else if(window.attachEvent){return function(el,sType,fn,capture){el.attachEvent("on"+sType,fn);};}else{return function(){};}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,sType,fn,capture){el.removeEventListener(sType,fn,(capture));};}else if(window.detachEvent){return function(el,sType,fn){el.detachEvent("on"+sType,fn);};}else{return function(){};}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if(EU.isIE){document.write('<scr'+'ipt id="_yui_eu_dr" defer="true" src="//:"></script>');var el=document.getElementById("_yui_eu_dr");el.onreadystatechange=function(){if("complete"==this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};el=null;YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);}else if(EU.webkit){EU._drwatch=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._drwatch);EU._drwatch=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}
EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}
YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(p_type,p_fn,p_obj,p_override){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}else{this.__yui_subscribers=this.__yui_subscribers||{};var subs=this.__yui_subscribers;if(!subs[p_type]){subs[p_type]=[];}
subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}else{return false;}},unsubscribeAll:function(p_type){return this.unsubscribe(p_type);},createEvent:function(p_type,p_config){this.__yui_events=this.__yui_events||{};var opts=p_config||{};var events=this.__yui_events;if(events[p_type]){}else{var scope=opts.scope||this;var silent=opts.silent||null;var ce=new YAHOO.util.CustomEvent(p_type,scope,silent,YAHOO.util.CustomEvent.FLAT);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}
this.__yui_subscribers=this.__yui_subscribers||{};var qs=this.__yui_subscribers[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}
return events[p_type];},fireEvent:function(p_type,arg1,arg2,etc){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}
return ce.fire.apply(ce,args);}else{return null;}},hasEvent:function(type){if(this.__yui_events){if(this.__yui_events[type]){return true;}}
return false;}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!attachTo){}else if(!keyData){}else if(!handler){}
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){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){var dataItem;var keyPressed;if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){dataItem=keyData.keys[i];if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);break;}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);break;}}}else{dataItem=keyData.keys;if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,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.register("event",YAHOO.util.Event,{version:"2.2.2",build:"204"});(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={};var ua=navigator.userAgent.toLowerCase(),isOpera=(ua.indexOf('opera')>-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i,ROOT_TAG:/body|html/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}
if(propertyCache[property]){return propertyCache[property];}
var converted=property;while(patterns.HYPHEN.exec(converted)){converted=converted.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}
propertyCache[property]=converted;return converted;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;if(property=='float'){property='cssFloat';}
var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}
return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}
return val/100;break;case'float':property='styleFloat';default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}
if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(YAHOO.lang.isString(el.style.filter)){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}
break;case'float':property='styleFloat';default:el.style[property]=val;}};}else{setStyle=function(el,property,val){if(property=='float'){property='cssFloat';}
el.style[property]=val;};}
YAHOO.util.Dom={get:function(el){if(YAHOO.lang.isString(el)){return document.getElementById(el);}
if(YAHOO.lang.isArray(el)){var c=[];for(var i=0,len=el.length;i<len;++i){c[c.length]=Y.Dom.get(el[i]);}
return c;}
if(el){return el;}
return null;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none')&&el!=document.body){return false;}
var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){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{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;var hasAbs=this.getStyle(el,'position')=='absolute';if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if(isSafari&&!hasAbs&&this.getStyle(parentNode,'position')=='absolute'){hasAbs=true;}
parentNode=parentNode.offsetParent;}}
if(isSafari&&hasAbs){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}
parentNode=el.parentNode;while(parentNode.tagName&&!patterns.ROOT_TAG.test(parentNode.tagName))
{if(Y.Dom.getStyle(parentNode,'display')!='inline'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
parentNode=parentNode.parentNode;}
return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}
var pageXY=this.getXY(el);if(pageXY===false){return false;}
var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}
if(isNaN(delta[1])){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';}
if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');var f=function(el){return re.test(el.className);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}
el.className=[el.className,className].join(' ');};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,className)){return;}
var c=el.className;el.className=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;}
var re=new RegExp('(?:^|\\s+)'+oldClassName+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}
el.className=el.className.replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}
if(!el.id){el.id=prefix+id_counter++;}
return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}
var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}
else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}
else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}
else if(!parent.tagName||parent.tagName.toUpperCase()=='HTML'){return false;}
parent=parent.parentNode;}
return false;}};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||'*';var nodes=[];if(root){root=Y.Dom.get(root);if(!root){return nodes;}}else{root=document;}
var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag=='*'&&root.all)){elements=root.all;}
for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}
return nodes;},batch:function(el,method,o,override){var id=el;el=Y.Dom.get(el);var scope=(override)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}
return method.call(scope,el,o);}
var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}
collection[collection.length]=method.call(scope,el[i],o);}
return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!='CSS1Compat')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!='CSS1Compat')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode=='CSS1Compat')?document.documentElement.clientHeight:document.body.clientHeight;}
return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode=='CSS1Compat')?document.documentElement.clientWidth:document.body.clientWidth;}
return width;}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}
this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.2",build:"204"});var Config={LOVES91:false,SHOWME:true,BASEPATH:(((matches=window.location.pathname.match(/^.*\/web/))!=null)?matches[0]:'')+lang,ROOTPATH:(((matches=window.location.pathname.match(/^.*\/web/))!=null)?matches[0]:''),HOMESITE:((matches=window.location.href.match(/^\w+:\/\/[^\/:]+(:\d*)?/))!=null)?matches[0]:'',VIEWATTSCRIPT:'view.php',DOWNLOADATTSCRIPT:'download.php',PROCESS_TYPE_PROCESS:10,PROCESS_TYPE_PROJECT:20,DEFAULTDOMAIN:'',GMAPJS_URL:'',MAX_UPLOADED_FILE_SIZE:20971520,UPLOAD_PHOTO_TYPE:[".jpg",".jpeg",".png",".gif",".bmp",".emf",".dib",".jfif",".tif",".tiff",".wmf"],UPLOAD_VIDEO_TYPE:[".wmv",".avi",".flv",".mpg",".mpeg",".3gp",".mov"],UPLOAD_DOCUMENT_TYPE:[".*"],UPLOAD_ATTACHMENT_TYPE:[".*"],REQUIRE_FLASH_MAJOR_VERSION:8,REQUIRE_FLASH_MINOR_VERSION:0,REQUIRE_FLASH_REVISION:0}
Config.PORTLETICONPATH=Config.BASEPATH+'/portal/images/portleticon/';Config.SCRIPTBASEPATH=Config.HOMESITE+Config.BASEPATH;Config.SCRIPTROOTPATH=Config.HOMESITE+Config.ROOTPATH;Config.IMAGEBAEPATH=Config.HOMESITE+Config.BASEPATH;Config.ICONBASEPATH=Config.HOMESITE+Config.BASEPATH;var Post={TYPE_BLOG:1,TYPE_RSS:2,TYPE_ALBUM:3,TYPE_WEBDOC:4,TYPE_NODE:5,TYPE_RECORD:6,TYPE_BBSMSG:7,TYPE_VIDEO:8,TypeNames:['無效的類型','文章','RSS','相簿','文檔','節點','記錄','訊息','短片'],ElementNames:['無效的類型','附件','無效的類型','相片','文檔','無效的類型','無效的類型','無效的類型','無效的類型'],getTypeName:function(n){return Post.TypeNames[n];},getElementName:function(n){if(n.constructor==Number){return Post.ElementNames[n];}
return'';},STATUS_DRAFT:1,STATUS_PUBLISHED:2,STATUS_INWF:3,fileExtCheck:function(posttype,ext){switch(posttype){case Post.TYPE_BLOG:return true;case Post.TYPE_ALBUM:var types=Config.UPLOAD_PHOTO_TYPE;if(ext.charAt(0)!=".")ext="."+ext;return indexOf(types,ext.toLowerCase())>=0;case Post.TYPE_WEBDOC:return true;case Post.TYPE_VIDEO:var types=Config.UPLOAD_VIDEO_TYPE;if(ext.charAt(0)!=".")ext="."+ext;return indexOf(types,ext.toLowerCase())>=0;default:throw Error("Type check for "+posttype+" is not supported");}},ALBUM_RESIZE_CHOOSE:["1280x1024","1024x768","800x600","600x450","400x300","200x150"],ALBUM_ROTATE_CHOOSE:{"順時針 90 度":-90,"順時針 180 度":180,"反時針 90 度":90}};var SPost={TYPE_HTML:1,TYPE_SCHEMA:3,TYPE_XLIST:4,TYPE_SYSTEM_SCHEMA:5,TYPE_SURVEY:6};var Schema={RECORD_AS_BLOCK:1,RECORD_AS_ROW:2,RECORD_CUSTOM:3,STATUS_OUTSTANDING:10,STATUS_SUBMITTED:20,STATUS_FINISHED:30};var Tag={TYPE_PEOPLE:1,TYPE_GROUP:2,TYPE_POST:3,TYPE_RSS:4,TYPE_FAVORITE:5,TYPE_ALBUM:6,TYPE_WEBDOC:7,TYPE_BBSMSG:8,TYPE_RECORD:9,TYPE_NODE:10,TYPE_VIDEO:11,lookupTable:null,getTagType4Post:function(postType){if(!Tag.lookupTable){Tag.lookupTable={};Tag.lookupTable[Post.TYPE_ALBUM]=Tag.TYPE_ALBUM;Tag.lookupTable[Post.TYPE_WEBDOC]=Tag.TYPE_WEBDOC;Tag.lookupTable[Post.TYPE_BLOG]=Tag.TYPE_POST;Tag.lookupTable[Post.TYPE_RSS]=Tag.TYPE_RSS;Tag.lookupTable[Post.TYPE_RECORD]=Tag.TYPE_RECORD;Tag.lookupTable[Post.TYPE_NODE]=Tag.TYPE_NODE;Tag.lookupTable[Post.TYPE_BBSMSG]=Tag.TYPE_BBSMSG;Tag.lookupTable[Post.TYPE_VIDEO]=Tag.TYPE_VIDEO;}
return Tag.lookupTable[postType];}};var Set={TYPE_NORMAL:1,TYPE_STICKY:2,TYPE_STICKY_SYSTEM:3,TYPE_BOOK:4,TYPE_BBS:9};var NS=function(s){this.name=s;};NS.register=function(ns){var a=window;var ws=ns.split('.');var s="";for(var i in ws){s+=(s?".":"")+ws[i];if(!a[ws[i]]){a[ws[i]]=new NS(s);}
a=a[ws[i]];}};NS.prototype={toString:function(){var subs=[];for(var i in this){if(typeof this[i]=="object"&&this[i].constructor==NS){subs.push(this[i]);}
else if(typeof this[i]=="function"&&getClassName(this[i])){subs.push(getClassName(this[i]).replace(this.name+".",""));}}
return this.name+": {"+subs.join(", ")+"}";},add:function(s){if(!this[s]){this[s]=new NS(this.name+"."+s);}
return this[s];},constructor:window.NS};var Iqube=new NS("Iqube");Iqube.add("Post");Iqube.add("Admin");Iqube.add("Share");Iqube.add("Form");Iqube.add("Set");Iqube.add("Util");Iqube.add("Pref");Iqube.add("Group");Iqube.add("Comment");Iqube.add("SPost");Iqube.add("Process");Iqube.add("Portal");Iqube.add("Alias");Iqube.add("Tag");Iqube.add("Mms");var Custom=new NS("Custom");var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}};Object.extend=function(destination,source,property_list){if(source){if(property_list){for(var i=0;i<property_list.length;i++){if(typeof(source[property_list[i]])=="undefined")continue;destination[property_list[i]]=source[property_list[i]];}}
else{for(property in source){destination[property]=source[property];}}}
return destination;};var $A=Array.from=function(iterable){if(!iterable)return[];if(iterable.toArray){return iterable.toArray();}else{var results=[];for(var i=0,length=iterable.length;i<length;i++)
results.push(iterable[i]);return results;}};Function.prototype.bind=function(object){var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)));}};function $(){var elements=[];for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=='string')
element=document.getElementById(element);if(arguments.length==1)
return element;elements.push(element);}
return elements;};document.getElementsByClassName=function(className){var children=document.getElementsByTagName('*')||document.all;var elements=[];for(var i=0;i<children.length;i++){var child=children[i];var classNames=child.className.split(' ');for(var j=0;j<classNames.length;j++){if(classNames[j]==className){elements.push(child);break;}}}
return elements;};if(!window.Element){var Element={};}
Object.extend(Element,{remove:function(element){element=$(element);element.parentNode.removeChild(element);},hasClassName:function(element,className){element=$(element);if(!element)
return;var a=element.className.split(' ');for(var i=0;i<a.length;i++){if(a[i]==className)
return true;}
return false;},replaceClassName:function(element,delClassName,addClassName){element=$(element);if(!element)
return;var cn='';var a=element.className.split(' ');if(delClassName!=''){for(var i=0;i<a.length;i++){if((delClassName.constructor!=RegExp&&a[i]!=delClassName)||(delClassName.constructor==RegExp&&delClassName.test(a[i])==false)){if(i>0)
cn+=' ';cn+=a[i];}}}else{cn=element.className;}
if(addClassName!=''){if(cn=='')cn=addClassName;else if(addClassName!='')cn+=' '+addClassName;}
element.className=cn;},cleanWhitespace:function(element){element=$(element);for(var i=0;i<element.childNodes.length;i++){var node=element.childNodes[i];if(node.nodeType==3&&!/\S/.test(node.nodeValue))
Element.remove(node);}}});var fx=new Object();fx.Base=function(){};fx.Base.prototype={setOptions:function(options){this.options={duration:500,onComplete:'',transition:fx.sinoidal}
Object.extend(this.options,(arguments.length==1)?options:new Object());},go:function(){this.startTime=(new Date).getTime();this.timer=setInterval(this.step.bind(this),13);},step:function(){var time=(new Date).getTime();if(time>=this.options.duration+this.startTime){this.now=this.to;clearInterval(this.timer);this.timer=null;if(this.options.onComplete)setTimeout(this.options.onComplete.bind(this),10);}
else{var Tpos=(time-this.startTime)/(this.options.duration);this.now=this.options.transition(Tpos)*(this.to-this.from)+this.from;}
this.increase();},custom:function(from,to){if(this.timer!=null)return;this.from=from;this.to=to;this.go();},hide:function(){this.now=0;this.increase();},clearTimer:function(){clearInterval(this.timer);this.timer=null;},again:function(options){if(this.timer)this.clearTimer();this.initialize(this.el,options);}}
fx.Push=Class.create();fx.Push.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.el.style.overflow="hidden";this.setOptions(options);},increase:function(){if(this.edge=='left'||this.edge=='right'){this.el.style.width=this.now+'px';}else{this.el.style.height=this.now+'px';}
this.el.childNodes[this.child].style['margin'+this.edge.ucfirst()]=(this.to>this.from?this.now-this.to:this.now-this.from)+'px';if(this.now==this.to){this.el.style.overflow='';}},push:function(from,to,edge,child){this.edge=edge;this.child=child||0;this.custom(from,to);}});fx.Custom=Class.create();fx.Custom.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.setOptions(options);var x=this.options.fields;for(var prop in x){if(typeof x[prop].from=='undefined'){x[prop].from=parseInt(this.el.style[prop])||0;}}},increase:function(){var x=this.options.fields;for(var prop in x){this.el.style[prop]=x[prop].from+(x[prop].to-x[prop].from)*this.now+x[prop].unit;}}});fx.ScrollIntoView=Class.create();fx.ScrollIntoView.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.setOptions(options);},increase:function(){document.documentElement.scrollTop=this.now;},start:function(){var xy=getXY(this.el);var vph=YuDom.getViewportHeight();var scrollTop=document.documentElement.scrollTop;if(xy.y<scrollTop||vph+scrollTop<xy.y){this.options.padding=this.options.padding||0;this.custom(scrollTop,xy.y>this.options.padding?xy.y-this.options.padding:0);}else{var h=this.el.offsetHeight;if(h+xy.y>scrollTop+vph){this.custom(scrollTop,h+this.options.padding*2>vph?xy.y-this.options.padding:xy.y+h+this.options.paddings-vph);}else{if(this.options.onComplete)setTimeout(this.options.onComplete.bind(this),10);}}}});fx.Layout=Class.create();fx.Layout.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=$(el);this.el.style.overflow="hidden";this.el.iniWidth=this.el.offsetWidth;this.el.iniHeight=this.el.offsetHeight;this.setOptions(options);}});fx.Height=Class.create();Object.extend(Object.extend(fx.Height.prototype,fx.Layout.prototype),{increase:function(){this.el.style.height=this.now+"px";if(this.options.up)this.el.style.marginTop=-this.now+(this.options.margin||0)+'px';if(this.now==this.to){this.el.style.overflow='';if(this.to==0)this.el.style.display='none';if(this.resetHeight)this.el.style.height='';}},toggle:function(){if(this.el.offsetHeight>0)this.custom(this.el.offsetHeight,0);else this.custom(0,this.el.scrollHeight);},expand:function(html){var element=this.el;var display=element.style.display;if(display=='block'||display==''){var origHeight=element.offsetHeight;}else{var origHeight=0;}
element.style.display="block";element.style.height=origHeight+'px';element.style.marginTop=(this.options.margin||0)+'px';if(html)element.innerHTML=html;this.resetHeight=true;this.custom(origHeight,element.scrollHeight);}});fx.Replace=Class.create();Object.extend(Object.extend(fx.Replace.prototype,fx.Layout.prototype),{phase:1,html:'',increase:function(){if(this.phase==1){this.el.style.height=this.height*this.now+"px";this.el.style.marginTop=this.height*(this.now-1)+"px";}else{var height=this.el.scrollHeight;this.el.style.height=height*this.now+"px";this.el.style.marginTop=height*(this.now-1)+"px";if(!this.resetParHeight)this.el.parentNode.style.height=this.origParHeight+(height-this.height)*this.now+'px';}
if(this.now==this.to){if(this.phase==1){this.phase=2;this.el.innerHTML=this.html;this.options.onComplete=this.phase2OnComplete;this.phase2OnComplete=null;this.custom(0,1);}else{this.el.style.overflow='';this.el.style.marginTop='';if(!this.resetParHeight)this.el.parentNode.style.height='';if(!this.resetHeight)this.el.style.height='';}}},replace:function(html){this.html=html;this.resetHeight=parseInt(this.el.style.height);this.resetParHeight=parseInt(this.el.parentNode.style.height);this.padding=parseInt(YuDom.getStyle(this.el.parentNode,'padding-top'))+parseInt(YuDom.getStyle(this.el.parentNode,'padding-bottom'));this.origParHeight=this.resetParHeight||(this.el.parentNode.offsetHeight-this.padding);this.el.parentNode.style.height=this.origParHeight+'px';this.height=this.el.offsetHeight;this.phase2OnComplete=this.options.onComplete;this.options.onComplete=null;this.custom(1,0);}});fx.Width=Class.create();Object.extend(Object.extend(fx.Width.prototype,fx.Layout.prototype),{increase:function(){this.el.style.width=this.now+"px";},toggle:function(){if(this.el.offsetWidth>0)this.custom(this.el.offsetWidth,0);else this.custom(0,this.el.iniWidth);}});fx.Opacity=Class.create();fx.Opacity.prototype=Object.extend(new fx.Base(),{initialize:function(el,options){this.el=el;this.now=1;this.setOptions(options);},single:function(el){if(ie){el.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+parseInt(this.now*100)+")";}else{el.style.MozOpacity=this.now;el.style.opacity=this.now;}
if(this.now==0){el.style.visibility="hidden";if(ie)el.style.filter='none';}else if(this.now>=0.9999){if(ie)el.style.filter='none';}else el.style.visibility="visible";},increase:function(){if(this.now==1&&mz)this.now=0.9999;if(this.el.constructor==Array){for(var i in this.el){this.single(this.el[i]);}}else{this.single(this.el);}},toggle:function(){if(this.now>0)this.custom(1,0);else this.custom(0,1);}});fx.Slide=Class.create();fx.Slide.prototype=Object.extend(new fx.Base(),{initialize:function(el,options,adjust){this.el=el;this.el.style.position='absolute';this.fromxy=getXY(this.el);this.now=1;this.setOptions(options);var defaultAdjust={x:0,y:0};this.adjust=adjust||defaultAdjust;},increase:function(){if(this.now==1)this.now=0.9999;this.el.style.left=(this.toxy.x-this.fromxy.x)*this.now+this.fromxy.x+this.adjust.x+'px';this.el.style.top=(this.toxy.y-this.fromxy.y)*this.now+this.fromxy.y+this.adjust.y+'px';},slide:function(to,from){this.toxy=to;if(from)this.fromxy=from;this.custom(0,1);}});fx.Combo=Class.create();fx.Combo.prototype={setOptions:function(options){this.options={opacity:true,height:true,width:false}
Object.extend(this.options,(arguments.length==1)?options:new Object());},onComplete:function(){var _this=this.el.combo;_this.comboCount--;if(!_this.comboCount){_this.el.o=null;_this.el.h=null;_this.el.w=null;_this.el.combo=null;_this.savedOnComplete();_this.savedOnComplete=null}},initialize:function(el,options){this.el=$(el);this.setOptions(options);this.comboCount=0;this.savedOnComplete=options.onComplete;options.onComplete=this.onComplete;if(this.options.opacity){this.el.o=new fx.Opacity(el,options);this.comboCount++;}
if(this.options.height){this.el.h=new fx.Height(el,options);this.comboCount++;}
if(this.options.width){this.el.w=new fx.Width(el,options);this.comboCount++;}
this.el.combo=this;},toggle:function(){this.checkExec('toggle');},hide:function(){this.checkExec('hide');},clearTimer:function(){this.checkExec('clearTimer');},checkExec:function(func){if(this.el.o)this.el.o[func]();if(this.el.h)this.el.h[func]();if(this.el.w)this.el.w[func]();},resizeTo:function(hto,wto){if(this.el.h&&this.el.w){this.h.custom(this.el.offsetHeight,this.el.offsetHeight+hto);this.w.custom(this.el.offsetWidth,this.el.offsetWidth+wto);}},customSize:function(hto,wto){if(this.el.h&&this.el.w){this.h.custom(this.el.offsetHeight,hto);this.w.custom(this.el.offsetWidth,wto);}}}
fx.sinoidal=function(pos){return((-Math.cos(pos*Math.PI)/2)+0.5);}
fx.linear=function(pos){return pos;}
fx.cubic=function(pos){return Math.pow(pos,3);}
fx.circ=function(pos){return Math.sqrt(pos);}
function ifWin(iframe)
{var win=null;if(iframe.contentWindow){win=iframe.contentWindow;}else if(iframe.contentDocument){win=iframe.contentDocument.defaultView;}else if(iframe.Document){win=iframe.Document.parentWindow;}else{}
return win;}
function fc2(e,d,criteria,className,first)
{if(d!=null&&d.constructor!=Number){throw'Incorrect calling syntax for fc2: 2nd parameter [depth] must be number!';}
var ret=[];var cs=e.childNodes;for(var i=0,e=cs.length;i<e;i++){if(cs[i].nodeType==3)continue;var pass=true;if(className&&(className.constructor==RegExp?!(className.test(cs[i].className)):!(cs[i].className==className)))
continue;for(var field in criteria){value=criteria[field];switch(value.constructor){case Boolean:attr=cs[i][field]||cs[i].getAttribute(field);if(value&&attr||!value&&!attr)continue;break;case RegExp:attr=cs[i].getAttribute(field);if(value.test(attr))continue;break;default:attr=cs[i].getAttribute(field);if(attr==value)continue;}
pass=false;break;}
if(pass){ret[ret.length]=cs[i];if(first==ret.length)return cs[i];}}
if(d>1){for(var i=0,e=cs.length;i<e;i++){ret=ret.concat(fc2(cs[i],d-1,criteria,className));}}
return first?ret[first-1]:ret;}
function fc(e,t,criteria,className,first)
{var cs=e.getElementsByTagName(t);var ret=[];var first=first||0;if(criteria||className){for(var i=0,e=cs.length;i<e;i++){if(cs[i].nodeType==3)continue;var pass=true;if(className&&(className.constructor==RegExp?!(className.test(cs[i].className)):!(cs[i].className==className)))
continue;for(var field in criteria){var value=criteria[field];switch(value.constructor){case Boolean:var attr=cs[i][field]||cs[i].getAttribute(field);if(value&&attr||!value&&!attr)continue;break;case RegExp:var attr=cs[i].getAttribute(field);if(value.test(attr))continue;break;default:var attr=cs[i].getAttribute(field);if(attr==value)continue;}
pass=false;break;}
if(pass){ret[ret.length]=cs[i];if(first==ret.length)return cs[i];}}}
else{ret=cs;}
return first?ret[first-1]:ret;}
function fca(e,t,criteria,values,obj,properties)
{var n=values.length;var cs=e.getElementsByTagName(t);var hash={};if(typeof properties!='undefined'){if(properties.length!=n){throw'values must correspond to properties'}
for(var i=0;i<n;i++){hash[values[i]]=properties[i];}}else{if(typeof obj=='undefined'){for(var i=0;i<n;i++){hash[values[i]]=i;}}else{for(var i=0;i<n;i++){hash[values[i]]=values[i];}}}
if(typeof obj=='undefined'){obj=new Array(n);}
switch(criteria){case'className':for(var i=0,e=cs.length;i<e;i++){var j=hash[cs[i].className];if(typeof j!='undefined'){obj[j]&&obj[j].constructor==Array?obj[j].push(cs[i]):(!obj[j]?(obj[j]=cs[i]):false);}}
break;default:for(var i=0,e=cs.length;i<e;i++){var j=hash[cs[i][criteria]||cs[i].getAttribute(criteria)];if(typeof j!='undefined'){obj[j]&&obj[j].constructor==Array?obj[j].push(cs[i]):(!obj[j]?(obj[j]=cs[i]):false);}}
break;}
return obj;}
function fp(e,t,criteria,className)
{var p=e;var attr,value;t&&(t=t.toUpperCase());while(p&&p!=document&&p.getAttribute){var pass=(!t||(p.tagName==t));if(pass&&className&&(className.constructor==RegExp?!(className.test(p.className)):!(p.className==className))){pass=false;}
if(pass&&criteria){for(var field in criteria){value=criteria[field];switch(value.constructor){case Boolean:attr=p[field]||p.getAttribute(field);if(value&&attr||!value&&!attr)continue;break;case RegExp:attr=p.getAttribute(field);if(value.test(attr))continue;break;default:attr=p.getAttribute(field);if(attr==value)continue;}
pass=false;break;}}
if(pass){return p;break;}
p=p.parentNode;}
return null;}
function ce(e){return document.createElement(e);}
function cex(e,x){var a=document.createElement(e);for(var prop in x){if(typeof x[prop]=='object'){for(var y in x[prop]){eval('a.'+prop+'.'+y+'=x.'+prop+'.'+y+';');}}else{a[prop]=x[prop];}}
return a;}
function ctn(t){return document.createTextNode(t);}
function ge(i){return document.getElementById(i);}
Function.prototype.apply2all=function(a){for(var i=0,e=a.length;i<e;i++){this(a[i],i,e);};}
function gc(e,i){return e.childNodes[i];}
function ra(){if(ra.arguments.length>1){var el=ra.arguments[0];for(i=1;i<ra.arguments.length;i++){if(arguments[i])
el.removeAttribute(ra.arguments[i]);}
return el;}else{return null;}}
function ib(a,b){return b.parentNode.insertBefore(a,b);}
function rn(a,keepNode){!keepNode&&a.innerHTML&&(a.innerHTML='');return a.parentNode&&a.parentNode.removeChild(a);}
function rc(n,o){return o.parentNode.replaceChild(n,o);}
function ia(a,b){if(b.nextSibling){return b.parentNode.insertBefore(a,b.nextSibling);}
else{b.parentNode.appendChild(a);}}
function rec(a){if(a.firstChild&&a.firstChild.nodeType==3){for(var i=a.childNodes.length;i>0;i--){var n=a.childNodes[i-1];if(n.nodeType==3&&!/\S/.test(n.nodeValue))rn(n);}}
return a.firstChild;}
function ac(){if(ac.arguments.length>1){var a=ac.arguments[0];if(a.nodeType==3)throw new'cannot append to text node';for(i=1;i<ac.arguments.length;i++){if(arguments[i])
a.appendChild(ac.arguments[i]);}
return a;}else{document.body.appendChild(ac.arguments[0]);return ac.arguments[0];}}
function at(a){if(a.constructor==Array){var b=a[0];var c;for(var i=1,e=a.length;i<e;i++){c=a[i];if(!c)continue;if(c.constructor==Array){b.appendChild(c[0]);at(c);}else{b.appendChild(c);}}
return b;}else{document.body.appendChild(a);return a;}}
function getXY(el,which)
{var xy=YuDom.getXY(el);if(which){xy[0]+=el.offsetWidth*(which%3)/2;xy[1]+=el.offsetHeight*parseInt(which/3)/2;}
return{x:xy[0],y:xy[1]};}
function getCorners(el){var pos=getXY(el);var w=el.offsetWidth;var h=el.offsetHeight;return{x:pos.x,x2:pos.x+w,y:pos.y,y2:pos.y+h,ym:pos.y+h/2,xm:pos.x+w/2,h:h,w:w};}
function getEvtXY(e)
{var pos={x:0,y:0};if(e.pageX){pos={x:e.pageX,y:e.pageY}}else{pos={x:e.clientX+document.body.scrollLeft-document.body.clientLeft,y:e.clientY+document.body.scrollTop-document.body.clientTop};if(document.body.parentElement&&document.body.parentElement.clientLeft){var bodParent=document.body.parentElement;pos.x+=bodParent.scrollLeft-bodParent.clientLeft;pos.y+=bodParent.scrollTop-bodParent.clientTop;}}
return pos;}
function clone(myObj)
{if(typeof(myObj)!='object')return myObj;if(myObj==null)return myObj;var myNewObj=new myObj.constructor();for(var i in myObj){if(typeof myObj[i]=='object'){myNewObj[i]=clone(myObj[i]);}else{myNewObj[i]=myObj[i];}}
return myNewObj;}
function getRawHref(a)
{return a.getAttribute('href',2);}
function reloadCSS(filename,delquery,addquery)
{var a=document.getElementsByTagName('link');for(var i=0;i<a.length;i++){var s=a[i];if(s.rel.toLowerCase().indexOf('stylesheet')>=0&&s.href&&(!filename||s.href.toLowerCase().indexOf(filename)>=0)){var h=s.href.replace(/(&|\?)forceReload=\d+/,'');if(delquery){var regex=new RegExp('(&|\\?)'+delquery+'=.*?$');h=h.replace(regex,'');var regex=new RegExp('(&|\\?)'+delquery+'=.*?&');h=h.replace(regex,'$1');}
if(addquery){h=h+(h.indexOf('?')>=0?'&':'?')+addquery;}
h=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new Date().valueOf());s.href=h;}}}
function happensInElement(event,element){var etarget=YuEvent.getTarget(event);if(YuDom.isAncestor(element,etarget))return true;var xy=getEvtXY(event);var corners=getCorners(element);return xy.x>=corners.x&&xy.x<=corners.x2&&xy.y>=corners.y&&xy.y<=corners.y2;};var op=/opera 5|opera\/5/i.test(navigator.userAgent)&&window.opera;var ie=!op&&/msie/i.test(navigator.userAgent);var mz=!op&&/mozilla\/5/i.test(navigator.userAgent);function centerParent(el){var parent=el.parentNode;if(!parent)return;var pl=parseInt(parent.style.paddingLeft||'0');var pr=parseInt(parent.style.paddingRight||'0');el.style.left=(parent.clientWidth-pl-pr-el.clientWidth)/2+'px';}
function middleParent(el){var parent=el.parentNode;if(!parent)return;var pl=parseInt(parent.style.paddingTop||'0');var pr=parseInt(parent.style.paddingBottom||'0');el.style.top=(parent.clientHeight-pl-pr-el.clientHeight)/2+'px';}
function Capture(elSrc,sEvent,fHandler)
{var events=sEvent.split('|');var handler=function(e){e=YuEvent.getEvent(e);YuEvent.stopEvent(e);fHandler.call(YuEvent.getTarget(e),e,YuEvent.getTarget(e));return false};var stop=function(){if(elSrc.releaseCapture){for(var i=0;i<events.length;i++){YuEvent.removeListener(elSrc,events[i],handler);}
elSrc.releaseCapture();}
else if(document.addEventListener){for(var i=0;i<events.length;i++){document.removeEventListener(events[i],handler,true);}}
else{}
YuEvent.removeListener(elSrc,'keydown',escape);elSrc=null;start=null;stop=null;events=null;this.start=null;this.stop=null;fHandler=null;handler=null;};var start=function(){if(elSrc.setCapture){for(var i=0;i<events.length;i++){YuEvent.addListener(elSrc,events[i],handler);}
elSrc.setCapture();}
else if(document.addEventListener){for(var i=0;i<events.length;i++){document.addEventListener(events[i],handler,true);}}
else{}};this.start=start;this.stop=stop;}
var addStyleRule=document.styleSheets[0].addRule?function(selector,style){return document.styleSheets[0].addRule(selector,style,0);}:function(selector,style){return document.styleSheets[0].insertRule(selector+" {"+style+"}",0);};var removeStyleRule=document.styleSheets[0].removeRule?function(index){document.styleSheets[0].removeRule(index);}:function(index){document.styleSheets[0].removeRule(index);};function onContent(f){YuEvent.onDOMReady(f);}
function fixSelect(el)
{var value=el.getAttribute('m_value');if(value!=''){for(var i=0;i<el.options.length;i++){if(el.options[i].value==value){el.options[i].selected=true;break;}}}}
function getImgSize(dImg)
{var size=[-1,-1];if(dImg.naturalWidth!=null)
{size[0]=dImg.naturalWidth;size[1]=dImg.naturalHeight;}
else if(dImg.runtimeStyle)
{dImg.runtimeStyle.width='auto';dImg.runtimeStyle.height='auto';dImg.runtimeStyle.borderWidth='0';dImg.runtimeStyle.padding='0';size[0]=dImg.offsetWidth;size[1]=dImg.offsetHeight;dImg.runtimeStyle.width='';dImg.runtimeStyle.height='';dImg.runtimeStyle.borderWidth='';dImg.runtimeStyle.padding='';}else
{var dImgBk=dImg.cloneNode(true);dImg.className='';dImg.style.width='auto !important';dImg.style.height='auto !important';dImg.style.borderWidth='0 !important';dImg.style.padding='0 !important';dImg.removeAttribute('width');dImg.removeAttribute('height');size[0]=dImg.width;size[1]=dImg.height;dImg.setAttribute('width',dImgBk.getAttribute('width'));dImg.setAttribute('height',dImgBk.getAttribute('height'));dImg.style.width=dImgBk.style.width;dImg.style.height=dImgBk.style.height;dImg.style.padding=dImgBk.style.padding;dImg.style.borderWidth=dImgBk.style.borderWidth;dImg.style.className=dImgBk.style.className;};return(size);}
function TabPane(elRoot){this.elRoot=elRoot;elRoot.tabPaneController=this;elRoot.setAttribute('tabPaneController',this);this.elTabPane=fc2(this.elRoot,1,null,'TabPane')[0];if(!this.elTabPane){this.buildPane();}
this.bindPane();};TabPane.TAB_TYPE_STATIC=1;TabPane.TAB_TYPE_URL=2;TabPane.prototype.buildPane=function(){this.elRoot.innerHTML=''
+' <table class="TabPane" name="TabPane"><tbody>'
+'  <tr>'
+'   <td class="LabelPaneContainer">'
+'    <div class="LabelPane" name="LabelPane">'
+'     <div class="LabelList" name="LabelList">'
+'     </div>'
+'     <div class="selector">'
+'     </div>'
+'    </div>'
+'   </td>'
+'   <td>'
+'    <div class="ContentPaneContainer">'
+'     <div class="ContentPane" name="ContentPane"></div>'
+'    </div>'
+'   </td>'
+'  </tr>'
+' </tbody></table>'
+'';this.elTabPane=fc2(this.elRoot,1,null,'TabPane')[0];};TabPane.prototype.bindPane=function(){this.elLabelPaneContainer=fc(this.elTabPane,'td',null,'LabelPaneContainer',true);this.elContentPaneContainer=fc(this.elTabPane,'div',null,'ContentPaneContainer',true);this.elLabelPane=fc(this.elLabelPaneContainer,'div',null,'LabelPane',true);this.elContentPane=fc(this.elContentPaneContainer,'div',null,'ContentPane',true);this.elLabelList=fc(this.elLabelPane,'div',null,'LabelList',true);this.elSelector=fc(this.elLabelPane,'div',null,/selector/,true);this.elContentList=fc(this.elContentPane,'div',null,'ContentList',true);var arrLabels=fc(this.elLabelPane,'div',{name:'LabelItem'});var arrContents=fc(this.elContentPane,'div',{name:'ContentItem'});var tmpKey=null;this.counter=arrLabels.length;this.arrLabels={};this.arrContents={};this.arrTabTypes={};for(var i=0;i<this.counter;i++){this.arrTabTypes[i]=TabPane.TAB_TYPE_STATIC;var key=arrLabels[i].tabKey||arrLabels[i].getAttribute('tabKey');this.arrLabels[key]=arrLabels[i];for(var j=0;j<this.counter;j++){if(arrContents[j].tabKey==key||arrContents[j].getAttribute('tabKey')==key){this.arrContents[key]=new ContentItem(arrContents[j]);break;}}
this.arrLabels[key].onclick=this.labelClick;}
if(this.elContentPaneToggle){this.elContentPaneToggle.onclick=function(e){var controller=fp(this,null,{tabPaneController:true}).tabPaneController;controller.resetActiveKey();return false;};}
arrLabels=null;arrContents=null;};TabPane.prototype.setActiveKey=function(key){if(this.activeKey==key)return;if(this.activeKey){this.arrContents[this.activeKey].hide();}
this.activeKey=key;this.elContentPaneContainer.style.display='block';this.elContentPaneContainer.style.height='650px';this.elSelector.style.left=this.arrLabels[key].offsetLeft+'px';this.elSelector.style.top=this.arrLabels[key].offsetTop+'px';this.elSelector.style.height=this.arrLabels[key].offsetHeight-3+'px';;Element.replaceClassName(this.elSelector,'hidden','visible');this.arrContents[key].show();}
TabPane.prototype.resetActiveKey=function(){if(this.activeKey){this.arrContents[this.activeKey].hide();}
this.activeKey='';this.elContentPaneContainer.style.display='';this.elContentPaneContainer.style.height='';this.elContentPaneContainer.style.width='';this.elSelector.style.left='';this.elSelector.style.top='';this.elSelector.style.height='';Element.replaceClassName(this.elSelector,'visible','hidden');}
TabPane.prototype.addUrlTab=function(elLabel,strUrl,key){var holder=cex('div',{className:'ContentItem hidden'});var item=new UrlContentItem(holder,strUrl,true);this.addTab(elLabel,item,key,TabPane.TAB_TYPE_URL);};TabPane.prototype.addStaticTab=function(elLabel,elContent,key){var item=new ContentItem(elContent);this.addTab(elLabel,item,key,TabPane.TAB_TYPE_STATIC);};TabPane.prototype.addTab=function(elLabel,contentItem,key,tabType){this.counter++;elLabel=elLabel||('Tab '+this.counter);if(elLabel.constructor==String){elLabel=cex('div',{className:'LabelItem unselected',innerHTML:elLabel});}
contentItem=contentItem||('Contents in tab '+this.counter);if(contentItem.constructor==String){contentItem=cex('div',{className:'ContentItem hidden',innerHTML:contentItem});contentItem=new ContentItem(contentItem);}
key=key||('key '+this.counter);tabType=tabType||TabPane.TAB_TYPE_STATIC;this.arrTabTypes[key]=tabType;this.arrLabels[key]=elLabel;this.arrContents[key]=contentItem;elLabel.unselectable='on';elLabel.setAttribute('tabKey',key);elLabel.tabKey=key;ac(this.elLabelList,elLabel);contentItem.elRoot.setAttribute('tabKey',key);contentItem.elRoot.tabKey=key;ac(this.elContentList,contentItem.elRoot);elLabel.onclick=this.labelClick;};TabPane.prototype.labelClick=function(){var controller=fp(this,null,{tabPaneController:true}).tabPaneController;var key0=controller.activeKey;var key1=this['tabKey']||this.getAttribute('tabKey');if(!key0){Element.replaceClassName(controller.elSelector,'hidden','visible');controller.elContentPaneContainer.style.display='block';controller.elContentPaneContainer.style.height='650px';controller.elContentPane.style.width='0px';var myWidth=new fx.Width(controller.elContentPane,{duration:500});myWidth.custom(0,500);myWidth=null;}
controller.elSelector.style.height=this.offsetHeight-3+'px';var mySlide=new fx.Slide(controller.elSelector,{duration:key0?300:0,onComplete:function(){key0&&controller.arrContents[key0].hide();controller.arrContents[key1].show();controller=null;}});mySlide.slide({x:this.offsetLeft,y:this.offsetTop},{x:controller.elSelector.offsetLeft,y:controller.elSelector.offsetTop});mySlide=null;controller.activeKey=key1;};TabPane.prototype.activate=function(){};TabPane.prototype.deactivate=function(){this.elRoot.setAttribute('tabPaneController',null);this.elRoot.tabPaneController=null;this.elRoot=null;this.elTabPane=null;for(var key in this.arrLabels){this.arrLabels[key].onclick=null;this.arrLabels[key]=null;}
for(var key in this.arrContents){this.arrContents[key].elRoot=null;this.arrContents[key]=null;}
if(this.elContentPaneToggle){this.elContentPaneToggle.onclick=null;}
this.arrLabels=null;this.arrContents=null;this.arrTabTypes=null;this.elLabelPaneContainer=null;this.elContentPaneContainer=null;this.elLabelPane=null;this.elContentPane=null;this.elContentPaneToggle=null;this.elLabelList=null;this.elSelector=null;this.elContentList=null;};function ContentItem(elRoot){if(arguments.length==0)return;this.elRoot=elRoot;};ContentItem.prototype.show=function(){Element.replaceClassName(this.elRoot,'hidden','visible');};ContentItem.prototype.hide=function(){Element.replaceClassName(this.elRoot,'visible','hidden');};function UrlContentItem(elRoot,url,loadOnDemand){this.base=ContentItem;this.base(elRoot);this.url=url;this.loadOnDemand=loadOnDemand;var div1=cex('div',{style:{width:'100px',height:'100px'},className:'loading'});ac(elRoot,div1);var div2=cex('div',{className:'hidden'});ac(elRoot,div2);this.loaded=false;if(!loadOnDemand)this.load();}
UrlContentItem.prototype=new ContentItem;UrlContentItem.prototype.constructor=UrlContentItem;UrlContentItem.prototype.load=function(){if(this.loaded)return;var _this=this;var div=this.elRoot.childNodes[1];this.uniqueId=new Date().getTime();div.innerHTML='<iframe name=\"frame_'+this.uniqueId+'\" id=\"frame_'+this.uniqueId+'\" src=\"about:blank\" onload=\"this.loader && this.loader.onStateChange();" width="100%" height="600" frameborder="0"></iframe>';this.frame=fc(div,'iframe',null,null,true);this.frame.src=this.url;this.frame.loader=this;this.loaded=true;};UrlContentItem.prototype.show=function(){if(!this.loaded)this.load();Element.replaceClassName(this.elRoot,'hidden','visible');};UrlContentItem.prototype.hide=function(){Element.replaceClassName(this.elRoot,'visible','hidden');};UrlContentItem.prototype.onStateChange=function(){this.frame.loader=null;this.frame.onload=null;this.elRoot.childNodes[1].className='visible';rn(this.elRoot.firstChild);};var YuEvent=YAHOO.util.Event;var YuDom=YAHOO.util.Dom;function loggerInit(){if(YAHOO.widget.LogReader&&!window._logReader){var w=window.open("",(""+window.location.host).replace(/[^a-zA-Z0-9]/g,''),"resizable=yes,status=yes,menubar=no,location=no,scrollbars=yes,width=560,height=680");if(!w){YAHOO.widget.Logger=null;return;}
YAHOO.widget.Logger.disableFirebug();w.document.body.innerHTML=''
+'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
+'<html lang="en" dir="ltr" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><title>Yui.Logger</title>'
+'</head><body>'
+'<div id="logReader"></div>'
+'</body></html>';var css=w.document.createElement('link');css.href=Config.HOMESITE+Config.BASEPATH+'/js/yui/logger/assets/logger.css';css.rel='stylesheet';css.type='text/css';var header=w.document.getElementsByTagName('head');header[0].appendChild(css);w.document.title='Log: '+window.location.host;var el=w.document.getElementById('logReader');window._logReader=new YAHOO.widget.LogReader(el);w=null;el=null;}}
loggerInit();if(!/mozilla\/5/i.test(navigator.userAgent)){}
var DBG={println:function(message){YAHOO.log(message,'DBG','DBG');}};YuDom.applyStyle=function(el,oProperty){for(var property in oProperty){YuDom.setStyle(el,property,oProperty[property]);}};YuDom.showStyle=function(el,aProperty){var o={};if(aProperty.constructor==String){aProperty=[aProperty];}
for(var i=0;i<aProperty.length;i++){var property=aProperty[i];o[property]=YuDom.getStyle(el,property);}
YAHOO.log(JSON.stringify(o,true),'debug','yui-compat.js');};var log=function(){if(window._logReader){if(typeof arguments[0]!='string'){arguments[0]=JSON.stringify(arguments[0],true);}
YAHOO.log.apply(YAHOO.log,arguments);}}
if(!window.console)console={log:YAHOO.log};if(YAHOO.widget&&YAHOO.widget.Node){YAHOO.widget.Node.prototype.getDepth=function(){var node=this;var depth=0;while(node&&!node.isRoot()){depth++;node=node.parent;}
return depth;};YAHOO.widget.Node.prototype.isChildOf1=function(test){var node=this.parent;while(node){if(node==test)return true;node=node.parent;}
return false;};}
var MIN_YDIALOG_WIDTH=320;var MIN_YDIALOG_HEIGHT=100;if(YAHOO.widget.Dialog){YAHOO.widget.Dialog.prototype.autoSize=function(){var pl=parseInt(YuDom.getStyle(this.body,'padding-left'));var pr=parseInt(YuDom.getStyle(this.body,'padding-right'));var pt=parseInt(YuDom.getStyle(this.body,'padding-top'));var pb=parseInt(YuDom.getStyle(this.body,'padding-bottom'));var width=this.body.scrollWidth-pl-pr;width=width<MIN_YDIALOG_WIDTH?MIN_YDIALOG_WIDTH:width;var maxWidth=YuDom.getViewportWidth()-80;width=width>maxWidth?maxWidth:width;this.cfg.setProperty('width',width+pl+pr+'px');this.body.style.height='';var height=this.body.offsetHeight-pt-pb;height=height<MIN_YDIALOG_HEIGHT?MIN_YDIALOG_HEIGHT:height;var maxHeight=YuDom.getViewportHeight()-150;height=height>maxHeight?maxHeight:height;this.body.style.height=height+pt+pb+'px';this.body.style.overflowY='auto';this.body.style.position='relative';}}
var Help={toggle:null,receiver:null,htop:null,hright:null,hbottom:null,hleft:null,capture:null,borderWidth:1,helpurl:Config.ROOTPATH+'/help',init:function(){this.toggle=document.getElementById('helptoggle');if(!this.toggle)return;this.receiver=document.getElementById('helpreceiver');var style={width:'2px',height:'2px',position:'absolute',display:'none',padding:'0px',background:'#f88',fontSize:'0px'};this.htop=cex('div',{style:style});this.hright=cex('div',{style:style});this.hbottom=cex('div',{style:style});this.hleft=cex('div',{style:style});ac(this.htop);ac(this.hright);ac(this.hbottom);ac(this.hleft);YuEvent.addListener(this.toggle,'click',this.starttrace.bind(this));},starttrace:function(){this.receiver.style.cursor='help';Element.replaceClassName(document.body,'','help');this.capture=new Capture(this.receiver,'click|mouseover|mouseout',function(e,source){this.source=source;if(source!=this.highlight){this.trace(e,source);}else{if(e.type=='click'){this.stoptrace();this.help(this.token);}}}.bind(this));this.capture.start();},trace:function(e,source){var target=fp(source,null,{helptoken:true});switch(e.type){case'click':this.stoptrace(source,target);if(this.source&&this.source.nodeName&&this.source.nodeName.toUpperCase()=='HTML'){var p=YuEvent.getXY(e);var r=YuDom.getRegion(document.body);var bInPage=p[0]>=r.left&&p[0]<=r.right&&p[1]>=r.top&&p[1]<=r.bottom;if(!bInPage)return;}
this.help(this.token);break;case'mouseover':default:this.highlight(source,target);this.token=target?(target.getAttribute('helptoken')||target.helptoken):"";this.target=target;break;}},stoptrace:function(source,target){this.receiver.style.cursor='';Element.replaceClassName(document.body,'help','');YuDom.setStyle(this.htop,'display','none');YuDom.setStyle(this.hright,'display','none');YuDom.setStyle(this.hbottom,'display','none');YuDom.setStyle(this.hleft,'display','none');this.capture.stop();this.capture=null;},highlight:function(source,target){if(target==this.target)return;if(target){var c=getCorners(target);if(ie){var dX=parseInt(YuDom.getStyle(target,'borderLeftWidth'));var dY=parseInt(YuDom.getStyle(target,'borderTopWidth'));if(!isNaN(dX)){c.x-=dX;c.x2-=dX;}
if(!isNaN(dY)){c.y-=dY;c.y2-=dY;}}
YuDom.applyStyle(this.htop,{left:c.x-2*this.borderWidth-1+'px',top:c.y-2*this.borderWidth-1+'px',width:c.x2-c.x+2*this.borderWidth+'px',display:'block'});YuDom.applyStyle(this.hright,{left:c.x2-1+'px',top:c.y-2*this.borderWidth-1+'px',height:c.y2-c.y+2*this.borderWidth+2+'px',display:'block'});YuDom.applyStyle(this.hbottom,{left:c.x-2*this.borderWidth-1+'px',top:c.y2-1+'px',width:c.x2-c.x+2*this.borderWidth+2+'px',display:'block'});YuDom.applyStyle(this.hleft,{left:c.x-2*this.borderWidth-1+'px',top:c.y-2*this.borderWidth-1+'px',height:c.y2-c.y+2*this.borderWidth+'px',display:'block'});}
else{this.htop.style.display='none';this.hright.style.display='none';this.hbottom.style.display='none';this.hleft.style.display='none';}},help:function(token){this.load(token);},load:function(token){var url=this.helpurl+'?t='+(token?encodeURIComponent(token):'');this.helpwin=window.open(url,'HelpOn'+window.location.host,'resizable=yes,status=no,menubar=no,location=yes,scrollbars=yes');},deactivate:function(){if(!this.toggle)return;YuEvent.removeListener(this.toggle,'click',this.starttrace.bind(this));if(this.capture){this.capture.stop();}
this.toggle=null;this.receiver=null;this.htop=null;this.hright=null;this.hbottom=null;this.hleft=null;this.helpwin=null;this.target=null;this.source=null;}};Iqube.Util.Help2={el:null,nElId:null,oDialog:null,tags:["a","div","span","img","table"],nodes:[],overlays:[],highlights:[],sImgIds:[],helpContents:{},token2id:{"toolbar_myPortal":"toolbar_myPortal"},sImgUrl2:Config.BASEPATH+"/portal/images/help.gif",sImgUrl1:Config.BASEPATH+"/portal/images/help_on.gif",sColor1:'#f88',sColor2:'#8f8',nWidth1:2,nWidth2:4,overlayWidth:16,overlayHeight:16,render:function(){if(!this.el){this.nElId=__getuid("Help2-");this.el=cex('div',{id:this.nElId,innerHTML:'<div class="hd"></div><div name="bd" class="bd"></div>'});ac(this.el);this.oDialog=new YAHOO.widget.Dialog(this.nElId,{fixedcenter:true,visible:false,modal:true,constraintoviewport:true,close:false,autoSize:true,buttons:[{text:"Home",handler:this.helpHome.bind(this)},{text:"Prev",handler:this.helpPrev.bind(this)},{text:"Next",handler:this.helpNext.bind(this)},{text:"Close",handler:this.hideHelp.bind(this),isDefault:true}]});this.oDialog.render();}},activate:function(){this.render();},deactivate:function(){this.hideHelp();this.el=null;this.oDialog=null;},handleClose:function(){throw Error("not implemented function handleClose");},helpHome:function(){if(this.homeToken){this.loadHelp(this.homeToken);}},helpPrev:function(){var ndx=indexOf(this.nodes,this.target);if(ndx<=0||!ndx)return;ndx--;this.loadHelp([this.nodes[ndx],this.overlays[ndx],this.highlights[ndx]]);},helpNext:function(){var ndx=indexOf(this.nodes,this.target);if(ndx>=this.nodes.length-1)return;ndx++;this.loadHelp([this.nodes[ndx],this.overlays[ndx],this.highlights[ndx]]);},showHelp:function(homeToken){this.render();this.oDialog.setHeader("");this.oDialog.setBody("正在載入幫助. 請稍侯…")
this.oDialog.show();this.addMarkers();this.homeToken=homeToken;if(this.homeToken){this.loadHelp(this.homeToken);}
else{this.oDialog.setHeader("幫助");this.oDialog.setBody("請在<img src='"+this.sImgUrl1+"'/>上按鼠標選擇需要協助的部份!");}},hideHelp:function(){this.removeMarkers();if(this.oDialog)this.oDialog.hide();},addMarkers:function(){this.nodes=[];this.overlays=[];this.sImgIds=[];for(var i=0;i<this.tags.length;i++){var els=fc(document.body,this.tags[i],{helpToken:true});this.nodes=this.nodes.concat(els);}
for(var i=0;i<this.nodes.length;i++){var h=this.addMarker(this.nodes[i]);if(!h){this.nodes.splice(i,1);i--;}}},removeMarkers:function(){this.nodes=[];for(var i=0;i<this.overlays.length;i++){$(this.sImgIds[i]).onclick=null;this.overlays[i].hide();rn(this.overlays[i].element);this.highlights[i].deactivate();}
this.overlays=[];this.highlights=[];this.sImgIds=[];},addMarker:function(e){var xy=getXY(e);if(typeof xy['x']=="undefined"||typeof xy['y']=="undefined"){return;}
var sMarkerId=__getuid("Help2-marker-");var sImgId=sMarkerId+'-img';var o=new YAHOO.widget.Overlay(sMarkerId,{width:"16px",visible:true,xy:this._getOverlayPosition(e)});o.setBody("<img style='cursor:pointer;-moz-user-select:none;' unselectable='1' id='"+sImgId+"' src='"+this.sImgUrl1+"'/>");o.render(document.body);var h=new Iqube.Util.Highlight(e,{color:this.sColor1});h.activate();h.show();$(sMarkerId).style.zIndex=10007;$(sImgId).onclick=this.loadHelp.bind(this,[e,o,h]);this.overlays.push(o);this.highlights.push(h);this.sImgIds.push(sImgId);return h;},loadHelp:function(args,e){if(this.target){var ndx=indexOf(this.nodes,this.target);if(ndx>=0)this.highlights[ndx].set({color:this.sColor1,width:this.nWidth1});}
if(typeof args=="string"){var token=args;delete this.target;}
else{var element=args[0];var overlay=args[1];var highlight=args[2];var token=element.getAttribute("helpToken");this.target=element;highlight.set({color:this.sColor2,width:this.nWidth2});highlight.scrollIntoView();}
if(this.helpContents[token]){this.displayHelpPage(this.helpContents[token]);}
else{this.oDialog.setBody('<img src="'+Config.BASEPATH+'/portal/images/loading3.gif"/>');this.onHelpContentReady(token,this.loadHelp.bind(this,args,e));}},onHelpContentReady:function(token,action){if(this.helpContents[token]){action();return;}
var onReturn=function(result,args){var resp=result.getResponse();if(!resp.isException){var post=resp.result;post=post||{};post.helpToken=token;this.helpContents[token]=post;action();}else{MsgBar.addMsg(resp.html);}};var filter={helpToken:token};if(typeof this.token2id[token]=="number"){var filter={post_id:this.token2id[token]};}
else{var filter={helpToken:this.token2id[token]||token};}
var ajx=new AjxAction('iqube','getPage');ajx.set('search',filter);ajx.setCallback(onReturn.bind(this));ajx.fire();},displayHelpPage:function(page){if(page.post_id){var title="<h3 class='title'>"+page.title+"</h3>";var body="<div style='padding:3px;'>"+page.body+"<div>";}
else{var title="";var body="<div class='instruction' style='padding:3px;'>沒法提供幫助.<div>";}
var header="幫助 \""+page.helpToken+"\"";this.oDialog.setHeader(header);this.oDialog.setBody(title+body);if(this.oDialog.autoSize)this.oDialog.autoSize();this.oDialog.center();},_getOverlayPosition:function(element){var c=getCorners(element);if(ie){var dX=parseInt(YuDom.getStyle(element,'borderLeftWidth'));var dY=parseInt(YuDom.getStyle(element,'borderTopWidth'));if(!isNaN(dX)){c.x-=dX;c.x2-=dX;}
if(!isNaN(dY)){c.y-=dY;c.y2-=dY;}}
var left=0;var top=0;var width=c.x2-c.x;if(width>this.overlayWidth)left=c.x;else left=(c.x+c.x2-this.overlayWidth)/2;var height=c.y2-c.y;if(height>this.overlayHeight)top=c.y;else top=(c.y+c.y2-this.overlayHeight)/2;return[left,top];}};