(function(){if(window.jQuery){var _jQuery=window.jQuery}var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context)};if(window.$){var _$=window.$}window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this}else{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)}else{this[0]=elem;this.length=1;return this}}else{selector=[]}}}else{return new jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector)}}}return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector])},jquery:"1.2.2",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;this.each(function(i){if(this==elem){ret=i}});return ret},attr:function(name,value,type){var options=name;if(name.constructor==String){if(value==undefined){return this.length&&jQuery[type||"attr"](this[0],name)||undefined}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"),container2=document.createElement("div");container.appendChild(clone);container2.innerHTML=container.innerHTML;return container2.firstChild}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 !selector?this:this.pushStack(jQuery.merge(this.get(),selector.constructor==String?jQuery(selector).get():selector.length!=undefined&&(!selector.nodeName||jQuery.nodeName(selector,"form"))?selector:[selector]))},is:function(selector){return selector?jQuery.multiFilter(selector,this).length>0:false},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}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=value.constructor==Array?value:[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.length?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)},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.prototype.init.prototype=jQuery.prototype;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)}}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==1){target=this;i=0}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){if(target===options[name]){continue}if(deep&&options[name]&&typeof options[name]=="object"&&target[name]&&!options[name].nodeType){target[name]=jQuery.extend(target[name],options[name])}else{if(options[name]!=undefined){target[name]=options[name]}}}}}return target};var expando="jQuery"+(new Date()).getTime(),uuid=0,windowData={};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;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&&/function/i.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.appendChild(script);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){if(args){if(object.length==undefined){for(var name in object){if(callback.apply(object[name],args)===false){break}}}else{for(var i=0,length=object.length;i<length;i++){if(callback.apply(object[i],args)===false){break}}}}else{if(object.length==undefined){for(var name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var i=0,length=object.length,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;function color(elem){if(!jQuery.browser.safari){return false}var ret=document.defaultView.getComputedStyle(elem,null);return !ret||ret.getPropertyValue("color")==""}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret}if(jQuery.browser.opera&&name=="display"){var save=elem.style.display;elem.style.display="block";elem.style.display=save}if(name.match(/float/i)){name=styleFloat}if(!force&&elem.style&&elem.style[name]){ret=elem.style[name]}else{if(document.defaultView&&document.defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var getComputedStyle=document.defaultView.getComputedStyle(elem,null);if(getComputedStyle&&!color(elem)){ret=getComputedStyle.getPropertyValue(name)}else{var swap=[],stack=[];for(var a=elem;a&&color(a);a=a.parentNode){stack.unshift(a)}for(var i=0;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":(getComputedStyle&&getComputedStyle.getPropertyValue(name))||"";for(var 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 style=elem.style.left,runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle}}}}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=elem.toString()}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 fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari){elem.parentNode.selectedIndex}if(fix[name]){if(value!=undefined){elem[fix[name]]=value}return elem[fix[name]]}else{if(jQuery.browser.msie&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}else{if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method")){return elem.getAttributeNode(name).nodeValue}else{if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem.setAttribute(name,""+value)}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem)){return elem.getAttribute(name,2)}return elem.getAttribute(name)}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(value!=undefined){elem[name]=value}return elem[name]}}}}},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(typeof array!="array"){for(var i=0,length=array.length;i<length;i++){ret.push(array[i])}}else{ret=array.slice(0)}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){if(jQuery.browser.msie){for(var i=0;second[i];i++){if(second[i].nodeType!=8){first.push(second[i])}}}else{for(var i=0;second[i];i++){first.push(second[i])}}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){if(typeof callback=="string"){callback=eval("false||function(a,i){return "+callback+"}")}var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv&&callback(elems[i],i)||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&&value!=undefined){if(value.constructor!=Array){value=[value]}ret=ret.concat(value)}}return 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,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength",selectedIndex:"selectedIndex",defaultValue:"defaultValue",tagName:"tagName",nodeName:"nodeName"}});jQuery.each({parent:"elem.parentNode",parents:"jQuery.dir(elem,'parentNode')",next:"jQuery.nth(elem,2,'nextSibling')",prev:"jQuery.nth(elem,2,'previousSibling')",nextAll:"jQuery.dir(elem,'nextSibling')",prevAll:"jQuery.dir(elem,'previousSibling')",siblings:"jQuery.sibling(elem.parentNode.firstChild,elem)",children:"jQuery.sibling(elem.firstChild)",contents:"jQuery.nodeName(elem,'iframe')?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)"},function(name,fn){fn=eval("false||function(elem){return "+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")}});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:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)",has:"jQuery.find(m[3],a).length",header:"/h\\d/i.test(a.nodeName)",animated:"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;var re=quickChild;var 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 f=jQuery.expr[m[1]];if(typeof f!="string"){f=jQuery.expr[m[1]][m[2]]}f=eval("false||function(a,i){return "+f+"}");r=jQuery.grep(r,f,not)}}}}}return{r:r,t:t}},dir:function(elem,dir){var matched=[];var 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&&(!elem||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!=undefined){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments)};handler.data=data;handler.guid=fn.guid}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered){return val}val=jQuery.event.handle.apply(arguments.callee.elem,arguments);return val});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){for(var type in events){this.remove(elem,type)}}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(!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(this.fix({type:type,target:elem}))}data[0].type=type;if(jQuery.isFunction(jQuery.data(elem,"handle"))){val=jQuery.data(elem,"handle").apply(elem,data)}if(!fn&&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;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var handlers=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in handlers){var handler=handlers[j];args[0].handler=handler;args[0].data=handler.data;if(!parts[1]||handler.type==parts[1]){var ret=handler.apply(this,args);if(val!==false){val=ret}if(ret===false){event.preventDefault();event.stopPropagation()}}}if(jQuery.browser.msie){event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null}return val},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault){originalEvent.preventDefault()}originalEvent.returnValue=false};event.stopPropagation=function(){if(originalEvent.stopPropagation){originalEvent.stopPropagation()}originalEvent.cancelBubble=true};if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=originalEvent.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},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}arguments[0].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}arguments[0].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){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments)},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){if(this[0]){return jQuery.event.trigger(type,data,this[0],false,fn)}return undefined},toggle:function(){var args=arguments;return this.click(function(event){this.lastToggle=0==this.lastToggle?1:0;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.apply(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:function(url,params,callback){if(jQuery.isFunction(url)){return this.bind("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=(new Date).getTime();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:{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){var jsonp,jsre=/=\?(&|$)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="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&&s.type.toLowerCase()=="get"){var ts=(new Date()).getTime();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}if((!s.url.indexOf("http")||!s.url.indexOf("//"))&&(s.dataType=="script"||s.dataType=="json")&&s.type.toLowerCase()=="get"){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 xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async,s.username,s.password);try{if(s.data){xml.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xml.setRequestHeader("X-Requested-With","XMLHttpRequest");xml.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend){s.beforeSend(xml)}if(s.global){jQuery.event.trigger("ajaxSend",[xml,s])}var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xml,status)}complete();if(s.async){xml=null}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xml){xml.abort();if(!requestDone){onreadystatechange("timeout")}}},s.timeout)}}try{xml.send(s.data)}catch(e){jQuery.handleError(s,xml,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xml,s])}}function complete(){if(s.complete){s.complete(xml,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xml,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xml},handleError:function(s,xml,status,e){if(s.error){s.error(xml,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xml,s,e])}},active:0,httpSuccess:function(r){try{return !r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||r.status==1223||jQuery.browser.safari&&r.status==undefined}catch(e){}return false},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined}catch(e){}return false},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}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(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(fn,fn2):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);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return jQuery.isFunction(opt.complete)&&opt.complete.apply(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.apply(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){return undefined}type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array){q=jQuery.data(elem,type+"queue",array?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].apply(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:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.apply(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.apply(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=(new Date()).getTime();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=(new Date()).getTime();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&&jQuery.isFunction(this.options.complete)){this.options.complete.apply(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.fx.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,fixed=jQuery.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&&jQuery.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(jQuery.css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop)}if(mozilla&&jQuery.css(parent,"overflow")!="visible"){border(parent)}parent=parent.parentNode}if((safari2&&(fixed||jQuery.css(offsetChild,"position")=="absolute"))||(mozilla&&jQuery.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)||0;top+=parseInt(t)||0}return results}})();jQuery.noConflict();var hovertipMouseX;var hovertipMouseY;function hovertipMouseUpdate(B){var A=hovertipMouseXY(B);hovertipMouseX=A[0];hovertipMouseY=A[1]}function hovertipMouseXY(D){if(!D){if(window.event){D=window.event}else{return }}if(typeof (D.pageX)=="number"){var C=D.pageX;var A=D.pageY}else{if(typeof (D.clientX)=="number"){var C=D.clientX;var A=D.clientY;var B=(window.navigator.userAgent.indexOf("Opera")+1)||(window.ScriptEngine&&ScriptEngine().indexOf("InScript")+1)||(navigator.vendor=="KDE");if(!B){if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){C+=document.body.scrollLeft;A+=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){C+=document.documentElement.scrollLeft;A+=document.documentElement.scrollTop}}}}else{return }}return[C,A]}targetSelectById=function(C,B){var D;var A;if(D=C.getAttribute("id")){A="*[@"+B.attribute+"='"+D+"']";return jQuery(A)}};targetSelectByTargetAttribute=function(C,B){target_list=C.getAttribute("target");if(target_list){target_ids=target_list.split(" ");var A="#"+target_ids.join(",#");return jQuery(A)}};targetSelectByPrevious=function(B,A){return jQuery(B.previousSibling)};targetSelectBySiblings=function(B,A){return jQuery(B).siblings()};clicktipPrepareWithCloseLink=function(B,A){return B.append("<a class='clicktip_close'><span>close</span></a>").find("a.clicktip_close").click(function(C){B.hide();return false}).end()};hovertipPrepare=function(B,A){return B.hover(function(){hovertipHideCancel(this)},function(){hovertipHideLater(this)}).css("position","absolute").each(hovertipPosition)};hovertipPrepareNoOp=function(B,A){return B};hovertipPosition=function(A){document.body.appendChild(this)};hovertipIsVisible=function(A){return(jQuery.css(A,"display")!="none")};hovertipShowUnderMouse=function(A){hovertipHideCancel(A);if(!hovertipIsVisible(A)){A.ht.showing=window.setTimeout(function(){A.ht.tip.css({"position":"absolute","top":hovertipMouseY+"px","left":hovertipMouseX+"px"}).show()},A.ht.config.showDelay)}};hovertipHideCancel=function(A){if(A.ht.hiding){window.clearTimeout(A.ht.hiding);A.ht.hiding=null}};hovertipHideLater=function(A){if(A.ht.showing){window.clearTimeout(A.ht.showing);A.ht.showing=null}if(A.ht.hiding){window.clearTimeout(A.ht.hiding);A.ht.hiding=null}A.ht.hiding=window.setTimeout(function(){if(A.ht.hiding){A.ht.tip.hide()}},A.ht.config.hideDelay)};clicktipTargetPrepare=function(C,B,A){return C.addClass(A.attribute+"_target").click(function(){B.ht.tip.toggle();return false})};hovertipTargetPrepare=function(C,B,A){return C.addClass(A.attribute+"_target").hover(function(){hovertipShowUnderMouse(B)},function(){hovertipHideLater(B)})};jQuery.fn.hovertipActivate=function(C,A,D,B){return this.css("display","block").hide().each(function(){if(!this.ht){this.ht=new Object()}this.ht.config=C;var E=A(this,C);if(E&&E.size()){if(!this.ht.targets){this.ht.targets=B(E,this,C)}else{this.ht.targets.add(B(E,this,C))}E.mousemove(hovertipMouseUpdate);if(!this.ht.tip){this.ht.tip=D(jQuery(this),C)}}})};function hovertipInit(){var A={"attribute":"clicktip"};var C={"attribute":"hovertip","showDelay":300,"hideDelay":300};var B="div.hovertip";window.setTimeout(function(){jQuery(B).hovertipActivate(C,targetSelectById,hovertipPrepare,hovertipTargetPrepare)},0);var D="span.hovertip";window.setTimeout(function(){jQuery(D).hovertipActivate(C,targetSelectByPrevious,hovertipPrepare,hovertipTargetPrepare)},0)}(function(B){B.dimensions={version:"1.2"};B.each(["Height","Width"],function(D,C){B.fn["inner"+C]=function(){if(!this[0]){return }var F=C=="Height"?"Top":"Left",E=C=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+C]:A(this,C.toLowerCase())+A(this,"padding"+F)+A(this,"padding"+E)};B.fn["outer"+C]=function(F){if(!this[0]){return }var H=C=="Height"?"Top":"Left",E=C=="Height"?"Bottom":"Right";F=B.extend({margin:false},F||{});var G=this.is(":visible")?this[0]["offset"+C]:A(this,C.toLowerCase())+A(this,"border"+H+"Width")+A(this,"border"+E+"Width")+A(this,"padding"+H)+A(this,"padding"+E);return G+(F.margin?(A(this,"margin"+H)+A(this,"margin"+E)):0)}});B.each(["Left","Top"],function(D,C){B.fn["scroll"+C]=function(E){if(!this[0]){return }return E!=undefined?this.each(function(){this==window||this==document?window.scrollTo(C=="Left"?E:B(window)["scrollLeft"](),C=="Top"?E:B(window)["scrollTop"]()):this["scroll"+C]=E}):this[0]==window||this[0]==document?self[(C=="Left"?"pageXOffset":"pageYOffset")]||B.boxModel&&document.documentElement["scroll"+C]||document.body["scroll"+C]:this[0]["scroll"+C]}});B.fn.extend({position:function(){var H=0,G=0,F=this[0],I,C,E,D;if(F){E=this.offsetParent();I=this.offset();C=E.offset();I.top-=A(F,"marginTop");I.left-=A(F,"marginLeft");C.top+=A(E,"borderTopWidth");C.left+=A(E,"borderLeftWidth");D={top:I.top-C.top,left:I.left-C.left}}return D},offsetParent:function(){var C=this[0].offsetParent;while(C&&(!/^body|html$/i.test(C.tagName)&&B.css(C,"position")=="static")){C=C.offsetParent}return B(C)}});function A(C,D){return parseInt(B.curCSS(C.jquery?C[0]:C,D,true))||0}})(jQuery);jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(B,C,A,E,D){return jQuery.easing[jQuery.easing.def](B,C,A,E,D)},easeInQuad:function(B,C,A,E,D){return E*(C/=D)*C+A},easeOutQuad:function(B,C,A,E,D){return -E*(C/=D)*(C-2)+A},easeInOutQuad:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C+A}return -E/2*((--C)*(C-2)-1)+A},easeInCubic:function(B,C,A,E,D){return E*(C/=D)*C*C+A},easeOutCubic:function(B,C,A,E,D){return E*((C=C/D-1)*C*C+1)+A},easeInOutCubic:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C+A}return E/2*((C-=2)*C*C+2)+A},easeInQuart:function(B,C,A,E,D){return E*(C/=D)*C*C*C+A},easeOutQuart:function(B,C,A,E,D){return -E*((C=C/D-1)*C*C*C-1)+A},easeInOutQuart:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C*C+A}return -E/2*((C-=2)*C*C*C-2)+A},easeInQuint:function(B,C,A,E,D){return E*(C/=D)*C*C*C*C+A},easeOutQuint:function(B,C,A,E,D){return E*((C=C/D-1)*C*C*C*C+1)+A},easeInOutQuint:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C*C*C+A}return E/2*((C-=2)*C*C*C*C+2)+A},easeInSine:function(B,C,A,E,D){return -E*Math.cos(C/D*(Math.PI/2))+E+A},easeOutSine:function(B,C,A,E,D){return E*Math.sin(C/D*(Math.PI/2))+A},easeInOutSine:function(B,C,A,E,D){return -E/2*(Math.cos(Math.PI*C/D)-1)+A},easeInExpo:function(B,C,A,E,D){return(C==0)?A:E*Math.pow(2,10*(C/D-1))+A},easeOutExpo:function(B,C,A,E,D){return(C==D)?A+E:E*(-Math.pow(2,-10*C/D)+1)+A},easeInOutExpo:function(B,C,A,E,D){if(C==0){return A}if(C==D){return A+E}if((C/=D/2)<1){return E/2*Math.pow(2,10*(C-1))+A}return E/2*(-Math.pow(2,-10*--C)+2)+A},easeInCirc:function(B,C,A,E,D){return -E*(Math.sqrt(1-(C/=D)*C)-1)+A},easeOutCirc:function(B,C,A,E,D){return E*Math.sqrt(1-(C=C/D-1)*C)+A},easeInOutCirc:function(B,C,A,E,D){if((C/=D/2)<1){return -E/2*(Math.sqrt(1-C*C)-1)+A}return E/2*(Math.sqrt(1-(C-=2)*C)+1)+A},easeInElastic:function(B,D,A,H,G){var E=1.70158;var F=0;var C=H;if(D==0){return A}if((D/=G)==1){return A+H}if(!F){F=G*0.3}if(C<Math.abs(H)){C=H;var E=F/4}else{var E=F/(2*Math.PI)*Math.asin(H/C)}return -(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+A},easeOutElastic:function(B,D,A,H,G){var E=1.70158;var F=0;var C=H;if(D==0){return A}if((D/=G)==1){return A+H}if(!F){F=G*0.3}if(C<Math.abs(H)){C=H;var E=F/4}else{var E=F/(2*Math.PI)*Math.asin(H/C)}return C*Math.pow(2,-10*D)*Math.sin((D*G-E)*(2*Math.PI)/F)+H+A},easeInOutElastic:function(B,D,A,H,G){var E=1.70158;var F=0;var C=H;if(D==0){return A}if((D/=G/2)==2){return A+H}if(!F){F=G*(0.3*1.5)}if(C<Math.abs(H)){C=H;var E=F/4}else{var E=F/(2*Math.PI)*Math.asin(H/C)}if(D<1){return -0.5*(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+A}return C*Math.pow(2,-10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F)*0.5+H+A},easeInBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158}return F*(C/=E)*C*((D+1)*C-D)+A},easeOutBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158}return F*((C=C/E-1)*C*((D+1)*C+D)+1)+A},easeInOutBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158}if((C/=E/2)<1){return F/2*(C*C*(((D*=(1.525))+1)*C-D))+A}return F/2*((C-=2)*C*(((D*=(1.525))+1)*C+D)+2)+A},easeInBounce:function(B,C,A,E,D){return E-jQuery.easing.easeOutBounce(B,D-C,0,E,D)+A},easeOutBounce:function(B,C,A,E,D){if((C/=D)<(1/2.75)){return E*(7.5625*C*C)+A}else{if(C<(2/2.75)){return E*(7.5625*(C-=(1.5/2.75))*C+0.75)+A}else{if(C<(2.5/2.75)){return E*(7.5625*(C-=(2.25/2.75))*C+0.9375)+A}else{return E*(7.5625*(C-=(2.625/2.75))*C+0.984375)+A}}}},easeInOutBounce:function(B,C,A,E,D){if(C<D/2){return jQuery.easing.easeInBounce(B,C*2,0,E,D)*0.5+A}return jQuery.easing.easeOutBounce(B,C*2-D,0,E,D)*0.5+E*0.5+A}});jQuery.fn.wkCarrusel=function(A){this.carrusel=jQuery(this);jQuery(this.carrusel).addClass("floating");defaults={btnWidth:50,scroll:1,animation:"",animationSpeed:"slow",background:"#ffffff"};this.opts=jQuery.extend(defaults,A);this.items=jQuery("li",this.carrusel);this.opts.height=parseInt(this.items.css("height"));this.draw=jQuery.fn.wkCarrusel.draw;this.draw()};jQuery.fn.wkCarrusel.draw=function(){contCarrusel=document.createElement("div");contCarrusel.id=jQuery(this.carrusel).attr("id");jQuery(contCarrusel).addClass("contCarrusel");contCarrusel.scroll=this.opts.scroll;contCarrusel.animationSpeed=this.opts.animationSpeed;contCarrusel.animation=this.opts.animation;jQuery(contCarrusel).css({width:this.opts.width,height:parseInt(this.items.css("height")),background:this.opts.background});btnLeft=document.createElement("div");jQuery(btnLeft).addClass("btnLeft");btnRigth=document.createElement("div");jQuery(btnRigth).addClass("btnRigth");jQuery(btnRigth).css({background:"url("+this.opts.prevImage+")"});jQuery(btnLeft).css({backgroundImage:"url("+this.opts.nextImage+")"});jQuery(btnLeft).hover(function(){jQuery(this).css({backgroundPosition:"-"+jQuery(this).width()+"px 0px"})},function(){jQuery(this).css({backgroundPosition:"0px 0px"})});jQuery(btnRigth).hover(function(){jQuery(this).css({backgroundPosition:"-"+jQuery(this).width()+"px 0px"})},function(){jQuery(this).css({backgroundPosition:"0px 0px"})});visible=document.createElement("div");jQuery(visible).addClass("areaVisible");jQuery(visible).css({width:this.opts.width-(this.opts.btnWidth*2),"float":"left",height:this.opts.height,position:"relative",overflow:"hidden"});this.carrusel.css({width:this.items.width()*this.items.length,listStyle:"none",position:"absolute",left:0});this.items.css({"float":"left"});jQuery(this.carrusel).replaceWith(contCarrusel);jQuery(btnLeft).appendTo(contCarrusel);jQuery(visible).appendTo(contCarrusel);jQuery(btnRigth).appendTo(contCarrusel);this.carrusel.appendTo(visible);jQuery(".btnRigth , .btnLeft",contCarrusel).css({width:this.opts.btnWidth,height:this.opts.height,"float":"left",cursor:"pointer"});jQuery(this.carrusel).attr("id","wk"+jQuery(this.carrusel).attr("id"));jQuery(this.carrusel)[0].desplazamiento=jQuery(this.carrusel).width()-(jQuery(visible).width()+(jQuery(btnLeft).width()*2));jQuery(this.carrusel)[0].itemWidth=jQuery("li",this.carrusel).width();jQuery(btnRigth).bind("click",function(){if(Math.abs(jQuery(".floating",this.parentNode).position().left)<jQuery(".floating",this.parentNode)[0].desplazamiento&&jQuery(".floating",this.parentNode).position().left%jQuery(".floating",this.parentNode)[0].itemWidth==0){jQuery(".floating",this.parentNode).animate({left:"-="+jQuery("li",this.parentNode).width()*this.parentNode.scroll+"px"},this.parentNode.animationSpeed,this.parentNode.animation)}});jQuery(btnLeft).bind("click",function(){if(parseInt(jQuery(".floating",this.parentNode).position().left)<0&&jQuery(".floating",this.parentNode).position().left%jQuery("li",this.parentNode).width()==0){jQuery(".floating",this.parentNode).animate({left:"+="+jQuery("li",this.parentNode).width()*this.parentNode.scroll+"px"},this.parentNode.animationSpeed,this.parentNode.animation)}})};jQuery.fn.corner=function(F){function K(N){var N=parseInt(N).toString(16);return(N.length<2)?"0"+N:N}function D(O){for(;O&&O.nodeName.toLowerCase()!="html";O=O.parentNode){var N=jQuery.css(O,"backgroundColor");if(N.indexOf("rgb")>=0){rgb=N.match(/\d+/g);return"#"+K(rgb[0])+K(rgb[1])+K(rgb[2])}if(N&&N!="transparent"){return N}}return"#ffffff"}function M(N){switch(H){case"round":return Math.round(E*(1-Math.cos(Math.asin(N/E))));case"cool":return Math.round(E*(1+Math.cos(Math.asin(N/E))));case"sharp":return Math.round(E*(1-Math.cos(Math.acos(N/E))));case"bite":return Math.round(E*(Math.cos(Math.asin((E-N-1)/E))));case"slide":return Math.round(E*(Math.atan2(N,E/N)));case"jut":return Math.round(E*(Math.atan2(E,(E-N-1))));case"curl":return Math.round(E*(Math.atan(N)));case"tear":return Math.round(E*(Math.cos(N)));case"wicked":return Math.round(E*(Math.tan(N)));case"long":return Math.round(E*(Math.sqrt(N)));case"sculpt":return Math.round(E*(Math.log((E-N-1),E)));case"dog":return(N&1)?(N+1):E;case"dog2":return(N&2)?(N+1):E;case"dog3":return(N&3)?(N+1):E;case"fray":return(N%2)*E;case"notch":return E;case"bevel":return N+1}}F=(F||"").toLowerCase();var B=/keep/.test(F);var G=((F.match(/cc:(#[0-9a-f]+)/)||[])[1]);var J=((F.match(/sc:(#[0-9a-f]+)/)||[])[1]);var E=parseInt((F.match(/(\d+)px/)||[])[1])||10;var L=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var H=((F.match(L)||["round"])[0]);var I={T:0,B:1};var A={TL:/top|tl/.test(F),TR:/top|tr/.test(F),BL:/bottom|bl/.test(F),BR:/bottom|br/.test(F)};if(!A.TL&&!A.TR&&!A.BL&&!A.BR){A={TL:1,TR:1,BL:1,BR:1}}var C=document.createElement("div");C.style.overflow="hidden";C.style.height="1px";C.style.backgroundColor=J||"transparent";C.style.borderStyle="solid";return this.each(function(T){var O={T:parseInt(jQuery.css(this,"paddingTop"))||0,R:parseInt(jQuery.css(this,"paddingRight"))||0,B:parseInt(jQuery.css(this,"paddingBottom"))||0,L:parseInt(jQuery.css(this,"paddingLeft"))||0};if(jQuery.browser.msie){this.style.zoom=1}if(!B){this.style.border="none"}C.style.borderColor=G||D(this.parentNode);var V=jQuery.curCSS(this,"height");for(var Q in I){var W=I[Q];C.style.borderStyle="none "+(A[Q+"R"]?"solid":"none")+" none "+(A[Q+"L"]?"solid":"none");var X=document.createElement("div");jQuery(X).addClass("jquery-corner");var N=X.style;W?this.appendChild(X):this.insertBefore(X,this.firstChild);if(W&&V!="auto"){if(jQuery.css(this,"position")=="static"){this.style.position="relative"}N.position="absolute";N.bottom=N.left=N.padding=N.margin="0";if(jQuery.browser.msie){N.setExpression("width","this.parentNode.offsetWidth")}else{N.width="100%"}}else{N.margin=!W?"-"+O.T+"px -"+O.R+"px "+(O.T-E)+"px -"+O.L+"px":(O.B-E)+"px -"+O.R+"px -"+O.B+"px -"+O.L+"px"}var S="";var P=0;for(var R=0;R<E;R++){var Z=Math.max(0,M(R));var Y="0 "+(A[Q+"R"]?Z:0)+"px 0 "+(A[Q+"L"]?Z:0)+"px";if(Y!=S){if(0<P){var U=C.cloneNode(false);U.style.borderWidth=S;U.style.height=P+"px";W?X.appendChild(U):X.insertBefore(U,X.firstChild);P=0}S=Y}++P}if(0<P){var U=C.cloneNode(false);U.style.borderWidth=S;U.style.height=P+"px";W?X.appendChild(U):X.insertBefore(U,X.firstChild)}}})};(function(B){B.ifixpng=function(C){B.ifixpng.pixel=C};B.ifixpng.getPixel=function(){return B.ifixpng.pixel||"images/pixel.gif"};var A={ltie7:B.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),filter:function(C){return"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+C+"')"}};B.fn.ifixpng=A.ltie7?function(){return this.each(function(){var C=B(this);var E=B("base").attr("href");if(C.is("img")||C.is("input")){if(C.attr("src").match(/.*\.png([?].*)?$/i)){var D=(E&&C.attr("src").substring(0,1)!="/")?E+C.attr("src"):C.attr("src");C.css({filter:A.filter(D),width:C.width(),height:C.height()}).attr({src:B.ifixpng.getPixel()}).positionFix()}}else{var F=C.css("backgroundImage");if(F.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)){F=RegExp.$1;C.css({backgroundImage:"none",filter:A.filter(F)}).positionFix()}}})}:function(){return this};B.fn.iunfixpng=A.ltie7?function(){return this.each(function(){var C=B(this);var D=C.css("filter");if(D.match(/src=["']?(.*\.png([?].*)?)["']?/i)){D=RegExp.$1;if(C.is("img")||C.is("input")){C.attr({src:D}).css({filter:""})}else{C.css({filter:"",background:"url("+D+")"})}}})}:function(){return this};B.fn.positionFix=function(){return this.each(function(){var D=B(this);var C=D.css("position");if(C!="absolute"&&C!="relative"){D.css({position:"relative"})}})}})(jQuery);(function(D){var A="2.01";D.fn.cycle=function(F){return this.each(function(){if(F&&F.constructor==String){switch(F){case"stop":if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;return ;case"pause":this.cyclePause=1;return ;case"resume":this.cyclePause=0;return ;default:F={fx:F}}}var M=D(this),J=M.children(),H=J.get();if(H.length<2){return }var G=D.extend({},D.fn.cycle.defaults,F||{},D.meta?M.data():{});if(G.autostop){G.countdown=G.autostopCount||H.length}G.before=G.before?[G.before]:[];G.after=G.after?[G.after]:[];G.after.unshift(function(){G.busy=0});var O=this.className;var L=parseInt((O.match(/w:(\d+)/)||[])[1])||G.width;var I=parseInt((O.match(/h:(\d+)/)||[])[1])||G.height;G.timeout=parseInt((O.match(/t:(\d+)/)||[])[1])||G.timeout;if(M.css("position")=="static"){M.css("position","relative")}if(L){M.width(L)}if(I&&I!="auto"){M.height(I)}J.each(function(P){D(this).css("z-index",H.length-P)}).css("position","absolute").hide();D(H[0]).show();if(G.fit&&L){J.width(L)}if(G.fit&&I&&I!="auto"){J.height(I)}if(G.pause){M.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}var N=D.fn.cycle.transitions[G.fx];if(D.isFunction(N)){N(M,J,G)}J.each(function(){var P=D(this);this.cycleH=(G.fit&&I)?I:P.height();this.cycleW=(G.fit&&L)?L:P.width()});G.cssBefore=G.cssBefore||{};G.animIn=G.animIn||{};G.animOut=G.animOut||{};J.not(":eq(0)").css(G.cssBefore);if(G.cssFirst){D(J[0]).css(G.cssFirst)}if(G.timeout){if(G.speed.constructor==String){G.speed={slow:600,fast:200}[G.speed]||400}if(!G.sync){G.speed=G.speed/2}while((G.timeout-G.speed)<250){G.timeout+=G.speed}}if(G.easing){G.easeIn=G.easeOut=G.easing}if(!G.speedIn){G.speedIn=G.speed}if(!G.speedOut){G.speedOut=G.speed}G.nextSlide=G.random?(Math.floor(Math.random()*(H.length-1)))+1:1;G.currSlide=0;G.slideCount=H.length;var K=J[0];if(G.before.length){G.before[0].apply(K,[K,K,G,true])}if(G.after.length>1){G.after[1].apply(K,[K,K,G,true])}if(G.click&&!G.next){G.next=G.click}if(G.next){D(G.next).bind("click",function(){return C(H,G,G.rev?-1:1)})}if(G.prev){D(G.prev).bind("click",function(){return C(H,G,G.rev?1:-1)})}if(G.pager){E(H,G)}if(G.timeout){this.cycleTimeout=setTimeout(function(){B(H,G,0,!G.rev)},G.timeout+(G.delay||0))}})};function B(K,F,J,L){if(F.busy){return }var I=K[0].parentNode,N=K[F.currSlide],M=K[F.nextSlide];if(I.cycleTimeout===0&&!J){return }if(!J&&!I.cyclePause&&F.autostop&&(--F.countdown<=0)){return }if(J||!I.cyclePause){if(F.before.length){D.each(F.before,function(O,P){P.apply(M,[N,M,F,L])})}var G=function(){D.each(F.after,function(O,P){P.apply(M,[N,M,F,L])})};if(F.nextSlide!=F.currSlide){F.busy=1;if(F.fxFn){F.fxFn(N,M,F,G)}else{if(D.isFunction(D.fn.cycle[F.fx])){D.fn.cycle[F.fx](N,M,F,G)}else{D.fn.cycle.custom(N,M,F,G)}}}if(F.random){F.currSlide=F.nextSlide;while(F.nextSlide==F.currSlide){F.nextSlide=Math.floor(Math.random()*K.length)}}else{var H=(F.nextSlide+1)==K.length;F.nextSlide=H?0:F.nextSlide+1;F.currSlide=H?K.length-1:F.nextSlide-1}if(F.pager){D(F.pager).find("a").removeClass("activeSlide").filter("a:eq("+F.currSlide+")").addClass("activeSlide")}}if(F.timeout){I.cycleTimeout=setTimeout(function(){B(K,F,0,!F.rev)},F.timeout)}}function C(F,G,J){var I=F[0].parentNode,H=I.cycleTimeout;if(H){clearTimeout(H);I.cycleTimeout=0}G.nextSlide=G.currSlide+J;if(G.nextSlide<0){G.nextSlide=F.length-1}else{if(G.nextSlide>=F.length){G.nextSlide=0}}if(G.prevNextClick&&typeof G.prevNextClick=="function"){G.prevNextClick(J>0,G.nextSlide,F[G.nextSlide])}B(F,G,1,J>=0);return false}function E(G,H){var F=D(H.pager);D.each(G,function(I,K){var J=(typeof H.pagerAnchorBuilder=="function")?D(H.pagerAnchorBuilder(I,K)):D('<a href="#">'+(I+1)+"</a>");if(J.parents("body").length==0){J.appendTo(F)}J.bind("click",function(){H.nextSlide=I;var M=G[0].parentNode,L=M.cycleTimeout;if(L){clearTimeout(L);M.cycleTimeout=0}if(typeof H.pagerClick=="function"){H.pagerClick(H.nextSlide,G[H.nextSlide])}B(G,H,1,!H.rev);return false})});F.find("a").filter("a:eq(0)").addClass("activeSlide")}D.fn.cycle.custom=function(L,I,J,F){var K=D(L),H=D(I);H.css(J.cssBefore);var G=function(){H.animate(J.animIn,J.speedIn,J.easeIn,F)};K.animate(J.animOut,J.speedOut,J.easeOut,function(){if(J.cssAfter){K.css(J.cssAfter)}if(!J.sync){G()}});if(J.sync){G()}};D.fn.cycle.transitions={fade:function(G,H,F){H.not(":eq(0)").css("opacity",0);F.before.push(function(){D(this).show()});F.animIn={opacity:1};F.animOut={opacity:0};F.cssAfter={display:"none"}}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={fx:"fade",timeout:4000,speed:1000,speedIn:null,speedOut:null,click:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerAnchorBuilder:null,before:null,after:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",sync:1,random:0,fit:0,pause:0,autostop:0,delay:0}})(jQuery);jQuery.fn.cycle.transitions.scrollUp=function(B,C,A){B.css("overflow","hidden");A.before.push(function(F,D,E){jQuery(this).show();E.cssBefore.top=D.offsetHeight;E.animOut.top=0-F.offsetHeight});A.cssFirst={top:0};A.animIn={top:0};A.cssAfter={display:"none"}};jQuery.fn.cycle.transitions.scrollDown=function(B,C,A){B.css("overflow","hidden");A.before.push(function(F,D,E){jQuery(this).show();E.cssBefore.top=0-D.offsetHeight;E.animOut.top=F.offsetHeight});A.cssFirst={top:0};A.animIn={top:0};A.cssAfter={display:"none"}};jQuery.fn.cycle.transitions.scrollLeft=function(B,C,A){B.css("overflow","hidden");A.before.push(function(F,D,E){jQuery(this).show();E.cssBefore.left=D.offsetWidth;E.animOut.left=0-F.offsetWidth});A.cssFirst={left:0};A.animIn={left:0}};jQuery.fn.cycle.transitions.scrollRight=function(B,C,A){B.css("overflow","hidden");A.before.push(function(F,D,E){jQuery(this).show();E.cssBefore.left=0-D.offsetWidth;E.animOut.left=F.offsetWidth});A.cssFirst={left:0};A.animIn={left:0}};jQuery.fn.cycle.transitions.scrollHorz=function(B,C,A){B.css("overflow","hidden").width();A.before.push(function(H,F,G,E){jQuery(this).show();var D=H.offsetWidth,I=F.offsetWidth;G.cssBefore=E?{left:I}:{left:-I};G.animIn.left=0;G.animOut.left=E?-D:D;C.not(H).css(G.cssBefore)});A.cssFirst={left:0};A.cssAfter={display:"none"}};jQuery.fn.cycle.transitions.scrollVert=function(B,C,A){B.css("overflow","hidden");A.before.push(function(I,F,G,E){jQuery(this).show();var H=I.offsetHeight,D=F.offsetHeight;G.cssBefore=E?{top:-D}:{top:D};G.animIn.top=0;G.animOut.top=E?H:-H;C.not(I).css(G.cssBefore)});A.cssFirst={top:0};A.cssAfter={display:"none"}};jQuery.fn.cycle.transitions.slideX=function(B,C,A){A.animIn={width:"show"};A.animOut={width:"hide"}};jQuery.fn.cycle.transitions.slideY=function(B,C,A){A.animIn={height:"show"};A.animOut={height:"hide"}};jQuery.fn.cycle.transitions.shuffle=function(D,E,C){var A=D.css("overflow","visible").width();E.css({left:0,top:0});C.before.push(function(){jQuery(this).show()});C.speed=C.speed/2;C.random=0;C.shuffle=C.shuffle||{left:-A,top:15};C.els=[];for(var B=0;B<E.length;B++){C.els.push(E[B])}C.fxFn=function(J,H,I,F){var G=jQuery(J);G.animate(I.shuffle,I.speedIn,I.easeIn,function(){I.els.push(I.els.shift());for(var L=0,K=I.els.length;L<K;L++){jQuery(I.els[L]).css("z-index",K-L)}G.animate({left:0,top:0},I.speedOut,I.easeOut,function(){jQuery(this).hide();if(F){F()}})})}};jQuery.fn.cycle.transitions.turnUp=function(B,C,A){A.before.push(function(F,D,E){jQuery(this).show();E.cssBefore.top=D.cycleH;E.animIn.height=D.cycleH});A.cssFirst={top:0};A.cssBefore={height:0};A.animIn={top:0};A.animOut={height:0};A.cssAfter={display:"none"}};jQuery.fn.cycle.transitions.turnDown=function(B,C,A){A.before.push(function(F,D,E){jQuery(this).show();E.animIn.height=D.cycleH;E.animOut.top=F.cycleH});A.cssFirst={top:0};A.cssBefore={top:0,height:0};A.animOut={height:0};A.cssAfter={display:"none"}};jQuery.fn.cycle.transitions.turnLeft=function(B,C,A){A.before.push(function(F,D,E){jQuery(this).show();E.cssBefore.left=D.cycleW;E.animIn.width=D.cycleW});A.cssBefore={width:0};A.animIn={left:0};A.animOut={width:0};A.cssAfter={display:"none"}};jQuery.fn.cycle.transitions.turnRight=function(B,C,A){A.before.push(function(F,D,E){jQuery(this).show();E.animIn.width=D.cycleW;E.animOut.left=F.cycleW});A.cssBefore={left:0,width:0};A.animIn={left:0};A.animOut={width:0};A.cssAfter={display:"none"}};jQuery.fn.cycle.transitions.zoom=function(B,C,A){A.cssFirst={top:0,left:0};A.cssAfter={display:"none"};A.before.push(function(F,D,E){jQuery(this).show();E.cssBefore={width:0,height:0,top:D.cycleH/2,left:D.cycleW/2};E.animIn={top:0,left:0,width:D.cycleW,height:D.cycleH};E.animOut={width:0,height:0,top:F.cycleH/2,left:F.cycleW/2}})};var Prototype={Version:"1.4.0",ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)",emptyFunction:function(){},K:function(A){return A}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(A,B){for(property in B){A[property]=B[property]}return A};Object.inspect=function(A){try{if(A==undefined){return"undefined"}if(A==null){return"null"}return A.inspect?A.inspect():A.toString()}catch(B){if(B instanceof RangeError){return"..."}throw B}};Function.prototype.bind=function(){var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(B){var A=this;return function(C){return A.call(B,C||window.event)}};Object.extend(Number.prototype,{toColorPart:function(){var A=this.toString(16);if(this<16){return"0"+A}return A},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this}});var Try={these:function(){var C;for(var B=0;B<arguments.length;B++){var A=arguments[B];try{C=A();break}catch(D){}}return C}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback()}finally{this.currentlyExecuting=false}}}};function $(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C}Object.extend(String.prototype,{stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var B=new RegExp(Prototype.ScriptFragment,"img");var A=new RegExp(Prototype.ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(eval)},escapeHTML:function(){var B=document.createElement("div");var A=document.createTextNode(this);B.appendChild(A);return B.innerHTML},unescapeHTML:function(){var A=document.createElement("div");A.innerHTML=this.stripTags();return A.childNodes[0]?A.childNodes[0].nodeValue:""},toQueryParams:function(){var A=this.match(/^\??(.*)$/)[1].split("&");return A.inject({},function(D,B){var C=B.split("=");D[C[0]]=C[1];return D})},toArray:function(){return this.split("")},camelize:function(){var D=this.split("-");if(D.length==1){return D[0]}var B=this.indexOf("-")==0?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var C=1,A=D.length;C<A;C++){var E=D[C];B+=E.charAt(0).toUpperCase()+E.substring(1)}return B},inspect:function(){return"'"+this.replace("\\","\\\\").replace("'","\\'")+"'"}});String.prototype.parseQuery=String.prototype.toQueryParams;var $break=new Object();var $continue=new Object();var Enumerable={each:function(B){var A=0;try{this._each(function(D){try{B(D,A++)}catch(E){if(E!=$continue){throw E}}})}catch(C){if(C!=$break){throw C}}},all:function(B){var A=true;this.each(function(D,C){A=A&&!!(B||Prototype.K)(D,C);if(!A){throw $break}});return A},any:function(B){var A=true;this.each(function(D,C){if(A=!!(B||Prototype.K)(D,C)){throw $break}});return A},collect:function(B){var A=[];this.each(function(D,C){A.push(B(D,C))});return A},detect:function(B){var A;this.each(function(D,C){if(B(D,C)){A=D;throw $break}});return A},findAll:function(B){var A=[];this.each(function(D,C){if(B(D,C)){A.push(D)}});return A},grep:function(C,B){var A=[];this.each(function(F,E){var D=F.toString();if(D.match(C)){A.push((B||Prototype.K)(F,E))}});return A},include:function(A){var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inject:function(A,B){this.each(function(D,C){A=B(A,D,C)});return A},invoke:function(B){var A=$A(arguments).slice(1);return this.collect(function(C){return C[B].apply(C,A)})},max:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(D>=(A||D)){A=D}});return A},min:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(D<=(A||D)){A=D}});return A},partition:function(C){var B=[],A=[];this.each(function(E,D){((C||Prototype.K)(E,D)?B:A).push(E)});return[B,A]},pluck:function(B){var A=[];this.each(function(D,C){A.push(D[B])});return A},reject:function(B){var A=[];this.each(function(D,C){if(!B(D,C)){A.push(D)}});return A},sortBy:function(A){return this.collect(function(C,B){return{value:C,criteria:A(C,B)}}).sort(function(E,D){var C=E.criteria,B=D.criteria;return C<B?-1:C>B?1:0}).pluck("value")},toArray:function(){return this.collect(Prototype.K)},zip:function(){var B=Prototype.K,A=$A(arguments);if(typeof A.last()=="function"){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){B(E=C.pluck(D));return E})},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(C){if(!C){return[]}if(C.toArray){return C.toArray()}else{var B=[];for(var A=0;A<C.length;A++){B.push(C[A])}return B}};Object.extend(Array.prototype,Enumerable);Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(B){for(var A=0;A<this.length;A++){B(this[A])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(A){return A!=undefined||A!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(A.constructor==Array?A.flatten():[A])})},without:function(){var A=$A(arguments);return this.select(function(B){return !A.include(B)})},indexOf:function(A){for(var B=0;B<this.length;B++){if(this[B]==A){return B}}return -1},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},shift:function(){var A=this[0];for(var B=0;B<this.length-1;B++){this[B]=this[B+1]}this.length--;return A},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});var Hash={_each:function(A){for(key in this){var B=this[key];if(typeof B=="function"){continue}var C=[key,B];C.key=key;C.value=B;A(C)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(A){return $H(A).inject($H(this),function(B,C){B[C.key]=C.value;return B})},toQueryString:function(){return this.map(function(A){return A.map(encodeURIComponent).join("=")}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")}).join(", ")+"}>"}};function $H(A){var B=Object.extend({},A||{});Object.extend(B,Enumerable);Object.extend(B,Hash);return B}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;do{A(B);B=B.succ()}while(this.include(B))},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(C,A,B){return new ObjectRange(C,A,B)};var Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest()})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(E[D]&&typeof E[D]=="function"){try{E[D].apply(E,[B,C,A])}catch(F){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(A){this.options={method:"post",asynchronous:true,parameters:""};Object.extend(this.options,A||{})},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300)},responseIsFailure:function(){return !this.responseIsSuccess()}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(B,A){this.transport=Ajax.getTransport();this.setOptions(A);this.request(B)},request:function(B){var C=this.options.parameters||"";if(C.length>0){C+="&_="}try{this.url=B;if(this.options.method=="get"&&C.length>0){this.url+=(this.url.match(/\?/)?"&":"?")+C}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10)}this.setRequestHeaders();var A=this.options.postBody?this.options.postBody:C;this.transport.send(this.options.method=="post"?A:null)}catch(D){this.dispatchException(D)}},setRequestHeaders:function(){var B=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version];if(this.options.method=="post"){B.push("Content-type","application/x-www-form-urlencoded");if(this.transport.overrideMimeType){B.push("Connection","close")}}if(this.options.requestHeaders){B.push.apply(B,this.options.requestHeaders)}for(var A=0;A<B.length;A+=2){this.transport.setRequestHeader(B[A],B[A+1])}},onStateChange:function(){var A=this.transport.readyState;if(A!=1){this.respondToReadyState(this.transport.readyState)}},header:function(A){try{return this.transport.getResponseHeader(A)}catch(B){}},evalJSON:function(){try{return eval(this.header("X-JSON"))}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},respondToReadyState:function(A){var C=Ajax.Request.Events[A];var E=this.transport,B=this.evalJSON();if(C=="Complete"){try{(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(E,B)}catch(D){this.dispatchException(D)}if((this.header("Content-type")||"").match(/^text\/javascript/i)){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(E,B);Ajax.Responders.dispatch("on"+C,this,E,B)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax.Responders.dispatch("onException",this,A)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(A,C,B){this.containers={success:A.success?$(A.success):$(A),failure:A.failure?$(A.failure):(A.success?null:$(A))};this.transport=Ajax.getTransport();this.setOptions(B);var D=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(F,E){this.updateContent();D(F,E)}).bind(this);this.request(C)},updateContent:function(){var B=this.responseIsSuccess()?this.containers.success:this.containers.failure;var A=this.transport.responseText;if(!this.options.evalScripts){A=A.stripScripts()}if(B){if(this.options.insertion){new this.options.insertion(B,A)}else{Element.update(B,A)}}if(this.responseIsSuccess()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(A,C,B){this.setOptions(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});document.getElementsByClassName=function(C,A){var B=($(A)||document.body).getElementsByTagName("*");return $A(B).inject([],function(D,E){if(E.className.match(new RegExp("(^|\\s)"+C+"(\\s|$)"))){D.push(E)}return D})};if(!window.Element){var Element=new Object()}Object.extend(Element,{visible:function(A){return $(A).style.display!="none"},toggle:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);Element[Element.visible(A)?"hide":"show"](A)}},hide:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.display="none"}},show:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.display=""}},remove:function(A){A=$(A);A.parentNode.removeChild(A)},update:function(B,A){$(B).innerHTML=A.stripScripts();setTimeout(function(){A.evalScripts()},10)},getHeight:function(A){A=$(A);return A.offsetHeight},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).include(B)},addClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).add(B)},removeClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).remove(B)},cleanWhitespace:function(B){B=$(B);for(var A=0;A<B.childNodes.length;A++){var C=B.childNodes[A];if(C.nodeType==3&&!/\S/.test(C.nodeValue)){Element.remove(C)}}},empty:function(A){return $(A).innerHTML.match(/^\s*$/)},scrollTo:function(B){B=$(B);var A=B.x?B.x:B.offsetLeft,C=B.y?B.y:B.offsetTop;window.scrollTo(A,C)},getStyle:function(B,C){B=$(B);var D=B.style[C.camelize()];if(!D){if(document.defaultView&&document.defaultView.getComputedStyle){var A=document.defaultView.getComputedStyle(B,null);D=A?A.getPropertyValue(C):null}else{if(B.currentStyle){D=B.currentStyle[C.camelize()]}}}if(window.opera&&["left","top","right","bottom"].include(C)){if(Element.getStyle(B,"position")=="static"){D="auto"}}return D=="auto"?null:D},setStyle:function(A,B){A=$(A);for(name in B){A.style[name.camelize()]=B[name]}},getDimensions:function(B){B=$(B);if(Element.getStyle(B,"display")!="none"){return{width:B.offsetWidth,height:B.offsetHeight}}var A=B.style;var E=A.visibility;var C=A.position;A.visibility="hidden";A.position="absolute";A.display="";var F=B.clientWidth;var D=B.clientHeight;A.display="none";A.position=C;A.visibility=E;return{width:F,height:D}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if(window.opera){A.style.top=0;A.style.left=0}}},undoPositioned:function(A){A=$(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}},makeClipping:function(A){A=$(A);if(A._overflow){return }A._overflow=A.style.overflow;if((Element.getStyle(A,"overflow")||"visible")!="hidden"){A.style.overflow="hidden"}},undoClipping:function(A){A=$(A);if(A._overflow){return }A.style.overflow=A._overflow;A._overflow=undefined}});var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(A,B){this.element=$(A);this.content=B.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(C){if(this.element.tagName.toLowerCase()=="tbody"){this.insertContent(this.contentFromAnonymousTable())}else{throw C}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){B.evalScripts()},10)},contentFromAnonymousTable:function(){var A=document.createElement("div");A.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(A.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(A){A.reverse(false).each((function(B){this.element.insertBefore(B,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(A){A.each((function(B){this.element.appendChild(B)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set(this.toArray().concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set(this.select(function(B){return B!=A}).join(" "))},toString:function(){return this.toArray().join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Field={clear:function(){for(var A=0;A<arguments.length;A++){$(arguments[A]).value=""}},focus:function(A){$(A).focus()},present:function(){for(var A=0;A<arguments.length;A++){if($(arguments[A]).value==""){return false}}return true},select:function(A){$(A).select()},activate:function(A){A=$(A);A.focus();if(A.select){A.select()}}};var Form={serialize:function(D){var E=Form.getElements($(D));var C=new Array();for(var B=0;B<E.length;B++){var A=Form.Element.serialize(E[B]);if(A){C.push(A)}}return C.join("&")},getElements:function(B){B=$(B);var C=new Array();for(tagName in Form.Element.Serializers){var D=B.getElementsByTagName(tagName);for(var A=0;A<D.length;A++){C.push(D[A])}}return C},getInputs:function(F,C,D){F=$(F);var A=F.getElementsByTagName("input");if(!C&&!D){return A}var G=new Array();for(var E=0;E<A.length;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}G.push(B)}return G},disable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.blur();A.disabled="true"}},enable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.disabled=""}},findFirstElement:function(A){return Form.getElements(A).find(function(B){return B.type!="hidden"&&!B.disabled&&["input","select","textarea"].include(B.tagName.toLowerCase())})},focusFirstElement:function(A){Field.activate(Form.findFirstElement(A))},reset:function(A){$(A).reset()}};Form.Element={serialize:function(B){B=$(B);var D=B.tagName.toLowerCase();var C=Form.Element.Serializers[D](B);if(C){var A=encodeURIComponent(C[0]);if(A.length==0){return }if(C[1].constructor!=Array){C[1]=[C[1]]}return C[1].map(function(E){return A+"="+encodeURIComponent(E)}).join("&")}},getValue:function(A){A=$(A);var C=A.tagName.toLowerCase();var B=Form.Element.Serializers[C](A);if(B){return B[1]}}};Form.Element.Serializers={input:function(A){switch(A.type.toLowerCase()){case"submit":case"hidden":case"password":case"text":return Form.Element.Serializers.textarea(A);case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A)}return false},inputSelector:function(A){if(A.checked){return[A.name,A.value]}},textarea:function(A){return[A.name,A.value]},select:function(A){return Form.Element.Serializers[A.type=="select-one"?"selectOne":"selectMany"](A)},selectOne:function(C){var D="",B,A=C.selectedIndex;if(A>=0){B=C.options[A];D=B.value;if(!D&&!("value" in B)){D=B.text}}return[C.name,D]},selectMany:function(C){var D=new Array();for(var B=0;B<C.length;B++){var A=C.options[B];if(A.selected){var E=A.value;if(!E&&!("value" in A)){E=A.text}D.push(E)}}return[C.name,D]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(A,B,C){this.frequency=B;this.element=$(A);this.callback=C;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(A,B){this.element=$(A);this.callback=B;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){var B=Form.getElements(this.element);for(var A=0;A<B.length;A++){this.registerCallback(B[A])}},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;case"password":case"text":case"textarea":case"select-one":case"select-multiple":Event.observe(A,"change",this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(A){return A.target||A.srcElement},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},pointerX:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(A){if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},findElement:function(C,B){var A=Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},observers:false,_observeAndCache:function(D,C,B,A){if(!this.observers){this.observers=[]}if(D.addEventListener){this.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){this.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0;A<Event.observers.length;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.attachEvent)){C="keydown"}this._observeAndCache(D,C,B,A)},stopObserving:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.detachEvent)){C="keydown"}if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){D.detachEvent("on"+C,B)}}}});Event.observe(window,"unload",Event.unloadCache,false);var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return[C,A]},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return[C,A]},positionedOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent;if(B){p=Element.getStyle(B,"position");if(p=="relative"||p=="absolute"){break}}}while(B);return[C,A]},offsetParent:function(A){if(A.offsetParent){return A.offsetParent}if(A==document.body){return A}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return A}}return document.body},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=this.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=this.realOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=this.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},clone:function(B,C){B=$(B);C=$(C);C.style.position="absolute";var A=this.cumulativeOffset(B);C.style.top=A[1]+"px";C.style.left=A[0]+"px";C.style.width=B.offsetWidth+"px";C.style.height=B.offsetHeight+"px"},page:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}}while(B=B.offsetParent);B=D;do{A-=B.scrollTop||0;C-=B.scrollLeft||0}while(B=B.parentNode);return[C,A]},clone:function(C,E){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});C=$(C);var D=Position.page(C);E=$(E);var F=[0,0];var B=null;if(Element.getStyle(E,"position")=="absolute"){B=Position.offsetParent(E);F=Position.page(B)}if(B==document.body){F[0]-=document.body.offsetLeft;F[1]-=document.body.offsetTop}if(A.setLeft){E.style.left=(D[0]-F[0]+A.offsetLeft)+"px"}if(A.setTop){E.style.top=(D[1]-F[1]+A.offsetTop)+"px"}if(A.setWidth){E.style.width=C.offsetWidth+"px"}if(A.setHeight){E.style.height=C.offsetHeight+"px"}},absolutize:function(B){B=$(B);if(B.style.position=="absolute"){return }Position.prepare();var D=Position.positionedOffset(B);var F=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=F-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=F+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px"},relativize:function(A){A=$(A);if(A.style.position=="relative"){return }Position.prepare();A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return[C,A]}}(function($){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s={"array":function(x){var a=["["],b,f,i,l=x.length,v;for(i=0;i<l;i+=1){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=","}a[a.length]=v;b=true}}}a[a.length]="]";return a.join("")},"boolean":function(x){return String(x)},"null":function(x){return"null"},"number":function(x){return isFinite(x)?String(x):"null"},"object":function(x){if(x){if(x instanceof Array){return s.array(x)}var a=["{"],b,f,i,v;for(i in x){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=","}a.push(s.string(i),":",v);b=true}}}a[a.length]="}";return a.join("")}return"null"},"string":function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})}return'"'+x+'"'}};$.toJSON=function(v){var f=isNaN(v)?s[typeof v]:s["number"];if(f){return f(v)}};$.parseJSON=function(v,safe){if(safe===undefined){safe=$.parseJSON.safe}if(safe&&!/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(v)){return undefined}return eval("("+v+")")};$.parseJSON.safe=false})(jQuery);var agent=navigator.userAgent.toLowerCase();var is_ie=(agent.indexOf("msie")!=-1);var is_ie_4=(is_ie&&(agent.indexOf("msie 4")!=-1));var is_ie_5=(is_ie&&(agent.indexOf("msie 5.0")!=-1));var is_ie_5_up=(is_ie&&!is_ie_4);var is_ie_5_5=(is_ie&&(agent.indexOf("msie 5.5")!=-1));var is_ie_5_5_up=(is_ie&&!is_ie_4&&!is_ie_5);var is_ie_6=(is_ie&&(agent.indexOf("msie 6.0")!=-1));var is_ie_7=(is_ie&&(agent.indexOf("msie 7.0")!=-1));var is_mozilla=((agent.indexOf("mozilla")!=-1)&&(agent.indexOf("spoofer")==-1)&&(agent.indexOf("compatible")==-1)&&(agent.indexOf("opera")==-1)&&(agent.indexOf("webtv")==-1)&&(agent.indexOf("hotjava")==-1));var is_mozilla_1_3_up=(is_mozilla&&(navigator.productSub>20030210));var is_ns_4=(!is_ie&&(agent.indexOf("mozilla/4.")!=-1));var is_rtf=(is_ie_5_5_up||is_mozilla_1_3_up);var is_safari=(agent.indexOf("safari")!=-1);var submitCountdown=0;function check(D,A,C){for(var B=0;B<D.elements.length;B++){var E=D.elements[B];if((E.name==A)&&(E.type=="checkbox")){E.checked=C}}}function checkAll(E,C,A){if(isArray(C)){for(var D=0;D<E.elements.length;D++){var F=E.elements[D];if(F.type=="checkbox"){for(var B=0;B<C.length;B++){if(F.name==C[B]){F.checked=A.checked}}}}}else{for(var D=0;D<E.elements.length;D++){var F=E.elements[D];if((F.name==C)&&(F.type=="checkbox")){F.checked=A.checked}}}}function checkAllBox(E,C,A){var H=0;var G=0;if(isArray(C)){for(var D=0;D<E.elements.length;D++){var F=E.elements[D];if((F.name!=A.name)&&(F.type=="checkbox")){for(var B=0;B<C.length;B++){if(F.name==C[B]){H++;if(F.checked){G++}}}}}}else{for(var D=0;D<E.elements.length;D++){var F=E.elements[D];if((F.name!=A.name)&&(F.name==C)&&(F.type=="checkbox")){H++;if(F.checked){G++}}}}if(H==G){A.checked=true}else{A.checked=false}}function checkMaxLength(B,A){if((B.value.length)>=A){B.value=B.value.substring(0,A-1)}}function checkTab(A){if((document.all)&&(event.keyCode==9)){A.selection=document.selection.createRange();setTimeout('processTab("'+A.id+'")',0)}}function cloneObject(B,A){for(i in B){if(typeof B[i]=="object"&&A){this[i]=new cloneObject(B[i],true)}else{this[i]=B[i]}}}var Cookie={create:function(C,D,E){if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+D+A+"; path=/"},read:function(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null},erase:function(A){createCookie(A,"",-1)}};document.createInputElement=function(A){if(is_ie){var B=document.createElement("<input name='"+A+"'></input>")}else{var B=document.createElement("input");B.name=A}return B};function disableEsc(){if((document.all)&&(event.keyCode==27)){event.returnValue=false}}if(!Element){Element=new Object()}Element.disable=function(C){C=$(C);var A=C.getElementsByTagName("*");for(var B=0;B<A.length;B++){var D=A[B];var E=D.nodeName.toLowerCase();D.onclick=function(){};D.onmouseover=function(){};D.onmouseout=function(){};if(is_ie){D.onmouseenter=function(){};D.onmouseleave=function(){}}if(E=="a"){D.href="javascript: void(0)"}else{if(E=="input"||E=="select"||E=="script"){D.disabled="true"}else{if(E=="form"){D.action="";D.onsubmit=function(){return false}}}}D.style.cursor="default"}};Element.changeOpacity=function(B,A){A=(A>=100)?99.999:A;A=(A<0)?0:A;B.style.opacity=(A/100);B.style.MozOpacity=(A/100);B.style.KhtmlOpacity=(A/100);B.style.filter="alpha(opacity="+A+")"};if(!Event){Event=new Object()}Event.addHandler=function(D,B,C){if(B.indexOf("on")!=0){B="on"+B}var A=D[B];if(typeof D[B]!="function"){D[B]=C}else{D[B]=function(){if(A){A()}C()}}};Event.enterPressed=function(B){if(!B){B=window.event}var A=B.keyCode;if(A==13){return true}else{return false}};function getSelectedIndex(A){for(var B=0;B<A.length;B++){if(A[B].checked==true){return B}}return -1}function getSelectedRadioName(A){var B=getSelectedIndex(A);if(B==-1){var C=A.name;if(C==null){C=""}return C}else{return A[B].name}}function getSelectedRadioValue(B){var C=getSelectedIndex(B);if(C==-1){var A=B.value;if(A==null){A=""}return A}else{return B[C].value}}function isArray(A){if(!window.Array){return false}else{return A.constructor==window.Array}}function LinkedList(){this.head=null;this.tail=null}LinkedList.prototype.add=function(C){C.listInfo=new Object();var A=this.tail;var B=this.head;if(this.head==null){this.head=C;this.tail=C}else{this.tail.listInfo.next=C;C.listInfo.prev=this.tail;this.tail=C}};LinkedList.prototype.remove=function(C){if(this.head){var A=C.listInfo.next;var B=C.listInfo.prev;if(A){A.listInfo.prev=B}if(B){B.listInfo.next=A}if(this.head=C){this.head=A}if(this.tail=C){this.tail=B}}};LinkedList.prototype.each=function(C){var D=this.head;var B=0;while(D){B++;var A=D.listInfo.next;if(C){C(D)}D=A}return B};LinkedList.prototype.size=function(){return this.each()};function listChecked(C){var B="";for(var A=0;A<C.elements.length;A++){var D=C.elements[A];if((D.type=="checkbox")&&(D.checked==true)&&(D.value>"")){B+=D.value+","}}return B}function listCheckedExcept(D,C){var B="";for(var A=0;A<D.elements.length;A++){var E=D.elements[A];if((E.type=="checkbox")&&(E.checked==true)&&(E.value>"")&&(E.name.indexOf(C)!=0)){B+=E.value+","}}return B}function listSelect(D,A){var C="";if(A==null){A=","}if(D==null){return""}for(var B=0;B<D.length;B++){if(D.options[B].value>""){C+=D.options[B].value+A}}if(C==".none,"){return""}else{return C}}function listUnchecked(C){var B="";for(var A=0;A<C.elements.length;A++){var D=C.elements[A];if((D.type=="checkbox")&&(D.checked==false)&&(D.value>"")){B+=D.value+","}}return B}function listUncheckedExcept(D,C){var B="";for(var A=0;A<D.elements.length;A++){var E=D.elements[A];if((E.type=="checkbox")&&(E.checked==false)&&(E.value>"")&&(E.name.indexOf(C)!=0)){B+=E.value+","}}return B}function moveItem(A,B,E){var G=null;var H=null;var F=null;if(A.selectedIndex>=0){for(var D=0;D<A.length;D++){if(A.options[D].selected){G=A.options[D].text;H=A.options[D].value;F=new Option(G,H);B[B.length]=F}}for(var D=0;D<B.length;D++){for(var C=0;C<A.length;C++){if(A[C].value==B[D].value){A[C]=null;break}}}}if(G!=null){if(E==true){sortBox(B)}}}function processTab(A){document.all[A].selection.text=String.fromCharCode(9);document.all[A].focus()}function reelHome(A,J,I,C,E,G){if(isNaN(J)||isNaN(I)){return }var D=document.getElementById(A);if(D==null){return }var H=parseInt(D.style.top);var B=parseInt(D.style.left);if(E==null){E=1}if(C==null){C==20}if(G==null){G=Math.PI/(2*C);D.style.zIndex=10}if(E<C){var F=1-Math.sin(E*G);D.style.left=(J*F)+"px";D.style.top=(I*F)+"px";setTimeout('reelHome("'+A+'",'+J+","+I+","+C+","+(++E)+","+G+")",16)}else{D.style.top="0px";D.style.left="0px";D.style.zIndex=0}}function removeItem(B,C){if(C==null){for(var A=B.length-1;A>=0;A--){if(B.options[A].selected){B[A]=null}}}else{for(var A=B.length-1;A>=0;A--){if(B.options[A].value==C){B[A]=null}}}}function reorder(D,E){var B=D.selectedIndex;if(B==-1){D.selectedIndex=0}else{sText=D.options[B].text;sValue=D.options[B].value;if((D.options[B].value>"")&&(B>0)&&(E==0)){D.options[B].text=D.options[B-1].text;D.options[B].value=D.options[B-1].value;D.options[B-1].text=sText;D.options[B-1].value=sValue;D.selectedIndex--}else{if((B<D.length-1)&&(D.options[B+1].value>"")&&(E==1)){D.options[B].text=D.options[B+1].text;D.options[B].value=D.options[B+1].value;D.options[B+1].text=sText;D.options[B+1].value=sValue;D.selectedIndex++}else{if(B==0){for(var C=0;C<(D.length-1);C++){D.options[C].text=D.options[C+1].text;D.options[C].value=D.options[C+1].value}D.options[D.length-1].text=sText;D.options[D.length-1].value=sValue;D.selectedIndex=D.length-1}else{if(B==(D.length-1)){for(var A=(D.length-1);A>0;A--){D.options[A].text=D.options[A-1].text;D.options[A].value=D.options[A-1].value}D.options[0].text=sText;D.options[0].value=sValue;D.selectedIndex=0}}}}}}function resubmitCountdown(B){if(submitCountdown>0){submitCountdown--;setTimeout("resubmitCountdown('"+B+"')",1000)}else{submitCountdown=0;if(!is_ns_4){document.body.style.cursor="auto"}var C=document.forms[B];for(var A=0;A<C.length;A++){var D=C.elements[A];if(D.type&&(D.type.toLowerCase()=="button"||D.type.toLowerCase()=="reset"||D.type.toLowerCase()=="submit")){D.disabled=false}}}}function selectAndCopy(A){A.focus();A.select();if(document.all){var B=A.createTextRange();B.execCommand("copy")}}function setBox(C,A){for(var B=C.length-1;B>-1;B--){C.options[B]=null}for(var B=0;B<A.length;B++){C.options[B]=new Option(A[B].value,B)}C.options[0].selected=true}function setCursorPosition(D,C,B){if(D.setSelectionRange){D.setSelectionRange(C,B)}else{if(D.createTextRange){var A=D.createTextRange();A.collapse(true);A.moveEnd("character",B);A.moveStart("character",C);A.select()}}}function setSelectedValue(A,C){for(var B=0;B<A.length;B++){if((A[B].value!="")&&(A[B].value==C)){A.selectedIndex=B;break}}}function setSelectVisibility(C,B){if(is_ie){if(B){B=$(B)}else{B=document.getElementsByTagName("body")[0]}selectList=B.getElementsByTagName("select");for(var A=0;A<selectList.length;A++){selectList[A].style.visibility=C}}}function slideMaximize(E,B,C){var D=document.getElementById(E);var A=D.getElementsByTagName("DIV")[0];B+=C;if(B<(A.offsetHeight)){D.style.height=B+"px";setTimeout('slideMaximize("'+E+'",'+B+","+C+")",10)}else{D.style.overflow="";D.style.height=""}}function slideMinimize(D,A,B){var C=document.getElementById(D);A-=B;if(A>0){C.style.height=A+"px";setTimeout('slideMinimize("'+D+'",'+A+","+B+")",10)}else{C.style.display="none"}}function sortBox(C){var A=new Array();for(var B=0;B<C.length;B++){A[B]=new Array(C[B].value,C[B].text)}A.sort(sortByAscending);for(var B=C.length-1;B>-1;B--){C.options[B]=null}for(var B=0;B<A.length;B++){C.options[C.length]=new Option(A[B][1],A[B][0])}}function sortByAscending(B,A){if(B[1].toLowerCase()>A[1].toLowerCase()){return 1}else{if(B[1].toLowerCase()<A[1].toLowerCase()){return -1}else{return 0}}}function sortByDescending(B,A){if(B[1].toLowerCase()>A[1].toLowerCase()){return -1}else{if(B[1].toLowerCase()<A[1].toLowerCase()){return 1}else{return 0}}}function submitForm(C,D,A){if(submitCountdown==0){submitCountdown=10;setTimeout("resubmitCountdown('"+C.name+"')",1000);if(A==null||A){submitCountdown++;for(var B=0;B<C.length;B++){var E=C.elements[B];if(E.type&&(E.type.toLowerCase()=="button"||E.type.toLowerCase()=="reset"||E.type.toLowerCase()=="submit")){E.disabled=true}}}if(D!=null){C.action=D}if(!is_ns_4){document.body.style.cursor="wait"}C.submit()}else{if(this.submitFormAlert!=null){submitFormAlert(submitCountdown)}}}if(is_ns_4){encodeURIComponent=new function(A){return escape(A)};decodeURIComponent=new function(A){return unescape(A)}}function startsWith(B,A){if(B.indexOf(A)==0){return true}else{return false}}function endsWith(B,A){if(B.lastIndexOf(A)==B.length-A.length){return true}else{return false}}function toHTML(A){A=A.replace(/\&/g,"&amp;");A=A.replace(/</g,"&lt;");A=A.replace(/>/g,"&gt;");A=A.replace(/\n/g,"<br>");A=A.replace(/  /g," &nbsp;");return A}function toText(A){A=A.replace(/\&nbsp;/gi," ");A=A.replace(/<br>/gi,"\n");A=A.replace(/&gt;/gi,">");A=A.replace(/\&lt;/gi,"<");A=A.replace(/\&amp;/gi,"&");return A}function toggleById(D,B,A){var C=document.getElementById(D);if(B){return toggleByObject(C,B,A)}else{toggleByObject(C,null,A)}}function toggleByIdSpan(C,D){var B=toggleById(D,true);var A=C.getElementsByTagName("span");if(B){A[0].style.display="none";A[1].style.display=""}else{A[0].style.display="";A[1].style.display="none"}}function toggleByObject(E,B,A){var C=false;var D="block";if(A!=null){D=A}if(E!=null){if(!E.style.display||!E.style.display.toLowerCase().match("none")){E.style.display="none"}else{E.style.display=D;C=true}}if(B){return C}}function trimString(B){B=B.replace(/^\s+/g,"").replace(/\s+$/g,"");var A=B.charCodeAt(0);while(A==160){B=B.substring(1,B.length);A=B.charCodeAt(0)}A=B.charCodeAt(B.length-1);while(A==160){B=B.substring(0,B.length-1);A=B.charCodeAt(B.length-1)}return B}String.prototype.trim=trimString;var Viewport={frame:function(){var A,B;if(self.innerHeight){A=self.innerWidth;B=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){A=document.documentElement.clientWidth;B=document.documentElement.clientHeight}else{if(document.body){A=document.body.clientWidth;B=document.body.clientHeight}}}return(new Coordinate(A,B))},scroll:function(){var A,B;if(self.pageYOffset){A=self.pageXOffset;B=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){A=document.documentElement.scrollLeft;B=document.documentElement.scrollTop}else{if(document.body){A=document.body.scrollLeft;B=document.body.scrollTop}}}return(new Coordinate(A,B))},page:function(){var A,D;var C=document.body.scrollHeight;var B=document.body.offsetHeight;if(C>B){A=document.body.scrollWidth;D=document.body.scrollHeight}else{A=document.body.offsetWidth;D=document.body.offsetHeight}return(new Coordinate(A,D))}};var ZINDEX={ALERT:100,CHAT_BOX:11,DRAG_ITEM:10,DRAG_ARROW:9};function changeBackground(B,C){var A;if(is_safari){A=self.innerWidth}else{A=document.body.clientWidth}if(C!=null){if(A<=1024){document.body.style.backgroundImage="url("+B+"."+C+")"}else{if(A>1024&&A<=1280){document.body.style.backgroundImage="url("+B+"-1280."+C+")"}else{if(A>1280){document.body.style.backgroundImage="url("+B+"-1600."+C+")"}}}}}var DragLink={create:function(B,A){B.dragId=$(A);B.clickLink=B.href;B.href="javascript:void(0)";B.onclick=DragLink.onLinkClick},onLinkClick:function(){if(this.dragId.wasClicked){if(is_ie){setTimeout('window.location = "'+this.clickLink+'";',0)}else{window.location=this.clickLink}}}};var DynamicSelect={create:function(A,D,E,F,C){var B=new Object();B["callback"]=F;B["target"]=E;D.onchange=function(){loadPage(A,(C?(C+"&"):"")+"sourceValue="+this.value,DynamicSelect.returnFunction,B)}},returnFunction:function(xmlHttpReq,returnObj){var select;var target=returnObj["target"];var callback=returnObj["callback"];try{select=eval("("+xmlHttpReq.responseText+")")}catch(err){}target.length=0;if(select.options.length>0){target.disabled=false;var options=select.options;for(var i=0;i<options.length;i++){target.options[i]=new Option(options[i].name,options[i].value)}}else{target.disabled=true}if(callback!=null){callback()}}};var LiferayDock={MODE:{EXPAND:0,COLLAPSE:1},ORDER:[0,1,4,5,2,8,6,9,3,12,10,7,13,11,14,15],FRAME_C:0.08,cached:null,count:0,constants:null,defaultText:"",defaultTimer:0,defaultTimeout:0,dock:null,dockIcons:null,modeTimer:0,dockCoords:new Array(),debug:function(){$("dock_debug").innerHTML=this.dockCoords.toSource()},initialize:function(H){var L=new Array();this.dockCoords[0]=new Array();this.dockCoords[1]=new Array();for(var C=0;C<4;C++){for(var B=0;B<4;B++){var D=new Object();var I=B*(-54);var G=C*(54);var E=Math.sqrt(I*I+G*G);D.h=E;D.x=I;D.y=G;D.lastFrame=E*this.FRAME_C;if(E){D.sin=G/E;D.cos=I/E}L.push(D)}}for(var C=0;C<16;C++){LiferayDock.dockCoords[0][C]=new Array();LiferayDock.dockCoords[1][C]=new Array()}var K=this;var J=$("portal-dock");var F=document.getElementsByClassName("portal-dock-box",J);var M=F.length;this.dock=J;this.dockIcons=F;this.constants=L;this.defaultText=H||"";J.onmouseover=this.expand.bindAsEventListener(this);J.onmouseout=this.collapse.bindAsEventListener(this);F.each(function(O,N){O.onmouseout=K.collapse.bindAsEventListener(K);O.constants=K.constants[K.ORDER[N]];O.style.zIndex=M-N});var A=$("portal-dock-my-places");A.getElementsByTagName("table")[0].onmouseover=function(){MyPlaces.show();this.onmouseover=function(){}};this.cached=LiferayDockCached},setMode:function(A){this.direction=A;if(!this.timer){this.timer=setTimeout("LiferayDock.animate()",1);clearTimeout(this.defaultTimer);if(A==LiferayDock.MODE.COLLAPSE){this.defaultTimer=setTimeout('LiferayDock.showText("'+this.defaultText+'", 0)',this.defaultTimeout)}}},showText:function(C,A){var B=$("portal-dock-text");this.showObject(B);B.innerHTML=C;this.defaultTimeout=(A||1)*1000},showObject:function(C,A){C=$(C);var B=new Array();B.push($("portal-dock-text"));B.push($("portal-dock-my-places"));B.push($("portal-dock-search"));B.each(function(D){if(C.id==D.id){D.style.display=""}else{D.style.display="none"}});if(C.id=="portal-dock-my-places"){C.getElementsByTagName("table")[0].onmouseover=function(){MyPlaces.show();this.onmouseover=function(){}}}this.defaultTimeout=(A||0)*1000},collapse:function(){if(this.modeTimer){clearTimeout(this.modeTimer)}this.modeTimer=setTimeout("LiferayDock.setMode(LiferayDock.MODE.COLLAPSE)",200)},expand:function(A){if(this.modeTimer){clearTimeout(this.modeTimer)}this.modeTimer=setTimeout("LiferayDock.setMode(LiferayDock.MODE.EXPAND)",100)},animate:function(D){var E=(this.direction==this.MODE.COLLAPSE);var C=this.count;var A=false;var B=this.cached;this.dockIcons.each(function(I,G){if(I.constants.h){if(C<=I.constants.lastFrame){if(!B){var H=C/I.constants.lastFrame;var J=I.constants.h*H;var F}if(E){if(B){I.style.left=B[1][G][C][0]+"px";I.style.top=B[1][G][C][1]+"px"}else{F=Math.PI/2;distRatio=1+Math.sin((H*F)-(Math.PI/2));I.style.left=(distRatio*(I.constants.x))+"px";I.style.top=(distRatio*(I.constants.y))+"px"}}else{if(B){I.style.left=B[0][G][C][0]+"px";I.style.top=B[0][G][C][1]+"px"}else{F=Math.PI/2+Math.PI/8;distRatio=Math.sin(H*F);I.style.left=(distRatio*(I.constants.x/Math.sin(F)))+"px";I.style.top=(distRatio*(I.constants.y/Math.sin(F)))+"px"}}A=true}else{I.style.left=I.constants.x+"px";I.style.top=I.constants.y+"px"}}});if(E&&C>0){this.count--;this.timer=setTimeout("LiferayDock.animate()",30)}else{if(!E&&A){this.count++;this.timer=setTimeout("LiferayDock.animate()",30)}else{this.timer=0}}}};var LayoutColumns={columns:new Array(),highlight:"transparent",layoutMaximized:"",plid:"",doAsUserId:"",arrow:null,displayArrow:function(F,E,D){var C=LayoutColumns.arrow;if(!C){C=new Object();var B=document.createElement("div");B.style.zIndex=ZINDEX.DRAG_ARROW;B.style.display="none";B.className="layout-column-arrow-up";var A=document.createElement("div");A.style.zIndex=ZINDEX.DRAG_ARROW;A.style.display="none";A.className="layout-column-arrow-down";document.body.appendChild(B);document.body.appendChild(A);C.up=B;C.down=A;LayoutColumns.arrow=C}if(F=="up"){C.up.style.top=D+"px";C.up.style.left=E+"px";C.up.style.display="";C.down.style.display="none"}else{if(F=="down"){C.down.style.top=D+"px";C.down.style.left=E+"px";C.down.style.display="";C.up.style.display="none"}else{if(F=="none"){C.down.style.display="none";C.up.style.display="none"}}}},init:function(D){for(var B=0;B<D.length;B++){var C=$("layout-column_"+D[B]);if(C){C.columnId=D[B];DropZone.add(C,{accept:["portlet-boundary"],onDrop:LayoutColumns.onDrop,onHoverOver:LayoutColumns.onHoverOver,onHoverOut:function(){LayoutColumns.displayArrow("none")},inheritParent:true});LayoutColumns.columns.push(C,{onDrop:LayoutColumns.onDrop});var A=document.getElementsByClassName("portlet-boundary",C);A.each(function(F,E){if(!F.isStatic){LayoutColumns.initPortlet(F)}})}}},initPortlet:function(B){B=$(B);var A=document.getElementsByClassName("portlet-header-bar",B)[0]||document.getElementsByClassName("portlet-title-default",B)[0];if(A){A.style.cursor="move";DragDrop.create(B,{revert:true,handle:A,ghosting:true,highlightDropzones:LayoutColumns.highlight})}},onDrop:function(J){var B=this;var A=B.dropItem;var F=A.childNodes;var D=null;J.dragOptions.clone.isStatic="yes";for(var G=0;G<F.length;G++){var H=F[G];if(H.className&&Element.hasClassName(H,"portlet-boundary")){if(!H.isStatic){var E=Coordinates.northwestOffset(H,true);var I=E.y+(H.offsetHeight/2);if(mousePos.y<I){D=H;break}}else{if(H.isStatic.match("end")){D=H;break}}}}Element.remove(J);A.insertBefore(J,D);J.dragOptions.revert=false;J.style.position="";J.style.left="";J.style.top="";J.style.height="";J.style.width="100%";var C=0;for(var G=0;G<F.length;G++){var H=F[G];if(H.className&&Element.hasClassName(H,"portlet-boundary")){if(!H.isStatic){if(H==J){break}C++}}}LayoutColumns.displayArrow("none");movePortlet(LayoutColumns.plid,J.portletId,A.columnId,C,LayoutColumns.doAsUserId)},onHoverOver:function(N){var C=this;var B=C.dropItem;var H=B.childNodes;var E=null;var A=true;var F;var K;for(var I=0;I<H.length;I++){var J=H[I];if(J.className&&Element.hasClassName(J,"portlet-boundary")){if(!J.isStatic){K=J;F=mousePos.insideObject(J,true);if(F){var M=J.offsetHeight/2;if(F.y<=M||J==N.dragOptions.clone){A=false}else{A=true}E=J;break}}else{if(J.isStatic.match("end")){E=J;break}}}}var L;var D;if(E){D=F.nwOffset.x+20;if(A){L=F.nwOffset.y+E.offsetHeight-50;LayoutColumns.displayArrow("down",D,L)}else{L=F.nwOffset.y;LayoutColumns.displayArrow("up",D,L)}}else{if(K){var G=Coordinates.northwestOffset(K,true);L=G.y+K.offsetHeight-50;D=G.x+20;LayoutColumns.displayArrow("down",D,L)}else{var G=Coordinates.northwestOffset(B,true);L=G.y;D=G.x+20;LayoutColumns.displayArrow("up",D,L)}}}};var Navigation={params:new Object(),lastMoved:null,reordered:null,addPage:function(){var B=Navigation.params;var A=themeDisplay.getPathMain()+"/layout_management/update_page?cmd=add&groupId="+B.groupId+"&private="+B.isPrivate+"&parent="+B.parent+"&mainPath="+encodeURIComponent(themeDisplay.getPathMain())+"&doAsUserId="+themeDisplay.getDoAsUserIdEncoded();AjaxUtil.request(A,{onComplete:function(D){var C=$J(D.responseText);window.location=C.url+"&newPage=1"}})},removePage:function(){var C=$("layout-tab-selected");var A=$("layout-tab-text-edit").innerHTML;var D=Navigation.params;if(confirm("Remove "+A+'"?')){var B=themeDisplay.getPathMain()+"/layout_management/update_page?cmd=delete&ownerId="+D.ownerId+"&layoutId="+D.layoutId;AjaxUtil.request(B,{onComplete:function(){window.location=themeDisplay.getPathMain()+"/portal/layout?p_l_id="+D.ownerId+".1"}})}},init:function(C){Navigation.params=C;QuickEdit.create("layout-tab-text-edit",{dragId:"layout-tab-selected",fixParent:true,onEdit:function(D,G){var E=D.parentNode;var F=document.createElement("a");F.innerHTML="X";F.href="javascript:Navigation.removePage()";F.className="layout-tab-close";E.className="layout-tab-text-editing";D.style.width=(G+20)+"px";Element.addClassName(D,"layout-tab-input");E.insertBefore(F,D)},onComplete:function(G,D){var F=G.parentNode;var I=document.getElementsByClassName("layout-tab-close",F);var K=I[I.length-1];var H=G.innerHTML;F.className="layout-tab-text";if(H==""){G.innerHTML=H="(UNTITLED)"}K.style.display="none";if(D!=H){var J=Navigation.params;var E=themeDisplay.getPathMain()+"/layout_management/update_page?cmd=title&title="+encodeURIComponent(H)+"&ownerId="+J.ownerId+"&language="+J.language+"&layoutId="+J.layoutId;AjaxUtil.request(E)}}});DropZone.add("layout-nav-container",{accept:["layout-tab"],onHoverOver:Navigation.onDrag,onDrop:Navigation.onDrop});var A=document.getElementsByClassName("layout-tab",$("layout-nav-container"));A.each(function(G,E){var F=G.getElementsByTagName("a");if(F.length>0){F[0].style.cursor="pointer"}DragDrop.create(G,{forceDrop:true,revert:true});G.layoutId=Navigation.params.layoutIds[E];G.style.cursor="move";var D=G.getElementsByTagName("a");if(D.length>0){DragLink.create(D[0],G)}});if(Navigation.params.newPage){var B=$("layout-tab-text-edit").editOptions;$(B.dragId).wasClicked=true;QuickEdit.edit($("layout-tab-text-edit"))}},move:function(D,G,F){var B=document.getElementsByClassName("layout-tab",$("layout-nav-container"));var A=D;var E=document.getElementById("layout-nav-container");var C;Element.remove(A);if(G>F){C=B[F]}else{if(F==B.length-1){C=$("layout-tab-add")}else{C=B[F+1]}}E.insertBefore(A,C)},onDrag:function(D){var A=D.dragOptions;var F=A.clone;var C=-1;var E=-1;F.layoutId=D.layoutId;var B=document.getElementsByClassName("layout-tab","layout-nav-container");B.each(function(H,G){if(H==F){C=G}if(mousePos.insideObject(H,true)){if(H!=F){if(H!=Navigation.lastMoved){E=G;Navigation.lastMoved=H}}else{Navigation.lastMoved=null}}});if(C>=0&&E>=0){Navigation.move(F,C,E)}},onDrop:function(D){tabs=document.getElementsByClassName("layout-tab",$("layout-nav-container"));var C=new Array();for(var B=0;B<tabs.length;B++){C[B]=tabs[B].layoutId}Navigation.reordered=C;if(Navigation.reordered){var C=Navigation.reordered;var E=Navigation.params;var A=themeDisplay.getPathMain()+"/layout_management/update_page?cmd=reorder&ownerId="+E.ownerId+"&parent="+E.parent+"&layoutIds="+C.concat(Navigation.params.hiddenIds);AjaxUtil.request(A)}}};var PortletHeaderBar={fadeIn:function(C){var B=document.getElementById(C);if(B==null){return }if(B.startOut){clearTimeout(B.timerOut);B.timerOut=0}B.startOut=false;B.startIn=true;B.opac+=20;for(var A=0;A<B.iconList.length;A++){Element.changeOpacity(B.iconList[A],B.opac)}B.iconBar.style.display="block";if(B.opac<100){B.timerIn=setTimeout('PortletHeaderBar.fadeIn("'+C+'")',50)}else{B.timerIn=0;B.startIn=false}},fadeOut:function(C){var B=document.getElementById(C);if(B==null){return }if(B.startIn){clearTimeout(B.timerIn);B.timerIn=0}B.startIn=false;B.startOut=true;B.opac-=20;for(var A=0;A<B.iconList.length;A++){Element.changeOpacity(B.iconList[A],B.opac)}B.iconBar.style.display="block";if(B.opac>0){B.timerOut=setTimeout('PortletHeaderBar.fadeOut("'+C+'")',50)}else{B.iconBar.style.display="none";B.timerOut=0;B.startOut=false}},init:function(A){if(!A.iconBar){A.iconBar=document.getElementsByClassName("portlet-small-icon-bar",A)[0]}if(!A.iconList){A.iconList=A.iconBar.getElementsByTagName("img")}},hide:function(B){var A=document.getElementById(B);if(A.timerIn&&!A.startIn){clearTimeout(A.timerIn);A.timerIn=0}if(!A.startOut&&A.opac>0){if(A.timerOut){clearTimeout(A.timerOut);A.timerOut=0}this.init(A);A.timerOut=setTimeout('PortletHeaderBar.fadeOut("'+B+'")',150)}},show:function(B){var A=document.getElementById(B);if(A.timerOut&&!A.startOut){clearTimeout(A.timerOut);A.timerOut=0}if(!A.startIn&&(!A.opac||A.opac<100)){if(!A.opac){A.opac=0}if(A.timerIn){clearTimeout(A.timerIn);A.timerIn=0}this.init(A);A.timerIn=setTimeout('PortletHeaderBar.fadeIn("'+B+'")',150)}}};var PhotoSlider=Class.create();PhotoSlider.prototype={initialize:function(C,A,E,B,D){this.TOTAL_FRAMES=20;this.count=0;this.page=0;this.timer=0;this.start=0;this.photos=$(E);this.photos.style.position="relative";this.photos.style.left="0px";this.slidingWindow=$(C);this.windowWidth=A;this.totalPages=B;this.varName=D},animate:function(){if(this.count<=this.TOTAL_FRAMES){var B=this.count/this.TOTAL_FRAMES;var A=Math.sin(B*(Math.PI/2));var C=-(this.page*this.windowWidth)-this.start;this.photos.style.left=this.start+(C*A);this.count++;this.timer=setTimeout(this.varName+".animate()",30)}else{this.timer=0}},left:function(){this.start=parseInt(this.photos.style.left);if(this.page>0){this.page--;this.count=0;if(!this.timer){this.timer=setTimeout(this.varName+".animate()",30)}}},right:function(){this.start=parseInt(this.photos.style.left);if(this.page<(this.totalPages-1)){this.page++;this.count=0;if(!this.timer){this.timer=setTimeout(this.varName+".animate()",30)}}}};var Tabs={show:function(C,D,E){var B=document.getElementById(C+E+"TabsId");if(B){B.className="current"}B=document.getElementById(C+E+"TabsSection");if(B){B.style.display="block"}for(var A=0;(D.length>1)&&(A<D.length);A++){if(E!=D[A]){B=document.getElementById(C+D[A]+"TabsId");if(B){B.className="none"}B=document.getElementById(C+D[A]+"TabsSection");if(B){B.style.display="none"}}}}};var QuickEdit={inputList:new LinkedList(),create:function(C,A){var B=$(C);B.editOptions=A;B.onclick=function(){QuickEdit.edit(this)};B.style.cursor="text"},edit:function(A){var D=A.editOptions||new Object();var H=true;var G=false;if(D.dragId){H=$(D.dragId).wasClicked}if(D.inputType&&D.inputType=="textarea"){G=true}if(!A.editing&&H){var C;var B=A.parentNode;if(G){C=document.createElement("textarea")}else{C=document.createElement("input")}if(D.fixParent){B.style.width=B.offsetWidth+"px"}C.className="portlet-form-input-field";C.value=toText(A.innerHTML);C.textObj=A;C.onmouseover=function(){document.onclick=function(){}};C.onmouseout=function(){document.onclick=function(){QuickEdit.inputList.each(QuickEdit.onDone)}};C.onkeydown=function(I){if(!G&&Event.enterPressed(I)){QuickEdit.inputList.each(QuickEdit.onDone)}};var F=A.offsetWidth;var E=A.offsetHeight;A.style.display="none";B.appendChild(C);if(D.onEdit){D.onEdit(C,F,E)}C.focus();QuickEdit.inputList.add(C);if(D.dragId){$(D.dragId).disableDrag=true}A.editing=true}},onDone:function(D){if(D){document.onclick=function(){};var B=D.textObj;var C=B.parentNode;var F=toHTML(D.value);var A=B.innerHTML;var E=B.editOptions;B.innerHTML=F;if(E.onComplete){E.onComplete(B,A)}Element.remove(D);B.style.display="";B.editing=false;if(E.dragId){$(E.dragId).disableDrag=false}if(E.fixParent){C.style.width="auto"}QuickEdit.inputList.remove(D)}}};var StarRating=Class.create();StarRating.prototype={initialize:function(C,B){this.options=B||new Object();this.rating=this.options.rating||0;C=$(C);this.stars=$A(C.getElementsByTagName("img"));var A=this;if(!this.options.displayOnly){C.onmouseout=this.onHoverOut.bindAsEventListener(this);this.stars.each(function(E,D){E.index=D+1;E.onclick=A.onClick.bindAsEventListener(A);E.onmouseover=A.onHoverOver.bindAsEventListener(A)})}this.display(this.rating,"rating")},display:function(C,E){var A=this;C=C==null?this.rating:C;var D=Math.floor(C);var B=C-D;this.stars.each(function(G,F){if(F<D){if(E=="hover"){G.src=G.src.replace(/\bstar_.*\./,"star_hover.")}else{G.src=G.src.replace(/\bstar_.*\./,"star_on.")}}else{if(B<0.25){G.src=G.src.replace(/\bstar_.*\./,"star_off.")}else{if(B<0.5){G.src=G.src.replace(/\bstar_.*\./,"star_on_quarter.")}else{if(B<0.75){G.src=G.src.replace(/\bstar_.*\./,"star_on_half.")}else{if(B<1){G.src=G.src.replace(/\bstar_.*\./,"star_on_threequarters.")}}}}B=0}})},onHoverOver:function(A){var B=Event.element(A);this.display(B.index,"hover")},onHoverOut:function(A){this.display()},onClick:function(B){var C=Event.element(B);var A=C.index;this.rating=A;if(this.options.onComplete){this.options.onComplete(A)}this.display(A)}};var ToolTip={current:null,opacity:100,show:function(A,D,E){A=A||window.event;var C=D;var B=ToolTip.current;C.onmouseout=ToolTip.hide;if(!B){var B=document.createElement("div");B.className="portal-tool-tip";B.style.position="absolute";B.style.cursor="default";document.body.appendChild(B);ToolTip.current=B}B.innerHTML=E;B.style.display="";B.style.top=(Event.pointerY(A)-15)+"px";B.style.left=(Event.pointerX(A)-15-(6*E.length))+"px"},hide:function(A){if(ToolTip.current){ToolTip.current.style.display="none"}},fadeOut:function(){if(ToolTip.current){var B=ToolTip.current;var A=ToolTip.opacity;if(A>0&&A<100){ToolTip.opacity-=20;Element.changeOpacity(B,ToolTip.opacity);ToolTip.timeout=setTimeout("ToolTip.fadeOut()",30)}else{Element.changeOpacity(B,100);if(A<=0){ToolTip.current.style.display="none"}}}}};var LiferayDockCached=[[[],[[-0,0],[-26,0],[-46,0],[-57,0],[-57,0]],[[-0,0],[-0,26],[-0,46],[-0,57],[-0,57]],[[-0,0],[-18,18],[-35,35],[-48,48],[-56,56],[-58,58],[-55,55]],[[-0,0],[-26,0],[-51,0],[-74,0],[-92,0],[-106,0],[-114,0],[-117,0],[-113,0]],[[-0,0],[-0,26],[-0,51],[-0,74],[-0,92],[-0,106],[-0,114],[-0,117],[-0,113]],[[-0,0],[-24,12],[-46,23],[-67,33],[-85,42],[-99,50],[-110,55],[-116,58],[-117,58],[-113,57]],[[-0,0],[-12,24],[-23,46],[-33,67],[-42,85],[-50,99],[-55,110],[-58,116],[-58,117],[-57,113]],[[-0,0],[-26,0],[-52,0],[-77,0],[-100,0],[-120,0],[-138,0],[-153,0],[-164,0],[-172,0],[-175,0],[-175,0],[-170,0]],[[-0,0],[-0,26],[-0,52],[-0,77],[-0,100],[-0,120],[-0,138],[-0,153],[-0,164],[-0,172],[-0,175],[-0,175],[-0,170]],[[-0,0],[-19,19],[-37,37],[-54,54],[-70,70],[-84,84],[-96,96],[-105,105],[-112,112],[-116,116],[-117,117],[-115,115],[-110,110]],[[-0,0],[-25,8],[-50,17],[-73,24],[-95,32],[-115,38],[-133,44],[-148,49],[-160,53],[-169,56],[-174,58],[-175,58],[-173,58],[-168,56]],[[-0,0],[-8,25],[-17,50],[-24,73],[-32,95],[-38,115],[-44,133],[-49,148],[-53,160],[-56,169],[-58,174],[-58,175],[-58,173],[-56,168]],[[-0,0],[-22,15],[-44,29],[-65,43],[-85,56],[-103,69],[-120,80],[-135,90],[-148,99],[-159,106],[-167,111],[-172,115],[-175,117],[-175,117],[-172,115],[-166,111]],[[-0,0],[-15,22],[-29,44],[-43,65],[-56,85],[-69,103],[-80,120],[-90,135],[-99,148],[-106,159],[-111,167],[-115,172],[-117,175],[-117,175],[-115,172],[-111,166]],[[-0,0],[-19,19],[-37,37],[-55,55],[-73,73],[-89,89],[-105,105],[-120,120],[-133,133],[-144,144],[-154,154],[-162,162],[-168,168],[-173,173],[-175,175],[-175,175],[-174,174],[-170,170],[-164,164]]],[[],[[-0,0],[-4,0],[-14,0],[-29,0],[-48,0]],[[-0,0],[-0,4],[-0,14],[-0,29],[-0,48]],[[-0,0],[-2,2],[-7,7],[-15,15],[-26,26],[-39,39],[-52,52]],[[-0,0],[-2,0],[-7,0],[-16,0],[-27,0],[-42,0],[-58,0],[-76,0],[-95,0]],[[-0,0],[-0,2],[-0,7],[-0,16],[-0,27],[-0,42],[-0,58],[-0,76],[-0,95]],[[-0,0],[-1,1],[-6,3],[-13,6],[-22,11],[-34,17],[-47,24],[-63,31],[-79,40],[-96,48]],[[-0,0],[-1,1],[-3,6],[-6,13],[-11,22],[-17,34],[-24,47],[-31,63],[-40,79],[-48,96]],[[-0,0],[-1,0],[-5,0],[-11,0],[-19,0],[-29,0],[-41,0],[-55,0],[-70,0],[-87,0],[-105,0],[-124,0],[-143,0]],[[-0,0],[-0,1],[-0,5],[-0,11],[-0,19],[-0,29],[-0,41],[-0,55],[-0,70],[-0,87],[-0,105],[-0,124],[-0,143]],[[-0,0],[-1,1],[-4,4],[-8,8],[-14,14],[-22,22],[-31,31],[-41,41],[-52,52],[-65,65],[-78,78],[-91,91],[-105,105]],[[-0,0],[-1,0],[-4,1],[-10,3],[-17,6],[-26,9],[-37,12],[-50,17],[-64,21],[-79,26],[-96,32],[-113,38],[-131,44],[-150,50]],[[-0,0],[-0,1],[-1,4],[-3,10],[-6,17],[-9,26],[-12,37],[-17,50],[-21,64],[-26,79],[-32,96],[-38,113],[-44,131],[-50,150]],[[-0,0],[-1,1],[-3,2],[-7,5],[-13,9],[-20,13],[-29,19],[-39,26],[-50,33],[-62,42],[-76,50],[-90,60],[-105,70],[-120,80],[-136,91],[-153,102]],[[-0,0],[-1,1],[-2,3],[-5,7],[-9,13],[-13,20],[-19,29],[-26,39],[-33,50],[-42,62],[-50,76],[-60,90],[-70,105],[-80,120],[-91,136],[-102,153]],[[-0,0],[-1,1],[-2,2],[-5,5],[-9,9],[-15,15],[-21,21],[-28,28],[-37,37],[-46,46],[-56,56],[-67,67],[-78,78],[-91,91],[-103,103],[-116,116],[-130,130],[-144,144],[-157,157]]]];function AjaxRequest(C,K){var E;var B=K;var G=B.returnArgs;var A=B.method;var I=B.ajaxId;if(window.XMLHttpRequest){E=new XMLHttpRequest();if(E.overrideMimeType){E.overrideMimeType("text/html")}}else{if(window.ActiveXObject){try{E=new ActiveXObject("Msxml2.XMLHTTP")}catch(H){try{E=new ActiveXObject("Microsoft.XMLHTTP")}catch(H){try{E=new XMLHttpRequest()}catch(H){}}}}}var D=B.onComplete;var J=function(){if(E.readyState==4){try{if(E.status==200){var L;try{L=E.getResponseHeader("Ajax-ID")}catch(M){L=""}if(D){D(E,G)}if(L&&L!=""){AjaxUtil.remove(parseInt(L))}}}catch(M){}}};var F=function(M){var L=M.split("?");var P=L[0];var N=L[1];try{if(A=="get"){E.open("GET",M,true);E.onreadystatechange=J;E.send("")}else{E.open("POST",P,true);E.setRequestHeader("Method","POST "+P+" HTTP/1.1");E.setRequestHeader("Content-Type","application/x-www-form-urlencoded");E.setRequestHeader("Ajax-ID",I);E.onreadystatechange=J;E.send(N)}}catch(O){}};F(C);this.resend=function(M,L){B=L;D=B.onComplete;F(M)};this.getId=function(){return I};this.cleanUp=function(){E.onreadystatechange=function(){};J=null;G=null;E=null}}var AjaxUtil={counter:1,requests:new Array(),request:function(C,B){var E=(B==null)?(new Object()):B;var A=(E.reverseAjax)?0:AjaxUtil.getNextId();E.ajaxId=A;var D;if(A==0&&AjaxUtil.requests[0]){D=AjaxUtil.requests[0];D.resend(C,E)}else{D=new AjaxRequest(C,E);AjaxUtil.requests[A]=D}if(!E.onComplete){AjaxUtil.remove(A)}},update:function(B,E,A){var C=$(E);if(C){if(A==null){A=new Object()}var D=A.onComplete;A.onComplete=function(G,F){C.innerHTML=G.responseText;executeLoadedScript(C);if(D){D()}};AjaxUtil.request(B,A)}},getNextId:function(){var A=AjaxUtil.counter++;if(AjaxUtil.counter>20){AjaxUtil.counter=1}return A},remove:function(B){if(B){var A=AjaxUtil.requests[B];if(A){A.cleanUp();A=null}}}};var ReverseAjax={initialize:function(){Event.observe(window,"unload",function(){ReverseAjax.release()});ReverseAjax.request()},request:function(){AjaxUtil.request(themeDisplay.getPathMain()+"/portal/reverse_ajax",{onComplete:ReverseAjax.response,reverseAjax:true})},response:function(C){var B=$J(C.responseText);var A=B.status;if(A&&A!="failure"){if(A=="success"){if(B.chatMessages){Messaging.getChatsReturn(B.chatMessages)}if(B.chatRoster){MessagingRoster.getEntriesReturn(B.chatRoster)}}ReverseAjax.request()}},release:function(){AjaxUtil.request(themeDisplay.getPathMain()+"/portal/reverse_ajax?release=1",{reverseAjax:true})}};function $J(JSONText){return eval("("+JSONText+")")}function executeLoadedScript(el){var scripts=el.getElementsByTagName("script");for(var i=0;i<scripts.length;i++){if(scripts[i].src){var head=document.getElementsByTagName("head")[0];var scriptObj=document.createElement("script");scriptObj.setAttribute("type","text/javascript");scriptObj.setAttribute("src",scripts[i].src);head.appendChild(scriptObj)}else{try{if(is_safari){eval(scripts[i].innerHTML)}else{if(is_mozilla){eval(scripts[i].textContent)}else{eval(scripts[i].text)}}}catch(e){}}}}function loadForm(C,D,A,B){var G=D.indexOf("?");var E=D;var F="";if(G!=-1){E=D.substring(0,G);F=D.substring(G+1,D.length)}if(!endsWith(F,"&")){F+="&"}F+=Form.serialize(C);if(A!=null){document.body.style.cursor="wait";G=E.indexOf("/portal/layout");E=E.substring(0,G)+"/portal/render_portlet";B=function(H){document.getElementById(A).innerHTML=H.responseText;document.body.style.cursor="default"}}loadPage(E,F,B)}function loadPage(C,D,B,A){AjaxUtil.request(C+"?"+D,{onComplete:B,returnArgs:A})}function printJSON(A){if(A&&A.id){var B=document.getElementById(A.id);if(B){B.innerHTML=A.toString()}}}var Alerts={background:null,message:null,messageArray:new Array(),fadeTimer:0,OPACITY:51,STEPS:3,bgFadeIn:function(A,B,C){var D=Alerts.background;var E=A/B;if(C==null){C=E}if(D&&C<=A){Element.changeOpacity(D,C);C+=E;setTimeout("Alerts.bgFadeIn("+A+","+B+","+C+")",0)}},bgFadeOut:function(A,B,C){var D=Alerts.background;if(D){var E=A/B;if(C==null){C=A-E}if(C>=0){Element.changeOpacity(D,C);C-=E;setTimeout("Alerts.bgFadeOut("+A+","+B+","+C+")",0)}else{D.parentNode.removeChild(D);setSelectVisibility("visible",Alerts.message);Alerts.background=null}}},createWrapper:function(H,A){var E=document.createElement("div");var I=document.createElement("div");var G=document.createElement("table");var D=document.createElement("a");E.className="pop-up-outer";E.align="center";I.className="pop-up-inner";D.innerHTML="Close";D.href="javascript:Alerts.killAlert()";G.className="pop-up-header";G.border=0;G.width="100%";G.cellSpacing=0;G.cellPadding=0;G.insertRow(0);var F=G.rows[0];F.insertCell(0);F.insertCell(1);var C=F.cells[0];var B=F.cells[1];C.className="pop-up-title";C.width="99%";if(A){C.innerHTML=A}B.className="pop-up-close";B.width="1%";B.innerHTML='<a href="javascript:void(0)" onclick="Alerts.killAlert(this)"><img border="0" src="'+themeDisplay.getPathThemeImage()+'/portlet/close.gif"/></a>';I.appendChild(G);I.appendChild(H);E.appendChild(I);H.wrapper=E;Drag.makeDraggable(E,C);return E},killAlert:function(E){if(E){var F=E;while(F.parentNode){if(F.className&&F.className.match("pop-up-outer")){break}F=F.parentNode}var A=document.getElementsByTagName("body")[0];var B=F.options;var C=null;var D=false;Alerts.remove(F);A.removeChild(F);if(Alerts.messageArray.length>0){Alerts.message=Alerts.messageArray[Alerts.messageArray.length-1];Alerts.message.style.zIndex=ZINDEX.ALERT+1;setSelectVisibility("visible",Alerts.message);C=F.background}else{Alerts.message=null;C=Alerts.background}if(C){Alerts.bgFadeOut(Alerts.OPACITY,Alerts.STEPS)}if(B&&B.onClose){B.onClose()}}},fireMessageBox:function(L){var F=document.body;if(!L){L=new Object()}var I=L.modal;var K=L.message;var E=L.height;var D=L.width;var G=L.noCenter;var H=L.title;var J=document.createElement("div");J.align="left";var B=Alerts.createWrapper(J,H);B.style.position="absolute";B.style.top=0;B.style.left=0;B.style.zIndex=ZINDEX.ALERT+1;B.options=L;if(K){J.innerHTML=K}else{J.innerHTML='<div class="portlet-loading"></div>'}if(E){if(is_ie){J.style.height=E+"px"}else{J.style.minHeight=E+"px"}}if(D){B.style.width=D+"px"}if(!Alerts.background&&I){var A=document.createElement("div");A.id="alert-message";A.style.position="absolute";A.style.top="0";A.style.left="0";A.style.zIndex=ZINDEX.ALERT;Alerts.background=A;B.background=A;A.style.backgroundColor="#000000";Element.changeOpacity(A,0);F.appendChild(A);Alerts.bgFadeIn(Alerts.OPACITY,Alerts.STEPS)}setSelectVisibility("hidden");if(Alerts.messageArray.length>0){var C=Alerts.messageArray[Alerts.messageArray.length-1];C.style.zIndex=ZINDEX.ALERT-1;setSelectVisibility("hidden",C)}setSelectVisibility("visibile",J);Alerts.message=J;Alerts.messageArray.push(B);Alerts.resize();Event.observe(window,"resize",Alerts.resize);if(G){Alerts.center()}else{Alerts.center(E,D)}Event.observe(window,"resize",Alerts.center);F.appendChild(B);window.focus();return J},popupIframe:function(B,A){var F=A.height;var E=A.width;var D=Alerts.fireMessageBox(A);var C=document.createElement("iframe");D.height="";C.src=B;C.frameBorder=0;if(E){C.style.width="100%"}D.appendChild(C);if(!A.noCenter){Alerts.center(F,E)}return D},center:function(B,C){if(Alerts.message){var D=Alerts.message.wrapper;var A=document.getElementsByTagName("body")[0];var G=D.centerMode;if(!G){if(B&&C){G=D.centerMode="xy"}else{if(B&&!C){G=D.centerMode="y"}else{if(!B&&C){G=D.centerMode="x"}else{G=D.centerMode="none"}}}}C=C||D.offsetWidth;B=B||D.offsetHeight;var F;var E;if(!is_safari){var F=(A.clientWidth-C)/2;var E=A.scrollTop+((A.clientHeight-B)/2)}else{var F=(A.offsetWidth-C)/2;var E=(A.offsetHeight-B)/2}if(G=="xy"||G=="y"){D.style.top=E+"px"}else{D.style.top=(A.scrollTop+20)+"px"}if(G=="xy"||G=="x"){D.style.left=F+"px"}else{D.style.left="20px"}}},resize:function(){if(Alerts.background){var C=Alerts.background;var A=document.getElementsByTagName("body")[0];if(!is_safari){var D=A.scrollHeight;var B=A.clientHeight;C.style.height=(D>B?D:B)+"px";C.style.width="100%"}else{C.style.height=A.offsetHeight+"px";C.style.width=A.offsetWidth+"px"}}},resizeIframe:function(A){if(Alerts.message&&A){var B=Alerts.message.getElementsByTagName("iframe")[0];var C=document.getElementsByClassName("portlet-loading",Alerts.message);if(C.length>0){C[0].parentNode.removeChild(C[0])}if(B){if(A.height){B.height=A.height}if(A.width){B.width=A.width}}}Alerts.resize()},remove:function(C){var A=Alerts.messageArray;for(var B=0;B<A.length;B++){if(A[B]==C){A.splice(B,1);break}}}};if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(L,B,M,D,H,J,F,E,C,K,I){if(!document.getElementById){return }this.DETECT_KEY=I?I:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(L){this.setAttribute("swf",L)}if(B){this.setAttribute("id",B)}if(M){this.setAttribute("width",M)}if(D){this.setAttribute("height",D)}if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(J){this.addParam("bgcolor",J)}var A=E?E:"high";this.addParam("quality",A);this.setAttribute("useExpressInstall",F);this.setAttribute("doExpressInstall",false);var G=(C)?C:window.location;this.setAttribute("xiRedirectUrl",G);this.setAttribute("redirectUrl","");if(K){this.setAttribute("redirectUrl",K)}};deconcept.SWFObject.prototype={setAttribute:function(A,B){this.attributes[A]=B},getAttribute:function(A){return this.attributes[A]},addParam:function(B,A){this.params[B]=A},getParams:function(){return this.params},addVariable:function(B,A){this.variables[B]=A},getVariable:function(A){return this.variables[A]},getVariables:function(){return this.variables},getVariablePairs:function(){var C=new Array();var B;var A=this.getVariables();for(B in A){C.push(B+"="+A[B])}return C},getSWFHTML:function(){var B="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn")}B='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"';B+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var F=this.getParams();for(var E in F){B+=[E]+'="'+F[E]+'" '}var D=this.getVariablePairs().join("&");if(D.length>0){B+='flashvars="'+D+'"'}B+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX")}B='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';B+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var C=this.getParams();for(var E in C){B+='<param name="'+E+'" value="'+C[E]+'" />'}var A=this.getVariablePairs().join("&");if(A.length>0){B+='<param name="flashvars" value="'+A+'" />'}B+="</object>"}return B},write:function(B){if(this.getAttribute("useExpressInstall")){var A=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(A)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var C=(typeof B=="string")?document.getElementById(B):B;C.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var D=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){D=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(C){try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");D=new deconcept.PlayerVersion([6,0,21]);B.AllowScriptAccess="always"}catch(C){if(D.major==6){return D}}try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(C){}}if(B!=null){D=new deconcept.PlayerVersion(B.GetVariable("$version").split(" ")[1].split(","))}}return D};deconcept.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(A){if(this.major<A.major){return false}if(this.major>A.major){return true}if(this.minor<A.minor){return false}if(this.minor>A.minor){return true}if(this.rev<A.rev){return false}return true};deconcept.util={getRequestParameter:function(A){var D=document.location.search||document.location.hash;if(D){var C=D.substring(1).split("&");for(var B=0;B<C.length;B++){if(C[B].substring(0,C[B].indexOf("="))==A){return C[B].substring((C[B].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return }var C=document.getElementsByTagName("OBJECT");for(var B=0;B<C.length;B++){C[B].style.display="none";for(var A in C[B]){if(typeof C[B][A]=="function"){C[B][A]=function(){}}}}};deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(typeof window.onunload=="function"){var A=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();A()}}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs}};if(typeof window.onbeforeunload=="function"){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload()}}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload}if(Array.prototype.push==null){Array.prototype.push=function(A){this[this.length]=A;return this.length}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;Calendar=function(D,C,F,A){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=F||null;this.onClose=A||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof D=="number"?D:Calendar._FD;this.showsOtherMonths=false;this.dateStr=C;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined"){Calendar._SDN_len=3}var B=new Array();for(var E=8;E>0;){B[--E]=Calendar._DN[E].substr(0,Calendar._SDN_len)}Calendar._SDN=B;if(typeof Calendar._SMN_len=="undefined"){Calendar._SMN_len=3}B=new Array();for(var E=12;E>0;){B[--E]=Calendar._MN[E].substr(0,Calendar._SMN_len)}Calendar._SMN=B}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(E){var A=0,D=0;var C=/^div$/i.test(E.tagName);if(C&&E.scrollLeft){A=E.scrollLeft}if(C&&E.scrollTop){D=E.scrollTop}var F={x:E.offsetLeft-A,y:E.offsetTop-D};if(E.offsetParent){var B=this.getAbsolutePos(E.offsetParent);F.x+=B.x;F.y+=B.y}return F};Calendar.isRelated=function(C,A){var D=A.relatedTarget;if(!D){var B=A.type;if(B=="mouseover"){D=A.fromElement}else{if(B=="mouseout"){D=A.toElement}}}while(D){if(D==C){return true}D=D.parentNode}return false};Calendar.removeClass=function(E,D){if(!(E&&E.className)){return }var A=E.className.split(" ");var B=new Array();for(var C=A.length;C>0;){if(A[--C]!=D){B[B.length]=A[C]}}E.className=B.join(" ")};Calendar.addClass=function(B,A){Calendar.removeClass(B,A);B.className+=" "+A};Calendar.getElement=function(A){var B=Calendar.is_ie?window.event.srcElement:A.currentTarget;while(B.nodeType!=1||/^div$/i.test(B.tagName)){B=B.parentNode}return B};Calendar.getTargetElement=function(A){var B=Calendar.is_ie?window.event.srcElement:A.target;while(B.nodeType!=1){B=B.parentNode}return B};Calendar.stopEvent=function(A){A||(A=window.event);if(Calendar.is_ie){A.cancelBubble=true;A.returnValue=false}else{A.preventDefault();A.stopPropagation()}return false};Calendar.addEvent=function(A,C,B){if(A.attachEvent){A.attachEvent("on"+C,B)}else{if(A.addEventListener){A.addEventListener(C,B,true)}else{A["on"+C]=B}}};Calendar.removeEvent=function(A,C,B){if(A.detachEvent){A.detachEvent("on"+C,B)}else{if(A.removeEventListener){A.removeEventListener(C,B,true)}else{A["on"+C]=null}}};Calendar.createElement=function(C,B){var A=null;if(document.createElementNS){A=document.createElementNS("http://www.w3.org/1999/xhtml",C)}else{A=document.createElement(C)}if(typeof B!="undefined"){B.appendChild(A)}return A};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true)}}};Calendar.findMonth=function(A){if(typeof A.month!="undefined"){return A}else{if(typeof A.parentNode.month!="undefined"){return A.parentNode}}return null};Calendar.findYear=function(A){if(typeof A.year!="undefined"){return A}else{if(typeof A.parentNode.year!="undefined"){return A.parentNode}}return null};Calendar.showMonthsCombo=function(){var E=Calendar._C;if(!E){return false}var E=E;var F=E.activeDiv;var D=E.monthsCombo;if(E.hilitedMonth){Calendar.removeClass(E.hilitedMonth,"hilite")}if(E.activeMonth){Calendar.removeClass(E.activeMonth,"active")}var C=E.monthsCombo.getElementsByTagName("div")[E.date.getMonth()];Calendar.addClass(C,"active");E.activeMonth=C;var B=D.style;B.display="block";if(F.navtype<0){B.left=F.offsetLeft+"px"}else{var A=D.offsetWidth;if(typeof A=="undefined"){A=50}B.left=(F.offsetLeft+F.offsetWidth-A)+"px"}B.top=(F.offsetTop+F.offsetHeight)+"px"};Calendar.showYearsCombo=function(D){var A=Calendar._C;if(!A){return false}var A=A;var C=A.activeDiv;var F=A.yearsCombo;if(A.hilitedYear){Calendar.removeClass(A.hilitedYear,"hilite")}if(A.activeYear){Calendar.removeClass(A.activeYear,"active")}A.activeYear=null;var B=A.date.getFullYear()+(D?1:-1);var I=F.firstChild;var H=false;for(var E=12;E>0;--E){if(B>=A.minYear&&B<=A.maxYear){I.innerHTML=B;I.year=B;I.style.display="block";H=true}else{I.style.display="none"}I=I.nextSibling;B+=D?A.yearStep:-A.yearStep}if(H){var J=F.style;J.display="block";if(C.navtype<0){J.left=C.offsetLeft+"px"}else{var G=F.offsetWidth;if(typeof G=="undefined"){G=50}J.left=(C.offsetLeft+C.offsetWidth-G)+"px"}J.top=(C.offsetTop+C.offsetHeight)+"px"}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false}if(cal.timeout){clearTimeout(cal.timeout)}var el=cal.activeDiv;if(!el){return false}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev)}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler()}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler()}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev)}};Calendar.tableMouseOver=function(M){var A=Calendar._C;if(!A){return }var C=A.activeDiv;var I=Calendar.getTargetElement(M);if(I==C||I.parentNode==C){Calendar.addClass(C,"hilite active");Calendar.addClass(C.parentNode,"rowhilite")}else{if(typeof C.navtype=="undefined"||(C.navtype!=50&&(C.navtype==0||Math.abs(C.navtype)>2))){Calendar.removeClass(C,"active")}Calendar.removeClass(C,"hilite");Calendar.removeClass(C.parentNode,"rowhilite")}M||(M=window.event);if(C.navtype==50&&I!=C){var L=Calendar.getAbsolutePos(C);var O=C.offsetWidth;var N=M.clientX;var P;var K=true;if(N>L.x+O){P=N-L.x-O;K=false}else{P=L.x-N}if(P<0){P=0}var F=C._range;var H=C._current;var G=Math.floor(P/10)%F.length;for(var E=F.length;--E>=0;){if(F[E]==H){break}}while(G-->0){if(K){if(--E<0){E=F.length-1}}else{if(++E>=F.length){E=0}}}var B=F[E];C.innerHTML=B;A.onUpdateTime()}var D=Calendar.findMonth(I);if(D){if(D.month!=A.date.getMonth()){if(A.hilitedMonth){Calendar.removeClass(A.hilitedMonth,"hilite")}Calendar.addClass(D,"hilite");A.hilitedMonth=D}else{if(A.hilitedMonth){Calendar.removeClass(A.hilitedMonth,"hilite")}}}else{if(A.hilitedMonth){Calendar.removeClass(A.hilitedMonth,"hilite")}var J=Calendar.findYear(I);if(J){if(J.year!=A.date.getFullYear()){if(A.hilitedYear){Calendar.removeClass(A.hilitedYear,"hilite")}Calendar.addClass(J,"hilite");A.hilitedYear=J}else{if(A.hilitedYear){Calendar.removeClass(A.hilitedYear,"hilite")}}}else{if(A.hilitedYear){Calendar.removeClass(A.hilitedYear,"hilite")}}}return Calendar.stopEvent(M)};Calendar.tableMouseDown=function(A){if(Calendar.getTargetElement(A)==Calendar.getElement(A)){return Calendar.stopEvent(A)}};Calendar.calDragIt=function(B){var C=Calendar._C;if(!(C&&C.dragging)){return false}var E;var D;if(Calendar.is_ie){D=window.event.clientY+document.body.scrollTop;E=window.event.clientX+document.body.scrollLeft}else{E=B.pageX;D=B.pageY}C.hideShowCovered();var A=C.element.style;A.left=(E-C.xOffs)+"px";A.top=(D-C.yOffs)+"px";return Calendar.stopEvent(B)};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev)}cal.hideShowCovered()};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300){with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver)}else{addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver)}addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp)}}else{if(cal.isPopup){cal._dragStart(ev)}}if(el.navtype==-1||el.navtype==1){if(cal.timeout){clearTimeout(cal.timeout)}cal.timeout=setTimeout("Calendar.showMonthsCombo()",250)}else{if(el.navtype==-2||el.navtype==2){if(cal.timeout){clearTimeout(cal.timeout)}cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250)}else{cal.timeout=null}}return Calendar.stopEvent(ev)};Calendar.dayMouseDblClick=function(A){Calendar.cellClick(Calendar.getElement(A),A||window.event);if(Calendar.is_ie){document.selection.empty()}};Calendar.dayMouseOver=function(B){var A=Calendar.getElement(B);if(Calendar.isRelated(A,B)||Calendar._C||A.disabled){return false}if(A.ttip){if(A.ttip.substr(0,1)=="_"){A.ttip=A.caldate.print(A.calendar.ttDateFormat)+A.ttip.substr(1)}A.calendar.tooltips.innerHTML=A.ttip}if(A.navtype!=300){Calendar.addClass(A,"hilite");if(A.caldate){Calendar.addClass(A.parentNode,"rowhilite")}}return Calendar.stopEvent(B)};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled){return false}removeClass(el,"hilite");if(el.caldate){removeClass(el.parentNode,"rowhilite")}if(el.calendar){el.calendar.tooltips.innerHTML=_TT["SEL_DATE"]}return stopEvent(ev)}};Calendar.cellClick=function(E,N){var C=E.calendar;var H=false;var K=false;var F=null;if(typeof E.navtype=="undefined"){if(C.currentDateEl){Calendar.removeClass(C.currentDateEl,"selected");Calendar.addClass(E,"selected");H=(C.currentDateEl==E);if(!H){C.currentDateEl=E}}C.date.setDateOnly(E.caldate);F=C.date;var B=!(C.dateClicked=!E.otherMonth);if(!B&&!C.currentDateEl){C._toggleMultipleDate(new Date(F))}else{K=!E.disabled}if(B){C._init(C.firstDayOfWeek,F)}}else{if(E.navtype==200){Calendar.removeClass(E,"hilite");C.callCloseHandler();return }F=new Date(C.date);if(E.navtype==0){F.setDateOnly(new Date())}C.dateClicked=false;var M=F.getFullYear();var G=F.getMonth();function A(Q){var R=F.getDate();var P=F.getMonthDays(Q);if(R>P){F.setDate(P)}F.setMonth(Q)}switch(E.navtype){case 400:Calendar.removeClass(E,"hilite");var O=Calendar._TT["ABOUT"];if(typeof O!="undefined"){O+=C.showsTime?Calendar._TT["ABOUT_TIME"]:""}else{O='Help and about box text is not translated into this language.\nIf you know this language and you feel generous please update\nthe corresponding file in "lang" subdir to match calendar-en.js\nand send it back to <mihai_bazon@yahoo.com> to get it into the distribution  ;-)\n\nThank you!\nhttp://dynarch.com/mishoo/calendar.epl\n'}alert(O);return ;case -2:if(M>C.minYear){F.setFullYear(M-1)}break;case -1:if(G>0){A(G-1)}else{if(M-->C.minYear){F.setFullYear(M);A(11)}}break;case 1:if(G<11){A(G+1)}else{if(M<C.maxYear){F.setFullYear(M+1);A(0)}}break;case 2:if(M<C.maxYear){F.setFullYear(M+1)}break;case 100:C.setFirstDayOfWeek(E.fdow);return ;case 50:var J=E._range;var L=E.innerHTML;for(var I=J.length;--I>=0;){if(J[I]==L){break}}if(N&&N.shiftKey){if(--I<0){I=J.length-1}}else{if(++I>=J.length){I=0}}var D=J[I];E.innerHTML=D;C.onUpdateTime();return ;case 0:if((typeof C.getDateStatus=="function")&&C.getDateStatus(F,F.getFullYear(),F.getMonth(),F.getDate())){return false}break}if(!F.equalsTo(C.date)){C.setDate(F);K=true}else{if(E.navtype==0){K=H=true}}}if(K){N&&C.callHandler()}if(H){Calendar.removeClass(E,"hilite");N&&C.callCloseHandler()}};Calendar.prototype.create=function(L){var K=null;if(!L){K=document.getElementsByTagName("body")[0];this.isPopup=true}else{K=L;this.isPopup=false}this.date=this.dateStr?new Date(this.dateStr):new Date();var O=Calendar.createElement("table");this.table=O;O.cellSpacing=0;O.cellPadding=0;O.calendar=this;Calendar.addEvent(O,"mousedown",Calendar.tableMouseDown);var A=Calendar.createElement("div");this.element=A;A.className="calendar";if(this.isPopup){A.style.position="absolute";A.style.display="none"}A.appendChild(O);var I=Calendar.createElement("thead",O);var M=null;var P=null;var B=this;var E=function(S,R,Q){M=Calendar.createElement("td",P);M.colSpan=R;M.className="button";if(Q!=0&&Math.abs(Q)<=2){M.className+=" nav"}Calendar._add_evs(M);M.calendar=B;M.navtype=Q;M.innerHTML="<div unselectable='on'>"+S+"</div>";return M};P=Calendar.createElement("tr",I);var C=6;(this.isPopup)&&--C;(this.weekNumbers)&&++C;E("?",1,400).ttip=Calendar._TT["INFO"];this.title=E("",C,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";E("&#x00d7;",1,200).ttip=Calendar._TT["CLOSE"]}P=Calendar.createElement("tr",I);P.className="headrow";this._nav_py=E("&#x00ab;",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=E("&#x2039;",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=E(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=E("&#x203a;",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=E("&#x00bb;",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];P=Calendar.createElement("tr",I);P.className="daynames";if(this.weekNumbers){M=Calendar.createElement("td",P);M.className="name wn";M.innerHTML=Calendar._TT["WK"]}for(var H=7;H>0;--H){M=Calendar.createElement("td",P);if(!H){M.navtype=100;M.calendar=this;Calendar._add_evs(M)}}this.firstdayname=(this.weekNumbers)?P.firstChild.nextSibling:P.firstChild;this._displayWeekdays();var G=Calendar.createElement("tbody",O);this.tbody=G;for(H=6;H>0;--H){P=Calendar.createElement("tr",G);if(this.weekNumbers){M=Calendar.createElement("td",P)}for(var F=7;F>0;--F){M=Calendar.createElement("td",P);M.calendar=this;Calendar._add_evs(M)}}if(this.showsTime){P=Calendar.createElement("tr",G);P.className="time";M=Calendar.createElement("td",P);M.className="time";M.colSpan=2;M.innerHTML=Calendar._TT["TIME"]||"&nbsp;";M=Calendar.createElement("td",P);M.className="time";M.colSpan=this.weekNumbers?4:3;(function(){function T(c,e,d,f){var a=Calendar.createElement("span",M);a.className=c;a.innerHTML=e;a.calendar=B;a.ttip=Calendar._TT["TIME_PART"];a.navtype=50;a._range=[];if(typeof d!="number"){a._range=d}else{for(var b=d;b<=f;++b){var Z;if(b<10&&f>=10){Z="0"+b}else{Z=""+b}a._range[a._range.length]=Z}}Calendar._add_evs(a);return a}var X=B.date.getHours();var Q=B.date.getMinutes();var Y=!B.time24;var R=(X>12);if(Y&&R){X-=12}var V=T("hour",X,Y?1:0,Y?12:23);var U=Calendar.createElement("span",M);U.innerHTML=":";U.className="colon";var S=T("minute",Q,0,59);var W=null;M=Calendar.createElement("td",P);M.className="time";M.colSpan=2;if(Y){W=T("ampm",R?"pm":"am",["am","pm"])}else{M.innerHTML="&nbsp;"}B.onSetTime=function(){var a,Z=this.date.getHours(),b=this.date.getMinutes();if(Y){a=(Z>=12);if(a){Z-=12}if(Z==0){Z=12}W.innerHTML=a?"pm":"am"}V.innerHTML=(Z<10)?("0"+Z):Z;S.innerHTML=(b<10)?("0"+b):b};B.onUpdateTime=function(){var a=this.date;var b=parseInt(V.innerHTML,10);if(Y){if(/pm/i.test(W.innerHTML)&&b<12){b+=12}else{if(/am/i.test(W.innerHTML)&&b==12){b=0}}}var c=a.getDate();var Z=a.getMonth();var e=a.getFullYear();a.setHours(b);a.setMinutes(parseInt(S.innerHTML,10));a.setFullYear(e);a.setMonth(Z);a.setDate(c);this.dateClicked=false;this.callHandler()}})()}else{this.onSetTime=this.onUpdateTime=function(){}}var J=Calendar.createElement("tfoot",O);P=Calendar.createElement("tr",J);P.className="footrow";M=E(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);M.className="ttip";if(this.isPopup){M.ttip=Calendar._TT["DRAG_TO_MOVE"];M.style.cursor="move"}this.tooltips=M;A=Calendar.createElement("div",this.element);this.monthsCombo=A;A.className="combo";for(H=0;H<Calendar._MN.length;++H){var D=Calendar.createElement("div");D.className=Calendar.is_ie?"label-IEfix":"label";D.month=H;D.innerHTML=Calendar._SMN[H];A.appendChild(D)}A=Calendar.createElement("div",this.element);this.yearsCombo=A;A.className="combo";for(H=12;H>0;--H){var N=Calendar.createElement("div");N.className=Calendar.is_ie?"label-IEfix":"label";A.appendChild(N)}this._init(this.firstDayOfWeek,this.date);K.appendChild(this.element)};Calendar._keyEvent=function(L){var A=window._dynarch_popupCalendar;if(!A||A.multiple){return false}(Calendar.is_ie)&&(L=window.event);var I=(Calendar.is_ie||L.type=="keypress"),M=L.keyCode;if(L.ctrlKey){switch(M){case 37:I&&Calendar.cellClick(A._nav_pm);break;case 38:I&&Calendar.cellClick(A._nav_py);break;case 39:I&&Calendar.cellClick(A._nav_nm);break;case 40:I&&Calendar.cellClick(A._nav_ny);break;default:return false}}else{switch(M){case 32:Calendar.cellClick(A._nav_now);break;case 27:I&&A.callCloseHandler();break;case 37:case 38:case 39:case 40:if(I){var E,N,J,G,C,D;E=M==37||M==38;D=(M==37||M==39)?1:7;function B(){C=A.currentDateEl;var K=C.pos;N=K&15;J=K>>4;G=A.ar_days[J][N]}B();function F(){var K=new Date(A.date);K.setDate(K.getDate()-D);A.setDate(K)}function H(){var K=new Date(A.date);K.setDate(K.getDate()+D);A.setDate(K)}while(1){switch(M){case 37:if(--N>=0){G=A.ar_days[J][N]}else{N=6;M=38;continue}break;case 38:if(--J>=0){G=A.ar_days[J][N]}else{F();B()}break;case 39:if(++N<7){G=A.ar_days[J][N]}else{N=0;M=40;continue}break;case 40:if(++J<A.ar_days.length){G=A.ar_days[J][N]}else{H();B()}break}break}if(G){if(!G.disabled){Calendar.cellClick(G)}else{if(E){F()}else{H()}}}}break;case 13:if(I){Calendar.cellClick(A.currentDateEl,L)}break;default:return false}}return Calendar.stopEvent(L)};Calendar.prototype._init=function(L,V){var U=new Date(),P=U.getFullYear(),X=U.getMonth(),B=U.getDate();this.table.style.visibility="hidden";var H=V.getFullYear();if(H<this.minYear){H=this.minYear;V.setFullYear(H)}else{if(H>this.maxYear){H=this.maxYear;V.setFullYear(H)}}this.firstDayOfWeek=L;this.date=new Date(V);var W=V.getMonth();var Z=V.getDate();var Y=V.getMonthDays();V.setDate(1);var Q=(V.getDay()-this.firstDayOfWeek)%7;if(Q<0){Q+=7}V.setDate(-Q);V.setDate(V.getDate()+1);var E=this.tbody.firstChild;var J=Calendar._SMN[W];var N=this.ar_days=new Array();var M=Calendar._TT["WEEKEND"];var D=this.multiple?(this.datesCells={}):null;for(var S=0;S<6;++S,E=E.nextSibling){var A=E.firstChild;if(this.weekNumbers){A.className="day wn";A.innerHTML=V.getWeekNumber();A=A.nextSibling}E.className="daysrow";var T=false,F,C=N[S]=[];for(var R=0;R<7;++R,A=A.nextSibling,V.setDate(F+1)){F=V.getDate();var G=V.getDay();A.className="day";A.pos=S<<4|R;C[R]=A;var K=(V.getMonth()==W);if(!K){if(this.showsOtherMonths){A.className+=" othermonth";A.otherMonth=true}else{A.className="emptycell";A.innerHTML="&nbsp;";A.disabled=true;continue}}else{A.otherMonth=false;T=true}A.disabled=false;A.innerHTML=this.getDateText?this.getDateText(V,F):F;if(D){D[V.print("%Y%m%d")]=A}if(this.getDateStatus){var O=this.getDateStatus(V,H,W,F);if(this.getDateToolTip){var I=this.getDateToolTip(V,H,W,F);if(I){A.title=I}}if(O===true){A.className+=" disabled";A.disabled=true}else{if(/disabled/i.test(O)){A.disabled=true}A.className+=" "+O}}if(!A.disabled){A.caldate=new Date(V);A.ttip="_";if(!this.multiple&&K&&F==Z&&this.hiliteToday){A.className+=" selected";this.currentDateEl=A}if(V.getFullYear()==P&&V.getMonth()==X&&F==B){A.className+=" today";A.ttip+=Calendar._TT["PART_TODAY"]}if(M.indexOf(G.toString())!=-1){A.className+=A.otherMonth?" oweekend":" weekend"}}}if(!(T||this.showsOtherMonths)){E.className="emptyrow"}}this.title.innerHTML=Calendar._MN[W]+", "+H;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates()};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var B in this.multiple){var A=this.datesCells[B];var C=this.multiple[B];if(!C){continue}if(A){A.className+=" selected"}}}};Calendar.prototype._toggleMultipleDate=function(B){if(this.multiple){var C=B.print("%Y%m%d");var A=this.datesCells[C];if(A){var D=this.multiple[C];if(!D){Calendar.addClass(A,"selected");this.multiple[C]=B}else{Calendar.removeClass(A,"selected");delete this.multiple[C]}}}};Calendar.prototype.setDateToolTipHandler=function(A){this.getDateToolTip=A};Calendar.prototype.setDate=function(A){if(!A.equalsTo(this.date)){this._init(this.firstDayOfWeek,A)}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date)};Calendar.prototype.setFirstDayOfWeek=function(A){this._init(A,this.date);this._displayWeekdays()};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(A){this.getDateStatus=A};Calendar.prototype.setRange=function(A,B){this.minYear=A;this.maxYear=B};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat))}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this)}this.hideShowCovered()};Calendar.prototype.destroy=function(){var A=this.element.parentNode;A.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null};Calendar.prototype.reparent=function(B){var A=this.element;A.parentNode.removeChild(A);B.appendChild(A)};Calendar._checkCalendar=function(B){var C=window._dynarch_popupCalendar;if(!C){return false}var A=Calendar.is_ie?Calendar.getElement(B):Calendar.getTargetElement(B);for(;A!=null&&A!=C.element;A=A.parentNode){}if(A==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(B)}};Calendar.prototype.show=function(){var E=this.table.getElementsByTagName("tr");for(var D=E.length;D>0;){var F=E[--D];Calendar.removeClass(F,"rowhilite");var C=F.getElementsByTagName("td");for(var B=C.length;B>0;){var A=C[--B];Calendar.removeClass(A,"hilite");Calendar.removeClass(A,"active")}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar)}this.hideShowCovered()};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar)}this.element.style.display="none";this.hidden=true;this.hideShowCovered()};Calendar.prototype.showAt=function(A,C){var B=this.element.style;B.left=A+"px";B.top=C+"px";this.show()};Calendar.prototype.showAtElement=function(C,D){var A=this;var E=Calendar.getAbsolutePos(C);if(!D||typeof D!="string"){this.showAt(E.x,E.y+C.offsetHeight);return true}function B(I){if(I.x<0){I.x=0}if(I.y<0){I.y=0}var J=document.createElement("div");var H=J.style;H.position="absolute";H.right=H.bottom=H.width=H.height="0px";document.body.appendChild(J);var G=Calendar.getAbsolutePos(J);document.body.removeChild(J);if(Calendar.is_ie){G.y+=document.body.scrollTop;G.x+=document.body.scrollLeft}else{G.y+=window.scrollY;G.x+=window.scrollX}var F=I.x+I.width-G.x;if(F>0){I.x-=F}F=I.y+I.height-G.y;if(F>0){I.y-=F}}this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var F=A.element.offsetWidth;var H=A.element.offsetHeight;A.element.style.display="none";var G=D.substr(0,1);var I="l";if(D.length>1){I=D.substr(1,1)}switch(G){case"T":E.y-=H;break;case"B":E.y+=C.offsetHeight;break;case"C":E.y+=(C.offsetHeight-H)/2;break;case"t":E.y+=C.offsetHeight-H;break;case"b":break}switch(I){case"L":E.x-=F;break;case"R":E.x+=C.offsetWidth;break;case"C":E.x+=(C.offsetWidth-F)/2;break;case"l":E.x+=C.offsetWidth-F;break;case"r":break}E.width=F;E.height=H+40;A.monthsCombo.style.display="none";B(E);A.showAt(E.x,E.y)};if(Calendar.is_khtml){setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10)}else{Calendar.continuation_for_the_fucking_khtml_browser()}};Calendar.prototype.setDateFormat=function(A){this.dateFormat=A};Calendar.prototype.setTtDateFormat=function(A){this.ttDateFormat=A};Calendar.prototype.parseDate=function(B,A){if(!A){A=this.dateFormat}this.setDate(Date.parseDate(B,A))};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera){return }function B(R){var Q=R.style.visibility;if(!Q){if(document.defaultView&&typeof (document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml){Q=document.defaultView.getComputedStyle(R,"").getPropertyValue("visibility")}else{Q=""}}else{if(R.currentStyle){Q=R.currentStyle.visibility}else{Q=""}}}return Q}var P=new Array("applet","iframe","select");var C=this.element;var A=Calendar.getAbsolutePos(C);var F=A.x;var D=C.offsetWidth+F;var O=A.y;var N=C.offsetHeight+O;for(var H=P.length;H>0;){var G=document.getElementsByTagName(P[--H]);var E=null;for(var J=G.length;J>0;){E=G[--J];A=Calendar.getAbsolutePos(E);var M=A.x;var L=E.offsetWidth+M;var K=A.y;var I=E.offsetHeight+K;if(this.hidden||(M>D)||(L<F)||(K>N)||(I<O)){if(!E.__msh_save_visibility){E.__msh_save_visibility=B(E)}E.style.visibility=E.__msh_save_visibility}else{if(!E.__msh_save_visibility){E.__msh_save_visibility=B(E)}E.style.visibility="hidden"}}}};Calendar.prototype._displayWeekdays=function(){var B=this.firstDayOfWeek;var A=this.firstdayname;var D=Calendar._TT["WEEKEND"];for(var C=0;C<7;++C){A.className="day name";var E=(C+B)%7;if(C){A.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[E]);A.navtype=100;A.calendar=this;A.fdow=E;Calendar._add_evs(A)}if(D.indexOf(E.toString())!=-1){Calendar.addClass(A,"weekend")}A.innerHTML=Calendar._SDN[(C+B)%7];A=A.nextSibling}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none"};Calendar.prototype._dragStart=function(ev){if(this.dragging){return }this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd)}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(G,A){var H=new Date();var I=0;var B=-1;var F=0;var K=G.split(/\W+/);var J=A.match(/%./g);var E=0,D=0;var L=0;var C=0;for(E=0;E<K.length;++E){if(!K[E]){continue}switch(J[E]){case"%d":case"%e":F=parseInt(K[E],10);break;case"%m":B=parseInt(K[E],10)-1;break;case"%Y":case"%y":I=parseInt(K[E],10);(I<100)&&(I+=(I>29)?1900:2000);break;case"%b":case"%B":for(D=0;D<12;++D){if(Calendar._MN[D].substr(0,K[E].length).toLowerCase()==K[E].toLowerCase()){B=D;break}}break;case"%H":case"%I":case"%k":case"%l":L=parseInt(K[E],10);break;case"%P":case"%p":if(/pm/i.test(K[E])&&L<12){L+=12}else{if(/am/i.test(K[E])&&L>=12){L-=12}}break;case"%M":C=parseInt(K[E],10);break}}if(isNaN(I)){I=H.getFullYear()}if(isNaN(B)){B=H.getMonth()}if(isNaN(F)){F=H.getDate()}if(isNaN(L)){L=H.getHours()}if(isNaN(C)){C=H.getMinutes()}if(I!=0&&B!=-1&&F!=0){return new Date(I,B,F,L,C,0)}I=0;B=-1;F=0;for(E=0;E<K.length;++E){if(K[E].search(/[a-zA-Z]+/)!=-1){var M=-1;for(D=0;D<12;++D){if(Calendar._MN[D].substr(0,K[E].length).toLowerCase()==K[E].toLowerCase()){M=D;break}}if(M!=-1){if(B!=-1){F=B+1}B=M}}else{if(parseInt(K[E],10)<=12&&B==-1){B=K[E]-1}else{if(parseInt(K[E],10)>31&&I==0){I=parseInt(K[E],10);(I<100)&&(I+=(I>29)?1900:2000)}else{if(F==0){F=K[E]}}}}}if(I==0){I=H.getFullYear()}if(B!=-1&&F!=0){return new Date(I,B,F,L,C,0)}return H};Date.prototype.getMonthDays=function(B){var A=this.getFullYear();if(typeof B=="undefined"){B=this.getMonth()}if(((0==(A%4))&&((0!=(A%100))||(0==(A%400))))&&B==1){return 29}else{return Date._MD[B]}};Date.prototype.getDayOfYear=function(){var A=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var C=new Date(this.getFullYear(),0,0,0,0,0);var B=A-C;return Math.floor(B/Date.DAY)};Date.prototype.getWeekNumber=function(){var C=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var B=C.getDay();C.setDate(C.getDate()-(B+6)%7+3);var A=C.valueOf();C.setMonth(0);C.setDate(4);return Math.round((A-C.valueOf())/(7*86400000))+1};Date.prototype.equalsTo=function(A){return((this.getFullYear()==A.getFullYear())&&(this.getMonth()==A.getMonth())&&(this.getDate()==A.getDate())&&(this.getHours()==A.getHours())&&(this.getMinutes()==A.getMinutes()))};Date.prototype.setDateOnly=function(A){var B=new Date(A);this.setDate(1);this.setFullYear(B.getFullYear());this.setMonth(B.getMonth());this.setDate(B.getDate())};Date.prototype.print=function(I){var A=this.getMonth();var H=this.getDate();var J=this.getFullYear();var L=this.getWeekNumber();var M=this.getDay();var Q={};var N=this.getHours();var B=(N>=12);var F=(B)?(N-12):N;var P=this.getDayOfYear();if(F==0){F=12}var C=this.getMinutes();var G=this.getSeconds();Q["%a"]=Calendar._SDN[M];Q["%A"]=Calendar._DN[M];Q["%b"]=Calendar._SMN[A];Q["%B"]=Calendar._MN[A];Q["%C"]=1+Math.floor(J/100);Q["%d"]=(H<10)?("0"+H):H;Q["%e"]=H;Q["%H"]=(N<10)?("0"+N):N;Q["%I"]=(F<10)?("0"+F):F;Q["%j"]=(P<100)?((P<10)?("00"+P):("0"+P)):P;Q["%k"]=N;Q["%l"]=F;Q["%m"]=(A<9)?("0"+(1+A)):(1+A);Q["%M"]=(C<10)?("0"+C):C;Q["%n"]="\n";Q["%p"]=B?"PM":"AM";Q["%P"]=B?"pm":"am";Q["%s"]=Math.floor(this.getTime()/1000);Q["%S"]=(G<10)?("0"+G):G;Q["%t"]="\t";Q["%U"]=Q["%W"]=Q["%V"]=(L<10)?("0"+L):L;Q["%u"]=M+1;Q["%w"]=M;Q["%y"]=(""+J).substr(2,2);Q["%Y"]=J;Q["%%"]="%";var O=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml){return I.replace(O,function(R){return Q[R]||R})}var K=I.match(O);for(var E=0;E<K.length;E++){var D=Q[K[E]];if(D){O=new RegExp(K[E],"g");I=I.replace(O,D)}}return I};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(B){var A=new Date(this);A.__msh_oldSetFullYear(B);if(A.getMonth()!=this.getMonth()){this.setDate(28)}this.__msh_oldSetFullYear(B)};window._dynarch_popupCalendar=null;Calendar.setup=function(G){function F(H,I){if(typeof G[H]=="undefined"){G[H]=I}}F("inputField",null);F("displayArea",null);F("button",null);F("eventName","click");F("ifFormat","%Y/%m/%d");F("daFormat","%Y/%m/%d");F("singleClick",true);F("disableFunc",null);F("dateStatusFunc",G["disableFunc"]);F("dateText",null);F("firstDay",null);F("align","Br");F("range",[1900,2999]);F("weekNumbers",true);F("flat",null);F("flatCallback",null);F("onSelect",null);F("onClose",null);F("onUpdate",null);F("date",null);F("showsTime",false);F("timeFormat","24");F("electric",true);F("step",2);F("position",null);F("cache",false);F("showOthers",false);F("multiple",null);var C=["inputField","displayArea","button"];for(var B in C){if(typeof G[C[B]]=="string"){G[C[B]]=document.getElementById(G[C[B]])}}if(!(G.flat||G.multiple||G.inputField||G.displayArea||G.button)){alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");return false}function A(I){var H=I.params;var J=(I.dateClicked||H.electric);if(J&&H.inputField){H.inputField.value=I.date.print(H.ifFormat);if(typeof H.inputField.onchange=="function"){H.inputField.onchange()}}if(J&&H.displayArea){H.displayArea.innerHTML=I.date.print(H.daFormat)}if(J&&typeof H.onUpdate=="function"){H.onUpdate(I)}if(J&&H.flat){if(typeof H.flatCallback=="function"){H.flatCallback(I)}}if(J&&H.singleClick&&I.dateClicked){I.callCloseHandler()}}if(G.flat!=null){if(typeof G.flat=="string"){G.flat=document.getElementById(G.flat)}if(!G.flat){alert("Calendar.setup:\n  Flat specified but can't find parent.");return false}var E=new Calendar(G.firstDay,G.date,G.onSelect||A);E.showsOtherMonths=G.showOthers;E.showsTime=G.showsTime;E.time24=(G.timeFormat=="24");E.params=G;E.weekNumbers=G.weekNumbers;E.setRange(G.range[0],G.range[1]);E.setDateStatusHandler(G.dateStatusFunc);E.getDateText=G.dateText;if(G.ifFormat){E.setDateFormat(G.ifFormat)}if(G.inputField&&typeof G.inputField.value=="string"){E.parseDate(G.inputField.value)}E.create(G.flat);E.show();return false}var D=G.button||G.displayArea||G.inputField;D["on"+G.eventName]=function(){var H=G.inputField||G.displayArea;var J=G.inputField?G.ifFormat:G.daFormat;var N=false;var L=window.calendar;if(H){G.date=Date.parseDate(H.value||H.innerHTML,J)}if(!(L&&G.cache)){window.calendar=L=new Calendar(G.firstDay,G.date,G.onSelect||A,G.onClose||function(O){O.hide()});L.showsTime=G.showsTime;L.time24=(G.timeFormat=="24");L.weekNumbers=G.weekNumbers;N=true}else{if(G.date){L.setDate(G.date)}L.hide()}if(G.multiple){L.multiple={};for(var I=G.multiple.length;--I>=0;){var M=G.multiple[I];var K=M.print("%Y%m%d");L.multiple[K]=M}}L.showsOtherMonths=G.showOthers;L.yearStep=G.step;L.setRange(G.range[0],G.range[1]);L.params=G;L.setDateStatusHandler(G.dateStatusFunc);L.getDateText=G.dateText;L.setDateFormat(J);if(N){L.create()}L.refresh();if(!G.position){L.showAtElement(G.button||G.displayArea||G.inputField,G.align)}else{L.showAt(G.position[0],G.position[1])}return false};return E};function ColorPicker(B,F){var K=document.createElement("div");var G=document.createElement("img");var I=document.getElementsByTagName("body")[0];var H=null;var L="";var N=this;K.id="color-picker-div";K.style.height="192px";K.style.width="100px";K.style.position="absolute";K.style.display="none";K.style.cursor="crosshair";K.style.zIndex=1;G.style.height="192px";G.style.width="100px";G.src=B;K.appendChild(G);I.insertBefore(K,I.childNodes[0]);this.hide=function(){K.style.display="none";if(F!=null){F()}};this.toggle=function(P){if(K.style.display=="none"){var O=Coordinates.northwestOffset(P,true);K.style.left=O.x+25+"px";K.style.top=O.y+"px";K.style.display="block";H=P.parentNode.getElementsByTagName("INPUT")[0];L=H.value}else{N.hide()}};var M=function(P,S){var R=Coordinates.northwestOffset(S,true);mousePos.update(P);var W=mousePos.x-R.x;var V=mousePos.y-R.y;var Y=0;var X=0;var Q=0;if(V<=32){Y=255;X=(V/32)*255;Q=0}else{if(V<=64){V=V-32;Y=255-(V/32)*255;X=255;Q=0}else{if(V<=96){V=V-64;Y=0;X=255;Q=(V/32)*255}else{if(V<=128){V=V-96;Y=0;X=255-(V/32)*255;Q=255}else{if(V<=160){V=V-128;Y=(V/32)*255;X=0;Q=255}else{V=V-160;Y=255;X=0;Q=255-(V/32)*255}}}}}if(W<=50){var O=Math.abs(Math.floor(Y*W/50));var T=Math.abs(Math.floor(X*W/50));var U=Math.abs(Math.floor(Q*W/50))}else{W-=50;var O=Math.abs(Math.floor(Y+(W/50)*(255-Y)));var T=Math.abs(Math.floor(X+(W/50)*(255-X)));var U=Math.abs(Math.floor(Q+(W/50)*(255-Q)))}return D(O,T,U)};var D=function(Q,P,O){color="#";color+=E(Math.floor(Q/16));color+=E(Q%16);color+=E(Math.floor(P/16));color+=E(P%16);color+=E(Math.floor(O/16));color+=E(O%16);return color};var E=function(O){return(O).toString(16)};var A=function(P){var O=M(P,G);L=O;H.value=O;N.hide()};var C=function(P){var O=M(P,G);H.value=O;H.onchange()};var J=function(){H.value=L;H.onchange()};G.onmousemove=C;G.onclick=A;G.onmouseout=J}var Coordinates={ORIGIN:new Coordinate(0,0),northwestPosition:function(B){var A=parseInt(B.style.left);var C=parseInt(B.style.top);return new Coordinate(isNaN(A)?0:A,isNaN(C)?0:C)},southeastPosition:function(A){return Coordinates.northwestPosition(A).plus(new Coordinate(A.offsetWidth,A.offsetHeight))},northwestOffset:function(A,C){var D=new Coordinate(A.offsetLeft,A.offsetTop);if(!C){return D}var B=A.offsetParent;while(B){D=D.plus(new Coordinate(B.offsetLeft,B.offsetTop));B=B.offsetParent}return D},southeastOffset:function(A,B){return Coordinates.northwestOffset(A,B).plus(new Coordinate(A.offsetWidth,A.offsetHeight))},fixEvent:function(A){if(typeof A=="undefined"){A=window.event}A.windowCoordinate=new Coordinate(A.clientX,A.clientY);return A}};function Coordinate(A,B){this.x=A;this.y=B}Coordinate.prototype.toString=function(){return"("+this.x+","+this.y+")"};Coordinate.prototype.plus=function(A){return new Coordinate(this.x+A.x,this.y+A.y)};Coordinate.prototype.minus=function(A){return new Coordinate(this.x-A.x,this.y-A.y)};Coordinate.prototype.distance=function(C){var B=this.x-C.x;var A=this.y-C.y;return Math.sqrt(Math.pow(B,2)+Math.pow(A,2))};Coordinate.prototype.max=function(B){var A=Math.max(this.x,B.x);var C=Math.max(this.y,B.y);return new Coordinate(A,C)};Coordinate.prototype.constrain=function(C,B){if(C.x>B.x||C.y>B.y){return this}var A=this.x;var D=this.y;if(C.x!=null){A=Math.max(A,C.x)}if(B.x!=null){A=Math.min(A,B.x)}if(C.y!=null){D=Math.max(D,C.y)}if(B.y!=null){D=Math.min(D,B.y)}return new Coordinate(A,D)};Coordinate.prototype.reposition=function(A){A.style["top"]=this.y+"px";A.style["left"]=this.x+"px"};Coordinate.prototype.equals=function(A){if(this==A){return true}if(!A||A==null){return false}return this.x==A.x&&this.y==A.y};Coordinate.prototype.inside=function(B,A){if((this.x>=B.x)&&(this.x<=A.x)&&(this.y>=B.y)&&(this.y<=A.y)){return true}else{return false}};Coordinate.prototype.insideObject=function(E,C){var B=Coordinates.northwestOffset(E,C);var D=B.plus(new Coordinate(E.offsetWidth,E.offsetHeight));var A=null;if(this.inside(B,D)){A=this.minus(B);A.nwOffset=B;A.seOffset=D}return A};function getMousePos(A){mousePos.update(A)}function MousePos(){}MousePos.prototype=new Coordinate(0,0);MousePos.prototype.update=function(B){B=Coordinates.fixEvent(B);var A=B.windowCoordinate;this.x=A.x;this.y=A.y;if(is_safari){}else{this.x+=document.body.scrollLeft;this.y+=document.body.scrollTop}if(this.x<0){this.x=0}if(this.y<0){this.y=0}return B};var mousePos=new MousePos(0,0);var Drag={group:null,isDragging:false,makeDraggable:function(B,A){if(A==null){B.handle=B}else{B.handle=A}B.handle.group=B;B.minX=null;B.minY=null;B.maxX=null;B.maxY=null;B.threshold=1;B.thresholdY=0;B.thresholdX=0;B.disableDrag=false;B.onDragStart=new Function();B.onDragEnd=new Function();B.onDrag=new Function();B.setAutoCorrect=function(){this.autoCorrect=true};B.setDragHandle=Drag.setDragHandle;B.setDragThreshold=Drag.setDragThreshold;B.setDragThresholdX=Drag.setDragThresholdX;B.setDragThresholdY=Drag.setDragThresholdY;B.constrain=Drag.constrain;B.constrainVertical=Drag.constrainVertical;B.constrainHorizontal=Drag.constrainHorizontal;B.handle.onmousedown=Drag.onMouseDown},constrainVertical:function(){var A=Coordinates.northwestOffset(this,true);this.minX=A.x;this.maxX=A.x},constrainHorizontal:function(){var A=Coordinates.northwestOffset(this,true);this.minY=A.y;this.maxY=A.y},constrain:function(B,A){this.minX=B.x;this.minY=B.y;this.maxX=A.x;this.maxY=A.y},setDragHandle:function(A){if(A&&A!=null){this.handle=A}else{this.handle=this}this.handle.group=this;this.onmousedown=null;this.handle.onmousedown=Drag.onMouseDown},setDragThreshold:function(A){if(isNaN(parseInt(A))){return }this.threshold=A},setDragThresholdX:function(A){if(isNaN(parseInt(A))){return }this.thresholdX=A},setDragThresholdY:function(A){if(isNaN(parseInt(A))){return }this.thresholdY=A},onMouseDown:function(B){B=mousePos.update(B);Drag.group=this.group;var J=this.group;if(J.disableDrag){return }var H=mousePos;var K=Coordinates.northwestPosition(J);var E=Coordinates.northwestOffset(J,true);var A=Coordinates.southeastPosition(J);var I=Coordinates.southeastOffset(J,true);J.originalZIndex=J.style.zIndex;J.mouseNwOffset=H.minus(E);J.mouseSeOffset=H.minus(I);J.mouseStart=new Coordinate(mousePos.x,mousePos.y);J.onDragStart(K,A,E,I);var G;var F;var D;var C;if(J.minX!=null){G=J.minX+J.mouseNwOffset.x}if(J.minY!=null){F=J.minY+J.mouseNwOffset.y}if(J.maxX!=null){D=J.maxX+J.mouseSeOffset.x}if(J.maxY!=null){C=J.maxY+J.mouseSeOffset.y}if(G&&D&&G>D){D=G}if(F&&C&&F>C){C=F}J.mouseMin=new Coordinate(G,F);J.mouseMax=new Coordinate(D,C);document.onmousemove=Drag.onMouseMove;document.onmouseup=Drag.onMouseUp;return false},showStatus:function(B,E,A,C,D){window.status="mouse: "+B.toString()+"	NW pos: "+E.toString()+"	SE pos: "+A.toString()+"	NW offset: "+C.toString()+"	SE offset: "+D.toString()},onMouseMove:function(Q){Q=mousePos.update(Q);var I=Drag.group;var M=mousePos;var L=Coordinates.northwestOffset(I,true);var P=Coordinates.northwestPosition(I);var D=Coordinates.southeastPosition(I);var B=Coordinates.southeastOffset(I,true);var J=20;var O=5;var A=Viewport.scroll().y;var K=Viewport.page().y;var H=Viewport.frame().y;if((A+H+2*J)<K&&mousePos.y>(A+H-J)){window.scroll(0,A+O);P.y+=O}if(A>0&&mousePos.y<(A+J)){window.scroll(0,A-O);P.y-=O}var G=M.constrain(I.mouseMin,I.mouseMax);P=P.plus(G.minus(L).minus(I.mouseNwOffset));if(!Drag.isDragging){if(I.threshold>0){var F=I.mouseStart.distance(M);if(F<I.threshold){return true}}else{if(I.thresholdY>0){var R=Math.abs(I.mouseStart.y-M.y);if(R<I.thresholdY){return true}}else{if(I.thresholdX>0){var S=Math.abs(I.mouseStart.x-M.x);if(S<I.thresholdX){return true}}}}Drag.isDragging=true}P.reposition(I);if(I.autoCorrect){var C=Coordinates.northwestOffset(I,true);I.onDrag(P,D,L,B);var E=Coordinates.northwestOffset(I,true);if(!C.equals(E)){var N=C.minus(E);P=Coordinates.northwestPosition(I).plus(N);P.reposition(I)}}else{P.reposition(I);I.onDrag(P,D,L,B)}return false},onMouseUp:function(D){D=mousePos.update(D);var F=Drag.group;var B=D.windowCoordinate;var C=Coordinates.northwestOffset(F,true);var G=Coordinates.northwestPosition(F);var A=Coordinates.southeastPosition(F);var E=Coordinates.southeastOffset(F,true);document.onmousemove=null;document.onmouseup=null;F.onDragEnd(G,A,C,E);Drag.group=null;Drag.isDragging=false;return false}};var DropZone={layerArray:new Array(),dropList:new Array(),initialized:false,checkInit:function(){if(!DropZone.initialized){DropZone.init();DropZone.initialized=true}},add:function(C,A){DropZone.checkInit();var B=$(C);if(B){B.dropOptions=A||new Object();B.dropOptions.dropItem=B;if(typeof (A.accept)=="string"){A.accept=A.accept.split(" ")}DropZone.dropList.push(B)}},init:function(){this.layerArray[0]=new Array();this.layerArray[1]=new Array();this.dropList=this.layerArray[0]},switchLayer:function(A){DropZone.checkInit();if(A==0||A==1){this.dropList=this.layerArray[A]}}};var DragDrop={clone:null,currentContainer:null,insertIndex:-1,instance:0,lastContainer:null,track:null,lastOnDrop:null,lastSelected:null,accepts:function(G,C){var A=C.dropOptions;var B=false;if(A.accept){var E=A.accept;for(var D=0;D<E.length;D++){var F=new RegExp("\\b"+E[D]+"\\b");if(Element.hasClassName(G,E[D])){B=true;break}}}else{B=true}return B},create:function(C,A){var B;if(typeof (C)=="string"){B=document.getElementById(C)}else{if(typeof (C)=="object"){B=C}else{return }}B.dragOptions=A?A:new Object();B.dragOptions.scrollOffset=new Coordinate(0,0);Drag.makeDraggable(B,B.dragOptions.handle);B.onDragStart=DragDrop.onDragStart;B.onDrag=DragDrop.onDrag;B.onDragEnd=DragDrop.onDragEnd;B.threshold=3},onDragStart:function(E,A,B,D){var C=this},onDrag:function(O,B,E,L){var P=this;var A=P.dragOptions;if(!P.initialized){var I=document.getElementsByTagName("body")[0];var K=P.parentNode;var J=DragDrop.clone;if(is_ie){setSelectVisibility("hidden")}A.origWidth=P.style.width;A.origHeight=P.style.height;A.origPosition=P.style.position;A.origRevert=A.revert;A.scrollOffset=new Coordinate(0,0);if(A.container){var D=$(A.container);A.scrollOffset.x=D.scrollLeft;A.scrollOffset.y=D.scrollTop}J=DragDrop.clone=P.cloneNode(A.showClone?true:false);if(!A.showClone){J.style.backgroundColor="transparent"}J.dragOptions=new cloneObject(A);J.style.left="";J.style.top="";J.style.zIndex=0;if(!A.showClone){J.style.height=P.offsetHeight+"px";J.style.width=P.offsetWidth+"px"}P.dragOptions.clone=J;P.style.width=P.offsetWidth+"px";P.style.height=P.offsetHeight+"px";K.insertBefore(J,P);K.removeChild(P);if(A.showClone||A.ghosting){Element.changeOpacity(P,75)}P.style.position="absolute";P.style.zIndex=ZINDEX.DRAG_ITEM;P.style.left=(E.x-A.scrollOffset.x)+"px";P.style.top=(E.y-A.scrollOffset.y)+"px";I.appendChild(P);var C=DropZone.dropList;C.each(function(Q){if(Q.dropOptions.inheritParent){Q.style.height=Q.parentNode.offsetHeight}});DragDrop.lastOnDrop=null;P.initialized=true}else{P.style.left=(parseInt(P.style.left)-A.scrollOffset.x)+"px";P.style.top=(parseInt(P.style.top)-A.scrollOffset.y)+"px";var C=DropZone.dropList;DragDrop.currentContainer=null;for(var H=0;H<C.length;H++){var F=C[H];if(!F.parentNode||typeof (F)=="undefined"){C.splice(H,1);H--;continue}var G=mousePos.insideObject(F,true);if(DragDrop.accepts(P,F)){if(A.highlightDropzones){F.style.backgroundColor=A.highlightDropzones}if(G){DragDrop.currentContainer=F;DragDrop.lastOnDrop=F.dropOptions.onDrop}}}var N=DragDrop.currentContainer;var M=DragDrop.lastContainer;if(N){if(typeof (N.dropOptions.onHoverOver)!="undefined"){N.dropOptions.onHoverOver(P)}}if(N!=M){if(M){Element.removeClassName(M,M.dropOptions.hoverclass);if(typeof (M.dropOptions.onHoverOut)!="undefined"){M.dropOptions.onHoverOut(P)}}if(N){if(N.dropOptions.hoverclass&&N!=P&&DragDrop.accepts(P,N)){Element.addClassName(N,N.dropOptions.hoverclass)}}}DragDrop.lastContainer=DragDrop.currentContainer}},onDragEnd:function(I,B,E,H){var J=this;var A=J.dragOptions;if(J.initialized){var F=DragDrop.currentContainer;if(F&&typeof (F.dropOptions.onDrop)!="undefined"){var D=F.dropOptions;if(DragDrop.accepts(J,F)){D.onDrop(J,I,B,E,H);F.className=D.origClassName;Element.removeClassName(F,F.dropOptions.hoverclass)}}else{if(A.forceDrop&&DragDrop.lastOnDrop){DragDrop.lastOnDrop()}}var G=DragDrop.clone;var C=G.parentNode;if(A.keepClone){DragDrop.create(G,G.dragOptions);J.style.zIndex=""}else{if(A.revert){J.parentNode.removeChild(J);J.style.width=A.origWidth;J.style.height=A.origHeight;J.style.position=A.origPosition;J.style.left="";J.style.top="";G.style.display="none";C.insertBefore(J,G)}C.removeChild(G)}Element.changeOpacity(J,100);J.style.zIndex="";A.scrollOffset=new Coordinate(0,0);if(is_ie){setSelectVisibility("visible")}DropZone.dropList.each(function(K){K.style.backgroundColor="transparent";if(K.dropOptions.inheritParent){K.style.height=""}});A.revert=A.origRevert;J.initialized=false;J.wasClicked=false}else{J.wasClicked=true}}};function ResizeRule(A,B,C){this.element=A;this.direction=B;this.next=null;this.origWidth=null;this.origHeight=null;this.mode=C}var Resize={BIG_Z_INDEX:100,group:null,isResizeing:false,HORIZONTAL:0,VERTICAL:1,ADD:0,SUBTRACT:1,addRule:function(B){var A=this;if(A.listHead==null){A.listHead=B;A.listTail=A.listHead}else{A.listTail.next=B;A.listTail=B}},createHandle:function(C,A,B){C.onmousedown=Resize.onMouseDown;C.addRule=Resize.addRule;C.listHead=null;C.listTail=null;C.disableStop=A==null?false:true;C.onResizeStart=new Function();C.onResize=new Function();C.onResizeEnd=new Function();C.func=B;return C},getHeight:function(B){var A=document.getElementById("debug_div");if(B.style&&B.style.height&&B.style.height!=""){return parseInt(B.style.height)}else{return B.offsetHeight}},getWidth:function(A){if(A.style&&A.style.width&&A.style.width!=""){return parseInt(A.style.width)}else{return A.offsetWidth}},onMouseDown:function(B){B=mousePos.update(B);Resize.group=this;var C=Resize.group;var A=mousePos;C.mouseStart=new Coordinate(mousePos.x,mousePos.y);var D=C.listHead;while(D){D.origWidth=Resize.getWidth(D.element);D.origHeight=Resize.getHeight(D.element);D=D.next}document.onmousemove=Resize.onMouseMove;document.onmouseup=Resize.onMouseUp;document.getElementsByTagName("body")[0].style.cursor=C.style.cursor;C.onResizeStart();return false},onMouseMove:function(E){E=mousePos.update(E);var G=Resize.group;var B=mousePos;var A=mousePos.minus(G.mouseStart);var H=G.listHead;var F;var C=0;var D=false;while(H){if(H.direction==Resize.HORIZONTAL){H.prevLength=Resize.getWidth(H.element);if(H.mode==Resize.ADD){F=H.origWidth+A.x}else{F=H.origWidth-A.x}}else{if(H.direction==Resize.VERTICAL){H.prevLength=Resize.getHeight(H.element);if(H.mode==Resize.ADD){F=H.origHeight+A.y}else{F=H.origHeight-A.y}}}H.newLength=F;if(F<1){C=Math.max(-F+1,C);F=1}if(F==H.prevLength){D=true}H=H.next}H=G.listHead;while(H){if(!G.disableStop&&D){F=H.prevLength}else{if(H.newLength<1){F=H.newLength+C}else{F=H.newLength-C}}if(H.direction==Resize.HORIZONTAL){H.element.style.width=F+"px"}else{if(H.direction==Resize.VERTICAL){H.element.style.height=F+"px"}}H=H.next}G.onResize();return false},onMouseUp:function(B){B=mousePos.update(B);var C=Resize.group;var A=B.windowCoordinate;C.mouseEnd=new Coordinate(mousePos.x,mousePos.y);C.onResizeEnd();document.onmousemove=null;document.onmouseup=null;document.getElementsByTagName("body")[0].style.cursor="auto";Resize.group=null;if(C.func!=null){C.func()}return false}};var LayoutConfiguration={categories:new Array(),initialized:false,loadingImage:null,menu:null,menuDiv:null,menuIframe:null,portlets:new Array(),showTimer:0,init:function(){var C=new Image();var A=new Image();C.src=themeDisplay.getPathThemeImage()+"/arrows/01_down.gif";A.src=themeDisplay.getPathThemeImage()+"/arrows/01_right.gif";var F=document.getElementById("portal_add_content");LayoutConfiguration.menu=F;if(F!=null){var E=F.childNodes;for(var D=0;D<E.length;D++){if(E[D].className!=null&&E[D].className.match("portal-add-content")){LayoutConfiguration.menuDiv=E[D]}if(E[D].nodeName!=null&&E[D].nodeName.toLowerCase().match("iframe")){LayoutConfiguration.menuIframe=E[D]}}var B=F.getElementsByTagName("div");for(var D=0;D<B.length;D++){if(B[D].className=="layout_configuration_portlet"){LayoutConfiguration.portlets.push(B[D])}else{if(B[D].className=="layout_configuration_category"){LayoutConfiguration.categories.push(B[D])}}}LayoutConfiguration.initialized=true;if(is_ie){document.getElementById("layout_configuration_content").focus()}}},toggle:function(C,E,A){if(!LayoutConfiguration.menu){var D=themeDisplay.getPathMain()+"/portal/render_portlet?p_l_id="+C+"&p_p_id="+E+"&doAsUserId="+A;var B=Alerts.fireMessageBox({width:250,noCenter:true,title:"Add Content",onClose:function(){LayoutConfiguration.menu=null}});AjaxUtil.update(D,B,{onComplete:LayoutConfiguration.init})}},startShowTimer:function(A){if(this.showTimer){clearTimeout(this.showTimer);this.showTimer=0}this.showTimer=setTimeout('LayoutConfiguration.showMatching("'+A+'")',250)},showMatching:function(D){var B=this.portlets;var A=this.categories;if(D=="*"){for(var C=0;C<B.length;C++){B[C].style.display="block"}for(var C=0;C<A.length;C++){A[C].style.display="block";this.toggleCategory(A[C].getElementsByTagName("table")[0],"block")}}else{if(D==""){for(var C=0;C<A.length;C++){A[C].style.display="block";this.toggleCategory(A[C].getElementsByTagName("table")[0],"none")}for(var C=0;C<B.length;C++){B[C].style.display="block"}}else{D=D.toLowerCase();for(var C=0;C<A.length;C++){A[C].style.display="none"}for(var C=0;C<B.length;C++){if(B[C].id.toLowerCase().match(D)){B[C].style.display="block";this.showCategories(A,B[C].id)}else{B[C].style.display="none"}}}}},showCategories:function(A,B){var D=B.lastIndexOf(":");while(D!=-1){B=B.substr(0,D);for(var C=0;C<A.length;C++){if(B.match(A[C].id)){A[C].style.display="block";this.toggleCategory(A[C].getElementsByTagName("table")[0],"block")}}D=B.lastIndexOf(":")}},toggleCategory:function(F,E){var B=F;while(B.nodeName.toLowerCase()!="table"){B=B.parentNode}var C=B.rows[1].cells[0];var G=document.getElementsByClassName("layout_configuration_category_pane",C)[0];var D=F.getElementsByTagName("img")[0];var A=themeDisplay.getPathThemeImage();if(E){G.style.display=E;if(E.toLowerCase().match("block")){D.src=A+"/arrows/01_down.gif"}else{D.src=A+"/arrows/01_right.gif"}}else{if(toggleByObject(G,true)){D.src=A+"/arrows/01_down.gif"}else{D.src=A+"/arrows/01_right.gif"}}}};var Messaging={checkRoster:false,currentChatBox:null,initialized:false,inputCount:1,mainDiv:null,msgQueue:new Array(),userId:null,windowCount:0,zIndex:1,chat:function(B){if(!B&&Messaging.msgQueue.length==0){return }var D=B||Messaging.msgQueue.shift();var C=$("msg-chat-box"+D.toId);if(!C){var A=themeDisplay.getPathMain()+"/messaging/action?cmd=chatbox&toId="+D.toId+"&toName="+encodeURIComponent(D.toName)+"&top="+(D.top||15*this.windowCount)+"&left="+(D.left||15*this.windowCount++)+"&zIndex="+(ZINDEX.CHAT_BOX+this.zIndex++);if(D.status&&D.status=="unavailable"){A+="&addUser=1"}if(D.messages){A+="&messages="+encodeURIComponent(D.messages)}AjaxUtil.request(A,{returnArgs:D,onComplete:function(F,E){var G=Messaging.createChatBox(F.responseText);Messaging.populateChatBox(G,E)}})}else{this.populateChatBox(C,D)}},populateChatBox:function(F,H){var E=document.getElementsByClassName("msg-type-area",F)[0];var A=document.getElementsByClassName("msg-chat-area",F)[0];if(H.body!=null){var C=H.toName.split(/[ ,.-]/);var G="";for(var D=0;D<C.length;D++){G+=C[D].charAt(0)}A.innerHTML+="<span class='msg-chatarea-from'>"+H.toName+": </span>"+H.body+"<br/>"}this.saveCookie();var B=parseInt(F.style.top);if(document.body.scrollTop>B){F.style.top=document.body.scrollTop+"px"}else{if(document.body.scrollTop+document.body.clientHeight<B+F.offsetHeight){F.style.top=document.body.scrollTop+"px"}}A.scrollTop=A.scrollHeight;E.focus();E.focus();Messaging.chat()},getChats:function(){var url=themeDisplay.getPathMain()+"/messaging/action?cmd=getChats";AjaxUtil.request(url,{onComplete:function(xmlHttpReq){var msg=eval("("+xmlHttpReq.responseText+")");Messaging.getChatsReturn(msg)}})},getChatsReturn:function(D){var A=D.status;if(A=="success"){var F=D.chat;if(F&&F.length>0){for(var C=0;C<F.length;C++){var B=F[C].fromName;var E=F[C].fromId;F[C].fromName=F[C].toName;F[C].fromId=F[C].toId;F[C].toName=B;F[C].toId=E;Messaging.msgQueue.push(F[C])}Messaging.chat();window.focus()}}},createChatBox:function(D){var A=document.createElement("div");A.innerHTML=D;var C=document.getElementsByClassName("msg-chat-box",A)[0];var B=document.getElementsByClassName("msg-chat-title",C)[0];Drag.makeDraggable(C,B);C.onDragEnd=function(){Messaging.saveCookie()};A.removeChild(C);this.mainDiv.appendChild(C);return C},error:function(){alert("The system failed to contact the selected user. It's possible that they're temporarily offline. Please try again later.")},init:function(D){var A=document.getElementsByTagName("body")[0];var B=$("messaging-main-div");this.userId=D;if(B==null){B=document.createElement("div");B.id="messaging-main-div";Element.setStyle(B,{left:0,position:"absolute",textAlign:"left",top:0,width:"100%",zIndex:ZINDEX.CHAT_BOX});A.insertBefore(B,A.childNodes[0])}this.mainDiv=B;var E=Cookie.read(this.userId+"_chats");if(E){var C=$J(decodeURIComponent(E));C.each(function(F){Messaging.msgQueue.push(F)});Messaging.chat()}this.initialized=true;Messaging.getChats()},maximizeChat:function(D){var C=$(D);var B=document.getElementsByClassName("msg-chat-box-width")[0];var A=document.getElementsByClassName("msg-chat-area")[0];C.style.left=Viewport.scroll().x+"px";C.style.top=Viewport.scroll().y+"px";B.style.width=(Viewport.frame().x-30)+"px";A.style.height=(Viewport.frame().y-100)+"px"},minimizeChat:function(D){var C=$(D);var B=document.getElementsByClassName("msg-chat-box-width")[0];var A=document.getElementsByClassName("msg-chat-area")[0];B.style.width=250+"px";A.style.height=100+"px"},removeChat:function(B){var A=$(B);Element.remove(A);this.saveCookie()},saveCookie:function(){var B=document.getElementsByClassName("msg-chat-box",this.mainDiv);var A=new Array();B.each(function(D){var C=new Object();C.toName=document.getElementsByClassName("msg-to-name",D)[0].innerHTML;C.toId=document.getElementsByClassName("msg-to-input-id",D)[0].value;C.top=parseInt(D.style.top);C.left=parseInt(D.style.left);C.messages=document.getElementsByClassName("msg-chat-area",D)[0].innerHTML;A.push(C)});Cookie.create(this.userId+"_chats",encodeURIComponent(jQuery.toJSON(A)),99)},sendChat:function(D,G){var H;var E=D.parentNode;var F;var L;var K;var J;var I="cmd=sendChat";if(window.event){H=window.event.keyCode}else{if(G){H=G.which}else{return }}if(H==13){var B=E.getElementsByTagName("input");for(var C=0;C<B.length;C++){if(B[C].className){if(B[C].className.match("msg-to-input-id")){F=B[C]}if(B[C].className.match("msg-to-input-addr")){L=B[C]}if(B[C].className.match("msg-type-area")){K=B[C]}}}if(K.value==""){return }var A=E.getElementsByTagName("div");for(var C=0;C<A.length;C++){if(A[C].className&&A[C].className.match("msg-chat-area")){J=A[C]}}I+="&text="+encodeURIComponent(K.value);if(L!=null){I+="&tempId="+F.value+"&toAddr="+L.value}else{I+="&toId="+F.value}loadPage(themeDisplay.getPathMain()+"/messaging/action",I,Messaging.sendChatReturn);J.innerHTML+="<span class='msg-chatarea-me'>Me: </span>"+K.value+"<br/>";J.scrollTop=J.scrollHeight;K.value="";Messaging.saveCookie()}},sendChatReturn:function(xmlHttpReq){var msg=eval("("+xmlHttpReq.responseText+")");if(msg.status=="success"){Messaging.populateChatBox(msg)}else{Messaging.error()}}};var MessagingRoster={highlightColor:"",lastSelected:null,addEntry:function(C){var B;if(C){B=themeDisplay.getPathMain()+"/chat/roster?cmd=addEntry&userId="+C}else{var A=$("portlet-chat-roster-email").value;B=themeDisplay.getPathMain()+"/chat/roster?cmd=addEntry&email="+A}AjaxUtil.request(B,{onComplete:MessagingRoster.addEntryReturn})},addEntryReturn:function(xmlHttpReq){try{var msg=eval("("+xmlHttpReq.responseText+")");if(msg.status=="failure"){alert("No such user exists")}else{var rosterDiv=$("portlet-chat-roster-list");if(rosterDiv){var entries=document.getElementsByClassName("portlet-chat-roster-entry");var userId=msg.user;var userExists=entries.any(function(item){return(item.userId==userId)});if(!userExists||entries.length==0){var entryRow=MessagingRoster.createEntryRow(msg.user,msg.name);rosterDiv.appendChild(entryRow)}MessagingRoster.toggleEmail()}}}catch(err){}},createEntryRow:function(C,F,A){var B=document.createElement("div");var D=document.createElement("img");var E=document.createElement("a");D.align="absmiddle";D.style.marginRight="5px";if(A){D.src=themeDisplay.getPathThemeImage()+"/chat/user_online.gif"}else{D.src=themeDisplay.getPathThemeImage()+"/chat/user_offline.gif"}E.innerHTML=F;E.href="javascript: void(0)";E.onclick=MessagingRoster.onEntryLinkClick;B.appendChild(D);B.appendChild(E);B.onclick=MessagingRoster.onEntryClick;B.userId=C;B.userName=F;B.style.cursor="pointer";B.className="portlet-chat-roster-entry";return B},deleteEntries:function(){if(MessagingRoster.lastSelected){var A=MessagingRoster.lastSelected.userId;var B=MessagingRoster.lastSelected;B.parentNode.removeChild(B);MessagingRoster.lastSelected=null;loadPage(themeDisplay.getPathMain()+"/chat/roster","cmd=deleteEntries&entries="+A,MessagingRoster.deleteEntriesReturn)}},deleteEntriesReturn:function(xmlHttpReq){try{var msg=eval("("+xmlHttpReq.responseText+")")}catch(err){}},getEntries:function(){var url=themeDisplay.getPathMain()+"/chat/roster?cmd=getEntries";AjaxUtil.request(url,{onComplete:function(xmlHttpReq){var msg=eval("("+xmlHttpReq.responseText+")");MessagingRoster.getEntriesReturn(msg)}})},getEntriesReturn:function(A){MessagingRoster.updateEntries(A.roster)},updateEntries:function(D){var E=$("portlet-chat-roster-list");if(E!=null){E.innerHTML=""}else{Messaging.checkRoster=false;return }for(var B=0;B<D.length;B++){var C=D[B];var A=MessagingRoster.createEntryRow(C.user,C.name,C.status=="available");E.appendChild(A)}},onEmailKeypress:function(C,A){var B;if(window.event){B=window.event.keyCode}else{if(A){B=A.which}else{return }}if(B==13){MessagingRoster.addEntry()}},onEntryClick:function(){if(MessagingRoster.lastSelected!=null){MessagingRoster.lastSelected.style.backgroundColor="transparent"}this.style.backgroundColor=MessagingRoster.highlightColor;MessagingRoster.lastSelected=this},onEntryLinkClick:function(){var A=this.parentNode;Messaging.chat({toId:A.userId,toName:A.userName})},toggleEmail:function(){emailDiv=$("portlet-chat-roster-email-div");if(emailDiv.style.display=="none"){emailDiv.style.display="block";emailInput=$("portlet-chat-roster-email");emailInput.value="";emailInput.focus()}else{emailDiv.style.display="none"}}};MWJ_img_cache_init=function(){var C=new Object();for(var E=0;E<2;E++){var D=E?(document.getElementsByTagName?document.getElementsByTagName("input"):(document.all?document.all.tags("INPUT"):[])):document.images;for(var A=0;D[A];A++){var B=D[A];if(B.id&&B.id==layoutMenuImageClass&&layoutMenuImageClass.length!=0){B.src=B.getAttribute("hoversrc")}else{if(B.getAttribute){B.hoversrc=B.getAttribute("hoversrc");B.activesrc=B.getAttribute("activesrc")}if(B.hoversrc||B.activesrc){if(!C[B.src]){C[B.src]=new Image();C[B.src].src=B.src}B.rootsrc=B.src;B.onmouseout=function(){this.src=this.rootsrc}}if(B.hoversrc){if(!C[B.hoversrc]){C[B.hoversrc]=new Image();C[B.hoversrc].src=B.hoversrc}B.onmouseover=function(){this.src=this.hoversrc}}if(B.activesrc){if(!C[B.activesrc]){C[B.activesrc]=new Image();C[B.activesrc].src=B.activesrc}B.onmousedown=function(F){F=F?F:window.event;if(F.button>1||F.which>1){return }this.src=this.activesrc};B.onmouseup=function(F){F=F?F:window.event;if(F.button>1||F.which>1){return }this.src=this.hoversrc?this.hoversrc:this.rootsrc}}}}}};jQuery(document).ready(MWJ_img_cache_init);var Reflection={defaultHeight:0.5,defaultOpacity:0.5,add:function(D,O){Reflection.remove(D);doptions={"height":Reflection.defaultHeight,"opacity":Reflection.defaultOpacity};if(O){for(var I in doptions){if(!O[I]){O[I]=doptions[I]}}}else{O=doptions}try{var L=document.createElement("div");var B=D;var E=B.className.split(" ");var H="";for(j=0;j<E.length;j++){if(E[j]!="reflect"){if(H){H+=" "}H+=E[j]}}var J=Math.floor(B.height*O["height"]);var G=Math.floor(B.height*(1+O["height"]));var N=B.width;if(document.all&&!window.opera){if(B.parentElement.tagName=="A"){var L=document.createElement("a");L.href=B.parentElement.href}L.className=H;B.className="reflected";L.style.cssText=B.style.cssText;B.style.cssText="vertical-align: bottom";var F=document.createElement("img");F.src=B.src;F.style.width=N+"px";F.style.marginBottom="-"+(B.height-J)+"px";F.style.filter="flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+(O["opacity"]*100)+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+(O["height"]*100)+")";L.style.width=N+"px";L.style.height=G+"px";B.parentNode.replaceChild(L,B);L.appendChild(B);L.appendChild(F)}else{var C=document.createElement("canvas");if(C.getContext){L.className=H;B.className="reflected";L.style.cssText=B.style.cssText;B.style.cssText="vertical-align: bottom";var A=C.getContext("2d");C.style.height=J+"px";C.style.width=N+"px";C.height=J;C.width=N;L.style.width=N+"px";L.style.height=G+"px";B.parentNode.replaceChild(L,B);L.appendChild(B);L.appendChild(C);A.save();A.translate(0,D.height-1);A.scale(1,-1);A.drawImage(D,0,0,N,D.height);A.restore();A.globalCompositeOperation="destination-out";var M=A.createLinearGradient(0,0,0,J);M.addColorStop(1,"rgba(255, 255, 255, 1.0)");M.addColorStop(0,"rgba(255, 255, 255, "+(1-O["opacity"])+")");A.fillStyle=M;if(navigator.appVersion.indexOf("WebKit")!=-1){A.fill()}else{A.fillRect(0,0,N,J*2)}}}}catch(K){}},remove:function(A){if(A.className=="reflected"){A.className=A.parentNode.className;A.parentNode.parentNode.replaceChild(A,A.parentNode)}}};function addReflections(){var C=jQuery(".reflect");for(i=0;i<C.length;i++){var B=null;var A=null;var D=C[i].className.split(" ");for(j=0;j<D.length;j++){if(D[j].indexOf("rheight")==0){var B=D[j].substring(7)/100}else{if(D[j].indexOf("ropacity")==0){var A=D[j].substring(8)/100}}}Reflection.add(C[i],{height:B,opacity:A})}}jQuery(document).ready(function(){addReflections()});function createPageSnapshot(D){jQuery("*[href]").each(function(){this.href=jQuery.trim(this.href);if(this.href==null||this.href==""){return }if(this.href.indexOf("javascript")>=0){jQuery(this).remove();return }if(this.href.indexOf("/")==0){this.host=location.host;this.hostname=location.hostname}});jQuery("img").each(function(){this.src=jQuery.trim(this.src);if(this.src==null||this.src==""){return }if(this.src.indexOf("/")==0){this.host=location.host;this.hostname=location.hostname}});var F=jQuery("link[rel=stylesheet]");var A=0;for(A=F.length;A>0;A--){if(F[A-1].href){var C=jQuery.ajax({url:F[A-1].href,async:false}).responseText;jQuery("body").prepend('<style type="text/css">'+C+"</style>")}}jQuery("link[rel=stylesheet]").remove();jQuery("body").prepend(jQuery("head style").remove());jQuery("script").remove();jQuery("*[onmousemove]").remove();jQuery("*[onclick]").remove();jQuery("#layout-user-menu").remove();jQuery("#layout-my-places").remove();jQuery(".jquery-corner").remove();jQuery(".icon-edit").remove();jQuery(".icon-permissions").remove();jQuery(".icon-deactivate").remove();jQuery(".icon-add_article").remove();jQuery(".portlet-small-icon-bar").remove();var E=document.createElement("form");E.style.display="none";E.setAttribute("name","savePageForEmailForm");E.setAttribute("action",D);E.setAttribute("method","post");var B=document.createElement("input");B.setAttribute("type","hidden");B.setAttribute("name","_748_content");B.setAttribute("value","<html>"+document.documentElement.innerHTML+"</html>");E.appendChild(B);document.body.appendChild(E);submitForm(E)}