var JSAN=function(){JSAN.addRepository(arguments)};JSAN.VERSION="0.10-jifty2";JSAN.globalScope=self;JSAN.includePath=[".","lib"];JSAN.errorLevel="none";JSAN.errorMessage="";JSAN.loaded={};JSAN.use=function(){var classdef=JSAN.require(arguments[0]);if(!classdef)return null;var importList=JSAN._parseUseArgs.apply(JSAN,arguments).importList;JSAN.exporter(classdef,importList);return classdef;}
JSAN.require=function(pkg){var path=JSAN._convertPackageToPath(pkg);if(JSAN.loaded[path]){return JSAN.loaded[path];}
try{var classdef=eval(pkg);if(typeof classdef!="undefined")return classdef;}catch(e){}
for(var i=0;i<JSAN.includePath.length;i++){var js;try{var url=JSAN._convertPathToUrl(path,JSAN.includePath[i]);js=JSAN._loadJSFromUrl(url);}catch(e){if(i==JSAN.includePath.length-1)throw e;}
if(js!=null){var classdef=JSAN._createScript(js,pkg);JSAN.loaded[path]=classdef;return classdef;}}
return false;}
JSAN.exporter=function(){JSAN._exportItems.apply(JSAN,arguments);}
JSAN.addRepository=function(){var temp=JSAN._flatten(arguments);for(var i=temp.length-1;i>=0;i--)
JSAN.includePath.unshift(temp[i]);return JSAN;}
JSAN._flatten=function(list1){var list2=new Array();for(var i=0;i<list1.length;i++){if(typeof list1[i]=="object"){list2=JSAN._flatten(list1[i],list2);}
else{list2.push(list1[i]);}}
return list2;};JSAN._findMyPath=function(){if(document){var scripts=document.getElementsByTagName("script");for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute("src");if(src){var inc=src.match(/^(.*?)\/?JSAN.js/);if(inc&&inc[1]){var repo=inc[1];for(var j=0;j<JSAN.includePath.length;j++){if(JSAN.includePath[j]==repo){return;}}
JSAN.addRepository(repo);}}}}}
JSAN._findMyPath();JSAN._convertPathToUrl=function(path,repository){return repository.concat("/"+path);};JSAN._convertPackageToPath=function(pkg){var path=pkg.replace(/\./g,"/");path=path.concat(".js");return path;}
JSAN._parseUseArgs=function(){var pkg=arguments[0];var importList=[];for(var i=1;i<arguments.length;i++)
importList.push(arguments[i]);return{pkg:pkg,importList:importList}}
JSAN._loadJSFromUrl=function(url){return new JSAN.Request().getText(url);}
JSAN._findExportInList=function(list,request){if(list==null)return false;for(var i=0;i<list.length;i++)
if(list[i]==request)
return true;return false;}
JSAN._findExportInTag=function(tags,request){if(tags==null)return[];for(var i in tags)
if(i==request)
return tags[i];return[];}
JSAN._exportItems=function(classdef,importList){var exportList=new Array();var EXPORT=classdef.EXPORT;var EXPORT_OK=classdef.EXPORT_OK;var EXPORT_TAGS=classdef.EXPORT_TAGS;if(importList.length>0){importList=JSAN._flatten(importList);for(var i=0;i<importList.length;i++){var request=importList[i];if(JSAN._findExportInList(EXPORT,request)||JSAN._findExportInList(EXPORT_OK,request)){exportList.push(request);continue;}
var list=JSAN._findExportInTag(EXPORT_TAGS,request);for(var i=0;i<list.length;i++){exportList.push(list[i]);}}}else{exportList=EXPORT;}
JSAN._exportList(classdef,exportList);}
JSAN._exportList=function(classdef,exportList){if(typeof(exportList)!="object")return null;for(var i=0;i<exportList.length;i++){var name=exportList[i];if(JSAN.globalScope[name]==null)
JSAN.globalScope[name]=classdef[name];}}
JSAN._makeNamespace=function(js,pkg){var spaces=pkg.split(".");var parent=JSAN.globalScope;eval(js);var classdef=eval(pkg);for(var i=0;i<spaces.length;i++){var name=spaces[i];if(i==spaces.length-1){if(typeof parent[name]=="undefined"){parent[name]=classdef;if(typeof classdef["prototype"]!="undefined"){parent[name].prototype=classdef.prototype;}}}else{if(parent[name]==undefined){parent[name]={};}}
parent=parent[name];}
return classdef;}
JSAN._handleError=function(msg,level){if(!level)level=JSAN.errorLevel;JSAN.errorMessage=msg;switch(level){case"none":break;case"warn":alert(msg);break;case"die":default:throw new Error(msg);break;}}
JSAN._createScript=function(js,pkg){try{return JSAN._makeNamespace(js,pkg);}catch(e){JSAN._handleError("Could not create namespace["+pkg+"]: "+e);}
return null;}
JSAN.prototype={use:function(){JSAN.use.apply(JSAN,arguments)}};JSAN.Request=function(jsan){if(JSAN.globalScope.XMLHttpRequest){this._req=new XMLHttpRequest();}else{this._req=new ActiveXObject("Microsoft.XMLHTTP");}}
JSAN.Request.prototype={_req:null,getText:function(url){this._req.open("GET",url,false);try{this._req.send(null);if(this.responseIsSuccess())
return this._req.responseText;}catch(e){JSAN._handleError("File not found: "+url);return null;};JSAN._handleError("File not found: "+url);return null;},responseIsSuccess:function(){return this._req.status==undefined||this._req.status==0||(this._req.status>=200&&this._req.status<300);}};if(typeof(HTTP)=="undefined"){HTTP={};}
HTTP.Push={};HTTP.Push.VERSION='0.04';HTTP.Push=function(args){if(args==undefined){throw"Push must be passed an argument hash!";}
if(args.uri==undefined){throw"Must specify push URI!";}
if(args.onPush==undefined){throw"Must specify onPush handler!";}
if(args.interval==undefined){args.interval=100;}
var body=document.getElementsByTagName("body")[0];var iframe=document.createElement("iframe");iframe.style.border="0px";iframe.style.height="0px";iframe.style.width="0px";iframe.src=args.uri;var interval=undefined;this.start=function(){body.appendChild(iframe);interval=setInterval(function(){flushIframe();},args.interval);}
function flushIframe(){var doc;if(iframe.contentDocument){doc=iframe.contentDocument;}else if(iframe.contentWindow){doc=iframe.contentWindow.document;}else if(iframe.document){doc=iframe.document;}else{return;}
var body=doc.body;while(body&&body.hasChildNodes()){var node=body.firstChild;try{args.onPush(node);}
catch(e){};body.removeChild(node);}}
return this;}
JSAN.includePath=["/static/js/jsan"];JSAN.errorLevel="none";JSAN._use=JSAN.use;JSAN.use=function(){if(!arguments[0])JSAN._use(arguments);};if(!Array.prototype.push){Array.prototype.push=function(){var l=this.length;for(var i=0;i<arguments.length;i++){this[l+i]=arguments[i];}
return this.length;}}
(function(){if(typeof DOM=="undefined")DOM={};DOM.Events={};DOM.Events.VERSION="0.02";DOM.Events.EXPORT=[];DOM.Events.EXPORT_OK=["addListener","removeListener"];DOM.Events.EXPORT_TAGS={":common":DOM.Events.EXPORT,":all":[].concat(DOM.Events.EXPORT,DOM.Events.EXPORT_OK)};var listenerList=[null];DOM.Events.addListener=function(elt,ev,func,makeCompatible){var usedFunc=func;var id=listenerList.length;if(makeCompatible==true||makeCompatible==undefined){usedFunc=makeCompatibilityWrapper(elt,ev,func);}
if(elt.addEventListener){elt.addEventListener(ev,usedFunc,false);listenerList[id]=[elt,ev,usedFunc];return id;}
else if(elt.attachEvent){elt.attachEvent("on"+ev,usedFunc);listenerList[id]=[elt,ev,usedFunc];return id;}
else return false;};DOM.Events.removeListener=function(){var elt,ev,func;if(arguments.length==1&&listenerList[arguments[0]]){elt=listenerList[arguments[0]][0];ev=listenerList[arguments[0]][1];func=listenerList[arguments[0]][2];delete listenerList[arguments[0]];}
else if(arguments.length==3){elt=arguments[0];ev=arguments[1];func=arguments[2];}
else return;if(elt.removeEventListener){elt.removeEventListener(ev,func,false);}
else if(elt.detachEvent){elt.detachEvent("on"+ev,func);}};var rval;function makeCompatibilityWrapper(elt,ev,func){return function(e){rval=true;if(e==undefined&&window.event!=undefined)
e=window.event;if(e.target==undefined&&e.srcElement!=undefined)
e.target=e.srcElement;if(e.currentTarget==undefined)
e.currentTarget=elt;if(e.relatedTarget==undefined){if(ev=="mouseover"&&e.fromElement!=undefined)
e.relatedTarget=e.fromElement;else if(ev=="mouseout"&&e.toElement!=undefined)
e.relatedTarget=e.toElement;}
if(e.pageX==undefined){if(document.body.scrollTop!=undefined){e.pageX=e.clientX+document.body.scrollLeft;e.pageY=e.clientY+document.body.scrollTop;}
if(document.documentElement!=undefined&&document.documentElement.scrollTop!=undefined){if(document.documentElement.scrollTop>0||document.documentElement.scrollLeft>0){e.pageX=e.clientX+document.documentElement.scrollLeft;e.pageY=e.clientY+document.documentElement.scrollTop;}}}
if(e.stopPropagation==undefined)
e.stopPropagation=IEStopPropagation;if(e.preventDefault==undefined)
e.preventDefault=IEPreventDefault;if(e.cancelable==undefined)e.cancelable=true;func(e);return rval;};}
function IEStopPropagation(){if(window.event)window.event.cancelBubble=true;}
function IEPreventDefault(){rval=false;}
function cleanUpIE(){for(var i=0;i<listenerList.length;i++){var listener=listenerList[i];if(listener){var elt=listener[0];var ev=listener[1];var func=listener[2];elt.detachEvent("on"+ev,func);}}
listenerList=null;}
if(!window.addEventListener&&window.attachEvent){window.attachEvent("onunload",cleanUpIE);}})();var JSON={copyright:'(c)2005 JSON.org',license:'http://www.crockford.com/JSON/license.html',stringify:function(v){var a=[];function e(s){a[a.length]=s;}
function g(x){var c,i,l,v;switch(typeof x){case'object':if(x){if(x instanceof Array){e('[');l=a.length;for(i=0;i<x.length;i+=1){v=x[i];if(typeof v!='undefined'&&typeof v!='function'){if(l<a.length){e(',');}
g(v);}}
e(']');return;}else if(typeof x.toString!='undefined'){e('{');l=a.length;for(i in x){v=x[i];if(x.hasOwnProperty(i)&&typeof v!='undefined'&&typeof v!='function'){if(l<a.length){e(',');}
g(i);e(':');g(v);}}
return e('}');}}
e('null');return;case'number':e(isFinite(x)?+x:'null');return;case'string':l=x.length;e('"');for(i=0;i<l;i+=1){c=x.charAt(i);if(c>=' '){if(c=='\\'||c=='"'){e('\\');}
e(c);}else{switch(c){case'\b':e('\\b');break;case'\f':e('\\f');break;case'\n':e('\\n');break;case'\r':e('\\r');break;case'\t':e('\\t');break;default:c=c.charCodeAt();e('\\u00'+Math.floor(c/16).toString(16)+
(c%16).toString(16));}}}
e('"');return;case'boolean':e(String(x));return;default:e('null');return;}}
g(v);return a.join('');},parse:function(text){var p=/^\s*(([,:{}\[\]])|"(\\.|[^\x00-\x1f"\\])*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)\s*/,token,operator;function error(m,t){throw{name:'JSONError',message:m,text:t||operator||token};}
function next(b){if(b&&b!=operator){error("Expected '"+b+"'");}
if(text){var t=p.exec(text);if(t){if(t[2]){token=null;operator=t[2];}else{operator=null;try{token=eval(t[1]);}catch(e){error("Bad token",t[1]);}}
text=text.substring(t[0].length);}else{error("Unrecognized token",text);}}else{token=operator=undefined;}}
function val(){var k,o;switch(operator){case'{':next('{');o={};if(operator!='}'){for(;;){if(operator||typeof token!='string'){error("Missing key");}
k=token;next();next(':');o[k]=val();if(operator!=','){break;}
next(',');}}
next('}');return o;case'[':next('[');o=[];if(operator!=']'){for(;;){o.push(val());if(operator!=','){break;}
next(',');}}
next(']');return o;default:if(operator!==null){error("Missing value");}
k=token;next();return k;}}
next();return val();}};(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}
if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])
selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])
return jQuery().find(selector);return jQuery(elem);}
selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))
return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)
if(value===undefined)
return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}
return this.each(function(i){for(name in options)
jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)
value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)
return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)
ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])
jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)
elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)
this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)
this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)
this[expando]=null;});if(events===true)
this.find("*").andSelf().each(function(i){if(this.nodeType==3)
return;var events=jQuery.data(this,"events");for(var type in events)
for(var handler in events[type])
jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)
if(isSimple.test(selector))
return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)
return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)
return value;values.push(value);}}
return values;}else
return(this[0].value||"").replace(/\r/g,"");}
return undefined;}
if(value.constructor==Number)
value+='';return this.each(function(){if(this.nodeType!=1)
return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))
this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)
this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)
data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)
elems.reverse();}
var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))
obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))
scripts=scripts.add(elem);else{if(elem.nodeType==1)
scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)
jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)
elem.parentNode.removeChild(elem);}
function now(){return+new Date;}
jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!="object"&&typeof target!="function")
target={};if(length==i){target=this;--i;}
for(;i<length;i++)
if((options=arguments[i])!=null)
for(var name in options){var src=target[name],copy=options[name];if(target===copy)
continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)
target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)
target[name]=copy;}
return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)
window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)
script.text=data;else
script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)
id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])
jQuery.cache[id]={};if(data!==undefined)
jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])
break;if(!name)
jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)
elem.removeAttribute(expando);}
delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)
if(callback.apply(object[name],args)===false)
break;}else
for(;i<length;)
if(callback.apply(object[i++],args)===false)
break;}else{if(length==undefined){for(name in object)
if(callback.call(object[name],name,object[name])===false)
break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}
return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))
value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))
elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)
elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
callback.call(elem);for(var name in options)
elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}
if(jQuery(elem).is(":visible"))
getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}
return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)
return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}
if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}
if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}
if(name.match(/float/i))
name=styleFloat;if(!force&&style&&style[name])
ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))
name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))
ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)
stack.unshift(a);for(;i<stack.length;i++)
if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}
ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)
if(swap[i]!=null)
stack[i].style.display=swap[i];}
if(name=="opacity"&&ret=="")
ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}
return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')
context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)
return;if(elem.constructor==Number)
elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)
div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)
if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)
tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))
div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}
elem=jQuery.makeArray(div.childNodes);}
if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))
return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)
ret.push(elem);else
ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)
return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)
elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)
throw"type property can't be changed";elem[name]=value;}
if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))
return elem.getAttributeNode(name).nodeValue;return elem[name];}
if(msie&&notxml&&name=="style")
return jQuery.attr(elem.style,"cssText",value);if(set)
elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+
(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}
return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}
name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)
elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)
ret[0]=array;else
while(i)
ret[--i]=array[i];}
return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)
if(array[i]===elem)
return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])
if(elem.nodeType!=8)
first[pos++]=elem;}else
while(elem=second[i++])
first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}
return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)
if(!inv!=!callback(elems[i],i))
ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)
ret[ret.length]=value;}
return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")
ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)
jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)
this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)
this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)
this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}
return cur;},find:function(t,context){if(typeof t!="string")
return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)
return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)
for(var c=ret[i].firstChild;c;c=c.nextSibling)
if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))
r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)
if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}
if(m=="+")break;}}
ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}
if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}
m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])
oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")
tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}
if(m[1]==".")
r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)
if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}
r=tmp;}
ret=r;}
t=t.replace(re2,"");}}
if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}
if(t)
ret=[];if(ret&&context==ret[0])
ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)
tmp.push(r[i]);}
return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}
if(!m)
break;if(m[1]==":"&&m[2]=="not")
r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")
r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))
z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)
tmp.push(a);}
r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)
if(n.nodeType==1)
n.nodeIndex=c++;merge[id]=true;}
var add=false;if(first==0){if(node.nodeIndex==last)
add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)
add=true;if(add^not)
tmp.push(node);}
r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")
fn=fn[m[2]];if(typeof fn=="string")
fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}
return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)
matched.push(cur);cur=cur[dir];}
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])
if(cur.nodeType==1&&++num==result)
break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)
r.push(n);}
return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)
return;if(jQuery.browser.msie&&elem.setInterval)
elem=window;if(!handler.guid)
handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}
var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)
return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)
elem.addEventListener(type,handle,false);else if(elem.attachEvent)
elem.attachEvent("on"+type,handle);}}
handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)
return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))
for(var type in events)
this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}
jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)
delete events[type][handler.guid];else
for(handler in events[type])
if(!parts[1]||events[type][handler].type==parts[1])
delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)
elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)
elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}
ret=null;delete events[type];}}});}
for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}
if(!elem){if(this.global[type])
jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)
return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}
data[0].type=type;if(exclusive)
data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)
val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)
val=false;if(event)
data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)
val=ret;}
if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}
this.triggered=false;}
return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)
val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}
return val;},fix:function(event){if(event[expando]==true)
return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)
event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)
originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)
originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)
event.target=event.srcElement||document;if(event.target.nodeType==3)
event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)
event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}
if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))
event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)
event.metaKey=event.ctrlKey;if(!event.which&&event.button)
event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)
jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)
fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}
jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();if(jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)
if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}
jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}
if(numStyles===undefined)
numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();}
jQuery.event.add(window,"load",jQuery.ready);}
jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}
return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')
return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
callback=callback||function(){};var type="GET";if(params)
if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}
var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")
self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}
return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")
s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))
s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))
s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}
if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)
s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}
if(head)
head.removeChild(script);};}
if(s.dataType=="script"&&s.cache==null)
s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}
if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}
if(s.global&&!jQuery.active++)
jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)
script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}
head.appendChild(script);return undefined;}
var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)
xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)
xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)
xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}
if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}
if(s.global)
jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}
status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}
if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}
if(s.ifModified&&modRes)
jQuery.lastModified[s.url]=modRes;if(!jsonp)
success();}else
jQuery.handleError(s,xhr,status);complete();if(s.async)
xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)
setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)
onreadystatechange("timeout");}},s.timeout);}
try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}
if(!s.async)
onreadystatechange();function success(){if(s.success)
s.success(data,status);if(s.global)
jQuery.event.trigger("ajaxSuccess",[xhr,s]);}
function complete(){if(s.complete)
s.complete(xhr,status);if(s.global)
jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");}
return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)
jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}
return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}
return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")
throw"parsererror";if(filter)
data=filter(data,type);if(type=="script")
jQuery.globalEval(data);if(type=="json")
data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)
jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)
if(a[j]&&a[j].constructor==Array)
jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")
this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)
return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)
return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}
if(opt.overflow!=null)
this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))
e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}
if(parts[1])
end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}
if(!type||(typeof type=="string"&&!fn))
return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)
queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)
fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)
this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)
if(timers[i].elem==this){if(gotoEnd)
timers[i](true);timers.splice(i,1);}});if(!gotoEnd)
this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)
q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}
return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)
q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)
jQuery(this).dequeue();if(jQuery.isFunction(opt.old))
opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)
options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)
this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")
this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)
return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)
if(!timers[i]())
timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")
this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)
if(this.options.curAnim[i]!==true)
done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")
this.elem.style.display="block";}
if(this.options.hide)
this.elem.style.display="none";if(this.options.hide||this.options.show)
for(var p in this.options.curAnim)
jQuery.attr(this.elem.style,p,this.options.orig[p]);}
if(done)
this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)
border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")
fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}
while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))
add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")
border(parent);parent=parent.parentNode;}
if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))
add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)
add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}
results={top:top,left:left};}
function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}
function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}
return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}
return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))
offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+
num(this,"padding"+tl)+
num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+
num(this,"border"+tl+"Width")+
num(this,"border"+br+"Width")+
(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();jQuery.iUtil={getPosition:function(e)
{var x=0;var y=0;var es=e.style;var restoreStyles=false;if(jQuery(e).css('display')=='none'){var oldVisibility=es.visibility;var oldPosition=es.position;restoreStyles=true;es.visibility='hidden';es.display='block';es.position='absolute';}
var el=e;while(el){x+=el.offsetLeft+(el.currentStyle&&!jQuery.browser.opera?parseInt(el.currentStyle.borderLeftWidth)||0:0);y+=el.offsetTop+(el.currentStyle&&!jQuery.browser.opera?parseInt(el.currentStyle.borderTopWidth)||0:0);el=el.offsetParent;}
el=e;while(el&&el.tagName&&el.tagName.toLowerCase()!='body')
{x-=el.scrollLeft||0;y-=el.scrollTop||0;el=el.parentNode;}
if(restoreStyles==true){es.display='none';es.position=oldPosition;es.visibility=oldVisibility;}
return{x:x,y:y};},getPositionLite:function(el)
{var x=0,y=0;while(el){x+=el.offsetLeft||0;y+=el.offsetTop||0;el=el.offsetParent;}
return{x:x,y:y};},getSize:function(e)
{var w=jQuery.css(e,'width');var h=jQuery.css(e,'height');var wb=0;var hb=0;var es=e.style;if(jQuery(e).css('display')!='none'){wb=e.offsetWidth;hb=e.offsetHeight;}else{var oldVisibility=es.visibility;var oldPosition=es.position;es.visibility='hidden';es.display='block';es.position='absolute';wb=e.offsetWidth;hb=e.offsetHeight;es.display='none';es.position=oldPosition;es.visibility=oldVisibility;}
return{w:w,h:h,wb:wb,hb:hb};},getSizeLite:function(el)
{return{wb:el.offsetWidth||0,hb:el.offsetHeight||0};},getClient:function(e)
{var h,w,de;if(e){w=e.clientWidth;h=e.clientHeight;}else{de=document.documentElement;w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;}
return{w:w,h:h};},getScroll:function(e)
{var t=0,l=0,w=0,h=0,iw=0,ih=0;if(e&&e.nodeName.toLowerCase()!='body'){t=e.scrollTop;l=e.scrollLeft;w=e.scrollWidth;h=e.scrollHeight;iw=0;ih=0;}else{if(document.documentElement){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight;}else if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight;}
iw=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;ih=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;}
return{t:t,l:l,w:w,h:h,iw:iw,ih:ih};},getMargins:function(e,toInteger)
{var el=jQuery(e);var t=el.css('marginTop')||'';var r=el.css('marginRight')||'';var b=el.css('marginBottom')||'';var l=el.css('marginLeft')||'';if(toInteger)
return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else
return{t:t,r:r,b:b,l:l};},getPadding:function(e,toInteger)
{var el=jQuery(e);var t=el.css('paddingTop')||'';var r=el.css('paddingRight')||'';var b=el.css('paddingBottom')||'';var l=el.css('paddingLeft')||'';if(toInteger)
return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else
return{t:t,r:r,b:b,l:l};},getBorder:function(e,toInteger)
{var el=jQuery(e);var t=el.css('borderTopWidth')||'';var r=el.css('borderRightWidth')||'';var b=el.css('borderBottomWidth')||'';var l=el.css('borderLeftWidth')||'';if(toInteger)
return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)||0};else
return{t:t,r:r,b:b,l:l};},getPointer:function(event)
{var x=event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))||0;var y=event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop))||0;return{x:x,y:y};},traverseDOM:function(nodeEl,func)
{func(nodeEl);nodeEl=nodeEl.firstChild;while(nodeEl){jQuery.iUtil.traverseDOM(nodeEl,func);nodeEl=nodeEl.nextSibling;}},purgeEvents:function(nodeEl)
{jQuery.iUtil.traverseDOM(nodeEl,function(el)
{for(var attr in el){if(typeof el[attr]==='function'){el[attr]=null;}}});},centerEl:function(el,axis)
{var clientScroll=jQuery.iUtil.getScroll();var windowSize=jQuery.iUtil.getSize(el);if(!axis||axis=='vertically')
jQuery(el).css({top:clientScroll.t+((Math.max(clientScroll.h,clientScroll.ih)-clientScroll.t-windowSize.hb)/2)+'px'});if(!axis||axis=='horizontally')
jQuery(el).css({left:clientScroll.l+((Math.max(clientScroll.w,clientScroll.iw)-clientScroll.l-windowSize.wb)/2)+'px'});},fixPNG:function(el,emptyGIF){var images=jQuery('img[@src*="png"]',el||document),png;images.each(function(){png=this.src;this.src=emptyGIF;this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+png+"')";});}};[].indexOf||(Array.prototype.indexOf=function(v,n){n=(n==null)?0:n;var m=this.length;for(var i=n;i<m;i++)
if(this[i]==v)
return i;return-1;});jQuery.iAuto={helper:null,content:null,iframe:null,timer:null,lastValue:null,currentValue:null,subject:null,selectedItem:null,items:null,empty:function()
{jQuery.iAuto.content.empty();if(jQuery.iAuto.iframe){jQuery.iAuto.iframe.hide();}},clear:function()
{jQuery.iAuto.items=null;jQuery.iAuto.selectedItem=null;jQuery.iAuto.lastValue=jQuery.iAuto.subject.value;if(jQuery.iAuto.helper.css('display')=='block'){if(jQuery.iAuto.subject.autoCFG.fx){switch(jQuery.iAuto.subject.autoCFG.fx.type){case'fade':jQuery.iAuto.helper.fadeOut(jQuery.iAuto.subject.autoCFG.fx.duration,jQuery.iAuto.empty);break;case'slide':jQuery.iAuto.helper.SlideOutUp(jQuery.iAuto.subject.autoCFG.fx.duration,jQuery.iAuto.empty);break;case'blind':jQuery.iAuto.helper.BlindUp(jQuery.iAuto.subject.autoCFG.fx.duration,jQuery.iAuto.empty);break;}}else{jQuery.iAuto.helper.hide();if(jQuery.iAuto.iframe)
jQuery.iAuto.iframe.hide();}
if(jQuery.iAuto.subject.autoCFG.onHide)
jQuery.iAuto.subject.autoCFG.onHide.apply(jQuery.iAuto.subject,[jQuery.iAuto.helper,jQuery.iAuto.iframe]);}else{jQuery.iAuto.empty();}
window.clearTimeout(jQuery.iAuto.timer);},update:function()
{var subject=jQuery.iAuto.subject;var subjectValue=jQuery.iAuto.getFieldValues(subject);if(subject&&subjectValue.item!=jQuery.iAuto.lastValue&&subjectValue.item.length>=subject.autoCFG.minchars){jQuery.iAuto.lastValue=subjectValue.item;jQuery.iAuto.currentValue=subjectValue.item;data={field:jQuery(subject).attr('name')||'field',value:subjectValue.item};jQuery.ajax({type:'POST',data:jQuery.param(data),success:function(xml)
{subject.autoCFG.lastSuggestion=jQuery('item',xml);size=subject.autoCFG.lastSuggestion.size();if(size>0){var toWrite='';subject.autoCFG.lastSuggestion.each(function(nr)
{toWrite+='<li rel="'+jQuery('value',this).text()+'" dir="'+nr+'" style="cursor: default;">'+jQuery('text',this).text()+'</li>';});if(subject.autoCFG.autofill){var valueToAdd=jQuery('value',subject.autoCFG.lastSuggestion.get(0)).text();subject.value=subjectValue.pre+valueToAdd+subject.autoCFG.multipleSeparator+subjectValue.post;jQuery.iAuto.selection(subject,subjectValue.item.length!=valueToAdd.length?(subjectValue.pre.length+subjectValue.item.length):valueToAdd.length,subjectValue.item.length!=valueToAdd.length?(subjectValue.pre.length+valueToAdd.length):valueToAdd.length);}
if(size>0){jQuery.iAuto.writeItems(subject,toWrite);}else{jQuery.iAuto.clear();}}else{jQuery.iAuto.clear();}},url:subject.autoCFG.source});}},writeItems:function(subject,toWrite)
{jQuery.iAuto.content.html(toWrite);jQuery.iAuto.items=jQuery('li',jQuery.iAuto.content.get(0));jQuery.iAuto.items.mouseover(jQuery.iAuto.hoverItem).bind('mousedown',jQuery.iAuto.clickItem);var position=jQuery(subject).position();var size=jQuery.iUtil.getSize(subject);jQuery.iAuto.helper.css('top',position.top+size.hb+'px').css('left',position.left+'px').addClass(subject.autoCFG.helperClass);if(jQuery.iAuto.iframe){jQuery.iAuto.iframe.css('display','block').css('top',position.top+size.hb+'px').css('left',position.left+'px').css('width',jQuery.iAuto.helper.width()).css('height',jQuery.iAuto.helper.height());}
jQuery.iAuto.selectedItem=0;jQuery.iAuto.items.get(0).className=subject.autoCFG.selectClass;jQuery.iAuto.applyOn(subject,subject.autoCFG.lastSuggestion.get(0),'onHighlight');if(jQuery.iAuto.helper.css('display')=='none'){if(subject.autoCFG.inputWidth){var borders=jQuery.iUtil.getPadding(subject,true);var paddings=jQuery.iUtil.getBorder(subject,true);jQuery.iAuto.helper.css('width',subject.offsetWidth-(jQuery.boxModel?(borders.l+borders.r+paddings.l+paddings.r):0)+'px');}
if(subject.autoCFG.fx){switch(subject.autoCFG.fx.type){case'fade':jQuery.iAuto.helper.fadeIn(subject.autoCFG.fx.duration);break;case'slide':jQuery.iAuto.helper.SlideInUp(subject.autoCFG.fx.duration);break;case'blind':jQuery.iAuto.helper.BlindDown(subject.autoCFG.fx.duration);break;}}else{jQuery.iAuto.helper.show();}
if(jQuery.iAuto.subject.autoCFG.onShow)
jQuery.iAuto.subject.autoCFG.onShow.apply(jQuery.iAuto.subject,[jQuery.iAuto.helper,jQuery.iAuto.iframe]);}},checkCache:function()
{var subject=this;if(subject.autoCFG.lastSuggestion){jQuery.iAuto.lastValue=subject.value;jQuery.iAuto.currentValue=subject.value;var toWrite='';subject.autoCFG.lastSuggestion.each(function(nr)
{value=jQuery('value',this).text().toLowerCase();inputValue=subject.value.toLowerCase();if(value.indexOf(inputValue)==0){toWrite+='<li rel="'+jQuery('value',this).text()+'" dir="'+nr+'" style="cursor: default;">'+jQuery('text',this).text()+'</li>';}});if(toWrite!=''){jQuery.iAuto.writeItems(subject,toWrite);this.autoCFG.inCache=true;return;}}
subject.autoCFG.lastSuggestion=null;this.autoCFG.inCache=false;},selection:function(field,start,end)
{if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",-end+start);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
field.focus();},getSelectionStart:function(field)
{if(field.selectionStart)
return field.selectionStart;else if(field.createTextRange){var selRange=document.selection.createRange();var selRange2=selRange.duplicate();return 0-selRange2.moveStart('character',-100000);}},getFieldValues:function(field)
{var fieldData={value:field.value,pre:'',post:'',item:''};if(field.autoCFG.multiple){var finishedPre=false;var selectionStart=jQuery.iAuto.getSelectionStart(field)||0;var chunks=fieldData.value.split(field.autoCFG.multipleSeparator);for(var i=0;i<chunks.length;i++){if((fieldData.pre.length+chunks[i].length>=selectionStart||selectionStart==0)&&!finishedPre){if(fieldData.pre.length<=selectionStart)
fieldData.item=chunks[i];else
fieldData.post+=chunks[i]+(chunks[i]!=''?field.autoCFG.multipleSeparator:'');finishedPre=true;}else if(finishedPre){fieldData.post+=chunks[i]+(chunks[i]!=''?field.autoCFG.multipleSeparator:'');}
if(!finishedPre){fieldData.pre+=chunks[i]+(chunks.length>1?field.autoCFG.multipleSeparator:'');}}}else{fieldData.item=fieldData.value;}
return fieldData;},autocomplete:function(e)
{window.clearTimeout(jQuery.iAuto.timer);var subject=jQuery.iAuto.getFieldValues(this);var pressedKey=e.charCode||e.keyCode||-1;if(/13|27|35|36|38|40|9/.test(pressedKey)&&jQuery.iAuto.items){if(window.event){window.event.cancelBubble=true;window.event.returnValue=false;}else{e.preventDefault();e.stopPropagation();}
if(jQuery.iAuto.selectedItem!=null)
jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className='';else
jQuery.iAuto.selectedItem=-1;switch(pressedKey){case 9:case 13:if(jQuery.iAuto.selectedItem==-1)
jQuery.iAuto.selectedItem=0;var selectedItem=jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0);var valueToAdd=selectedItem.getAttribute('rel');this.value=subject.pre+valueToAdd+this.autoCFG.multipleSeparator+subject.post;jQuery.iAuto.lastValue=subject.item;jQuery.iAuto.selection(this,subject.pre.length+valueToAdd.length+this.autoCFG.multipleSeparator.length,subject.pre.length+valueToAdd.length+this.autoCFG.multipleSeparator.length);jQuery.iAuto.clear();if(this.autoCFG.onSelect){iteration=parseInt(selectedItem.getAttribute('dir'))||0;jQuery.iAuto.applyOn(this,this.autoCFG.lastSuggestion.get(iteration),'onSelect');}
if(this.scrollIntoView)
this.scrollIntoView(false);return pressedKey!=13;break;case 27:this.value=subject.pre+jQuery.iAuto.lastValue+this.autoCFG.multipleSeparator+subject.post;this.autoCFG.lastSuggestion=null;jQuery.iAuto.clear();if(this.scrollIntoView)
this.scrollIntoView(false);return false;break;case 35:jQuery.iAuto.selectedItem=jQuery.iAuto.items.size()-1;break;case 36:jQuery.iAuto.selectedItem=0;break;case 38:jQuery.iAuto.selectedItem--;if(jQuery.iAuto.selectedItem<0)
jQuery.iAuto.selectedItem=jQuery.iAuto.items.size()-1;break;case 40:jQuery.iAuto.selectedItem++;if(jQuery.iAuto.selectedItem==jQuery.iAuto.items.size())
jQuery.iAuto.selectedItem=0;break;}
jQuery.iAuto.applyOn(this,this.autoCFG.lastSuggestion.get(jQuery.iAuto.selectedItem||0),'onHighlight');jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className=this.autoCFG.selectClass;if(jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).scrollIntoView)
jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).scrollIntoView(false);if(this.autoCFG.autofill){var valToAdd=jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).getAttribute('rel');this.value=subject.pre+valToAdd+this.autoCFG.multipleSeparator+subject.post;if(jQuery.iAuto.lastValue.length!=valToAdd.length)
jQuery.iAuto.selection(this,subject.pre.length+jQuery.iAuto.lastValue.length,subject.pre.length+valToAdd.length);}
return false;}
jQuery.iAuto.checkCache.apply(this);if(this.autoCFG.inCache==false){if(subject.item!=jQuery.iAuto.lastValue&&subject.item.length>=this.autoCFG.minchars)
jQuery.iAuto.timer=window.setTimeout(jQuery.iAuto.update,this.autoCFG.delay);if(jQuery.iAuto.items){jQuery.iAuto.clear();}}
return true;},applyOn:function(field,item,type)
{if(field.autoCFG[type]){var data={};childs=item.getElementsByTagName('*');for(i=0;i<childs.length;i++){data[childs[i].tagName]=childs[i].firstChild.nodeValue;}
field.autoCFG[type].apply(field,[data]);}},hoverItem:function(e)
{if(jQuery.iAuto.items){if(jQuery.iAuto.selectedItem!=null)
jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className='';jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className='';jQuery.iAuto.selectedItem=parseInt(this.getAttribute('dir'))||0;jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className=jQuery.iAuto.subject.autoCFG.selectClass;}},clickItem:function(event)
{window.clearTimeout(jQuery.iAuto.timer);event=event||jQuery.event.fix(window.event);event.preventDefault();event.stopPropagation();var subject=jQuery.iAuto.getFieldValues(jQuery.iAuto.subject);var valueToAdd=this.getAttribute('rel');jQuery.iAuto.subject.value=subject.pre+valueToAdd+jQuery.iAuto.subject.autoCFG.multipleSeparator+subject.post;jQuery.iAuto.lastValue=this.getAttribute('rel');jQuery.iAuto.selection(jQuery.iAuto.subject,subject.pre.length+valueToAdd.length+jQuery.iAuto.subject.autoCFG.multipleSeparator.length,subject.pre.length+valueToAdd.length+jQuery.iAuto.subject.autoCFG.multipleSeparator.length);jQuery.iAuto.clear();if(jQuery.iAuto.subject.autoCFG.onSelect){iteration=parseInt(this.getAttribute('dir'))||0;jQuery.iAuto.applyOn(jQuery.iAuto.subject,jQuery.iAuto.subject.autoCFG.lastSuggestion.get(iteration),'onSelect');}
return false;},protect:function(e)
{pressedKey=e.charCode||e.keyCode||-1;if(/13|27|35|36|38|40/.test(pressedKey)&&jQuery.iAuto.items){if(window.event){window.event.cancelBubble=true;window.event.returnValue=false;}else{e.preventDefault();e.stopPropagation();}
return false;}},build:function(options)
{if(!options.source||!jQuery.iUtil){return;}
if(!jQuery.iAuto.helper){if(jQuery.browser.msie){jQuery('body',document).append('<iframe style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" id="autocompleteIframe" src="about:blank" frameborder="0" scrolling="no"></iframe>');jQuery.iAuto.iframe=jQuery('#autocompleteIframe');}
jQuery('body',document).append('<div id="autocompleteHelper" style="position: absolute; top: 0; left: 0; z-index: 30001; display: none;"><ul style="margin: 0;padding: 0; list-style: none; z-index: 30002;">&nbsp;</ul></div>');jQuery.iAuto.helper=jQuery('#autocompleteHelper');jQuery.iAuto.content=jQuery('ul',jQuery.iAuto.helper);}
return this.each(function()
{if(this.tagName!='INPUT'&&this.getAttribute('type')!='text')
return;this.autoCFG={};this.autoCFG.source=options.source;this.autoCFG.minchars=parseInt(options.minchars)||1;this.autoCFG.helperClass=options.helperClass?options.helperClass:'';this.autoCFG.selectClass=options.selectClass?options.selectClass:'';this.autoCFG.onSelect=options.onSelect&&options.onSelect.constructor==Function?options.onSelect:null;this.autoCFG.onShow=options.onShow&&options.onShow.constructor==Function?options.onShow:null;this.autoCFG.onHide=options.onHide&&options.onHide.constructor==Function?options.onHide:null;this.autoCFG.onHighlight=options.onHighlight&&options.onHighlight.constructor==Function?options.onHighlight:null;this.autoCFG.inputWidth=options.inputWidth||false;this.autoCFG.multiple=options.multiple||false;this.autoCFG.multipleSeparator=this.autoCFG.multiple?(options.multipleSeparator||', '):'';this.autoCFG.autofill=options.autofill?true:false;this.autoCFG.delay=Math.abs(parseInt(options.delay)||1000);if(options.fx&&options.fx.constructor==Object){if(!options.fx.type||!/fade|slide|blind/.test(options.fx.type)){options.fx.type='slide';}
if(options.fx.type=='slide'&&!jQuery.fx.slide)
return;if(options.fx.type=='blind'&&!jQuery.fx.BlindDirection)
return;options.fx.duration=Math.abs(parseInt(options.fx.duration)||400);if(options.fx.duration>this.autoCFG.delay){options.fx.duration=this.autoCFG.delay-100;}
this.autoCFG.fx=options.fx;}
this.autoCFG.lastSuggestion=null;this.autoCFG.inCache=false;jQuery(this).attr('autocomplete','off').focus(function()
{jQuery.iAuto.subject=this;jQuery.iAuto.lastValue=this.value;}).keypress(jQuery.iAuto.protect).keyup(jQuery.iAuto.autocomplete).blur(function()
{jQuery.iAuto.timer=window.setTimeout(jQuery.iAuto.clear,200);});});}};jQuery.fn.Autocomplete=jQuery.iAuto.build;jQuery.iAuto.update=function(){var subject=jQuery.iAuto.subject;var subjectValue=jQuery.iAuto.getFieldValues(subject);if(subject&&subjectValue.item!=jQuery.iAuto.lastValue&&subjectValue.item.length>=subject.autoCFG.minchars){jQuery.iAuto.lastValue=subjectValue.item;jQuery.iAuto.currentValue=subjectValue.item;var request=Jifty.current_autocompleter_object.buildRequest();jQuery.ajax({'type':'post','url':subject.autoCFG.source,'contentType':'text/x-json','data':JSON.stringify(request),'dataType':'xml','success':function(xml,textStatus){subject.autoCFG.lastSuggestion=jQuery('li',xml);size=subject.autoCFG.lastSuggestion.size();if(size>0){var toWrite='';subject.autoCFG.lastSuggestion.each(function(nr){var v=jQuery(this).text();var value=v;if(jQuery('span:last',this).size()){value=jQuery('span:last',this).text();v='<span class="informal">'+jQuery('span:first',this).text()+'</span>'+'<span class="hidden_value">'+jQuery('span:last',this).text()+'</span>';}
toWrite+='<li rel="'+value+'" dir="'+nr+'" style="cursor: default;">'+v+'</li>';});if(subject.autoCFG.autofill){var valueToAdd=jQuery('value',subject.autoCFG.lastSuggestion.get(0)).text();subject.value=subjectValue.pre+valueToAdd+subject.autoCFG.multipleSeparator+subjectValue.post;jQuery.iAuto.selection(subject,subjectValue.item.length!=valueToAdd.length?(subjectValue.pre.length+subjectValue.item.length):valueToAdd.length,subjectValue.item.length!=valueToAdd.length?(subjectValue.pre.length+valueToAdd.length):valueToAdd.length);}
if(size>0){jQuery.iAuto.writeItems(subject,toWrite);}else{jQuery.iAuto.clear();}}else{jQuery.iAuto.clear();}}});}};jQuery.fn.shake=function(){this.each(function(init){var e=jQuery(this);e.css('position','relative');for(var i=1;i<5;i++){e.animate({left:-20/i},50).animate({left:0},50).animate({left:20/i},50).animate({left:0},50);}});return this;};jQuery.noConflict();(function($){$.jGrowl=function(m,o){if($('#jGrowl').size()==0)$('<div id="jGrowl"></div>').addClass($.jGrowl.defaults.position).appendTo('body');$('#jGrowl').jGrowl(m,o);};$.fn.jGrowl=function(m,o){if($.isFunction(this.each)){var args=arguments;return this.each(function(){var self=this;if($(this).data('jGrowl.instance')==undefined){$(this).data('jGrowl.instance',new $.fn.jGrowl());$(this).data('jGrowl.instance').startup(this);}
if($.isFunction($(this).data('jGrowl.instance')[m])){$(this).data('jGrowl.instance')[m].apply($(this).data('jGrowl.instance'),$.makeArray(args).slice(1));}else{$(this).data('jGrowl.instance').notification(m,o);}});};};$.extend($.fn.jGrowl.prototype,{defaults:{header:'',sticky:false,position:'top-right',glue:'after',theme:'default',corners:'10px',check:500,life:3000,speed:'normal',easing:'swing',closer:true,closeTemplate:'&times;',closerTemplate:'<div>[ close all ]</div>',log:function(e,m,o){},beforeOpen:function(e,m,o){},open:function(e,m,o){},beforeClose:function(e,m,o){},close:function(e,m,o){},animateOpen:{opacity:'show'},animateClose:{opacity:'hide'}},element:null,interval:null,notification:function(message,o){var self=this;var o=$.extend({},this.defaults,o);o.log.apply(this.element,[this.element,message,o]);var notification=$('<div class="jGrowl-notification"><div class="close">'+o.closeTemplate+'</div><div class="header">'+o.header+'</div><div class="message">'+message+'</div></div>').data("jGrowl",o).addClass(o.theme).children('div.close').bind("click.jGrowl",function(){$(this).unbind('click.jGrowl').parent().trigger('jGrowl.beforeClose').animate(o.animateClose,o.speed,o.easing,function(){$(this).trigger('jGrowl.close').remove();});}).parent();(o.glue=='after')?$('div.jGrowl-notification:last',this.element).after(notification):$('div.jGrowl-notification:first',this.element).before(notification);$(notification).bind("mouseover.jGrowl",function(){$(this).data("jGrowl").pause=true;}).bind("mouseout.jGrowl",function(){$(this).data("jGrowl").pause=false;}).bind('jGrowl.beforeOpen',function(){o.beforeOpen.apply(self.element,[self.element,message,o]);}).bind('jGrowl.open',function(){o.open.apply(self.element,[self.element,message,o]);}).bind('jGrowl.beforeClose',function(){o.beforeClose.apply(self.element,[self.element,message,o]);}).bind('jGrowl.close',function(){o.close.apply(self.element,[self.element,message,o]);}).trigger('jGrowl.beforeOpen').animate(o.animateOpen,o.speed,o.easing,function(){$(this).data("jGrowl").created=new Date();}).trigger('jGrowl.open');if($.fn.corner!=undefined)$(notification).corner(o.corners);if($('div.jGrowl-notification:parent',this.element).size()>1&&$('div.jGrowl-closer',this.element).size()==0&&this.defaults.closer!=false){$(this.defaults.closerTemplate).addClass('jGrowl-closer').addClass(this.defaults.theme).appendTo(this.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){$(this).siblings().children('div.close').trigger("click.jGrowl");if($.isFunction(self.defaults.closer))self.defaults.closer.apply($(this).parent()[0],[$(this).parent()[0]]);});};},update:function(){$(this.element).find('div.jGrowl-notification:parent').each(function(){if($(this).data("jGrowl")!=undefined&&$(this).data("jGrowl").created!=undefined&&($(this).data("jGrowl").created.getTime()+$(this).data("jGrowl").life)<(new Date()).getTime()&&$(this).data("jGrowl").sticky!=true&&($(this).data("jGrowl").pause==undefined||$(this).data("jGrowl").pause!=true)){$(this).children('div.close').trigger('click.jGrowl');}});if($(this.element).find('div.jGrowl-notification:parent').size()<2){$(this.element).find('div.jGrowl-closer').animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){$(this).remove();});};},startup:function(e){this.element=$(e).addClass('jGrowl').append('<div class="jGrowl-notification"></div>');this.interval=setInterval(function(){jQuery(e).data('jGrowl.instance').update();},this.defaults.check);if($.browser.msie&&parseInt($.browser.version)<7&&!window["XMLHttpRequest"])$(this.element).addClass('ie6');},shutdown:function(){$(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove();clearInterval(this.interval);}});$.jGrowl.defaults=$.fn.jGrowl.prototype.defaults;})(jQuery);(function($){$.facebox=function(data,klass){$.facebox.loading()
if(data.ajax)fillFaceboxFromAjax(data.ajax)
else if(data.image)fillFaceboxFromImage(data.image)
else if(data.div)fillFaceboxFromHref(data.div)
else if($.isFunction(data))data.call($)
else $.facebox.reveal(data,klass)}
$.extend($.facebox,{settings:{opacity:0,overlay:true,loadingImage:'/images/facebox/loading.gif',closeImage:'/images/facebox/closelabel.gif',imageTypes:['png','jpg','jpeg','gif'],faceboxHtml:'\
    <div id="facebox" style="display:none;"> \
      <div class="popup"> \
        <table> \
          <tbody> \
            <tr> \
              <td class="tl"/><td class="b"/><td class="tr"/> \
            </tr> \
            <tr> \
              <td class="b"/> \
              <td class="body"> \
                <div class="content"> \
                </div> \
                <div class="footer"> \
                  <a href="#" class="close"> \
                    <img src="/images/facebox/closelabel.gif" title="close" class="close_image" /> \
                  </a> \
                </div> \
              </td> \
              <td class="b"/> \
            </tr> \
            <tr> \
              <td class="bl"/><td class="b"/><td class="br"/> \
            </tr> \
          </tbody> \
        </table> \
      </div> \
    </div>'},loading:function(){init()
if($('#facebox .loading').length==1)return true
showOverlay()
$('#facebox .content').empty()
$('#facebox .body').children().hide().end().append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>')
$('#facebox').css({top:getPageScroll()[1]+(getPageHeight()/10),left:385.5}).show()
$(document).bind('keydown.facebox',function(e){if(e.keyCode==27)$.facebox.close()
return true})
$(document).trigger('loading.facebox')},reveal:function(data,klass){$(document).trigger('beforeReveal.facebox')
if(klass)$('#facebox .content').addClass(klass)
$('#facebox .content').append(data)
$('#facebox .loading').remove()
$('#facebox .body').children().fadeIn('normal')
$('#facebox').css('left',$(window).width()/2-($('#facebox table').width()/2))
$(document).trigger('reveal.facebox').trigger('afterReveal.facebox')},close:function(){$(document).trigger('close.facebox')
return false}})
$.fn.facebox=function(settings){init(settings)
function clickHandler(){$.facebox.loading(true)
var klass=this.rel.match(/facebox\[?\.(\w+)\]?/)
if(klass)klass=klass[1]
fillFaceboxFromHref(this.href,klass)
return false}
return this.click(clickHandler)}
function init(settings){if($.facebox.settings.inited)return true
else $.facebox.settings.inited=true
$(document).trigger('init.facebox')
makeCompatible()
var imageTypes=$.facebox.settings.imageTypes.join('|')
$.facebox.settings.imageTypesRegexp=new RegExp('\.'+imageTypes+'$','i')
if(settings)$.extend($.facebox.settings,settings)
$('body').append($.facebox.settings.faceboxHtml)
var preload=[new Image(),new Image()]
preload[0].src=$.facebox.settings.closeImage
preload[1].src=$.facebox.settings.loadingImage
$('#facebox').find('.b:first, .bl, .br, .tl, .tr').each(function(){preload.push(new Image())
preload.slice(-1).src=$(this).css('background-image').replace(/url\((.+)\)/,'$1')})
$('#facebox .close').click($.facebox.close)
$('#facebox .close_image').attr('src',$.facebox.settings.closeImage)}
function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
return new Array(xScroll,yScroll)}
function getPageHeight(){var windowHeight
if(self.innerHeight){windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}else if(document.body){windowHeight=document.body.clientHeight;}
return windowHeight}
function makeCompatible(){var $s=$.facebox.settings
$s.loadingImage=$s.loading_image||$s.loadingImage
$s.closeImage=$s.close_image||$s.closeImage
$s.imageTypes=$s.image_types||$s.imageTypes
$s.faceboxHtml=$s.facebox_html||$s.faceboxHtml}
function fillFaceboxFromHref(href,klass){if(href.match(/#/)){var url=window.location.href.split('#')[0]
var target=href.replace(url,'')
$.facebox.reveal($(target).clone().show(),klass)}else if(href.match($.facebox.settings.imageTypesRegexp)){fillFaceboxFromImage(href,klass)}else{fillFaceboxFromAjax(href,klass)}}
function fillFaceboxFromImage(href,klass){var image=new Image()
image.onload=function(){$.facebox.reveal('<div class="image"><img src="'+image.src+'" /></div>',klass)}
image.src=href}
function fillFaceboxFromAjax(href,klass){$.get(href,function(data){$.facebox.reveal(data,klass)})}
function skipOverlay(){return $.facebox.settings.overlay==false||$.facebox.settings.opacity===null}
function showOverlay(){if(skipOverlay())return
if($('facebox_overlay').length==0)
$("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')
$('#facebox_overlay').hide().addClass("facebox_overlayBG").css('opacity',$.facebox.settings.opacity).click(function(){$(document).trigger('close.facebox')}).fadeIn(200)
return false}
function hideOverlay(){if(skipOverlay())return
$('#facebox_overlay').fadeOut(200,function(){$("#facebox_overlay").removeClass("facebox_overlayBG")
$("#facebox_overlay").addClass("facebox_hide")
$("#facebox_overlay").remove()})
return false}
$(document).bind('close.facebox',function(){$(document).unbind('keydown.facebox')
$('#facebox').fadeOut(function(){$('#facebox .content').removeClass().addClass('content')
hideOverlay()
$('#facebox .loading').remove()})})})(jQuery);var Behaviour={list:[],register:function(sheet){Behaviour.list.push(sheet);},apply:function(){var root=arguments[0];for(var h=0;sheet=Behaviour.list[h];h++){for(var selector in sheet){jQuery(selector,root).each(function(){sheet[selector](this);});}}}};(function($){$(document).ready(function(){Behaviour.apply();});})(jQuery);Date.prototype.formatDate=function(input,time){var daysLong=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var daysShort=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"];var switches={a:function(){return date.getHours()>11?"pm":"am";},A:function(){return(this.a().toUpperCase());},B:function(){var off=(date.getTimezoneOffset()+60)*60;var theSeconds=(date.getHours()*3600)+
(date.getMinutes()*60)+
date.getSeconds()+off;var beat=Math.floor(theSeconds/86.4);if(beat>1000)beat-=1000;if(beat<0)beat+=1000;if((String(beat)).length==1)beat="00"+beat;if((String(beat)).length==2)beat="0"+beat;return beat;},c:function(){return(this.Y()+"-"+this.m()+"-"+this.d()+"T"+
this.h()+":"+this.i()+":"+this.s()+this.P());},d:function(){var j=String(this.j());return(j.length==1?"0"+j:j);},D:function(){return daysShort[date.getDay()];},F:function(){return monthsLong[date.getMonth()];},g:function(){return date.getHours()>12?date.getHours()-12:date.getHours();},G:function(){return date.getHours();},h:function(){var g=String(this.g());return(g.length==1?"0"+g:g);},H:function(){var G=String(this.G());return(G.length==1?"0"+G:G);},i:function(){var min=String(date.getMinutes());return(min.length==1?"0"+min:min);},I:function(){var noDST=new Date("January 1 "+this.Y()+" 00:00:00");return(noDST.getTimezoneOffset()==date.getTimezoneOffset()?0:1);},j:function(){return date.getDate();},l:function(){return daysLong[date.getDay()];},L:function(){var Y=this.Y();if((Y%4==0&&Y%100!=0)||(Y%4==0&&Y%100==0&&Y%400==0)){return 1;}else{return 0;}},m:function(){var n=String(this.n());return(n.length==1?"0"+n:n);},M:function(){return monthsShort[date.getMonth()];},n:function(){return date.getMonth()+1;},N:function(){var w=this.w();return(w==0?7:w);},O:function(){var os=Math.abs(date.getTimezoneOffset());var h=String(Math.floor(os/60));var m=String(os%60);h.length==1?h="0"+h:1;m.length==1?m="0"+m:1;return date.getTimezoneOffset()<0?"+"+h+m:"-"+h+m;},P:function(){var O=this.O();return(O.substr(0,3)+":"+O.substr(3,2));},r:function(){var r;r=this.D()+", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+this.s()+" "+this.O();return r;},s:function(){var sec=String(date.getSeconds());return(sec.length==1?"0"+sec:sec);},S:function(){switch(date.getDate()){case 1:return("st");case 2:return("nd");case 3:return("rd");case 21:return("st");case 22:return("nd");case 23:return("rd");case 31:return("st");default:return("th");}},t:function(){var daysinmonths=[null,31,28,31,30,31,30,31,31,30,31,30,31];if(this.L()==1&&this.n()==2)return 29;return daysinmonths[this.n()];},U:function(){return Math.round(date.getTime()/1000);},w:function(){return date.getDay();},W:function(){var DoW=this.N();var DoY=this.z();var daysToNY=364+this.L()-DoY;if(daysToNY<=2&&DoW<=(3-daysToNY)){return 1;}
if(DoY<=2&&DoW>=5){return new Date(this.Y()-1,11,31).formatDate("W");}
var nyDoW=new Date(this.Y(),0,1).getDay();nyDoW=nyDoW!=0?nyDoW-1:6;if(nyDoW<=3){return(1+Math.floor((DoY+nyDoW)/7));}else{return(1+Math.floor((DoY-(7-nyDoW))/7));}},y:function(){var y=String(this.Y());return y.substring(y.length-2,y.length);},Y:function(){if(date.getFullYear){var newDate=new Date("January 1 2001 00:00:00 +0000");var x=newDate.getFullYear();if(x==2001){return date.getFullYear();}}
var x=date.getYear();var y=x%100;y+=(y<38)?2000:1900;return y;},z:function(){var t=new Date("January 1 "+this.Y()+" 00:00:00");var diff=date.getTime()-t.getTime();return Math.floor(diff/1000/60/60/24);},Z:function(){return(date.getTimezoneOffset()*-60);}}
function getSwitch(str){if(switches[str]!=undefined){return switches[str]();}else{return str;}}
var date;if(time){var date=new Date(time);}else{var date=this;}
var formatString=input.split("");var i=0;while(i<formatString.length){if(formatString[i]=="\\"){formatString.splice(i,1);}else{formatString[i]=getSwitch(formatString[i]);}
i++;}
return formatString.join("");}
Date.DATE_ATOM="Y-m-d\\TH:i:sP";Date.DATE_ISO8601="Y-m-d\\TH:i:sO";Date.DATE_RFC2822="D, d M Y H:i:s O";Date.DATE_W3C="Y-m-d\\TH:i:sP";var Jifty={};Jifty.Update={response_hooks:[],handler_hooks:[],addHook:function(f){this.response_hooks.push(f);}};Jifty.$=function(id){if(typeof id=='string')
return document.getElementById(id)
return id;}
Jifty.hasAjaxTransport=function(){var r=false;jQuery.each([function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')}],function(i,v){try{r=v();if(r)return false;}catch(e){}})
return r?true:false;}();Jifty.stopEvent=function(ev){jQuery.event.fix(ev);ev.preventDefault();ev.stopPropagation();};Jifty.Web={};Jifty.Web.current_actions=[];function register_action(a){outs(div(function(){attr(function(){return['class','hidden']});return input(function(){attr(function(){return['type','hidden','name',a.register_name(),'id',a.register_name(),'value',a.actionClass]})})}));}
var Action=function(){this.initialize.apply(this,arguments);return this;};Action.prototype={initialize:function(moniker){this.moniker=moniker;this.extras=[];if(arguments.length>1){this.extras=arguments[1];}
this.register=Jifty.$('J:A-'+this.moniker);if(!this.register){var elements=[];var add_to_elements=function(){elements.push(this)};jQuery('input').each(add_to_elements);jQuery.each(this.extras,add_to_elements);for(var i=0,l=elements.length;i<l;i++){if((Jifty.Form.Element.getMoniker(elements[i])==this.moniker)&&(Jifty.Form.Element.getType(elements[i])=="registration")){this.register=elements[i];break;}}}
if(this.register){this.form=Jifty.Form.Element.getForm(this.register);this.actionClass=this.register.value;}},fields:function(){if(!this.cached_fields){var elements=[];var possible=Jifty.Form.getElements(this.form);for(var i=0,l=this.extras.length;i<l;i++)
possible.push(this.extras[i]);for(var i=0,l=possible.length;i<l;i++){if(Jifty.Form.Element.getMoniker(possible[i])==this.moniker)
elements.push(possible[i]);}
this.cached_fields=elements;}
return this.cached_fields;},buttons:function(){var elements=new Array();var possible=Jifty.Form.getElements(this.form);for(var i=0;i<possible.length;i++){if(possible[i].nodeName=='INPUT'&&possible[i].getAttribute("type")=='submit'){actions=Jifty.Form.Element.buttonActions(possible[i]);if(actions.length==0||actions.indexOf(this.moniker)>=0){elements.push(possible[i]);}}}
return elements;},getField:function(name){var elements=this.fields();for(var i=0;i<elements.length;i++){if(Jifty.Form.Element.getField(elements[i])==name)
return elements[i];}
return null;},serialize:function(){var fields=this.fields();var serialized=new Array;jQuery.each(fields,function(){serialized.push(jQuery(this).serialize())});return serialized.join('&');},hasUpload:function(){var fields=this.fields();for(var i=0,l=fields.length;i<l;i++){if((fields[i].getAttribute("type")=="file")&&fields[i].value)
return true;}
return false;},data_structure:function(){var a={};a['moniker']=this.moniker;a['class']=this.actionClass;if(this.register&&this.register.id){var tmp=this.register.id.match(/^J:A-(\d+)-/);if(tmp&&tmp.length==2)
a['order']=tmp[1];}
a['fields']={};var fields=this.fields();for(var i=0;i<fields.length;i++){var f=fields[i];if((Jifty.Form.Element.getType(f)!="registration")&&(Jifty.Form.Element.getValue(f)!=null)&&(!Jifty.Placeholder.hasPlaceholder(f)))
{if(!a['fields'][Jifty.Form.Element.getField(f)])
a['fields'][Jifty.Form.Element.getField(f)]={};var field=Jifty.Form.Element.getField(f);var type=Jifty.Form.Element.getType(f);if(type=='fallback'&&a['fields'][field][type])
continue
a['fields'][field][type]=this._mergeValues(a['fields'][field][type],Jifty.Form.Element.getValue(f));}}
return a;},_mergeValues:function(){var oldval=arguments[0];var newval=arguments[1];if(!oldval)return newval;if(oldval.constructor!=Array){oldval=[oldval];}
oldval.push(newval);return oldval;},validate:function(){show_wait_message();var id=this.register.id;var data=this.serialize();data+='&J:VALIDATE=1';if(this.form['J:C']){data+='&J:C='+this.form['J:C'].value;}
jQuery.ajax({url:'/__jifty/validator.xml',type:"get",data:data,complete:function(request,status){var response=request.responseXML.documentElement;for(var action=response.firstChild;action!=null;action=action.nextSibling){if((action.nodeName=='validationaction')&&(action.getAttribute("id")==id)){for(var field=action.firstChild;field!=null;field=field.nextSibling){if(field.nodeName=='error'||field.nodeName=='warning'){var err_div=document.getElementById(field.getAttribute("id"));if(err_div!=null){jQuery(err_div).show().html(field.firstChild.data);}}else if(field.nodeName=='ok'){var err_div=document.getElementById(field.getAttribute("id"));if(err_div!=null){jQuery(err_div).hide().html('');}}}}else if((action.nodeName=='canonicalizeaction')&&(action.getAttribute("id")==id)){for(var field=action.firstChild;field!=null;field=field.nextSibling){if(field.nodeName=='canonicalization_note'){var note_div=document.getElementById(field.getAttribute("id"));if(note_div!=null){jQuery(note_div).show().html(field.firstChild.data);}}
if(field.nodeName=='update'){var field_name=field.getAttribute("name");for(var form_number=0;form_number<document.forms.length;form_number++){var form_field=document.forms[form_number].elements[field_name];if(form_field==null||!jQuery(form_field).is('.ajaxcanonicalization'))
continue;form_field.value=field.firstChild.data;}}}}}
return true;}});hide_wait_message();return false;},submit:function(){show_wait_message();jQuery.ajax({url:'/empty',type:'post',data:this.serialize()});hide_wait_message();},disable_input_fields:function(disabled_elements){var disable=function(){var elt=this;if(elt.type!='hidden'){elt.blur();elt.disabled=true;disabled_elements.push(elt);}};jQuery.each(this.fields(),disable);jQuery.each(this.buttons(),disable);},enable_input_fields:function(){var enable=function(){this.disabled=false;};jQuery.each(this.fields(),disable);jQuery.each(this.buttons(),disable);},_action_spec:function(){if(!this.s_a){var Todo=new AsynapseRecord('todo');this.s_a=jQuery.extend({},Todo.eval_ajax_get('/=/action/'+this.actionClass+'.js'));}
return this.s_a},argument_names:function(){return this._action_spec().keys();},render_param:function(field){var a_s=this._action_spec();var type='text';var f=new ActionField(field,a_s[field],this);return f.render();},register_name:function(){return this.register.id}};var SERIAL_postfix=Math.ceil(10000*Math.random());var SERIAL=0;var ActionField=function(){this.initialize.apply(this,arguments);return this;};ActionField.prototype={initialize:function(name,args,action){this.name=name;this.label=args.label;this.hints=args.hints;this.mandatory=args.mandatory;this.ajax_validates=args.ajax_validates;this.current_value=action.data_structure().fields[name].value;this.error=action.result.field_error[name];this.action=action;if(!this.render_mode)this.render_mode='update';this.type='text';},render:function(){if(this.render_mode=='read')
return this.render_wrapper
(this.render_preamble,this.render_label,this.render_value);else
return this.render_wrapper
(this.render_preamble,this.render_label,this.render_widget,this.render_autocomplete_div,this.render_inline_javascript,this.render_hints,this.render_errors,this.render_warnings,this.render_canonicalization_notes);},render_wrapper:function(){var classes=['form_field'];if(this.mandatory)classes.push('mandatory');if(this.name)classes.push('argument-'+this.name);var args=arguments;var tthis=this;return div(function(){attr(function(){return['class',classes.join(' ')]});var buf=new Array;for(var i=0;i<args.length;++i){buf.push(typeof(args[i])=='function'?args[i].apply(tthis):args[i]);}
return buf.join('');});},render_preamble:function(){var tthis=this;return span(function(){attr(function(){return['class',"preamble"]});return tthis.preamble});},render_label:function(){var tthis=this;if(this.render_mode=='update')
return label(function(){attr(function(){return['class',"label",'for',tthis.element_id()]});return tthis.label});else
return span(function(){attr(function(){return['class',"label"]});return tthis.label});},input_name:function(){return['J:A:F',this.name,this.action.moniker].join('-');},render_hints:function(){var tthis=this;return span(function(){attr(function(){return['class',"hints"]});return tthis.hints});},render_errors:function(){if(!this.action)return'';var tthis=this;return span(function(){attr(function(){return['class',"error",'id','errors-'+tthis.input_name()]});return tthis.error});},render_widget:function(){var tthis=this;return input(function(){attr(function(){var fields=['type',tthis.type];if(tthis.input_name)fields.push('name',tthis.input_name());fields.push('id',tthis.element_id());if(tthis.current_value)fields.push('value',tthis.current_value);fields.push('class',tthis._widget_class().join(' '));if(tthis.display_length){fields.push('size',tthis.display_length)}
else if(tthis.max_length){fields.push('size',tthis.max_length)}
if(tthis.max_length)fields.push('maxlength',tthis.max_length);if(tthis.disable_autocomplete)fields.push('autocomplete',"off");return fields;})});},_widget_class:function(){var classes=['form_field'];if(this.mandatory)classes.push('mandatory');if(this.name)classes.push('argument-'+this.name);if(this.ajax_validates)classes.push('ajaxvalidation');return classes;},element_id:function(){if(!this._element_id)this._element_id=this.input_name()+'-S'+(++SERIAL+SERIAL_postfix);return this._element_id;},__noSuchMethod__:function(name){return'<!-- '+name+' not implemented yet -->';}};Jifty.Form={};jQuery.extend(Jifty.Form,{getElements:function(element){return jQuery(":input",element).get();},getActions:function(element){var elements=[];jQuery(":input",element).each(function(){if(Jifty.Form.Element.getType(this)=="registration")
elements.push(Jifty.Form.Element.getAction(this));});return elements;},clearPlaceholders:function(element){var elements=Jifty.Form.getElements(element);for(var i=0;i<elements.length;i++){Jifty.Placeholder.clearPlaceholder(elements[i]);}}});var current_actions={};Jifty.Form.Element={};jQuery.extend(Jifty.Form.Element,{getMoniker:function(element){element=Jifty.$(element);if(/^J:A(:F)+-[^-]+-.+$/.test(element.name)){var bits=element.name.match(/^J:A(?::F)+-[^-]+-(.+)$/);return bits[1];}else if(/^J:A-(\d+-)?.+$/.test(element.name)){var bits=element.name.match(/^J:A-(?:\d+-)?(.+)$/);return bits[1];}else{return null;}},getAction:function(element){element=Jifty.$(element);var moniker=Jifty.Form.Element.getMoniker(element);if(!current_actions[moniker])
current_actions[moniker]=new Action(moniker);return current_actions[moniker];},getField:function(element){element=Jifty.$(element);if(/^J:A(:F)+-[^-]+-.+$/.test(element.name)){var bits=element.name.match(/^J:A(?::F)+-([^-]+)-.+$/);return bits[1];}else{return null;}},getType:function(element){element=Jifty.$(element);if(/^J:A-/.test(element.name)){return"registration";}else if(/^J:A:F-/.test(element.name)){return"value";}else if(/^J:A:F:F-/.test(element.name)){return"fallback";}else{return null;}},getValue:function(element){var $el=jQuery(Jifty.$(element));if($el.is(":checkbox, :radio")){return $el.is(":checked")?$el.val():null}
return $el.val();},validate:function(element){if(!jQuery(element).is('.validation_disabled')){Jifty.Form.Element.getAction(element).validate();}},disableValidation:function(element){jQuery(element).addClass('validation_disabled');},enableValidation:function(element){jQuery(element).removeClass('validation_disabled');},getForm:function(element){element=Jifty.$(element);if(!element)
return null;if(element.virtualform)
return element.virtualform;if(element.form)
return element.form;for(var elt=element.parentNode;elt!=null;elt=elt.parentNode){if(elt.nodeName=='FORM'){element.form=elt;return elt;}}
return null;},buttonArguments:function(element){element=Jifty.$(element);if(!element)
return{}
if(((element.nodeName!='INPUT')||(element.getAttribute("type")!="submit"))&&((element.nodeName!='A')||(!element.getAttribute("name"))))
return{}
if(element.getAttribute("name").length==0)
return{}
var extras={}
var pairs=element.getAttribute("name").split("|");for(var i=0;i<pairs.length;i++){var bits=pairs[i].split('=',2);extras[bits[0]]=bits[1];}
return extras;},buttonActions:function(element){element=Jifty.$(element);var actions=Jifty.Form.Element.buttonArguments(element)['J:ACTIONS'];if(actions){return actions.split(",");}else{return new Array();}},buttonFormElements:function(element){element=Jifty.$(element);var extras=[];if(!element)
return extras;var args=Jifty.Form.Element.buttonArguments(element);jQuery.each(args,function(k,v){var e=document.createElement("input");e.setAttribute("type","hidden");e.setAttribute("name",k);e.setAttribute("value",v);e['virtualform']=Jifty.Form.Element.getForm(element);extras.push(e);});return extras;},clickDefaultButton:function(element){var action=Jifty.Form.Element.getAction(element);if(action){var buttons=action.buttons();for(var i=0;i<buttons.length;i++){var b=buttons[i];if(Jifty.Form.Element.buttonActions(b).indexOf(action.moniker)>=0){b.click();return true;}}}
return false;},handleEnter:function(event){if(event.keyCode==13&&!event.metaKey&&!event.altKey&&!event.ctrlKey)
{if(Jifty.Form.Element.clickDefaultButton(event.target))
event.preventDefault();}}});Behaviour.register({'input.ajaxvalidation, textarea.ajaxvalidation, input.ajaxcanonicalization, textarea.ajaxcanonicalization':function(elt){jQuery(elt).bind('blur',function(){Jifty.Form.Element.validate(elt);});},'input.date':function(e){if(!jQuery(e).hasClass('has_calendar_link')){createCalendarLink(e);jQuery(e).addClass('has_calendar_link');}},'input.time':function(e){jQuery(e).timepickr({handle:jQuery(e)});},'input.datetime':function(e){if(!jQuery(e).hasClass('has_datetime_link')){createDateTimeLink(e);var button=document.createElement('input');button.setAttribute('type','button');jQuery(button).insertAfter(e);jQuery(button).timepickr({val:'Pick time'});jQuery(button).blur(function(){var old_value=jQuery(this).prev().val();if(Jifty.Calendar.dateRegex.test(old_value)){var bits=old_value.match(Jifty.Calendar.dateRegex);old_value=bits[1]+'-'+bits[2]+'-'+bits[3];}
var time=jQuery(button).val();jQuery(e).val(old_value+' '+time+':00');jQuery(e).change();jQuery(button).val('');});jQuery(e).addClass('has_datetime_link');}},'input.button_as_link':function(e){buttonToLink(e);},"input.date, input.text":function(e){if(!jQuery(e).hasClass("jifty_enter_handler_attached")&&!jQuery(e).hasClass("ajaxautocompletes")&&!jQuery(e).hasClass("disable_enter_handler"))
{jQuery(e).bind('keypress',Jifty.Form.Element.handleEnter).addClass("jifty_enter_handler_attached");}},".messages":function(e){if(!jQuery(e).hasClass('jifty_enter_handler_attached')){jQuery(e).prepend('<a  href="#" id="dismiss_'+e.id+'" title="Dismiss" onmousedown="this.onfocus=this.blur;" onmouseup="this.onfocus=window.clientInformation?null:window.undefined" onclick="Jifty.Effect(this.parentNode, \'Fade\'); return false;">Dismiss</a>').addClass("jifty_enter_handler_attached");}},'.form_field .error, .form_field .warning, .form_field .canonicalization_note':function(e){if(e.innerHTML==""){e.style.display="none";}},".focus":function(e){if(!jQuery(e).hasClass("focused")){jQuery(e).addClass("focused").focus();}},".jshide":function(e){jQuery(e).hide();},'#messages.jifty.results.messages, #errors.jifty.results.messages, .popup_message, .popup_error':function(e){jQuery(e).hide();},'#messages.jifty.results.messages .message, .popup_message':function(e){var sticky=jQuery(e).hasClass('popup_sticky');jQuery.jGrowl(e.innerHTML,{sticky:sticky,theme:'result-message'});},'#errors.jifty.results.messages .error, .popup_error':function(e){var sticky=jQuery(e).hasClass('popup_sticky');jQuery.jGrowl(e.innerHTML,{sticky:sticky,theme:'result-error'});}});Jifty.fragments={};var fragments=Jifty.fragments;var Region=function(){this.initialize.apply(this,arguments);return this;};Region.prototype={initialize:function(name,args,path,parent,in_form){this.name=name;this.args=jQuery.extend({},args);this.path=path;this.parent=parent?fragments[parent]:null;this.in_form=in_form;if(fragments[name]){jQuery.each(current_args,function(k,v){var parsed=k.match(/^(.*?)\.(.*)/);if((parsed!=null)&&(parsed.length==3)&&(parsed[1]==this.name)){current_args[k]=null;}});}
fragments[name]=this;},setPath:function(supplied){var self=this;jQuery.each(current_args,function(k,v){if(k==self.name){self.path=v}});if(supplied!=null){this.path=supplied;}
current_args[this.name]=this.path;return this.path;},setArgs:function(supplied){var self=this;jQuery.each(current_args,function(k,v){var parsed=k.match(/^(.*?)\.(.*)/);if((parsed!=null)&&(parsed.length==3)&&(parsed[1]==this.name)){self.args[parsed[2]]=v}});jQuery.extend(this.args,supplied);jQuery.each(supplied,function(k,v){current_args[self.name+'.'+k]=v;});return this.args;},data_structure:function(path,args){if(path)
this.setPath(path);if(args)
this.setArgs(args);var shortname=this.name;if(this.parent){shortname=this.name.substr(this.parent.name.length+1);}
return{name:shortname,path:this.path,args:this.args,parent:this.parent?this.parent.data_structure(null,null):null}}};var current_args={};function prepare_element_for_update(f){var name=f['region'];var element=document.getElementById('region-'+f['region']);if(f['element']){element=jQuery(f['element'])[0];}
f['element']=element;if(element==null)
return;if(f['mode']=="Delete"){fragments[name]=null;if(f['effect']){Jifty.Effect(Jifty.$('region-'+f['region']),f['effect'],f['effect_args']);jQuery(element).queue(function(){jQuery(element).remove();jQuery(element).dequeue();});}else if(f['remove_effect']){Jifty.Effect(Jifty.$('region-'+f['region']),f['remove_effect'],f['remove_effect_args']);jQuery(element).queue(function(){jQuery(element).remove();jQuery(element).dequeue();});}else{jQuery(element).remove();}
return;}
f['is_new']=(fragments[name]?false:true);if(f['is_new']){f['parent']=null;if(f['mode']&&((f['mode']=="Before")||(f['mode']=="After")))
element=element.parentNode;while((element!=null)&&(element.getAttribute)&&(f['parent']==null)){if(/^region-/.test(element.getAttribute("id")))
f['parent']=element.getAttribute("id").replace(/^region-/,"");element=element.parentNode;}
if(f['parent']){f['region']=name=f['parent']+'-'+name;}
new Region(name,f['args'],f['path'],f['parent'],f['parent']?fragments[f['parent']].in_form:null);}else if((f['path']!=null)&&f['toggle']&&(f['path']==fragments[name].path)){jQuery(element).empty();fragments[name].path=null;return;}else if(f['path']==null){f['path']==fragments[name].path;}
return f;}
var walk_node=function(node,table){for(var child=node.firstChild;child!=null;child=child.nextSibling){var name=child.nodeName.toLowerCase();if(table[name])
table[name](child);}}
var apply_fragment_updates=function(fragment,f){var dom_fragment=fragments[f['region']];var new_dom_args={};var element=f['element'];walk_node(fragment,{argument:function(fragment_bit){var textContent='';if(fragment_bit.textContent){textContent=fragment_bit.textContent;}else if(fragment_bit.firstChild){textContent=fragment_bit.firstChild.nodeValue;}
new_dom_args[fragment_bit.getAttribute("name")]=textContent;},content:function(fragment_bit){var textContent='';if(fragment_bit.textContent){textContent=fragment_bit.textContent;}else if(fragment_bit.firstChild){textContent=fragment_bit.firstChild.nodeValue;}
var re=new RegExp('<script[^>]*>([\\S\\s]*?)<\/script>','img');var scripts=(textContent.match(re)||[]).join("");var textContentWithoutScript=textContent.replace(re,'');textContent=textContentWithoutScript+scripts;if(f['mode']=='Popout'){jQuery.facebox(textContent);}else if(f['mode']&&(f['mode']!='Replace')){var method=({After:'after',Before:'before',Bottom:'append',Top:'prepend'})[f['mode']];jQuery.fn[method].call(jQuery(element),textContent);element=document.getElementById('region-'+f['region']);}else if(f['remove_effect']){Jifty.Effect(Jifty.$('region-'+f['region']),f['remove_effect'],f['remove_effect_args']);jQuery(element).queue(function(){jQuery(element).html(textContent);jQuery(element).dequeue();});}else{jQuery(element).html(textContent);}
Behaviour.apply(element);}});dom_fragment.setArgs(new_dom_args);if(f['effect']){Jifty.Effect(Jifty.$('region-'+f['region']),f['effect'],f['effect_args'],{before:function(){if(f['is_new'])
jQuery(this).hide();}});}}
Jifty.update=function(){if(!Jifty.hasAjaxTransport)return true;if(window.event){window.event.returnValue=false;}
var named_args=arguments[0];var trigger=arguments[1];var request={};var disabled_elements=[];request.path='/__jifty/webservices/xml';var button_args=Jifty.Form.Element.buttonFormElements(trigger);var form=Jifty.Form.Element.getForm(trigger);if(named_args['actions']==null){named_args['actions']={};if(form){jQuery.each(Jifty.Form.getActions(form),function(){named_args['actions'][this.moniker]=1;});}}
var optional_fragments;if(form&&form['J:CALL']){optional_fragments=[prepare_element_for_update({'mode':'Replace','args':{},'region':'__page','path':null})];}
var has_request=0;var action_count=0;request['actions']={};for(var moniker in named_args['actions']){if(moniker=='extend')
continue;var disable=named_args['actions'][moniker];var a=new Action(moniker,button_args);current_actions[moniker]=a;if(a.actionClass=='Jifty::Action::Redirect'){(function(){var fields=a.fields();var path=fields[fields.length-1];optional_fragments=[prepare_element_for_update({'mode':'Replace','args':{},'region':'__page','path':path})];})()}
a.result={};a.result.field_error={};if(a.register){if(a.hasUpload()){if(window.event){window.event.returnValue=true;}
return true;}
if(disable){a.disable_input_fields(disabled_elements);}
var param=a.data_structure();var fields=param.fields;var override=named_args['action_arguments'][param.moniker]||{};for(var argname in override){if(fields[argname]){fields[argname].value=override[argname];}
else{fields[argname]={value:override[argname]};}}
request['actions'][moniker]=param;++action_count;++has_request;}}
request.fragments={};var hooks=jQuery.map(Jifty.Update.handler_hooks,function(hook){return hook.init()});for(var i=0;i<named_args['fragments'].length;i++){var f=named_args['fragments'][i];f=prepare_element_for_update(f);if(!f)continue;var handled=0;for(var j=0;j<hooks.length;++j){if(hooks[j].process_fragment(f)){handled=1;break;}}
if(handled)
continue;var name=f['region'];var fragment_request=fragments[name].data_structure(f['path'],f['args']);if(f['is_new']){fragment_request['wrapper']=1;}
if(fragments[name].in_form){fragment_request['in_form']=1;}
request.fragments[name]=fragment_request;++has_request;}
jQuery.each(hooks,function(){this.process_update()});if(!has_request){return false;}
var onSuccess=function(responseXML){if(named_args['preload']){if(Jifty.want_preloaded_regions[named_args['preload_key']]){delete Jifty.want_preloaded_regions[named_args['preload_key']];}
else{Jifty.preloaded_regions[named_args['preload_key']]=responseXML;return;}}
var response=responseXML.documentElement;walk_node(response,{result:function(result){var moniker=result.getAttribute("moniker");walk_node(result,{field:function(field){var error=field.getElementsByTagName('error')[0];if(error){var text=error.textContent?error.textContent:(error.firstChild?error.firstChild.nodeValue:'');var action=current_actions[moniker];action.result.field_error[field.getAttribute("name")]=text;}}});}});for(var i=0;i<disabled_elements.length;i++){disabled_elements[i].disabled=false;}
var expected_fragments=optional_fragments?optional_fragments:named_args['fragments'];for(var response_fragment=response.firstChild;response_fragment!=null&&response_fragment.nodeName=='fragment';response_fragment=response_fragment.nextSibling){var exp_id=response_fragment.getAttribute("id");var f;jQuery.each(expected_fragments,function(){if(exp_id==this['region']){f=this;return false;}});if(!f){continue;}
try{apply_fragment_updates(response_fragment,f);}catch(e){alert(e)}
jQuery.each(Jifty.Update.response_hooks,function(i){this(response_fragment,f);});jQuery('.fragment_updates_attached').trigger('fragment_updates',f);}
jQuery.each(hooks,function(){this.process_update()});walk_node(response,{result:function(result){for(var key=result.firstChild;key!=null;key=key.nextSibling){show_action_result(result.getAttribute("moniker"),key);}},redirect:function(redirect){document.location=redirect.firstChild.firstChild.nodeValue;}});current_actions={}};var onFailure=function(transport,object){if(!hide_wait){hide_wait_message_now();}
if(!named_args['preload']){alert("Unable to connect to server.\n\nTry again in a few minutes.");}
Jifty.failedRequest=transport;for(var i=0;i<disabled_elements.length;i++){disabled_elements[i].disabled=false;}};request.variables={};jQuery.each(current_args,function(k,v){request.variables['region-'+k]=v;});request.continuation=named_args['continuation'];for(var i=0;i<document.forms.length;i++){var form=document.forms[i];jQuery.each(current_args,function(k,v){if(form['J:V-region-'+k]){form['J:V-region-'+k].value=v;}else{var hidden=document.createElement('input');hidden.setAttribute('type','hidden');hidden.setAttribute('name','J:V-region-'+k);hidden.setAttribute('id','J:V-region-'+k);hidden.setAttribute('value',v);form.appendChild(hidden);}})}
var submitActions=function(){if(action_count>0){delete request.fragments;Jifty.preload_action_request();jQuery.ajax({url:document.URL,type:'post',dataType:'xml',data:JSON.stringify(request),contentType:'text/x-json',error:onFailure,success:onSuccess,complete:Jifty.preload_action_respond,});}};if(Jifty.preloaded_regions[named_args['preload_key']]){var faux_response=Jifty.preloaded_regions[named_args['preload_key']];delete Jifty.preloaded_regions[named_args['preload_key']];submitActions();onSuccess(faux_response);return false;}
if(Jifty.preloading_regions[named_args['preload_key']]){Jifty.want_preloaded_regions[named_args['preload_key']]=1;submitActions();return false;}
var hide_wait=named_args['hide_wait_message'];if(!hide_wait){show_wait_message();}
jQuery.ajax({url:document.URL,type:'post',dataType:'xml',data:JSON.stringify(request),contentType:'text/x-json',error:onFailure,success:onSuccess,complete:function(){delete Jifty.preloading_regions[named_args['preload_key']];if(!hide_wait){hide_wait_message();}},beforeSend:function(request){var headers=named_args['headers'];for(header in headers){if(headers.hasOwnProperty(header)){request.setRequestHeader(header,headers[header]);}}}});return false;}
Jifty.preloaded_regions={};Jifty.preloading_regions={};Jifty.preloading_is_queued=0;Jifty.queued_preloads=[];Jifty.want_preloaded_regions={};Jifty.preload=function(args,trigger){if(window.event){window.event.returnValue=false;}
if(Jifty.preloading_regions[args['preload_key']]){return false;}
if(Jifty.preloading_is_queued){Jifty.preloading_regions[args['preload_key']]=1;Jifty.queued_preloads.push(function(){delete Jifty.preloading_regions[args['preload_key']];Jifty.preload(args,trigger);});return false;}
args.hide_wait_message=1;args.preload=1;args.actions=[];Jifty.update(args,trigger);Jifty.preloading_regions[args['preload_key']]=1;return false;}
Jifty.preload_action_request=function(){++Jifty.preloading_is_queued;};Jifty.preload_action_respond=function(){if(--Jifty.preloading_is_queued==0){var preloads=Jifty.queued_preloads;Jifty.queued_preloads=[];for(var i=0;i<preloads.length;++i){preloads[i]();}}};function update(named_args,trigger){alert('please use Jifty.update instead of update.');return Jifty.update(named_args,trigger);}
function trace(msg){if(typeof(jsTrace)!='undefined'){jsTrace.send(msg);}}
function show_wait_message(){jQuery('#jifty-wait-message').fadeIn(500);}
function hide_wait_message(){jQuery('#jifty-wait-message').fadeOut(200);}
function hide_wait_message_now(){jQuery('#jifty-wait-message').hide();}
function show_action_result(){var moniker=arguments[0];var result=arguments[1];var status=result.nodeName;if(status=='field'){for(var key=result.firstChild;key!=null;key=key.nextSibling){show_action_result(moniker,key);}
return;}
var text=result.textContent?result.textContent:(result.firstChild?result.firstChild.nodeValue:'');if(status!='message'&&status!='error')return;jQuery.jGrowl(text,{theme:'result-'+status});}
Jifty.Autocompleter=function(){var that=this;var args=arguments;jQuery(function(){that.initialize.apply(that,args)});return this;};jQuery.extend(Jifty.Autocompleter.prototype,{initialize:function(field,div){this.field=Jifty.$(field);this.action=Jifty.Form.Element.getAction(this.field);this.url='/__jifty/autocomplete.xml';var sel='#'+this.field.id+'-autocomplete';var autocomplete_div=jQuery(sel.replace(/:/g,'\\\\\\:'));var self=this;jQuery(this.field).focus(function(event){self.changed=true;self.hasFocus=true;Jifty.current_autocompleter_object=self;autocomplete_div.append(jQuery('#autocompleteHelper')).show();}).blur(function(){autocomplete_div.hide()});jQuery(this.field).Autocomplete({source:this.url,minchars:-1,delay:100,helperClass:'autocomplete',selectClass:'selected'});},beforeShow:function(){if(this.field.onblur){this.element._onblur=this.element.onblur;this.element.onblur=null;}},beforeHide:function(){if(this.element._onblur){this.element.onblur=this.element._onblur;this.element._onblur=null;}},afterUpdate:function(field,selection){Jifty.Form.Element.validate(field);},buildRequest:function(){var request={path:this.url,actions:{}};var a={};a['moniker']='autocomplete';a['class']='Jifty::Action::Autocomplete';a['fields']={};a['fields']['moniker']=this.action.moniker;a['fields']['argument']=Jifty.Form.Element.getField(this.field);request['actions']['autocomplete']=a;request['actions'][this.action.moniker]=this.action.data_structure();request['actions'][this.action.moniker]['active']=0;return request;}});Jifty.Placeholder=function(){this.initialize.apply(this,arguments);return this;};jQuery.extend(Jifty.Placeholder.prototype,{element:null,text:null,initialize:function(element,text){this.element=Jifty.$(element);this.text=text;this.element.placeholderText=this.text;var self=this;jQuery(this.element).bind("focus",function(event){self.onFocus();}).bind("blur",function(event){self.onBlur();});this.onBlur();var form=Jifty.Form.Element.getForm(element);if(form&&!form.hasPlaceholders){form.hasPlaceholders=true;form.onsubmit=function(){Jifty.Form.clearPlaceholders(form);};}},onBlur:function(){if(this.element.value==''||this.element.value==this.text){jQuery(this.element).addClass('placeholder').val(this.text);}},onFocus:function(){Jifty.Placeholder.clearPlaceholder(this.element);}});jQuery.extend(Jifty.Placeholder,{hasPlaceholder:function(elt){return jQuery(elt).hasClass('placeholder');},clearPlaceholder:function(elt){if(Jifty.Placeholder.hasPlaceholder(elt)){elt.value=elt.value.replace(/\r/g,'');elt.placeholderText=elt.placeholderText.replace(/\r/g,'');if(elt.value==elt.placeholderText)
jQuery(elt).removeClass('placeholder').val('');}}});if(!Object.prototype.hasOwnProperty){Object.prototype.hasOwnProperty=function(property){try{var prototype=this.constructor.prototype;while(prototype){if(prototype[property]==this[property]){return false;}
prototype=prototype.prototype;}}catch(e){}
return true;}}
Jifty.Effect=function(el,name,args,options){if(typeof Effect!='undefined'){try{var effect=eval('Effect.'+name);var effect_args=args||{};if(effect){(effect)(el,effect_args);}
return effect;}catch(e){}}
if(options==null)options={};var effect=name=='Fade'?'fadeOut':name=='Appear'?'fadeIn':name=='SlideDown'?'slideDown':name=='SlideUp'?'slideUp':name;if(jQuery.isFunction(jQuery(el)[effect])){if(jQuery.isFunction(options["before"]))
options["before"].call(el);(jQuery(el)[effect])(args);if(jQuery.isFunction(options["after"]))
options["after"].call(el);}};Form={};jQuery.extend(Form,{getActions:function(element){return Jifty.Form.getActions(element);},clearPlaceholders:function(element){return Jifty.Form.clearPlaceholders(element);},Element:{}});jQuery.extend(Form.Element,{getMoniker:function(element){return Jifty.Form.Element.getMoniker(element);},getAction:function(element){return Jifty.Form.Element.getAction(element);},getField:function(element){return Jifty.Form.Element.getField(element);},getType:function(element){return Jifty.Form.Element.getType(element);},validate:function(element){return Jifty.Form.Element.validate(element);},disableValidation:function(element){return Jifty.Form.Element.disableValidation(element);},enableValidation:function(element){return Jifty.Form.Element.enableValidation(element);},getForm:function(element){return Jifty.Form.Element.getForm(element);},buttonArguments:function(element){return Jifty.Form.Element.buttonArguments(element);},buttonActions:function(element){return Jifty.Form.Element.buttonActions(element);},buttonFormElements:function(element){return Jifty.Form.Element.buttonFormElements(element);},clickDefaultButton:function(element){return Jifty.Form.Element.clickDefaultButton(element);},handleEnter:function(event){return Jifty.Form.Element.handleEnter(event);}});if(typeof Jifty=="undefined")Jifty={};Jifty.Utils={findPosX:function(obj)
{var curleft=0;if(obj.offsetParent)
while(1)
{curleft+=obj.offsetLeft;if(!obj.offsetParent)
break;obj=obj.offsetParent;}
else if(obj.x)
curleft+=obj.x;return curleft;},findPosY:function(obj)
{var curtop=0;if(obj.offsetParent)
while(1)
{curtop+=obj.offsetTop;if(!obj.offsetParent)
break;obj=obj.offsetParent;}
else if(obj.y)
curtop+=obj.y;return curtop;},findRelativePosX:function(e){var parent=e.parentNode;var parentx=0;while(parent){if(!parent.style)break;var pos=jQuery(parent).css("position");if(pos=="relative"||pos=="absolute"){parentx=Jifty.Utils.findPosX(parent);break;}
parent=parent.parentNode;}
return Jifty.Utils.findPosX(e)-parentx;},findRelativePosY:function(e){var parent=e.parentNode;var parenty=0;while(parent){if(!parent.style)break;var pos=jQuery(parent).css("position");if(pos=="relative"||pos=="absolute"){parenty=Jifty.Utils.findPosY(parent);break;}
parent=parent.parentNode;}
return Jifty.Utils.findPosY(e)-parenty;},isMSIE:false,_browser:null,browser:function(){if(Jifty.Utils._browser)return Jifty.Utils._browser;if(Jifty.Utils.isMSIE){Jifty.Utils._browser="msie";return"msie";}
var browser="unknown";if(Jifty.Utils._checkUAFor("konqueror"))browser="konqueror";else if(Jifty.Utils._checkUAFor("safari"))browser="safari";else if(Jifty.Utils._checkUAFor("omniweb"))browser="omniweb";else if(Jifty.Utils._checkUAFor("opera"))browser="opera";else if(Jifty.Utils._checkUAFor("webtv"))browser="webtv";else if(Jifty.Utils._checkUAFor("icab"))browser="icab";else if(Jifty.Utils._checkUAFor("msie"))browser="msie";else if(!Jifty.Utils._checkUAFor("compatible"))browser="mozilla";Jifty.Utils._browser=browser;return browser;},_ua:navigator.userAgent.toLowerCase(),_checkUAFor:function(str){return Jifty.Utils._ua.indexOf(str)+1;},findScreenHeight:function(){if(window.innerHeight){return window.innerHeight;}
else{if(document.documentElement.clientHeight){return document.documentElement.clientHeight;}
else{if(document.body.clientHeight){return document.body.clientHeight;}}}},getScrollTop:function(){if(document.body&&document.body.scrollTop)
return document.body.scrollTop;if(document.documentElement&&document.documentElement.scrollTop)
return document.documentElement.scrollTop;if(window.pageYOffset)
return window.pageYOffset;return 0;},scrollToShow:function(id){var ul=Jifty.$(id);var y=Jifty.Utils.findPosY(ul)+ul.offsetHeight+10;var scrollTop=Jifty.Utils.getScrollTop();var screen=Jifty.Utils.findScreenHeight()+scrollTop;var diff=y-screen;if(diff>0)
Jifty.SmoothScroll.scrollTo(scrollTop+diff);},stripScripts:function(str){return str.replace(/<script(.|\s)*?\/script>/g,"");}};if(typeof Jifty=="undefined")Jifty={};(function(){var onPushHandler=function(t){var rid=t.firstChild.getAttribute('id');var f={region:rid,path:''};f['mode']=t.getAttribute('mode');f['effect']=t.getAttribute('effect');f['effect_args']=t.getAttribute('effect_args');f['remove_effect']=t.getAttribute('remove_effect');f['remove_effect_args']=t.getAttribute('remove_effect_args');if(Jifty.fragments["__page"]!=null){f['region']="__page-"+f['region']}
f=prepare_element_for_update(f);if(f==null)return;apply_fragment_updates(t.firstChild,f);};Jifty.Subs=function(args){var window_id=args.window_id;var uri=args.uri;if(!uri)
uri="/=/subs?forever=0";this.start=function(){var self=this;jQuery.ajax({url:uri,type:"get",success:function(responseText){var container=document.createElement('div');container.innerHTML=responseText;jQuery("pushfrag",container).each(function(){onPushHandler(this);});setTimeout(function(){self.start();},1000)},error:function(){}});}}})();if(typeof Jifty=="undefined")Jifty={};Jifty.SmoothScroll={interval:'',steps:20,scrollTo:function(y){if(Jifty.SmoothScroll.interval)
clearInterval(Jifty.SmoothScroll.interval);var stepsize=parseInt((y-Jifty.Utils.getScrollTop())/Jifty.SmoothScroll.steps);Jifty.SmoothScroll.interval=setInterval('Jifty.SmoothScroll.scrollWindow('+stepsize+','+y+')',10);},scrollWindow:function(amount,y){var curpos=Jifty.Utils.getScrollTop();var isAbove=(curpos<y);window.scrollTo(0,curpos+amount);var newpos=Jifty.Utils.getScrollTop();var newIsAbove=(newpos<y);if((isAbove!=newIsAbove)||(curpos==newpos)){window.scrollTo(0,y);clearInterval(Jifty.SmoothScroll.interval);}}};if(typeof Jifty=="undefined")Jifty={};Jifty.Calendar={registerDateWidget:function(id){jQuery(id).bind("focus",Jifty.Calendar.toggleCalendar).bind("blur",Jifty.Calendar.doBlur);return true;},dateRegex:/^(\d{4})\W(\d{2})\W(\d{2})/,Options:{OUT_OF_MONTH_SELECT:true},toggleCalendar:function(){var calId="cal_"+this.id;var wrapId=calId+"_wrap";var wrap=document.getElementById(wrapId);if(Jifty.Calendar.openCalendar==wrapId){Jifty.Calendar.hideOpenCalendar();return;}
Jifty.Calendar.hideOpenCalendar();Jifty.Form.Element.disableValidation(this);wrap=document.createElement("div");wrap.setAttribute("id",wrapId);wrap.setAttribute("class","select-free");wrap.style.position="absolute";wrap.style.left=Jifty.Utils.findRelativePosX(this)+"px";wrap.style.top=Jifty.Utils.findRelativePosY(this)+this.offsetHeight+"px";wrap.style.zIndex=40;this.parentNode.insertBefore(wrap,this.nextSibling);var cal;var start_weekday=jQuery(this).hasClass('calendar-starts-monday')?1:0;if(Jifty.Calendar.dateRegex.test(this.value)){var bits=this.value.match(Jifty.Calendar.dateRegex);cal=new YAHOO.widget.Calendar(calId,wrapId,{pagedate:bits[2]+"/"+bits[1],selected:bits[2]+"/"+bits[3]+"/"+bits[1],start_weekday:start_weekday});}
else{cal=new YAHOO.widget.Calendar(calId,wrapId,{start_weekday:start_weekday});}
cal.cfg.applyConfig(Jifty.Calendar.Options);cal.cfg.fireQueue();cal.selectEvent.subscribe(Jifty.Calendar.handleSelect,{input:this,calendar:cal},true);cal.changePageEvent.subscribe(function(){setTimeout(function(){Jifty.Calendar._blurredCalendar=null;},75)},null,false);cal.render();Jifty.Calendar.openCalendar=wrapId;Jifty.Utils.scrollToShow(wrapId);},handleSelect:function(type,args,obj){var year=args[0][0][0],month=args[0][0][1],day=args[0][0][2];if(month<10)
month="0"+month;if(day<10)
day="0"+day;jQuery(obj.input).val(year+"-"+month+"-"+day);jQuery(obj.input).change();Jifty.Calendar.hideOpenCalendar();},openCalendar:"",hideOpenCalendar:function(){if(Jifty.Calendar.openCalendar&&document.getElementById(Jifty.Calendar.openCalendar)){var inputId=Jifty.Calendar.openCalendar;inputId=inputId.replace(/^cal_/,'');inputId=inputId.replace(/_wrap$/,'');var cal=document.getElementById(Jifty.Calendar.openCalendar);cal.parentNode.removeChild(cal);var input=document.getElementById(inputId);Jifty.Form.Element.enableValidation(input);Jifty.Form.Element.validate(input);Jifty.Calendar.openCalendar="";}},_doneBlurOnce:false,_blurredCalendar:null,doBlur:function(ev){if(Jifty.Calendar.openCalendar&&!Jifty.Calendar._doneBlurOnce){Jifty.Calendar._doneBlurOnce=true;Jifty.Calendar._blurredCalendar=Jifty.Calendar.openCalendar;setTimeout(Jifty.Calendar.doBlur,200);return;}
else if(Jifty.Calendar._doneBlurOnce&&Jifty.Calendar._blurredCalendar==Jifty.Calendar.openCalendar)
{Jifty.Calendar.hideOpenCalendar();}
Jifty.Calendar._doneBlurOnce=false;Jifty.Calendar._blurredCalendar=null;}};if(typeof Jifty=="undefined")Jifty={};Jifty.DateTime={registerDateTimeWidget:function(id){jQuery(id).bind("focus",Jifty.DateTime.toggleDateTime).bind("blur",Jifty.DateTime.doBlur);return true;},dateRegex:/^(\d{4})\W(\d{2})\W(\d{2})/,Options:{OUT_OF_MONTH_SELECT:true},toggleDateTime:function(){var calId="cal_"+this.id;var wrapId=calId+"_wrap";var wrap=document.getElementById(wrapId);if(Jifty.DateTime.openDateTime==wrapId){Jifty.DateTime.hideOpenDateTime();return;}
Jifty.DateTime.hideOpenDateTime();Jifty.Form.Element.disableValidation(this);wrap=document.createElement("div");wrap.setAttribute("id",wrapId);wrap.setAttribute("class","select-free");wrap.style.position="absolute";wrap.style.left=Jifty.Utils.findRelativePosX(this)+"px";wrap.style.top=Jifty.Utils.findRelativePosY(this)+this.offsetHeight+"px";wrap.style.zIndex=40;this.parentNode.insertBefore(wrap,this.nextSibling);var cal;var start_weekday=jQuery(this).hasClass('calendar-starts-monday')?1:0;if(Jifty.DateTime.dateRegex.test(this.value)){var bits=this.value.match(Jifty.DateTime.dateRegex);cal=new YAHOO.widget.Calendar(calId,wrapId,{pagedate:bits[2]+"/"+bits[1],selected:bits[2]+"/"+bits[3]+"/"+bits[1],start_weekday:start_weekday});}
else{cal=new YAHOO.widget.Calendar(calId,wrapId,{start_weekday:start_weekday});}
cal.cfg.applyConfig(Jifty.DateTime.Options);cal.cfg.fireQueue();cal.selectEvent.subscribe(Jifty.DateTime.handleSelect,{input:this,calendar:cal},true);cal.changePageEvent.subscribe(function(){setTimeout(function(){Jifty.DateTime._blurredDateTime=null;},75)},null,false);cal.render();Jifty.DateTime.openDateTime=wrapId;Jifty.Utils.scrollToShow(wrapId);},handleSelect:function(type,args,obj){var year=args[0][0][0],month=args[0][0][1],day=args[0][0][2];if(month<10)
month="0"+month;if(day<10)
day="0"+day;jQuery(obj.input).val(year+"-"+month+"-"+day);Jifty.DateTime.hideOpenDateTime();jQuery(obj.input).next().trigger('focus');},openDateTime:"",hideOpenDateTime:function(){if(Jifty.DateTime.openDateTime&&document.getElementById(Jifty.DateTime.openDateTime)){var inputId=Jifty.DateTime.openDateTime;inputId=inputId.replace(/^cal_/,'');inputId=inputId.replace(/_wrap$/,'');var cal=document.getElementById(Jifty.DateTime.openDateTime);cal.parentNode.removeChild(cal);var input=document.getElementById(inputId);Jifty.Form.Element.enableValidation(input);Jifty.Form.Element.validate(input);Jifty.DateTime.openDateTime="";}},_doneBlurOnce:false,_blurredDateTime:null,doBlur:function(ev){if(Jifty.DateTime.openDateTime&&!Jifty.DateTime._doneBlurOnce){Jifty.DateTime._doneBlurOnce=true;Jifty.DateTime._blurredDateTime=Jifty.DateTime.openDateTime;setTimeout(Jifty.DateTime.doBlur,200);return;}
else if(Jifty.DateTime._doneBlurOnce&&Jifty.DateTime._blurredDateTime==Jifty.DateTime.openDateTime)
{Jifty.DateTime.hideOpenDateTime();}
Jifty.DateTime._doneBlurOnce=false;Jifty.DateTime._blurredDateTime=null;}};var Drag={obj:null,init:function(o,oRoot,minX,maxX,minY,maxY,bSwapHorzRef,bSwapVertRef,fXMapper,fYMapper){o.onmousedown=Drag.start;o.hmode=bSwapHorzRef?false:true;o.vmode=bSwapVertRef?false:true;o.root=oRoot&&oRoot!=null?oRoot:o;if(o.hmode&&isNaN(parseInt(o.root.style.left)))o.root.style.left="0px";if(o.vmode&&isNaN(parseInt(o.root.style.top)))o.root.style.top="0px";if(!o.hmode&&isNaN(parseInt(o.root.style.right)))o.root.style.right="0px";if(!o.vmode&&isNaN(parseInt(o.root.style.bottom)))o.root.style.bottom="0px";o.minX=typeof minX!='undefined'?minX:null;o.minY=typeof minY!='undefined'?minY:null;o.maxX=typeof maxX!='undefined'?maxX:null;o.maxY=typeof maxY!='undefined'?maxY:null;o.xMapper=fXMapper?fXMapper:null;o.yMapper=fYMapper?fYMapper:null;o.root.onDragStart=new Function();o.root.onDragEnd=new Function();o.root.onDrag=new Function();},start:function(e){var o=Drag.obj=this;e=Drag.fixE(e);var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);o.root.onDragStart(x,y);o.lastMouseX=e.clientX;o.lastMouseY=e.clientY;if(o.hmode){if(o.minX!=null)o.minMouseX=e.clientX-x+o.minX;if(o.maxX!=null)o.maxMouseX=o.minMouseX+o.maxX-o.minX;}else{if(o.minX!=null)o.maxMouseX=-o.minX+e.clientX+x;if(o.maxX!=null)o.minMouseX=-o.maxX+e.clientX+x;}if(o.vmode){if(o.minY!=null)o.minMouseY=e.clientY-y+o.minY;if(o.maxY!=null)o.maxMouseY=o.minMouseY+o.maxY-o.minY;}else{if(o.minY!=null)o.maxMouseY=-o.minY+e.clientY+y;if(o.maxY!=null)o.minMouseY=-o.maxY+e.clientY+y;}document.onmousemove=Drag.drag;document.onmouseup=Drag.end;return false;},drag:function(e){e=Drag.fixE(e);var o=Drag.obj;var ey=e.clientY;var ex=e.clientX;var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);var nx,ny;if(o.minX!=null)ex=o.hmode?Math.max(ex,o.minMouseX):Math.min(ex,o.maxMouseX);if(o.maxX!=null)ex=o.hmode?Math.min(ex,o.maxMouseX):Math.max(ex,o.minMouseX);if(o.minY!=null)ey=o.vmode?Math.max(ey,o.minMouseY):Math.min(ey,o.maxMouseY);if(o.maxY!=null)ey=o.vmode?Math.min(ey,o.maxMouseY):Math.max(ey,o.minMouseY);nx=x+((ex-o.lastMouseX)*(o.hmode?1:-1));ny=y+((ey-o.lastMouseY)*(o.vmode?1:-1));if(o.xMapper){nx=o.xMapper(y)}else if(o.yMapper){ny=o.yMapper(x);}Drag.obj.root.style[o.hmode?"left":"right"]=nx+"px";Drag.obj.root.style[o.vmode?"top":"bottom"]=ny+"px";Drag.obj.lastMouseX=ex;Drag.obj.lastMouseY=ey;Drag.obj.root.onDrag(nx,ny);return false;},end:function(){document.onmousemove=null;document.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode?"left":"right"]),parseInt(Drag.obj.root.style[Drag.obj.vmode?"top":"bottom"]));Drag.obj=null;},fixE:function(e){if(typeof e=='undefined')e=window.event;if(typeof e.layerX=='undefined')e.layerX=e.offsetX;if(typeof e.layerY=='undefined')e.layerY=e.offsetY;return e;}};var halo_shown=null;var halos_drawn=null;var halo_top;var halo_left;var halo_width;function halo_toggle(id){if(halo_shown&&(id!=halo_shown)){halo_top=Jifty.$('halo-'+halo_shown+'-menu').style.top;halo_left=Jifty.$('halo-'+halo_shown+'-menu').style.left;halo_width=Jifty.$('halo-'+halo_shown+'-menu').style.width;jQuery('#halo-'+halo_shown+'-menu').hide();}
jQuery("#halo-"+id+"-menu").css({top:halo_top,left:halo_left,width:halo_width}).toggle();Drag.init(Jifty.$('halo-'+id+'-title'),Jifty.$('halo-'+id+'-menu'));init_resize(Jifty.$('halo-'+id+'-resize'),Jifty.$('halo-'+id+'-menu'));var e=jQuery('#halo-'+id).get(0);if(jQuery('#halo-'+id+'-menu').is(":visible")){halo_shown=id;jQuery(e).css({background:'#ffff80'});}else{halo_top=Jifty.$('halo-'+halo_shown+'-menu').style.top;halo_left=Jifty.$('halo-'+halo_shown+'-menu').style.left;halo_width=Jifty.$('halo-'+halo_shown+'-menu').style.width;halo_shown=null;jQuery(e).css({background:'inherit'});}
return false;}
function halo_over(id){jQuery('#halo-'+id).css({background:'#ffff80'});}
function halo_out(id){if(!jQuery("#halo-"+id+"-menu").is(":visible")){jQuery('#halo-'+id).css({background:'inherit'});}}
function init_resize(e,w){e.xFrom=e.yFrom=0;Drag.init(e,null,null,null,null,null,true,true);e.onDrag=function(x,y){resizeX(x,e,w);};}
function resizeX(x,grip,window){var width=parseInt(window.style.width);var newWidth=Math.abs(width-(x-grip.xFrom))+'px';window.style.width=newWidth;grip.xFrom=x;}
function draw_halos(){var halo_header_display='none';var halo_border_width='0';var halo_margin='0';var halo_padding='0';halos_drawn=!halos_drawn;if(halos_drawn){halo_header_display='block';halo_border_width='2px';halo_margin='3px';halo_padding='3px';}
jQuery("#render_info-draw_halos").text(halos_drawn?"Hide halos":"Draw halos");jQuery(".halo-header").css({display:halo_header_display});jQuery(".halo").css({'border-width':halo_border_width,'margin':halo_margin,'padding':halo_padding})}
function render_info_tree(){jQuery("#render_info_tree").toggle();}
function halo_render(id,name){halo_reset(id);jQuery('#halo-button-'+name+'-'+id).css("font-weight","bold");var e=jQuery('#halo-rendered-'+id).get(0);if(name=='source'){e.halo_rendered=e.innerHTML;jQuery(e).html('<div class="halo-source"></div>').find("div").text(e.halo_rendered);}
else if(name=='render'){}
else{e.style.display='none';jQuery("#halo-info-"+id).show();jQuery('#halo-info-'+name+'-'+id).show();}}
function halo_reset(id){for(var child=jQuery('#halo-rendermode-'+id).firstChild;child!=null;child=child.nextSibling){if(child.style){child.style.fontWeight='normal';}}
jQuery('#halo-info-'+id).hide();for(var child=jQuery('#halo-info-'+id).firstChild;child!=null;child=child.nextSibling){if(child.style){child.style.display='none';}}
var e=jQuery('#halo-rendered-'+id).get(0);e.style.display='block';if(e.halo_rendered){e.innerHTML=e.halo_rendered;e.halo_rendered=null;}}
function remove_link(id,name){var link=jQuery('#halo-button-'+name+'-'+id).get(0);var newlink=document.createElement("span");newlink.appendChild(link.childNodes[0]);link.parentNode.replaceChild(newlink,link);}
function ComboBox_InitWith(n){if(typeof(window.addEventListener)!="undefined"){window.addEventListener("load",ComboBox_Init(n),false);}else if(typeof(window.attachEvent)!="undefined"){window.attachEvent("onload",ComboBox_Init(n));}else{ComboBox_Init(n)();}}
function ComboBox_Init(n){return function(){if(ComboBox_UplevelBrowser(n)){ComboBox_Load(n);}}}
function ComboBox_UplevelBrowser(n){if(typeof(document.getElementById)=="undefined")return false;var combo=document.getElementById(n+"_Container");if(combo==null||typeof(combo)=="undefined")return false;if(typeof(combo.style)=="undefined")return false;if(typeof(combo.innerHTML)=="undefined")return false;return true;}
function ComboBox_Load(comboId){var combo=document.getElementById(comboId+"_Container");var button=document.getElementById(comboId+"_Button");var list=document.getElementById(comboId+"_List");var text=document.getElementById(comboId);combo.List=list;combo.Button=button;combo.Text=text;button.Container=combo;button.Toggle=ComboBox_ToggleList;button.onclick=button.Toggle;button.onmouseover=function(e){this.Container.List.DisableBlur(e);};button.onmouseout=function(e){this.Container.List.EnableBlur(e);};button.innerHTML="\u25BC";button.onselectstart=function(e){return false;};button.style.height=(list.offsetHeight-4)+"px";text.Container=combo;text.TypeDown=ComboBox_TextTypeDown;text.KeyAccess=ComboBox_TextKeyAccess;text.onkeyup=function(e){this.KeyAccess(e);this.TypeDown(e);};text.style.width=(list.offsetWidth)+"px";list.Container=combo;list.Show=ComboBox_ShowList;list.Hide=ComboBox_HideList;list.EnableBlur=ComboBox_ListEnableBlur;list.DisableBlur=ComboBox_ListDisableBlur;list.Select=ComboBox_ListItemSelect;list.ClearSelection=ComboBox_ListClearSelection;list.KeyAccess=ComboBox_ListKeyAccess;list.FireTextChange=ComboBox_ListFireTextChange;list.onchange=null;list.onclick=function(e){this.Select(e);this.ClearSelection();this.FireTextChange();};list.onkeyup=function(e){this.KeyAccess(e);};list.EnableBlur(null);list.style.position="absolute";list.size=ComboBox_GetListSize(list);list.IsShowing=true;list.Hide();}
function ComboBox_InitEvent(e){if(typeof(e)=="undefined"&&typeof(window.event)!="undefined")e=window.event;if(e==null)e=new Object();return e;}
function ComboBox_ListClearSelection(){if(typeof(this.Container.Text.createTextRange)=="undefined")return;var rNew=this.Container.Text.createTextRange();rNew.moveStart('character',this.Container.Text.value.length);rNew.select();}
function ComboBox_GetListSize(theList){ComboBox_EnsureListSize(theList);return theList.listSize;}
function ComboBox_EnsureListSize(theList){if(typeof(theList.listSize)=="undefined"){if(typeof(theList.getAttribute)!="undefined"){if(theList.getAttribute("listSize")!=null&&theList.getAttribute("listSize")!=""){theList.listSize=theList.getAttribute("listSize");return;}}
if(theList.options.length>0){theList.listSize=theList.options.length;return;}
theList.listSize=4;}}
function ComboBox_ListKeyAccess(e){e=ComboBox_InitEvent(e);if(e.keyCode==13||e.keyCode==32){this.Select();return;}
if(e.keyCode==27){this.Hide();this.Container.Text.focus();return;}}
function ComboBox_TextKeyAccess(e){e=ComboBox_InitEvent(e);if(e.altKey&&(e.keyCode==38||e.keyCode==40)){this.Container.List.Show();}}
function ComboBox_TextTypeDown(e){e=ComboBox_InitEvent(e);var items=this.Container.List.options;if(this.value=="")return;var ctrlKeys=Array(8,46,37,38,39,40,33,34,35,36,45,16,20);for(var i=0;i<ctrlKeys.length;i++){if(e.keyCode==ctrlKeys[i])return;}
for(var i=0;i<items.length;i++){var item=items[i];if(item.text.toLowerCase().indexOf(this.value.toLowerCase())==0){this.Container.List.selectedIndex=i;if(typeof(this.Container.Text.createTextRange)!="undefined"){this.Container.List.Select();}
break;}}}
function ComboBox_ListFireTextChange(){var textOnChange=this.Container.Text.onchange;if(textOnChange!=null&&typeof(textOnChange)=="function"){textOnChange();}}
function ComboBox_ListEnableBlur(e){this.onblur=this.Hide;}
function ComboBox_ListDisableBlur(e){this.onblur=null;}
function ComboBox_ListItemSelect(e){if(this.options.length>0){var text=this.Container.Text;var oldValue=text.value;var newValue=this.options[this.selectedIndex].value;text.value=newValue;if(typeof(text.createTextRange)!="undefined"){if(newValue!=oldValue){var rNew=text.createTextRange();rNew.moveStart('character',oldValue.length);rNew.select();}}}
this.Hide();this.Container.Text.focus();}
function ComboBox_ToggleList(e){if(this.Container.List.IsShowing==true){this.Container.List.Hide();}else{this.Container.List.Show();}}
function ComboBox_ShowList(e){if(!this.IsShowing&&!this.disabled){this.style.width=(this.Container.offsetWidth)+"px";this.style.top=(this.Container.offsetHeight+ComboBox_RecursiveOffsetTop(this.Container,true))+"px";this.style.left=(ComboBox_RecursiveOffsetLeft(this.Container,true)+1)+"px";ComboBox_SetVisibility(this,true);this.focus();this.IsShowing=true;}}
function ComboBox_HideList(e){if(this.IsShowing){ComboBox_SetVisibility(this,false);this.IsShowing=false;}}
function ComboBox_SetVisibility(theList,isVisible){var isIE=(typeof(theList.dataSrc)!="undefined");var ua=navigator.userAgent.toLowerCase();var isSafari=(ua.indexOf('safari')!=-1);if(isIE||isSafari){if(isVisible){theList.style.visibility="visible";}else{theList.style.visibility="hidden";}}else{if(isVisible){theList.style.display="block";}else{theList.style.display="none";}}}
function ComboBox_RecursiveOffsetTop(thisObject,isFirst){if(thisObject.offsetParent){if(thisObject.style.position=="absolute"&&!isFirst&&typeof(document.designMode)!="undefined"){return 0;}
return(thisObject.offsetTop+ComboBox_RecursiveOffsetTop(thisObject.offsetParent,false));}else{return thisObject.offsetTop;}}
function ComboBox_RecursiveOffsetLeft(thisObject,isFirst){if(thisObject.offsetParent){if(thisObject.style.position=="absolute"&&!isFirst&&typeof(document.designMode)!="undefined"){return 0;}
return(thisObject.offsetLeft+ComboBox_RecursiveOffsetLeft(thisObject.offsetParent,false));}else{return thisObject.offsetLeft;}}
function ComboBox_SimpleAttach(selectElement,textElement){textElement.value=selectElement.options[selectElement.options.selectedIndex].value;var textOnChange=textElement.onchange;if(textOnChange!=null&&typeof(textOnChange)=="function"){textOnChange();}}
JSAN.use("DOM.Events");if(typeof Jifty=="undefined")Jifty={};Jifty.KeyBindings={bindings:new Array(),listener:null,activate:function(){if(Jifty.KeyBindings.listener)
return;Jifty.KeyBindings.listener=DOM.Events.addListener(document,"keydown",Jifty.KeyBindings.doClick);},deactivate:function(){DOM.Events.removeListener(Jifty.KeyBindings.listener);},reset:function(){Jifty.KeyBindings.bindings=new Array();},doClick:function(e){if(e.target.nodeType==3)
e.target=e.target.parentNode;if(!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.target.nodeName.match(/^(INPUT|TEXTAREA)$/))
{var code=String.fromCharCode(e.keyCode);var binding=Jifty.KeyBindings.get(code);if(binding){e.preventDefault();if(binding["action"]=="goto"){document.location=(binding["data"]);}
else if(binding["action"]=="focus"){var elements=document.getElementsByName(binding["data"]);elements[0].focus();}
else if(binding["action"]=="click"){var elements=document.getElementsByName(binding["data"]);elements[0].click();}}}},add:function(key,action,data,label){var binding=new Array();binding["action"]=action;binding["data"]=data;binding["label"]=label;Jifty.KeyBindings.bindings[key]=binding;},get:function(key){return Jifty.KeyBindings.bindings[key];},writeLegend:function(e){if(!document.createElement||!document.createTextNode||jQuery(e).is('.keybindings-written'))
return;var dl=document.createElement("dl");dl.className="keybindings";for(var key in Jifty.KeyBindings.bindings){if(Jifty.KeyBindings.get(key)["label"]){var div=document.createElement("div");div.className="keybinding";var dt=document.createElement("dt");dt.appendChild(document.createTextNode(key));var dd=document.createElement("dd");dd.appendChild(document.createTextNode(Jifty.KeyBindings.get(key)["label"]));div.appendChild(dt);div.appendChild(dd);dl.appendChild(div);}}
if(dl.hasChildNodes()){var label=document.createElement("div");label.className="keybindings_label";label.appendChild(document.createTextNode("Hotkeys:"));e.appendChild(label);e.appendChild(dl);jQuery(e).addClass('keybindings-written');Jifty.KeyBindings.activate();}}}
Behaviour.register({"#keybindings":Jifty.KeyBindings.writeLegend});JSAN.use("DOM.Events");if(typeof Jifty=="undefined")Jifty={};function prepExpandButton(e){e.onmousedown=function(){this.onfocus=this.blur};e.onmouseup=function(){this.onfocus=window.clientInformation?null:window.undefined};e=null;}
Jifty.ContextMenu={behaviourRules:{"ul.menu li.toplevel span.expand a":prepExpandButton,"ul.context_menu li.toplevel span.expand a":prepExpandButton},currently_open:"",prevent_stutter:"",getParentListItem:function(ul){return ul.parentNode;},hideshow:function(id){var ul=document.getElementById(id);Jifty.ContextMenu.prevent_stutter=id;if(ul.style.display=="block")
Jifty.ContextMenu.hide(id);else
Jifty.ContextMenu.show(id);},hide:function(id){var ul=document.getElementById(id);if(ul){var li=Jifty.ContextMenu.getParentListItem(ul);jQuery(li).removeClass("open").addClass("closed");ul.style.display="none";}
Jifty.ContextMenu.currently_open="";},show:function(id){var ul=document.getElementById(id);if(!ul)return;if(Jifty.ContextMenu.currently_open&&Jifty.ContextMenu.currently_open!=ul.id)
{Jifty.ContextMenu.hide(Jifty.ContextMenu.currently_open);}
var li=Jifty.ContextMenu.getParentListItem(ul);jQuery(ul).addClass("dropdown_menu");ul.style.position="absolute";ul.style.width="12em";if(Jifty.Utils.isMSIE){if(ul.style.position==""){var x=Jifty.Utils.findPosX(li);var y=Jifty.Utils.findPosY(li)+li.offsetHeight;ul.style.left=x+"px";ul.style.top=y+"px";}}
else{ul.style.left="-1px";ul.style.top=li.offsetHeight-2+"px";li.style.position="relative";}
jQuery(li).removeClass("closed").addClass("open");ul.style.display="block";Jifty.ContextMenu.currently_open=ul.id;Jifty.Utils.scrollToShow(ul.id);},hideOpenMenu:function(event){if(Jifty.ContextMenu.prevent_stutter&&Jifty.ContextMenu.prevent_stutter==Jifty.ContextMenu.currently_open)
{Jifty.ContextMenu.prevent_stutter="";return;}
else{Jifty.ContextMenu.prevent_stutter="";}
if(Jifty.ContextMenu.currently_open){Jifty.ContextMenu.hide(Jifty.ContextMenu.currently_open);}}};DOM.Events.addListener(document,"click",Jifty.ContextMenu.hideOpenMenu);Behaviour.register(Jifty.ContextMenu.behaviourRules);function focusElementById(id){var e=document.getElementById(id);if(e)e.focus();}
function updateParentField(field,value){if(window.opener){window.opener.document.getElementById(field).value=value;window.close();}}
function createCalendarLink(id){return Jifty.Calendar.registerDateWidget(id);}
function createDateTimeLink(id){return Jifty.DateTime.registerDateTimeWidget(id);}
JSAN.use("DOM.Events");function buttonToLink(e){var link=document.createElement("a");link.setAttribute("href","#");link.setAttribute("name",e.getAttribute("name"));var form=Jifty.Form.Element.getForm(e);var onclick=e.getAttribute("onclick");if(!onclick){DOM.Events.addListener(link,"click",function(ev){var a=ev.target;var hidden=document.createElement("input");hidden.setAttribute("type","hidden");hidden.setAttribute("name",a.getAttribute("name"));a["virtualform"].appendChild(hidden);if(a["virtualform"].onsubmit)
a["virtualform"].onsubmit();a["virtualform"].submit();});}
link.setAttribute("onclick",onclick);link.setAttribute("title",e.getAttribute("title"));link.className=e.className;link["virtualform"]=form;link.appendChild(document.createTextNode(e.getAttribute("value")));e.parentNode.insertBefore(link,e.nextSibling);e.parentNode.removeChild(e);return link;}
var onLoadStack=new Array();var onLoadLastStack=new Array();var onLoadExecuted=0;function onLoadHook(commandStr){if(typeof(commandStr)=="string"){onLoadStack[onLoadStack.length]=commandStr;return true;}
return false;}
function onLoadLastHook(commandStr){if(typeof(commandStr)=="string"){onLoadLastStack[onLoadLastStack.length]=commandStr;return true;}
return false;}
function doOnLoadHooks(){if(onLoadExecuted)return;for(var x=0;x<onLoadStack.length;x++){eval(onLoadStack[x]);}
for(var x=0;x<onLoadLastStack.length;x++){eval(onLoadLastStack[x]);}
onLoadExecuted=1;}
if(typeof window.onload!='function'){window.onload=doOnLoadHooks;}else{var oldonload=window.onload;window.onload=function(){oldonload();doOnLoadHooks();}}
if(typeof YAHOO=="undefined"||!YAHOO){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.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:[]};YAHOO.env.getVersion=function(name){return YAHOO.env.modules[name]||null;};YAHOO.env.ua=function(){var o={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var ua=navigator.userAgent,m;if((/KHTML/).test(ua)){o.webkit=1;}
m=ua.match(/AppleWebKit\/([^\s]*)/);if(m&&m[1]){o.webkit=parseFloat(m[1]);if(/ Mobile\//.test(ua)){o.mobile="Apple";}else{m=ua.match(/NokiaN[^\/]*/);if(m){o.mobile=m[0];}}}
if(!o.webkit){m=ua.match(/Opera[\s\/]([^\s]*)/);if(m&&m[1]){o.opera=parseFloat(m[1]);m=ua.match(/Opera Mini[^;]*/);if(m){o.mobile=m[0];}}else{m=ua.match(/MSIE\s([^;]*)/);if(m&&m[1]){o.ie=parseFloat(m[1]);}else{m=ua.match(/Gecko\/([^\s]*)/);if(m){o.gecko=1;m=ua.match(/rv:([^\s\)]*)/);if(m&&m[1]){o.gecko=parseFloat(m[1]);}}}}}
return o;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){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.lang=YAHOO.lang||{isArray:function(o){if(o){var l=YAHOO.lang;return l.isNumber(o.length)&&l.isFunction(o.splice);}
return false;},isBoolean:function(o){return typeof o==='boolean';},isFunction:function(o){return typeof o==='function';},isNull:function(o){return o===null;},isNumber:function(o){return typeof o==='number'&&isFinite(o);},isObject:function(o){return(o&&(typeof o==='object'||YAHOO.lang.isFunction(o)))||false;},isString:function(o){return typeof o==='string';},isUndefined:function(o){return typeof o==='undefined';},hasOwnProperty:function(o,prop){if(Object.prototype.hasOwnProperty){return o.hasOwnProperty(prop);}
return!YAHOO.lang.isUndefined(o[prop])&&o.constructor.prototype[prop]!==o[prop];},_IEEnumFix:function(r,s){if(YAHOO.env.ua.ie){var add=["toString","valueOf"],i;for(i=0;i<add.length;i=i+1){var fname=add[i],f=s[fname];if(YAHOO.lang.isFunction(f)&&f!=Object.prototype[fname]){r[fname]=f;}}}},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];}
YAHOO.lang._IEEnumFix(subc.prototype,overrides);}},augmentObject:function(r,s){if(!s||!r){throw new Error("Absorb failed, verify dependencies.");}
var a=arguments,i,p,override=a[2];if(override&&override!==true){for(i=2;i<a.length;i=i+1){r[a[i]]=s[a[i]];}}else{for(p in s){if(override||!r[p]){r[p]=s[p];}}
YAHOO.lang._IEEnumFix(r,s);}},augmentProto:function(r,s){if(!s||!r){throw new Error("Augment failed, verify dependencies.");}
var a=[r.prototype,s.prototype];for(var i=2;i<arguments.length;i=i+1){a.push(arguments[i]);}
YAHOO.lang.augmentObject.apply(this,a);},dump:function(o,d){var l=YAHOO.lang,i,len,s=[],OBJ="{...}",FUN="f(){...}",COMMA=', ',ARROW=' => ';if(!l.isObject(o)){return o+"";}else if(o instanceof Date||("nodeType"in o&&"tagName"in o)){return o;}else if(l.isFunction(o)){return FUN;}
d=(l.isNumber(d))?d:3;if(l.isArray(o)){s.push("[");for(i=0,len=o.length;i<len;i=i+1){if(l.isObject(o[i])){s.push((d>0)?l.dump(o[i],d-1):OBJ);}else{s.push(o[i]);}
s.push(COMMA);}
if(s.length>1){s.pop();}
s.push("]");}else{s.push("{");for(i in o){if(l.hasOwnProperty(o,i)){s.push(i+ARROW);if(l.isObject(o[i])){s.push((d>0)?l.dump(o[i],d-1):OBJ);}else{s.push(o[i]);}
s.push(COMMA);}}
if(s.length>1){s.pop();}
s.push("}");}
return s.join("");},substitute:function(s,o,f){var i,j,k,key,v,meta,l=YAHOO.lang,saved=[],token,DUMP='dump',SPACE=' ',LBRACE='{',RBRACE='}';for(;;){i=s.lastIndexOf(LBRACE);if(i<0){break;}
j=s.indexOf(RBRACE,i);if(i+1>=j){break;}
token=s.substring(i+1,j);key=token;meta=null;k=key.indexOf(SPACE);if(k>-1){meta=key.substring(k+1);key=key.substring(0,k);}
v=o[key];if(f){v=f(key,v,meta);}
if(l.isObject(v)){if(l.isArray(v)){v=l.dump(v,parseInt(meta,10));}else{meta=meta||"";var dump=meta.indexOf(DUMP);if(dump>-1){meta=meta.substring(4);}
if(v.toString===Object.prototype.toString||dump>-1){v=l.dump(v,parseInt(meta,10));}else{v=v.toString();}}}else if(!l.isString(v)&&!l.isNumber(v)){v="~-"+saved.length+"-~";saved[saved.length]=token;}
s=s.substring(0,i)+v+s.substring(j+1);}
for(i=saved.length-1;i>=0;i=i-1){s=s.replace(new RegExp("~-"+i+"-~"),"{"+saved[i]+"}","g");}
return s;},trim:function(s){try{return s.replace(/^\s+|\s+$/g,"");}catch(e){return s;}},merge:function(){var o={},a=arguments;for(var i=0,l=a.length;i<l;i=i+1){YAHOO.lang.augmentObject(o,a[i],true);}
return o;},later:function(when,o,fn,data,periodic){when=when||0;o=o||{};var m=fn,d=data,f,r;if(YAHOO.lang.isString(fn)){m=o[fn];}
if(!m){throw new TypeError("method undefined");}
if(!YAHOO.lang.isArray(d)){d=[data];}
f=function(){m.apply(o,d);};r=(periodic)?setInterval(f,when):setTimeout(f,when);return{interval:periodic,cancel:function(){if(this.interval){clearInterval(r);}else{clearTimeout(r);}}};},isValue:function(o){var l=YAHOO.lang;return(l.isObject(o)||l.isString(o)||l.isNumber(o)||l.isBoolean(o));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.4.1",build:"742"});(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={},reClassNameCache={},document=window.document;var isOpera=YAHOO.env.ua.opera,isSafari=YAHOO.env.ua.webkit,isGecko=YAHOO.env.ua.gecko,isIE=YAHOO.env.ua.ie;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;};var getClassRegEx=function(className){var re=reClassNameCache[className];if(!re){re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');reClassNameCache[className]=re;}
return re;};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;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;};}
var testElement=function(node,method){return node&&node.nodeType==1&&(!method||method(node));};YAHOO.util.Dom={get:function(el){if(el&&(el.tagName||el.item)){return el;}
if(YAHOO.lang.isString(el)||!el){return document.getElementById(el);}
if(el.length!==undefined){var c=[];for(var i=0,len=el.length;i<len;++i){c[c.length]=Y.Dom.get(el[i]);}
return c;}
return el;},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!=el.ownerDocument.body){return false;}
return getXY(el);};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){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none')&&el!=document.body){return false;}
var region=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,apply){tag=tag||'*';root=(root)?Y.Dom.get(root):null||document;if(!root){return[];}
var nodes=[],elements=root.getElementsByTagName(tag),re=getClassRegEx(className);for(var i=0,len=elements.length;i<len;++i){if(re.test(elements[i].className)){nodes[nodes.length]=elements[i];if(apply){apply.call(elements[i],elements[i]);}}}
return nodes;},hasClass:function(el,className){var re=getClassRegEx(className);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 false;}
el.className=YAHOO.lang.trim([el.className,className].join(' '));return true;};return Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=getClassRegEx(className);var f=function(el){if(!this.hasClass(el,className)){return false;}
var c=el.className;el.className=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}
el.className=YAHOO.lang.trim(el.className);return true;};return Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(!newClassName||oldClassName===newClassName){return false;}
var re=getClassRegEx(oldClassName);var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return true;}
el.className=el.className.replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}
el.className=YAHOO.lang.trim(el.className);return true;};return Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';var f=function(el){if(el&&el.id){return el.id;}
var id=prefix+id_counter++;if(el){el.id=id;}
return id;};return Y.Dom.batch(el,f,Y.Dom,true)||f.apply(Y.Dom,arguments);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);needle=Y.Dom.get(needle);if(!haystack||!needle){return false;}
if(haystack.contains&&needle.nodeType&&!isSafari){return haystack.contains(needle);}
else if(haystack.compareDocumentPosition&&needle.nodeType){return!!(haystack.compareDocumentPosition(needle)&16);}else if(needle.nodeType){return!!this.getAncestorBy(needle,function(el){return el==haystack;});}
return false;},inDocument:function(el){return this.isAncestor(document.documentElement,el);},getElementsBy:function(method,tag,root,apply){tag=tag||'*';root=(root)?Y.Dom.get(root):null||document;if(!root){return[];}
var nodes=[],elements=root.getElementsByTagName(tag);for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];if(apply){apply(elements[i]);}}}
return nodes;},batch:function(el,method,o,override){el=(el&&(el.tagName||el.item))?el:Y.Dom.get(el);if(!el||!method){return false;}
var scope=(override)?o:window;if(el.tagName||el.length===undefined){return method.call(scope,el,o);}
var collection=[];for(var i=0,len=el.length;i<len;++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;},getAncestorBy:function(node,method){while(node=node.parentNode){if(testElement(node,method)){return node;}}
return null;},getAncestorByClassName:function(node,className){node=Y.Dom.get(node);if(!node){return null;}
var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getAncestorBy(node,method);},getAncestorByTagName:function(node,tagName){node=Y.Dom.get(node);if(!node){return null;}
var method=function(el){return el.tagName&&el.tagName.toUpperCase()==tagName.toUpperCase();};return Y.Dom.getAncestorBy(node,method);},getPreviousSiblingBy:function(node,method){while(node){node=node.previousSibling;if(testElement(node,method)){return node;}}
return null;},getPreviousSibling:function(node){node=Y.Dom.get(node);if(!node){return null;}
return Y.Dom.getPreviousSiblingBy(node);},getNextSiblingBy:function(node,method){while(node){node=node.nextSibling;if(testElement(node,method)){return node;}}
return null;},getNextSibling:function(node){node=Y.Dom.get(node);if(!node){return null;}
return Y.Dom.getNextSiblingBy(node);},getFirstChildBy:function(node,method){var child=(testElement(node.firstChild,method))?node.firstChild:null;return child||Y.Dom.getNextSiblingBy(node.firstChild,method);},getFirstChild:function(node,method){node=Y.Dom.get(node);if(!node){return null;}
return Y.Dom.getFirstChildBy(node);},getLastChildBy:function(node,method){if(!node){return null;}
var child=(testElement(node.lastChild,method))?node.lastChild:null;return child||Y.Dom.getPreviousSiblingBy(node.lastChild,method);},getLastChild:function(node){node=Y.Dom.get(node);return Y.Dom.getLastChildBy(node);},getChildrenBy:function(node,method){var child=Y.Dom.getFirstChildBy(node,method);var children=child?[child]:[];Y.Dom.getNextSiblingBy(child,function(node){if(!method||method(node)){children[children.length]=node;}
return false;});return children;},getChildren:function(node){node=Y.Dom.get(node);if(!node){}
return Y.Dom.getChildrenBy(node);},getDocumentScrollLeft:function(doc){doc=doc||document;return Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);},getDocumentScrollTop:function(doc){doc=doc||document;return Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);},insertBefore:function(newNode,referenceNode){newNode=Y.Dom.get(newNode);referenceNode=Y.Dom.get(referenceNode);if(!newNode||!referenceNode||!referenceNode.parentNode){return null;}
return referenceNode.parentNode.insertBefore(newNode,referenceNode);},insertAfter:function(newNode,referenceNode){newNode=Y.Dom.get(newNode);referenceNode=Y.Dom.get(referenceNode);if(!newNode||!referenceNode||!referenceNode.parentNode){return null;}
if(referenceNode.nextSibling){return referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling);}else{return referenceNode.parentNode.appendChild(newNode);}},getClientRegion:function(){var t=Y.Dom.getDocumentScrollTop(),l=Y.Dom.getDocumentScrollLeft(),r=Y.Dom.getViewportWidth()+l,b=Y.Dom.getViewportHeight()+t;return new Y.Region(t,r,b,l);}};var getXY=function(){if(document.documentElement.getBoundingClientRect){return function(el){var box=el.getBoundingClientRect();var rootNode=el.ownerDocument;return[box.left+Y.Dom.getDocumentScrollLeft(rootNode),box.top+
Y.Dom.getDocumentScrollTop(rootNode)];};}else{return function(el){var pos=[el.offsetLeft,el.offsetTop];var parentNode=el.offsetParent;var accountForBody=(isSafari&&Y.Dom.getStyle(el,'position')=='absolute'&&el.offsetParent==el.ownerDocument.body);if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if(!accountForBody&&isSafari&&Y.Dom.getStyle(parentNode,'position')=='absolute'){accountForBody=true;}
parentNode=parentNode.offsetParent;}}
if(accountForBody){pos[0]-=el.ownerDocument.body.offsetLeft;pos[1]-=el.ownerDocument.body.offsetTop;}
parentNode=el.parentNode;while(parentNode.tagName&&!patterns.ROOT_TAG.test(parentNode.tagName))
{if(Y.Dom.getStyle(parentNode,'display').search(/^inline|table-row.*$/i)){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
parentNode=parentNode.parentNode;}
return pos;};}}()})();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(YAHOO.lang.isArray(x)){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.4.1",build:"742"});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);}
this.lastError=null;};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,rebuild=false;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}
if(!this.silent){}
for(i=0;i<len;++i){var s=this.subscribers[i];if(!s){rebuild=true;}else{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];}
try{ret=s.fn.call(scope,param,s.obj);}catch(e){this.lastError=e;}}else{try{ret=s.fn.call(scope,this.type,args,s.obj);}catch(ex){this.lastError=ex;}}
if(false===ret){if(!this.silent){}
return false;}}}
if(rebuild){var newlist=[],subs=this.subscribers;for(i=0,len=subs.length;i<len;i=i+1){newlist.push(subs[i]);}
this.subscribers=newlist;}
return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}
this.subscribers=[];return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}
this.subscribers[index]=null;},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=YAHOO.lang.isUndefined(obj)?null:obj;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 listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var webkitKeymap={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,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,checkContent){var a=(YAHOO.lang.isString(p_id))?[p_id]:p_id;for(var i=0;i<a.length;i=i+1){onAvailStack.push({id:a[i],fn:p_fn,obj:p_obj,override:p_override,checkReady:checkContent});}
retryCount=this.POLL_RETRYS;this.startInterval();},onContentReady:function(p_id,p_fn,p_obj,p_override){this.onAvailable(p_id,p_fn,p_obj,p_override,true);},onDOMReady:function(p_fn,p_obj,p_override){if(this.DOMReady){setTimeout(function(){var s=window;if(p_override){if(p_override===true){s=p_obj;}else{s=p_override;}}
p_fn.call(s,"DOMReady",[],p_obj);},0);}else{this.DOMReadyEvent.subscribe(p_fn,p_obj,p_override);}},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(YAHOO.lang.isString(el)){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,el),obj);};var li=[el,sType,fn,wrappedFn,scope,obj,override];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,li;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++){li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners[i]=null;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[i]=null;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[index]=null;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,boundEl){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){var code=ev.keyCode||ev.charCode||0;if(YAHOO.env.ua.webkit&&(code in webkitKeymap)){code=webkitKeymap[code];}
return code;},_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){try{return(o&&typeof o!=="string"&&o.length&&!o.tagName&&!o.alert&&typeof o[0]!=="undefined");}catch(ex){return false;}},elCache:{},getEl:function(id){return(typeof id==="string")?document.getElementById(id):id;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(e){if(!loadComplete){loadComplete=true;var EU=YAHOO.util.Event;EU._ready();EU._tryPreloadAttach();}},_ready:function(e){var EU=YAHOO.util.Event;if(!EU.DOMReady){EU.DOMReady=true;EU.DOMReadyEvent.fire();EU._simpleRemove(document,"DOMContentLoaded",EU._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}
if(this.isIE){if(!this.DOMReady){this.startInterval();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 oEl=(YAHOO.lang.isString(el))?this.getEl(el):el;var elListeners=this.getListeners(oEl,sType),i,len;if(elListeners){for(i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(oEl,l.type,l.fn,l.index);}}
if(recurse&&oEl&&oEl.childNodes){for(i=0,len=oEl.childNodes.length;i<len;++i){this.purgeElement(oEl.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];}
var oEl=(YAHOO.lang.isString(el))?this.getEl(el):el;for(var j=0;j<searchLists.length;j=j+1){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]===oEl&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.OVERRIDE],scope: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.UNLOAD_OBJ];}else{scope=l[EU.ADJ_SCOPE];}}
l[EU.FN].call(scope,EU.getEvent(e,l[EU.EL]),l[EU.UNLOAD_OBJ]);unloadListeners[i]=null;l=null;scope=null;}}
unloadListeners=null;if(YAHOO.env.ua.ie&&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--;}
l=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){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);EU._dri=setInterval(function(){var n=document.createElement('p');try{n.doScroll('left');clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){n=null;}},EU.POLL_INTERVAL);}else if(EU.webkit){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=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 evts=this.__yui_events;if(p_type){var ce=evts[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}}else{var ret=true;for(var i in evts){if(YAHOO.lang.hasOwnProperty(evts,i)){ret=ret&&evts[i].unsubscribe(p_fn,p_obj);}}
return ret;}
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);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){return null;}
var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}
return ce.fire.apply(ce,args);},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;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.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.4.1",build:"742"});(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner);}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE);},checkNumber:function(val){return(!isNaN(val));},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value);}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner);}
this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}},getConfig:function(){var cfg={},prop,property;for(prop in this.config){property=this.config[prop];if(property&&property.event){cfg[prop]=property.value;}}
return cfg;},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value;}else{return undefined;}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true;}}else{return false;}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value]);}
return true;}}else{return false;}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false;}else{if(!Lang.isUndefined(value)){property.value=value;}else{value=property.value;}
foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break;}}}
if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value]);}}
if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break;}}}}}
return true;}else{return false;}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key);}else{this.fireEvent(key,property.value);}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey];}}
this.initialConfig=oConfig;}
for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey]);}}},refresh:function(){var prop;for(prop in this.config){this.refireEvent(prop);}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.fireEvent(key,value);}}
this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override);}
return true;}else{return false;}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj);}else{return false;}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]";}
return output;},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", ";}}
return output;},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null;}}
this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true;}}
while(i--);}
return false;};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider);}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,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;},subtract:function(date,field,amount){return this.add(date,field,(amount*-1));},before:function(date,compareTo){var ms=compareTo.getTime();if(date.getTime()<ms){return true;}else{return false;}},after:function(date,compareTo){var ms=compareTo.getTime();if(date.getTime()>ms){return true;}else{return false;}},between:function(date,dateBegin,dateEnd){if(this.after(date,dateBegin)&&this.before(date,dateEnd)){return true;}else{return false;}},getJan1:function(calendarYear){return this.getDate(calendarYear,0,1);},getDayOffset:function(date,calendarYear){var beginYear=this.getJan1(calendarYear);var dayOffset=Math.ceil((date.getTime()-beginYear.getTime())/this.ONE_DAY_MS);return dayOffset;},getWeekNumber:function(date,calendarYear){date=this.clearTime(date);var nearestThurs=new Date(date.getTime()+(4*this.ONE_DAY_MS)-((date.getDay())*this.ONE_DAY_MS));var jan1=this.getDate(nearestThurs.getFullYear(),0,1);var dayOfYear=((nearestThurs.getTime()-jan1.getTime())/this.ONE_DAY_MS)-1;var weekNum=Math.ceil((dayOfYear)/7);return weekNum;},isYearOverlapWeek:function(weekBeginDate){var overlaps=false;var nextWeek=this.add(weekBeginDate,this.DAY,6);if(nextWeek.getFullYear()!=weekBeginDate.getFullYear()){overlaps=true;}
return overlaps;},isMonthOverlapWeek:function(weekBeginDate){var overlaps=false;var nextWeek=this.add(weekBeginDate,this.DAY,6);if(nextWeek.getMonth()!=weekBeginDate.getMonth()){overlaps=true;}
return overlaps;},findMonthStart:function(date){var start=this.getDate(date.getFullYear(),date.getMonth(),1);return start;},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;},clearTime:function(date){date.setHours(12,0,0,0);return date;},getDate:function(y,m,d){var dt=null;if(YAHOO.lang.isUndefined(d)){d=1;}
if(y>=100){dt=new Date(y,m,d);}else{dt=new Date();dt.setFullYear(y);dt.setMonth(m);dt.setDate(d);dt.setHours(0,0,0,0);}
return dt;}};YAHOO.widget.Calendar=function(id,containerId,config){this.init.apply(this,arguments);};YAHOO.widget.Calendar.IMG_ROOT=null;YAHOO.widget.Calendar.DATE="D";YAHOO.widget.Calendar.MONTH_DAY="MD";YAHOO.widget.Calendar.WEEKDAY="WD";YAHOO.widget.Calendar.RANGE="R";YAHOO.widget.Calendar.MONTH="M";YAHOO.widget.Calendar.DISPLAY_DAYS=42;YAHOO.widget.Calendar.STOP_RENDER="S";YAHOO.widget.Calendar.SHORT="short";YAHOO.widget.Calendar.LONG="long";YAHOO.widget.Calendar.MEDIUM="medium";YAHOO.widget.Calendar.ONE_CHAR="1char";YAHOO.widget.Calendar._DEFAULT_CONFIG={PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},OUT_OF_MONTH_SELECT:{key:"out_of_month_select",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""},NAV:{key:"navigator",value:null}};YAHOO.widget.Calendar._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",RESET:"reset",CLEAR:"clear",BEFORE_HIDE:"beforeHide",HIDE:"hide",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE_NAV:"beforeHideNav",HIDE_NAV:"hideNav",BEFORE_SHOW_NAV:"beforeShowNav",SHOW_NAV:"showNav",BEFORE_RENDER_NAV:"beforeRenderNav",RENDER_NAV:"renderNav"};YAHOO.widget.Calendar._STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_NAV:"calnav",CSS_CLOSE:"calclose",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"};YAHOO.widget.Calendar.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,containerId:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,oNavigator:null,_selectedDates:null,domEventMap:null,_parseArgs:function(args){var nArgs={id:null,container:null,config:null};if(args&&args.length&&args.length>0){switch(args.length){case 1:nArgs.id=null;nArgs.container=args[0];nArgs.config=null;break;case 2:if(YAHOO.lang.isObject(args[1])&&!args[1].tagName&&!(args[1]instanceof String)){nArgs.id=null;nArgs.container=args[0];nArgs.config=args[1];}else{nArgs.id=args[0];nArgs.container=args[1];nArgs.config=null;}
break;default:nArgs.id=args[0];nArgs.container=args[1];nArgs.config=args[2];break;}}else{}
return nArgs;},init:function(id,container,config){var nArgs=this._parseArgs(arguments);id=nArgs.id;container=nArgs.container;config=nArgs.config;this.oDomContainer=YAHOO.util.Dom.get(container);if(!this.oDomContainer.id){this.oDomContainer.id=YAHOO.util.Dom.generateId();}
if(!id){id=this.oDomContainer.id+"_t";}
this.id=id;this.containerId=this.oDomContainer.id;this.initEvents();this.today=new Date();YAHOO.widget.DateMath.clearTime(this.today);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(config){this.cfg.applyConfig(config,true);}
this.cfg.fireQueue();},configIframe:function(type,args,obj){var useIframe=args[0];if(!this.parent){if(YAHOO.util.Dom.inDocument(this.oDomContainer)){if(useIframe){var pos=YAHOO.util.Dom.getStyle(this.oDomContainer,"position");if(pos=="absolute"||pos=="relative"){if(!YAHOO.util.Dom.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){YAHOO.util.Dom.addClass(this.iframe,"fixedsize");}
this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild);}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe);}
this.iframe=null;}}}}},configTitle:function(type,args,obj){var title=args[0];if(title){this.createTitleBar(title);}else{var close=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);if(!close){this.removeTitleBar();}else{this.createTitleBar("&#160;");}}},configClose:function(type,args,obj){var close=args[0],title=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);if(close){if(!title){this.createTitleBar("&#160;");}
this.createCloseButton();}else{this.removeCloseButton();if(!title){this.removeTitleBar();}}},initEvents:function(){var defEvents=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);this.selectEvent=new YAHOO.util.CustomEvent(defEvents.SELECT);this.beforeDeselectEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);this.deselectEvent=new YAHOO.util.CustomEvent(defEvents.DESELECT);this.changePageEvent=new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);this.beforeRenderEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);this.renderEvent=new YAHOO.util.CustomEvent(defEvents.RENDER);this.resetEvent=new YAHOO.util.CustomEvent(defEvents.RESET);this.clearEvent=new YAHOO.util.CustomEvent(defEvents.CLEAR);this.beforeShowEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW);this.showEvent=new YAHOO.util.CustomEvent(defEvents.SHOW);this.beforeHideEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE);this.hideEvent=new YAHOO.util.CustomEvent(defEvents.HIDE);this.beforeShowNavEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW_NAV);this.showNavEvent=new YAHOO.util.CustomEvent(defEvents.SHOW_NAV);this.beforeHideNavEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE_NAV);this.hideNavEvent=new YAHOO.util.CustomEvent(defEvents.HIDE_NAV);this.beforeRenderNavEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER_NAV);this.renderNavEvent=new YAHOO.util.CustomEvent(defEvents.RENDER_NAV);this.beforeSelectEvent.subscribe(this.onBeforeSelect,this,true);this.selectEvent.subscribe(this.onSelect,this,true);this.beforeDeselectEvent.subscribe(this.onBeforeDeselect,this,true);this.deselectEvent.subscribe(this.onDeselect,this,true);this.changePageEvent.subscribe(this.onChangePage,this,true);this.renderEvent.subscribe(this.onRender,this,true);this.resetEvent.subscribe(this.onReset,this,true);this.clearEvent.subscribe(this.onClear,this,true);},doSelectCell:function(e,cal){var cell,index,d,date;var target=YAHOO.util.Event.getTarget(e);var tagName=target.tagName.toLowerCase();var defSelector=false;while(tagName!="td"&&!YAHOO.util.Dom.hasClass(target,cal.Style.CSS_CELL_SELECTABLE)){if(!defSelector&&tagName=="a"&&YAHOO.util.Dom.hasClass(target,cal.Style.CSS_CELL_SELECTOR)){defSelector=true;}
target=target.parentNode;tagName=target.tagName.toLowerCase();if(tagName=="html"){return;}}
if(defSelector){YAHOO.util.Event.preventDefault(e);}
cell=target;if(YAHOO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_SELECTABLE)){index=cell.id.split("cell")[1];d=cal.cellDates[index];date=YAHOO.widget.DateMath.getDate(d[0],d[1]-1,d[2]);var link;if(cal.Options.MULTI_SELECT){link=cell.getElementsByTagName("a")[0];if(link){link.blur();}
var cellDate=cal.cellDates[index];var cellDateIndex=cal._indexOfSelectedFieldArray(cellDate);if(cellDateIndex>-1){cal.deselectCell(index);}else{cal.selectCell(index);}}else{link=cell.getElementsByTagName("a")[0];if(link){link.blur();}
cal.selectCell(index);}}},doCellMouseOver:function(e,cal){var target;if(e){target=YAHOO.util.Event.getTarget(e);}else{target=this;}
while(target.tagName&&target.tagName.toLowerCase()!="td"){target=target.parentNode;if(!target.tagName||target.tagName.toLowerCase()=="html"){return;}}
if(YAHOO.util.Dom.hasClass(target,cal.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.addClass(target,cal.Style.CSS_CELL_HOVER);}},doCellMouseOut:function(e,cal){var target;if(e){target=YAHOO.util.Event.getTarget(e);}else{target=this;}
while(target.tagName&&target.tagName.toLowerCase()!="td"){target=target.parentNode;if(!target.tagName||target.tagName.toLowerCase()=="html"){return;}}
if(YAHOO.util.Dom.hasClass(target,cal.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.removeClass(target,cal.Style.CSS_CELL_HOVER);}},setupConfig:function(){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.addProperty(defCfg.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(defCfg.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(defCfg.TITLE.key,{value:defCfg.TITLE.value,handler:this.configTitle});this.cfg.addProperty(defCfg.CLOSE.key,{value:defCfg.CLOSE.value,handler:this.configClose});this.cfg.addProperty(defCfg.IFRAME.key,{value:defCfg.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.MINDATE.key,{value:defCfg.MINDATE.value,handler:this.configMinDate});this.cfg.addProperty(defCfg.MAXDATE.key,{value:defCfg.MAXDATE.value,handler:this.configMaxDate});this.cfg.addProperty(defCfg.MULTI_SELECT.key,{value:defCfg.MULTI_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.START_WEEKDAY.key,{value:defCfg.START_WEEKDAY.value,handler:this.configOptions,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,{value:defCfg.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{value:defCfg.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{value:defCfg.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{value:defCfg.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.OUT_OF_MONTH_SELECT.key,{value:defCfg.OUT_OF_MONTH_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,{value:defCfg.NAV_ARROW_LEFT.value,handler:this.configOptions});this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,{value:defCfg.NAV_ARROW_RIGHT.value,handler:this.configOptions});this.cfg.addProperty(defCfg.MONTHS_SHORT.key,{value:defCfg.MONTHS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(defCfg.MONTHS_LONG.key,{value:defCfg.MONTHS_LONG.value,handler:this.configLocale});this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,{value:defCfg.WEEKDAYS_1CHAR.value,handler:this.configLocale});this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,{value:defCfg.WEEKDAYS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,{value:defCfg.WEEKDAYS_MEDIUM.value,handler:this.configLocale});this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,{value:defCfg.WEEKDAYS_LONG.value,handler:this.configLocale});var refreshLocale=function(){this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);};this.cfg.subscribeToConfigEvent(defCfg.START_WEEKDAY.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.MONTHS_SHORT.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.MONTHS_LONG.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_1CHAR.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_SHORT.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_MEDIUM.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_LONG.key,refreshLocale,this,true);this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,{value:defCfg.LOCALE_MONTHS.value,handler:this.configLocaleValues});this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,{value:defCfg.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});this.cfg.addProperty(defCfg.DATE_DELIMITER.key,{value:defCfg.DATE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{value:defCfg.DATE_FIELD_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{value:defCfg.DATE_RANGE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,{value:defCfg.MY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,{value:defCfg.MY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,{value:defCfg.MD_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,{value:defCfg.MD_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,{value:defCfg.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,{value:defCfg.MDY_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,{value:defCfg.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,{value:defCfg.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,{value:defCfg.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,{value:defCfg.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key,{value:defCfg.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(defCfg.NAV.key,{value:defCfg.NAV.value,handler:this.configNavigator});},configPageDate:function(type,args,obj){this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key,this._parsePageDate(args[0]),true);},configMinDate:function(type,args,obj){var val=args[0];if(YAHOO.lang.isString(val)){val=this._parseDate(val);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key,YAHOO.widget.DateMath.getDate(val[0],(val[1]-1),val[2]));}},configMaxDate:function(type,args,obj){var val=args[0];if(YAHOO.lang.isString(val)){val=this._parseDate(val);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key,YAHOO.widget.DateMath.getDate(val[0],(val[1]-1),val[2]));}},configSelected:function(type,args,obj){var selected=args[0];var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;if(selected){if(YAHOO.lang.isString(selected)){this.cfg.setProperty(cfgSelected,this._parseDates(selected),true);}}
if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(cfgSelected);}},configOptions:function(type,args,obj){this.Options[type.toUpperCase()]=args[0];},configLocale:function(type,args,obj){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.Locale[type.toUpperCase()]=args[0];this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key);},configLocaleValues:function(type,args,obj){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;type=type.toLowerCase();var val=args[0];switch(type){case defCfg.LOCALE_MONTHS.key:switch(val){case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat();break;}
break;case defCfg.LOCALE_WEEKDAYS.key:switch(val){case YAHOO.widget.Calendar.ONE_CHAR:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat();break;case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat();break;case YAHOO.widget.Calendar.MEDIUM:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat();break;}
var START_WEEKDAY=this.cfg.getProperty(defCfg.START_WEEKDAY.key);if(START_WEEKDAY>0){for(var w=0;w<START_WEEKDAY;++w){this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());}}
break;}},configNavigator:function(type,args,obj){var val=args[0];if(YAHOO.widget.CalendarNavigator&&(val===true||YAHOO.lang.isObject(val))){if(!this.oNavigator){this.oNavigator=new YAHOO.widget.CalendarNavigator(this);function erase(){if(!this.pages){this.oNavigator.erase();}}
this.beforeRenderEvent.subscribe(erase,this,true);}}else{if(this.oNavigator){this.oNavigator.destroy();this.oNavigator=null;}}},initStyles:function(){var defStyle=YAHOO.widget.Calendar._STYLES;this.Style={CSS_ROW_HEADER:defStyle.CSS_ROW_HEADER,CSS_ROW_FOOTER:defStyle.CSS_ROW_FOOTER,CSS_CELL:defStyle.CSS_CELL,CSS_CELL_SELECTOR:defStyle.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:defStyle.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:defStyle.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:defStyle.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:defStyle.CSS_CELL_TODAY,CSS_CELL_OOM:defStyle.CSS_CELL_OOM,CSS_CELL_OOB:defStyle.CSS_CELL_OOB,CSS_HEADER:defStyle.CSS_HEADER,CSS_HEADER_TEXT:defStyle.CSS_HEADER_TEXT,CSS_BODY:defStyle.CSS_BODY,CSS_WEEKDAY_CELL:defStyle.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:defStyle.CSS_WEEKDAY_ROW,CSS_FOOTER:defStyle.CSS_FOOTER,CSS_CALENDAR:defStyle.CSS_CALENDAR,CSS_SINGLE:defStyle.CSS_SINGLE,CSS_CONTAINER:defStyle.CSS_CONTAINER,CSS_NAV_LEFT:defStyle.CSS_NAV_LEFT,CSS_NAV_RIGHT:defStyle.CSS_NAV_RIGHT,CSS_NAV:defStyle.CSS_NAV,CSS_CLOSE:defStyle.CSS_CLOSE,CSS_CELL_TOP:defStyle.CSS_CELL_TOP,CSS_CELL_LEFT:defStyle.CSS_CELL_LEFT,CSS_CELL_RIGHT:defStyle.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:defStyle.CSS_CELL_BOTTOM,CSS_CELL_HOVER:defStyle.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:defStyle.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:defStyle.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:defStyle.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:defStyle.CSS_CELL_HIGHLIGHT4};},buildMonthLabel:function(){var pageDate=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);var monthLabel=this.Locale.LOCALE_MONTHS[pageDate.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX;var yearLabel=pageDate.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return yearLabel+monthLabel;}else{return monthLabel+yearLabel;}},buildDayLabel:function(workingDate){return workingDate.getDate();},createTitleBar:function(strTitle){var tDiv=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");tDiv.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;tDiv.innerHTML=strTitle;this.oDomContainer.insertBefore(tDiv,this.oDomContainer.firstChild);YAHOO.util.Dom.addClass(this.oDomContainer,"withtitle");return tDiv;},removeTitleBar:function(){var tDiv=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(tDiv){YAHOO.util.Event.purgeElement(tDiv);this.oDomContainer.removeChild(tDiv);}
YAHOO.util.Dom.removeClass(this.oDomContainer,"withtitle");},createCloseButton:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,cssClose=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,DEPR_CLOSE_PATH="us/my/bn/x_d.gif";var lnk=Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0];if(!lnk){lnk=document.createElement("a");Event.addListener(lnk,"click",function(e,cal){cal.hide();Event.preventDefault(e);},this);}
lnk.href="#";lnk.className="link-close";if(YAHOO.widget.Calendar.IMG_ROOT!==null){var img=Dom.getElementsByClassName(cssClose,"img",lnk)[0]||document.createElement("img");img.src=YAHOO.widget.Calendar.IMG_ROOT+DEPR_CLOSE_PATH;img.className=cssClose;lnk.appendChild(img);}else{lnk.innerHTML='<span class="'+cssClose+' '+this.Style.CSS_CLOSE+'"></span>';}
this.oDomContainer.appendChild(lnk);return lnk;},removeCloseButton:function(){var btn=YAHOO.util.Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;if(btn){YAHOO.util.Event.purgeElement(btn);this.oDomContainer.removeChild(btn);}},renderHeader:function(html){var colSpan=7;var DEPR_NAV_LEFT="us/tr/callt.gif";var DEPR_NAV_RIGHT="us/tr/calrt.gif";var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)){colSpan+=1;}
if(this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)){colSpan+=1;}
html[html.length]="<thead>";html[html.length]="<tr>";html[html.length]='<th colspan="'+colSpan+'" class="'+this.Style.CSS_HEADER_TEXT+'">';html[html.length]='<div class="'+this.Style.CSS_HEADER+'">';var renderLeft,renderRight=false;if(this.parent){if(this.index===0){renderLeft=true;}
if(this.index==(this.parent.cfg.getProperty("pages")-1)){renderRight=true;}}else{renderLeft=true;renderRight=true;}
if(renderLeft){var leftArrow=this.cfg.getProperty(defCfg.NAV_ARROW_LEFT.key);if(leftArrow===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){leftArrow=YAHOO.widget.Calendar.IMG_ROOT+DEPR_NAV_LEFT;}
var leftStyle=(leftArrow===null)?"":' style="background-image:url('+leftArrow+')"';html[html.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+leftStyle+' >&#160;</a>';}
var lbl=this.buildMonthLabel();var cal=this.parent||this;if(cal.cfg.getProperty("navigator")){lbl="<a class=\""+this.Style.CSS_NAV+"\" href=\"#\">"+lbl+"</a>";}
html[html.length]=lbl;if(renderRight){var rightArrow=this.cfg.getProperty(defCfg.NAV_ARROW_RIGHT.key);if(rightArrow===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){rightArrow=YAHOO.widget.Calendar.IMG_ROOT+DEPR_NAV_RIGHT;}
var rightStyle=(rightArrow===null)?"":' style="background-image:url('+rightArrow+')"';html[html.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+rightStyle+' >&#160;</a>';}
html[html.length]='</div>\n</th>\n</tr>';if(this.cfg.getProperty(defCfg.SHOW_WEEKDAYS.key)){html=this.buildWeekdays(html);}
html[html.length]='</thead>';return html;},buildWeekdays:function(html){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;html[html.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">';if(this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)){html[html.length]='<th>&#160;</th>';}
for(var i=0;i<this.Locale.LOCALE_WEEKDAYS.length;++i){html[html.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[i]+'</th>';}
if(this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)){html[html.length]='<th>&#160;</th>';}
html[html.length]='</tr>';return html;},renderBody:function(workingDate,html){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;var startDay=this.cfg.getProperty(defCfg.START_WEEKDAY.key);this.preMonthDays=workingDate.getDay();if(startDay>0){this.preMonthDays-=startDay;}
if(this.preMonthDays<0){this.preMonthDays+=7;}
this.monthDays=YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();this.postMonthDays=YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;workingDate=YAHOO.widget.DateMath.subtract(workingDate,YAHOO.widget.DateMath.DAY,this.preMonthDays);var weekNum,weekClass;var weekPrefix="w";var cellPrefix="_cell";var workingDayPrefix="wd";var dayPrefix="d";var cellRenderers;var renderer;var todayYear=this.today.getFullYear();var todayMonth=this.today.getMonth();var todayDate=this.today.getDate();var useDate=this.cfg.getProperty(defCfg.PAGEDATE.key);var hideBlankWeeks=this.cfg.getProperty(defCfg.HIDE_BLANK_WEEKS.key);var showWeekFooter=this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key);var showWeekHeader=this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key);var mindate=this.cfg.getProperty(defCfg.MINDATE.key);var maxdate=this.cfg.getProperty(defCfg.MAXDATE.key);var outOfMonthSelect=this.cfg.getProperty(defCfg.OUT_OF_MONTH_SELECT.key);if(mindate){mindate=YAHOO.widget.DateMath.clearTime(mindate);}
if(maxdate){maxdate=YAHOO.widget.DateMath.clearTime(maxdate);}
html[html.length]='<tbody class="m'+(useDate.getMonth()+1)+' '+this.Style.CSS_BODY+'">';var i=0;var tempDiv=document.createElement("div");var cell=document.createElement("td");tempDiv.appendChild(cell);var cal=this.parent||this;for(var r=0;r<6;r++){weekNum=YAHOO.widget.DateMath.getWeekNumber(workingDate,useDate.getFullYear(),startDay);weekClass=weekPrefix+weekNum;if(r!==0&&hideBlankWeeks===true&&workingDate.getMonth()!=useDate.getMonth()&&!outOfMonthSelect){break;}else{html[html.length]='<tr class="'+weekClass+'">';if(showWeekHeader){html=this.renderRowHeader(weekNum,html);}
for(var d=0;d<7;d++){cellRenderers=[];this.clearElement(cell);cell.className=this.Style.CSS_CELL;cell.id=this.id+cellPrefix+i;if(workingDate.getDate()==todayDate&&workingDate.getMonth()==todayMonth&&workingDate.getFullYear()==todayYear){cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;}
var workingArray=[workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];this.cellDates[this.cellDates.length]=workingArray;if(workingDate.getMonth()!=useDate.getMonth()){if(outOfMonthSelect){cellRenderers[cellRenderers.length]=cal.renderCellStyleNotThisMonth;}else{cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;}}else{YAHOO.util.Dom.addClass(cell,workingDayPrefix+workingDate.getDay());YAHOO.util.Dom.addClass(cell,dayPrefix+workingDate.getDate());for(var s=0;s<this.renderStack.length;++s){renderer=null;var rArray=this.renderStack[s];var type=rArray[0];var month;var day;var year;switch(type){case YAHOO.widget.Calendar.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(s,1);}
break;case YAHOO.widget.Calendar.MONTH_DAY:month=rArray[1][0];day=rArray[1][1];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day){renderer=rArray[2];this.renderStack.splice(s,1);}
break;case YAHOO.widget.Calendar.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=YAHOO.widget.DateMath.getDate(d1year,d1month-1,d1day);var d2month=date2[1];var d2day=date2[2];var d2year=date2[0];var d2=YAHOO.widget.DateMath.getDate(d2year,d2month-1,d2day);if(workingDate.getTime()>=d1.getTime()&&workingDate.getTime()<=d2.getTime()){renderer=rArray[2];if(workingDate.getTime()==d2.getTime()){this.renderStack.splice(s,1);}}
break;case YAHOO.widget.Calendar.WEEKDAY:var weekday=rArray[1][0];if(workingDate.getDay()+1==weekday){renderer=rArray[2];}
break;case YAHOO.widget.Calendar.MONTH:month=rArray[1][0];if(workingDate.getMonth()+1==month){renderer=rArray[2];}
break;}
if(renderer){cellRenderers[cellRenderers.length]=renderer;}}}
if(this._indexOfSelectedFieldArray(workingArray)>-1){cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected;}
if((mindate&&(workingDate.getTime()<mindate.getTime()))||(maxdate&&(workingDate.getTime()>maxdate.getTime()))){cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate;}else{cellRenderers[cellRenderers.length]=cal.styleCellDefault;cellRenderers[cellRenderers.length]=cal.renderCellDefault;}
for(var x=0;x<cellRenderers.length;++x){if(cellRenderers[x].call(cal,workingDate,cell)==YAHOO.widget.Calendar.STOP_RENDER){break;}}
workingDate.setTime(workingDate.getTime()+YAHOO.widget.DateMath.ONE_DAY_MS);if(i>=0&&i<=6){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_TOP);}
if((i%7)===0){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_LEFT);}
if(((i+1)%7)===0){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_RIGHT);}
var postDays=this.postMonthDays;if(hideBlankWeeks&&postDays>=7){var blankWeeks=Math.floor(postDays/7);for(var p=0;p<blankWeeks;++p){postDays-=7;}}
if(i>=((this.preMonthDays+postDays+this.monthDays)-7)){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_BOTTOM);}
html[html.length]=tempDiv.innerHTML;i++;}
if(showWeekFooter){html=this.renderRowFooter(weekNum,html);}
html[html.length]='</tr>';}}
html[html.length]='</tbody>';return html;},renderFooter:function(html){return html;},render:function(){this.beforeRenderEvent.fire();var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;var workingDate=YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(defCfg.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;YAHOO.util.Event.purgeElement(this.oDomContainer,true);var html=[];html[html.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+' y'+workingDate.getFullYear()+'" id="'+this.id+'">';html=this.renderHeader(html);html=this.renderBody(workingDate,html);html=this.renderFooter(html);html[html.length]='</table>';this.oDomContainer.innerHTML=html.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(defCfg.TITLE.key);this.cfg.refireEvent(defCfg.CLOSE.key);this.cfg.refireEvent(defCfg.IFRAME.key);this.renderEvent.fire();},applyListeners:function(){var root=this.oDomContainer;var cal=this.parent||this;var anchor="a";var mousedown="mousedown";var linkLeft=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT,anchor,root);var linkRight=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT,anchor,root);if(linkLeft&&linkLeft.length>0){this.linkLeft=linkLeft[0];YAHOO.util.Event.addListener(this.linkLeft,mousedown,cal.previousMonth,cal,true);}
if(linkRight&&linkRight.length>0){this.linkRight=linkRight[0];YAHOO.util.Event.addListener(this.linkRight,mousedown,cal.nextMonth,cal,true);}
if(cal.cfg.getProperty("navigator")!==null){this.applyNavListeners();}
if(this.domEventMap){var el,elements;for(var cls in this.domEventMap){if(YAHOO.lang.hasOwnProperty(this.domEventMap,cls)){var items=this.domEventMap[cls];if(!(items instanceof Array)){items=[items];}
for(var i=0;i<items.length;i++){var item=items[i];elements=YAHOO.util.Dom.getElementsByClassName(cls,item.tag,this.oDomContainer);for(var c=0;c<elements.length;c++){el=elements[c];YAHOO.util.Event.addListener(el,item.event,item.handler,item.scope,item.correct);}}}}}
YAHOO.util.Event.addListener(this.oDomContainer,"click",this.doSelectCell,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this);},applyNavListeners:function(){var E=YAHOO.util.Event;var calParent=this.parent||this;var cal=this;var navBtns=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV,"a",this.oDomContainer);if(navBtns.length>0){function show(e,obj){var target=E.getTarget(e);if(this===target||YAHOO.util.Dom.isAncestor(this,target)){E.preventDefault(e);}
var navigator=calParent.oNavigator;if(navigator){var pgdate=cal.cfg.getProperty("pagedate");navigator.setYear(pgdate.getFullYear());navigator.setMonth(pgdate.getMonth());navigator.show();}}
E.addListener(navBtns,"click",show);}},getDateByCellId:function(id){var date=this.getDateFieldsByCellId(id);return YAHOO.widget.DateMath.getDate(date[0],date[1]-1,date[2]);},getDateFieldsByCellId:function(id){id=id.toLowerCase().split("_cell")[1];id=parseInt(id,10);return this.cellDates[id];},getCellIndex:function(date){var idx=-1;if(date){var m=date.getMonth(),y=date.getFullYear(),d=date.getDate(),dates=this.cellDates;for(var i=0;i<dates.length;++i){var cellDate=dates[i];if(cellDate[0]===y&&cellDate[1]===m+1&&cellDate[2]===d){idx=i;break;}}}
return idx;},renderOutOfBoundsDate:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOB);cell.innerHTML=workingDate.getDate();return YAHOO.widget.Calendar.STOP_RENDER;},renderRowHeader:function(weekNum,html){html[html.length]='<th class="calrowhead">'+weekNum+'</th>';return html;},renderRowFooter:function(weekNum,html){html[html.length]='<th class="calrowfoot">'+weekNum+'</th>';return html;},renderCellDefault:function(workingDate,cell){cell.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(workingDate)+"</a>";},styleCellDefault:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_SELECTABLE);},renderCellStyleHighlight1:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT1);},renderCellStyleHighlight2:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT2);},renderCellStyleHighlight3:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT3);},renderCellStyleHighlight4:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT4);},renderCellStyleToday:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_TODAY);},renderCellStyleNotThisMonth:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOM);},renderCellStyleSelected:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_SELECTED);},renderCellNotThisMonth:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOM);cell.innerHTML=workingDate.getDate();return YAHOO.widget.Calendar.STOP_RENDER;},renderBodyCellRestricted:function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL);YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_RESTRICTED);cell.innerHTML=workingDate.getDate();return YAHOO.widget.Calendar.STOP_RENDER;},addMonths:function(count){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(cfgPageDate,YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate),YAHOO.widget.DateMath.MONTH,count));this.resetRenderers();this.changePageEvent.fire();},subtractMonths:function(count){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(cfgPageDate,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate),YAHOO.widget.DateMath.MONTH,count));this.resetRenderers();this.changePageEvent.fire();},addYears:function(count){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(cfgPageDate,YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate),YAHOO.widget.DateMath.YEAR,count));this.resetRenderers();this.changePageEvent.fire();},subtractYears:function(count){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(cfgPageDate,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate),YAHOO.widget.DateMath.YEAR,count));this.resetRenderers();this.changePageEvent.fire();},nextMonth:function(){this.addMonths(1);},previousMonth:function(){this.subtractMonths(1);},nextYear:function(){this.addYears(1);},previousYear:function(){this.subtractYears(1);},reset:function(){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.resetProperty(defCfg.SELECTED.key);this.cfg.resetProperty(defCfg.PAGEDATE.key);this.resetEvent.fire();},clear:function(){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.setProperty(defCfg.SELECTED.key,[]);this.cfg.setProperty(defCfg.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();},select:function(date){var aToBeSelected=this._toFieldArray(date);var validDates=[];var selected=[];var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var a=0;a<aToBeSelected.length;++a){var toSelect=aToBeSelected[a];if(!this.isDateOOB(this._toDate(toSelect))){if(validDates.length===0){this.beforeSelectEvent.fire();selected=this.cfg.getProperty(cfgSelected);}
validDates.push(toSelect);if(this._indexOfSelectedFieldArray(toSelect)==-1){selected[selected.length]=toSelect;}}}
if(validDates.length>0){if(this.parent){this.parent.cfg.setProperty(cfgSelected,selected);}else{this.cfg.setProperty(cfgSelected,selected);}
this.selectEvent.fire(validDates);}
return this.getSelectedDates();},selectCell:function(cellIndex){var cell=this.cells[cellIndex];var cellDate=this.cellDates[cellIndex];var dCellDate=this._toDate(cellDate);var selectable=YAHOO.util.Dom.hasClass(cell,this.Style.CSS_CELL_SELECTABLE);if(selectable){this.beforeSelectEvent.fire();var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var selected=this.cfg.getProperty(cfgSelected);var selectDate=cellDate.concat();if(this._indexOfSelectedFieldArray(selectDate)==-1){selected[selected.length]=selectDate;}
if(this.parent){this.parent.cfg.setProperty(cfgSelected,selected);}else{this.cfg.setProperty(cfgSelected,selected);}
this.renderCellStyleSelected(dCellDate,cell);this.selectEvent.fire([selectDate]);this.doCellMouseOut.call(cell,null,this);}
return this.getSelectedDates();},deselect:function(date){var aToBeDeselected=this._toFieldArray(date);var validDates=[];var selected=[];var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var a=0;a<aToBeDeselected.length;++a){var toDeselect=aToBeDeselected[a];if(!this.isDateOOB(this._toDate(toDeselect))){if(validDates.length===0){this.beforeDeselectEvent.fire();selected=this.cfg.getProperty(cfgSelected);}
validDates.push(toDeselect);var index=this._indexOfSelectedFieldArray(toDeselect);if(index!=-1){selected.splice(index,1);}}}
if(validDates.length>0){if(this.parent){this.parent.cfg.setProperty(cfgSelected,selected);}else{this.cfg.setProperty(cfgSelected,selected);}
this.deselectEvent.fire(validDates);}
return this.getSelectedDates();},deselectCell:function(cellIndex){var cell=this.cells[cellIndex];var cellDate=this.cellDates[cellIndex];var cellDateIndex=this._indexOfSelectedFieldArray(cellDate);var selectable=YAHOO.util.Dom.hasClass(cell,this.Style.CSS_CELL_SELECTABLE);if(selectable){this.beforeDeselectEvent.fire();var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;var selected=this.cfg.getProperty(defCfg.SELECTED.key);var dCellDate=this._toDate(cellDate);var selectDate=cellDate.concat();if(cellDateIndex>-1){if(this.cfg.getProperty(defCfg.PAGEDATE.key).getMonth()==dCellDate.getMonth()&&this.cfg.getProperty(defCfg.PAGEDATE.key).getFullYear()==dCellDate.getFullYear()){YAHOO.util.Dom.removeClass(cell,this.Style.CSS_CELL_SELECTED);}
selected.splice(cellDateIndex,1);}
if(this.parent){this.parent.cfg.setProperty(defCfg.SELECTED.key,selected);}else{this.cfg.setProperty(defCfg.SELECTED.key,selected);}
this.deselectEvent.fire(selectDate);}
return this.getSelectedDates();},deselectAll:function(){this.beforeDeselectEvent.fire();var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var selected=this.cfg.getProperty(cfgSelected);var count=selected.length;var sel=selected.concat();if(this.parent){this.parent.cfg.setProperty(cfgSelected,[]);}else{this.cfg.setProperty(cfgSelected,[]);}
if(count>0){this.deselectEvent.fire(sel);}
return this.getSelectedDates();},_toFieldArray:function(date){var returnDate=[];if(date instanceof Date){returnDate=[[date.getFullYear(),date.getMonth()+1,date.getDate()]];}else if(YAHOO.lang.isString(date)){returnDate=this._parseDates(date);}else if(YAHOO.lang.isArray(date)){for(var i=0;i<date.length;++i){var d=date[i];returnDate[returnDate.length]=[d.getFullYear(),d.getMonth()+1,d.getDate()];}}
return returnDate;},toDate:function(dateFieldArray){return this._toDate(dateFieldArray);},_toDate:function(dateFieldArray){if(dateFieldArray instanceof Date){return dateFieldArray;}else{return YAHOO.widget.DateMath.getDate(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2]);}},_fieldArraysAreEqual:function(array1,array2){var match=false;if(array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]){match=true;}
return match;},_indexOfSelectedFieldArray:function(find){var selected=-1;var seldates=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var s=0;s<seldates.length;++s){var sArray=seldates[s];if(find[0]==sArray[0]&&find[1]==sArray[1]&&find[2]==sArray[2]){selected=s;break;}}
return selected;},isDateOOM:function(date){return(date.getMonth()!=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth());},isDateOOB:function(date){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;var minDate=this.cfg.getProperty(defCfg.MINDATE.key);var maxDate=this.cfg.getProperty(defCfg.MAXDATE.key);var dm=YAHOO.widget.DateMath;if(minDate){minDate=dm.clearTime(minDate);}
if(maxDate){maxDate=dm.clearTime(maxDate);}
var clearedDate=new Date(date.getTime());clearedDate=dm.clearTime(clearedDate);return((minDate&&clearedDate.getTime()<minDate.getTime())||(maxDate&&clearedDate.getTime()>maxDate.getTime()));},_parsePageDate:function(date){var parsedDate;var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(date){if(date instanceof Date){parsedDate=YAHOO.widget.DateMath.findMonthStart(date);}else{var month,year,aMonthYear;aMonthYear=date.split(this.cfg.getProperty(defCfg.DATE_FIELD_DELIMITER.key));month=parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_MONTH_POSITION.key)-1],10)-1;year=parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_YEAR_POSITION.key)-1],10);parsedDate=YAHOO.widget.DateMath.getDate(year,month,1);}}else{parsedDate=YAHOO.widget.DateMath.getDate(this.today.getFullYear(),this.today.getMonth(),1);}
return parsedDate;},onBeforeSelect:function(){if(this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}}},onSelect:function(selected){},onBeforeDeselect:function(){},onDeselect:function(deselected){},onChangePage:function(){this.render();},onRender:function(){},onReset:function(){this.render();},onClear:function(){this.render();},validate:function(){return true;},_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.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.DATE;}
for(var i=0;i<rArray.length;i++){rArray[i]=parseInt(rArray[i],10);}
return rArray;},_parseDates:function(sDates){var aReturn=[];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;},_parseRange:function(startDate,endDate){var dCurrent=YAHOO.widget.DateMath.add(YAHOO.widget.DateMath.getDate(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.DateMath.DAY,1);var dEnd=YAHOO.widget.DateMath.getDate(endDate[0],endDate[1]-1,endDate[2]);var results=[];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;},resetRenderers:function(){this.renderStack=this._renderStack.concat();},removeRenderers:function(){this._renderStack=[];this.renderStack=[];},clearElement:function(cell){cell.innerHTML="&#160;";cell.className="";},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.RANGE,aDate,fnRender);}else{this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,aDate,fnRender);}}else if(aDate.length==3){this._addRenderer(YAHOO.widget.Calendar.DATE,aDate,fnRender);}}},_addRenderer:function(type,aDates,fnRender){var add=[type,aDates,fnRender];this.renderStack.unshift(add);this._renderStack=this.renderStack.concat();},addMonthRenderer:function(month,fnRender){this._addRenderer(YAHOO.widget.Calendar.MONTH,[month],fnRender);},addWeekdayRenderer:function(weekday,fnRender){this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[weekday],fnRender);},clearAllBodyCellStyles:function(style){for(var c=0;c<this.cells.length;++c){YAHOO.util.Dom.removeClass(this.cells[c],style);}},setMonth:function(month){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var current=this.cfg.getProperty(cfgPageDate);current.setMonth(parseInt(month,10));this.cfg.setProperty(cfgPageDate,current);},setYear:function(year){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var current=this.cfg.getProperty(cfgPageDate);current.setFullYear(parseInt(year,10));this.cfg.setProperty(cfgPageDate,current);},getSelectedDates:function(){var returnDates=[];var selected=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var d=0;d<selected.length;++d){var dateArray=selected[d];var date=YAHOO.widget.DateMath.getDate(dateArray[0],dateArray[1]-1,dateArray[2]);returnDates.push(date);}
returnDates.sort(function(a,b){return a-b;});return returnDates;},hide:function(){if(this.beforeHideEvent.fire()){this.oDomContainer.style.display="none";this.hideEvent.fire();}},show:function(){if(this.beforeShowEvent.fire()){this.oDomContainer.style.display="block";this.showEvent.fire();}},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;}})(),toString:function(){return"Calendar "+this.id;}};YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar;YAHOO.widget.CalendarGroup=function(id,containerId,config){if(arguments.length>0){this.init.apply(this,arguments);}};YAHOO.widget.CalendarGroup.prototype={init:function(id,container,config){var nArgs=this._parseArgs(arguments);id=nArgs.id;container=nArgs.container;config=nArgs.config;this.oDomContainer=YAHOO.util.Dom.get(container);if(!this.oDomContainer.id){this.oDomContainer.id=YAHOO.util.Dom.generateId();}
if(!id){id=this.oDomContainer.id+"_t";}
this.id=id;this.containerId=this.oDomContainer.id;this.initEvents();this.initStyles();this.pages=[];YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(config){this.cfg.applyConfig(config,true);}
this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true);this.showEvent.subscribe(this._fixWidth,this,true);}},setupConfig:function(){var defCfg=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;this.cfg.addProperty(defCfg.PAGES.key,{value:defCfg.PAGES.value,validator:this.cfg.checkNumber,handler:this.configPages});this.cfg.addProperty(defCfg.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(defCfg.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(defCfg.TITLE.key,{value:defCfg.TITLE.value,handler:this.configTitle});this.cfg.addProperty(defCfg.CLOSE.key,{value:defCfg.CLOSE.value,handler:this.configClose});this.cfg.addProperty(defCfg.IFRAME.key,{value:defCfg.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.MINDATE.key,{value:defCfg.MINDATE.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.MAXDATE.key,{value:defCfg.MAXDATE.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.MULTI_SELECT.key,{value:defCfg.MULTI_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.START_WEEKDAY.key,{value:defCfg.START_WEEKDAY.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,{value:defCfg.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{value:defCfg.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{value:defCfg.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{value:defCfg.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.OUT_OF_MONTH_SELECT.key,{value:defCfg.OUT_OF_MONTH_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,{value:defCfg.NAV_ARROW_LEFT.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,{value:defCfg.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.MONTHS_SHORT.key,{value:defCfg.MONTHS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.MONTHS_LONG.key,{value:defCfg.MONTHS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,{value:defCfg.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,{value:defCfg.WEEKDAYS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,{value:defCfg.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,{value:defCfg.WEEKDAYS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,{value:defCfg.LOCALE_MONTHS.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,{value:defCfg.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.DATE_DELIMITER.key,{value:defCfg.DATE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{value:defCfg.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{value:defCfg.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,{value:defCfg.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,{value:defCfg.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,{value:defCfg.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,{value:defCfg.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,{value:defCfg.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,{value:defCfg.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,{value:defCfg.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,{value:defCfg.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,{value:defCfg.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,{value:defCfg.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key,{value:defCfg.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.NAV.key,{value:defCfg.NAV.value,handler:this.configNavigator});},initEvents:function(){var me=this;var strEvent="Event";var sub=function(fn,obj,bOverride){for(var p=0;p<me.pages.length;++p){var cal=me.pages[p];cal[this.type+strEvent].subscribe(fn,obj,bOverride);}};var unsub=function(fn,obj){for(var p=0;p<me.pages.length;++p){var cal=me.pages[p];cal[this.type+strEvent].unsubscribe(fn,obj);}};var defEvents=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);this.beforeSelectEvent.subscribe=sub;this.beforeSelectEvent.unsubscribe=unsub;this.selectEvent=new YAHOO.util.CustomEvent(defEvents.SELECT);this.selectEvent.subscribe=sub;this.selectEvent.unsubscribe=unsub;this.beforeDeselectEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);this.beforeDeselectEvent.subscribe=sub;this.beforeDeselectEvent.unsubscribe=unsub;this.deselectEvent=new YAHOO.util.CustomEvent(defEvents.DESELECT);this.deselectEvent.subscribe=sub;this.deselectEvent.unsubscribe=unsub;this.changePageEvent=new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);this.changePageEvent.subscribe=sub;this.changePageEvent.unsubscribe=unsub;this.beforeRenderEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);this.beforeRenderEvent.subscribe=sub;this.beforeRenderEvent.unsubscribe=unsub;this.renderEvent=new YAHOO.util.CustomEvent(defEvents.RENDER);this.renderEvent.subscribe=sub;this.renderEvent.unsubscribe=unsub;this.resetEvent=new YAHOO.util.CustomEvent(defEvents.RESET);this.resetEvent.subscribe=sub;this.resetEvent.unsubscribe=unsub;this.clearEvent=new YAHOO.util.CustomEvent(defEvents.CLEAR);this.clearEvent.subscribe=sub;this.clearEvent.unsubscribe=unsub;this.beforeShowEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW);this.showEvent=new YAHOO.util.CustomEvent(defEvents.SHOW);this.beforeHideEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE);this.hideEvent=new YAHOO.util.CustomEvent(defEvents.HIDE);this.beforeShowNavEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_SHOW_NAV);this.showNavEvent=new YAHOO.util.CustomEvent(defEvents.SHOW_NAV);this.beforeHideNavEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_HIDE_NAV);this.hideNavEvent=new YAHOO.util.CustomEvent(defEvents.HIDE_NAV);this.beforeRenderNavEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER_NAV);this.renderNavEvent=new YAHOO.util.CustomEvent(defEvents.RENDER_NAV);},configPages:function(type,args,obj){var pageCount=args[0];var cfgPageDate=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;var sep="_";var groupCalClass="groupcal";var firstClass="first-of-type";var lastClass="last-of-type";for(var p=0;p<pageCount;++p){var calId=this.id+sep+p;var calContainerId=this.containerId+sep+p;var childConfig=this.cfg.getConfig();childConfig.close=false;childConfig.title=false;childConfig.navigator=null;var cal=this.constructChild(calId,calContainerId,childConfig);var caldate=cal.cfg.getProperty(cfgPageDate);this._setMonthOnDate(caldate,caldate.getMonth()+p);cal.cfg.setProperty(cfgPageDate,caldate);YAHOO.util.Dom.removeClass(cal.oDomContainer,this.Style.CSS_SINGLE);YAHOO.util.Dom.addClass(cal.oDomContainer,groupCalClass);if(p===0){YAHOO.util.Dom.addClass(cal.oDomContainer,firstClass);}
if(p==(pageCount-1)){YAHOO.util.Dom.addClass(cal.oDomContainer,lastClass);}
cal.parent=this;cal.index=p;this.pages[this.pages.length]=cal;}},configPageDate:function(type,args,obj){var val=args[0];var firstPageDate;var cfgPageDate=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];if(p===0){firstPageDate=cal._parsePageDate(val);cal.cfg.setProperty(cfgPageDate,firstPageDate);}else{var pageDate=new Date(firstPageDate);this._setMonthOnDate(pageDate,pageDate.getMonth()+p);cal.cfg.setProperty(cfgPageDate,pageDate);}}},configSelected:function(type,args,obj){var cfgSelected=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;this.delegateConfig(type,args,obj);var selected=(this.pages.length>0)?this.pages[0].cfg.getProperty(cfgSelected):[];this.cfg.setProperty(cfgSelected,selected,true);},delegateConfig:function(type,args,obj){var val=args[0];var cal;for(var p=0;p<this.pages.length;p++){cal=this.pages[p];cal.cfg.setProperty(type,val);}},setChildFunction:function(fnName,fn){var pageCount=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var p=0;p<pageCount;++p){this.pages[p][fnName]=fn;}},callChildFunction:function(fnName,args){var pageCount=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var p=0;p<pageCount;++p){var page=this.pages[p];if(page[fnName]){var fn=page[fnName];fn.call(page,args);}}},constructChild:function(id,containerId,config){var container=document.getElementById(containerId);if(!container){container=document.createElement("div");container.id=containerId;this.oDomContainer.appendChild(container);}
return new YAHOO.widget.Calendar(id,containerId,config);},setMonth:function(month){month=parseInt(month,10);var currYear;var cfgPageDate=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];var pageDate=cal.cfg.getProperty(cfgPageDate);if(p===0){currYear=pageDate.getFullYear();}else{pageDate.setFullYear(currYear);}
this._setMonthOnDate(pageDate,month+p);cal.cfg.setProperty(cfgPageDate,pageDate);}},setYear:function(year){var cfgPageDate=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;year=parseInt(year,10);for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];var pageDate=cal.cfg.getProperty(cfgPageDate);if((pageDate.getMonth()+1)==1&&p>0){year+=1;}
cal.setYear(year);}},render:function(){this.renderHeader();for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.render();}
this.renderFooter();},select:function(date){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.select(date);}
return this.getSelectedDates();},selectCell:function(cellIndex){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.selectCell(cellIndex);}
return this.getSelectedDates();},deselect:function(date){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.deselect(date);}
return this.getSelectedDates();},deselectAll:function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.deselectAll();}
return this.getSelectedDates();},deselectCell:function(cellIndex){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.deselectCell(cellIndex);}
return this.getSelectedDates();},reset:function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.reset();}},clear:function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.clear();}},nextMonth:function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.nextMonth();}},previousMonth:function(){for(var p=this.pages.length-1;p>=0;--p){var cal=this.pages[p];cal.previousMonth();}},nextYear:function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.nextYear();}},previousYear:function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.previousYear();}},getSelectedDates:function(){var returnDates=[];var selected=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);for(var d=0;d<selected.length;++d){var dateArray=selected[d];var date=YAHOO.widget.DateMath.getDate(dateArray[0],dateArray[1]-1,dateArray[2]);returnDates.push(date);}
returnDates.sort(function(a,b){return a-b;});return returnDates;},addRenderer:function(sDates,fnRender){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.addRenderer(sDates,fnRender);}},addMonthRenderer:function(month,fnRender){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.addMonthRenderer(month,fnRender);}},addWeekdayRenderer:function(weekday,fnRender){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.addWeekdayRenderer(weekday,fnRender);}},removeRenderers:function(){this.callChildFunction("removeRenderers");},renderHeader:function(){},renderFooter:function(){},addMonths:function(count){this.callChildFunction("addMonths",count);},subtractMonths:function(count){this.callChildFunction("subtractMonths",count);},addYears:function(count){this.callChildFunction("addYears",count);},subtractYears:function(count){this.callChildFunction("subtractYears",count);},getCalendarPage:function(date){var cal=null;if(date){var y=date.getFullYear(),m=date.getMonth();var pages=this.pages;for(var i=0;i<pages.length;++i){var pageDate=pages[i].cfg.getProperty("pagedate");if(pageDate.getFullYear()===y&&pageDate.getMonth()===m){cal=pages[i];break;}}}
return cal;},_setMonthOnDate:function(date,iMonth){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(iMonth<0||iMonth>11)){var DM=YAHOO.widget.DateMath;var newDate=DM.add(date,DM.MONTH,iMonth-date.getMonth());date.setTime(newDate.getTime());}else{date.setMonth(iMonth);}},_fixWidth:function(){var w=0;for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];w+=cal.oDomContainer.offsetWidth;}
if(w>0){this.oDomContainer.style.width=w+"px";}},toString:function(){return"CalendarGroup "+this.id;}};YAHOO.widget.CalendarGroup.CSS_CONTAINER="yui-calcontainer";YAHOO.widget.CalendarGroup.CSS_MULTI_UP="multi";YAHOO.widget.CalendarGroup.CSS_2UPTITLE="title";YAHOO.widget.CalendarGroup.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(YAHOO.widget.CalendarGroup,YAHOO.widget.Calendar,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderCellStyleNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","configNavigator","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","show","toDate","_parseArgs","browser");YAHOO.widget.CalendarGroup._DEFAULT_CONFIG=YAHOO.widget.Calendar._DEFAULT_CONFIG;YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES={key:"pages",value:2};YAHOO.widget.CalGrp=YAHOO.widget.CalendarGroup;YAHOO.widget.Calendar2up=function(id,containerId,config){this.init(id,containerId,config);};YAHOO.extend(YAHOO.widget.Calendar2up,YAHOO.widget.CalendarGroup);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;YAHOO.widget.CalendarNavigator=function(cal){this.init(cal);};(function(){var CN=YAHOO.widget.CalendarNavigator;CN.CLASSES={NAV:"yui-cal-nav",NAV_VISIBLE:"yui-cal-nav-visible",MASK:"yui-cal-nav-mask",YEAR:"yui-cal-nav-y",MONTH:"yui-cal-nav-m",BUTTONS:"yui-cal-nav-b",BUTTON:"yui-cal-nav-btn",ERROR:"yui-cal-nav-e",YEAR_CTRL:"yui-cal-nav-yc",MONTH_CTRL:"yui-cal-nav-mc",INVALID:"yui-invalid",DEFAULT:"yui-default"};CN._DEFAULT_CFG={strings:{month:"Month",year:"Year",submit:"Okay",cancel:"Cancel",invalidYear:"Year needs to be a number"},monthFormat:YAHOO.widget.Calendar.LONG,initialFocus:"year"};CN.ID_SUFFIX="_nav";CN.MONTH_SUFFIX="_month";CN.YEAR_SUFFIX="_year";CN.ERROR_SUFFIX="_error";CN.CANCEL_SUFFIX="_cancel";CN.SUBMIT_SUFFIX="_submit";CN.YR_MAX_DIGITS=4;CN.YR_MINOR_INC=1;CN.YR_MAJOR_INC=10;CN.UPDATE_DELAY=50;CN.YR_PATTERN=/^\d+$/;CN.TRIM=/^\s*(.*?)\s*$/;})();YAHOO.widget.CalendarNavigator.prototype={id:null,cal:null,navEl:null,maskEl:null,yearEl:null,monthEl:null,errorEl:null,submitEl:null,cancelEl:null,firstCtrl:null,lastCtrl:null,_doc:null,_year:null,_month:0,__rendered:false,init:function(cal){var calBox=cal.oDomContainer;this.cal=cal;this.id=calBox.id+YAHOO.widget.CalendarNavigator.ID_SUFFIX;this._doc=calBox.ownerDocument;var ie=YAHOO.env.ua.ie;this.__isIEQuirks=(ie&&((ie<=6)||(ie===7&&this._doc.compatMode=="BackCompat")));},show:function(){var CLASSES=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeShowNavEvent.fire()){if(!this.__rendered){this.render();}
this.clearErrors();this._updateMonthUI();this._updateYearUI();this._show(this.navEl,true);this.setInitialFocus();this.showMask();YAHOO.util.Dom.addClass(this.cal.oDomContainer,CLASSES.NAV_VISIBLE);this.cal.showNavEvent.fire();}},hide:function(){var CLASSES=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeHideNavEvent.fire()){this._show(this.navEl,false);this.hideMask();YAHOO.util.Dom.removeClass(this.cal.oDomContainer,CLASSES.NAV_VISIBLE);this.cal.hideNavEvent.fire();}},showMask:function(){this._show(this.maskEl,true);if(this.__isIEQuirks){this._syncMask();}},hideMask:function(){this._show(this.maskEl,false);},getMonth:function(){return this._month;},getYear:function(){return this._year;},setMonth:function(nMonth){if(nMonth>=0&&nMonth<12){this._month=nMonth;}
this._updateMonthUI();},setYear:function(nYear){var yrPattern=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.isNumber(nYear)&&yrPattern.test(nYear+"")){this._year=nYear;}
this._updateYearUI();},render:function(){this.cal.beforeRenderNavEvent.fire();if(!this.__rendered){this.createNav();this.createMask();this.applyListeners();this.__rendered=true;}
this.cal.renderNavEvent.fire();},createNav:function(){var NAV=YAHOO.widget.CalendarNavigator;var doc=this._doc;var d=doc.createElement("div");d.className=NAV.CLASSES.NAV;var htmlBuf=this.renderNavContents([]);d.innerHTML=htmlBuf.join('');this.cal.oDomContainer.appendChild(d);this.navEl=d;this.yearEl=doc.getElementById(this.id+NAV.YEAR_SUFFIX);this.monthEl=doc.getElementById(this.id+NAV.MONTH_SUFFIX);this.errorEl=doc.getElementById(this.id+NAV.ERROR_SUFFIX);this.submitEl=doc.getElementById(this.id+NAV.SUBMIT_SUFFIX);this.cancelEl=doc.getElementById(this.id+NAV.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off");}
this._setFirstLastElements();},createMask:function(){var C=YAHOO.widget.CalendarNavigator.CLASSES;var d=this._doc.createElement("div");d.className=C.MASK;this.cal.oDomContainer.appendChild(d);this.maskEl=d;},_syncMask:function(){var c=this.cal.oDomContainer;if(c&&this.maskEl){var r=YAHOO.util.Dom.getRegion(c);YAHOO.util.Dom.setStyle(this.maskEl,"width",r.right-r.left+"px");YAHOO.util.Dom.setStyle(this.maskEl,"height",r.bottom-r.top+"px");}},renderNavContents:function(html){var NAV=YAHOO.widget.CalendarNavigator,C=NAV.CLASSES,h=html;h[h.length]='<div class="'+C.MONTH+'">';this.renderMonth(h);h[h.length]='</div>';h[h.length]='<div class="'+C.YEAR+'">';this.renderYear(h);h[h.length]='</div>';h[h.length]='<div class="'+C.BUTTONS+'">';this.renderButtons(h);h[h.length]='</div>';h[h.length]='<div class="'+C.ERROR+'" id="'+this.id+NAV.ERROR_SUFFIX+'"></div>';return h;},renderMonth:function(html){var NAV=YAHOO.widget.CalendarNavigator,C=NAV.CLASSES;var id=this.id+NAV.MONTH_SUFFIX,mf=this.__getCfg("monthFormat"),months=this.cal.cfg.getProperty((mf==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),h=html;if(months&&months.length>0){h[h.length]='<label for="'+id+'">';h[h.length]=this.__getCfg("month",true);h[h.length]='</label>';h[h.length]='<select name="'+id+'" id="'+id+'" class="'+C.MONTH_CTRL+'">';for(var i=0;i<months.length;i++){h[h.length]='<option value="'+i+'">';h[h.length]=months[i];h[h.length]='</option>';}
h[h.length]='</select>';}
return h;},renderYear:function(html){var NAV=YAHOO.widget.CalendarNavigator,C=NAV.CLASSES;var id=this.id+NAV.YEAR_SUFFIX,size=NAV.YR_MAX_DIGITS,h=html;h[h.length]='<label for="'+id+'">';h[h.length]=this.__getCfg("year",true);h[h.length]='</label>';h[h.length]='<input type="text" name="'+id+'" id="'+id+'" class="'+C.YEAR_CTRL+'" maxlength="'+size+'"/>';return h;},renderButtons:function(html){var C=YAHOO.widget.CalendarNavigator.CLASSES;var h=html;h[h.length]='<span class="'+C.BUTTON+' '+C.DEFAULT+'">';h[h.length]='<button type="button" id="'+this.id+'_submit'+'">';h[h.length]=this.__getCfg("submit",true);h[h.length]='</button>';h[h.length]='</span>';h[h.length]='<span class="'+C.BUTTON+'">';h[h.length]='<button type="button" id="'+this.id+'_cancel'+'">';h[h.length]=this.__getCfg("cancel",true);h[h.length]='</button>';h[h.length]='</span>';return h;},applyListeners:function(){var E=YAHOO.util.Event;function yearUpdateHandler(){if(this.validate()){this.setYear(this._getYearFromUI());}}
function monthUpdateHandler(){this.setMonth(this._getMonthFromUI());}
E.on(this.submitEl,"click",this.submit,this,true);E.on(this.cancelEl,"click",this.cancel,this,true);E.on(this.yearEl,"blur",yearUpdateHandler,this,true);E.on(this.monthEl,"change",monthUpdateHandler,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true);}
this.applyKeyListeners();},purgeListeners:function(){var E=YAHOO.util.Event;E.removeListener(this.submitEl,"click",this.submit);E.removeListener(this.cancelEl,"click",this.cancel);E.removeListener(this.yearEl,"blur");E.removeListener(this.monthEl,"change");if(this.__isIEQuirks){E.removeListener(this.cal.oDomContainer,"resize",this._syncMask);}
this.purgeKeyListeners();},applyKeyListeners:function(){var E=YAHOO.util.Event;var ua=YAHOO.env.ua;var arrowEvt=(ua.ie)?"keydown":"keypress";var tabEvt=(ua.ie||ua.opera)?"keydown":"keypress";E.on(this.yearEl,"keypress",this._handleEnterKey,this,true);E.on(this.yearEl,arrowEvt,this._handleDirectionKeys,this,true);E.on(this.lastCtrl,tabEvt,this._handleTabKey,this,true);E.on(this.firstCtrl,tabEvt,this._handleShiftTabKey,this,true);},purgeKeyListeners:function(){var E=YAHOO.util.Event;var arrowEvt=(YAHOO.env.ua.ie)?"keydown":"keypress";var tabEvt=(YAHOO.env.ua.ie||YAHOO.env.ua.opera)?"keydown":"keypress";E.removeListener(this.yearEl,"keypress",this._handleEnterKey);E.removeListener(this.yearEl,arrowEvt,this._handleDirectionKeys);E.removeListener(this.lastCtrl,tabEvt,this._handleTabKey);E.removeListener(this.firstCtrl,tabEvt,this._handleShiftTabKey);},submit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromUI());this.setYear(this._getYearFromUI());var cal=this.cal;var nav=this;function update(){cal.setYear(nav.getYear());cal.setMonth(nav.getMonth());cal.render();}
var delay=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(delay>0){window.setTimeout(update,delay);}else{update();}}},cancel:function(){this.hide();},validate:function(){if(this._getYearFromUI()!==null){this.clearErrors();return true;}else{this.setYearError();this.setError(this.__getCfg("invalidYear",true));return false;}},setError:function(msg){if(this.errorEl){this.errorEl.innerHTML=msg;this._show(this.errorEl,true);}},clearError:function(){if(this.errorEl){this.errorEl.innerHTML="";this._show(this.errorEl,false);}},setYearError:function(){YAHOO.util.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearErrors:function(){this.clearError();this.clearYearError();},setInitialFocus:function(){var el=this.submitEl;var f=this.__getCfg("initialFocus");if(f&&f.toLowerCase){f=f.toLowerCase();if(f=="year"){el=this.yearEl;try{this.yearEl.select();}catch(e){}}else if(f=="month"){el=this.monthEl;}}
if(el&&YAHOO.lang.isFunction(el.focus)){try{el.focus();}catch(e){}}},erase:function(){if(this.__rendered){this.purgeListeners();this.yearEl=null;this.monthEl=null;this.errorEl=null;this.submitEl=null;this.cancelEl=null;this.firstCtrl=null;this.lastCtrl=null;if(this.navEl){this.navEl.innerHTML="";}
var p=this.navEl.parentNode;if(p){p.removeChild(this.navEl);}
this.navEl=null;var pm=this.maskEl.parentNode;if(pm){pm.removeChild(this.maskEl);}
this.maskEl=null;this.__rendered=false;}},destroy:function(){this.erase();this._doc=null;this.cal=null;this.id=null;},_show:function(el,bShow){if(el){YAHOO.util.Dom.setStyle(el,"display",(bShow)?"block":"none");}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex;}else{return 0;}},_getYearFromUI:function(){var NAV=YAHOO.widget.CalendarNavigator;var yr=null;if(this.yearEl){var value=this.yearEl.value;value=value.replace(NAV.TRIM,"$1");if(NAV.YR_PATTERN.test(value)){yr=parseInt(value,10);}}
return yr;},_updateYearUI:function(){if(this.yearEl&&this._year!==null){this.yearEl.value=this._year;}},_updateMonthUI:function(){if(this.monthEl){this.monthEl.selectedIndex=this._month;}},_setFirstLastElements:function(){this.firstCtrl=this.monthEl;this.lastCtrl=this.cancelEl;if(this.__isMac){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){this.firstCtrl=this.monthEl;this.lastCtrl=this.yearEl;}
if(YAHOO.env.ua.gecko){this.firstCtrl=this.yearEl;this.lastCtrl=this.yearEl;}}},_handleEnterKey:function(e){var KEYS=YAHOO.util.KeyListener.KEY;if(YAHOO.util.Event.getCharCode(e)==KEYS.ENTER){this.submit();}},_handleDirectionKeys:function(e){var E=YAHOO.util.Event;var KEYS=YAHOO.util.KeyListener.KEY;var NAV=YAHOO.widget.CalendarNavigator;var value=(this.yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(value)){var dir=false;switch(E.getCharCode(e)){case KEYS.UP:this.yearEl.value=value+NAV.YR_MINOR_INC;dir=true;break;case KEYS.DOWN:this.yearEl.value=Math.max(value-NAV.YR_MINOR_INC,0);dir=true;break;case KEYS.PAGE_UP:this.yearEl.value=value+NAV.YR_MAJOR_INC;dir=true;break;case KEYS.PAGE_DOWN:this.yearEl.value=Math.max(value-NAV.YR_MAJOR_INC,0);dir=true;break;default:break;}
if(dir){E.preventDefault(e);try{this.yearEl.select();}catch(e){}}}},_handleTabKey:function(e){var E=YAHOO.util.Event;var KEYS=YAHOO.util.KeyListener.KEY;if(E.getCharCode(e)==KEYS.TAB&&!e.shiftKey){try{E.preventDefault(e);this.firstCtrl.focus();}catch(e){}}},_handleShiftTabKey:function(e){var E=YAHOO.util.Event;var KEYS=YAHOO.util.KeyListener.KEY;if(e.shiftKey&&E.getCharCode(e)==KEYS.TAB){try{E.preventDefault(e);this.lastCtrl.focus();}catch(e){}}},__getCfg:function(prop,bIsStr){var DEF_CFG=YAHOO.widget.CalendarNavigator._DEFAULT_CFG;var cfg=this.cal.cfg.getProperty("navigator");if(bIsStr){return(cfg!==true&&cfg.strings&&cfg.strings[prop])?cfg.strings[prop]:DEF_CFG.strings[prop];}else{return(cfg!==true&&cfg[prop])?cfg[prop]:DEF_CFG[prop];}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)};YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.4.1",build:"742"});YAHOO.util.Attribute=function(hash,owner){if(owner){this.owner=owner;this.configure(hash,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(value,silent){var beforeRetVal;var owner=this.owner;var name=this.name;var event={type:name,prevValue:this.getValue(),newValue:value};if(this.readOnly||(this.writeOnce&&this._written)){return false;}
if(this.validator&&!this.validator.call(owner,value)){return false;}
if(!silent){beforeRetVal=owner.fireBeforeChangeEvent(event);if(beforeRetVal===false){return false;}}
if(this.method){this.method.call(owner,value);}
this.value=value;this._written=true;event.type=name;if(!silent){this.owner.fireChangeEvent(event);}
return true;},configure:function(map,init){map=map||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var key in map){if(key&&YAHOO.lang.hasOwnProperty(map,key)){this[key]=map[key];if(init){this._initialConfig[key]=map[key];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(silent){this.setValue(this.value,silent);}};(function(){var Lang=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(key){this._configs=this._configs||{};var config=this._configs[key];if(!config){return undefined;}
return config.value;},set:function(key,value,silent){this._configs=this._configs||{};var config=this._configs[key];if(!config){return false;}
return config.setValue(value,silent);},getAttributeKeys:function(){this._configs=this._configs;var keys=[];var config;for(var key in this._configs){config=this._configs[key];if(Lang.hasOwnProperty(this._configs,key)&&!Lang.isUndefined(config)){keys[keys.length]=key;}}
return keys;},setAttributes:function(map,silent){for(var key in map){if(Lang.hasOwnProperty(map,key)){this.set(key,map[key],silent);}}},resetValue:function(key,silent){this._configs=this._configs||{};if(this._configs[key]){this.set(key,this._configs[key]._initialConfig.value,silent);return true;}
return false;},refresh:function(key,silent){this._configs=this._configs;key=((Lang.isString(key))?[key]:key)||this.getAttributeKeys();for(var i=0,len=key.length;i<len;++i){if(this._configs[key[i]]&&!Lang.isUndefined(this._configs[key[i]].value)&&!Lang.isNull(this._configs[key[i]].value)){this._configs[key[i]].refresh(silent);}}},register:function(key,map){this.setAttributeConfig(key,map);},getAttributeConfig:function(key){this._configs=this._configs||{};var config=this._configs[key]||{};var map={};for(key in config){if(Lang.hasOwnProperty(config,key)){map[key]=config[key];}}
return map;},setAttributeConfig:function(key,map,init){this._configs=this._configs||{};map=map||{};if(!this._configs[key]){map.name=key;this._configs[key]=this.createAttribute(map);}else{this._configs[key].configure(map,init);}},configureAttribute:function(key,map,init){this.setAttributeConfig(key,map,init);},resetAttributeConfig:function(key){this._configs=this._configs||{};this._configs[key].resetConfig();},subscribe:function(type,callback){this._events=this._events||{};if(!(type in this._events)){this._events[type]=this.createEvent(type);}
YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(e){var type='before';type+=e.type.charAt(0).toUpperCase()+e.type.substr(1)+'Change';e.type=type;return this.fireEvent(e.type,e);},fireChangeEvent:function(e){e.type+='Change';return this.fireEvent(e.type,e);},createAttribute:function(map){return new YAHOO.util.Attribute(map,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var Dom=YAHOO.util.Dom,AttributeProvider=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(el,map){if(arguments.length){this.init(el,map);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(child){child=child.get?child.get('element'):child;this.get('element').appendChild(child);},getElementsByTagName:function(tag){return this.get('element').getElementsByTagName(tag);},hasChildNodes:function(){return this.get('element').hasChildNodes();},insertBefore:function(element,before){element=element.get?element.get('element'):element;before=(before&&before.get)?before.get('element'):before;this.get('element').insertBefore(element,before);},removeChild:function(child){child=child.get?child.get('element'):child;this.get('element').removeChild(child);return true;},replaceChild:function(newNode,oldNode){newNode=newNode.get?newNode.get('element'):newNode;oldNode=oldNode.get?oldNode.get('element'):oldNode;return this.get('element').replaceChild(newNode,oldNode);},initAttributes:function(map){},addListener:function(type,fn,obj,scope){var el=this.get('element');scope=scope||this;el=this.get('id')||el;var self=this;if(!this._events[type]){if(this.DOM_EVENTS[type]){YAHOO.util.Event.addListener(el,type,function(e){if(e.srcElement&&!e.target){e.target=e.srcElement;}
self.fireEvent(type,e);},obj,scope);}
this.createEvent(type,this);}
YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},subscribe:function(){this.addListener.apply(this,arguments);},removeListener:function(type,fn){this.unsubscribe.apply(this,arguments);},addClass:function(className){Dom.addClass(this.get('element'),className);},getElementsByClassName:function(className,tag){return Dom.getElementsByClassName(className,tag,this.get('element'));},hasClass:function(className){return Dom.hasClass(this.get('element'),className);},removeClass:function(className){return Dom.removeClass(this.get('element'),className);},replaceClass:function(oldClassName,newClassName){return Dom.replaceClass(this.get('element'),oldClassName,newClassName);},setStyle:function(property,value){var el=this.get('element');if(!el){return this._queue[this._queue.length]=['setStyle',arguments];}
return Dom.setStyle(el,property,value);},getStyle:function(property){return Dom.getStyle(this.get('element'),property);},fireQueue:function(){var queue=this._queue;for(var i=0,len=queue.length;i<len;++i){this[queue[i][0]].apply(this,queue[i][1]);}},appendTo:function(parent,before){parent=(parent.get)?parent.get('element'):Dom.get(parent);this.fireEvent('beforeAppendTo',{type:'beforeAppendTo',target:parent});before=(before&&before.get)?before.get('element'):Dom.get(before);var element=this.get('element');if(!element){return false;}
if(!parent){return false;}
if(element.parent!=parent){if(before){parent.insertBefore(element,before);}else{parent.appendChild(element);}}
this.fireEvent('appendTo',{type:'appendTo',target:parent});},get:function(key){var configs=this._configs||{};var el=configs.element;if(el&&!configs[key]&&!YAHOO.lang.isUndefined(el.value[key])){return el.value[key];}
return AttributeProvider.prototype.get.call(this,key);},setAttributes:function(map,silent){var el=this.get('element');for(var key in map){if(!this._configs[key]&&!YAHOO.lang.isUndefined(el[key])){this.setAttributeConfig(key);}}
for(var i=0,len=this._configOrder.length;i<len;++i){if(map[this._configOrder[i]]){this.set(this._configOrder[i],map[this._configOrder[i]],silent);}}},set:function(key,value,silent){var el=this.get('element');if(!el){this._queue[this._queue.length]=['set',arguments];if(this._configs[key]){this._configs[key].value=value;}
return;}
if(!this._configs[key]&&!YAHOO.lang.isUndefined(el[key])){_registerHTMLAttr.call(this,key);}
return AttributeProvider.prototype.set.apply(this,arguments);},setAttributeConfig:function(key,map,init){var el=this.get('element');if(el&&!this._configs[key]&&!YAHOO.lang.isUndefined(el[key])){_registerHTMLAttr.call(this,key,map);}else{AttributeProvider.prototype.setAttributeConfig.apply(this,arguments);}
this._configOrder.push(key);},getAttributeKeys:function(){var el=this.get('element');var keys=AttributeProvider.prototype.getAttributeKeys.call(this);for(var key in el){if(!this._configs[key]){keys[key]=keys[key]||el[key];}}
return keys;},createEvent:function(type,scope){this._events[type]=true;AttributeProvider.prototype.createEvent.apply(this,arguments);},init:function(el,attr){_initElement.apply(this,arguments);}};var _initElement=function(el,attr){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];attr=attr||{};attr.element=attr.element||el||null;this.DOM_EVENTS={'click':true,'dblclick':true,'keydown':true,'keypress':true,'keyup':true,'mousedown':true,'mousemove':true,'mouseout':true,'mouseover':true,'mouseup':true,'focus':true,'blur':true,'submit':true};var isReady=false;if(YAHOO.lang.isString(el)){_registerHTMLAttr.call(this,'id',{value:attr.element});}
if(Dom.get(el)){isReady=true;_initHTMLElement.call(this,attr);_initContent.call(this,attr);}
YAHOO.util.Event.onAvailable(attr.element,function(){if(!isReady){_initHTMLElement.call(this,attr);}
this.fireEvent('available',{type:'available',target:attr.element});},this,true);YAHOO.util.Event.onContentReady(attr.element,function(){if(!isReady){_initContent.call(this,attr);}
this.fireEvent('contentReady',{type:'contentReady',target:attr.element});},this,true);};var _initHTMLElement=function(attr){this.setAttributeConfig('element',{value:Dom.get(attr.element),readOnly:true});};var _initContent=function(attr){this.initAttributes(attr);this.setAttributes(attr,true);this.fireQueue();};var _registerHTMLAttr=function(key,map){var el=this.get('element');map=map||{};map.name=key;map.method=map.method||function(value){el[key]=value;};map.value=map.value||el[key];this._configs[key]=new YAHOO.util.Attribute(map,this);};YAHOO.augment(YAHOO.util.Element,AttributeProvider);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.4.1",build:"742"});(function(){YAHOO.widget.TabView=function(el,attr){attr=attr||{};if(arguments.length==1&&!YAHOO.lang.isString(el)&&!el.nodeName){attr=el;el=attr.element||null;}
if(!el&&!attr.element){el=_createTabViewElement.call(this,attr);}
YAHOO.widget.TabView.superclass.constructor.call(this,el,attr);};YAHOO.extend(YAHOO.widget.TabView,YAHOO.util.Element);var proto=YAHOO.widget.TabView.prototype;var Dom=YAHOO.util.Dom;var Event=YAHOO.util.Event;var Tab=YAHOO.widget.Tab;proto.CLASSNAME='yui-navset';proto.TAB_PARENT_CLASSNAME='yui-nav';proto.CONTENT_PARENT_CLASSNAME='yui-content';proto._tabParent=null;proto._contentParent=null;proto.addTab=function(tab,index){var tabs=this.get('tabs');if(!tabs){this._queue[this._queue.length]=['addTab',arguments];return false;}
index=(index===undefined)?tabs.length:index;var before=this.getTab(index);var self=this;var el=this.get('element');var tabParent=this._tabParent;var contentParent=this._contentParent;var tabElement=tab.get('element');var contentEl=tab.get('contentEl');if(before){tabParent.insertBefore(tabElement,before.get('element'));}else{tabParent.appendChild(tabElement);}
if(contentEl&&!Dom.isAncestor(contentParent,contentEl)){contentParent.appendChild(contentEl);}
if(!tab.get('active')){tab.set('contentVisible',false,true);}else{this.set('activeTab',tab,true);}
var activate=function(e){YAHOO.util.Event.preventDefault(e);var silent=false;if(this==self.get('activeTab')){silent=true;}
self.set('activeTab',this,silent);};tab.addListener(tab.get('activationEvent'),activate);tab.addListener('activationEventChange',function(e){if(e.prevValue!=e.newValue){tab.removeListener(e.prevValue,activate);tab.addListener(e.newValue,activate);}});tabs.splice(index,0,tab);};proto.DOMEventHandler=function(e){var el=this.get('element');var target=YAHOO.util.Event.getTarget(e);var tabParent=this._tabParent;if(Dom.isAncestor(tabParent,target)){var tabEl;var tab=null;var contentEl;var tabs=this.get('tabs');for(var i=0,len=tabs.length;i<len;i++){tabEl=tabs[i].get('element');contentEl=tabs[i].get('contentEl');if(target==tabEl||Dom.isAncestor(tabEl,target)){tab=tabs[i];break;}}
if(tab){tab.fireEvent(e.type,e);}}};proto.getTab=function(index){return this.get('tabs')[index];};proto.getTabIndex=function(tab){var index=null;var tabs=this.get('tabs');for(var i=0,len=tabs.length;i<len;++i){if(tab==tabs[i]){index=i;break;}}
return index;};proto.removeTab=function(tab){var tabCount=this.get('tabs').length;var index=this.getTabIndex(tab);var nextIndex=index+1;if(tab==this.get('activeTab')){if(tabCount>1){if(index+1==tabCount){this.set('activeIndex',index-1);}else{this.set('activeIndex',index+1);}}}
this._tabParent.removeChild(tab.get('element'));this._contentParent.removeChild(tab.get('contentEl'));this._configs.tabs.value.splice(index,1);};proto.toString=function(){var name=this.get('id')||this.get('tagName');return"TabView "+name;};proto.contentTransition=function(newTab,oldTab){newTab.set('contentVisible',true);oldTab.set('contentVisible',false);};proto.initAttributes=function(attr){YAHOO.widget.TabView.superclass.initAttributes.call(this,attr);if(!attr.orientation){attr.orientation='top';}
var el=this.get('element');if(!YAHOO.util.Dom.hasClass(el,this.CLASSNAME)){YAHOO.util.Dom.addClass(el,this.CLASSNAME);}
this.setAttributeConfig('tabs',{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,'ul')[0]||_createTabParent.call(this);this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,'div')[0]||_createContentParent.call(this);this.setAttributeConfig('orientation',{value:attr.orientation,method:function(value){var current=this.get('orientation');this.addClass('yui-navset-'+value);if(current!=value){this.removeClass('yui-navset-'+current);}
switch(value){case'bottom':this.appendChild(this._tabParent);break;}}});this.setAttributeConfig('activeIndex',{value:attr.activeIndex,method:function(value){this.set('activeTab',this.getTab(value));},validator:function(value){return!this.getTab(value).get('disabled');}});this.setAttributeConfig('activeTab',{value:attr.activeTab,method:function(tab){var activeTab=this.get('activeTab');if(tab){tab.set('active',true);this._configs['activeIndex'].value=this.getTabIndex(tab);}
if(activeTab&&activeTab!=tab){activeTab.set('active',false);}
if(activeTab&&tab!=activeTab){this.contentTransition(tab,activeTab);}else if(tab){tab.set('contentVisible',true);}},validator:function(value){return!value.get('disabled');}});if(this._tabParent){_initTabs.call(this);}
this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var type in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,type)){this.addListener.call(this,type,this.DOMEventHandler);}}};var _initTabs=function(){var tab,attr,contentEl;var el=this.get('element');var tabs=_getChildNodes(this._tabParent);var contentElements=_getChildNodes(this._contentParent);for(var i=0,len=tabs.length;i<len;++i){attr={};if(contentElements[i]){attr.contentEl=contentElements[i];}
tab=new YAHOO.widget.Tab(tabs[i],attr);this.addTab(tab);if(tab.hasClass(tab.ACTIVE_CLASSNAME)){this._configs.activeTab.value=tab;this._configs.activeIndex.value=this.getTabIndex(tab);}}};var _createTabViewElement=function(attr){var el=document.createElement('div');if(this.CLASSNAME){el.className=this.CLASSNAME;}
return el;};var _createTabParent=function(attr){var el=document.createElement('ul');if(this.TAB_PARENT_CLASSNAME){el.className=this.TAB_PARENT_CLASSNAME;}
this.get('element').appendChild(el);return el;};var _createContentParent=function(attr){var el=document.createElement('div');if(this.CONTENT_PARENT_CLASSNAME){el.className=this.CONTENT_PARENT_CLASSNAME;}
this.get('element').appendChild(el);return el;};var _getChildNodes=function(el){var nodes=[];var childNodes=el.childNodes;for(var i=0,len=childNodes.length;i<len;++i){if(childNodes[i].nodeType==1){nodes[nodes.length]=childNodes[i];}}
return nodes;};})();(function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;var Tab=function(el,attr){attr=attr||{};if(arguments.length==1&&!YAHOO.lang.isString(el)&&!el.nodeName){attr=el;el=attr.element;}
if(!el&&!attr.element){el=_createTabElement.call(this,attr);}
this.loadHandler={success:function(o){this.set('content',o.responseText);},failure:function(o){}};Tab.superclass.constructor.call(this,el,attr);this.DOM_EVENTS={};};YAHOO.extend(Tab,YAHOO.util.Element);var proto=Tab.prototype;proto.LABEL_TAGNAME='em';proto.ACTIVE_CLASSNAME='selected';proto.DISABLED_CLASSNAME='disabled';proto.LOADING_CLASSNAME='loading';proto.dataConnection=null;proto.loadHandler=null;proto._loading=false;proto.toString=function(){var el=this.get('element');var id=el.id||el.tagName;return"Tab "+id;};proto.initAttributes=function(attr){attr=attr||{};Tab.superclass.initAttributes.call(this,attr);var el=this.get('element');this.setAttributeConfig('activationEvent',{value:attr.activationEvent||'click'});this.setAttributeConfig('labelEl',{value:attr.labelEl||_getlabelEl.call(this),method:function(value){var current=this.get('labelEl');if(current){if(current==value){return false;}
this.replaceChild(value,current);}else if(el.firstChild){this.insertBefore(value,el.firstChild);}else{this.appendChild(value);}}});this.setAttributeConfig('label',{value:attr.label||_getLabel.call(this),method:function(value){var labelEl=this.get('labelEl');if(!labelEl){this.set('labelEl',_createlabelEl.call(this));}
_setLabel.call(this,value);}});this.setAttributeConfig('contentEl',{value:attr.contentEl||document.createElement('div'),method:function(value){var current=this.get('contentEl');if(current){if(current==value){return false;}
this.replaceChild(value,current);}}});this.setAttributeConfig('content',{value:attr.content,method:function(value){this.get('contentEl').innerHTML=value;}});var _dataLoaded=false;this.setAttributeConfig('dataSrc',{value:attr.dataSrc});this.setAttributeConfig('cacheData',{value:attr.cacheData||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig('loadMethod',{value:attr.loadMethod||'GET',validator:YAHOO.lang.isString});this.setAttributeConfig('dataLoaded',{value:false,validator:YAHOO.lang.isBoolean,writeOnce:true});this.setAttributeConfig('dataTimeout',{value:attr.dataTimeout||null,validator:YAHOO.lang.isNumber});this.setAttributeConfig('active',{value:attr.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(value){if(value===true){this.addClass(this.ACTIVE_CLASSNAME);this.set('title','active');}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set('title','');}},validator:function(value){return YAHOO.lang.isBoolean(value)&&!this.get('disabled');}});this.setAttributeConfig('disabled',{value:attr.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(value){if(value===true){Dom.addClass(this.get('element'),this.DISABLED_CLASSNAME);}else{Dom.removeClass(this.get('element'),this.DISABLED_CLASSNAME);}},validator:YAHOO.lang.isBoolean});this.setAttributeConfig('href',{value:attr.href||this.getElementsByTagName('a')[0].getAttribute('href',2)||'#',method:function(value){this.getElementsByTagName('a')[0].href=value;},validator:YAHOO.lang.isString});this.setAttributeConfig('contentVisible',{value:attr.contentVisible,method:function(value){if(value){this.get('contentEl').style.display='block';if(this.get('dataSrc')){if(!this._loading&&!(this.get('dataLoaded')&&this.get('cacheData'))){_dataConnect.call(this);}}}else{this.get('contentEl').style.display='none';}},validator:YAHOO.lang.isBoolean});};var _createTabElement=function(attr){var el=document.createElement('li');var a=document.createElement('a');a.href=attr.href||'#';el.appendChild(a);var label=attr.label||null;var labelEl=attr.labelEl||null;if(labelEl){if(!label){label=_getLabel.call(this,labelEl);}}else{labelEl=_createlabelEl.call(this);}
a.appendChild(labelEl);return el;};var _getlabelEl=function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];};var _createlabelEl=function(){var el=document.createElement(this.LABEL_TAGNAME);return el;};var _setLabel=function(label){var el=this.get('labelEl');el.innerHTML=label;};var _getLabel=function(){var label,el=this.get('labelEl');if(!el){return undefined;}
return el.innerHTML;};var _dataConnect=function(){if(!YAHOO.util.Connect){return false;}
Dom.addClass(this.get('contentEl').parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=YAHOO.util.Connect.asyncRequest(this.get('loadMethod'),this.get('dataSrc'),{success:function(o){this.loadHandler.success.call(this,o);this.set('dataLoaded',true);this.dataConnection=null;Dom.removeClass(this.get('contentEl').parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(o){this.loadHandler.failure.call(this,o);this.dataConnection=null;Dom.removeClass(this.get('contentEl').parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get('dataTimeout')});};YAHOO.widget.Tab=Tab;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.4.1",build:"742"});(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner);}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE);},checkNumber:function(val){return(!isNaN(val));},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value);}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner);}
this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}},getConfig:function(){var cfg={},prop,property;for(prop in this.config){property=this.config[prop];if(property&&property.event){cfg[prop]=property.value;}}
return cfg;},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value;}else{return undefined;}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true;}}else{return false;}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value]);}
return true;}}else{return false;}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false;}else{if(!Lang.isUndefined(value)){property.value=value;}else{value=property.value;}
foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break;}}}
if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value]);}}
if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break;}}}}}
return true;}else{return false;}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key);}else{this.fireEvent(key,property.value);}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey];}}
this.initialConfig=oConfig;}
for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey]);}}},refresh:function(){var prop;for(prop in this.config){this.refireEvent(prop);}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.fireEvent(key,value);}}
this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override);}
return true;}else{return false;}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj);}else{return false;}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]";}
return output;},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", ";}}
return output;},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null;}}
this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true;}}
while(i--);}
return false;};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig);}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.textResizeEvent=new CustomEvent("textResize");function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+
Module.CSS_HEADER+"\"></div>"+"<div class=\""+
Module.CSS_BODY+"\"></div><div class=\""+
Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling;}
return m_oModuleTemplate;}
function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate();}
return(m_oHeaderTemplate.cloneNode(false));}
function createBody(){if(!m_oBodyTemplate){createModuleTemplate();}
return(m_oBodyTemplate.cloneNode(false));}
function createFooter(){if(!m_oFooterTemplate){createModuleTemplate();}
return(m_oFooterTemplate.cloneNode(false));}
Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE;},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(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value});},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL;}
if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId;}}
this.element=el;if(el.id){this.id=el.id;}
child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true;}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true;}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true;}}}while((child=child.nextSibling));}
this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true);}
if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}
this.initEvent.fire(Module);},initResizeMonitor:function(){var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire();}
if(!YAHOO.env.ua.opera){oIFrame=Dom.get("_yuiResizeMonitor");if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL;}
if(YAHOO.env.ua.gecko){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();}","<\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+
encodeURIComponent(sHTML);}
oIFrame.id="_yuiResizeMonitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var fc=document.body.firstChild;if(fc){document.body.insertBefore(oIFrame,fc);}else{document.body.appendChild(oIFrame);}
oIFrame.style.width="10em";oIFrame.style.height="10em";oIFrame.style.top=(-1*oIFrame.offsetHeight)+"px";oIFrame.style.left=(-1*oIFrame.offsetWidth)+"px";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(YAHOO.env.ua.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close();}}
if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(!YAHOO.env.ua.gecko){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize);}}
Module.textResizeInitialized=true;}
this.resizeMonitor=oIFrame;}}},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){var oHeader=this.header||(this.header=createHeader());if(typeof headerContent=="string"){oHeader.innerHTML=headerContent;}else{oHeader.innerHTML="";oHeader.appendChild(headerContent);}
this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire();},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire();},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(typeof bodyContent=="string"){oBody.innerHTML=bodyContent;}else{oBody.innerHTML="";oBody.appendChild(bodyContent);}
this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire();},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire();},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(typeof footerContent=="string"){oFooter.innerHTML=footerContent;}else{oFooter.innerHTML="";oFooter.appendChild(footerContent);}
this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire();},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire();},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode);}
if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire();}}
this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element;}
if(appendToNode){appendTo(appendToNode);}else{if(!Dom.inDocument(this.element)){return false;}}
if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild);}else{moduleElement.appendChild(this.header);}}
if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer);}else{moduleElement.appendChild(this.body);}}
if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer);}
this.renderEvent.fire();return true;},destroy:function(){var parent,e;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode;}
if(parent){parent.removeChild(this.element);}
this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(e in this){if(e instanceof CustomEvent){e.unsubscribeAll();}}},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();Dom.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor();}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild);}else{parentNode.appendChild(element);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig);};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Overlay=YAHOO.widget.Overlay,m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:Lang.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1;}
clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire();},1);}else{Overlay.windowScrollEvent.fire();}};Overlay.windowResizeHandler=function(e){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1;}
clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire();},100);}else{Overlay.windowResizeEvent.fire();}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true;}
YAHOO.extend(Overlay,Module,{init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true);}
if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}
if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}
this.initEvent.fire(Overlay);},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE;},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});this.cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y]);},hideMacGeckoScrollbars:function(){Dom.removeClass(this.element,"show-scrollbars");Dom.addClass(this.element,"hide-scrollbars");},showMacGeckoScrollbars:function(){Dom.removeClass(this.element,"hide-scrollbars");Dom.addClass(this.element,"show-scrollbars");},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&YAHOO.env.ua.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break;}
e=e.parentNode;}
if(currentVis=="inherit"){currentVis="visible";}}
if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration);}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration);}}
if(visible){if(isMacGecko){this.showMacGeckoScrollbars();}
if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}
ei.animateIn();}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();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();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}
h.animateOut();}}else if(currentVis===""){Dom.setStyle(this.element,"visibility","hidden");}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();Dom.setStyle(this.element,"visibility","hidden");this.hideEvent.fire();}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center();}},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center);}
if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true);}
if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0;}}
if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1;}}
Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe();}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],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]);},configX:function(type,args,obj){var x=args[0],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");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),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");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame);}
oIFrame.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy");}
Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)]);}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1));}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC;}
if(YAHOO.env.ua.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0;}
else{m_oIFrameTemplate.style.opacity="0";}
m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";}
oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame;}
this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}
function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false;}
if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},configConstrainToViewport:function(type,args,obj){function constrainBeforeShow(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();}
var x=this.cfg.getProperty("x");var y=this.cfg.getProperty("y");var cXY=this.getConstrainedXY(x,y);if(cXY[0]!==x||cXY[1]!==y){this.moveTo(cXY[0],cXY[1]);}}
var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}
if(!Config.alreadySubscribed(this.beforeShowEvent,constrainBeforeShow)){this.beforeShowEvent.subscribe(constrainBeforeShow);}}else{this.beforeShowEvent.unsubscribe(constrainBeforeShow);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];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);}}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break;}}
if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1];}
if(!contextAlign){contextAlign=contextArgs[2];}
if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break;}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true);},getConstrainedXY:function(x,y){var nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),offsetHeight=this.element.offsetHeight,offsetWidth=this.element.offsetWidth,scrollX=Dom.getDocumentScrollLeft(),scrollY=Dom.getDocumentScrollTop();var xNew=x;var yNew=y;if(offsetWidth+nViewportOffset<viewPortWidth){var leftConstraint=scrollX+nViewportOffset;var rightConstraint=scrollX+viewPortWidth-offsetWidth-nViewportOffset;if(x<leftConstraint){xNew=leftConstraint;}else if(x>rightConstraint){xNew=rightConstraint;}}else{xNew=nViewportOffset+scrollX;}
if(offsetHeight+nViewportOffset<viewPortHeight){var topConstraint=scrollY+nViewportOffset;var bottomConstraint=scrollY+viewPortHeight-offsetHeight-nViewportOffset;if(y<topConstraint){yNew=topConstraint;}else if(y>bottomConstraint){yNew=bottomConstraint;}}else{yNew=nViewportOffset+scrollY;}
return[xNew,yNew];},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft();}else{x=nViewportOffset+Dom.getDocumentScrollLeft();}
if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop();}else{y=nViewportOffset+Dom.getDocumentScrollTop();}
this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true);},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context");},0);},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1;}else if(nZIndex1<nZIndex2){return 1;}else{return 0;}}
function isOverlayElement(p_oElement){var oOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(oOverlay&&!Dom.isAncestor(oElement,oOverlay)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode;}else{aOverlays[aOverlays.length]=p_oElement;}}}
Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true;}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true;}}
if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2));}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}
this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.superclass.destroy.call(this);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig);};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(userConfig){this.cfg=new 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){if(activeOverlay!=o){if(activeOverlay){activeOverlay.blur();}
this.bringToTop(o);activeOverlay=o;Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);o.focusEvent.fire();}}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null;}
var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=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.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null);}
o.focusEvent.unsubscribeAll();o.blurEvent.unsubscribeAll();o.focusEvent=null;o.blurEvent=null;o.focus=null;o.blur=null;}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur();}
while(i--);}};this._onOverlayBlur=function(p_sType,p_aArgs){activeOverlay=null;};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}
if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay);},register:function(overlay){var mgr=this,zIndex,regcount,i,nOverlays;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focus=function(){mgr.focus(this);};overlay.blur=function(){if(mgr.getActive()==this){Dom.removeClass(this.element,OverlayManager.CSS_FOCUSED);this.blurEvent.fire();}};overlay.blurEvent.subscribe(mgr._onOverlayBlur);overlay.hideEvent.subscribe(overlay.blur);overlay.destroyEvent.subscribe(this._onOverlayDestroy,overlay,this);Event.on(overlay.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,overlay);zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10));}else{overlay.cfg.setProperty("zIndex",0);}
this.overlays.push(overlay);this.bringToTop(overlay);return true;}else if(overlay instanceof Array){regcount=0;nOverlays=overlay.length;for(i=0;i<nOverlays;i++){if(this.register(overlay[i])){regcount++;}}
if(regcount>0){return true;}}else{return false;}},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true;}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true;}}
if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2));}}
aOverlays.sort(this.compareZIndexDesc);}}},find:function(overlay){var aOverlays=this.overlays,nOverlays=aOverlays.length,i;if(nOverlays>0){i=nOverlays-1;if(overlay instanceof Overlay){do{if(aOverlays[i]==overlay){return aOverlays[i];}}
while(i--);}else if(typeof overlay=="string"){do{if(aOverlays[i].id==overlay){return aOverlays[i];}}
while(i--);}
return null;}},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0;}else if(zIndex1===null){return 1;}else if(zIndex2===null){return-1;}else if(zIndex1>zIndex2){return-1;}else if(zIndex1<zIndex2){return 1;}else{return 0;}},showAll:function(){var aOverlays=this.overlays,nOverlays=aOverlays.length,i;if(nOverlays>0){i=nOverlays-1;do{aOverlays[i].show();}
while(i--);}},hideAll:function(){var aOverlays=this.overlays,nOverlays=aOverlays.length,i;if(nOverlays>0){i=nOverlays-1;do{aOverlays[i].hide();}
while(i--);}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig);};var Lang=YAHOO.lang,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Tooltip=YAHOO.widget.Tooltip,m_oShadowTemplate,DEFAULT_CONFIG={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:Lang.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:Lang.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:Lang.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:Lang.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"}};Tooltip.CSS_TOOLTIP="yui-tt";function restoreOriginalWidth(p_sType,p_aArgs,p_oObject){var sOriginalWidth=p_oObject[0],sNewWidth=p_oObject[1],oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sNewWidth){oConfig.setProperty("width",sOriginalWidth);}
this.unsubscribe("hide",this._onHide,p_oObject);}
function setWidthToOffsetWidth(p_sType,p_aArgs){var oBody=document.body,oConfig=this.cfg,sOriginalWidth=oConfig.getProperty("width"),sNewWidth,oClone;if((!sOriginalWidth||sOriginalWidth=="auto")&&(oConfig.getProperty("container")!=oBody||oConfig.getProperty("x")>=Dom.getViewportWidth()||oConfig.getProperty("y")>=Dom.getViewportHeight())){oClone=this.element.cloneNode(true);oClone.style.visibility="hidden";oClone.style.top="0px";oClone.style.left="0px";oBody.appendChild(oClone);sNewWidth=(oClone.offsetWidth+"px");oBody.removeChild(oClone);oClone=null;oConfig.setProperty("width",sNewWidth);oConfig.refireEvent("xy");this.subscribe("hide",restoreOriginalWidth,[(sOriginalWidth||""),sNewWidth]);}}
function onDOMReady(p_sType,p_aArgs,p_oObject){this.render(p_oObject);}
function onInit(){Event.onDOMReady(onDOMReady,this.cfg.getProperty("container"),this);}
YAHOO.extend(Tooltip,YAHOO.widget.Overlay,{init:function(el,userConfig){Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(Tooltip);Dom.addClass(this.element,Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("beforeShow",setWidthToOffsetWidth);this.subscribe("init",onInit);this.subscribe("render",this.onRender);this.initEvent.fire(Tooltip);},initDefaultConfig:function(){Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.PREVENT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:DEFAULT_CONFIG.SHOW_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,validator:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.configHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body});},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);}},configContainer:function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true);}},_removeEventListeners:function(){var aElements=this._context,nElements,oElement,i;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.removeListener(oElement,"mouseover",this.onContextMouseOver);Event.removeListener(oElement,"mousemove",this.onContextMouseMove);Event.removeListener(oElement,"mouseout",this.onContextMouseOut);}
while(i--);}}},configContext:function(type,args,obj){var context=args[0],aElements,nElements,oElement,i;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");}
this._removeEventListeners();this._context=context;aElements=this._context;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.on(oElement,"mouseover",this.onContextMouseOver,this);Event.on(oElement,"mousemove",this.onContextMouseMove,this);Event.on(oElement,"mouseout",this.onContextMouseOut,this);}
while(i--);}}}},onContextMouseMove:function(e,obj){obj.pageX=Event.getPageX(e);obj.pageY=Event.getPageY(e);},onContextMouseOver:function(e,obj){var context=this;if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null;}
Event.on(context,"mousemove",obj.onContextMouseMove,obj);if(context.title){obj._tempTitle=context.title;context.title="";}
obj.showProcId=obj.doShow(e,context);},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"));},doShow:function(e,context){var yOffset=25,me=this;if(YAHOO.env.ua.opera&&context.tagName&&context.tagName.toUpperCase()=="A"){yOffset+=12;}
return setTimeout(function(){var txt=me.cfg.getProperty("text");if(me._tempTitle&&(txt===""||YAHOO.lang.isUndefined(txt)||YAHOO.lang.isNull(txt))){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);}
Event.removeListener(context,"mousemove",me.onContextMouseMove);me.show();me.hideProcId=me.doHide();},this.cfg.getProperty("showdelay"));},doHide:function(){var me=this;return setTimeout(function(){me.hide();},this.cfg.getProperty("autodismissdelay"));},preventOverlap:function(pageX,pageY){var height=this.element.offsetHeight,mousePoint=new YAHOO.util.Point(pageX,pageY),elementRegion=Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5));}},onRender:function(p_sType,p_aArgs){function sizeShadow(){var oElement=this.element,oShadow=this._shadow;if(oShadow){oShadow.style.width=(oElement.offsetWidth+6)+"px";oShadow.style.height=(oElement.offsetHeight+1)+"px";}}
function addShadowVisibleClass(){Dom.addClass(this._shadow,"yui-tt-shadow-visible");}
function removeShadowVisibleClass(){Dom.removeClass(this._shadow,"yui-tt-shadow-visible");}
function createShadow(){var oShadow=this._shadow,oElement,Module,nIE,me;if(!oShadow){oElement=this.element;Module=YAHOO.widget.Module;nIE=YAHOO.env.ua.ie;me=this;if(!m_oShadowTemplate){m_oShadowTemplate=document.createElement("div");m_oShadowTemplate.className="yui-tt-shadow";}
oShadow=m_oShadowTemplate.cloneNode(false);oElement.appendChild(oShadow);this._shadow=oShadow;addShadowVisibleClass.call(this);this.subscribe("beforeShow",addShadowVisibleClass);this.subscribe("beforeHide",removeShadowVisibleClass);if(nIE==6||(nIE==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){sizeShadow.call(me);},0);this.cfg.subscribeToConfigEvent("width",sizeShadow);this.cfg.subscribeToConfigEvent("height",sizeShadow);this.subscribe("changeContent",sizeShadow);Module.textResizeEvent.subscribe(sizeShadow,this,true);this.subscribe("destroy",function(){Module.textResizeEvent.unsubscribe(sizeShadow,this);});}}}
function onBeforeShow(){createShadow.call(this);this.unsubscribe("beforeShow",onBeforeShow);}
if(this.cfg.getProperty("visible")){createShadow.call(this);}
else{this.subscribe("beforeShow",onBeforeShow);}},destroy:function(){this._removeEventListeners();Tooltip.superclass.destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(function(){YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig);};var Lang=YAHOO.lang,DD=YAHOO.util.DD,Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,Overlay=YAHOO.widget.Overlay,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config,Panel=YAHOO.widget.Panel,m_oMaskTemplate,m_oUnderlayTemplate,m_oCloseIconTemplate,EVENT_TYPES={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},DEFAULT_CONFIG={"CLOSE":{key:"close",value:true,validator:Lang.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(DD?true:false),validator:Lang.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:Lang.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:Lang.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};Panel.CSS_PANEL="yui-panel";Panel.CSS_PANEL_CONTAINER="yui-panel-container";function createHeader(p_sType,p_aArgs){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;");}}
function restoreOriginalWidth(p_sType,p_aArgs,p_oObject){var sOriginalWidth=p_oObject[0],sNewWidth=p_oObject[1],oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sNewWidth){oConfig.setProperty("width",sOriginalWidth);}
this.unsubscribe("hide",restoreOriginalWidth,p_oObject);}
function setWidthToOffsetWidth(p_sType,p_aArgs){var nIE=YAHOO.env.ua.ie,oConfig,sOriginalWidth,sNewWidth;if(nIE==6||(nIE==7&&document.compatMode=="BackCompat")){oConfig=this.cfg;sOriginalWidth=oConfig.getProperty("width");if(!sOriginalWidth||sOriginalWidth=="auto"){sNewWidth=(this.element.offsetWidth+"px");oConfig.setProperty("width",sNewWidth);this.subscribe("hide",restoreOriginalWidth,[(sOriginalWidth||""),sNewWidth]);}}}
function onElementFocus(){this.blur();}
function addFocusEventHandlers(p_sType,p_aArgs){var me=this;function isFocusable(el){var sTagName=el.tagName.toUpperCase(),bFocusable=false;switch(sTagName){case"A":case"BUTTON":case"SELECT":case"TEXTAREA":if(!Dom.isAncestor(me.element,el)){Event.on(el,"focus",onElementFocus,el,true);bFocusable=true;}
break;case"INPUT":if(el.type!="hidden"&&!Dom.isAncestor(me.element,el)){Event.on(el,"focus",onElementFocus,el,true);bFocusable=true;}
break;}
return bFocusable;}
this.focusableElements=Dom.getElementsBy(isFocusable);}
function removeFocusEventHandlers(p_sType,p_aArgs){var aElements=this.focusableElements,nElements=aElements.length,el2,i;for(i=0;i<nElements;i++){el2=aElements[i];Event.removeListener(el2,"focus",onElementFocus);}}
YAHOO.extend(Panel,Overlay,{init:function(el,userConfig){Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(Panel);Dom.addClass(this.element,Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.subscribe("showMask",addFocusEventHandlers);this.subscribe("hideMask",removeFocusEventHandlers);this.subscribe("beforeRender",createHeader);this.initEvent.fire(Panel);},initEvents:function(){Panel.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.showMaskEvent=this.createEvent(EVENT_TYPES.SHOW_MASK);this.showMaskEvent.signature=SIGNATURE;this.hideMaskEvent=this.createEvent(EVENT_TYPES.HIDE_MASK);this.hideMaskEvent.signature=SIGNATURE;this.dragEvent=this.createEvent(EVENT_TYPES.DRAG);this.dragEvent.signature=SIGNATURE;},initDefaultConfig:function(){Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.CLOSE.key,{handler:this.configClose,value:DEFAULT_CONFIG.CLOSE.value,validator:DEFAULT_CONFIG.CLOSE.validator,supercedes:DEFAULT_CONFIG.CLOSE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAGGABLE.key,{handler:this.configDraggable,value:DEFAULT_CONFIG.DRAGGABLE.value,validator:DEFAULT_CONFIG.DRAGGABLE.validator,supercedes:DEFAULT_CONFIG.DRAGGABLE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key,{value:DEFAULT_CONFIG.DRAG_ONLY.value,validator:DEFAULT_CONFIG.DRAG_ONLY.validator,supercedes:DEFAULT_CONFIG.DRAG_ONLY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.UNDERLAY.key,{handler:this.configUnderlay,value:DEFAULT_CONFIG.UNDERLAY.value,supercedes:DEFAULT_CONFIG.UNDERLAY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MODAL.key,{handler:this.configModal,value:DEFAULT_CONFIG.MODAL.value,validator:DEFAULT_CONFIG.MODAL.validator,supercedes:DEFAULT_CONFIG.MODAL.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent,supercedes:DEFAULT_CONFIG.KEY_LISTENERS.supercedes});},configClose:function(type,args,obj){var val=args[0],oClose=this.close;function doHide(e,obj){obj.hide();}
if(val){if(!oClose){if(!m_oCloseIconTemplate){m_oCloseIconTemplate=document.createElement("span");m_oCloseIconTemplate.innerHTML="&#160;";m_oCloseIconTemplate.className="container-close";}
oClose=m_oCloseIconTemplate.cloneNode(true);this.innerElement.appendChild(oClose);Event.on(oClose,"click",doHide,this);this.close=oClose;}else{oClose.style.display="block";}}else{if(oClose){oClose.style.display="none";}}},configDraggable:function(type,args,obj){var val=args[0];if(val){if(!DD){this.cfg.setProperty("draggable",false);return;}
if(this.header){Dom.setStyle(this.header,"cursor","move");this.registerDragDrop();}
this.subscribe("beforeShow",setWidthToOffsetWidth);}else{if(this.dd){this.dd.unreg();}
if(this.header){Dom.setStyle(this.header,"cursor","auto");}
this.unsubscribe("beforeShow",setWidthToOffsetWidth);}},configUnderlay:function(type,args,obj){var UA=YAHOO.env.ua,bMacGecko=(this.platform=="mac"&&UA.gecko),sUnderlay=args[0].toLowerCase(),oUnderlay=this.underlay,oElement=this.element;function fixWebkitUnderlay(){var u=this.underlay;Dom.addClass(u,"yui-force-redraw");window.setTimeout(function(){Dom.removeClass(u,"yui-force-redraw");},0);}
function createUnderlay(){var nIE;if(!oUnderlay){if(!m_oUnderlayTemplate){m_oUnderlayTemplate=document.createElement("div");m_oUnderlayTemplate.className="underlay";}
oUnderlay=m_oUnderlayTemplate.cloneNode(false);this.element.appendChild(oUnderlay);this.underlay=oUnderlay;nIE=UA.ie;if(nIE==6||(nIE==7&&document.compatMode=="BackCompat")){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true);}
if(UA.webkit&&UA.webkit<420){this.changeContentEvent.subscribe(fixWebkitUnderlay);}}}
function onBeforeShow(){createUnderlay.call(this);this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(onBeforeShow);}
function destroyUnderlay(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(onBeforeShow);this._underlayDeferred=false;}
if(oUnderlay){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(fixWebkitUnderlay);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(oUnderlay);this.underlay=null;}}
switch(sUnderlay){case"shadow":Dom.removeClass(oElement,"matte");Dom.addClass(oElement,"shadow");break;case"matte":if(!bMacGecko){destroyUnderlay.call(this);}
Dom.removeClass(oElement,"shadow");Dom.addClass(oElement,"matte");break;default:if(!bMacGecko){destroyUnderlay.call(this);}
Dom.removeClass(oElement,"shadow");Dom.removeClass(oElement,"matte");break;}
if((sUnderlay=="shadow")||(bMacGecko&&!oUnderlay)){if(this.cfg.getProperty("visible")){createUnderlay.call(this);}
else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._underlayDeferred=true;}}}},configModal:function(type,args,obj){var modal=args[0];if(modal){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true;}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask();}
this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false;}}},removeMask:function(){var oMask=this.mask,oParentNode;if(oMask){this.hideMask();oParentNode=oMask.parentNode;if(oParentNode){oParentNode.removeChild(oMask);}
this.mask=null;}},configKeyListeners:function(type,args,obj){var listeners=args[0],listener,nListeners,i;if(listeners){if(listeners instanceof Array){nListeners=listeners.length;for(i=0;i<nListeners;i++){listener=listeners[i];if(!Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true);}
if(!Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true);}}}else{if(!Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true);}
if(!Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true);}}}},configHeight:function(type,args,obj){var height=args[0],el=this.innerElement;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");},configWidth:function(type,args,obj){var width=args[0],el=this.innerElement;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");},configzIndex:function(type,args,obj){Panel.superclass.configzIndex.call(this,type,args,obj);if(this.mask||this.cfg.getProperty("modal")===true){var panelZ=Dom.getStyle(this.element,"zIndex");if(!panelZ||isNaN(panelZ)){panelZ=0;}
if(panelZ===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper:function(){var elementParent=this.element.parentNode,originalElement=this.element,wrapper=document.createElement("div");wrapper.className=Panel.CSS_PANEL_CONTAINER;wrapper.id=originalElement.id+"_c";if(elementParent){elementParent.insertBefore(wrapper,originalElement);}
wrapper.appendChild(originalElement);this.element=wrapper;this.innerElement=originalElement;Dom.setStyle(this.innerElement,"visibility","inherit");},sizeUnderlay:function(){var oUnderlay=this.underlay,oElement;if(oUnderlay){oElement=this.element;oUnderlay.style.width=oElement.offsetWidth+"px";oUnderlay.style.height=oElement.offsetHeight+"px";}},registerDragDrop:function(){var me=this;if(this.header){if(!DD){return;}
var bDragOnly=(this.cfg.getProperty("dragonly")===true);this.dd=new DD(this.element.id,this.id,{dragOnly:bDragOnly});if(!this.header.id){this.header.id=this.id+"_h";}
this.dd.startDrag=function(){var offsetHeight,offsetWidth,viewPortWidth,viewPortHeight,scrollX,scrollY;if(YAHOO.env.ua.ie==6){Dom.addClass(me.element,"drag");}
if(me.cfg.getProperty("constraintoviewport")){var nViewportOffset=Overlay.VIEWPORT_OFFSET;offsetHeight=me.element.offsetHeight;offsetWidth=me.element.offsetWidth;viewPortWidth=Dom.getViewportWidth();viewPortHeight=Dom.getViewportHeight();scrollX=Dom.getDocumentScrollLeft();scrollY=Dom.getDocumentScrollTop();if(offsetHeight+nViewportOffset<viewPortHeight){this.minY=scrollY+nViewportOffset;this.maxY=scrollY+viewPortHeight-offsetHeight-nViewportOffset;}else{this.minY=scrollY+nViewportOffset;this.maxY=scrollY+nViewportOffset;}
if(offsetWidth+nViewportOffset<viewPortWidth){this.minX=scrollX+nViewportOffset;this.maxX=scrollX+viewPortWidth-offsetWidth-nViewportOffset;}else{this.minX=scrollX+nViewportOffset;this.maxX=scrollX+nViewportOffset;}
this.constrainX=true;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"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars();}
me.dragEvent.fire("onDrag",arguments);};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){Dom.removeClass(me.element,"drag");}
me.dragEvent.fire("endDrag",arguments);me.moveEvent.fire(me.cfg.getProperty("xy"));};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask:function(){var oMask=this.mask;if(!oMask){if(!m_oMaskTemplate){m_oMaskTemplate=document.createElement("div");m_oMaskTemplate.className="mask";m_oMaskTemplate.innerHTML="&#160;";}
oMask=m_oMaskTemplate.cloneNode(true);oMask.id=this.id+"_mask";document.body.insertBefore(oMask,document.body.firstChild);this.mask=oMask;this.stackMask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();Dom.removeClass(document.body,"masked");}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){this.mask.style.height=Dom.getDocumentHeight()+"px";this.mask.style.width=Dom.getDocumentWidth()+"px";}},stackMask:function(){if(this.mask){var panelZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(panelZ)&&!isNaN(panelZ)){Dom.setStyle(this.mask,"zIndex",panelZ-1);}}},render:function(appendToNode){return Panel.superclass.render.call(this,appendToNode,this.innerElement);},destroy:function(){Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){Event.purgeElement(this.close);}
Panel.superclass.destroy.call(this);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig);};var Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,KeyListener=YAHOO.util.KeyListener,Connect=YAHOO.util.Connect,Dialog=YAHOO.widget.Dialog,Lang=YAHOO.lang,EVENT_TYPES={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},DEFAULT_CONFIG={"POST_METHOD":{key:"postmethod",value:"async"},"BUTTONS":{key:"buttons",value:"none"}};Dialog.CSS_DIALOG="yui-dialog";function removeButtonEventHandlers(){var aButtons=this._aButtons,nButtons,oButton,i;if(Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=nButtons-1;do{oButton=aButtons[i];if(YAHOO.widget.Button&&oButton instanceof YAHOO.widget.Button){oButton.destroy();}
else if(oButton.tagName.toUpperCase()=="BUTTON"){Event.purgeElement(oButton);Event.purgeElement(oButton,false);}}
while(i--);}}}
YAHOO.extend(Dialog,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(DEFAULT_CONFIG.POST_METHOD.key,{handler:this.configPostMethod,value:DEFAULT_CONFIG.POST_METHOD.value,validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false;}else{return true;}}});this.cfg.addProperty(DEFAULT_CONFIG.BUTTONS.key,{handler:this.configButtons,value:DEFAULT_CONFIG.BUTTONS.value});},initEvents:function(){Dialog.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeSubmitEvent=this.createEvent(EVENT_TYPES.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=SIGNATURE;this.submitEvent=this.createEvent(EVENT_TYPES.SUBMIT);this.submitEvent.signature=SIGNATURE;this.manualSubmitEvent=this.createEvent(EVENT_TYPES.MANUAL_SUBMIT);this.manualSubmitEvent.signature=SIGNATURE;this.asyncSubmitEvent=this.createEvent(EVENT_TYPES.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=SIGNATURE;this.formSubmitEvent=this.createEvent(EVENT_TYPES.FORM_SUBMIT);this.formSubmitEvent.signature=SIGNATURE;this.cancelEvent=this.createEvent(EVENT_TYPES.CANCEL);this.cancelEvent.signature=SIGNATURE;},init:function(el,userConfig){Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(Dialog);Dom.addClass(this.element,Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(Dialog);},doSubmit:function(){var oForm=this.form,bUseFileUpload=false,bUseSecureFileUpload=false,aElements,nElements,i,sMethod;switch(this.cfg.getProperty("postmethod")){case"async":aElements=oForm.elements;nElements=aElements.length;if(nElements>0){i=nElements-1;do{if(aElements[i].type=="file"){bUseFileUpload=true;break;}}
while(i--);}
if(bUseFileUpload&&YAHOO.env.ua.ie&&this.isSecure){bUseSecureFileUpload=true;}
sMethod=(oForm.getAttribute("method")||"POST").toUpperCase();Connect.setForm(oForm,bUseFileUpload,bUseSecureFileUpload);Connect.asyncRequest(sMethod,oForm.getAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":oForm.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},registerForm:function(){var form=this.element.getElementsByTagName("form")[0],me=this,firstElement,lastElement;if(this.form){if(this.form==form&&Dom.isAncestor(this.element,this.form)){return;}else{Event.purgeElement(this.form);this.form=null;}}
if(!form){form=document.createElement("form");form.name="frm_"+this.id;this.body.appendChild(form);}
if(form){this.form=form;Event.on(form,"submit",function(e){Event.stopEvent(e);this.submit();this.form.blur();},this,true);this.firstFormElement=function(){var f,el,nElements=form.elements.length;for(f=0;f<nElements;f++){el=form.elements[f];if(el.focus&&!el.disabled&&el.type!="hidden"){return el;}}
return null;}();this.lastFormElement=function(){var f,el,nElements=form.elements.length;for(f=nElements-1;f>=0;f--){el=form.elements[f];if(el.focus&&!el.disabled&&el.type!="hidden"){return el;}}
return null;}();if(this.cfg.getProperty("modal")){firstElement=this.firstFormElement||this.firstButton;if(firstElement){this.preventBackTab=new 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);}
lastElement=this.lastButton||this.lastFormElement;if(lastElement){this.preventTabOut=new 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);}}}},configClose:function(type,args,obj){var val=args[0];function doCancel(e,obj){obj.cancel();}
if(val){if(!this.close){this.close=document.createElement("div");Dom.addClass(this.close,"container-close");this.close.innerHTML="&#160;";this.innerElement.appendChild(this.close);Event.on(this.close,"click",doCancel,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}},configButtons:function(type,args,obj){var Button=YAHOO.widget.Button,aButtons=args[0],oInnerElement=this.innerElement,oButton,oButtonEl,oYUIButton,nButtons,oSpan,oFooter,i;removeButtonEventHandlers.call(this);this._aButtons=null;if(Lang.isArray(aButtons)){oSpan=document.createElement("span");oSpan.className="button-group";nButtons=aButtons.length;this._aButtons=[];for(i=0;i<nButtons;i++){oButton=aButtons[i];if(Button){oYUIButton=new Button({label:oButton.text,container:oSpan});oButtonEl=oYUIButton.get("element");if(oButton.isDefault){oYUIButton.addClass("default");this.defaultHtmlButton=oButtonEl;}
if(Lang.isFunction(oButton.handler)){oYUIButton.set("onclick",{fn:oButton.handler,obj:this,scope:this});}
else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){oYUIButton.set("onclick",{fn:oButton.handler.fn,obj:((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),scope:(oButton.handler.scope||this)});}
this._aButtons[this._aButtons.length]=oYUIButton;}
else{oButtonEl=document.createElement("button");oButtonEl.setAttribute("type","button");if(oButton.isDefault){oButtonEl.className="default";this.defaultHtmlButton=oButtonEl;}
oButtonEl.innerHTML=oButton.text;if(Lang.isFunction(oButton.handler)){Event.on(oButtonEl,"click",oButton.handler,this,true);}
else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){Event.on(oButtonEl,"click",oButton.handler.fn,((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),(oButton.handler.scope||this));}
oSpan.appendChild(oButtonEl);this._aButtons[this._aButtons.length]=oButtonEl;}
oButton.htmlButton=oButtonEl;if(i===0){this.firstButton=oButtonEl;}
if(i==(nButtons-1)){this.lastButton=oButtonEl;}}
this.setFooter(oSpan);oFooter=this.footer;if(Dom.inDocument(this.element)&&!Dom.isAncestor(oInnerElement,oFooter)){oInnerElement.appendChild(oFooter);}
this.buttonSpan=oSpan;}else{oSpan=this.buttonSpan;oFooter=this.footer;if(oSpan&&oFooter){oFooter.removeChild(oSpan);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}
this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay");},getButtons:function(){var aButtons=this._aButtons;if(aButtons){return aButtons;}},focusFirst:function(type,args,obj){var oElement=this.firstFormElement,oEvent;if(args){oEvent=args[1];if(oEvent){Event.stopEvent(oEvent);}}
if(oElement){try{oElement.focus();}
catch(oException){}}else{this.focusDefaultButton();}},focusLast:function(type,args,obj){var aButtons=this.cfg.getProperty("buttons"),oElement=this.lastFormElement,oEvent;if(args){oEvent=args[1];if(oEvent){Event.stopEvent(oEvent);}}
if(aButtons&&Lang.isArray(aButtons)){this.focusLastButton();}else{if(oElement){try{oElement.focus();}
catch(oException){}}}},focusDefaultButton:function(){var oElement=this.defaultHtmlButton;if(oElement){try{oElement.focus();}
catch(oException){}}},blurButtons:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement,i;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=(nButtons-1);do{oButton=aButtons[i];if(oButton){oElement=oButton.htmlButton;if(oElement){try{oElement.blur();}
catch(oException){}}}}
while(i--);}}},focusFirstButton:function(){var aButtons=this.cfg.getProperty("buttons"),oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){oButton=aButtons[0];if(oButton){oElement=oButton.htmlButton;if(oElement){try{oElement.focus();}
catch(oException){}}}}},focusLastButton:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){oButton=aButtons[(nButtons-1)];if(oButton){oElement=oButton.htmlButton;if(oElement){try{oElement.focus();}
catch(oException){}}}}}},configPostMethod:function(type,args,obj){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();this.hide();return true;}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var oForm=this.form,aElements,nTotalElements,oData,sName,oElement,nElements,sType,sTagName,aOptions,nOptions,aValues,oOption,sValue,oRadio,oCheckbox,i,n;function isFormElement(p_oElement){var sTag=p_oElement.tagName.toUpperCase();return((sTag=="INPUT"||sTag=="TEXTAREA"||sTag=="SELECT")&&p_oElement.name==sName);}
if(oForm){aElements=oForm.elements;nTotalElements=aElements.length;oData={};for(i=0;i<nTotalElements;i++){sName=aElements[i].name;oElement=Dom.getElementsBy(isFormElement,"*",oForm);nElements=oElement.length;if(nElements>0){if(nElements==1){oElement=oElement[0];sType=oElement.type;sTagName=oElement.tagName.toUpperCase();switch(sTagName){case"INPUT":if(sType=="checkbox"){oData[sName]=oElement.checked;}
else if(sType!="radio"){oData[sName]=oElement.value;}
break;case"TEXTAREA":oData[sName]=oElement.value;break;case"SELECT":aOptions=oElement.options;nOptions=aOptions.length;aValues=[];for(n=0;n<nOptions;n++){oOption=aOptions[n];if(oOption.selected){sValue=oOption.value;if(!sValue||sValue===""){sValue=oOption.text;}
aValues[aValues.length]=sValue;}}
oData[sName]=aValues;break;}}
else{sType=oElement[0].type;switch(sType){case"radio":for(n=0;n<nElements;n++){oRadio=oElement[n];if(oRadio.checked){oData[sName]=oRadio.value;break;}}
break;case"checkbox":aValues=[];for(n=0;n<nElements;n++){oCheckbox=oElement[n];if(oCheckbox.checked){aValues[aValues.length]=oCheckbox.value;}}
oData[sName]=aValues;break;}}}}}
return oData;},destroy:function(){removeButtonEventHandlers.call(this);this._aButtons=null;var aForms=this.element.getElementsByTagName("form"),oForm;if(aForms.length>0){oForm=aForms[0];if(oForm){Event.purgeElement(oForm);if(oForm.parentNode){oForm.parentNode.removeChild(oForm);}
this.form=null;}}
Dialog.superclass.destroy.call(this);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig);};var Dom=YAHOO.util.Dom,SimpleDialog=YAHOO.widget.SimpleDialog,DEFAULT_CONFIG={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};SimpleDialog.ICON_BLOCK="blckicon";SimpleDialog.ICON_ALARM="alrticon";SimpleDialog.ICON_HELP="hlpicon";SimpleDialog.ICON_INFO="infoicon";SimpleDialog.ICON_WARN="warnicon";SimpleDialog.ICON_TIP="tipicon";SimpleDialog.ICON_CSS_CLASSNAME="yui-icon";SimpleDialog.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(SimpleDialog,YAHOO.widget.Dialog,{initDefaultConfig:function(){SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.ICON.key,{handler:this.configIcon,value:DEFAULT_CONFIG.ICON.value,suppressEvent:DEFAULT_CONFIG.ICON.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent,supercedes:DEFAULT_CONFIG.TEXT.supercedes});},init:function(el,userConfig){SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(SimpleDialog);Dom.addClass(this.element,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(SimpleDialog);},registerForm:function(){SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+
this.id+"\" value=\"\"/>";},configIcon:function(type,args,obj){var sIcon=args[0],oBody=this.body,sCSSClass=SimpleDialog.ICON_CSS_CLASSNAME,oIcon,oIconParent;if(sIcon&&sIcon!="none"){oIcon=Dom.getElementsByClassName(sCSSClass,"*",oBody);if(oIcon){oIconParent=oIcon.parentNode;if(oIconParent){oIconParent.removeChild(oIcon);oIcon=null;}}
if(sIcon.indexOf(".")==-1){oIcon=document.createElement("span");oIcon.className=(sCSSClass+" "+sIcon);oIcon.innerHTML="&#160;";}else{oIcon=document.createElement("img");oIcon.src=(this.imageRoot+sIcon);oIcon.className=sCSSClass;}
if(oIcon){oBody.insertBefore(oIcon,oBody.firstChild);}}},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){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;};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,Easing=YAHOO.util.Easing,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn};var fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut};var fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade");}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade");}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay");}
obj.handleUnderlayStart();Dom.setStyle(obj.overlay.element,"visibility","visible");Dom.setStyle(obj.overlay.element,"opacity",0);};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart();};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
Dom.setStyle(obj.overlay.element,"visibility","hidden");Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire();};fade.init();return fade;};ContainerEffect.SLIDE=function(overlay,dur){var x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,slide=new ContainerEffect(overlay,{attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},{attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method: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=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){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 vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso];};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe");};slide.handleCompleteAnimateOut=function(type,args,obj){Dom.setStyle(obj.overlay.element,"visibility","hidden");obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire();};slide.init();return slide;};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;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);},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]";}
return output;}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.4.1",build:"742"});(function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.widget.MenuManager=function(){var m_bInitializedEventHandlers=false,m_oMenus={},m_oVisibleMenus={},m_oItems={},m_oEventTypes={"click":"clickEvent","mousedown":"mouseDownEvent","mouseup":"mouseUpEvent","mouseover":"mouseOverEvent","mouseout":"mouseOutEvent","keydown":"keyDownEvent","keyup":"keyUpEvent","keypress":"keyPressEvent"},m_oFocusedMenuItem=null;function getMenuRootElement(p_oElement){var oParentNode;if(p_oElement&&p_oElement.tagName){switch(p_oElement.tagName.toUpperCase()){case"DIV":oParentNode=p_oElement.parentNode;if((Dom.hasClass(p_oElement,"hd")||Dom.hasClass(p_oElement,"bd")||Dom.hasClass(p_oElement,"ft"))&&oParentNode&&oParentNode.tagName&&oParentNode.tagName.toUpperCase()=="DIV")
{return oParentNode;}
else{return p_oElement;}
break;case"LI":return p_oElement;default:oParentNode=p_oElement.parentNode;if(oParentNode){return getMenuRootElement(oParentNode);}
break;}}}
function onDOMEvent(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oElement=getMenuRootElement(oTarget),sCustomEventType,sTagName,sId,oMenuItem,oMenu;if(oElement){sTagName=oElement.tagName.toUpperCase();if(sTagName=="LI"){sId=oElement.id;if(sId&&m_oItems[sId]){oMenuItem=m_oItems[sId];oMenu=oMenuItem.parent;}}
else if(sTagName=="DIV"){if(oElement.id){oMenu=m_oMenus[oElement.id];}}}
if(oMenu){sCustomEventType=m_oEventTypes[p_oEvent.type];if(oMenuItem&&!oMenuItem.cfg.getProperty("disabled")){oMenuItem[sCustomEventType].fire(p_oEvent);if(p_oEvent.type=="keyup"||p_oEvent.type=="mousedown")
{if(m_oFocusedMenuItem!=oMenuItem){if(m_oFocusedMenuItem){m_oFocusedMenuItem.blurEvent.fire();}
oMenuItem.focusEvent.fire();}}}
oMenu[sCustomEventType].fire(p_oEvent,oMenuItem);}
else if(p_oEvent.type=="mousedown"){if(m_oFocusedMenuItem){m_oFocusedMenuItem.blurEvent.fire();m_oFocusedMenuItem=null;}
for(var i in m_oVisibleMenus){if(YAHOO.lang.hasOwnProperty(m_oVisibleMenus,i)){oMenu=m_oVisibleMenus[i];if(oMenu.cfg.getProperty("clicktohide")&&!(oMenu instanceof YAHOO.widget.MenuBar)&&oMenu.cfg.getProperty("position")=="dynamic"){oMenu.hide();}
else{oMenu.clearActiveItem(true);}}}}
else if(p_oEvent.type=="keyup"){if(m_oFocusedMenuItem){m_oFocusedMenuItem.blurEvent.fire();m_oFocusedMenuItem=null;}}}
function onMenuDestroy(p_sType,p_aArgs,p_oMenu){if(m_oMenus[p_oMenu.id]){this.removeMenu(p_oMenu);}}
function onMenuFocus(p_sType,p_aArgs){var oItem=p_aArgs[0];if(oItem){m_oFocusedMenuItem=oItem;}}
function onMenuBlur(p_sType,p_aArgs){m_oFocusedMenuItem=null;}
function onMenuVisibleConfigChange(p_sType,p_aArgs){var bVisible=p_aArgs[0],sId=this.id;if(bVisible){m_oVisibleMenus[sId]=this;}
else if(m_oVisibleMenus[sId]){delete m_oVisibleMenus[sId];}}
function onItemDestroy(p_sType,p_aArgs){removeItem(this);}
function removeItem(p_oMenuItem){var sId=p_oMenuItem.id;if(sId&&m_oItems[sId]){if(m_oFocusedMenuItem==p_oMenuItem){m_oFocusedMenuItem=null;}
delete m_oItems[sId];p_oMenuItem.destroyEvent.unsubscribe(onItemDestroy);}}
function onItemAdded(p_sType,p_aArgs){var oItem=p_aArgs[0],sId;if(oItem instanceof YAHOO.widget.MenuItem){sId=oItem.id;if(!m_oItems[sId]){m_oItems[sId]=oItem;oItem.destroyEvent.subscribe(onItemDestroy);}}}
return{addMenu:function(p_oMenu){var oDoc;if(p_oMenu instanceof YAHOO.widget.Menu&&p_oMenu.id&&!m_oMenus[p_oMenu.id]){m_oMenus[p_oMenu.id]=p_oMenu;if(!m_bInitializedEventHandlers){oDoc=document;Event.on(oDoc,"mouseover",onDOMEvent,this,true);Event.on(oDoc,"mouseout",onDOMEvent,this,true);Event.on(oDoc,"mousedown",onDOMEvent,this,true);Event.on(oDoc,"mouseup",onDOMEvent,this,true);Event.on(oDoc,"click",onDOMEvent,this,true);Event.on(oDoc,"keydown",onDOMEvent,this,true);Event.on(oDoc,"keyup",onDOMEvent,this,true);Event.on(oDoc,"keypress",onDOMEvent,this,true);m_bInitializedEventHandlers=true;}
p_oMenu.cfg.subscribeToConfigEvent("visible",onMenuVisibleConfigChange);p_oMenu.destroyEvent.subscribe(onMenuDestroy,p_oMenu,this);p_oMenu.itemAddedEvent.subscribe(onItemAdded);p_oMenu.focusEvent.subscribe(onMenuFocus);p_oMenu.blurEvent.subscribe(onMenuBlur);}},removeMenu:function(p_oMenu){var sId,aItems,i;if(p_oMenu){sId=p_oMenu.id;if(m_oMenus[sId]==p_oMenu){aItems=p_oMenu.getItems();if(aItems&&aItems.length>0){i=aItems.length-1;do{removeItem(aItems[i]);}
while(i--);}
delete m_oMenus[sId];if(m_oVisibleMenus[sId]==p_oMenu){delete m_oVisibleMenus[sId];}
if(p_oMenu.cfg){p_oMenu.cfg.unsubscribeFromConfigEvent("visible",onMenuVisibleConfigChange);}
p_oMenu.destroyEvent.unsubscribe(onMenuDestroy,p_oMenu);p_oMenu.itemAddedEvent.unsubscribe(onItemAdded);p_oMenu.focusEvent.unsubscribe(onMenuFocus);p_oMenu.blurEvent.unsubscribe(onMenuBlur);}}},hideVisible:function(){var oMenu;for(var i in m_oVisibleMenus){if(YAHOO.lang.hasOwnProperty(m_oVisibleMenus,i)){oMenu=m_oVisibleMenus[i];if(!(oMenu instanceof YAHOO.widget.MenuBar)&&oMenu.cfg.getProperty("position")=="dynamic"){oMenu.hide();}}}},getVisible:function(){return m_oVisibleMenus;},getMenus:function(){return m_oMenus;},getMenu:function(p_sId){var oMenu=m_oMenus[p_sId];if(oMenu){return oMenu;}},getMenuItem:function(p_sId){var oItem=m_oItems[p_sId];if(oItem){return oItem;}},getMenuItemGroup:function(p_sId){var oUL=Dom.get(p_sId),aItems,oNode,oItem,sId;if(oUL&&oUL.tagName&&oUL.tagName.toUpperCase()=="UL"){oNode=oUL.firstChild;if(oNode){aItems=[];do{sId=oNode.id;if(sId){oItem=this.getMenuItem(sId);if(oItem){aItems[aItems.length]=oItem;}}}
while((oNode=oNode.nextSibling));if(aItems.length>0){return aItems;}}}},getFocusedMenuItem:function(){return m_oFocusedMenuItem;},getFocusedMenu:function(){if(m_oFocusedMenuItem){return(m_oFocusedMenuItem.parent.getRoot());}},toString:function(){return"MenuManager";}};}();})();(function(){YAHOO.widget.Menu=function(p_oElement,p_oConfig){if(p_oConfig){this.parent=p_oConfig.parent;this.lazyLoad=p_oConfig.lazyLoad||p_oConfig.lazyload;this.itemData=p_oConfig.itemData||p_oConfig.itemdata;}
YAHOO.widget.Menu.superclass.constructor.call(this,p_oElement,p_oConfig);};function checkPosition(p_sPosition){if(typeof p_sPosition=="string"){return("dynamic,static".indexOf((p_sPosition.toLowerCase()))!=-1);}}
var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,Module=YAHOO.widget.Module,Overlay=YAHOO.widget.Overlay,Menu=YAHOO.widget.Menu,MenuManager=YAHOO.widget.MenuManager,CustomEvent=YAHOO.util.CustomEvent,Lang=YAHOO.lang,UA=YAHOO.env.ua,m_oShadowTemplate,EVENT_TYPES={"MOUSE_OVER":"mouseover","MOUSE_OUT":"mouseout","MOUSE_DOWN":"mousedown","MOUSE_UP":"mouseup","CLICK":"click","KEY_PRESS":"keypress","KEY_DOWN":"keydown","KEY_UP":"keyup","FOCUS":"focus","BLUR":"blur","ITEM_ADDED":"itemAdded","ITEM_REMOVED":"itemRemoved"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:false,validator:Lang.isBoolean},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:true,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"POSITION":{key:"position",value:"dynamic",validator:checkPosition,supercedes:["visible","iframe"]},"SUBMENU_ALIGNMENT":{key:"submenualignment",value:["tl","tr"],suppressEvent:true},"AUTO_SUBMENU_DISPLAY":{key:"autosubmenudisplay",value:true,validator:Lang.isBoolean,suppressEvent:true},"SHOW_DELAY":{key:"showdelay",value:250,validator:Lang.isNumber,suppressEvent:true},"HIDE_DELAY":{key:"hidedelay",value:0,validator:Lang.isNumber,suppressEvent:true},"SUBMENU_HIDE_DELAY":{key:"submenuhidedelay",value:250,validator:Lang.isNumber,suppressEvent:true},"CLICK_TO_HIDE":{key:"clicktohide",value:true,validator:Lang.isBoolean,suppressEvent:true},"CONTAINER":{key:"container",suppressEvent:true},"SCROLL_INCREMENT":{key:"scrollincrement",value:1,validator:Lang.isNumber,supercedes:["maxheight"],suppressEvent:true},"MIN_SCROLL_HEIGHT":{key:"minscrollheight",value:90,validator:Lang.isNumber,supercedes:["maxheight"],suppressEvent:true},"MAX_HEIGHT":{key:"maxheight",value:0,validator:Lang.isNumber,supercedes:["iframe"],suppressEvent:true},"CLASS_NAME":{key:"classname",value:null,validator:Lang.isString,suppressEvent:true},"DISABLED":{key:"disabled",value:false,validator:Lang.isBoolean,suppressEvent:true}};YAHOO.lang.extend(Menu,Overlay,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:[-10000,-10000],_nHideDelayId:null,_nShowDelayId:null,_nSubmenuHideDelayId:null,_nBodyScrollId:null,_bHideDelayEventHandlersAssigned:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,itemAddedEvent:null,itemRemovedEvent:null,init:function(p_oElement,p_oConfig){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}
var oElement;if(typeof p_oElement=="string"){oElement=document.getElementById(p_oElement);}
else if(p_oElement.tagName){oElement=p_oElement;}
if(oElement&&oElement.tagName){switch(oElement.tagName.toUpperCase()){case"DIV":this.srcElement=oElement;if(!oElement.id){oElement.setAttribute("id",Dom.generateId());}
Menu.superclass.init.call(this,oElement);this.beforeInitEvent.fire(Menu);break;case"SELECT":this.srcElement=oElement;Menu.superclass.init.call(this,Dom.generateId());this.beforeInitEvent.fire(Menu);break;}}
else{Menu.superclass.init.call(this,p_oElement);this.beforeInitEvent.fire(Menu);}
if(this.element){Dom.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.renderEvent.subscribe(this.onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this.positionOffScreen);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);if(UA.gecko||UA.webkit){this.cfg.subscribeToConfigEvent("y",this._onYChange);}
if(p_oConfig){this.cfg.applyConfig(p_oConfig,true);}
MenuManager.addMenu(this);this.initEvent.fire(Menu);}},_initSubTree:function(){var oSrcElement=this.srcElement,sSrcElementTagName,nGroup,sGroupTitleTagName,oNode,aListElements,nListElements,i;if(oSrcElement){sSrcElementTagName=(oSrcElement.tagName&&oSrcElement.tagName.toUpperCase());if(sSrcElementTagName=="DIV"){oNode=this.body.firstChild;if(oNode){nGroup=0;sGroupTitleTagName=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(oNode&&oNode.tagName){switch(oNode.tagName.toUpperCase()){case sGroupTitleTagName:this._aGroupTitleElements[nGroup]=oNode;break;case"UL":this._aListElements[nGroup]=oNode;this._aItemGroups[nGroup]=[];nGroup++;break;}}}
while((oNode=oNode.nextSibling));if(this._aListElements[0]){Dom.addClass(this._aListElements[0],"first-of-type");}}}
oNode=null;if(sSrcElementTagName){switch(sSrcElementTagName){case"DIV":aListElements=this._aListElements;nListElements=aListElements.length;if(nListElements>0){i=nListElements-1;do{oNode=aListElements[i].firstChild;if(oNode){do{if(oNode&&oNode.tagName&&oNode.tagName.toUpperCase()=="LI"){this.addItem(new this.ITEM_TYPE(oNode,{parent:this}),i);}}
while((oNode=oNode.nextSibling));}}
while(i--);}
break;case"SELECT":oNode=oSrcElement.firstChild;do{if(oNode&&oNode.tagName){switch(oNode.tagName.toUpperCase()){case"OPTGROUP":case"OPTION":this.addItem(new this.ITEM_TYPE(oNode,{parent:this}));break;}}}
while((oNode=oNode.nextSibling));break;}}}},_getFirstEnabledItem:function(){var aItems=this.getItems(),nItems=aItems.length,oItem;for(var i=0;i<nItems;i++){oItem=aItems[i];if(oItem&&!oItem.cfg.getProperty("disabled")&&oItem.element.style.display!="none"){return oItem;}}},_addItemToGroup:function(p_nGroupIndex,p_oItem,p_nItemIndex){var oItem,nGroupIndex,aGroup,oGroupItem,bAppend,oNextItemSibling,nItemIndex;function getNextItemSibling(p_aArray,p_nStartIndex){return(p_aArray[p_nStartIndex]||getNextItemSibling(p_aArray,(p_nStartIndex+1)));}
if(p_oItem instanceof this.ITEM_TYPE){oItem=p_oItem;oItem.parent=this;}
else if(typeof p_oItem=="string"){oItem=new this.ITEM_TYPE(p_oItem,{parent:this});}
else if(typeof p_oItem=="object"){p_oItem.parent=this;oItem=new this.ITEM_TYPE(p_oItem.text,p_oItem);}
if(oItem){if(oItem.cfg.getProperty("selected")){this.activeItem=oItem;}
nGroupIndex=typeof p_nGroupIndex=="number"?p_nGroupIndex:0;aGroup=this._getItemGroup(nGroupIndex);if(!aGroup){aGroup=this._createItemGroup(nGroupIndex);}
if(typeof p_nItemIndex=="number"){bAppend=(p_nItemIndex>=aGroup.length);if(aGroup[p_nItemIndex]){aGroup.splice(p_nItemIndex,0,oItem);}
else{aGroup[p_nItemIndex]=oItem;}
oGroupItem=aGroup[p_nItemIndex];if(oGroupItem){if(bAppend&&(!oGroupItem.element.parentNode||oGroupItem.element.parentNode.nodeType==11)){this._aListElements[nGroupIndex].appendChild(oGroupItem.element);}
else{oNextItemSibling=getNextItemSibling(aGroup,(p_nItemIndex+1));if(oNextItemSibling&&(!oGroupItem.element.parentNode||oGroupItem.element.parentNode.nodeType==11)){this._aListElements[nGroupIndex].insertBefore(oGroupItem.element,oNextItemSibling.element);}}
oGroupItem.parent=this;this._subscribeToItemEvents(oGroupItem);this._configureSubmenu(oGroupItem);this._updateItemProperties(nGroupIndex);this.itemAddedEvent.fire(oGroupItem);this.changeContentEvent.fire();return oGroupItem;}}
else{nItemIndex=aGroup.length;aGroup[nItemIndex]=oItem;oGroupItem=aGroup[nItemIndex];if(oGroupItem){if(!Dom.isAncestor(this._aListElements[nGroupIndex],oGroupItem.element)){this._aListElements[nGroupIndex].appendChild(oGroupItem.element);}
oGroupItem.element.setAttribute("groupindex",nGroupIndex);oGroupItem.element.setAttribute("index",nItemIndex);oGroupItem.parent=this;oGroupItem.index=nItemIndex;oGroupItem.groupIndex=nGroupIndex;this._subscribeToItemEvents(oGroupItem);this._configureSubmenu(oGroupItem);if(nItemIndex===0){Dom.addClass(oGroupItem.element,"first-of-type");}
this.itemAddedEvent.fire(oGroupItem);this.changeContentEvent.fire();return oGroupItem;}}}},_removeItemFromGroupByIndex:function(p_nGroupIndex,p_nItemIndex){var nGroupIndex=typeof p_nGroupIndex=="number"?p_nGroupIndex:0,aGroup=this._getItemGroup(nGroupIndex),aArray,oItem,oUL;if(aGroup){aArray=aGroup.splice(p_nItemIndex,1);oItem=aArray[0];if(oItem){this._updateItemProperties(nGroupIndex);if(aGroup.length===0){oUL=this._aListElements[nGroupIndex];if(this.body&&oUL){this.body.removeChild(oUL);}
this._aItemGroups.splice(nGroupIndex,1);this._aListElements.splice(nGroupIndex,1);oUL=this._aListElements[0];if(oUL){Dom.addClass(oUL,"first-of-type");}}
this.itemRemovedEvent.fire(oItem);this.changeContentEvent.fire();return oItem;}}},_removeItemFromGroupByValue:function(p_nGroupIndex,p_oItem){var aGroup=this._getItemGroup(p_nGroupIndex),nItems,nItemIndex,i;if(aGroup){nItems=aGroup.length;nItemIndex=-1;if(nItems>0){i=nItems-1;do{if(aGroup[i]==p_oItem){nItemIndex=i;break;}}
while(i--);if(nItemIndex>-1){return(this._removeItemFromGroupByIndex(p_nGroupIndex,nItemIndex));}}}},_updateItemProperties:function(p_nGroupIndex){var aGroup=this._getItemGroup(p_nGroupIndex),nItems=aGroup.length,oItem,oLI,i;if(nItems>0){i=nItems-1;do{oItem=aGroup[i];if(oItem){oLI=oItem.element;oItem.index=i;oItem.groupIndex=p_nGroupIndex;oLI.setAttribute("groupindex",p_nGroupIndex);oLI.setAttribute("index",i);Dom.removeClass(oLI,"first-of-type");}}
while(i--);if(oLI){Dom.addClass(oLI,"first-of-type");}}},_createItemGroup:function(p_nIndex){var oUL;if(!this._aItemGroups[p_nIndex]){this._aItemGroups[p_nIndex]=[];oUL=document.createElement("ul");this._aListElements[p_nIndex]=oUL;return this._aItemGroups[p_nIndex];}},_getItemGroup:function(p_nIndex){var nIndex=((typeof p_nIndex=="number")?p_nIndex:0);return this._aItemGroups[nIndex];},_configureSubmenu:function(p_oItem){var oSubmenu=p_oItem.cfg.getProperty("submenu");if(oSubmenu){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,oSubmenu,true);this.renderEvent.subscribe(this._onParentMenuRender,oSubmenu,true);oSubmenu.beforeShowEvent.subscribe(this._onSubmenuBeforeShow);}},_subscribeToItemEvents:function(p_oItem){p_oItem.focusEvent.subscribe(this._onMenuItemFocus);p_oItem.blurEvent.subscribe(this._onMenuItemBlur);p_oItem.destroyEvent.subscribe(this._onMenuItemDestroy,p_oItem,this);p_oItem.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,p_oItem,this);},_onVisibleChange:function(p_sType,p_aArgs){var bVisible=p_aArgs[0];if(bVisible){Dom.addClass(this.element,"visible");}
else{Dom.removeClass(this.element,"visible");}},_cancelHideDelay:function(){var oRoot=this.getRoot();if(oRoot._nHideDelayId){window.clearTimeout(oRoot._nHideDelayId);}},_execHideDelay:function(){this._cancelHideDelay();var oRoot=this.getRoot(),me=this;function hideMenu(){if(oRoot.activeItem){oRoot.clearActiveItem();}
if(oRoot==me&&!(me instanceof YAHOO.widget.MenuBar)&&me.cfg.getProperty("position")=="dynamic"){me.hide();}}
oRoot._nHideDelayId=window.setTimeout(hideMenu,oRoot.cfg.getProperty("hidedelay"));},_cancelShowDelay:function(){var oRoot=this.getRoot();if(oRoot._nShowDelayId){window.clearTimeout(oRoot._nShowDelayId);}},_execShowDelay:function(p_oMenu){var oRoot=this.getRoot();function showMenu(){if(p_oMenu.parent.cfg.getProperty("selected")){p_oMenu.show();}}
oRoot._nShowDelayId=window.setTimeout(showMenu,oRoot.cfg.getProperty("showdelay"));},_execSubmenuHideDelay:function(p_oSubmenu,p_nMouseX,p_nHideDelay){var me=this;p_oSubmenu._nSubmenuHideDelayId=window.setTimeout(function(){if(me._nCurrentMouseX>(p_nMouseX+10)){p_oSubmenu._nSubmenuHideDelayId=window.setTimeout(function(){p_oSubmenu.hide();},p_nHideDelay);}
else{p_oSubmenu.hide();}},50);},_disableScrollHeader:function(){if(!this._bHeaderDisabled){Dom.addClass(this.header,"topscrollbar_disabled");this._bHeaderDisabled=true;}},_disableScrollFooter:function(){if(!this._bFooterDisabled){Dom.addClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=true;}},_enableScrollHeader:function(){if(this._bHeaderDisabled){Dom.removeClass(this.header,"topscrollbar_disabled");this._bHeaderDisabled=false;}},_enableScrollFooter:function(){if(this._bFooterDisabled){Dom.removeClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=false;}},_onMouseOver:function(p_sType,p_aArgs){if(this._bStopMouseEventHandlers){return false;}
var oEvent=p_aArgs[0],oItem=p_aArgs[1],oTarget=Event.getTarget(oEvent),oParentMenu,nShowDelay,bShowDelay,oActiveItem,oItemCfg,oSubmenu;if(!this._bHandledMouseOverEvent&&(oTarget==this.element||Dom.isAncestor(this.element,oTarget))){this._nCurrentMouseX=0;Event.on(this.element,"mousemove",this._onMouseMove,this,true);this.clearActiveItem();if(this.parent&&this._nSubmenuHideDelayId){window.clearTimeout(this._nSubmenuHideDelayId);this.parent.cfg.setProperty("selected",true);oParentMenu=this.parent.parent;oParentMenu._bHandledMouseOutEvent=true;oParentMenu._bHandledMouseOverEvent=false;}
this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false;}
if(oItem&&!oItem.handledMouseOverEvent&&!oItem.cfg.getProperty("disabled")&&(oTarget==oItem.element||Dom.isAncestor(oItem.element,oTarget))){nShowDelay=this.cfg.getProperty("showdelay");bShowDelay=(nShowDelay>0);if(bShowDelay){this._cancelShowDelay();}
oActiveItem=this.activeItem;if(oActiveItem){oActiveItem.cfg.setProperty("selected",false);}
oItemCfg=oItem.cfg;oItemCfg.setProperty("selected",true);if(this.hasFocus()){oItem.focus();}
if(this.cfg.getProperty("autosubmenudisplay")){oSubmenu=oItemCfg.getProperty("submenu");if(oSubmenu){if(bShowDelay){this._execShowDelay(oSubmenu);}
else{oSubmenu.show();}}}
oItem.handledMouseOverEvent=true;oItem.handledMouseOutEvent=false;}},_onMouseOut:function(p_sType,p_aArgs){if(this._bStopMouseEventHandlers){return false;}
var oEvent=p_aArgs[0],oItem=p_aArgs[1],oRelatedTarget=Event.getRelatedTarget(oEvent),bMovingToSubmenu=false,oItemCfg,oSubmenu,nSubmenuHideDelay,nShowDelay;if(oItem&&!oItem.cfg.getProperty("disabled")){oItemCfg=oItem.cfg;oSubmenu=oItemCfg.getProperty("submenu");if(oSubmenu&&(oRelatedTarget==oSubmenu.element||Dom.isAncestor(oSubmenu.element,oRelatedTarget))){bMovingToSubmenu=true;}
if(!oItem.handledMouseOutEvent&&((oRelatedTarget!=oItem.element&&!Dom.isAncestor(oItem.element,oRelatedTarget))||bMovingToSubmenu)){if(!bMovingToSubmenu){oItem.cfg.setProperty("selected",false);if(oSubmenu){nSubmenuHideDelay=this.cfg.getProperty("submenuhidedelay");nShowDelay=this.cfg.getProperty("showdelay");if(!(this instanceof YAHOO.widget.MenuBar)&&nSubmenuHideDelay>0&&nShowDelay>=nSubmenuHideDelay){this._execSubmenuHideDelay(oSubmenu,Event.getPageX(oEvent),nSubmenuHideDelay);}
else{oSubmenu.hide();}}}
oItem.handledMouseOutEvent=true;oItem.handledMouseOverEvent=false;}}
if(!this._bHandledMouseOutEvent&&((oRelatedTarget!=this.element&&!Dom.isAncestor(this.element,oRelatedTarget))||bMovingToSubmenu)){Event.removeListener(this.element,"mousemove",this._onMouseMove);this._nCurrentMouseX=Event.getPageX(oEvent);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false;}},_onMouseMove:function(p_oEvent,p_oMenu){if(this._bStopMouseEventHandlers){return false;}
this._nCurrentMouseX=Event.getPageX(p_oEvent);},_onClick:function(p_sType,p_aArgs){var oEvent=p_aArgs[0],oItem=p_aArgs[1],oSubmenu,bInMenuAnchor=false,oRoot,sId,sURL,nHashPos,nLen;if(oItem&&!oItem.cfg.getProperty("disabled")){oSubmenu=oItem.cfg.getProperty("submenu");sURL=oItem.cfg.getProperty("url");if(sURL){nHashPos=sURL.indexOf("#");nLen=sURL.length;if(nHashPos!=-1){sURL=sURL.substr(nHashPos,nLen);nLen=sURL.length;if(nLen>1){sId=sURL.substr(1,nLen);bInMenuAnchor=Dom.isAncestor(this.element,sId);}
else if(nLen===1){bInMenuAnchor=true;}}}
if(bInMenuAnchor&&!oItem.cfg.getProperty("target")){Event.preventDefault(oEvent);oItem.focus();}
if(!oSubmenu){oRoot=this.getRoot();if(oRoot instanceof YAHOO.widget.MenuBar||oRoot.cfg.getProperty("position")=="static"){oRoot.clearActiveItem();}
else{oRoot.hide();}}}},_onKeyDown:function(p_sType,p_aArgs){var oEvent=p_aArgs[0],oItem=p_aArgs[1],me=this,oSubmenu,oItemCfg,oParentItem,oRoot,oNextItem,oBody,nBodyScrollTop,nBodyOffsetHeight,aItems,nItems,nNextItemOffsetTop,nScrollTarget,oParentMenu;function stopMouseEventHandlers(){me._bStopMouseEventHandlers=true;window.setTimeout(function(){me._bStopMouseEventHandlers=false;},10);}
if(oItem&&!oItem.cfg.getProperty("disabled")){oItemCfg=oItem.cfg;oParentItem=this.parent;switch(oEvent.keyCode){case 38:case 40:oNextItem=(oEvent.keyCode==38)?oItem.getPreviousEnabledSibling():oItem.getNextEnabledSibling();if(oNextItem){this.clearActiveItem();oNextItem.cfg.setProperty("selected",true);oNextItem.focus();if(this.cfg.getProperty("maxheight")>0){oBody=this.body;nBodyScrollTop=oBody.scrollTop;nBodyOffsetHeight=oBody.offsetHeight;aItems=this.getItems();nItems=aItems.length-1;nNextItemOffsetTop=oNextItem.element.offsetTop;if(oEvent.keyCode==40){if(nNextItemOffsetTop>=(nBodyOffsetHeight+nBodyScrollTop)){oBody.scrollTop=nNextItemOffsetTop-nBodyOffsetHeight;}
else if(nNextItemOffsetTop<=nBodyScrollTop){oBody.scrollTop=0;}
if(oNextItem==aItems[nItems]){oBody.scrollTop=oNextItem.element.offsetTop;}}
else{if(nNextItemOffsetTop<=nBodyScrollTop){oBody.scrollTop=nNextItemOffsetTop-oNextItem.element.offsetHeight;}
else if(nNextItemOffsetTop>=(nBodyScrollTop+nBodyOffsetHeight)){oBody.scrollTop=nNextItemOffsetTop;}
if(oNextItem==aItems[0]){oBody.scrollTop=0;}}
nBodyScrollTop=oBody.scrollTop;nScrollTarget=oBody.scrollHeight-oBody.offsetHeight;if(nBodyScrollTop===0){this._disableScrollHeader();this._enableScrollFooter();}
else if(nBodyScrollTop==nScrollTarget){this._enableScrollHeader();this._disableScrollFooter();}
else{this._enableScrollHeader();this._enableScrollFooter();}}}
Event.preventDefault(oEvent);stopMouseEventHandlers();break;case 39:oSubmenu=oItemCfg.getProperty("submenu");if(oSubmenu){if(!oItemCfg.getProperty("selected")){oItemCfg.setProperty("selected",true);}
oSubmenu.show();oSubmenu.setInitialFocus();oSubmenu.setInitialSelection();}
else{oRoot=this.getRoot();if(oRoot instanceof YAHOO.widget.MenuBar){oNextItem=oRoot.activeItem.getNextEnabledSibling();if(oNextItem){oRoot.clearActiveItem();oNextItem.cfg.setProperty("selected",true);oSubmenu=oNextItem.cfg.getProperty("submenu");if(oSubmenu){oSubmenu.show();}
oNextItem.focus();}}}
Event.preventDefault(oEvent);stopMouseEventHandlers();break;case 37:if(oParentItem){oParentMenu=oParentItem.parent;if(oParentMenu instanceof YAHOO.widget.MenuBar){oNextItem=oParentMenu.activeItem.getPreviousEnabledSibling();if(oNextItem){oParentMenu.clearActiveItem();oNextItem.cfg.setProperty("selected",true);oSubmenu=oNextItem.cfg.getProperty("submenu");if(oSubmenu){oSubmenu.show();}
oNextItem.focus();}}
else{this.hide();oParentItem.focus();}}
Event.preventDefault(oEvent);stopMouseEventHandlers();break;}}
if(oEvent.keyCode==27){if(this.cfg.getProperty("position")=="dynamic"){this.hide();if(this.parent){this.parent.focus();}}
else if(this.activeItem){oSubmenu=this.activeItem.cfg.getProperty("submenu");if(oSubmenu&&oSubmenu.cfg.getProperty("visible")){oSubmenu.hide();this.activeItem.focus();}
else{this.activeItem.blur();this.activeItem.cfg.setProperty("selected",false);}}
Event.preventDefault(oEvent);}},_onKeyPress:function(p_sType,p_aArgs){var oEvent=p_aArgs[0];if(oEvent.keyCode==40||oEvent.keyCode==38){Event.preventDefault(oEvent);}},_onYChange:function(p_sType,p_aArgs){var oParent=this.parent,nScrollTop,oIFrame,nY;if(oParent){nScrollTop=oParent.parent.body.scrollTop;if(nScrollTop>0){nY=(this.cfg.getProperty("y")-nScrollTop);Dom.setY(this.element,nY);oIFrame=this.iframe;if(oIFrame){Dom.setY(oIFrame,nY);}
this.cfg.setProperty("y",nY,true);}}},_onScrollTargetMouseOver:function(p_oEvent,p_oMenu){this._cancelHideDelay();var oTarget=Event.getTarget(p_oEvent),oBody=this.body,me=this,nScrollIncrement=this.cfg.getProperty("scrollincrement"),nScrollTarget,fnScrollFunction;function scrollBodyDown(){var nScrollTop=oBody.scrollTop;if(nScrollTop<nScrollTarget){oBody.scrollTop=(nScrollTop+nScrollIncrement);me._enableScrollHeader();}
else{oBody.scrollTop=nScrollTarget;window.clearInterval(me._nBodyScrollId);me._disableScrollFooter();}}
function scrollBodyUp(){var nScrollTop=oBody.scrollTop;if(nScrollTop>0){oBody.scrollTop=(nScrollTop-nScrollIncrement);me._enableScrollFooter();}
else{oBody.scrollTop=0;window.clearInterval(me._nBodyScrollId);me._disableScrollHeader();}}
if(Dom.hasClass(oTarget,"hd")){fnScrollFunction=scrollBodyUp;}
else{nScrollTarget=oBody.scrollHeight-oBody.offsetHeight;fnScrollFunction=scrollBodyDown;}
this._nBodyScrollId=window.setInterval(fnScrollFunction,10);},_onScrollTargetMouseOut:function(p_oEvent,p_oMenu){window.clearInterval(this._nBodyScrollId);this._cancelHideDelay();},_onInit:function(p_sType,p_aArgs){this.cfg.subscribeToConfigEvent("visible",this._onVisibleChange);var bRootMenu=!this.parent,bLazyLoad=this.lazyLoad;if(((bRootMenu&&!bLazyLoad)||(bRootMenu&&(this.cfg.getProperty("visible")||this.cfg.getProperty("position")=="static"))||(!bRootMenu&&!bLazyLoad))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}
if(this.itemData){this.addItems(this.itemData);}}
else if(bLazyLoad){this.cfg.fireQueue();}},_onBeforeRender:function(p_sType,p_aArgs){var oEl=this.element,nListElements=this._aListElements.length,bFirstList=true,i=0,oUL,oGroupTitle;if(nListElements>0){do{oUL=this._aListElements[i];if(oUL){if(bFirstList){Dom.addClass(oUL,"first-of-type");bFirstList=false;}
if(!Dom.isAncestor(oEl,oUL)){this.appendToBody(oUL);}
oGroupTitle=this._aGroupTitleElements[i];if(oGroupTitle){if(!Dom.isAncestor(oEl,oGroupTitle)){oUL.parentNode.insertBefore(oGroupTitle,oUL);}
Dom.addClass(oUL,"hastitle");}}
i++;}
while(i<nListElements);}},_onRender:function(p_sType,p_aArgs){if(this.cfg.getProperty("position")=="dynamic"){if(!this.cfg.getProperty("visible")){this.positionOffScreen();}}},_onBeforeShow:function(p_sType,p_aArgs){var nOptions,n,nViewportHeight,oRegion,oSrcElement;if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}
if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcElement&&this.parent.parent.srcElement.tagName.toUpperCase()=="SELECT"){nOptions=this.itemData.length;for(n=0;n<nOptions;n++){if(this.itemData[n].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[n])));}}}
else{this.addItems(this.itemData);}}
oSrcElement=this.srcElement;if(oSrcElement){if(oSrcElement.tagName.toUpperCase()=="SELECT"){if(Dom.inDocument(oSrcElement)){this.render(oSrcElement.parentNode);}
else{this.render(this.cfg.getProperty("container"));}}
else{this.render();}}
else{if(this.parent){this.render(this.parent.element);}
else{this.render(this.cfg.getProperty("container"));}}}
var nMaxHeight=this.cfg.getProperty("maxheight"),nMinScrollHeight=this.cfg.getProperty("minscrollheight"),bDynamicPos=this.cfg.getProperty("position")=="dynamic";if(!this.parent&&bDynamicPos){this.cfg.refireEvent("xy");}
function clearMaxHeight(){this.cfg.setProperty("maxheight",0);this.hideEvent.unsubscribe(clearMaxHeight);}
if(!(this instanceof YAHOO.widget.MenuBar)&&bDynamicPos){if(nMaxHeight===0){nViewportHeight=Dom.getViewportHeight();if(this.parent&&this.parent.parent instanceof YAHOO.widget.MenuBar){oRegion=YAHOO.util.Region.getRegion(this.parent.element);nViewportHeight=(nViewportHeight-oRegion.bottom);}
if(this.element.offsetHeight>=nViewportHeight){nMaxHeight=(nViewportHeight-(Overlay.VIEWPORT_OFFSET*2));if(nMaxHeight<nMinScrollHeight){nMaxHeight=nMinScrollHeight;}
this.cfg.setProperty("maxheight",nMaxHeight);this.hideEvent.subscribe(clearMaxHeight);}}}},_onShow:function(p_sType,p_aArgs){var oParent=this.parent,oParentMenu,aParentAlignment,aAlignment;function disableAutoSubmenuDisplay(p_oEvent){var oTarget;if(p_oEvent.type=="mousedown"||(p_oEvent.type=="keydown"&&p_oEvent.keyCode==27)){oTarget=Event.getTarget(p_oEvent);if(oTarget!=oParentMenu.element||!Dom.isAncestor(oParentMenu.element,oTarget)){oParentMenu.cfg.setProperty("autosubmenudisplay",false);Event.removeListener(document,"mousedown",disableAutoSubmenuDisplay);Event.removeListener(document,"keydown",disableAutoSubmenuDisplay);}}}
if(oParent){oParentMenu=oParent.parent;aParentAlignment=oParentMenu.cfg.getProperty("submenualignment");aAlignment=this.cfg.getProperty("submenualignment");if((aParentAlignment[0]!=aAlignment[0])&&(aParentAlignment[1]!=aAlignment[1])){this.cfg.setProperty("submenualignment",[aParentAlignment[0],aParentAlignment[1]]);}
if(!oParentMenu.cfg.getProperty("autosubmenudisplay")&&(oParentMenu instanceof YAHOO.widget.MenuBar||oParentMenu.cfg.getProperty("position")=="static")){oParentMenu.cfg.setProperty("autosubmenudisplay",true);Event.on(document,"mousedown",disableAutoSubmenuDisplay);Event.on(document,"keydown",disableAutoSubmenuDisplay);}}},_onBeforeHide:function(p_sType,p_aArgs){var oActiveItem=this.activeItem,oConfig,oSubmenu;if(oActiveItem){oConfig=oActiveItem.cfg;oConfig.setProperty("selected",false);oSubmenu=oConfig.getProperty("submenu");if(oSubmenu){oSubmenu.hide();}}
if(this.getRoot()==this){this.blur();}},_onParentMenuConfigChange:function(p_sType,p_aArgs,p_oSubmenu){var sPropertyName=p_aArgs[0][0],oPropertyValue=p_aArgs[0][1];switch(sPropertyName){case"iframe":case"constraintoviewport":case"hidedelay":case"showdelay":case"submenuhidedelay":case"clicktohide":case"effect":case"classname":case"scrollincrement":case"minscrollheight":p_oSubmenu.cfg.setProperty(sPropertyName,oPropertyValue);break;}},_onParentMenuRender:function(p_sType,p_aArgs,p_oSubmenu){var oParentCfg=p_oSubmenu.parent.parent.cfg,oConfig={constraintoviewport:oParentCfg.getProperty("constraintoviewport"),xy:[0,0],clicktohide:oParentCfg.getProperty("clicktohide"),effect:oParentCfg.getProperty("effect"),showdelay:oParentCfg.getProperty("showdelay"),hidedelay:oParentCfg.getProperty("hidedelay"),submenuhidedelay:oParentCfg.getProperty("submenuhidedelay"),classname:oParentCfg.getProperty("classname"),scrollincrement:oParentCfg.getProperty("scrollincrement"),minscrollheight:oParentCfg.getProperty("minscrollheight"),iframe:oParentCfg.getProperty("iframe")},oLI;p_oSubmenu.cfg.applyConfig(oConfig);if(!this.lazyLoad){oLI=this.parent.element;if(this.element.parentNode==oLI){this.render();}
else{this.render(oLI);}}},_onSubmenuBeforeShow:function(p_sType,p_aArgs){var oParent=this.parent,aAlignment=oParent.parent.cfg.getProperty("submenualignment");if(!this.cfg.getProperty("context")){this.cfg.setProperty("context",[oParent.element,aAlignment[0],aAlignment[1]]);}
else{this.align();}},_onMenuItemFocus:function(p_sType,p_aArgs){this.parent.focusEvent.fire(this);},_onMenuItemBlur:function(p_sType,p_aArgs){this.parent.blurEvent.fire(this);},_onMenuItemDestroy:function(p_sType,p_aArgs,p_oItem){this._removeItemFromGroupByValue(p_oItem.groupIndex,p_oItem);},_onMenuItemConfigChange:function(p_sType,p_aArgs,p_oItem){var sPropertyName=p_aArgs[0][0],oPropertyValue=p_aArgs[0][1],oSubmenu;switch(sPropertyName){case"selected":if(oPropertyValue===true){this.activeItem=p_oItem;}
break;case"submenu":oSubmenu=p_aArgs[0][1];if(oSubmenu){this._configureSubmenu(p_oItem);}
break;}},enforceConstraints:function(type,args,obj){var oParentMenuItem=this.parent,nViewportOffset=Overlay.VIEWPORT_OFFSET,oElement=this.element,oConfig=this.cfg,pos=args[0],offsetHeight=oElement.offsetHeight,offsetWidth=oElement.offsetWidth,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),nPadding=(oParentMenuItem&&oParentMenuItem.parent instanceof YAHOO.widget.MenuBar)?0:nViewportOffset,aContext=oConfig.getProperty("context"),oContextElement=aContext?aContext[0]:null,topConstraint,leftConstraint,bottomConstraint,rightConstraint,scrollX,scrollY,x,y;if(offsetWidth<viewPortWidth){x=pos[0];scrollX=Dom.getDocumentScrollLeft();leftConstraint=scrollX+nPadding;rightConstraint=scrollX+viewPortWidth-offsetWidth-nPadding;if(x<nViewportOffset){x=leftConstraint;}else if((x+offsetWidth)>viewPortWidth){if(oContextElement&&((x-oContextElement.offsetWidth)>offsetWidth)){if(oParentMenuItem&&oParentMenuItem.parent instanceof YAHOO.widget.MenuBar){x=(x-(offsetWidth-oContextElement.offsetWidth));}
else{x=(x-(oContextElement.offsetWidth+offsetWidth));}}
else{x=rightConstraint;}}}
if(offsetHeight<viewPortHeight){y=pos[1];scrollY=Dom.getDocumentScrollTop();topConstraint=scrollY+nPadding;bottomConstraint=scrollY+viewPortHeight-offsetHeight-nPadding;if(y<nViewportOffset){y=topConstraint;}else if(y>bottomConstraint){if(oContextElement&&(y>offsetHeight)){y=((y+oContextElement.offsetHeight)-offsetHeight);}
else{y=bottomConstraint;}}}
oConfig.setProperty("x",x,true);oConfig.setProperty("y",y,true);oConfig.setProperty("xy",[x,y],true);},configVisible:function(p_sType,p_aArgs,p_oMenu){var bVisible,sDisplay;if(this.cfg.getProperty("position")=="dynamic"){Menu.superclass.configVisible.call(this,p_sType,p_aArgs,p_oMenu);}
else{bVisible=p_aArgs[0];sDisplay=Dom.getStyle(this.element,"display");Dom.setStyle(this.element,"visibility","visible");if(bVisible){if(sDisplay!="block"){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire();}}
else{if(sDisplay=="block"){this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire();}}}},configPosition:function(p_sType,p_aArgs,p_oMenu){var oElement=this.element,sCSSPosition=p_aArgs[0]=="static"?"static":"absolute",oCfg=this.cfg,nZIndex;Dom.setStyle(oElement,"position",sCSSPosition);if(sCSSPosition=="static"){Dom.setStyle(oElement,"display","block");oCfg.setProperty("visible",true);}
else{Dom.setStyle(oElement,"visibility","hidden");}
if(sCSSPosition=="absolute"){nZIndex=oCfg.getProperty("zindex");if(!nZIndex||nZIndex===0){nZIndex=this.parent?(this.parent.parent.cfg.getProperty("zindex")+1):1;oCfg.setProperty("zindex",nZIndex);}}},configIframe:function(p_sType,p_aArgs,p_oMenu){if(this.cfg.getProperty("position")=="dynamic"){Menu.superclass.configIframe.call(this,p_sType,p_aArgs,p_oMenu);}},configHideDelay:function(p_sType,p_aArgs,p_oMenu){var nHideDelay=p_aArgs[0],oMouseOutEvent=this.mouseOutEvent,oMouseOverEvent=this.mouseOverEvent,oKeyDownEvent=this.keyDownEvent;if(nHideDelay>0){if(!this._bHideDelayEventHandlersAssigned){oMouseOutEvent.subscribe(this._execHideDelay);oMouseOverEvent.subscribe(this._cancelHideDelay);oKeyDownEvent.subscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=true;}}
else{oMouseOutEvent.unsubscribe(this._execHideDelay);oMouseOverEvent.unsubscribe(this._cancelHideDelay);oKeyDownEvent.unsubscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=false;}},configContainer:function(p_sType,p_aArgs,p_oMenu){var oElement=p_aArgs[0];if(typeof oElement=='string'){this.cfg.setProperty("container",document.getElementById(oElement),true);}},_setMaxHeight:function(p_sType,p_aArgs,p_nMaxHeight){this.cfg.setProperty("maxheight",p_nMaxHeight);this.renderEvent.unsubscribe(this._setMaxHeight);},configMaxHeight:function(p_sType,p_aArgs,p_oMenu){var nMaxHeight=p_aArgs[0],oElement=this.element,oBody=this.body,oHeader=this.header,oFooter=this.footer,fnMouseOver=this._onScrollTargetMouseOver,fnMouseOut=this._onScrollTargetMouseOut,nMinScrollHeight=this.cfg.getProperty("minscrollheight"),nHeight,nOffsetWidth;if(nMaxHeight!==0&&nMaxHeight<nMinScrollHeight){nMaxHeight=nMinScrollHeight;}
if(this.lazyLoad&&!oBody){this.renderEvent.unsubscribe(this._setMaxHeight);if(nMaxHeight>0){this.renderEvent.subscribe(this._setMaxHeight,nMaxHeight,this);}
return;}
Dom.setStyle(oBody,"height","");Dom.removeClass(oBody,"yui-menu-body-scrolled");if(UA.gecko&&this.parent&&this.parent.parent&&this.parent.parent.cfg.getProperty("position")=="dynamic"&&!this.cfg.getProperty("width")){nOffsetWidth=oElement.offsetWidth;oElement.style.width=nOffsetWidth+"px";oElement.style.width=(nOffsetWidth-(oElement.offsetWidth-nOffsetWidth))+"px";}
if(!oHeader&&!oFooter){this.setHeader("&#32;");this.setFooter("&#32;");oHeader=this.header;oFooter=this.footer;Dom.addClass(oHeader,"topscrollbar");Dom.addClass(oFooter,"bottomscrollbar");oElement.insertBefore(oHeader,oBody);oElement.appendChild(oFooter);}
nHeight=(nMaxHeight-(oHeader.offsetHeight+oHeader.offsetHeight));if(nHeight>0&&(oBody.offsetHeight>nMaxHeight)){Dom.addClass(oBody,"yui-menu-body-scrolled");Dom.setStyle(oBody,"height",(nHeight+"px"));Event.on(oHeader,"mouseover",fnMouseOver,this,true);Event.on(oHeader,"mouseout",fnMouseOut,this,true);Event.on(oFooter,"mouseover",fnMouseOver,this,true);Event.on(oFooter,"mouseout",fnMouseOut,this,true);this._disableScrollHeader();this._enableScrollFooter();}
else if(oHeader&&oFooter){this._enableScrollHeader();this._enableScrollFooter();Event.removeListener(oHeader,"mouseover",fnMouseOver);Event.removeListener(oHeader,"mouseout",fnMouseOut);Event.removeListener(oFooter,"mouseover",fnMouseOver);Event.removeListener(oFooter,"mouseout",fnMouseOut);oElement.removeChild(oHeader);oElement.removeChild(oFooter);this.header=null;this.footer=null;}
this.cfg.refireEvent("iframe");},configClassName:function(p_sType,p_aArgs,p_oMenu){var sClassName=p_aArgs[0];if(this._sClassName){Dom.removeClass(this.element,this._sClassName);}
Dom.addClass(this.element,sClassName);this._sClassName=sClassName;},_onItemAdded:function(p_sType,p_aArgs){var oItem=p_aArgs[0];if(oItem){oItem.cfg.setProperty("disabled",true);}},configDisabled:function(p_sType,p_aArgs,p_oMenu){var bDisabled=p_aArgs[0],aItems=this.getItems(),nItems,i;if(Lang.isArray(aItems)){nItems=aItems.length;if(nItems>0){i=nItems-1;do{aItems[i].cfg.setProperty("disabled",bDisabled);}
while(i--);}
if(bDisabled){this.clearActiveItem(true);Dom.addClass(this.element,"disabled");this.itemAddedEvent.subscribe(this._onItemAdded);}
else{Dom.removeClass(this.element,"disabled");this.itemAddedEvent.unsubscribe(this._onItemAdded);}}},onRender:function(p_sType,p_aArgs){function sizeShadow(){var oElement=this.element,oShadow=this._shadow;if(oShadow&&oElement){oShadow.style.width=(oElement.offsetWidth+6)+"px";oShadow.style.height=(oElement.offsetHeight+1)+"px";}}
function replaceShadow(){this.element.appendChild(this._shadow);}
function addShadowVisibleClass(){Dom.addClass(this._shadow,"yui-menu-shadow-visible");}
function removeShadowVisibleClass(){Dom.removeClass(this._shadow,"yui-menu-shadow-visible");}
function createShadow(){var oShadow=this._shadow,oElement,me;if(!oShadow){oElement=this.element;me=this;if(!m_oShadowTemplate){m_oShadowTemplate=document.createElement("div");m_oShadowTemplate.className="yui-menu-shadow yui-menu-shadow-visible";}
oShadow=m_oShadowTemplate.cloneNode(false);oElement.appendChild(oShadow);this._shadow=oShadow;this.beforeShowEvent.subscribe(addShadowVisibleClass);this.beforeHideEvent.subscribe(removeShadowVisibleClass);if(UA.ie){window.setTimeout(function(){sizeShadow.call(me);me.syncIframe();},0);this.cfg.subscribeToConfigEvent("width",sizeShadow);this.cfg.subscribeToConfigEvent("height",sizeShadow);this.cfg.subscribeToConfigEvent("maxheight",sizeShadow);this.changeContentEvent.subscribe(sizeShadow);Module.textResizeEvent.subscribe(sizeShadow,me,true);this.destroyEvent.subscribe(function(){Module.textResizeEvent.unsubscribe(sizeShadow,me);});}
this.cfg.subscribeToConfigEvent("maxheight",replaceShadow);}}
function onBeforeShow(){createShadow.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);}
if(this.cfg.getProperty("position")=="dynamic"){if(this.cfg.getProperty("visible")){createShadow.call(this);}
else{this.beforeShowEvent.subscribe(onBeforeShow);}}},initEvents:function(){Menu.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.mouseOverEvent=this.createEvent(EVENT_TYPES.MOUSE_OVER);this.mouseOverEvent.signature=SIGNATURE;this.mouseOutEvent=this.createEvent(EVENT_TYPES.MOUSE_OUT);this.mouseOutEvent.signature=SIGNATURE;this.mouseDownEvent=this.createEvent(EVENT_TYPES.MOUSE_DOWN);this.mouseDownEvent.signature=SIGNATURE;this.mouseUpEvent=this.createEvent(EVENT_TYPES.MOUSE_UP);this.mouseUpEvent.signature=SIGNATURE;this.clickEvent=this.createEvent(EVENT_TYPES.CLICK);this.clickEvent.signature=SIGNATURE;this.keyPressEvent=this.createEvent(EVENT_TYPES.KEY_PRESS);this.keyPressEvent.signature=SIGNATURE;this.keyDownEvent=this.createEvent(EVENT_TYPES.KEY_DOWN);this.keyDownEvent.signature=SIGNATURE;this.keyUpEvent=this.createEvent(EVENT_TYPES.KEY_UP);this.keyUpEvent.signature=SIGNATURE;this.focusEvent=this.createEvent(EVENT_TYPES.FOCUS);this.focusEvent.signature=SIGNATURE;this.blurEvent=this.createEvent(EVENT_TYPES.BLUR);this.blurEvent.signature=SIGNATURE;this.itemAddedEvent=this.createEvent(EVENT_TYPES.ITEM_ADDED);this.itemAddedEvent.signature=SIGNATURE;this.itemRemovedEvent=this.createEvent(EVENT_TYPES.ITEM_REMOVED);this.itemRemovedEvent.signature=SIGNATURE;},positionOffScreen:function(){var oIFrame=this.iframe,aPos=this.OFF_SCREEN_POSITION;Dom.setXY(this.element,aPos);if(oIFrame){Dom.setXY(oIFrame,aPos);}},getRoot:function(){var oItem=this.parent,oParentMenu;if(oItem){oParentMenu=oItem.parent;return oParentMenu?oParentMenu.getRoot():this;}
else{return this;}},toString:function(){var sReturnVal="Menu",sId=this.id;if(sId){sReturnVal+=(" "+sId);}
return sReturnVal;},setItemGroupTitle:function(p_sGroupTitle,p_nGroupIndex){var nGroupIndex,oTitle,i,nFirstIndex;if(typeof p_sGroupTitle=="string"&&p_sGroupTitle.length>0){nGroupIndex=typeof p_nGroupIndex=="number"?p_nGroupIndex:0;oTitle=this._aGroupTitleElements[nGroupIndex];if(oTitle){oTitle.innerHTML=p_sGroupTitle;}
else{oTitle=document.createElement(this.GROUP_TITLE_TAG_NAME);oTitle.innerHTML=p_sGroupTitle;this._aGroupTitleElements[nGroupIndex]=oTitle;}
i=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[i]){Dom.removeClass(this._aGroupTitleElements[i],"first-of-type");nFirstIndex=i;}}
while(i--);if(nFirstIndex!==null){Dom.addClass(this._aGroupTitleElements[nFirstIndex],"first-of-type");}
this.changeContentEvent.fire();}},addItem:function(p_oItem,p_nGroupIndex){if(p_oItem){return this._addItemToGroup(p_nGroupIndex,p_oItem);}},addItems:function(p_aItems,p_nGroupIndex){var nItems,aItems,oItem,i;if(Lang.isArray(p_aItems)){nItems=p_aItems.length;aItems=[];for(i=0;i<nItems;i++){oItem=p_aItems[i];if(oItem){if(Lang.isArray(oItem)){aItems[aItems.length]=this.addItems(oItem,i);}
else{aItems[aItems.length]=this._addItemToGroup(p_nGroupIndex,oItem);}}}
if(aItems.length){return aItems;}}},insertItem:function(p_oItem,p_nItemIndex,p_nGroupIndex){if(p_oItem){return this._addItemToGroup(p_nGroupIndex,p_oItem,p_nItemIndex);}},removeItem:function(p_oObject,p_nGroupIndex){var oItem;if(typeof p_oObject!="undefined"){if(p_oObject instanceof YAHOO.widget.MenuItem){oItem=this._removeItemFromGroupByValue(p_nGroupIndex,p_oObject);}
else if(typeof p_oObject=="number"){oItem=this._removeItemFromGroupByIndex(p_nGroupIndex,p_oObject);}
if(oItem){oItem.destroy();return oItem;}}},getItems:function(){var aGroups=this._aItemGroups,nGroups,aItems=[];if(Lang.isArray(aGroups)){nGroups=aGroups.length;return((nGroups==1)?aGroups[0]:(Array.prototype.concat.apply(aItems,aGroups)));}},getItemGroups:function(){return this._aItemGroups;},getItem:function(p_nItemIndex,p_nGroupIndex){var aGroup;if(typeof p_nItemIndex=="number"){aGroup=this._getItemGroup(p_nGroupIndex);if(aGroup){return aGroup[p_nItemIndex];}}},getSubmenus:function(){var aItems=this.getItems(),nItems=aItems.length,aSubmenus,oSubmenu,oItem,i;if(nItems>0){aSubmenus=[];for(i=0;i<nItems;i++){oItem=aItems[i];if(oItem){oSubmenu=oItem.cfg.getProperty("submenu");if(oSubmenu){aSubmenus[aSubmenus.length]=oSubmenu;}}}}
return aSubmenus;},clearContent:function(){var aItems=this.getItems(),nItems=aItems.length,oElement=this.element,oBody=this.body,oHeader=this.header,oFooter=this.footer,oItem,oSubmenu,i;if(nItems>0){i=nItems-1;do{oItem=aItems[i];if(oItem){oSubmenu=oItem.cfg.getProperty("submenu");if(oSubmenu){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,oSubmenu);this.renderEvent.unsubscribe(this._onParentMenuRender,oSubmenu);}
this.removeItem(oItem);}}
while(i--);}
if(oHeader){Event.purgeElement(oHeader);oElement.removeChild(oHeader);}
if(oFooter){Event.purgeElement(oFooter);oElement.removeChild(oFooter);}
if(oBody){Event.purgeElement(oBody);oBody.innerHTML="";}
this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty("width",null);},destroy:function(){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;Menu.superclass.destroy.call(this);},setInitialFocus:function(){var oItem=this._getFirstEnabledItem();if(oItem){oItem.focus();}},setInitialSelection:function(){var oItem=this._getFirstEnabledItem();if(oItem){oItem.cfg.setProperty("selected",true);}},clearActiveItem:function(p_bBlur){if(this.cfg.getProperty("showdelay")>0){this._cancelShowDelay();}
var oActiveItem=this.activeItem,oConfig,oSubmenu;if(oActiveItem){oConfig=oActiveItem.cfg;if(p_bBlur){oActiveItem.blur();}
oConfig.setProperty("selected",false);oSubmenu=oConfig.getProperty("submenu");if(oSubmenu){oSubmenu.hide();}
this.activeItem=null;}},focus:function(){if(!this.hasFocus()){this.setInitialFocus();}},blur:function(){var oItem;if(this.hasFocus()){oItem=MenuManager.getFocusedMenuItem();if(oItem){oItem.blur();}}},hasFocus:function(){return(MenuManager.getFocusedMenu()==this.getRoot());},subscribe:function(){function onItemAdded(p_sType,p_aArgs,p_oObject){var oItem=p_aArgs[0],oSubmenu=oItem.cfg.getProperty("submenu");if(oSubmenu){oSubmenu.subscribe.apply(oSubmenu,p_oObject);}}
function onSubmenuAdded(p_sType,p_aArgs,p_oObject){var oSubmenu=this.cfg.getProperty("submenu");if(oSubmenu){oSubmenu.subscribe.apply(oSubmenu,p_oObject);}}
Menu.superclass.subscribe.apply(this,arguments);Menu.superclass.subscribe.call(this,"itemAdded",onItemAdded,arguments);var aItems=this.getItems(),nItems,oItem,oSubmenu,i;if(aItems){nItems=aItems.length;if(nItems>0){i=nItems-1;do{oItem=aItems[i];oSubmenu=oItem.cfg.getProperty("submenu");if(oSubmenu){oSubmenu.subscribe.apply(oSubmenu,arguments);}
else{oItem.cfg.subscribeToConfigEvent("submenu",onSubmenuAdded,arguments);}}
while(i--);}}},initDefaultConfig:function(){Menu.superclass.initDefaultConfig.call(this);var oConfig=this.cfg;oConfig.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});oConfig.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});oConfig.addProperty(DEFAULT_CONFIG.POSITION.key,{handler:this.configPosition,value:DEFAULT_CONFIG.POSITION.value,validator:DEFAULT_CONFIG.POSITION.validator,supercedes:DEFAULT_CONFIG.POSITION.supercedes});oConfig.addProperty(DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key,{value:DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value,suppressEvent:DEFAULT_CONFIG.SUBMENU_ALIGNMENT.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key,{value:DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value,validator:DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator,suppressEvent:DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{value:DEFAULT_CONFIG.SHOW_DELAY.value,validator:DEFAULT_CONFIG.SHOW_DELAY.validator,suppressEvent:DEFAULT_CONFIG.SHOW_DELAY.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.configHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator,suppressEvent:DEFAULT_CONFIG.HIDE_DELAY.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.key,{value:DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.value,validator:DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.validator,suppressEvent:DEFAULT_CONFIG.SUBMENU_HIDE_DELAY.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.CLICK_TO_HIDE.key,{value:DEFAULT_CONFIG.CLICK_TO_HIDE.value,validator:DEFAULT_CONFIG.CLICK_TO_HIDE.validator,suppressEvent:DEFAULT_CONFIG.CLICK_TO_HIDE.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body,suppressEvent:DEFAULT_CONFIG.CONTAINER.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.SCROLL_INCREMENT.key,{value:DEFAULT_CONFIG.SCROLL_INCREMENT.value,validator:DEFAULT_CONFIG.SCROLL_INCREMENT.validator,supercedes:DEFAULT_CONFIG.SCROLL_INCREMENT.supercedes,suppressEvent:DEFAULT_CONFIG.SCROLL_INCREMENT.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.key,{value:DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.value,validator:DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.validator,supercedes:DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.supercedes,suppressEvent:DEFAULT_CONFIG.MIN_SCROLL_HEIGHT.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.MAX_HEIGHT.key,{handler:this.configMaxHeight,value:DEFAULT_CONFIG.MAX_HEIGHT.value,validator:DEFAULT_CONFIG.MAX_HEIGHT.validator,suppressEvent:DEFAULT_CONFIG.MAX_HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.MAX_HEIGHT.supercedes});oConfig.addProperty(DEFAULT_CONFIG.CLASS_NAME.key,{handler:this.configClassName,value:DEFAULT_CONFIG.CLASS_NAME.value,validator:DEFAULT_CONFIG.CLASS_NAME.validator,supercedes:DEFAULT_CONFIG.CLASS_NAME.supercedes});oConfig.addProperty(DEFAULT_CONFIG.DISABLED.key,{handler:this.configDisabled,value:DEFAULT_CONFIG.DISABLED.value,validator:DEFAULT_CONFIG.DISABLED.validator,suppressEvent:DEFAULT_CONFIG.DISABLED.suppressEvent});}});})();(function(){YAHOO.widget.MenuItem=function(p_oObject,p_oConfig){if(p_oObject){if(p_oConfig){this.parent=p_oConfig.parent;this.value=p_oConfig.value;this.id=p_oConfig.id;}
this.init(p_oObject,p_oConfig);}};var Dom=YAHOO.util.Dom,Module=YAHOO.widget.Module,Menu=YAHOO.widget.Menu,MenuItem=YAHOO.widget.MenuItem,CustomEvent=YAHOO.util.CustomEvent,Lang=YAHOO.lang,m_oMenuItemTemplate,EVENT_TYPES={"MOUSE_OVER":"mouseover","MOUSE_OUT":"mouseout","MOUSE_DOWN":"mousedown","MOUSE_UP":"mouseup","CLICK":"click","KEY_PRESS":"keypress","KEY_DOWN":"keydown","KEY_UP":"keyup","ITEM_ADDED":"itemAdded","ITEM_REMOVED":"itemRemoved","FOCUS":"focus","BLUR":"blur","DESTROY":"destroy"},DEFAULT_CONFIG={"TEXT":{key:"text",value:"",validator:Lang.isString,suppressEvent:true},"HELP_TEXT":{key:"helptext",supercedes:["text"],suppressEvent:true},"URL":{key:"url",value:"#",suppressEvent:true},"TARGET":{key:"target",suppressEvent:true},"EMPHASIS":{key:"emphasis",value:false,validator:Lang.isBoolean,suppressEvent:true,supercedes:["text"]},"STRONG_EMPHASIS":{key:"strongemphasis",value:false,validator:Lang.isBoolean,suppressEvent:true,supercedes:["text"]},"CHECKED":{key:"checked",value:false,validator:Lang.isBoolean,suppressEvent:true,supercedes:["disabled","selected"]},"SUBMENU":{key:"submenu",suppressEvent:true,supercedes:["disabled","selected"]},"DISABLED":{key:"disabled",value:false,validator:Lang.isBoolean,suppressEvent:true,supercedes:["text","selected"]},"SELECTED":{key:"selected",value:false,validator:Lang.isBoolean,suppressEvent:true},"ONCLICK":{key:"onclick",suppressEvent:true},"CLASS_NAME":{key:"classname",value:null,validator:Lang.isString,suppressEvent:true}};MenuItem.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:MenuItem,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:Module.prototype.browser,id:null,destroyEvent:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,focusEvent:null,blurEvent:null,init:function(p_oObject,p_oConfig){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=Menu;}
this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var SIGNATURE=CustomEvent.LIST,oConfig=this.cfg,sURL="#",oAnchor,sTarget,sText,sId;if(Lang.isString(p_oObject)){this._createRootNodeStructure();oConfig.queueProperty("text",p_oObject);}
else if(p_oObject&&p_oObject.tagName){switch(p_oObject.tagName.toUpperCase()){case"OPTION":this._createRootNodeStructure();oConfig.queueProperty("text",p_oObject.text);oConfig.queueProperty("disabled",p_oObject.disabled);this.value=p_oObject.value;this.srcElement=p_oObject;break;case"OPTGROUP":this._createRootNodeStructure();oConfig.queueProperty("text",p_oObject.label);oConfig.queueProperty("disabled",p_oObject.disabled);this.srcElement=p_oObject;this._initSubTree();break;case"LI":oAnchor=Dom.getFirstChild(p_oObject);if(oAnchor){sURL=oAnchor.getAttribute("href");sTarget=oAnchor.getAttribute("target");sText=oAnchor.innerHTML;}
this.srcElement=p_oObject;this.element=p_oObject;this._oAnchor=oAnchor;oConfig.setProperty("text",sText,true);oConfig.setProperty("url",sURL,true);oConfig.setProperty("target",sTarget,true);this._initSubTree();break;}}
if(this.element){sId=(this.srcElement||this.element).id;if(!sId){sId=this.id||Dom.generateId();this.element.id=sId;}
this.id=sId;Dom.addClass(this.element,this.CSS_CLASS_NAME);Dom.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);this.mouseOverEvent=this.createEvent(EVENT_TYPES.MOUSE_OVER);this.mouseOverEvent.signature=SIGNATURE;this.mouseOutEvent=this.createEvent(EVENT_TYPES.MOUSE_OUT);this.mouseOutEvent.signature=SIGNATURE;this.mouseDownEvent=this.createEvent(EVENT_TYPES.MOUSE_DOWN);this.mouseDownEvent.signature=SIGNATURE;this.mouseUpEvent=this.createEvent(EVENT_TYPES.MOUSE_UP);this.mouseUpEvent.signature=SIGNATURE;this.clickEvent=this.createEvent(EVENT_TYPES.CLICK);this.clickEvent.signature=SIGNATURE;this.keyPressEvent=this.createEvent(EVENT_TYPES.KEY_PRESS);this.keyPressEvent.signature=SIGNATURE;this.keyDownEvent=this.createEvent(EVENT_TYPES.KEY_DOWN);this.keyDownEvent.signature=SIGNATURE;this.keyUpEvent=this.createEvent(EVENT_TYPES.KEY_UP);this.keyUpEvent.signature=SIGNATURE;this.focusEvent=this.createEvent(EVENT_TYPES.FOCUS);this.focusEvent.signature=SIGNATURE;this.blurEvent=this.createEvent(EVENT_TYPES.BLUR);this.blurEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTROY);this.destroyEvent.signature=SIGNATURE;if(p_oConfig){oConfig.applyConfig(p_oConfig);}
oConfig.fireQueue();}},_createRootNodeStructure:function(){var oElement,oAnchor;if(!m_oMenuItemTemplate){m_oMenuItemTemplate=document.createElement("li");m_oMenuItemTemplate.innerHTML="<a href=\"#\"></a>";}
oElement=m_oMenuItemTemplate.cloneNode(true);oElement.className=this.CSS_CLASS_NAME;oAnchor=oElement.firstChild;oAnchor.className=this.CSS_LABEL_CLASS_NAME;this.element=oElement;this._oAnchor=oAnchor;},_initSubTree:function(){var oSrcEl=this.srcElement,oConfig=this.cfg,oNode,aOptions,nOptions,oMenu,n;if(oSrcEl.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()=="SELECT"){oConfig.setProperty("submenu",{id:Dom.generateId(),itemdata:oSrcEl.childNodes});}
else{oNode=oSrcEl.firstChild;aOptions=[];do{if(oNode&&oNode.tagName){switch(oNode.tagName.toUpperCase()){case"DIV":oConfig.setProperty("submenu",oNode);break;case"OPTION":aOptions[aOptions.length]=oNode;break;}}}
while((oNode=oNode.nextSibling));nOptions=aOptions.length;if(nOptions>0){oMenu=new this.SUBMENU_TYPE(Dom.generateId());oConfig.setProperty("submenu",oMenu);for(n=0;n<nOptions;n++){oMenu.addItem((new oMenu.ITEM_TYPE(aOptions[n])));}}}}},configText:function(p_sType,p_aArgs,p_oItem){var sText=p_aArgs[0],oConfig=this.cfg,oAnchor=this._oAnchor,sHelpText=oConfig.getProperty("helptext"),sHelpTextHTML="",sEmphasisStartTag="",sEmphasisEndTag="";if(sText){if(sHelpText){sHelpTextHTML="<em class=\"helptext\">"+sHelpText+"</em>";}
if(oConfig.getProperty("emphasis")){sEmphasisStartTag="<em>";sEmphasisEndTag="</em>";}
if(oConfig.getProperty("strongemphasis")){sEmphasisStartTag="<strong>";sEmphasisEndTag="</strong>";}
oAnchor.innerHTML=(sEmphasisStartTag+sText+
sEmphasisEndTag+sHelpTextHTML);}},configHelpText:function(p_sType,p_aArgs,p_oItem){this.cfg.refireEvent("text");},configURL:function(p_sType,p_aArgs,p_oItem){var sURL=p_aArgs[0];if(!sURL){sURL="#";}
var oAnchor=this._oAnchor;if(YAHOO.env.ua.opera){oAnchor.removeAttribute("href");}
oAnchor.setAttribute("href",sURL);},configTarget:function(p_sType,p_aArgs,p_oItem){var sTarget=p_aArgs[0],oAnchor=this._oAnchor;if(sTarget&&sTarget.length>0){oAnchor.setAttribute("target",sTarget);}
else{oAnchor.removeAttribute("target");}},configEmphasis:function(p_sType,p_aArgs,p_oItem){var bEmphasis=p_aArgs[0],oConfig=this.cfg;if(bEmphasis&&oConfig.getProperty("strongemphasis")){oConfig.setProperty("strongemphasis",false);}
oConfig.refireEvent("text");},configStrongEmphasis:function(p_sType,p_aArgs,p_oItem){var bStrongEmphasis=p_aArgs[0],oConfig=this.cfg;if(bStrongEmphasis&&oConfig.getProperty("emphasis")){oConfig.setProperty("emphasis",false);}
oConfig.refireEvent("text");},configChecked:function(p_sType,p_aArgs,p_oItem){var bChecked=p_aArgs[0],oElement=this.element,oAnchor=this._oAnchor,oConfig=this.cfg,sState="-checked",sClassName=this.CSS_CLASS_NAME+sState,sLabelClassName=this.CSS_LABEL_CLASS_NAME+sState;if(bChecked){Dom.addClass(oElement,sClassName);Dom.addClass(oAnchor,sLabelClassName);}
else{Dom.removeClass(oElement,sClassName);Dom.removeClass(oAnchor,sLabelClassName);}
oConfig.refireEvent("text");if(oConfig.getProperty("disabled")){oConfig.refireEvent("disabled");}
if(oConfig.getProperty("selected")){oConfig.refireEvent("selected");}},configDisabled:function(p_sType,p_aArgs,p_oItem){var bDisabled=p_aArgs[0],oConfig=this.cfg,oSubmenu=oConfig.getProperty("submenu"),bChecked=oConfig.getProperty("checked"),oElement=this.element,oAnchor=this._oAnchor,sState="-disabled",sCheckedState="-checked"+sState,sSubmenuState="-hassubmenu"+sState,sClassName=this.CSS_CLASS_NAME+sState,sLabelClassName=this.CSS_LABEL_CLASS_NAME+sState,sCheckedClassName=this.CSS_CLASS_NAME+sCheckedState,sLabelCheckedClassName=this.CSS_LABEL_CLASS_NAME+sCheckedState,sSubmenuClassName=this.CSS_CLASS_NAME+sSubmenuState,sLabelSubmenuClassName=this.CSS_LABEL_CLASS_NAME+sSubmenuState;if(bDisabled){if(oConfig.getProperty("selected")){oConfig.setProperty("selected",false);}
Dom.addClass(oElement,sClassName);Dom.addClass(oAnchor,sLabelClassName);if(oSubmenu){Dom.addClass(oElement,sSubmenuClassName);Dom.addClass(oAnchor,sLabelSubmenuClassName);}
if(bChecked){Dom.addClass(oElement,sCheckedClassName);Dom.addClass(oAnchor,sLabelCheckedClassName);}}
else{Dom.removeClass(oElement,sClassName);Dom.removeClass(oAnchor,sLabelClassName);if(oSubmenu){Dom.removeClass(oElement,sSubmenuClassName);Dom.removeClass(oAnchor,sLabelSubmenuClassName);}
if(bChecked){Dom.removeClass(oElement,sCheckedClassName);Dom.removeClass(oAnchor,sLabelCheckedClassName);}}},configSelected:function(p_sType,p_aArgs,p_oItem){var oConfig=this.cfg,bSelected=p_aArgs[0],oElement=this.element,oAnchor=this._oAnchor,bChecked=oConfig.getProperty("checked"),oSubmenu=oConfig.getProperty("submenu"),sState="-selected",sCheckedState="-checked"+sState,sSubmenuState="-hassubmenu"+sState,sClassName=this.CSS_CLASS_NAME+sState,sLabelClassName=this.CSS_LABEL_CLASS_NAME+sState,sCheckedClassName=this.CSS_CLASS_NAME+sCheckedState,sLabelCheckedClassName=this.CSS_LABEL_CLASS_NAME+sCheckedState,sSubmenuClassName=this.CSS_CLASS_NAME+sSubmenuState,sLabelSubmenuClassName=this.CSS_LABEL_CLASS_NAME+sSubmenuState;if(YAHOO.env.ua.opera){oAnchor.blur();}
if(bSelected&&!oConfig.getProperty("disabled")){Dom.addClass(oElement,sClassName);Dom.addClass(oAnchor,sLabelClassName);if(oSubmenu){Dom.addClass(oElement,sSubmenuClassName);Dom.addClass(oAnchor,sLabelSubmenuClassName);}
if(bChecked){Dom.addClass(oElement,sCheckedClassName);Dom.addClass(oAnchor,sLabelCheckedClassName);}}
else{Dom.removeClass(oElement,sClassName);Dom.removeClass(oAnchor,sLabelClassName);if(oSubmenu){Dom.removeClass(oElement,sSubmenuClassName);Dom.removeClass(oAnchor,sLabelSubmenuClassName);}
if(bChecked){Dom.removeClass(oElement,sCheckedClassName);Dom.removeClass(oAnchor,sLabelCheckedClassName);}}
if(this.hasFocus()&&YAHOO.env.ua.opera){oAnchor.focus();}},_onSubmenuBeforeHide:function(p_sType,p_aArgs){var oItem=this.parent,oMenu;function onHide(){oItem._oAnchor.blur();oMenu.beforeHideEvent.unsubscribe(onHide);}
if(oItem.hasFocus()){oMenu=oItem.parent;oMenu.beforeHideEvent.subscribe(onHide);}},configSubmenu:function(p_sType,p_aArgs,p_oItem){var oSubmenu=p_aArgs[0],oConfig=this.cfg,oElement=this.element,oAnchor=this._oAnchor,bLazyLoad=this.parent&&this.parent.lazyLoad,sState="-hassubmenu",sClassName=this.CSS_CLASS_NAME+sState,sLabelClassName=this.CSS_LABEL_CLASS_NAME+sState,oMenu,sSubmenuId,oSubmenuConfig;if(oSubmenu){if(oSubmenu instanceof Menu){oMenu=oSubmenu;oMenu.parent=this;oMenu.lazyLoad=bLazyLoad;}
else if(typeof oSubmenu=="object"&&oSubmenu.id&&!oSubmenu.nodeType){sSubmenuId=oSubmenu.id;oSubmenuConfig=oSubmenu;oSubmenuConfig.lazyload=bLazyLoad;oSubmenuConfig.parent=this;oMenu=new this.SUBMENU_TYPE(sSubmenuId,oSubmenuConfig);oConfig.setProperty("submenu",oMenu,true);}
else{oMenu=new this.SUBMENU_TYPE(oSubmenu,{lazyload:bLazyLoad,parent:this});oConfig.setProperty("submenu",oMenu,true);}
if(oMenu){Dom.addClass(oElement,sClassName);Dom.addClass(oAnchor,sLabelClassName);this._oSubmenu=oMenu;if(YAHOO.env.ua.opera){oMenu.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}
else{Dom.removeClass(oElement,sClassName);Dom.removeClass(oAnchor,sLabelClassName);if(this._oSubmenu){this._oSubmenu.destroy();}}
if(oConfig.getProperty("disabled")){oConfig.refireEvent("disabled");}
if(oConfig.getProperty("selected")){oConfig.refireEvent("selected");}},configOnClick:function(p_sType,p_aArgs,p_oItem){var oObject=p_aArgs[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=oObject)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}
if(!this._oOnclickAttributeValue&&typeof oObject=="object"&&typeof oObject.fn=="function"){this.clickEvent.subscribe(oObject.fn,((!YAHOO.lang.isUndefined(oObject.obj))?oObject.obj:this),oObject.scope);this._oOnclickAttributeValue=oObject;}},configClassName:function(p_sType,p_aArgs,p_oItem){var sClassName=p_aArgs[0];if(this._sClassName){Dom.removeClass(this.element,this._sClassName);}
Dom.addClass(this.element,sClassName);this._sClassName=sClassName;},initDefaultConfig:function(){var oConfig=this.cfg;oConfig.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,validator:DEFAULT_CONFIG.TEXT.validator,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.HELP_TEXT.key,{handler:this.configHelpText,supercedes:DEFAULT_CONFIG.HELP_TEXT.supercedes,suppressEvent:DEFAULT_CONFIG.HELP_TEXT.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.URL.key,{handler:this.configURL,value:DEFAULT_CONFIG.URL.value,suppressEvent:DEFAULT_CONFIG.URL.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.TARGET.key,{handler:this.configTarget,suppressEvent:DEFAULT_CONFIG.TARGET.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.EMPHASIS.key,{handler:this.configEmphasis,value:DEFAULT_CONFIG.EMPHASIS.value,validator:DEFAULT_CONFIG.EMPHASIS.validator,suppressEvent:DEFAULT_CONFIG.EMPHASIS.suppressEvent,supercedes:DEFAULT_CONFIG.EMPHASIS.supercedes});oConfig.addProperty(DEFAULT_CONFIG.STRONG_EMPHASIS.key,{handler:this.configStrongEmphasis,value:DEFAULT_CONFIG.STRONG_EMPHASIS.value,validator:DEFAULT_CONFIG.STRONG_EMPHASIS.validator,suppressEvent:DEFAULT_CONFIG.STRONG_EMPHASIS.suppressEvent,supercedes:DEFAULT_CONFIG.STRONG_EMPHASIS.supercedes});oConfig.addProperty(DEFAULT_CONFIG.CHECKED.key,{handler:this.configChecked,value:DEFAULT_CONFIG.CHECKED.value,validator:DEFAULT_CONFIG.CHECKED.validator,suppressEvent:DEFAULT_CONFIG.CHECKED.suppressEvent,supercedes:DEFAULT_CONFIG.CHECKED.supercedes});oConfig.addProperty(DEFAULT_CONFIG.DISABLED.key,{handler:this.configDisabled,value:DEFAULT_CONFIG.DISABLED.value,validator:DEFAULT_CONFIG.DISABLED.validator,suppressEvent:DEFAULT_CONFIG.DISABLED.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.SELECTED.key,{handler:this.configSelected,value:DEFAULT_CONFIG.SELECTED.value,validator:DEFAULT_CONFIG.SELECTED.validator,suppressEvent:DEFAULT_CONFIG.SELECTED.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.SUBMENU.key,{handler:this.configSubmenu,supercedes:DEFAULT_CONFIG.SUBMENU.supercedes,suppressEvent:DEFAULT_CONFIG.SUBMENU.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.ONCLICK.key,{handler:this.configOnClick,suppressEvent:DEFAULT_CONFIG.ONCLICK.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.CLASS_NAME.key,{handler:this.configClassName,value:DEFAULT_CONFIG.CLASS_NAME.value,validator:DEFAULT_CONFIG.CLASS_NAME.validator,suppressEvent:DEFAULT_CONFIG.CLASS_NAME.suppressEvent});},getNextEnabledSibling:function(){var nGroupIndex,aItemGroups,oNextItem,nNextGroupIndex,aNextGroup;function getNextArrayItem(p_aArray,p_nStartIndex){return p_aArray[p_nStartIndex]||getNextArrayItem(p_aArray,(p_nStartIndex+1));}
if(this.parent instanceof Menu){nGroupIndex=this.groupIndex;aItemGroups=this.parent.getItemGroups();if(this.index<(aItemGroups[nGroupIndex].length-1)){oNextItem=getNextArrayItem(aItemGroups[nGroupIndex],(this.index+1));}
else{if(nGroupIndex<(aItemGroups.length-1)){nNextGroupIndex=nGroupIndex+1;}
else{nNextGroupIndex=0;}
aNextGroup=getNextArrayItem(aItemGroups,nNextGroupIndex);oNextItem=getNextArrayItem(aNextGroup,0);}
return(oNextItem.cfg.getProperty("disabled")||oNextItem.element.style.display=="none")?oNextItem.getNextEnabledSibling():oNextItem;}},getPreviousEnabledSibling:function(){var nGroupIndex,aItemGroups,oPreviousItem,nPreviousGroupIndex,aPreviousGroup;function getPreviousArrayItem(p_aArray,p_nStartIndex){return p_aArray[p_nStartIndex]||getPreviousArrayItem(p_aArray,(p_nStartIndex-1));}
function getFirstItemIndex(p_aArray,p_nStartIndex){return p_aArray[p_nStartIndex]?p_nStartIndex:getFirstItemIndex(p_aArray,(p_nStartIndex+1));}
if(this.parent instanceof Menu){nGroupIndex=this.groupIndex;aItemGroups=this.parent.getItemGroups();if(this.index>getFirstItemIndex(aItemGroups[nGroupIndex],0)){oPreviousItem=getPreviousArrayItem(aItemGroups[nGroupIndex],(this.index-1));}
else{if(nGroupIndex>getFirstItemIndex(aItemGroups,0)){nPreviousGroupIndex=nGroupIndex-1;}
else{nPreviousGroupIndex=aItemGroups.length-1;}
aPreviousGroup=getPreviousArrayItem(aItemGroups,nPreviousGroupIndex);oPreviousItem=getPreviousArrayItem(aPreviousGroup,(aPreviousGroup.length-1));}
return(oPreviousItem.cfg.getProperty("disabled")||oPreviousItem.element.style.display=="none")?oPreviousItem.getPreviousEnabledSibling():oPreviousItem;}},focus:function(){var oParent=this.parent,oAnchor=this._oAnchor,oActiveItem=oParent.activeItem,me=this;function setFocus(){try{if(YAHOO.env.ua.ie&&!document.hasFocus()){return;}
if(oActiveItem){oActiveItem.blurEvent.fire();}
oAnchor.focus();me.focusEvent.fire();}
catch(e){}}
if(!this.cfg.getProperty("disabled")&&oParent&&oParent.cfg.getProperty("visible")&&this.element.style.display!="none"){window.setTimeout(setFocus,0);}},blur:function(){var oParent=this.parent;if(!this.cfg.getProperty("disabled")&&oParent&&oParent.cfg.getProperty("visible")){var me=this;window.setTimeout(function(){try{me._oAnchor.blur();me.blurEvent.fire();}
catch(e){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var oEl=this.element,oSubmenu,oParentNode;if(oEl){oSubmenu=this.cfg.getProperty("submenu");if(oSubmenu){oSubmenu.destroy();}
this.mouseOverEvent.unsubscribeAll();this.mouseOutEvent.unsubscribeAll();this.mouseDownEvent.unsubscribeAll();this.mouseUpEvent.unsubscribeAll();this.clickEvent.unsubscribeAll();this.keyPressEvent.unsubscribeAll();this.keyDownEvent.unsubscribeAll();this.keyUpEvent.unsubscribeAll();this.focusEvent.unsubscribeAll();this.blurEvent.unsubscribeAll();this.cfg.configChangedEvent.unsubscribeAll();oParentNode=oEl.parentNode;if(oParentNode){oParentNode.removeChild(oEl);this.destroyEvent.fire();}
this.destroyEvent.unsubscribeAll();}},toString:function(){var sReturnVal="MenuItem",sId=this.id;if(sId){sReturnVal+=(" "+sId);}
return sReturnVal;}};Lang.augmentProto(MenuItem,YAHOO.util.EventProvider);})();(function(){YAHOO.widget.ContextMenu=function(p_oElement,p_oConfig){YAHOO.widget.ContextMenu.superclass.constructor.call(this,p_oElement,p_oConfig);};var Event=YAHOO.util.Event,ContextMenu=YAHOO.widget.ContextMenu,EVENT_TYPES={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(YAHOO.env.ua.opera?"mousedown":"contextmenu"),"CLICK":"click"},DEFAULT_CONFIG={"TRIGGER":{key:"trigger",suppressEvent:true}};function position(p_sType,p_aArgs,p_aPos){this.cfg.setProperty("xy",p_aPos);this.beforeShowEvent.unsubscribe(position,p_aPos);}
YAHOO.lang.extend(ContextMenu,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(p_oElement,p_oConfig){ContextMenu.superclass.init.call(this,p_oElement);this.beforeInitEvent.fire(ContextMenu);if(p_oConfig){this.cfg.applyConfig(p_oConfig,true);}
this.initEvent.fire(ContextMenu);},initEvents:function(){ContextMenu.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(EVENT_TYPES.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var oTrigger=this._oTrigger;if(oTrigger){Event.removeListener(oTrigger,EVENT_TYPES.CONTEXT_MENU,this._onTriggerContextMenu);if(YAHOO.env.ua.opera){Event.removeListener(oTrigger,EVENT_TYPES.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(p_oEvent,p_oMenu){if(p_oEvent.ctrlKey){Event.stopEvent(p_oEvent);}},_onTriggerContextMenu:function(p_oEvent,p_oMenu){if(p_oEvent.type=="mousedown"&&!p_oEvent.ctrlKey){return;}
var aXY;Event.stopEvent(p_oEvent);this.contextEventTarget=Event.getTarget(p_oEvent);this.triggerContextMenuEvent.fire(p_oEvent);YAHOO.widget.MenuManager.hideVisible();if(!this._bCancelled){aXY=Event.getXY(p_oEvent);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(position,aXY);}
else{this.cfg.setProperty("xy",aXY);}
this.show();}
this._bCancelled=false;},toString:function(){var sReturnVal="ContextMenu",sId=this.id;if(sId){sReturnVal+=(" "+sId);}
return sReturnVal;},initDefaultConfig:function(){ContextMenu.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.TRIGGER.key,{handler:this.configTrigger,suppressEvent:DEFAULT_CONFIG.TRIGGER.suppressEvent});},destroy:function(){this._removeEventHandlers();ContextMenu.superclass.destroy.call(this);},configTrigger:function(p_sType,p_aArgs,p_oMenu){var oTrigger=p_aArgs[0];if(oTrigger){if(this._oTrigger){this._removeEventHandlers();}
this._oTrigger=oTrigger;Event.on(oTrigger,EVENT_TYPES.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(YAHOO.env.ua.opera){Event.on(oTrigger,EVENT_TYPES.CLICK,this._onTriggerClick,this,true);}}
else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){YAHOO.widget.MenuBar=function(p_oElement,p_oConfig){YAHOO.widget.MenuBar.superclass.constructor.call(this,p_oElement,p_oConfig);};function checkPosition(p_sPosition){if(typeof p_sPosition=="string"){return("dynamic,static".indexOf((p_sPosition.toLowerCase()))!=-1);}}
var Event=YAHOO.util.Event,MenuBar=YAHOO.widget.MenuBar,DEFAULT_CONFIG={"POSITION":{key:"position",value:"static",validator:checkPosition,supercedes:["visible"]},"SUBMENU_ALIGNMENT":{key:"submenualignment",value:["tl","bl"],suppressEvent:true},"AUTO_SUBMENU_DISPLAY":{key:"autosubmenudisplay",value:false,validator:YAHOO.lang.isBoolean,suppressEvent:true}};YAHOO.lang.extend(MenuBar,YAHOO.widget.Menu,{init:function(p_oElement,p_oConfig){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}
MenuBar.superclass.init.call(this,p_oElement);this.beforeInitEvent.fire(MenuBar);if(p_oConfig){this.cfg.applyConfig(p_oConfig,true);}
this.initEvent.fire(MenuBar);},CSS_CLASS_NAME:"yuimenubar",_onKeyDown:function(p_sType,p_aArgs,p_oMenuBar){var oEvent=p_aArgs[0],oItem=p_aArgs[1],oSubmenu,oItemCfg,oNextItem;if(oItem&&!oItem.cfg.getProperty("disabled")){oItemCfg=oItem.cfg;switch(oEvent.keyCode){case 37:case 39:if(oItem==this.activeItem&&!oItemCfg.getProperty("selected")){oItemCfg.setProperty("selected",true);}
else{oNextItem=(oEvent.keyCode==37)?oItem.getPreviousEnabledSibling():oItem.getNextEnabledSibling();if(oNextItem){this.clearActiveItem();oNextItem.cfg.setProperty("selected",true);if(this.cfg.getProperty("autosubmenudisplay")){oSubmenu=oNextItem.cfg.getProperty("submenu");if(oSubmenu){oSubmenu.show();}}
oNextItem.focus();}}
Event.preventDefault(oEvent);break;case 40:if(this.activeItem!=oItem){this.clearActiveItem();oItemCfg.setProperty("selected",true);oItem.focus();}
oSubmenu=oItemCfg.getProperty("submenu");if(oSubmenu){if(oSubmenu.cfg.getProperty("visible")){oSubmenu.setInitialSelection();oSubmenu.setInitialFocus();}
else{oSubmenu.show();}}
Event.preventDefault(oEvent);break;}}
if(oEvent.keyCode==27&&this.activeItem){oSubmenu=this.activeItem.cfg.getProperty("submenu");if(oSubmenu&&oSubmenu.cfg.getProperty("visible")){oSubmenu.hide();this.activeItem.focus();}
else{this.activeItem.cfg.setProperty("selected",false);this.activeItem.blur();}
Event.preventDefault(oEvent);}},_onClick:function(p_sType,p_aArgs,p_oMenuBar){MenuBar.superclass._onClick.call(this,p_sType,p_aArgs,p_oMenuBar);var oItem=p_aArgs[1],oEvent,oTarget,oActiveItem,oConfig,oSubmenu;if(oItem&&!oItem.cfg.getProperty("disabled")){oEvent=p_aArgs[0];oTarget=Event.getTarget(oEvent);oActiveItem=this.activeItem;oConfig=this.cfg;if(oActiveItem&&oActiveItem!=oItem){this.clearActiveItem();}
oItem.cfg.setProperty("selected",true);oSubmenu=oItem.cfg.getProperty("submenu");if(oSubmenu){if(oSubmenu.cfg.getProperty("visible")){oSubmenu.hide();}
else{oSubmenu.show();}}}},toString:function(){var sReturnVal="MenuBar",sId=this.id;if(sId){sReturnVal+=(" "+sId);}
return sReturnVal;},initDefaultConfig:function(){MenuBar.superclass.initDefaultConfig.call(this);var oConfig=this.cfg;oConfig.addProperty(DEFAULT_CONFIG.POSITION.key,{handler:this.configPosition,value:DEFAULT_CONFIG.POSITION.value,validator:DEFAULT_CONFIG.POSITION.validator,supercedes:DEFAULT_CONFIG.POSITION.supercedes});oConfig.addProperty(DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key,{value:DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value,suppressEvent:DEFAULT_CONFIG.SUBMENU_ALIGNMENT.suppressEvent});oConfig.addProperty(DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key,{value:DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value,validator:DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator,suppressEvent:DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.suppressEvent});}});}());YAHOO.widget.MenuBarItem=function(p_oObject,p_oConfig){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,p_oObject,p_oConfig);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(p_oObject,p_oConfig){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}
YAHOO.widget.MenuBarItem.superclass.init.call(this,p_oObject);var oConfig=this.cfg;if(p_oConfig){oConfig.applyConfig(p_oConfig,true);}
oConfig.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var sReturnVal="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){sReturnVal+=(": "+this.cfg.getProperty("text"));}
return sReturnVal;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.4.1",build:"742"});jQuery(function(){jQuery("table.striped-even tbody tr:even").addClass("alternate-row");jQuery("table.striped-odd tbody tr:odd").addClass("alternate-row");});function css_browser_selector(){var ua=navigator.userAgent.toLowerCase();var h=document.getElementsByTagName('html')[0];if(ua.indexOf('msie')!=-1&&!(ua.indexOf('opera')!=-1)&&(ua.indexOf('webtv')==-1))h.className='ie';else if(ua.indexOf('gecko/')!=-1)h.className='gecko';else if(ua.indexOf('opera')!=-1)h.className='opera';else if(ua.indexOf('konqueror')!=-1)h.className='konqueror';else if(ua.indexOf('applewebkit/')!=-1)h.className='safari';}
css_browser_selector();var cssQuery=function(){var cssQuery=function(a,c){return jQuery.makeArray(jQuery(a,c));}
var msg="This implementation of cssQuery is really a wrapper to jQuery. No compatibility is ensured. Please use jQuery instead.";cssQuery.toString=function(){return"function() { ["+msg+"] }";};cssQuery.clearCache=cssQuery.addModule=cssQuery.valueOf=function(){alert(msg);};return cssQuery;}();;jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"0.6.6",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);},hasScroll:function(el,a){if($(el).css('overflow')=='hidden'){return false;}
var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(el[scroll]>0){return true;}
el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)));};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""));}):removeAttr.call(this,name));};}
$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove");});return _remove.apply(this,arguments);},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}
return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent;}});$.extend($.expr[':'],{data:function(elem,i,match){return!!$.data(elem,match[3]);},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,'tabindex');return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:'a'==nodeName||'area'==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)['area'==nodeName?'parents':'closest'](':hidden').length;},tabbable:function(element){var tabIndex=$.attr(element,'tabindex');return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(':focusable');}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'));}
return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(event,key,value){if(event.target==element){return self._setData(key,value);}}).bind('getData.'+name,function(event,key){if(event.target==element){return self._getData(key);}}).bind('remove',function(){return self.destroy();});};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter='option';};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').removeAttr('aria-disabled');},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}
options={};options[key]=value;}
$.each(options,function(key,value){self._setData(key,value);});},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element
[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled'+' '+
this.namespace+'-state-disabled').attr("aria-disabled",value);}},enable:function(){this._setData('disabled',false);},disable:function(){this._setData('disabled',true);},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop];}}
this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event);}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false;}});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return;}
(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}
this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}
this._mouseMoveDelegate=function(event){return self._mouseMove(event);};this._mouseUpDelegate=function(event){return self._mouseUp(event);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true;},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event);}
if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}
return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event);}
return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){$.extend($.expr[':'],{icontains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;}});$.iterators={getText:function(){return $(this).text();},parseInt:function(v){return parseInt(v,10);}};$.extend({range:function(){if(!arguments.length){return[];}
var min,max,step;if(arguments.length==1){min=0;max=arguments[0]-1;step=1;}
else{min=arguments[0];max=arguments[1]-1;step=arguments[2]||1;}
if(step<0&&min>=max){step*=-1;var tmp=min;min=max;max=tmp;min+=((max-min)%step);}
var a=[];for(var i=min;i<=max;i+=step){a.push(i);}
return a;},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38},keyIs:function(k,e){return parseInt($.keyCode[k.toUpperCase()],10)==parseInt((typeof(e)=='number')?e:e.keyCode,10);},redirect:function(url){window.location.href=url;return url;},stop:function(e,preventDefault,stopPropagation){if(preventDefault){e.preventDefault();}
if(stopPropagation){e.stopPropagation();}
return preventDefault&&false||true;},basename:function(path){var t=path.split('/');return t[t.length]===''&&s||t.slice(0,t.length).join('/');},filename:function(path){return path.split('/').pop();},filesizeformat:function(bytes,suffixes){var b=parseInt(bytes,10);var s=suffixes||['byte','bytes','KB','MB','GB'];if(isNaN(b)||b===0){return'0 '+s[0];}
if(b==1){return'1 '+s[0];}
if(b<1024){return b.toFixed(2)+' '+s[1];}
if(b<1048576){return(b/1024).toFixed(2)+' '+s[2];}
if(b<1073741824){return(b/1048576).toFixed(2)+' '+s[3];}
else{return(b/1073741824).toFixed(2)+' '+s[4];}},fileExtension:function(s){var tokens=s.split('.');return tokens[tokens.length-1]||false;},isString:function(o){return typeof(o)=='string'&&true||false;},isRegExp:function(o){return o&&o.constructor.toString().indexOf('RegExp()')!=-1||false;},isArray:function(o){if(!o){return false;}
return o.constructor&&Object.prototype.toString.apply(o.constructor.prototype)==='[object Array]';},isObject:function(o){return(typeof(o)=='object');},toCurrency:function(i){i=parseFloat(i,10).toFixed(2);return(i=='NaN')?'0.00':i;},pxToEm:function(i,settings){settings=jQuery.extend({scope:'body',reverse:false},settings);var pxVal=(i==='')?0:parseFloat(i);var scopeVal;var getWindowWidth=function(){var de=document.documentElement;return self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;};if(settings.scope=='body'&&$.browser.msie&&(parseFloat($('body').css('font-size'))/getWindowWidth()).toFixed(1)>0.0){var calcFontSize=function(){return(parseFloat($('body').css('font-size'))/getWindowWidth()).toFixed(3)*16;};scopeVal=calcFontSize();}
else{scopeVal=parseFloat(jQuery(settings.scope).css("font-size"));}
var result=(settings.reverse===true)?(pxVal*scopeVal).toFixed(2)+'px':(pxVal/scopeVal).toFixed(2)+'em';return result;}});$.extend($.fn,{selectRange:function(start,end){if($(this).get(0).createTextRange){var range=$(this).get(0).createTextRange();range.collapse(true);range.moveEnd('character',end);range.moveStart('character',start);range.select();}
else if($(this).get(0).setSelectionRange){$(this).bind('focus',function(e){e.preventDefault();}).get(0).setSelectionRange(start,end);}
return $(this);},equalHeights:function(px){$(this).each(function(){var currentTallest=0;$(this).children().each(function(i){if($(this).height()>currentTallest){currentTallest=$(this).height();}});if(!px||!$.pxToEm){currentTallest=$.pxToEm(currentTallest);}
if($.browser.msie&&$.browser.version==6.0){$(this).children().css({'height':currentTallest});}
$(this).children().css({'min-height':currentTallest});});return this;},delay:function(time,callback){jQuery.fx.step.delay=function(){};return this.animate({delay:1},time,callback);}});})(jQuery);(function($){var strings={strConversion:{__repr:function(i){switch(this.__getType(i)){case'array':case'date':case'number':return i.toString();case'object':var o=[];for(x=0;x<i.length;i++){o.push(i+': '+this.__repr(i[x]));}
return o.join(', ');case'string':return i;default:return i;}},__getType:function(i){if(!i||!i.constructor){return typeof(i);}
var match=i.constructor.toString().match(/Array|Number|String|Object|Date/);return match&&match[0].toLowerCase()||typeof(i);},__pad:function(str,l,s,t){var p=s||' ';var o=str;if(l-str.length>0){o=new Array(Math.ceil(l/p.length)).join(p).substr(0,t=!t?l:t==1?0:Math.ceil(l/2))+str+p.substr(0,l-t);}
return o;},__getInput:function(arg,args){var key=arg.getKey();switch(this.__getType(args)){case'object':var keys=key.split('.');var obj=args;for(var subkey=0;subkey<keys.length;subkey++){obj=obj[keys[subkey]];}
if(typeof(obj)!='undefined'){if(strings.strConversion.__getType(obj)=='array'){return arg.getFormat().match(/\.\*/)&&obj[1]||obj;}
return obj;}
else{}
break;case'array':key=parseInt(key,10);if(arg.getFormat().match(/\.\*/)&&typeof args[key+1]!='undefined'){return args[key+1];}
else if(typeof args[key]!='undefined'){return args[key];}
else{return key;}
break;}
return'{'+key+'}';},__formatToken:function(token,args){var arg=new Argument(token,args);return strings.strConversion[arg.getFormat().slice(-1)](this.__getInput(arg,args),arg);},d:function(input,arg){var o=parseInt(input,10);var p=arg.getPaddingLength();if(p){return this.__pad(o.toString(),p,arg.getPaddingString(),0);}
else{return o;}},i:function(input,args){return this.d(input,args);},o:function(input,arg){var o=input.toString(8);if(arg.isAlternate()){o=this.__pad(o,o.length+1,'0',0);}
return this.__pad(o,arg.getPaddingLength(),arg.getPaddingString(),0);},u:function(input,args){return Math.abs(this.d(input,args));},x:function(input,arg){var o=parseInt(input,10).toString(16);o=this.__pad(o,arg.getPaddingLength(),arg.getPaddingString(),0);return arg.isAlternate()?'0x'+o:o;},X:function(input,arg){return this.x(input,arg).toUpperCase();},e:function(input,arg){return parseFloat(input,10).toExponential(arg.getPrecision());},E:function(input,arg){return this.e(input,arg).toUpperCase();},f:function(input,arg){return this.__pad(parseFloat(input,10).toFixed(arg.getPrecision()),arg.getPaddingLength(),arg.getPaddingString(),0);},F:function(input,args){return this.f(input,args);},g:function(input,arg){var o=parseFloat(input,10);return(o.toString().length>6)?Math.round(o.toExponential(arg.getPrecision())):o;},G:function(input,args){return this.g(input,args);},c:function(input,args){var match=input.match(/\w|\d/);return match&&match[0]||'';},r:function(input,args){return this.__repr(input);},s:function(input,args){return input.toString&&input.toString()||''+input;}},format:function(str,args){var end=0;var start=0;var match=false;var buffer=[];var token='';var tmp=(str||'').split('');for(start=0;start<tmp.length;start++){if(tmp[start]=='{'&&tmp[start+1]!='{'){end=str.indexOf('}',start);token=tmp.slice(start+1,end).join('');if(tmp[start-1]!='{'&&tmp[end+1]!='}'){var tokenArgs=(typeof arguments[1]!='object')?arguments2Array(arguments,2):args||[];buffer.push(strings.strConversion.__formatToken(token,tokenArgs));}
else{buffer.push(token);}}
else if(start>end||buffer.length<1){buffer.push(tmp[start]);}}
return(buffer.length>1)?buffer.join(''):buffer[0];},calc:function(str,args){return eval(format(str,args));},repeat:function(s,n){return new Array(n+1).join(s);},UTF8encode:function(s){return unescape(encodeURIComponent(s));},UTF8decode:function(s){return decodeURIComponent(escape(s));},tpl:function(){var out='',render=true;if(arguments.length==2&&$.isArray(arguments[1])){this[arguments[0]]=arguments[1].join('');return jQuery;}
if(arguments.length==2&&$.isString(arguments[1])){this[arguments[0]]=arguments[1];return jQuery;}
if(arguments.length==1){return $(this[arguments[0]]);}
if(arguments.length==2&&arguments[1]==false){return this[arguments[0]];}
if(arguments.length==2&&$.isObject(arguments[1])){return $($.format(this[arguments[0]],arguments[1]));}
if(arguments.length==3&&$.isObject(arguments[1])){return(arguments[2]==true)?$.format(this[arguments[0]],arguments[1]):$($.format(this[arguments[0]],arguments[1]));}}};var Argument=function(arg,args){this.__arg=arg;this.__args=args;this.__max_precision=parseFloat('1.'+(new Array(32)).join('1'),10).toString().length-3;this.__def_precision=6;this.getString=function(){return this.__arg;};this.getKey=function(){return this.__arg.split(':')[0];};this.getFormat=function(){var match=this.getString().split(':');return(match&&match[1])?match[1]:'s';};this.getPrecision=function(){var match=this.getFormat().match(/\.(\d+|\*)/g);if(!match){return this.__def_precision;}
else{match=match[0].slice(1);if(match!='*'){return parseInt(match,10);}
else if(strings.strConversion.__getType(this.__args)=='array'){return this.__args[1]&&this.__args[0]||this.__def_precision;}
else if(strings.strConversion.__getType(this.__args)=='object'){return this.__args[this.getKey()]&&this.__args[this.getKey()][0]||this.__def_precision;}
else{return this.__def_precision;}}};this.getPaddingLength=function(){var match=false;if(this.isAlternate()){match=this.getString().match(/0?#0?(\d+)/);if(match&&match[1]){return parseInt(match[1],10);}}
match=this.getString().match(/(0|\.)(\d+|\*)/g);return match&&parseInt(match[0].slice(1),10)||0;};this.getPaddingString=function(){var o='';if(this.isAlternate()){o=' ';}
if(this.getFormat().match(/#0|0#|^0|\.\d+/)){o='0';}
return o;};this.getFlags=function(){var match=this.getString().matc(/^(0|\#|\-|\+|\s)+/);return match&&match[0].split('')||[];};this.isAlternate=function(){return!!this.getFormat().match(/^0?#/);};};var arguments2Array=function(args,shift){var o=[];for(l=args.length,x=(shift||0)-1;x<l;x++){o.push(args[x]);}
return o;};$.extend(strings);})(jQuery);(function($){$.widget('ui.dropslide',$.extend({},$.ui.mouse,{getter:'showLevel showNextLevel getSelection',_init:function(){var widget=this;this.wrapper=this.element.next();this.element.bind(this.options.trigger+'.dropslide',function(){widget.show();});this.wrapper.data('dropslide',this).css({width:this.options.width}).find('li, li ol li').bind('mouseover.dropslide',function(e){$(this).siblings().removeClass('hover').find('ol').hide().end().find('span').removeClass('ui-state-hover').end();$(this).find('ol').show().end().addClass('hover').children(0).addClass('ui-state-hover');widget.showNextLevel();}).bind('click.dropslide',function(e){$(widget.element).triggerHandler('dropslideclick',[e,widget],widget.options.click);$(widget.element).triggerHandler('select',[e,widget],widget.options.select);}).end().find('ol').bind('mousemove.dropslide',function(e){return widget._redraw();}).addClass('ui-widget ui-helper-clearfix ui-helper-reset').hide().end().find('span').addClass('ui-state-default ui-corner-all');this._redraw();},showLevel:function(id){var ols=this.wrapper.find('ol');var ds=this;if(id==0){ols.eq(0).css('left',this.element.position().left);this.wrapper.css('top',ds.element.position().top+ds.element.height()+ds.options.top);this.wrapper.css('z-index',1000);}
setTimeout(function(){ols.removeClass('active').eq(id).addClass('active').show(ds.options.animSpeed);},ds.options.showDelay);},showNextLevel:function(){this.wrapper.find('ol.active').removeClass('active').next('ol').addClass('active').show(this.options.animSpeed);},getSelection:function(level){return level&&this.wrapper.find('ol').eq(level).find('li span.ui-state-hover')||$.makeArray(this.wrapper.find('span.ui-state-hover').map($.iterators.getText));},_redraw:function(){var prevLI,prevOL,nextOL,pos=false;var offset=this.element.position().left+this.options.left;var ols=$(this.wrapper).find('ol');$(this.wrapper).css({top:this.element.position().top+this.element.height()+this.options.top,left:this.element.position().left});ols.each(function(i){prevOL=$(this).prevAll('ol:visible:first');if(prevOL.get(0)){prevLI=prevOL.find('li.hover').get(0)&&prevOL.find('li.hover')||prevOL.find('li:first');$(this).css('margin-left',prevLI.position().left);}});},show:function(e){this.showLevel(0);},hide:function(){var widget=this;setTimeout(function(){widget.wrapper.find('ol').hide();},widget.options.hideDelay);},activate:function(e){this.element.focus();this.show(this.options.animSpeed);},destroy:function(e){this.wrapper.remove();}}));$.ui.dropslide.defaults={tree:false,trigger:'mouseover',top:6,left:0,showDelay:0,hideDelay:0,animSpeed:0,select:function(){},click:function(e,ui){ui.hide();}};})(jQuery);(function($){$.tpl('timepickr.menu','<span class="ui-helper-reset ui-dropslide ui-timepickr ui-widget" />');$.tpl('timepickr.row','<ol class="ui-timepickr" />');$.tpl('timepickr.button','<li class="{className:s}"><span>{label:s}</span></li>');$.widget('ui.timepickr',{_init:function(){var ui=this;var menu=ui._buildMenu();var element=ui.element;element.data('timepickr.initialValue',element.val());menu.insertAfter(ui.element);element.addClass('ui-timepickr').dropslide(ui.options.dropslide).bind('select',ui.select);element.blur(function(e){$(this).dropslide('hide');if(ui.options.resetOnBlur){$(this).val($(this).data('timepickr.initialValue'));}});if(ui.options.val){element.val(this.options.val);}
if(ui.options.handle){$(this.options.handle).click(function(){$(element).dropslide('show');});}
if(ui.options.resetOnBlur){menu.find('li > span').bind('mousedown.timepickr',function(){$(element).data('timepickr.initialValue',$(element).val());});}
if(ui.options.updateLive){menu.find('li').bind('mouseover.timepickr',function(){$(element).timepickr('update');});}
var hrs=menu.find('ol:eq(1)').find('li:first').addClass('hover').find('span').addClass('ui-state-hover').end().end();var min=menu.find('ol:eq(2)').find('li:first').addClass('hover').find('span').addClass('ui-state-hover').end().end();var sec=menu.find('ol:eq(3)').find('li:first').addClass('hover').find('span').addClass('ui-state-hover').end().end();if(this.options.convention===24){var day=menu.find('ol:eq(0) li:eq(0)');var night=menu.find('ol:eq(0) li:eq(1)');var dayHours=hrs.find('li').slice(0,12);var nightHours=hrs.find('li').slice(12,24);var index=0;var selectHr=function(id){hrs.find('li').removeClass('hover');hrs.find('span').removeClass('ui-state-hover');hrs.find('li').eq(id).addClass('hover').find('span').addClass('ui-state-hover')};day.mouseover(function(){nightHours.hide();dayHours.show(0);index=hrs.find('li.hover').data('id')||hrs.find('li:first').data('id');selectHr(index>11&&index-12||index);element.dropslide('redraw');});night.mouseover(function(){dayHours.hide();nightHours.show(0);index=hrs.find('li.hover').data('id')||hrs.find('li:first').data('id');selectHr(index<12&&index+12||index);element.dropslide('redraw');});}
element.dropslide('redraw');element.data('timepickr',this);},update:function(){var frmt=this.options.convention===24&&'format24'||'format12';var val={h:this.getValue('hour'),m:this.getValue('minute'),s:this.getValue('second'),prefix:this.getValue('prefix'),suffix:this.getValue('suffix')};var o=$.format(this.options[frmt],val);$(this.element).val(o);},select:function(e){var dropslide=$(this).data('dropslide');$(dropslide.element).timepickr('update');e.stopPropagation();},getHour:function(){return this.getValue('hour');},getMinute:function(){return this.getValue('minute');},getSecond:function(){return this.getValue('second');},getValue:function(type){return $('.ui-timepickr.'+type+'.hover',this.element.next()).text();},activate:function(){this.element.dropslide('activate');},destroy:function(){this.element.dropslide('destroy');},_createButton:function(i,format,className){var o=format&&$.format(format,i)||i;var cn=className&&'ui-timepickr '+className||'ui-timepickr';return $.tpl('timepickr.button',{className:cn,label:o}).data('id',i);},_createRow:function(range,format,className){var row=$.tpl('timepickr.row');var button=this._createButton;$.each(range,function(idx,val){row.append(button(val,format||false,className||false));});return row;},_getRanges12:function(){var o=[],opt=this.options;if(opt.hours){o.push(this._createRow($.range(1,13),'{0:0.2d}','hour'));}
if(opt.minutes){o.push(this._createRow(opt.rangeMin,'{0:0.2d}','minute'));}
if(opt.seconds){o.push(this._createRow(opt.rangeSec,'{0:0.2d}','second'));}
if(opt.suffix){o.push(this._createRow(opt.suffix,false,'suffix'));}
return o;},_getRanges24:function(){var o=[],opt=this.options;o.push(this._createRow(opt.prefix,false,'prefix'));if(opt.hours){o.push(this._createRow($.range(0,24),'{0:0.2d}','hour'));}
if(opt.minutes){o.push(this._createRow(opt.rangeMin,'{0:0.2d}','minute'));}
if(opt.seconds){o.push(this._createRow(opt.rangeSec,'{0:0.2d}','second'));}
return o;},_buildMenu:function(){var menu=$.tpl('timepickr.menu');var ranges=this.options.convention===24&&this._getRanges24()||this._getRanges12();$.each(ranges,function(idx,val){menu.append(val);});return menu;}});$.extend($.ui.timepickr,{version:'0.6.6',eventPrefix:'',getter:'',defaults:{convention:24,dropslide:{trigger:'focus'},format12:'{h:02.d}:{m:02.d} {suffix:s}',format24:'{h:02.d}:{m:02.d}',handle:false,hours:true,minutes:true,seconds:false,prefix:['am','pm'],suffix:['am','pm'],rangeMin:$.range(0,60,15),rangeSec:$.range(0,60,15),updateLive:true,resetOnBlur:true,val:false}});})(jQuery);