if(typeof window.jQuery=="undefined"){window.undefined=window.undefined;var jQuery=function(d,e){if(window==this){return new jQuery(d,e)}d=d||document;if(jQuery.isFunction(d)){return new jQuery(document)[jQuery.fn.ready?"ready":"load"](d)}if(typeof d=="string"){var b=/^[^<]*(<(.|\s)+>)[^>]*$/.exec(d);if(b){d=jQuery.clean([b[1]])}else{return new jQuery(e).find(d)}}return this.setArray(d.constructor==Array&&d||(d.jquery||d.length&&d!=window&&!d.nodeType&&d[0]!=undefined&&d[0].nodeType)&&jQuery.makeArray(d)||[d])};if(typeof $!="undefined"){jQuery._$=$}var $=jQuery;jQuery.fn=jQuery.prototype={jquery:"1.1.2",size:function(){return this.length},length:0,get:function(a){return a==undefined?jQuery.makeArray(this):this[a]},pushStack:function(b){var c=jQuery(b);c.prevObject=this;return c},setArray:function(b){this.length=0;[].push.apply(this,b);return this},each:function(b,a){return jQuery.each(this,b,a)},index:function(a){var b=-1;this.each(function(c){if(this==a){b=c}});return b},attr:function(a,c,b){var d=a;if(a.constructor==String){if(c==undefined){return this.length&&jQuery[b||"attr"](this[0],a)||undefined}else{d={};d[a]=c}}return this.each(function(e){for(var f in d){jQuery.attr(b?this.style:this,f,jQuery.prop(this,d[f],b,e,f))}})},css:function(a,b){return this.attr(a,b,"curCSS")},text:function(b){if(typeof b=="string"){return this.empty().append(document.createTextNode(b))}var a="";jQuery.each(b||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){a+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return a},wrap:function(){var b=jQuery.clean(arguments);return this.each(function(){var a=b[0].cloneNode(true);this.parentNode.insertBefore(a,this);while(a.firstChild){a=a.firstChild}a.appendChild(this)})},append:function(){return this.domManip(arguments,true,1,function(b){this.appendChild(b)})},prepend:function(){return this.domManip(arguments,true,-1,function(b){this.insertBefore(b,this.firstChild)})},before:function(){return this.domManip(arguments,false,1,function(b){this.parentNode.insertBefore(b,this)})},after:function(){return this.domManip(arguments,false,-1,function(b){this.parentNode.insertBefore(b,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},find:function(a){return this.pushStack(jQuery.map(this,function(b){return jQuery.find(a,b)}),a)},clone:function(a){return this.pushStack(jQuery.map(this,function(b){var b=b.cloneNode(a!=undefined?a:true);b.$events=null;return b}))},filter:function(a){return this.pushStack(jQuery.isFunction(a)&&jQuery.grep(this,function(c,b){return a.apply(c,[b])})||jQuery.multiFilter(a,this))},not:function(a){return this.pushStack(a.constructor==String&&jQuery.multiFilter(a,this,true)||jQuery.grep(this,function(b){return(a.constructor==Array||a.jquery)?jQuery.inArray(b,a)<0:b!=a}))},add:function(a){return this.pushStack(jQuery.merge(this.get(),a.constructor==String?jQuery(a).get():a.length!=undefined&&(!a.nodeName||a.nodeName=="FORM")?a:[a]))},is:function(a){return a?jQuery.filter(a,this).r.length>0:false},val:function(a){return a==undefined?(this.length?this[0].value:null):this.attr("value",a)},html:function(a){return a==undefined?(this.length?this[0].innerHTML:null):this.empty().append(a)},domManip:function(d,f,c,e){var g=this.length>1;var b=jQuery.clean(d);if(c<0){b.reverse()}return this.each(function(){var a=this;if(f&&jQuery.nodeName(this,"table")&&jQuery.nodeName(b[0],"tr")){a=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"))}jQuery.each(b,function(){e.apply(a,[g?this.cloneNode(true):this])})})}};jQuery.extend=jQuery.fn.extend=function(){var d=arguments[0],b=1;if(arguments.length==1){d=this;b=0}var e;while(e=arguments[b++]){for(var c in e){d[c]=e[c]}}return d};jQuery.extend({noConflict:function(){if(jQuery._$){$=jQuery._$}return jQuery},isFunction:function(a){return !!a&&typeof a!="string"&&!a.nodeName&&typeof a[0]=="undefined"&&/function/i.test(a+"")},isXMLDoc:function(a){return a.tagName&&a.ownerDocument&&!a.ownerDocument.body},nodeName:function(b,a){return b.nodeName&&b.nodeName.toUpperCase()==a.toUpperCase()},each:function(e,d,b){if(e.length==undefined){for(var c in e){d.apply(e[c],b||[c,e[c]])}}else{for(var c=0,a=e.length;c<a;c++){if(d.apply(e[c],b||[c,e[c]])===false){break}}}return e},prop:function(d,e,c,b,f){if(jQuery.isFunction(e)){e=e.call(d,[b])}var a=/z-?index|font-?weight|opacity|zoom|line-?height/i;return e&&e.constructor==Number&&c=="curCSS"&&!a.test(f)?e+"px":e},className:{add:function(a,b){jQuery.each(b.split(/\s+/),function(c,d){if(!jQuery.className.has(a.className,d)){a.className+=(a.className?" ":"")+d}})},remove:function(a,b){a.className=b?jQuery.grep(a.className.split(/\s+/),function(c){return !jQuery.className.has(b,c)}).join(" "):""},has:function(a,b){a=a.className||a;b=b.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1");return a&&new RegExp("(^|\\s)"+b+"(\\s|$)").test(a)}},swap:function(c,d,b){for(var a in d){c.style["old"+a]=c.style[a];c.style[a]=d[a]}b.apply(c,[]);for(var a in d){c.style[a]=c.style["old"+a]}},css:function(g,f){if(f=="height"||f=="width"){var b={},c,a,h=["Top","Bottom","Right","Left"];jQuery.each(h,function(){b["padding"+this]=0;b["border"+this+"Width"]=0});jQuery.swap(g,b,function(){if(jQuery.css(g,"display")!="none"){c=g.offsetHeight;a=g.offsetWidth}else{g=jQuery(g.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(g.parentNode)[0];var d=jQuery.css(g.parentNode,"position");if(d==""||d=="static"){g.parentNode.style.position="relative"}c=g.clientHeight;a=g.clientWidth;if(d==""||d=="static"){g.parentNode.style.position="static"}g.parentNode.removeChild(g)}});return f=="height"?c:a}return jQuery.curCSS(g,f)},curCSS:function(b,f,c){var a;if(f=="opacity"&&jQuery.browser.msie){return jQuery.attr(b.style,"opacity")}if(f=="float"||f=="cssFloat"){f=jQuery.browser.msie?"styleFloat":"cssFloat"}if(!c&&b.style[f]){a=b.style[f]}else{if(document.defaultView&&document.defaultView.getComputedStyle){if(f=="cssFloat"||f=="styleFloat"){f="float"}f=f.replace(/([A-Z])/g,"-$1").toLowerCase();var e=document.defaultView.getComputedStyle(b,null);if(e){a=e.getPropertyValue(f)}else{if(f=="display"){a="none"}else{jQuery.swap(b,{display:"block"},function(){var g=document.defaultView.getComputedStyle(this,"");a=g&&g.getPropertyValue(f)||""})}}}else{if(b.currentStyle){var d=f.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a=b.currentStyle[f]||b.currentStyle[d]}}}return a},clean:function(b){var c=[];jQuery.each(b,function(f,a){if(!a){return}if(a.constructor==Number){a=a.toString()}if(typeof a=="string"){var h=jQuery.trim(a),k=document.createElement("div"),e=[];var g=!h.indexOf("<opt")&&[1,"<select>","</select>"]||(!h.indexOf("<thead")||!h.indexOf("<tbody")||!h.indexOf("<tfoot"))&&[1,"<table>","</table>"]||!h.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!h.indexOf("<td")||!h.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];k.innerHTML=g[1]+h+g[2];while(g[0]--){k=k.firstChild}if(jQuery.browser.msie){if(!h.indexOf("<table")&&h.indexOf("<tbody")<0){e=k.firstChild&&k.firstChild.childNodes}else{if(g[1]=="<table>"&&h.indexOf("<tbody")<0){e=k.childNodes}}for(var j=e.length-1;j>=0;--j){if(jQuery.nodeName(e[j],"tbody")&&!e[j].childNodes.length){e[j].parentNode.removeChild(e[j])}}}a=[];for(var f=0,d=k.childNodes.length;f<d;f++){a.push(k.childNodes[f])}}if(a.length===0&&!jQuery.nodeName(a,"form")){return}if(a[0]==undefined||jQuery.nodeName(a,"form")){c.push(a)}else{c=jQuery.merge(c,a)}});return c},attr:function(c,b,d){var a=jQuery.isXMLDoc(c)?{}:{"for":"htmlFor","class":"className","float":jQuery.browser.msie?"styleFloat":"cssFloat",cssFloat:jQuery.browser.msie?"styleFloat":"cssFloat",innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected"};if(b=="opacity"&&jQuery.browser.msie&&d!=undefined){c.zoom=1;return c.filter=c.filter.replace(/alpha\([^\)]*\)/gi,"")+(d==1?"":"alpha(opacity="+d*100+")")}else{if(b=="opacity"&&jQuery.browser.msie){return c.filter?parseFloat(c.filter.match(/alpha\(opacity=(.*)\)/)[1])/100:1}}if(b=="opacity"&&jQuery.browser.mozilla&&d==1){d=0.9999}if(a[b]){if(d!=undefined){c[a[b]]=d}return c[a[b]]}else{if(d==undefined&&jQuery.browser.msie&&jQuery.nodeName(c,"form")&&(b=="action"||b=="method")){return c.getAttributeNode(b).nodeValue}else{if(c.tagName){if(d!=undefined){c.setAttribute(b,d)}if(jQuery.browser.msie&&/href|src/.test(b)&&!jQuery.isXMLDoc(c)){return c.getAttribute(b,2)}return c.getAttribute(b)}else{b=b.replace(/-([a-z])/ig,function(f,e){return e.toUpperCase()});if(d!=undefined){c[b]=d}return c[b]}}}},trim:function(a){return a.replace(/^\s+|\s+$/g,"")},makeArray:function(b){var d=[];if(b.constructor!=Array){for(var c=0,e=b.length;c<e;c++){d.push(b[c])}}else{d=b.slice(0)}return d},inArray:function(c,d){for(var e=0,f=d.length;e<f;e++){if(d[e]==c){return e}}return -1},merge:function(e,b){var d=[].slice.call(e,0);for(var c=0,a=b.length;c<a;c++){if(jQuery.inArray(b[c],d)==-1){e.push(b[c])}}return e},grep:function(c,f,b){if(typeof f=="string"){f=new Function("a","i","return "+f)}var a=[];for(var d=0,e=c.length;d<e;d++){if(!b&&f(c[d],d)||b&&!f(c[d],d)){a.push(c[d])}}return a},map:function(b,h){if(typeof h=="string"){h=new Function("a","return "+h)}var k=[],a=[];for(var f=0,c=b.length;f<c;f++){var d=h(b[f],f);if(d!==null&&d!=undefined){if(d.constructor!=Array){d=[d]}k=k.concat(d)}}var a=k.length?[k[0]]:[];check:for(var f=1,g=k.length;f<g;f++){for(var e=0;e<f;e++){if(k[f]==a[e]){continue check}}a.push(k[f])}return a}});new function(){var a=navigator.userAgent.toLowerCase();jQuery.browser={safari:/webkit/.test(a),opera:/opera/.test(a),msie:/msie/.test(a)&&!/opera/.test(a),mozilla:/mozilla/.test(a)&&!/(compatible|webkit)/.test(a)};jQuery.boxModel=!jQuery.browser.msie||document.compatMode=="CSS1Compat"};jQuery.each({parent:"a.parentNode",parents:"jQuery.parents(a)",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)"},function(a,b){jQuery.fn[a]=function(c){var d=jQuery.map(this,b);if(c&&typeof c=="string"){d=jQuery.multiFilter(c,d)}return this.pushStack(d)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after"},function(a,b){jQuery.fn[a]=function(){var c=arguments;return this.each(function(){for(var d=0,e=c.length;d<e;d++){jQuery(c[d])[b](this)}})}});jQuery.each({removeAttr:function(a){jQuery.attr(this,a,"");this.removeAttribute(a)},addClass:function(a){jQuery.className.add(this,a)},removeClass:function(a){jQuery.className.remove(this,a)},toggleClass:function(a){jQuery.className[jQuery.className.has(this,a)?"remove":"add"](this,a)},remove:function(b){if(!b||jQuery.filter(b,[this]).r.length){this.parentNode.removeChild(this)}},empty:function(){while(this.firstChild){this.removeChild(this.firstChild)}}},function(a,b){jQuery.fn[a]=function(){return this.each(b,arguments)}});jQuery.each(["eq","lt","gt","contains"],function(a,b){jQuery.fn[b]=function(c,d){return this.filter(":"+b+"("+c+")",d)}});jQuery.each(["height","width"],function(a,b){jQuery.fn[b]=function(c){return c==undefined?(this.length?jQuery.css(this[0],b):null):this.css(b,c.constructor==String?c:c+"px")}});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","nth-child":"jQuery.nth(a.parentNode.firstChild,m[3],'nextSibling',a)==a","first-child":"jQuery.nth(a.parentNode.firstChild,1,'nextSibling')==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"jQuery.sibling(a.parentNode.firstChild).length==1",parent:"a.firstChild",empty:"!a.firstChild",contains:"jQuery.fn.text.apply([a]).indexOf(m[3])>=0",visible:'a.type!="hidden"&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'a.type=="hidden"||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:"a.type=='text'",radio:"a.type=='radio'",checkbox:"a.type=='checkbox'",file:"a.type=='file'",password:"a.type=='password'",submit:"a.type=='submit'",image:"a.type=='image'",reset:"a.type=='reset'",button:'a.type=="button"||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)"},".":"jQuery.className.has(a,m[2])","@":{"=":"z==m[4]","!=":"z!=m[4]","^=":"z&&!z.indexOf(m[4])","$=":"z&&z.substr(z.length - m[4].length,m[4].length)==m[4]","*=":"z&&z.indexOf(m[4])>=0","":"z",_resort:function(a){return["",a[1],a[3],a[2],a[5]]},_prefix:"z=a[m[3]];if(!z||/href|src/.test(m[3]))z=jQuery.attr(a,m[3]);"},"[":"jQuery.find(m[2],a).length"},parse:[/^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i,/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,/^(:)([a-z0-9_-]*)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/i,/^([:.#]*)([a-z0-9_*-]*)/i],token:[/^(\/?\.\.)/,"a.parentNode",/^(>|\/)/,"jQuery.sibling(a.firstChild)",/^(\+)/,"jQuery.nth(a,2,'nextSibling')",/^(~)/,function(b){var c=jQuery.sibling(b.parentNode.firstChild);return c.slice(jQuery.inArray(b,c)+1)}],multiFilter:function(e,b,c){var a,g=[];while(e&&e!=a){a=e;var d=jQuery.filter(e,b,c);e=d.t.replace(/^\s*,\s*/,"");g=c?b=d.r:jQuery.merge(g,d.r)}return g},find:function(t,context){if(typeof t!="string"){return[t]}if(context&&!context.nodeType){context=null}context=context||document;if(!t.indexOf("//")){context=context.documentElement;t=t.substr(2,t.length)}else{if(!t.indexOf("/")){context=context.documentElement;t=t.substr(1,t.length);if(t.indexOf("/")>=1){t=t.substr(t.indexOf("/"),t.length)}}}var ret=[context],done=[],last=null;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t).replace(/^\/\//i,"");var foundToken=false;var re=/^[\/>]\s*([a-z0-9*-]+)/i;var m=re.exec(t);if(m){jQuery.each(ret,function(){for(var c=this.firstChild;c;c=c.nextSibling){if(c.nodeType==1&&(jQuery.nodeName(c,m[1])||m[1]=="*")){r.push(c)}}});ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0){continue}foundToken=true}else{for(var i=0;i<jQuery.token.length;i+=2){var re=jQuery.token[i];var m=re.exec(t);if(m){r=ret=jQuery.map(ret,jQuery.isFunction(jQuery.token[i+1])?jQuery.token[i+1]:function(a){return eval(jQuery.token[i+1])});t=jQuery.trim(t.replace(re,""));foundToken=true;break}}}if(t&&!foundToken){if(!t.indexOf(",")){if(ret[0]==context){ret.shift()}jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length)}else{var re2=/^([a-z0-9_-]+)(#)([a-z0-9\\*_-]*)/i;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]]}else{re2=/^([#.]?)([a-z0-9\\*_-]*)/i;m=re2.exec(t)}if(m[1]=="#"&&ret[ret.length-1]&&ret[ret.length-1].getElementById){var oid=ret[ret.length-1].getElementById(m[2]);if(jQuery.browser.msie&&oid&&oid.id!=m[2]){oid=jQuery('[@id="'+m[2]+'"]',ret[ret.length-1])[0]}ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[]}else{if(m[1]=="."){var rec=new RegExp("(^|\\s)"+m[2]+"(\\s|$)")}jQuery.each(ret,function(){var tag=m[1]!=""||m[0]==""?"*":m[2];if(jQuery.nodeName(this,"object")&&tag=="*"){tag="param"}jQuery.merge(r,m[1]!=""&&ret.length!=1?jQuery.getAll(this,[],m[1],m[2],rec):this.getElementsByTagName(tag))});if(m[1]=="."&&ret.length==1){r=jQuery.grep(r,function(e){return rec.test(e.className)})}if(m[1]=="#"&&ret.length==1){var tmp=r;r=[];jQuery.each(tmp,function(){if(this.getAttribute("id")==m[2]){r=[this];return false}})}ret=r}t=t.replace(re2,"")}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t)}}if(ret&&ret[0]==context){ret.shift()}jQuery.merge(done,ret);return done},filter:function(t,r,not){while(t&&/^[a-z[({<*:.#]/i.test(t)){var p=jQuery.parse,m;jQuery.each(p,function(i,re){m=re.exec(t);if(m){t=t.substring(m[0].length);if(jQuery.expr[m[1]]._resort){m=jQuery.expr[m[1]]._resort(m)}return false}});if(m[1]==":"&&m[2]=="not"){r=jQuery.filter(m[3],r,true).r}else{if(m[1]=="."){var re=new RegExp("(^|\\s)"+m[2]+"(\\s|$)");r=jQuery.grep(r,function(e){return re.test(e.className||"")},not)}else{var f=jQuery.expr[m[1]];if(typeof f!="string"){f=jQuery.expr[m[1]][m[2]]}eval("f = function(a,i){"+(jQuery.expr[m[1]]._prefix||"")+"return "+f+"}");r=jQuery.grep(r,f,not)}}}return{r:r,t:t}},getAll:function(g,e,b,a,d){for(var c=g.firstChild;c;c=c.nextSibling){if(c.nodeType==1){var f=true;if(b=="."){f=c.className&&d.test(c.className)}else{if(b=="#"){f=c.getAttribute("id")==a}}if(f){e.push(c)}if(b=="#"&&e.length){break}if(c.firstChild){jQuery.getAll(c,e,b,a,d)}}}return e},parents:function(b){var a=[];var c=b.parentNode;while(c&&c!=document){a.push(c);c=c.parentNode}return a},nth:function(e,a,c,d){a=a||1;var b=0;for(;e;e=e[c]){if(e.nodeType==1){b++}if(b==a||a=="even"&&b%2==0&&b>1&&e==d||a=="odd"&&b%2==1&&e==d){return e}}},sibling:function(c,b){var a=[];for(;c;c=c.nextSibling){if(c.nodeType==1&&(!b||c!=b)){a.push(c)}}return a}});jQuery.event={add:function(b,d,c,e){if(jQuery.browser.msie&&b.setInterval!=undefined){b=window}if(e){c.data=e}if(!c.guid){c.guid=this.guid++}if(!b.$events){b.$events={}}var a=b.$events[d];if(!a){a=b.$events[d]={};if(b["on"+d]){a[0]=b["on"+d]}}a[c.guid]=c;b["on"+d]=this.handle;if(!this.global[d]){this.global[d]=[]}this.global[d].push(b)},guid:1,global:{},remove:function(d,f,e){if(d.$events){var c,b,a;if(f&&f.type){e=f.handler;f=f.type}if(f&&d.$events[f]){if(e){delete d.$events[f][e.guid]}else{for(c in d.$events[f]){delete d.$events[f][c]}}}else{for(b in d.$events){this.remove(d,b)}}for(a in d.$events[f]){if(a){a=true;break}}if(!a){d["on"+f]=null}}},trigger:function(d,e,a){e=jQuery.makeArray(e||[]);if(!a){jQuery.each(this.global[d]||[],function(){jQuery.event.trigger(d,e,this)})}else{var c=a["on"+d],f,b=jQuery.isFunction(a[d]);if(c){e.unshift(this.fix({type:d,target:a}));if((f=c.apply(a,e))!==false){this.triggered=true}}if(b&&f!==false){a[d]()}this.triggered=false}},handle:function(e){if(typeof jQuery=="undefined"||jQuery.event.triggered){return}e=jQuery.event.fix(e||window.event||{});var d;var f=this.$events[e.type];var b=[].slice.call(arguments,1);b.unshift(e);for(var a in f){b[0].handler=f[a];b[0].data=f[a].data;if(f[a].apply(this,b)===false){e.preventDefault();e.stopPropagation();d=false}}if(jQuery.browser.msie){e.target=e.preventDefault=e.stopPropagation=e.handler=e.data=null}return d},fix:function(d){if(!d.target&&d.srcElement){d.target=d.srcElement}if(d.pageX==undefined&&d.clientX!=undefined){var f=document.documentElement,c=document.body;d.pageX=d.clientX+(f.scrollLeft||c.scrollLeft);d.pageY=d.clientY+(f.scrollTop||c.scrollTop)}if(jQuery.browser.safari&&d.target.nodeType==3){var a=d;d=jQuery.extend({},a);d.target=a.target.parentNode;d.preventDefault=function(){return a.preventDefault()};d.stopPropagation=function(){return a.stopPropagation()}}if(!d.preventDefault){d.preventDefault=function(){this.returnValue=false}}if(!d.stopPropagation){d.stopPropagation=function(){this.cancelBubble=true}}return d}};jQuery.fn.extend({bind:function(b,c,a){return this.each(function(){jQuery.event.add(this,b,a||c,c)})},one:function(b,c,a){return this.each(function(){jQuery.event.add(this,b,function(d){jQuery(this).unbind(d);return(a||c).apply(this,arguments)},c)})},unbind:function(b,a){return this.each(function(){jQuery.event.remove(this,b,a)})},trigger:function(a,b){return this.each(function(){jQuery.event.trigger(a,b,this)})},toggle:function(){var b=arguments;return this.click(function(a){this.lastToggle=this.lastToggle==0?1:0;a.preventDefault();return b[this.lastToggle].apply(this,[a])||false})},hover:function(c,b){function a(f){var d=(f.type=="mouseover"?f.fromElement:f.toElement)||f.relatedTarget;while(d&&d!=this){try{d=d.parentNode}catch(f){d=this}}if(d==this){return false}return(f.type=="mouseover"?c:b).apply(this,[f])}return this.mouseover(a).mouseout(a)},ready:function(a){if(jQuery.isReady){a.apply(document,[jQuery])}else{jQuery.readyList.push(function(){return a.apply(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}if(jQuery.browser.mozilla||jQuery.browser.opera){document.removeEventListener("DOMContentLoaded",jQuery.ready,false)}}}});new function(){jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(b,c){jQuery.fn[c]=function(d){return d?this.bind(c,d):this.trigger(c)}});if(jQuery.browser.mozilla||jQuery.browser.opera){document.addEventListener("DOMContentLoaded",jQuery.ready,false)}else{if(jQuery.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var a=document.getElementById("__ie_init");if(a){a.onreadystatechange=function(){if(this.readyState!="complete"){return}this.parentNode.removeChild(this);jQuery.ready()}}a=null}else{if(jQuery.browser.safari){jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready()}},10)}}}jQuery.event.add(window,"load",jQuery.ready)};if(jQuery.browser.msie){jQuery(window).one("unload",function(){var d=jQuery.event.global;for(var c in d){var b=d[c],a=b.length;if(a&&c!="unload"){do{jQuery.event.remove(b[a-1],c)}while(--a)}}})}jQuery.fn.extend({loadIfModified:function(a,b,c){this.load(a,b,c,1)},load:function(b,d,f,e){if(jQuery.isFunction(b)){return this.bind("load",b)}f=f||function(){};var c="GET";if(d){if(jQuery.isFunction(d)){f=d;d=null}else{d=jQuery.param(d);c="POST"}}var a=this;jQuery.ajax({url:b,type:c,data:d,ifModified:e,complete:function(h,g){if(g=="success"||!e&&g=="notmodified"){a.attr("innerHTML",h.responseText).evalScripts().each(f,[h.responseText,g,h])}else{f.apply(a,[h.responseText,g,h])}}});return this},serialize:function(){return jQuery.param(this)},evalScripts:function(){return this.find("script").each(function(){if(this.src){jQuery.getScript(this.src)}else{jQuery.globalEval(this.text||this.textContent||this.innerHTML||"")}}).end()}});if(!window.XMLHttpRequest){XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(a,b){jQuery.fn[b]=function(c){return this.bind(b,c)}});jQuery.extend({get:function(a,c,e,b,d){if(jQuery.isFunction(c)){e=c;c=null}return jQuery.ajax({url:a,data:c,success:e,dataType:b,ifModified:d})},getIfModified:function(a,c,d,b){return jQuery.get(a,c,d,b,1)},getScript:function(a,b){return jQuery.get(a,null,b,"script")},getJSON:function(a,b,c){return jQuery.get(a,b,c,"json")},post:function(a,c,d,b){if(jQuery.isFunction(c)){d=c;c={}}return jQuery.ajax({type:"POST",url:a,data:c,success:d,dataType:b})},ajaxTimeout:function(a){jQuery.ajaxSettings.timeout=a},ajaxSetup:function(a){jQuery.extend(jQuery.ajaxSettings,a)},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(c){c=jQuery.extend({},jQuery.ajaxSettings,c);if(c.data){if(c.processData&&typeof c.data!="string"){c.data=jQuery.param(c.data)}if(c.type.toLowerCase()=="get"){c.url+=((c.url.indexOf("?")>-1)?"&":"?")+c.data;c.data=null}}if(c.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var g=false;var b=new XMLHttpRequest();b.open(c.type,c.url,c.async);if(c.data){b.setRequestHeader("Content-Type",c.contentType)}if(c.ifModified){b.setRequestHeader("If-Modified-Since",jQuery.lastModified[c.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}b.setRequestHeader("X-Requested-With","XMLHttpRequest");if(b.overrideMimeType){b.setRequestHeader("Connection","close")}if(c.beforeSend){c.beforeSend(b)}if(c.global){jQuery.event.trigger("ajaxSend",[b,c])}var f=function(h){if(b&&(b.readyState==4||h=="timeout")){g=true;if(a){clearInterval(a);a=null}var i;try{i=jQuery.httpSuccess(b)&&h!="timeout"?c.ifModified&&jQuery.httpNotModified(b,c.url)?"notmodified":"success":"error";if(i!="error"){var j;try{j=b.getResponseHeader("Last-Modified")}catch(l){}if(c.ifModified&&j){jQuery.lastModified[c.url]=j}var k=jQuery.httpData(b,c.dataType);if(c.success){c.success(k,i)}if(c.global){jQuery.event.trigger("ajaxSuccess",[b,c])}}else{jQuery.handleError(c,b,i)}}catch(l){i="error";jQuery.handleError(c,b,i,l)}if(c.global){jQuery.event.trigger("ajaxComplete",[b,c])}if(c.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}if(c.complete){c.complete(b,i)}if(c.async){b=null}}};var a=setInterval(f,13);if(c.timeout>0){setTimeout(function(){if(b){b.abort();if(!g){f("timeout")}}},c.timeout)}try{b.send(c.data)}catch(d){jQuery.handleError(c,b,null,d)}if(!c.async){f()}return b},handleError:function(c,b,a,d){if(c.error){c.error(b,a,d)}if(c.global){jQuery.event.trigger("ajaxError",[b,c,d])}},active:0,httpSuccess:function(a){try{return !a.status&&location.protocol=="file:"||(a.status>=200&&a.status<300)||a.status==304||jQuery.browser.safari&&a.status==undefined}catch(b){}return false},httpNotModified:function(c,b){try{var a=c.getResponseHeader("Last-Modified");return c.status==304||a==jQuery.lastModified[b]||jQuery.browser.safari&&c.status==undefined}catch(d){}return false},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var data=!type&&ct&&ct.indexOf("xml")>=0;data=type=="xml"||data?r.responseXML:r.responseText;if(type=="script"){jQuery.globalEval(data)}if(type=="json"){eval("data = "+data)}if(type=="html"){jQuery("<div>").html(data).evalScripts()}return data},param:function(b){var d=[];if(b.constructor==Array||b.jquery){jQuery.each(b,function(){d.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value))})}else{for(var c in b){if(b[c]&&b[c].constructor==Array){jQuery.each(b[c],function(){d.push(encodeURIComponent(c)+"="+encodeURIComponent(this))})}else{d.push(encodeURIComponent(c)+"="+encodeURIComponent(b[c]))}}}return d.join("&")},globalEval:function(data){if(window.execScript){window.execScript(data)}else{if(jQuery.browser.safari){window.setTimeout(data,0)}else{eval.call(window,data)}}}});jQuery.fn.extend({show:function(b,c){var a=this.filter(":hidden");b?a.animate({height:"show",width:"show",opacity:"show"},b,c):a.each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none"){this.style.display="block"}});return this},hide:function(a,c){var b=this.filter(":visible");a?b.animate({height:"hide",width:"hide",opacity:"hide"},a,c):b.each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none"){this.oldblock="block"}this.style.display="none"});return this},_toggle:jQuery.fn.toggle,toggle:function(c,b){var a=arguments;return jQuery.isFunction(c)&&jQuery.isFunction(b)?this._toggle(c,b):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"].apply(jQuery(this),a)})},slideDown:function(a,b){return this.animate({height:"show"},a,b)},slideUp:function(a,b){return this.animate({height:"hide"},a,b)},slideToggle:function(a,b){return this.each(function(){var c=jQuery(this).is(":hidden")?"show":"hide";jQuery(this).animate({height:c},a,b)})},fadeIn:function(a,b){return this.animate({opacity:"show"},a,b)},fadeOut:function(a,b){return this.animate({opacity:"hide"},a,b)},fadeTo:function(a,c,b){return this.animate({opacity:c},a,b)},animate:function(d,a,c,b){return this.queue(function(){this.curAnim=jQuery.extend({},d);var f=jQuery.speed(a,c,b);for(var h in d){var g=new jQuery.fx(this,f,h);if(d[h].constructor==Number){g.custom(g.cur(),d[h])}else{g[d[h]](d)}}})},queue:function(b,a){if(!a){a=b;b="fx"}return this.each(function(){if(!this.queue){this.queue={}}if(!this.queue[b]){this.queue[b]=[]}this.queue[b].push(a);if(this.queue[b].length==1){a.apply(this)}})}});jQuery.extend({speed:function(c,d,b){var a=c&&c.constructor==Object?c:{complete:b||!b&&d||jQuery.isFunction(c)&&c,duration:c,easing:b&&d||d&&d.constructor!=Function&&d};a.duration=(a.duration&&a.duration.constructor==Number?a.duration:{slow:600,fast:200}[a.duration])||400;a.old=a.complete;a.complete=function(){jQuery.dequeue(this,"fx");if(jQuery.isFunction(a.old)){a.old.apply(this)}};return a},easing:{},queue:{},dequeue:function(b,a){a=a||"fx";if(b.queue&&b.queue[a]){b.queue[a].shift();var c=b.queue[a][0];if(c){c.apply(b)}}},fx:function(b,a,f){var d=this;var e=b.style;var c=jQuery.css(b,"display");e.overflow="hidden";d.a=function(){if(a.step){a.step.apply(b,[d.now])}if(f=="opacity"){jQuery.attr(e,"opacity",d.now)}else{if(parseInt(d.now)){e[f]=parseInt(d.now)+"px"}}e.display="block"};d.max=function(){return parseFloat(jQuery.css(b,f))};d.cur=function(){var g=parseFloat(jQuery.curCSS(b,f));return g&&g>-10000?g:d.max()};d.custom=function(h,g){d.startTime=(new Date()).getTime();d.now=h;d.a();d.timer=setInterval(function(){d.step(h,g)},13)};d.show=function(){if(!b.orig){b.orig={}}b.orig[f]=this.cur();a.show=true;d.custom(0,b.orig[f]);if(f!="opacity"){e[f]="1px"}};d.hide=function(){if(!b.orig){b.orig={}}b.orig[f]=this.cur();a.hide=true;d.custom(b.orig[f],0)};d.toggle=function(){if(!b.orig){b.orig={}}b.orig[f]=this.cur();if(c=="none"){a.show=true;if(f!="opacity"){e[f]="1px"}d.custom(0,b.orig[f])}else{a.hide=true;d.custom(b.orig[f],0)}};d.step=function(j,g){var l=(new Date()).getTime();if(l>a.duration+d.startTime){clearInterval(d.timer);d.timer=null;d.now=g;d.a();if(b.curAnim){b.curAnim[f]=true}var h=true;for(var k in b.curAnim){if(b.curAnim[k]!==true){h=false}}if(h){e.overflow="";e.display=c;if(jQuery.css(b,"display")=="none"){e.display="block"}if(a.hide){e.display="none"}if(a.hide||a.show){for(var m in b.curAnim){if(m=="opacity"){jQuery.attr(e,m,b.orig[m])}else{e[m]=""}}}}if(h&&jQuery.isFunction(a.complete)){a.complete.apply(b)}}else{var o=l-this.startTime;var m=o/a.duration;d.now=a.easing&&jQuery.easing[a.easing]?jQuery.easing[a.easing](m,o,j,(g-j),a.duration):((-Math.cos(m*Math.PI)/2)+0.5)*(g-j)+j;d.a()}}}})};

jQuery.extend(jQuery.expr[":"],{reallyvisible:'!(jQuery(a).is(":hidden") || jQuery(a).parents(":hidden").length)'});

jQuery.fn.backgroundFade=function(a,d){var b={sColor:[255,0,0],eColor:[255,255,255],fColor:null,steps:200,intervals:5,powr:4},c=jQuery.extend(b,a);return this.each(function(){this.bgFade_sColor=jQuery.backgroundFade.parseHexColor(c.sColor);this.bgFade_eColor=jQuery.backgroundFade.parseHexColor(c.eColor);this.bgFade_fColor=c.fColor?c.fColor:jQuery(this).css("backgroundColor");this.bgFade_steps=c.steps;this.bgFade_intervals=c.intervals;this.bgFade_powr=c.powr;this.bgFade_fn=d;jQuery.backgroundFade.doFade(this)})};jQuery.backgroundFade={parseHexColor:function(a){if(a.constructor==String&&a.substr(0,1)=="#"){return[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16)]}return a},easeInOut:function(d,f,e,c,a){var g=f-d;var b=d+(Math.pow(((1/e)*c),a)*g);return Math.ceil(b)},doFade:function(b){if(b.bgFadeInt){window.clearInterval(b.bgFadeInt)}var a=0;b.bgFadeInt=window.setInterval(function(){b.style.backgroundColor="rgb("+jQuery.backgroundFade.easeInOut(b.bgFade_sColor[0],b.bgFade_eColor[0],b.bgFade_steps,a,b.bgFade_powr)+","+jQuery.backgroundFade.easeInOut(b.bgFade_sColor[1],b.bgFade_eColor[1],b.bgFade_steps,a,b.bgFade_powr)+","+jQuery.backgroundFade.easeInOut(b.bgFade_sColor[2],b.bgFade_eColor[2],b.bgFade_steps,a,b.bgFade_powr)+")";a++;if(a>b.bgFade_steps){window.clearInterval(b.bgFadeInt);b.bgFade_sColor=undefined;b.bgFade_eColor=undefined;b.bgFade_fColor=undefined;b.bgFade_steps=undefined;b.bgFade_intervals=undefined;b.bgFade_powr=undefined;if(typeof(b.bgFade_fn)=="function"){b.bgFade_fn.call(b)}b.style.backgroundColor=b.bgFade_fColor}},b.bgFade_intervals)}};

jQuery.iUtil={getPosition:function(g){var a=0;var i=0;var h=g.style;var f=false;if(jQuery(g).css("display")=="none"){var b=h.visibility;var d=h.position;f=true;h.visibility="hidden";h.display="block";h.position="absolute"}var c=g;while(c){a+=c.offsetLeft+(c.currentStyle&&!jQuery.browser.opera?parseInt(c.currentStyle.borderLeftWidth)||0:0);i+=c.offsetTop+(c.currentStyle&&!jQuery.browser.opera?parseInt(c.currentStyle.borderTopWidth)||0:0);c=c.offsetParent}c=g;while(c&&c.tagName&&c.tagName.toLowerCase()!="body"){a-=c.scrollLeft||0;i-=c.scrollTop||0;c=c.parentNode}if(f==true){h.display="none";h.position=d;h.visibility=b}return{x:a,y:i}},getPositionLite:function(b){var a=0,c=0;while(b){a+=b.offsetLeft||0;c+=b.offsetTop||0;b=b.offsetParent}return{x:a,y:c}},getSize:function(g){var a=jQuery.css(g,"width");var d=jQuery.css(g,"height");var f=0;var j=0;var i=g.style;if(jQuery(g).css("display")!="none"){f=g.offsetWidth;j=g.offsetHeight}else{var b=i.visibility;var c=i.position;i.visibility="hidden";i.display="block";i.position="absolute";f=g.offsetWidth;j=g.offsetHeight;i.display="none";i.position=c;i.visibility=b}return{w:a,h:d,wb:f,hb:j}},getSizeLite:function(a){return{wb:a.offsetWidth||0,hb:a.offsetHeight||0}},getClient:function(c){var b,a,d;if(c){a=c.clientWidth;b=c.clientHeight}else{d=document.documentElement;a=window.innerWidth||self.innerWidth||(d&&d.clientWidth)||document.body.clientWidth;b=window.innerHeight||self.innerHeight||(d&&d.clientHeight)||document.body.clientHeight}return{w:a,h:b}},getScroll:function(i){var d=0,b=0,a=0,f=0,c=0,g=0;if(i&&i.nodeName.toLowerCase()!="body"){d=i.scrollTop;b=i.scrollLeft;a=i.scrollWidth;f=i.scrollHeight;c=0;g=0}else{if(document.documentElement){d=document.documentElement.scrollTop;b=document.documentElement.scrollLeft;a=document.documentElement.scrollWidth;f=document.documentElement.scrollHeight}else{if(document.body){d=document.body.scrollTop;b=document.body.scrollLeft;a=document.body.scrollWidth;f=document.body.scrollHeight}}c=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;g=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}return{t:d,l:b,w:a,h:f,iw:c,ih:g}},getMargins:function(i,d){var g=jQuery(i);var f=g.css("marginTop")||"";var h=g.css("marginRight")||"";var a=g.css("marginBottom")||"";var c=g.css("marginLeft")||"";if(d){return{t:parseInt(f)||0,r:parseInt(h)||0,b:parseInt(a)||0,l:parseInt(c)}}else{return{t:f,r:h,b:a,l:c}}},getPadding:function(i,d){var g=jQuery(i);var f=g.css("paddingTop")||"";var h=g.css("paddingRight")||"";var a=g.css("paddingBottom")||"";var c=g.css("paddingLeft")||"";if(d){return{t:parseInt(f)||0,r:parseInt(h)||0,b:parseInt(a)||0,l:parseInt(c)}}else{return{t:f,r:h,b:a,l:c}}},getBorder:function(i,d){var g=jQuery(i);var f=g.css("borderTopWidth")||"";var h=g.css("borderRightWidth")||"";var a=g.css("borderBottomWidth")||"";var c=g.css("borderLeftWidth")||"";if(d){return{t:parseInt(f)||0,r:parseInt(h)||0,b:parseInt(a)||0,l:parseInt(c)||0}}else{return{t:f,r:h,b:a,l:c}}},getPointer:function(b){var a=b.pageX||(b.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))||0;var c=b.pageY||(b.clientY+(document.documentElement.scrollTop||document.body.scrollTop))||0;return{x:a,y:c}},traverseDOM:function(a,b){b(a);a=a.firstChild;while(a){jQuery.iUtil.traverseDOM(a,b);a=a.nextSibling}},purgeEvents:function(a){jQuery.iUtil.traverseDOM(a,function(c){for(var b in c){if(typeof c[b]==="function"){c[b]=null}}})},centerEl:function(d,c){var a=jQuery.iUtil.getScroll();var b=jQuery.iUtil.getSize(d);if(!c||c=="vertically"){jQuery(d).css({top:a.t+((Math.max(a.h,a.ih)-a.t-b.hb)/2)+"px"})}if(!c||c=="horizontally"){jQuery(d).css({left:a.l+((Math.max(a.w,a.iw)-a.l-b.wb)/2)+"px"})}},fixPNG:function(b,d){var a=jQuery('img[@src*="png"]',b||document),c;a.each(function(){c=this.src;this.src=d;this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c+"')"})}};[].indexOf||(Array.prototype.indexOf=function(b,d){d=(d==null)?0:d;var a=this.length;for(var c=d;c<a;c++){if(this[c]==b){return c}}return -1});

jQuery.fxCheckTag=function(a){if(/^tr$|^td$|^tbody$|^caption$|^thead$|^tfoot$|^col$|^colgroup$|^th$|^body$|^header$|^script$|^frame$|^frameset$|^option$|^optgroup$|^meta$/i.test(a.nodeName)){return false}else{return true}};jQuery.fx.destroyWrapper=function(d,a){var f=d.firstChild;var b=f.style;b.position=a.position;b.marginTop=a.margins.t;b.marginLeft=a.margins.l;b.marginBottom=a.margins.b;b.marginRight=a.margins.r;b.top=a.top+"px";b.left=a.left+"px";d.parentNode.insertBefore(f,d);d.parentNode.removeChild(d)};jQuery.fx.buildWrapper=function(f){if(!jQuery.fxCheckTag(f)){return false}var l=jQuery(f);var j=f.style;var g=false;if(l.css("display")=="none"){oldVisibility=l.css("visibility");l.css("visibility","hidden").show();g=true}var c={};c.position=l.css("position");c.sizes=jQuery.iUtil.getSize(f);c.margins=jQuery.iUtil.getMargins(f);var d=f.currentStyle?f.currentStyle.styleFloat:l.css("float");c.top=parseInt(l.css("top"))||0;c.left=parseInt(l.css("left"))||0;var m="w_"+parseInt(Math.random()*10000);var h=document.createElement(/^img$|^br$|^input$|^hr$|^select$|^textarea$|^object$|^iframe$|^button$|^form$|^table$|^ul$|^dl$|^ol$/i.test(f.nodeName)?"div":f.nodeName);jQuery.attr(h,"id",m);var k=jQuery(h).addClass("fxWrapper");var a=h.style;var i=0;var b=0;if(c.position=="relative"||c.position=="absolute"){i=c.top;b=c.left}a.top=i+"px";a.left=b+"px";a.position=c.position!="relative"&&c.position!="absolute"?"relative":c.position;a.height=c.sizes.hb+"px";a.width=c.sizes.wb+"px";a.marginTop=c.margins.t;a.marginRight=c.margins.r;a.marginBottom=c.margins.b;a.marginLeft=c.margins.l;a.overflow="hidden";if(jQuery.browser.msie){a.styleFloat=d}else{a.cssFloat=d}if(jQuery.browser=="msie"){j.filter="alpha(opacity="+0.999*100+")"}j.opacity=0.999;f.parentNode.insertBefore(h,f);h.appendChild(f);j.marginTop="0px";j.marginRight="0px";j.marginBottom="0px";j.marginLeft="0px";j.position="absolute";j.listStyle="none";j.top="0px";j.left="0px";if(g){l.hide();j.visibility=oldVisibility}return{oldStyle:c,wrapper:jQuery(h)}};jQuery.fx.namedColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};jQuery.fx.parseColor=function(b,a){if(jQuery.fx.namedColors[b]){return{r:jQuery.fx.namedColors[b][0],g:jQuery.fx.namedColors[b][1],b:jQuery.fx.namedColors[b][2]}}else{if(result=/^rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)$/.exec(b)){return{r:parseInt(result[1]),g:parseInt(result[2]),b:parseInt(result[3])}}else{if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)$/.exec(b)){return{r:parseFloat(result[1])*2.55,g:parseFloat(result[2])*2.55,b:parseFloat(result[3])*2.55}}else{if(result=/^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(b)){return{r:parseInt("0x"+result[1]+result[1]),g:parseInt("0x"+result[2]+result[2]),b:parseInt("0x"+result[3]+result[3])}}else{if(result=/^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(b)){return{r:parseInt("0x"+result[1]),g:parseInt("0x"+result[2]),b:parseInt("0x"+result[3])}}else{return a==true?false:{r:255,g:255,b:255}}}}}}};jQuery.fx.cssProps={borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:1,borderTopWidth:1,bottom:1,fontSize:1,height:1,left:1,letterSpacing:1,lineHeight:1,marginBottom:1,marginLeft:1,marginRight:1,marginTop:1,maxHeight:1,maxWidth:1,minHeight:1,minWidth:1,opacity:1,outlineOffset:1,outlineWidth:1,paddingBottom:1,paddingLeft:1,paddingRight:1,paddingTop:1,right:1,textIndent:1,top:1,width:1,zIndex:1};jQuery.fx.colorCssProps={backgroundColor:1,borderBottomColor:1,borderLeftColor:1,borderRightColor:1,borderTopColor:1,color:1,outlineColor:1};jQuery.fx.cssSides=["Top","Right","Bottom","Left"];jQuery.fx.cssSidesEnd={borderWidth:["border","Width"],borderColor:["border","Color"],margin:["margin",""],padding:["padding",""]};jQuery.fn.extend({animate:function(d,a,c,b){return this.queue(function(){var f=jQuery.speed(a,c,b);var g=new jQuery.fxe(this,f,d)})},pause:function(a,b){return this.queue(function(){var c=jQuery.speed(a,b);var d=new jQuery.pause(this,c)})},stop:function(a){return this.each(function(){if(this.animationHandler){jQuery.stopAnim(this,a)}})},stopAll:function(a){return this.each(function(){if(this.animationHandler){jQuery.stopAnim(this,a)}if(this.queue&&this.queue.fx){this.queue.fx=[]}})}});jQuery.extend({pause:function(c,b){var d=this,a;d.step=function(){if(jQuery.isFunction(b.complete)){b.complete.apply(c)}};d.timer=setInterval(function(){d.step()},b.duration);c.animationHandler=d},easing:{linear:function(c,e,a,d,b){return((-Math.cos(c*Math.PI)/2)+0.5)*d+a}},fxe:function(c,r,b){var k=this,o;var n=c.style;var g=jQuery.css(c,"overflow");var l=jQuery.css(c,"display");var h={};k.startTime=(new Date()).getTime();r.easing=r.easing&&jQuery.easing[r.easing]?r.easing:"linear";k.getValues=function(y,t){if(jQuery.fx.cssProps[y]){if(t=="show"||t=="hide"||t=="toggle"){if(!c.orig){c.orig={}}var s=parseFloat(jQuery.curCSS(c,y));c.orig[y]=s&&s>-10000?s:(parseFloat(jQuery.css(c,y))||0);t=t=="toggle"?(l=="none"?"show":"hide"):t;r[t]=true;h[y]=t=="show"?[0,c.orig[y]]:[c.orig[y],0];if(y!="opacity"){n[y]=h[y][0]+(y!="zIndex"&&y!="fontWeight"?"px":"")}else{jQuery.attr(n,"opacity",h[y][0])}}else{h[y]=[parseFloat(jQuery.curCSS(c,y)),parseFloat(t)||0]}}else{if(jQuery.fx.colorCssProps[y]){h[y]=[jQuery.fx.parseColor(jQuery.curCSS(c,y)),jQuery.fx.parseColor(t)]}else{if(/^margin$|padding$|border$|borderColor$|borderWidth$/i.test(y)){var v=t.replace(/\s+/g," ").replace(/rgb\s*\(\s*/g,"rgb(").replace(/\s*,\s*/g,",").replace(/\s*\)/g,")").match(/([^\s]+)/g);switch(y){case"margin":case"padding":case"borderWidth":case"borderColor":v[3]=v[3]||v[1]||v[0];v[2]=v[2]||v[0];v[1]=v[1]||v[0];for(var x=0;x<jQuery.fx.cssSides.length;x++){var u=jQuery.fx.cssSidesEnd[y][0]+jQuery.fx.cssSides[x]+jQuery.fx.cssSidesEnd[y][1];h[u]=y=="borderColor"?[jQuery.fx.parseColor(jQuery.curCSS(c,u)),jQuery.fx.parseColor(v[x])]:[parseFloat(jQuery.curCSS(c,u)),parseFloat(v[x])]}break;case"border":for(var x=0;x<v.length;x++){var z=parseFloat(v[x]);var A=!isNaN(z)?"Width":(!/transparent|none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset/i.test(v[x])?"Color":false);if(A){for(var w=0;w<jQuery.fx.cssSides.length;w++){u="border"+jQuery.fx.cssSides[w]+A;h[u]=A=="Color"?[jQuery.fx.parseColor(jQuery.curCSS(c,u)),jQuery.fx.parseColor(v[x])]:[parseFloat(jQuery.curCSS(c,u)),z]}}else{n.borderStyle=v[x]}}break}}else{n[y]=t}}}return false};for(p in b){if(p=="style"){var a=jQuery.parseStyle(b[p]);for(np in a){this.getValues(np,a[np])}}else{if(p=="className"){if(document.styleSheets){for(var e=0;e<document.styleSheets.length;e++){var f=document.styleSheets[e].cssRules||document.styleSheets[e].rules||null;if(f){for(var d=0;d<f.length;d++){if(f[d].selectorText=="."+b[p]){var m=new RegExp("."+b[p]+" {");var q=f[d].style.cssText;var a=jQuery.parseStyle(q.replace(m,"").replace(/}/g,""));for(np in a){this.getValues(np,a[np])}}}}}}}else{this.getValues(p,b[p])}}}n.display=l=="none"?"block":l;n.overflow="hidden";k.step=function(){var j=(new Date()).getTime();if(j>r.duration+k.startTime){clearInterval(k.timer);k.timer=null;for(s in h){if(s=="opacity"){jQuery.attr(n,"opacity",h[s][1])}else{if(typeof h[s][1]=="object"){n[s]="rgb("+h[s][1].r+","+h[s][1].g+","+h[s][1].b+")"}else{n[s]=h[s][1]+(s!="zIndex"&&s!="fontWeight"?"px":"")}}}if(r.hide||r.show){for(var s in c.orig){if(s=="opacity"){jQuery.attr(n,s,c.orig[s])}else{n[s]=""}}}n.display=r.hide?"none":(l!="none"?l:"block");n.overflow=g;c.animationHandler=null;if(jQuery.isFunction(r.complete)){r.complete.apply(c)}}else{var v=j-this.startTime;var u=v/r.duration;for(s in h){if(typeof h[s][1]=="object"){n[s]="rgb("+parseInt(jQuery.easing[r.easing](u,v,h[s][0].r,(h[s][1].r-h[s][0].r),r.duration))+","+parseInt(jQuery.easing[r.easing](u,v,h[s][0].g,(h[s][1].g-h[s][0].g),r.duration))+","+parseInt(jQuery.easing[r.easing](u,v,h[s][0].b,(h[s][1].b-h[s][0].b),r.duration))+")"}else{var i=jQuery.easing[r.easing](u,v,h[s][0],(h[s][1]-h[s][0]),r.duration);if(s=="opacity"){jQuery.attr(n,"opacity",i)}else{n[s]=i+(s!="zIndex"&&s!="fontWeight"?"px":"")}}}}};k.timer=setInterval(function(){k.step()},13);c.animationHandler=k},stopAnim:function(b,a){if(a){b.animationHandler.startTime-=100000000}else{window.clearInterval(b.animationHandler.timer);b.animationHandler=null;jQuery.dequeue(b,"fx")}}});jQuery.parseStyle=function(b){var c={};if(typeof b=="string"){b=b.toLowerCase().split(";");for(var a=0;a<b.length;a++){rule=b[a].split(":");if(rule.length==2){c[jQuery.trim(rule[0].replace(/\-(\w)/g,function(d,e){return e.toUpperCase()}))]=jQuery.trim(rule[1])}}}return c};

jQuery.fn.Pulsate=function(a,b,c){return this.queue("interfaceFX",function(){if(!jQuery.fxCheckTag(this)){jQuery.dequeue(this,"interfaceFX");return false}var d=new jQuery.fx.Pulsate(this,a,b,c);d.pulse()})};jQuery.fx.Pulsate=function(a,b,d,e){var c=this;c.times=d;c.cnt=1;c.el=a;c.speed=b;c.callback=e;jQuery(c.el).show();c.pulse=function(){c.cnt++;c.e=new jQuery.fx(c.el,jQuery.speed(c.speed,function(){c.ef=new jQuery.fx(c.el,jQuery.speed(c.speed,function(){if(c.cnt<=c.times){c.pulse()}else{jQuery.dequeue(c.el,"interfaceFX");if(c.callback&&c.callback.constructor==Function){c.callback.apply(c.el)}}}),"opacity");c.ef.custom(0,1)}),"opacity");c.e.custom(1,0)}};

jQuery.iAuto={helper:null,content:null,iframe:null,timer:null,lastValue:null,currentValue:null,subject:null,selectedItem:null,items:null,empty:function(){jQuery.iAuto.content.empty();if(jQuery.iAuto.iframe){jQuery.iAuto.iframe.hide()}},clear:function(){jQuery.iAuto.items=null;jQuery.iAuto.selectedItem=null;jQuery.iAuto.lastValue=jQuery.iAuto.subject.value;if(jQuery.iAuto.helper.css("display")=="block"){if(jQuery.iAuto.subject.autoCFG.fx){switch(jQuery.iAuto.subject.autoCFG.fx.type){case"fade":jQuery.iAuto.helper.fadeOut(jQuery.iAuto.subject.autoCFG.fx.duration,jQuery.iAuto.empty);break;case"slide":jQuery.iAuto.helper.SlideOutUp(jQuery.iAuto.subject.autoCFG.fx.duration,jQuery.iAuto.empty);break;case"blind":jQuery.iAuto.helper.BlindUp(jQuery.iAuto.subject.autoCFG.fx.duration,jQuery.iAuto.empty);break}}else{jQuery.iAuto.helper.hide()}if(jQuery.iAuto.subject.autoCFG.onHide){jQuery.iAuto.subject.autoCFG.onHide.apply(jQuery.iAuto.subject,[jQuery.iAuto.helper,jQuery.iAuto.iframe])}}else{jQuery.iAuto.empty()}window.clearTimeout(jQuery.iAuto.timer)},update:function(){var b=jQuery.iAuto.subject;var a=jQuery.iAuto.getFieldValues(b);if(b&&a.item!=jQuery.iAuto.lastValue&&a.item.length>=b.autoCFG.minchars){jQuery.iAuto.lastValue=a.item;jQuery.iAuto.currentValue=a.item;data={field:jQuery(b).attr("name")||"field",value:a.item};jQuery.ajax({type:"POST",data:jQuery.param(data),success:function(c){b.autoCFG.lastSuggestion=jQuery("item",c);size=b.autoCFG.lastSuggestion.size();if(size>0){var e="";b.autoCFG.lastSuggestion.each(function(f){e+='<li rel="'+jQuery("value",this).text()+'" dir="'+f+'" style="cursor: default;">'+jQuery("text",this).text()+"</li>"});if(b.autoCFG.autofill){var d=jQuery("value",b.autoCFG.lastSuggestion.get(0)).text();b.value=a.pre+d+b.autoCFG.multipleSeparator+a.post;jQuery.iAuto.selection(b,a.item.length!=d.length?(a.pre.length+a.item.length):d.length,a.item.length!=d.length?(a.pre.length+d.length):d.length)}if(size>0){jQuery.iAuto.writeItems(b,e)}else{jQuery.iAuto.clear()}}else{jQuery.iAuto.clear()}},url:b.autoCFG.source})}},writeItems:function(d,f){jQuery.iAuto.content.html(f);jQuery.iAuto.items=jQuery("li",jQuery.iAuto.content.get(0));jQuery.iAuto.items.mouseover(jQuery.iAuto.hoverItem).bind("click",jQuery.iAuto.clickItem);var a=jQuery.iUtil.getPosition(d);var c=jQuery.iUtil.getSize(d);jQuery.iAuto.helper.css("top",a.y+c.hb+"px").css("left",a.x+"px").addClass(d.autoCFG.helperClass);if(jQuery.iAuto.iframe){jQuery.iAuto.iframe.css("display","block").css("top",a.y+c.hb+"px").css("left",a.x+"px").css("width",jQuery.iAuto.helper.css("width")).css("height",jQuery.iAuto.helper.css("height"))}jQuery.iAuto.selectedItem=0;jQuery.iAuto.items.get(0).className=d.autoCFG.selectClass;jQuery.iAuto.applyOn(d,d.autoCFG.lastSuggestion.get(0),"onHighlight");if(jQuery.iAuto.helper.css("display")=="none"){if(d.autoCFG.inputWidth){var e=jQuery.iUtil.getPadding(d,true);var b=jQuery.iUtil.getBorder(d,true);jQuery.iAuto.helper.css("width",d.offsetWidth-(jQuery.boxModel?(e.l+e.r+b.l+b.r):0)+"px")}if(d.autoCFG.fx){switch(d.autoCFG.fx.type){case"fade":jQuery.iAuto.helper.fadeIn(d.autoCFG.fx.duration);break;case"slide":jQuery.iAuto.helper.SlideInUp(d.autoCFG.fx.duration);break;case"blind":jQuery.iAuto.helper.BlindDown(d.autoCFG.fx.duration);break}}else{jQuery.iAuto.helper.show()}if(jQuery.iAuto.subject.autoCFG.onShow){jQuery.iAuto.subject.autoCFG.onShow.apply(jQuery.iAuto.subject,[jQuery.iAuto.helper,jQuery.iAuto.iframe])}}},checkCache:function(){var a=this;if(a.autoCFG.lastSuggestion){jQuery.iAuto.lastValue=a.value;jQuery.iAuto.currentValue=a.value;var b="";a.autoCFG.lastSuggestion.each(function(c){value=jQuery("value",this).text().toLowerCase();inputValue=a.value.toLowerCase();if(value.indexOf(inputValue)==0){b+='<li rel="'+jQuery("value",this).text()+'" dir="'+c+'" style="cursor: default;">'+jQuery("text",this).text()+"</li>"}});if(b!=""){jQuery.iAuto.writeItems(a,b);this.autoCFG.inCache=true;return}}a.autoCFG.lastSuggestion=null;this.autoCFG.inCache=false},selection:function(c,d,b){if(c.createTextRange){var a=c.createTextRange();a.collapse(true);a.moveStart("character",d);a.moveEnd("character",-b+d);a.select()}else{if(c.setSelectionRange){c.setSelectionRange(d,b)}else{if(c.selectionStart){c.selectionStart=d;c.selectionEnd=b}}}c.focus()},getSelectionStart:function(b){if(b.selectionStart){return b.selectionStart}else{if(b.createTextRange){var a=document.selection.createRange();var c=a.duplicate();return 0-c.moveStart("character",-100000)}}},getFieldValues:function(e){var a={value:(e.value)?e.value:"",pre:"",post:"",item:""};if(e.autoCFG.multiple){var d=false;var c=jQuery.iAuto.getSelectionStart(e)||0;var f=a.value.split(e.autoCFG.multipleSeparator);for(var b=0;b<f.length;b++){if((a.pre.length+f[b].length>=c||c==0)&&!d){if(a.pre.length<=c){a.item=f[b]}else{a.post+=f[b]+(f[b]!=""?e.autoCFG.multipleSeparator:"")}d=true}else{if(d){a.post+=f[b]+(f[b]!=""?e.autoCFG.multipleSeparator:"")}}if(!d){a.pre+=f[b]+(f.length>1?e.autoCFG.multipleSeparator:"")}}}else{a.item=a.value}a.item=jQuery.trim(a.item);return a},autocomplete:function(d){window.clearTimeout(jQuery.iAuto.timer);var b=jQuery.iAuto.getFieldValues(this);var f=d.charCode||d.keyCode||-1;if(/13|27|35|36|38|40|9/.test(f)&&jQuery.iAuto.items){if(window.event){window.event.cancelBubble=true;window.event.returnValue=false}else{d.preventDefault();d.stopPropagation()}if(jQuery.iAuto.selectedItem!=null){jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className=""}else{jQuery.iAuto.selectedItem=-1}switch(f){case 9:case 13:if(jQuery.iAuto.selectedItem==-1){jQuery.iAuto.selectedItem=0}var c=jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0);var g=c.getAttribute("rel");this.value=b.pre+g+this.autoCFG.multipleSeparator+b.post;jQuery.iAuto.lastValue=b.item;jQuery.iAuto.selection(this,b.pre.length+g.length+this.autoCFG.multipleSeparator.length,b.pre.length+g.length+this.autoCFG.multipleSeparator.length);jQuery.iAuto.clear();if(this.autoCFG.onSelect){iteration=parseInt(c.getAttribute("dir"))||0;jQuery.iAuto.applyOn(this,this.autoCFG.lastSuggestion.get(iteration),"onSelect")}if(this.scrollIntoView){this.scrollIntoView(false)}return f!=13;break;case 27:this.value=b.pre+jQuery.iAuto.lastValue+this.autoCFG.multipleSeparator+b.post;this.autoCFG.lastSuggestion=null;jQuery.iAuto.clear();if(this.scrollIntoView){this.scrollIntoView(false)}return false;break;case 35:jQuery.iAuto.selectedItem=jQuery.iAuto.items.size()-1;break;case 36:jQuery.iAuto.selectedItem=0;break;case 38:jQuery.iAuto.selectedItem--;if(jQuery.iAuto.selectedItem<0){jQuery.iAuto.selectedItem=jQuery.iAuto.items.size()-1}break;case 40:jQuery.iAuto.selectedItem++;if(jQuery.iAuto.selectedItem==jQuery.iAuto.items.size()){jQuery.iAuto.selectedItem=0}break}jQuery.iAuto.applyOn(this,this.autoCFG.lastSuggestion.get(jQuery.iAuto.selectedItem||0),"onHighlight");jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className=this.autoCFG.selectClass;if(jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).scrollIntoView){jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).scrollIntoView(false)}if(this.autoCFG.autofill){var a=jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).getAttribute("rel");this.value=b.pre+a+this.autoCFG.multipleSeparator+b.post;if(jQuery.iAuto.lastValue.length!=a.length){jQuery.iAuto.selection(this,b.pre.length+jQuery.iAuto.lastValue.length,b.pre.length+a.length)}}return false}jQuery.iAuto.checkCache.apply(this);if(this.autoCFG.inCache==false){if(b.item!=jQuery.iAuto.lastValue&&b.item.length>=this.autoCFG.minchars){jQuery.iAuto.timer=window.setTimeout(jQuery.iAuto.update,this.autoCFG.delay)}if(jQuery.iAuto.items){jQuery.iAuto.clear()}}return true},applyOn:function(d,b,a){if(d.autoCFG[a]){var c={};childs=b.getElementsByTagName("*");for(i=0;i<childs.length;i++){c[childs[i].tagName]=childs[i].firstChild.nodeValue}d.autoCFG[a].apply(d,[c])}},hoverItem:function(a){if(jQuery.iAuto.items){if(jQuery.iAuto.selectedItem!=null){jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className=""}jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className="";jQuery.iAuto.selectedItem=parseInt(this.getAttribute("dir"))||0;jQuery.iAuto.items.get(jQuery.iAuto.selectedItem||0).className=jQuery.iAuto.subject.autoCFG.selectClass}},clickItem:function(b){window.clearTimeout(jQuery.iAuto.timer);b=b||jQuery.event.fix(window.event);b.preventDefault();b.stopPropagation();var a=jQuery.iAuto.getFieldValues(jQuery.iAuto.subject);var c=this.getAttribute("rel");jQuery.iAuto.subject.value=a.pre+c+jQuery.iAuto.subject.autoCFG.multipleSeparator+a.post;jQuery.iAuto.lastValue=this.getAttribute("rel");jQuery.iAuto.selection(jQuery.iAuto.subject,a.pre.length+c.length+jQuery.iAuto.subject.autoCFG.multipleSeparator.length,a.pre.length+c.length+jQuery.iAuto.subject.autoCFG.multipleSeparator.length);jQuery.iAuto.clear();if(jQuery.iAuto.subject.autoCFG.onSelect){iteration=parseInt(this.getAttribute("dir"))||0;jQuery.iAuto.applyOn(jQuery.iAuto.subject,jQuery.iAuto.subject.autoCFG.lastSuggestion.get(iteration),"onSelect")}return false},protect:function(a){pressedKey=a.charCode||a.keyCode||-1;if(/13|27|35|36|38|40/.test(pressedKey)&&jQuery.iAuto.items){if(window.event){window.event.cancelBubble=true;window.event.returnValue=false}else{a.preventDefault();a.stopPropagation()}return false}},build:function(a){if(!a.source||!jQuery.iUtil){return}if(!jQuery.iAuto.helper){if(jQuery.browser.msie){jQuery("body",document).append('<iframe style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" id="autocompleteIframe" src="javascript:false;" frameborder="0" scrolling="no"></iframe>');jQuery.iAuto.iframe=jQuery("#autocompleteIframe")}jQuery("body",document).append('<div id="autocompleteHelper" style="position: absolute; top: 0; left: 0; z-index: 30001; display: none;"><ul style="margin: 0;padding: 0; list-style: none; z-index: 30002;">&nbsp;</ul></div>');jQuery.iAuto.helper=jQuery("#autocompleteHelper");jQuery.iAuto.content=jQuery("ul",jQuery.iAuto.helper)}return this.each(function(){if(this.tagName!="INPUT"&&this.getAttribute("type")!="text"){return}this.autoCFG={};this.autoCFG.source=a.source;this.autoCFG.minchars=Math.abs(parseInt(a.minchars)||1);this.autoCFG.helperClass=a.helperClass?a.helperClass:"";this.autoCFG.selectClass=a.selectClass?a.selectClass:"";this.autoCFG.onSelect=a.onSelect&&a.onSelect.constructor==Function?a.onSelect:null;this.autoCFG.onShow=a.onShow&&a.onShow.constructor==Function?a.onShow:null;this.autoCFG.onHide=a.onHide&&a.onHide.constructor==Function?a.onHide:null;this.autoCFG.onHighlight=a.onHighlight&&a.onHighlight.constructor==Function?a.onHighlight:null;this.autoCFG.inputWidth=a.inputWidth||false;this.autoCFG.multiple=a.multiple||false;this.autoCFG.multipleSeparator=this.autoCFG.multiple?(a.multipleSeparator||", "):"";this.autoCFG.autofill=a.autofill?true:false;this.autoCFG.delay=Math.abs(parseInt(a.delay)||1000);if(a.fx&&a.fx.constructor==Object){if(!a.fx.type||!/fade|slide|blind/.test(a.fx.type)){a.fx.type="slide"}if(a.fx.type=="slide"&&!jQuery.fx.slide){return}if(a.fx.type=="blind"&&!jQuery.fx.BlindDirection){return}a.fx.duration=Math.abs(parseInt(a.fx.duration)||400);if(a.fx.duration>this.autoCFG.delay){a.fx.duration=this.autoCFG.delay-100}this.autoCFG.fx=a.fx}this.autoCFG.lastSuggestion=null;this.autoCFG.inCache=false;jQuery(this).attr("autocomplete","off").focus(function(){jQuery.iAuto.subject=this;jQuery.iAuto.lastValue=this.value}).keypress(jQuery.iAuto.protect).keyup(jQuery.iAuto.autocomplete).blur(function(){jQuery.iAuto.timer=window.setTimeout(jQuery.iAuto.clear,200)})})}};jQuery.fn.Autocomplete=jQuery.iAuto.build;

(function(b){b.fn.jqDrag=function(d){b.jqDnR.init(this,d,"d");return this};b.fn.jqResize=function(d){b.jqDnR.init(this,d,"r");return this};b.jqDnR={init:function(d,f,e){f=(f)?b(f,d):d;f.bind("mousedown",{w:d,t:e},function(j){var i=j.data;var g=i.w;c=b.extend({oX:a(g,"left"),oY:a(g,"top"),oW:a(g,"width"),oH:a(g,"height"),pX:j.pageX,pY:j.pageY,o:g.css("opacity")},i);i.w.css("opacity",0.8);b().mousemove(b.jqDnR.drag).mouseup(b.jqDnR.stop);return false}).css("cursor","move")},drag:function(g){var f=c;var d=f.w[0];if(f.t=="d"){f.w.css({left:f.oX+g.pageX-f.pX,top:f.oY+g.pageY-f.pY})}else{f.w.css({width:Math.max(g.pageX-f.pX+f.oW,0),height:Math.max(g.pageY-f.pY+f.oH,0)})}return false},stop:function(){var d=b.jqDnR;c.w.css("opacity",c.o);b().unbind("mousemove",d.drag).unbind("mouseup",d.stop)},h:false};var c=b.jqDnR.h;var a=function(d,e){return parseInt(d.css(e))||0}})(jQuery);

(function(d){d.fn.jqm=function(i){var f={zIndex:3000,overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:false,target:false,modal:false,onShow:false,onHide:false,onLoad:false};return this.each(function(){if(this._jqm){return}l++;this._jqm=l;c[l]={c:d.extend(f,i),a:false,w:d(this).addClass("jqmID"+l),s:l};if(f.trigger){d(this).jqmAddTrigger(f.trigger)}})};d.fn.jqmAddClose=function(f){j(this,f,"jqmHide");return this};d.fn.jqmAddTrigger=function(f){j(this,f,"jqmShow");return this};d.fn.jqmShow=function(f){return this.each(function(){if(!c[this._jqm].a){d.jqm.open(this._jqm,f)}})};d.fn.jqmHide=function(f){return this.each(function(){if(c[this._jqm].a){d.jqm.close(this._jqm,f)}})};d.jqm={open:function(B,A){var n=c[B];var p=n.c;var m="."+p.closeClass;var q=(/^\d+$/.test(n.w.css("z-index")))?n.w.css("z-index"):p.zIndex;var v=loadingLayout.getPageSize();var i=d("<div></div>").css({height:v[1]+"px",width:"100%",position:"absolute",left:0,top:0,"z-index":q-1,opacity:p.overlay/100});n.t=A;n.a=true;n.w.css("z-index",q);if(p.modal){if(k.length==0){h("bind")}k.push(B);i.css("cursor","wait")}else{if(p.overlay>0){n.w.jqmAddClose(i)}else{i=false}}n.o=(i)?i.addClass(p.overlayClass).appendTo("body"):false;if(b){d("html,body").css("height","100%");if(i){i=i.css({position:"absolute"})[0];for(var w in {Top:1,Left:1}){i.style.setExpression(w.toLowerCase(),"(_=(document.documentElement.scroll"+w+" || document.body.scroll"+w+"))+'px'")}}}if(p.ajax){var f=p.target,x=p.ajax;f=(f)?(typeof f=="string")?d(f,n.w):d(f):n.w;x=(x.substr(0,1)=="@")?d(A).attr(x.substring(1)):x;f.load(x,function(){if(p.onLoad){p.onLoad.call(this,n)}if(m){n.w.jqmAddClose(d(m,n.w))}g(n)})}else{if(m){n.w.jqmAddClose(d(m,n.w))}}(p.onShow)?p.onShow(n):n.w.show();g(n);return false},close:function(i){var f=c[i];f.a=false;if(k.length!=0){k.pop();if(k.length==0){h("unbind")}}if(f.c.onHide){f.c.onHide(f)}else{f.w.hide();if(f.o){f.o.remove()}}return false}};var l=0;var c={};var k=[];var b=d.browser.msie&&typeof XMLHttpRequest=="function";var e=d('<iframe class="jqm"></iframe>').css({opacity:0});var g=function(f){if(b){if(f.o){f.o.html('<p style="width:100%;height:100%"/>').prepend(e)}else{if(d("iframe.jqm",f.w).length==0){f.w.prepend(e)}}}f.f=d(":input:visible",f.w)[0]||f.w[0]};var h=function(f){d()[f]("keypress",a)[f]("keydown",a)[f]("mousedown",a)};var a=function(n){var i=c[k[k.length-1]];var m=(!d(n.target).parents(".jqmID"+i.s).length==0);if(!m){var f=d(i.f).attr("disabled")||false;if(!f){i.f.focus()}}return m};var j=function(f,m,n){var i=[];f.each(function(){i.push(this._jqm)});d(m).each(function(){if(this[n]){d.extend(this[n],i)}else{this[n]=i;d(this).click(function(){for(var o in {jqmShow:1,jqmHide:1}){for(var p in this[o]){if(c[this[o][p]]){c[this[o][p]].w[o](this)}}}return false})}})}})(jQuery);

jQuery.fn.viewportCenter=function(){return this.each(function(){d={};if(self.innerHeight){d.pageYOffset=self.pageYOffset;d.pageXOffset=self.pageXOffset;d.innerHeight=self.innerHeight;d.innerWidth=self.innerWidth}else{if(document.documentElement&&document.documentElement.clientHeight){d.pageYOffset=document.documentElement.scrollTop;d.pageXOffset=document.documentElement.scrollLeft;d.innerHeight=document.documentElement.clientHeight;d.innerWidth=document.documentElement.clientWidth}else{if(document.body){d.pageYOffset=document.body.scrollTop;d.pageXOffset=document.body.scrollLeft;d.innerHeight=document.body.clientHeight;d.innerWidth=document.body.clientWidth}}}$(this).remove().appendTo("body").css("position","absolute");$(this).css("top",Math.round(d.innerHeight/2)+d.pageYOffset-Math.round($(this).height()/2));$(this).css("left",Math.round(d.innerWidth/2)+d.pageXOffset-Math.round($(this).width()/2));d=null})};

function alwaysOnTop(a){setTimeout(function(){if($(a).filter(".alwaysOnTop").size()>0){var b;if(self.pageYOffset){b=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){b=document.documentElement.scrollTop}else{if(document.body){b=document.body.scrollTop}}}$(a).css("top",b);alwaysOnTop(a)}},10)}jQuery.fn.alwaysOnTop=function(){return this.each(function(){if($.browser.msie&&navigator.appVersion.indexOf("MSIE 6.0")!=-1){$(this).remove().appendTo("body").css("position","absolute").css("top",0);$(this).addClass("alwaysOnTop");alwaysOnTop(this)}else{$(this).css("position","fixed").css("top",0)}})};jQuery.fn.stopAlwaysOnTop=function(){return this.each(function(){$(this).removeClass("alwaysOnTop")})};

if(!(jQuery.browser.msie&&navigator.appVersion.indexOf("MSIE 6.0")!=-1)){jQuery.Slide={settings:{axis:"vertical",position:"bottomright",maxElement:3,speed:"fast",margin:7,closeButtonTrigger:".close",delayBeforeStart:0,delayBeforeHide:4500,endCallback:null},staticSettings:{animationStep:15,nextMaxMargin:null},build:function(a){jQuery.Slide.staticSettings.nextMaxMargin=null;return this.not(".allreadySlide").each(function(b){var c=this;jQuery.extend(c.settings={},jQuery.Slide.settings,a||{});if(jQuery.browser.msie&&navigator.appVersion.indexOf("MSIE 6.0")!=-1){}if(c.settings.maxElement!=-1&&b>(c.settings.maxElement-1)){$(c).remove();return}c.maxPosition=jQuery.Slide.staticSettings.nextMaxMargin||c.settings.margin;if(c.settings.speed=="slow"){c.settings.speed=90}else{if(c.settings.speed=="normal"){c.settings.speed=65}else{if(c.settings.speed=="fast"){c.settings.speed=40}}}$(c).css("visibility","hidden").css("display","block").css("position","fixed").css("z-index",2000-b);if(c.settings.axis.toLowerCase()=="vertical"){if(c.settings.position.toLowerCase().indexOf("top")!=-1){c.settings.cssProperty="top"}else{c.settings.cssProperty="bottom"}if(c.settings.position.toLowerCase().indexOf("left")!=-1){$(c).css("left",c.settings.margin);$(c).css("right","")}else{$(c).css("right",c.settings.margin);$(c).css("left","")}c.settings.cssPropertyStart=-c.offsetHeight-20;jQuery.Slide.staticSettings.nextMaxMargin=c.offsetHeight}else{if(c.settings.position.toLowerCase().indexOf("left")!=-1){c.settings.cssProperty="left"}else{c.settings.cssProperty="right"}if(c.settings.position.toLowerCase().indexOf("top")!=-1){$(c).css("top",c.settings.margin);$(c).css("bottom","")}else{$(c).css("bottom",c.settings.margin);$(c).css("top","")}c.settings.cssPropertyStart=-c.offsetWidth-20;jQuery.Slide.staticSettings.nextMaxMargin=c.offsetWidth}jQuery.Slide.staticSettings.nextMaxMargin+=c.maxPosition+c.settings.margin+3;$(c).css(c.settings.cssProperty,c.settings.cssPropertyStart).css("visibility","visible");window.setTimeout(function(){jQuery.Slide.StartSlide(c)},c.settings.delayBeforeStart);$(c.settings.closeButtonTrigger,c).click(function(){jQuery.Slide.Hide(c);return false});$(c).hover(function(){jQuery.Slide.SuspendHide(c)},function(){jQuery.Slide.StartHide(c)})}).end()},StartSlide:function(a){window.setTimeout(function(){var b=parseInt($(a).css(a.settings.cssProperty));if(b+jQuery.Slide.staticSettings.animationStep>=a.maxPosition){$(a).css(a.settings.cssProperty,a.maxPosition).addClass("allreadySlide");jQuery.Slide.StartHide(a)}else{$(a).css(a.settings.cssProperty,(b+jQuery.Slide.staticSettings.animationStep));jQuery.Slide.StartSlide(a)}},a.settings.speed)},Hide:function(a){if($(a).not(".hideInProgress").size()>0){$(a).addClass("hideInProgress");jQuery.Slide.SuspendHide(a);$(a.settings.closeButtonTrigger,a).unbind("click");$(a).unbind("hover");$(a).fadeOut("slow",function(){$(this).remove();if(jQuery.isFunction(a.settings.endCallback)){a.settings.endCallback()}})}},StartHide:function(a){a.hideTimer=window.setTimeout(function(){jQuery.Slide.Hide(a)},a.settings.delayBeforeHide)},SuspendHide:function(a){window.clearTimeout(a.hideTimer);a.hideTimer=null}}}else{jQuery.Slide={settings:{maxElement:3,margin:7,closeButtonTrigger:".close",delayBeforeStart:2000,delayBeforeHide:4500},staticSettings:{nextMaxMargin:7},build:function(a){jQuery.Slide.staticSettings.nextMaxMargin=7;return this.not(".allreadySlide").each(function(b){var c=this;jQuery.extend(c.settings={},jQuery.Slide.settings,a||{});if(c.settings.maxElement!=-1&&b>(c.settings.maxElement-1)){$(c).remove();return}$(c).css("position","absolute").css("z-index",2000-b).css("right",c.settings.margin).css("top",jQuery.Slide.staticSettings.nextMaxMargin);jQuery.Slide.staticSettings.nextMaxMargin+=c.offsetHeight+c.settings.margin;$(c).css("display","none");window.setTimeout(function(){jQuery.Slide.Show(c)},(c.settings.delayBeforeStart*(b+1)));$(c.settings.closeButtonTrigger,c).click(function(){jQuery.Slide.Hide(c);return false});$(c).hover(function(){jQuery.Slide.SuspendHide(c)},function(){jQuery.Slide.StartHide(c)})}).end()},Show:function(a){$(a).fadeIn(function(){$(a).addClass("allreadySlide");jQuery.Slide.StartHide(a)})},Hide:function(a){if($(a).not(".hideInProgress").size()>0){$(a).addClass("hideInProgress");jQuery.Slide.SuspendHide(a);$(a.settings.closeButtonTrigger,a).unbind("click");$(a).unbind("hover");$(a).fadeOut("slow",function(){$(this).remove()})}},StartHide:function(a){a.hideTimer=window.setTimeout(function(){jQuery.Slide.Hide(a)},a.settings.delayBeforeHide)},SuspendHide:function(a){window.clearTimeout(a.hideTimer);a.hideTimer=null}}}jQuery.fn.Slide=jQuery.Slide.build;

jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+m.path:"";var g=m.domain?"; domain="+m.domain:"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};

var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var a;var b;var c;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(c){}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");a="WIN 2,0,0,11"}catch(c){a=-1}}return a}function GetSwfVer(){var g=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var f=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var a=navigator.plugins["Shockwave Flash"+f].description;var e=a.split(" ");var c=e[2].split(".");var h=c[0];var b=c[1];var d=e[3];if(d==""){d=e[4]}if(d[0]=="d"){d=d.substring(1)}else{if(d[0]=="r"){d=d.substring(1);if(d.indexOf("d")>0){d=d.substring(0,d.indexOf("d"))}}}var g=h+"."+b+"."+d}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){g=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){g=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){g=2}else{if(isIE&&isWin&&!isOpera){g=ControlVersion()}}}}}return g}function DetectFlashVer(f,d,c){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var e=versionArray[0];var a=versionArray[1];var b=versionArray[2];if(e>parseFloat(f)){return true}else{if(e==parseFloat(f)){if(a>parseFloat(d)){return true}else{if(a==parseFloat(d)){if(b>=parseFloat(c)){return true}}}}}return false}}}function AC_AddExtension(b,a){if(b.indexOf("?")!=-1){return b.replace(/\?/,a+"?")}else{return b+a}}function AC_Generateobj(e,d,a){var c="";if(isIE&&isWin&&!isOpera){c+="<object ";for(var b in e){c+=b+'="'+e[b]+'" '}for(var b in d){c+='><param name="'+b+'" value="'+d[b]+'" /> '}c+="></object>"}else{c+="<embed ";for(var b in a){c+=b+'="'+a[b]+'" '}c+="> </embed>"}document.write(c)}function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_GetArgs(b,e,g,d,h){var a=new Object();a.embedAttrs=new Object();a.params=new Object();a.objAttrs=new Object();for(var c=0;c<b.length;c=c+2){var f=b[c].toLowerCase();switch(f){case"classid":break;case"pluginspage":a.embedAttrs[b[c]]=b[c+1];break;case"src":case"movie":b[c+1]=AC_AddExtension(b[c+1],e);a.embedAttrs.src=b[c+1];a.params[g]=b[c+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":a.objAttrs[b[c]]=b[c+1];break;case"id":case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":a.embedAttrs[b[c]]=a.objAttrs[b[c]]=b[c+1];break;default:a.embedAttrs[b[c]]=a.params[b[c]]=b[c+1]}}a.objAttrs.classid=d;if(h){a.embedAttrs.type=h}return a};

function debug(a){if($("#debugJS").size()==0){$('<div id="debugJS"><h6 style="border-bottom:1px solid black;padding:0;text-align:center;margin-bottom:1em;">Drag</h6><h1>Debug Javascript</h1><br><h3>Clear</h3><hr><br><ul></ul></div>').appendTo("body").css({position:"fixed",top:"10px",right:"10px",borderWidth:"1px",borderStyle:"solid",borderColor:"black",padding:"15px",width:"20%",height:"90%",overflow:"auto",backgroundColor:"#CADBFF",opacity:0.9,zIndex:5000}).jqDrag("h6").find("h1").css("cursor","pointer").click(function(){if($(this).parent().css("height")=="90%"){$(this).parent().css({height:"15%",overflow:"hidden"})}else{$(this).parent().css({height:"90%",overflow:"auto"})}}).end().find("h3").css("cursor","pointer").click(function(){$(this).parent().find("ul").html("")}).end().find("h6").css("cursor","move");$("#debugJS").alwaysOnTop()}$("#debugJS ul").append("<li>"+a+"</li>")}function setFCT(a){var b=false;if(typeof a=="string"){a=[a]}$.each(a,function(){if(G_MODE_FCT==this){b=true;return false}});return b}function submitForm(a){if(a.onsubmit){a.onsubmit()}else{a.submit()}return false}NS4=(document.layers)?1:0;IE4=(document.all)?1:0;if(!IE4){MOZ=(document.getElementById)?1:0}else{MOZ=0}currentX=currentY=0;function grabEl(a){if(IE4){currentX=event.x;currentY=event.y}else{currentX=a.pageX;currentY=a.pageY}}if(NS4){document.captureEvents(Event.MOUSEDOWN|Event.MOUSEMOVE)}document.onmousemove=grabEl;function show(a){alertCss(currentX+"  "+currentY);x=currentX;y=currentY+20;if(NS4){document.layers[a].xpos=parseInt(x);document.layers[a].left=parseInt(x);document.layers[a].ypos=parseInt(y);document.layers[a].top=parseInt(y);document.layers[a].visibility="show"}if(IE4){document.all[a].style.left=self.document.body.scrollLeft+parseInt(x);document.all[a].style.top=self.document.body.scrollTop+parseInt(y);document.all[a].style.visibility="visible"}if(MOZ){document.getElementById(a).style.left=parseInt(x);document.getElementById(a).style.top=parseInt(y);document.getElementById(a).style.visibility="visible"}}function hide(a){if(NS4){document.layers[a].visibility="hide"}if(IE4){document.all[a].style.visibility="hidden"}if(MOZ){document.getElementById(a).style.visibility="hidden"}}function VerifSearch(a){if(a.text1.value==""){alertCss(searchInputIsEmpty,function(){a.text1.focus()});return false}submitForm(a)}function VerifSearchBar(a){submitForm(a)}function VerifPost(a){if(a.text1.value==""){alertCss(subjectIsEmpty,function(){a.text1.focus()});return false}if(a.text2.value==""){alertCss(messageIsEmpty,function(){a.text2.focus()});return false}submitForm(a)}function ValiderFormFicheInfos(a){if(checkRequiredFormFields(a)){submitForm(a)}return false}function ValiderFormFicheLogin(a){if(checkRequiredFormFields(a)){if(a.pwd.value!=a.pwd_confirm.value){alertCss(passwordConfirmationIsDifferent,function(){a.pwd_confirm.focus()});return false}if(a.old_password.value!=a.pwd.value){if(a.crypt.value=="md5"){a.pwd.value=MD5(a.pwd.value);a.pwd_confirm.value=a.pwd.value}}submitForm(a)}return false}function ValiderFormQuestion(a){if(a.prenom.value==""){alertCss(firstNameIsEmpty,function(){a.prenom.focus()});return false}if(a.nom.value==""){alertCss(nameIsEmpty,function(){a.nom.focus()});return false}if(a.subject.value==""){alertCss(subjectIsEmpty,function(){a.subject.focus()});return false}if(a.message.value==""){alertCss(messageIsEmpty,function(){a.message.focus()});return false}submitForm(a)}function ValiderFormMsg(a){if(a.text3.value==""){alertCss(subjectIsEmpty,function(){a.text3.focus()});return false}if(a.text4.value==""){alertCss(messageIsEmpty,function(){a.text4.focus()});return false}submitForm(a)}function ValiderFormPlanning(a){if(a.text1.value==""){alertCss(fileIsEmpty,function(){a.text1.focus()});return false}submitForm(a)}function ValiderFormActCollab(a){if(a.text1.value==""){alertCss(fileIsEmpty,function(){a.text1.focus()});return false}submitForm(a)}function ValiderFormFile(a){if(a.text1.value==""){alertCss(titleIsEmpty,function(){a.text1.focus()});return false}if(a.text2.value==""){alertCss(documentIsEmpty,function(){a.text2.focus()});return false}submitForm(a)}function ValiderFormComment(a){if(a.text1.value==""){alertCss(commentIsEmpty,function(){a.text1.focus()});return false}submitForm(a)}function ValiderFormAjouterNote(a){if(a.text1.value==""||isNaN(a.text1.value)){alertCss(noteInvalid,function(){a.text1.focus()});return false}if(a.text1.value>100){alertCss(noteInvalid,function(){a.text1.value="";a.text1.focus()});return false}submitForm(a)}function DeleteFile(a){confirmCss(fileDeleteConfirm,function(){window.location.replace(a)})}function DeleteForumPost(a){confirmCss(postDeleteConfirm,function(){window.location.replace(a)})}function QuitterActCollab(a){confirmCss(confirmExit,function(){window.location.replace(a)})}function QuitterCorrectionActCollab(a){confirmCss(confirmExit,function(){window.location.replace(a)})}function openWindow(e,b,c){var d=G_URL+"ganesha/commun/p_chargement.php";d+="?connexion="+G_CNX;d+="&page=";d+=escape(e);var a=window.open(d,b,c)}function openWindow2(a){window.open(a,"abc","width="+screen.width+",height="+screen.height+",top=0,left=0,scrollbars=yes,toolbar=no,resizable=yes")}function DeleteMessage(a){confirmCss(messageDeleteConfirm,function(){window.location.replace(a)})}function ValiderFormCodeInscr(a){if(checkRequiredFormFields()){if(G_MODE_FCT=="dfpn"){if(a.ville.value.length!=7){alertCss(cityIsEmpty,function(){a.ville.focus()});return false}}else{if(a.email&&!VerificationEmail(a.email)){return false}if(a.email&&$(a.email).is(".required")&&a.email.value!=a.confirme_email.value){alertCss(emailConfirmFailed,function(){a.email.focus()});return false}}submitForm(a)}return false}function ValiderFormInscr(a){if(checkRequiredFormFields()){if(G_MODE_FCT=="dfpn"){if(!VerificationEmail(a.email)){return false}if(a.confirme_email&&a.email.value!=a.confirme_email.value){alertCss(emailConfirmFailed,function(){a.email.focus()});return false}}submitForm(a)}return false}function verifcode(a){if(a.code.value==""){alertCss(inscriptionCodeIsEmpty,function(){a.code.focus()});return(false)}submitForm(a)}function verifrepertoire(a){if(a.text1.value==""&&a.text2.value==""){alertCss(requiredInputIsEmpty,function(){a.text1.focus()});return(false)}if(a.text1.value==""&&a.text2.value!=""){confirmCss(selectFolderConfirm,function(){submitForm(a)});return(false)}submitForm(a)}function validerPAB(a){submitForm(a)}function validerPB(a){submitForm(a)}function verifAddMembre(a){if(a.text1.value==""){alertCss(firstNameIsEmpty,function(){a.text1.focus()});return(false)}if(a.text2.value==""){alertCss(nameIsEmpty,function(){a.text2.focus()});return(false)}submitForm(a)}function validAccueil(b){if(b.text1.value==""){b.text2.value=yesText;submitForm(b)}else{var c=function(){b.text2.value=yesText;submitForm(b)};var a=function(){b.text2.value=noText;submitForm(b)};confirmCss(confirmationRequired,c,a)}}function setPointer(a,i,k,h){var b=null;if(h==""||typeof(a.style)=="undefined"){return false}if(typeof(document.getElementsByTagName)!="undefined"){b=a.getElementsByTagName("td")}else{if(typeof(a.cells)!="undefined"){b=a.cells}else{return false}}var j=b.length;var e=null;var d=null;var f=null;if(typeof(window.opera)=="undefined"&&typeof(b[0].getAttribute)!="undefined"){d=b[0].getAttribute("bgcolor");e=true}else{d=b[0].style.backgroundColor;e=false}if(d==""||d.toLowerCase()==k.toLowerCase()){if(i=="over"&&h!=""){f=h}}else{if(d.toLowerCase()==h.toLowerCase()){if(i=="out"){f=k}}}if(f){var g=null;if(e){for(g=0;g<j;g++){b[g].setAttribute("bgcolor",f,0)}}else{for(g=0;g<j;g++){b[g].style.backgroundColor=f}}}return true}function resizeIframe(){if(document.getElementById("colonne_gauche")){var a=document.body.offsetWidth;frame=document.getElementById("idframe");if(document.getElementById("colonne_gauche").style.display=="none"){if(frame){frame.width=a-110}}else{if(frame){frame.width=a-260}}}}function printIframe(){if(top.idframe){try{top.idframe.mainFrame.focus();window.print()}catch(a){top.idframe.focus();window.print()}}else{top.focus();window.print()}}function toggle(b){el=document.getElementById(b);var a=el.style.display?"":"none";el.style.display=a}function toggle_ajax(d,a){var b=document.getElementById(d);if(b.style.display){if(!$(b).is(".allready-loaded")){var c=document.createElement("div");c.className="load";b.innerHTML="";b.appendChild(c);$.get(a,function(e){$(b).addClass("allready-loaded").html(e)})}b.style.display=""}else{b.style.display="none"}}function appendFormAction(b,a){document.getElementById(b).action+=a}function ExportVCARD(a){thewin=window.open(a,"vcard","width=10,height=10");return true}function createXMLHttpRequest(){var a;try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){try{a=new XMLHttpRequest()}catch(b){a=null}}return a}function ajaxToggleMenuSession(e,h,b){var g=e.parentNode;var a=document.createElement("ul");var d=document.createElement("li");var f=document.createAttribute("id");var c=createXMLHttpRequest();if(c==null){alertCss("Unable to create XMLHttpRequest object for Ajax formation menu.");return}if(typeof b=="undefined"){b=true}f.nodeValue="loading";d.setAttributeNode(f);g.appendChild(a);a.appendChild(d);e.onclick="";e.removeAttribute("onclick");addEvent(e,"click",simpleToggleMenuSession);c.open("get",h,b);if(b){c.onreadystatechange=function(){if(c.readyState==4){d.parentNode.removeChild(d);a.innerHTML=c.responseText}}}c.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=iso-8859-1");c.send(null);if(!b){if(c.readyState==4){d.parentNode.removeChild(d);a.innerHTML=c.responseText}}}function addEvent(source,type,callback){if(source.addEventListener){source.addEventListener(type,callback,false);return true}else{if(source.attachEvent){var r=source.attachEvent("on"+type,callback);return r}else{eval("source.on"+type+"= callback");return true}}}function getStandardEvent(a){if(a==null&&window.event){a=window.event}if(a.target==null&&a.srcElement){a.target=a.srcElement}if(!a.preventDefault){a.preventDefault=function(){this.returnValue=false}}return a}function simpleToggleMenuSession(c){c=getStandardEvent(c);var a=c.target;var b=a.parentNode.lastChild.style.display;if(b=="block"){a.parentNode.lastChild.style.display="none"}else{a.parentNode.lastChild.style.display="block"}c.preventDefault();return false}function gotoPosition(a,g,e,d){var b="menu_session.php";if(a==0&&e==0){return}if(a!=0){var j,f,c;f=document.getElementsByTagName("a");for(c=0;c<f.length;c++){var k,h;j=f.item(c);if(j.getAttribute("onclick")){k=j.getAttribute("onclick");if(k.indexOf(b)!=-1&&k.indexOf("parcours_id="+a)!=-1&&k.indexOf("parcours_loc="+g)!=-1&&k.indexOf("action=getParcoursChilds")!=-1){h=k.substring(k.indexOf("'")+1,k.lastIndexOf("'"));ajaxToggleMenuSession(j,h,false)}}}if(e!=0){var j,f,c;f=document.getElementsByTagName("a");for(c=0;c<f.length;c++){var k,h;j=f.item(c);if(j.getAttribute("onclick")){k=j.getAttribute("onclick");if(k.indexOf(b)!=-1&&k.indexOf("parcours_id="+a)!=-1&&k.indexOf("parcours_loc="+g)!=-1&&k.indexOf("module_id="+e)!=-1&&k.indexOf("module_loc="+d)!=-1&&k.indexOf("action=getModuleChilds")!=-1){h=k.substring(k.indexOf("'")+1,k.lastIndexOf("'"));ajaxToggleMenuSession(j,h,false)}}}}}else{var j,f,c;f=document.getElementsByTagName("a");for(c=0;c<f.length;c++){var k,h;j=f.item(c);if(j.getAttribute("onclick")){k=j.getAttribute("onclick");if(k.indexOf(b)!=-1&&k.indexOf("module_id="+e)!=-1&&k.indexOf("module_loc="+d)!=-1&&k.indexOf("action=getModuleChilds")!=-1){h=k.substring(k.indexOf("'")+1,k.lastIndexOf("'"));ajaxToggleMenuSession(j,h,false)}}}}}function displayMessage(e,b){var f,h,a,d,c,g;if(b=="error"){f=G_DM_ERREUR_normalColor;h=G_DM_ERREUR_highlightColor;a=G_DM_ERREUR_timeBeforeHide;c=G_DM_ERREUR_fadeInSpeed;g=G_DM_ERREUR_fadeOutSpeed;stepToHighlight=G_DM_ERREUR_stepToHighlight;stepToNormal=G_DM_ERREUR_stepToNormal;backgroundEffectPause=G_DM_ERREUR_backgroundEffectPause}else{f=G_DM_CONFIRM_normalColor;h=G_DM_CONFIRM_highlightColor;a=G_DM_CONFIRM_timeBeforeHide;c=G_DM_CONFIRM_fadeInSpeed;g=G_DM_CONFIRM_fadeOutSpeed;stepToHighlight=G_DM_CONFIRM_stepToHighlight;stepToNormal=G_DM_CONFIRM_stepToNormal;backgroundEffectPause=G_DM_CONFIRM_backgroundEffectPause}$(e).appendTo("body").width($("body").width()).fadeIn(c,function(){$(this).backgroundFade({sColor:f,eColor:h,steps:stepToHighlight},function(){var i=this;setTimeout(function(){$(i).backgroundFade({sColor:h,eColor:f,steps:stepToNormal},function(){setTimeout(function(){$(i).fadeOut(g,function(){$(i).stopAlwaysOnTop().remove()})},a)})},backgroundEffectPause)})}).alwaysOnTop()}function ajaxSubmit(d){var g=d.elements;var f="";var c,e;var b=createXMLHttpRequest();if(b==null){alertCss("Unable to create XMLHttpRequest object for Ajax form submit.");return}for(c=0;c<g.length;c++){if(g[c].name&&g[c].name.length>0){if(g[c].type=="checkbox"||g[c].type=="radio"){if(g[c].checked){e=g[c].value;f+=g[c].name+"="+escape(e)+"&"}}else{if(g[c].type=="select"){e=$("option:selected",g[c]).value;f+=g[c].name+"="+escape(e)+"&"}else{e=(g[c].name=="tiny_mce")?getTinyMCEContent(g[c]):g[c].value;f+=g[c].name+"="+escape(e)+"&"}}}}if(f.length>4){f=f.substr(0,f.length-1)}else{f=null}var a=d.action;a+="&tabsRelContext="+getTabsRelContext(d);a+="&tabContext="+getTabContext(d);b.open("POST",a,true);b.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=iso-8859-1");b.send(f);loadingLayout.show();b.onreadystatechange=function(){if(b.readyState==4){loadingLayout.hide();processXmlHttpResponse(b.responseXML)}}}function initializeAutocompleter(){$("input[@type=text][@rel]").filter(".active_autocomplete").each(function(){var a=$(this).is(".autocomplete_multiple");var b=false;if($(this).parent("form[@action]").size()>0){b=$(this).parent("form[@action]").attr("action")+"&action="+$(this).attr("rel")}else{b=$(this).attr("rel")}if(b){$(this).Autocomplete({source:b,minchars:3,autofill:false,delay:700,multiple:a,multipleSeparator:";",helperClass:"autocompleter",selectClass:"selectAutocompleter",fx:{type:"fade",duration:400},onSelect:function(c){if(c.url){window.location.href=c.url}}})}}).removeClass("active_autocomplete")}$(document).ready(function(){initializeAutocompleter()});function getNavigatorStats(){var c=navigator.userAgent.indexOf("MSIE")!=-1;var a=GetSwfVer();var b={screen:{width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight},display:{width:null,height:null},flash:{enable:(a!=-1),version:(a!=-1)?a:null},userAgent:navigator.userAgent,jre:navigator.javaEnabled(),cookie:(function d(){$.cookie("checkCookieTestCookie",12);if($.cookie("checkCookieTestCookie")==12){$.cookie("checkCookieTestCookie",null);return true}return false})()};if(c){if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){b.display.width=document.documentElement.clientWidth;b.display.height=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){b.display.width=document.body.clientWidth;b.display.height=document.body.clientHeight}}}else{b.display.width=window.innerWidth;b.display.height=window.innerHeight}return b}function LoginGanesha(){var a=$.trim(document.formulaire.txtuser.value);document.formulaire.txtuser.value="";var d=$.trim(document.formulaire.txtpassword2.value);document.formulaire.txtpassword2.value="";if(d==""||a==""){alertCss(loginOrPasswordIsEmtpy);return(false)}var b=getNavigatorStats();var c={txtuser:a,md5password:MD5(d),screen_width:b.screen.width,screen_height:b.screen.height,screen_available_width:b.screen.availWidth,screen_available_height:b.screen.availHeight,display_width:b.display.width,display_height:b.display.height,flash_enable:b.flash.enable,flash_version:b.flash.version,user_agent:b.userAgent,jre_enable:b.jre,cookie_enable:b.cookie};if(G_MODE_CNX==G_MODE_CNX_LDAP){c.txtpassword=d}$("input:hidden[@name!=txtpassword]",document.formulaire).each(function(){c[$(this).attr("name")]=$(this).val()});loadingLayout.show();if(G_AJAX_CRON_RELANCE){$.get(G_URL+"ganesha/index.php?action=ajax_cron_relance")}$.ajax({url:G_URL+"ganesha/index.php?action=ajax_login",type:"POST",dataType:"xml",data:c,complete:function(f,g){var e=f.responseXML;var h=f.responseText;if($("action",e).size()>0){$("action",e).each(function(){type=$("type",this).text();content=$("content",this).text();if(type=="confirm-message"){loadingLayout.hide();displayMessage(content,"confirm")}else{if(type=="error-message"){loadingLayout.hide();displayMessage(content,"error")}else{if(type=="redirection"){window.top.location.replace(content)}else{if(type=="alert-css"){loadingLayout.hide();setTimeout(function(){alertCss(content)},100)}else{loadingLayout.hide();setTimeout(function(){alertCss(h)},100)}}}}})}else{loadingLayout.hide();alertCss("Une erreur est survenue : <br>"+h)}},error:function(f,e){loadingLayout.hide();alert("Erreur AJAX::ajax_login")}});return(false)}function getLoginGanesha(b){var a=b.EmailSend.value;var c={email:a};$("input:hidden[@name!=txtpassword]",b).each(function(){c[$(this).attr("name")]=$(this).val()});loadingLayout.show();$.post(b.action,c,function(d){loadingLayout.hide();processXmlHttpResponse(d)});return(false)}function LoginInvite(a,c){var b=function(){loadingLayout.show();$.get(G_URL+"ganesha/index.php?action=ajax_loginInvite&id="+a,function(d){loadingLayout.hide();processXmlHttpResponse(d)})};if(c){confirmCss(guestAllreadyUsed,function(){setTimeout(b,500)})}else{b()}return(false)}function initTinyMCE(){$("textarea[@name=tiny_mce]:visible").each(function(){var a="id_"+Math.floor(Math.random()*10000000);$(this).attr("id",a);tinyMCE.execCommand("mceAddControl",false,a)})}function getTinyMCEContent(a){var b=tinyMCE.getInstanceById($(a).attr("id"));if(!b){return null}if(!$.isFunction(tinyMCE.getContent)){return null}return tinyMCE.getContent(b.editorId)}function initCalendar(){$("input[@type=text][@rel^=zapatec]").each(function(d){var a=$(this).attr("rel");var c=$("input[@type=button][@rel="+a+"]");var e=$(this).attr("id");var b=c.attr("id");Zapatec.Calendar.setup({firstDay:1,showOthers:true,electric:false,inputField:e,button:b,ifFormat:"%d/%m/%y",daFormat:"%Y/%m/%d"});c.attr("rel","");$(this).attr("rel","")})}$(document).ready(function(){initCalendar()});function processXmlHttpResponse(xml){var type,content,expr,method;$("action",xml).each(function(){type=$("type",this).text();content=$("content",this).text();switch(type){case"confirm-message":displayMessage(content,"confirm");break;case"error-message":displayMessage(content,"error");break;case"alert-css":setTimeout(function(){alertCss(content)},100);break;case"notification":$(content).appendTo("body").Slide({maxElement:1});break;case"html-replacement":expr=$("expr",this).text();$(expr).find("textarea[@name=tiny_mce]").each(function(){tinyMCE.execCommand("mceRemoveControl",false,$(this).attr("id"))});$(expr).before(content).remove();break;case"html-insertion":expr=$("expr",this).text();method=$("method",this).text();content=content.replace(/"/g,'\\"');eval('$("'+expr+'").'+method+'("'+content+'");');break;case"tab-remove":removeTab($("id",this).text());break;case"tab-selection":case"redirection":break;default:setTimeout(function(){alertCss(modificationDone)},100);break}});initComponents();$("action",xml).each(function(){type=$("type",this).text();content=$("content",this).text();switch(type){case"tab-selection":activeTab($("id",this).text());break;case"redirection":processXmlHttpResponse_triggerRedirect(content);break}})}function processXmlHttpResponse_triggerRedirect(a){if($("#error-message").add("#confirmation-message").add("div.alertBox").add("div.notification").size()>0){setTimeout(function(){processXmlHttpResponse_triggerRedirect(a)},500);return}window.top.location.replace(a)}function initComponents(){initTinyMCE();initCalendar();initTabs();initializeAutocompleter();initSlider()}function ajaxLink(b){var a=$(b).attr("href");var c={tabsRelContext:getTabsRelContext(b),tabContext:getTabContext(b)};loadingLayout.show();$.get(a,c,function(d){loadingLayout.hide();processXmlHttpResponse(d);$("ul[@rel="+tab+"] li:last a").click()})}function checkoutNotification(){if(G_CNX.length>0&&G_GUSERID>0){var a=G_URL+"ganesha/index.php?connexion="+G_CNX+"&user_id="+G_GUSERID;a+="&action=ajax_checkout_notification&no_cache="+Math.random();$.ajax({type:"GET",url:a,dataType:"xml",complete:function(d,g){var j=d.getResponseHeader("Content-type");var h=false;if(j&&j.toLowerCase().indexOf("/xml")!=-1){h=true}if(d.status==204||d.status==1223){setTimeout(checkoutNotification,G_NOTIF_refreshDelay)}else{if(h){var b=false;var f,e;var c=0;$("action",d.responseXML).each(function(){e=$("type",this).text();f=$("content",this).text();if(e=="deconnected"){b=true;confirmCss(deconnectedMessage,function(){window.location.replace(f)})}if(e=="notification"){if(c++<G_NOTIF_maxElement){$("body").append(f)}}});$("div.notification").Slide({maxElement:G_NOTIF_maxElement});if(!b){setTimeout(checkoutNotification,G_NOTIF_refreshDelay)}}}}})}}$(document).ready(function(){if(G_NOTIF_active){setTimeout(checkoutNotification,G_NOTIF_startDelay)}});function confirmDeconnexion(a){if(a.indexOf("_CNX_")==-1){confirmCss(confirmDeconnection,function(){window.location.href=a})}}function changerACL(a){var b="#"+$(a).parents(".tab_content").attr("id");loadTabContent(b,$(a).attr("href"))}function toggleLeftMenu(a){$("#contenu").css({width:"",margin:"",paddingLeft:""});if(!setFCT(["praxion"])){$("#nom").toggle()}if(setFCT(["anema2","anema","triangl","bcd","ganesha4","ch_perpignan","idap","laforet","gendarmerie","asp","bricorama","ministere_interieur","cpic","afpa_centre","areva","eca","aldes","gefco"])){$("#profil").toggle()}else{$("#footer").toggle()}if(setFCT(["eca"])){$("#date").toggle()}$("#colonne_gauche").slideToggle(function(){if($("#colonne_gauche:visible").size()==0){$("#contenu").css({width:"96%",margin:"0",paddingLeft:"2%",paddingRight:"2%"});if(setFCT(["anema2","anema","triangl","ganesha4","gendarmerie","asp","bricorama","ministere_interieur","afpa_centre","aldes"])){$("#content").css("paddingBottom",0)}$.cookie("admin_menu_hide",true);$(a).attr("id","menu_admin_toggle_show")}else{if(setFCT(["anema2","anema","triangl","ganesha4","gendarmerie","asp","bricorama","ministere_interieur","afpa_centre","aldes"])){$("#content").css("paddingBottom","")}$.cookie("admin_menu_hide",null);$(a).attr("id","menu_admin_toggle_hide")}})}$(document).ready(function(){if($.cookie("admin_menu_hide")&&(setFCT(["anema2","anema","triangl","bcd","ganesha4","ch_perpignan","idap","laforet","gendarmerie","asp","bricorama","ministere_interieur","cpic","afpa_centre","areva","eca","aldes"]))){$("#content").css("paddingBottom",0);$("#profil").hide();$("#footer").show()}if($.cookie("admin_menu_hide")&&setFCT(["praxion"])){$("#nom").show()}if($.cookie("admin_menu_hide")&&setFCT(["eca"])){$("#date").hide()}});function initSlider(){$("input[@rel=slider]:reallyvisible").each(function(){var k=this;var i=Math.floor(Math.random()*10000000);var f="slider_"+i;var g="slider-cursor_"+i;var d='<div id="'+f+'" tabindex="-1" class="slider"><div id="'+g+'" class="slider-cursor"></div></div>';var b=200;var e=parseInt($(k).attr("min"));var j=parseInt($(k).attr("max"));var h=(j-e)/b;var c=1;$(k).attr("readonly","readonly").removeAttr("min").removeAttr("min").removeAttr("rel").addClass("slider").before(d).remove().insertAfter("#"+f);var a=YAHOO.widget.Slider.getHorizSlider(f,g,0,b,c);a.keyIncrement=10;a.getRealValue=function(){return Math.round(this.getValue()*h)+e};a.setRealValue=function(l){l=l<e?e:l;l=l-e;l=l/h;this.setValue(l)};a.subscribe("change",function(l){$(k).val(a.getRealValue())});a.setRealValue($(k).val())})}$(document).ready(function(){initSlider()});var refreshLogTimer;function getLog(){var a=$("#log").find("td").get(1);$.get("../install/log/install.html",function(b){b=b.replace(/(\r\n)|(\n\r)|\r|\n/g,"<br>");$(a).html("");$(a).html(b)});loadingLayout.hide();loadingLayout.show();refreshLogTimer=setTimeout(function(){getLog(a)},2000)}function StartReplicUpdateBdd(a){loadingLayout.show();$.get(a.action,function(b){clearTimeout(refreshLogTimer);loadingLayout.hide();processXmlHttpResponse(b)});$(a).find("input[@type=button]").hide();setTimeout(function(){getLog()},1500);return false}var image_off=G_URL_THEMES+"images/icones/checkbox_vide.gif";var image_on=G_URL_THEMES+"images/icones/checkbox.gif";var image_over=G_URL_THEMES+"images/icones/checkbox_rollover.gif";var src="";function mouseOver(a){src="";if(document.images[a].src!=image_on){src=document.images[a].src;document.images[a].src=image_over}}function mouseOut(a){if(src!=""){document.images[a].src=src}}function mouseClick(a,b){if(document.formulaire[b].value==0){document.images[a].src=image_on;document.formulaire[b].value=1}else{document.images[a].src=image_off;document.formulaire[b].value=0}src=""}function ValidLoad(a){loadingLayout.show();submitForm(a)}function ValidExportPDF(a){if(a.form_target.checked){a.target="_blank"}else{a.target="_top"}submitForm(a)}function duplicateParent(a){var b=$(a).parents("tr:first").clone();$(a).parents("tr:first").after(b);b.find(a).remove();initComponents()}function PulsateWarning(){$("*[@id=warning]").filter(function(){return $(this).attr("rel")!="pulsate"}).eq(0).Pulsate(300,5,function(){if($(this).attr("rel")!="permanent"){$(this).fadeOut(function(){$(this).remove();setTimeout(function(){PulsateWarning()},1500)})}else{setTimeout(function(){PulsateWarning()},1500)}$(this).attr("rel","pulsate")})}$(document).ready(function(){PulsateWarning()});function windowLayout(a){var b=$('<iframe id="idframe" name="idframe" frameborder="no" onload="resizeIframe();"></iframe>');$("body").addClass("activity_fullscreen").find("*:visible").addClass("fullscreen_hidden").hide();$('<div id="idframe_container"></div>').appendTo("body").fadeIn(2000,function(){$("<span></span>").appendTo(this).click(function(){b.remove();$("#idframe_container").fadeOut(function(){$("body").removeClass("activity_fullscreen").find(".fullscreen_hidden").removeClass("fullscreen_hidden").show();$(this).remove()})});b.appendTo(this).attr("src",a)})}$(document).ready(function(){$("a[@rel=overlay]").click(function(){windowLayout($(this).attr("href"));return false})});window.setActivityFullScreen=function(d,b,a){var c=$("#idframe").remove();$("body").addClass("activity_fullscreen").find("*").remove();$('<div id="idframe_container"></div>').appendTo("body").fadeIn(2000,function(){$("<span></span>").appendTo(this).click(function(){setTimeout(function(){window.top.location=a},15000);c.attr("src",b)});c.appendTo(this).attr("src",d)})};$(document).ready(function(){$("body.apprenant #colonne_gauche.sequence").filter(function(){return $("dd:gt(0).page_select",this).size()==0}).each(function(){var a=new Array();a.push($(".smenu:not(#premier_sousmenu) dd.status_not_attempted:first"));a.push($(".smenu:not(#premier_sousmenu) dd.status_incomplete:first"));a.push($(".smenu:not(#premier_sousmenu) dd.status_failed:first"));$(a).each(function(){if(this.size()==1){if($(".smenu:not(#premier_sousmenu) dd:first").is(".page_select")){$("<p>"+nextActivity+this.html()+"</p>").appendTo(".tab_content:visible:first").Pulsate(300,3)}else{this.Pulsate(500,5)}return false}})})});

function checkRequiredFormFields(d){var c,e,b;var a=false;$(d).find(".required").each(function(){if(!a){e=this.nodeName.toLowerCase();if(e=="input"){c=$(this).attr("type").toLowerCase();if(c=="text"||c=="password"){if($.trim($(this).val()).length==0){a=true}}}else{if(e=="select"){if($(this).val()<0||$(this).val()==""){a=true}}else{if(e=="textarea"){if($(this).attr("name")=="tiny_mce"){if($.trim(getTinyMCEContent(this)).length==0){a=true}}else{if($.trim($(this).val()).length==0){a=true}}}}}if(a){var f=fieldIsEmpty;var g=$(this).attr("alt");if(!g){g=$(this).parents("td:first").prev().text();g=g.replace(/\*$/,"");g=$.trim(g)}f=f.replace(/%s/,g);b=this;alertCss(f,function(){$(b).focus()});return false}}});return !a}function VerificationEmail(d){var e=$(d).is(".required");var c=d.value.length;var b=d.value.indexOf("@",1);var a=d.value.indexOf(".",b+1);if(!e&&c==0){return(true)}if((b>-1)&&(c>2)&&(a>1)){return(true)}else{alertCss(invalidEmail,function(){d.focus()});return(false)}}function DeleteItem(a){confirmCss(recordDeleteConfirm,function(){window.location.href=a})}function DeleteItemMaj(a){confirmCss(recordDeleteConfirm,function(){confirmCss(deleteElementConfirm,function(){a+="&maj=1";window.location.href=a},function(){window.location.href=a},function(){window.location.href=a})})}function AddItemMaj(a){confirmCss(addElementConfirm,function(){a+="&maj=1";window.location.href=a},function(){window.location.href=a})}function DeleteListItem(a){confirmCss(recordDeleteConfirm,function(){setTimeout(function(){$(a).parents("form").submit()},500)})}function rappelIdentifiant(b,a){confirmCss(a,function(){setTimeout(function(){if(b.href){loadingLayout.show();$.get(b.href,function(c){loadingLayout.hide();processXmlHttpResponse(c)})}},1000)})}function select_all(a){$(a).parents("form").find("input[@type=checkbox][@name^=id]").click();return true}function toggleSelectLine(a){var c="ligneSelectionnee";var b=a.parentNode.parentNode;if(a.checked){$(b).addClass(c)}else{$(b).removeClass(c)}}function VerifAddGroupe(a){if(a.text1.value==""){alertCss(groupNameIsEmpty,function(){a.text1.focus()});return(false)}ValidLoad(a)}function VerifGroupe(a,b){if(a.text1.value==""){alertCss(groupNameIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifMembreTuteur(d){if(checkRequiredFormFields(d)){var f=d.id.value;var c=d.nb_car_login.value;var a=d.nb_car_mdp.value;if(f>0&&(d.code.value.length)==0){alertCss(codeEmpty,function(){d.code.focus()});return(false)}if((d.login.value.length)<c){alertCss(loginMinChars+" "+c,function(){d.login.focus()});return(false)}if((d.pwd.value.length)<a){alertCss(passwordMinChars+" "+a,function(){d.pwd.focus()});return(false)}if(G_MODE_FCT=="dfpn"&&d.ville.value.length!=7){alertCss(cityIsEmpty,function(){d.ville.focus()});return(false)}if(!VerificationEmail(d.email)){return(false)}var e=d.pwd.value;if(d.old_password.value!=d.pwd.value){if(d.crypt.value=="md5"){e=MD5(d.pwd.value)}}var b=d.action+"&action=ajax_verifLoginPwdEmailCode";if(ajax_verifLoginPwdEmailCode(b,f,d.login.value,e,d.email.value,d.code.value)){b=d.action+"&action=ajax_verifVilleDfpn";if(G_MODE_FCT=="dfpn"){if(ajax_verifVilleDfpn(b,d.ville.value,f)){d.pwd.value=e;submitForm(d)}}else{d.pwd.value=e;submitForm(d)}}}}function VerifMembreAdmin(d){if(checkRequiredFormFields(d)){var f=d.id.value;var c=d.nb_car_login.value;var a=d.nb_car_mdp.value;if((d.login.value.length)<c){alertCss(loginMinChars+" "+c,function(){d.login.focus()});return(false)}if((d.pwd.value.length)<a){alertCss(passwordMinChars+" "+a,function(){d.pwd.focus()});return(false)}if(G_MODE_FCT=="dfpn"&&d.ville.value.length!=7){alertCss(cityIsEmpty,function(){d.ville.focus()});return(false)}if(!VerificationEmail(d.email)){return(false)}var e=d.pwd.value;if(d.old_password.value!=d.pwd.value){if(d.crypt.value=="md5"){e=MD5(d.pwd.value)}}var b=d.action+"&action=ajax_verifLoginPwdEmail";if(ajax_verifLoginPwdEmailCode(b,f,d.login.value,e,d.email.value)){b=d.action+"&action=ajax_verifVilleDfpn";if(G_MODE_FCT=="dfpn"){if(ajax_verifVilleDfpn(b,d.ville.value,f)){d.pwd.value=e;submitForm(d)}}else{d.pwd.value=e;submitForm(d)}}}}function VerifAdmin(a){if(a.text1.value==""){alertCss(firstNameIsEmpty,function(){a.text1.focus()});return(false)}if(a.text2.value==""){alertCss(nameIsEmpty,function(){a.text2.focus()});return(false)}if(a.text3.value==""){alertCss(loginIsEmpty,function(){a.text3.focus()});return(false)}if(a.text4.value==""){alertCss(passwordIsEmpty,function(){a.text4.focus()});return(false)}submitForm(a)}function VerifAgence(a){if($.trim(a.name.value)==""){alertCss(agenceIsEmpty,function(){a.name.focus()});return(false)}submitForm(a)}function VerifSequence(a){if(a.text1.value==""){alertCss(titleIsEmpty,function(){a.text1.focus()});return(false)}lib1=a.elements[6];if(lib1.value==""){alertCss(title1IsEmpty,function(){lib1.focus()});return(false)}fic1=a.elements[7];if(fic1.value==""){alertCss(file1IsEmpty,function(){fic1.focus()});return(false)}submitForm(a)}function VerifAddSequence(a){if(a.text1.value==""){alertCss(titleIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifAddModule(a){if(a.text1.value==""){alertCss(titleIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifAddParcours(a){if(a.text1.value==""){alertCss(titleIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifChapitreIFTI(a){if((a.code_ltype.value=="CP"||a.code_ltype.value=="CI"||a.code_ltype.value=="CF"||a.code_ltype.value=="CC")&&(a.text5.checked)){alertCss(mustBeInvisible,function(){a.code_ltype.focus()});return(false)}if((a.code_lformat.value=="M"||a.code_lformat.value=="C")&&(a.LType.value!="1")){alertCss(mustBeAsset,function(){a.LType.focus()});return(false)}else{if((a.code_lformat.value=="G")&&(a.LType.value=="0"||a.LType.value=="1"||a.LType.value=="2")){alertCss(mustBeActTerminateScormOrAicc,function(){a.LType.focus()});return(false)}}VerifChapitre(a)}function VerifChapitre(a){type=a.LType.value;if(a.text2.value==""){alertCss(activityTitleIsEmpty,function(){a.text2.focus()});return(false)}if(type!=0){if(a.text3.value==""){alertCss(activityFileIsEmpty,function(){a.text3.focus()});return(false)}}else{a.text3.value=""}if(type==10){if(a.text4.value==""){alertCss(destinationDirectoryIsEmtpy,function(){a.text4.focus()});return(false)}}submitForm(a)}function VerifSociete(a){if(a.text1.value==""){alertCss(nameIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifModifSiteLocal(a){if(a.site_name.value==""){alertCss(nameIsEmpty,function(){a.site_name.focus()});return(false)}if(a.pushdata.value==""){alertCss(requiredInputIsEmpty,function(){a.pushdata.focus()});return(false)}if(a.ip.value==""){alertCss(requiredInputIsEmpty,function(){a.ip.focus()});return(false)}if(a.login.value==""){alertCss(requiredInputIsEmpty,function(){a.login.focus()});return(false)}if(a.password.value==""){alertCss(requiredInputIsEmpty,function(){a.password.focus()});return(false)}if($("input[@name=ws_url]:text").size()==1&&a.ws_url.value==""){alertCss(requiredInputIsEmpty,function(){a.ws_url.focus()});return(false)}if($("input[@name=ws_login]:text").size()==1&&a.ws_login.value==""){alertCss(requiredInputIsEmpty,function(){a.ws_login.focus()});return(false)}if($("input[@name=ws_password]:password ").size()==1&&a.ws_password.value==""){alertCss(requiredInputIsEmpty,function(){a.ws_password.focus()});return(false)}submitForm(a)}function VerifFormSiteServeur(a){if(a.text1.value==""){alertCss(nameIsEmpty,function(){a.text1.focus()});return(false)}if(a.text2.value==""){alertCss(requiredInputIsEmpty,function(){a.text2.focus()});return(false)}if(a.text3.value==""){alertCss(requiredInputIsEmpty,function(){a.text3.focus()});return(false)}if(a.text4.value==""){alertCss(requiredInputIsEmpty,function(){a.text4.focus()});return(false)}if(a.text6.value==""){alertCss(requiredInputIsEmpty,function(){a.text6.focus()});return(false)}submitForm(a)}function VerifSession(a){if(a.text1.value==""){alertCss(titleIsEmpty,function(){a.text1.focus()});return(false)}if(a.text2.value==""){alertCss(directoryIsEmpty,function(){a.text2.focus()});return(false)}lib1=a.elements[5];if(lib1.value==""){alertCss(title1IsEmpty,function(){lib1.focus()});return(false)}fic1=a.elements[6];if(fic1.value==""){alertCss(file1IsEmpty,function(){fic1.focus()});return(false)}submitForm(a)}function ajax_verifVilleDfpn(b,c,d){var a=false;$.ajax({url:b,data:{ville:c,id:d},async:false,type:"post",success:function(e){var f=G_OK+"";if(e==f){a=true}else{a=false;alertCss("Ce num?ro de matricule est d?j? utilis?.",function(){if($("#ville:input").size()>0){$("#ville:input").focus()}})}}});return a}function ajax_verifLoginPwdEmailCode(d,g,b,f,c,e){var a=false;$.ajax({url:d,data:{id:g,login:b,pwd:f,email:c,code:e},async:false,type:"post",success:function(h){switch(h){case G_OK+"":a=true;break;case G_ERR_LOGIN_PWD+"":alertCss(incorrectIdentPwd,function(){if($("#login:input").size()>0){$("#login:input").focus()}});break;case G_ERR_EMAIL_INVALID+"":alertCss(invalidEmail,function(){if($("#email:input").size()>0){$("#email:input").focus()}});break;case G_ERR_EMAIL_USED+"":alertCss(emailUsed,function(){if($("#email:input").size()>0){$("#email:input").focus()}});break;case G_ERR_CODE_USED+"":alertCss(codeUsed.replace(/%s/,e),function(){if($("#code:input").size()>0){$("#code:input").focus()}});break}}});return a}function VerifStagiaire(d){if(checkRequiredFormFields(d)){var f=d.id.value;var c=d.nb_car_login.value;var a=d.nb_car_mdp.value;if(f>0&&(d.code.value.length)==0){alertCss(codeEmpty,function(){d.code.focus()});return(false)}if((d.login.value.length)<c){alertCss(loginMinChars+" "+c,function(){d.login.focus()});return(false)}if((d.pwd.value.length)<a){alertCss(passwordMinChars+" "+a,function(){d.pwd.focus()});return(false)}if(G_MODE_FCT=="dfpn"&&d.ville.value.length!=7){alertCss(cityIsEmpty,function(){d.ville.focus()});return(false)}if(!VerificationEmail(d.email)){return(false)}var e=d.pwd.value;if(d.old_password.value!=d.pwd.value){if(d.crypt.value=="md5"){e=MD5(d.pwd.value)}}var b=d.action+"&action=ajax_verifLoginPwdEmailCode";if(ajax_verifLoginPwdEmailCode(b,f,d.login.value,e,d.email.value,d.code.value)){b=d.action+"&action=ajax_verifVilleDfpn";if(G_MODE_FCT=="dfpn"){if(ajax_verifVilleDfpn(b,d.ville.value,f)){d.pwd.value=e;submitForm(d);return true}}else{d.pwd.value=e;submitForm(d);return true}}}return false}function CheckRadio(a){a.checked=true}function VerifAddInscription(a){if(a.text1.value==""){alertCss(inscriptionCodeIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifInscription(a){if(a.text1.value==""){alertCss(inscriptionCodeIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifOpptions2(a){if(a.text2.value==""){alertCss(codeGroupIsEmpty,function(){a.text2.focus()});return(false)}if(a.text3.value==""){alertCss(codeSequenceIsEmpty,function(){a.text3.focus()});return(false)}if(a.text7.value==""){alertCss(uploadLimitIsEmpty,function(){a.text7.focus()});return(false)}if(a.text8.value==""){alertCss(numOfCharsIsEmpty,function(){a.text8.focus()});return(false)}submitForm(a)}function VerifAddDomaine(a){if(a.text1.value==""){alertCss(hostIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifAddMatiere(a){if(a.text1.value==""){alertCss(domainNameIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifModifMatiere(a){if(a.text1.value==""){alertCss(domainNameIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifInportCSVForm(a){if(a.text1.value==""){alertCss(fileIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function ModifContenuForm(b,a){contenu=document.getElementById(b).value;window.location.href=a+"&contenu="+escape(contenu)}function VerifAddSerie(a){if(a.text1.value==""){alertCss(titleIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function VerifImportCSVSerie(a){if(a.text1.value==""){alertCss(fileIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function substr_count(a,b){var c=cnt=offset=0;while((offset=a.indexOf(b,offset))!=-1){cnt++;offset++}return cnt}function VerifNbLigneEtTailleMaxi(d,c,a){var b=0;if((substr_count(d,"\n")+1)>a){return false}if(d.replace(/\n/g,"").length>c){return false}return true}function VerifQuestion(form){if(form.text1.value==""){alertCss(questionTitleIsEmpty,function(){form.text1.focus()});return(false)}if(!VerifNbLigneEtTailleMaxi(form.text1.value,255,7)){alertCss(quizzQuestionFormatError,function(){form.text1.focus()});return(false)}if(form.text2.value==""){alertCss(correctTextIsEmpty,function(){form.text2.focus()});return(false)}if(!VerifNbLigneEtTailleMaxi(form.text2.value,235,4)){alertCss(quizzTextCorrectFormatError,function(){form.text2.focus()});return(false)}if(form.text3.value==""){alertCss(incorrectTextIsEmpty,function(){form.text3.focus()});return(false)}if(!VerifNbLigneEtTailleMaxi(form.text3.value,235,4)){alertCss(quizzTextIncorrectFormatError,function(){form.text3.focus()});return(false)}if(form.text5.value==""){alertCss(questionPonderationIsEmpty,function(){form.text5.focus()});return(false)}if(isNaN(form.text5.value)){alertCss(questionPonderationMustBeInteger,function(){form.text5.focus()});return(false)}for(var i=6;i<=16;i=i+2){eval("var element = form.text"+i+";");if(element&&element.value&&element.value.length>0&&!VerifNbLigneEtTailleMaxi(element.value,60,2)){alertCss(quizzResponseFormatError,function(){element.focus()});return(false)}}submitForm(form)}function VerifNews(a){if(a.text1.value==""){alertCss(newsIsEmpty,function(){a.text1.focus()});return(false)}submitForm(a)}function verifPeriode(h,d){var a=(h.substring(0,2));var c=(h.substring(3,5));var b=(h.substring(6,8));var f=(d.substring(0,2));var j=(d.substring(3,5));var g=(d.substring(6,8));var e;if(b==g){if(c==j){if(a<=f){e=true}else{e=false}}else{if(c<j){e=true}else{e=false}}}else{if(b<g){e=true}else{e=false}}return e}function StatistiquesStagiaire(c){if(c.text1.value==""||c.text2.value==""){alertCss(startAndEndDateAreEmpty,function(){c.text1.focus()});return(false)}else{if(!verifPeriode(c.text1.value,c.text2.value)){alertCss(datePeriodInvalid);return false}}var b=false;var a=false;if(c.elements["groupe[]"]){if(typeof(c.elements["groupe[]"].length)!="undefined"){b=c.elements["groupe[]"].selectedIndex>-1}else{b=c.elements["groupe[]"].selected}}if(c.elements["societe[]"]){if(typeof(c.elements["societe[]"].length)!="undefined"){boucleSociete:for(i=0;i<c.elements["societe[]"].length;i++){if(c.elements["societe[]"][i].selected){a=true;break boucleSociete}}}else{a=c.elements["societe[]"].selected}}if(b==true&&a==true){alertCss(selectOnlyGroupOrSociety);return false}if(!b&&!a){alertCss(selectAtLeastOneGroupOrSociety);return false}return true}function VerifStatistiqueStagiaire(a){if(StatistiquesStagiaire(a)){submitForm(a);return(true)}else{return(false)}}function VerifStatistiqueStagiaireMultiple(a){if(a.text1.value!=""&&a.text2.value!=""){if(!verifPeriode(a.text1.value,a.text2.value)){alertCss(datePeriodInvalid);return false}}submitForm(a);return(true)}function ExportStatistiqueStagiaire(d,c){var b=1;var a="";if(StatistiquesStagiaire(d)){if(d.elements["groupe[]"]){if(typeof(d.elements["groupe[]"].length)!="undefined"){for(i=0;i<d.elements["groupe[]"].length;i++){if(d.elements["groupe[]"][i].selected){a+=d.elements["groupe[]"][i].value+";"}}}else{if(d.elements["groupe[]"].selected){a=d.elements["groupe[]"].value}}}if(d.elements["societe[]"]){if(typeof(d.elements["societe[]"].length)!="undefined"){for(i=0;i<d.elements["societe[]"].length;i++){if(d.elements["societe[]"][i].selected){a+=d.elements["societe[]"][i].value+";";b=0}}}else{if(d.elements["societe[]"].selected){a=d.elements["societe[]"].value;b=0}}}thewin=window.open(c+"&groupe_societe="+b+"&id="+a+"&datedebut="+d.text1.value+"&datefin="+d.text2.value,"tst","width=10,height=10")}return true}var statistiqueStagiaireSelectGroupe_selected=true;function statistiqueStagiaireSelectGroupe_all(){if(document.formGroupe.elements["groupe[]"]){if(typeof(document.formGroupe.elements["groupe[]"].length)!="undefined"){for(i=0;i<document.formGroupe.elements["groupe[]"].length;i++){document.formGroupe.elements["groupe[]"][i].selected=statistiqueStagiaireSelectGroupe_selected}}else{document.formSociete.elements["societe[]"].selected=statistiqueStagiaireSelectGroupe_selected}if(statistiqueStagiaireSelectGroupe_selected){statistiqueStagiaireSelectSociete_selected=false;statistiqueStagiaireSelectSociete_all()}statistiqueStagiaireSelectGroupe_selected=!statistiqueStagiaireSelectGroupe_selected}return(true)}function statistiqueStagiaireUnSelectGroupe_all(){statistiqueStagiaireSelectGroupe_selected=false;statistiqueStagiaireSelectGroupe_all();return(true)}var statistiqueStagiaireSelectSociete_selected=true;function statistiqueStagiaireSelectSociete_all(){if(document.formSociete.elements["societe[]"]){if(typeof(document.formSociete.elements["societe[]"].length)!="undefined"){for(i=0;i<document.formSociete.elements["societe[]"].length;i++){document.formSociete.elements["societe[]"][i].selected=statistiqueStagiaireSelectSociete_selected}}else{document.formGroupe.elements["societe[]"].selected=statistiqueStagiaireSelectSociete_selected}if(statistiqueStagiaireSelectSociete_selected){statistiqueStagiaireSelectGroupe_selected=false;statistiqueStagiaireSelectGroupe_all()}statistiqueStagiaireSelectSociete_selected=!statistiqueStagiaireSelectSociete_selected}return(true)}function statistiqueStagiaireUnSelectSociete_all(){statistiqueStagiaireSelectSociete_selected=false;statistiqueStagiaireSelectSociete_all();return(true)}function ChangeFormActivite(a){switch(a){case"0":alertCss("titre");break;case"1":alertCss("Document asset");break;case"2":alertCss("Ganesha chapitre lu");break;case"3":alertCss("Activite terminee");break;case"4":alertCss("AICC");break;case"5":alertCss("SCORM 1.2");break;case"6":alertCss("ACT_COLLAB");break;default:alertCss("default");break}}function testerWebService(a){loadingLayout.show();$.ajax({url:G_URL+"ganesha/admin/site.php?connexion="+G_CNX+"&action=ajax_testWebService",type:"POST",data:{ws_url:a.ws_url.value,login:a.ws_login.value,password:a.ws_password.value},success:function(b){loadingLayout.hide();alertCss(b)}})}function VerifChampsRequis(a){if(checkRequiredFormFields(a)){submitForm(a)}}function CheckAfficherCertificat(){setTimeout(function(){if($("#activer_certificat").attr("checked")==true){$("#afficher_resultat_final").attr("checked",true)}},50)};

function array(a){for(i=0;i<a;i++){this[i]=0}this.length=a}function integer(a){return a%(4294967295+1)}function shr(d,c){d=integer(d);c=integer(c);if(d-2147483648>=0){d=d%2147483648;d>>=c;d+=1073741824>>(c-1)}else{d>>=c}return d}function shl1(b){b=b%2147483648;if(b&1073741824==1073741824){b-=1073741824;b*=2;b+=2147483648}else{b*=2}return b}function shl(d,c){d=integer(d);c=integer(c);for(var e=0;e<c;e++){d=shl1(d)}return d}function and(d,c){d=integer(d);c=integer(c);var f=(d-2147483648);var e=(c-2147483648);if(f>=0){if(e>=0){return((f&e)+2147483648)}else{return(f&c)}}else{if(e>=0){return(d&e)}else{return(d&c)}}}function or(d,c){d=integer(d);c=integer(c);var f=(d-2147483648);var e=(c-2147483648);if(f>=0){if(e>=0){return((f|e)+2147483648)}else{return((f|c)+2147483648)}}else{if(e>=0){return((d|e)+2147483648)}else{return(d|c)}}}function xor(d,c){d=integer(d);c=integer(c);var f=(d-2147483648);var e=(c-2147483648);if(f>=0){if(e>=0){return(f^e)}else{return((f^c)+2147483648)}}else{if(e>=0){return((d^e)+2147483648)}else{return(d^c)}}}function not(b){b=integer(b);return(4294967295-b)}var state=new array(4);var count=new array(2);count[0]=0;count[1]=0;var buffer=new array(64);var transformBuffer=new array(16);var digestBits=new array(16);var S11=7;var S12=12;var S13=17;var S14=22;var S21=5;var S22=9;var S23=14;var S24=20;var S31=4;var S32=11;var S33=16;var S34=23;var S41=6;var S42=10;var S43=15;var S44=21;function F(a,c,b){return or(and(a,c),and(not(a),b))}function G(a,c,b){return or(and(a,b),and(c,not(b)))}function H(a,c,b){return xor(xor(a,c),b)}function I(a,c,b){return xor(c,or(a,not(b)))}function rotateLeft(b,c){return or(shl(b,c),(shr(b,(32-c))))}function FF(g,f,m,l,e,h,k){g=g+F(f,m,l)+e+k;g=rotateLeft(g,h);g=g+f;return g}function GG(g,f,m,l,e,h,k){g=g+G(f,m,l)+e+k;g=rotateLeft(g,h);g=g+f;return g}function HH(g,f,m,l,e,h,k){g=g+H(f,m,l)+e+k;g=rotateLeft(g,h);g=g+f;return g}function II(g,f,m,l,e,h,k){g=g+I(f,m,l)+e+k;g=rotateLeft(g,h);g=g+f;return g}function transform(h,l){var g=0,f=0,m=0,k=0;var e=transformBuffer;g=state[0];f=state[1];m=state[2];k=state[3];for(i=0;i<16;i++){e[i]=and(h[i*4+l],255);for(j=1;j<4;j++){e[i]+=shl(and(h[i*4+j+l],255),j*8)}}g=FF(g,f,m,k,e[0],S11,3614090360);k=FF(k,g,f,m,e[1],S12,3905402710);m=FF(m,k,g,f,e[2],S13,606105819);f=FF(f,m,k,g,e[3],S14,3250441966);g=FF(g,f,m,k,e[4],S11,4118548399);k=FF(k,g,f,m,e[5],S12,1200080426);m=FF(m,k,g,f,e[6],S13,2821735955);f=FF(f,m,k,g,e[7],S14,4249261313);g=FF(g,f,m,k,e[8],S11,1770035416);k=FF(k,g,f,m,e[9],S12,2336552879);m=FF(m,k,g,f,e[10],S13,4294925233);f=FF(f,m,k,g,e[11],S14,2304563134);g=FF(g,f,m,k,e[12],S11,1804603682);k=FF(k,g,f,m,e[13],S12,4254626195);m=FF(m,k,g,f,e[14],S13,2792965006);f=FF(f,m,k,g,e[15],S14,1236535329);g=GG(g,f,m,k,e[1],S21,4129170786);k=GG(k,g,f,m,e[6],S22,3225465664);m=GG(m,k,g,f,e[11],S23,643717713);f=GG(f,m,k,g,e[0],S24,3921069994);g=GG(g,f,m,k,e[5],S21,3593408605);k=GG(k,g,f,m,e[10],S22,38016083);m=GG(m,k,g,f,e[15],S23,3634488961);f=GG(f,m,k,g,e[4],S24,3889429448);g=GG(g,f,m,k,e[9],S21,568446438);k=GG(k,g,f,m,e[14],S22,3275163606);m=GG(m,k,g,f,e[3],S23,4107603335);f=GG(f,m,k,g,e[8],S24,1163531501);g=GG(g,f,m,k,e[13],S21,2850285829);k=GG(k,g,f,m,e[2],S22,4243563512);m=GG(m,k,g,f,e[7],S23,1735328473);f=GG(f,m,k,g,e[12],S24,2368359562);g=HH(g,f,m,k,e[5],S31,4294588738);k=HH(k,g,f,m,e[8],S32,2272392833);m=HH(m,k,g,f,e[11],S33,1839030562);f=HH(f,m,k,g,e[14],S34,4259657740);g=HH(g,f,m,k,e[1],S31,2763975236);k=HH(k,g,f,m,e[4],S32,1272893353);m=HH(m,k,g,f,e[7],S33,4139469664);f=HH(f,m,k,g,e[10],S34,3200236656);g=HH(g,f,m,k,e[13],S31,681279174);k=HH(k,g,f,m,e[0],S32,3936430074);m=HH(m,k,g,f,e[3],S33,3572445317);f=HH(f,m,k,g,e[6],S34,76029189);g=HH(g,f,m,k,e[9],S31,3654602809);k=HH(k,g,f,m,e[12],S32,3873151461);m=HH(m,k,g,f,e[15],S33,530742520);f=HH(f,m,k,g,e[2],S34,3299628645);g=II(g,f,m,k,e[0],S41,4096336452);k=II(k,g,f,m,e[7],S42,1126891415);m=II(m,k,g,f,e[14],S43,2878612391);f=II(f,m,k,g,e[5],S44,4237533241);g=II(g,f,m,k,e[12],S41,1700485571);k=II(k,g,f,m,e[3],S42,2399980690);m=II(m,k,g,f,e[10],S43,4293915773);f=II(f,m,k,g,e[1],S44,2240044497);g=II(g,f,m,k,e[8],S41,1873313359);k=II(k,g,f,m,e[15],S42,4264355552);m=II(m,k,g,f,e[6],S43,2734768916);f=II(f,m,k,g,e[13],S44,1309151649);g=II(g,f,m,k,e[4],S41,4149444226);k=II(k,g,f,m,e[11],S42,3174756917);m=II(m,k,g,f,e[2],S43,718787259);f=II(f,m,k,g,e[9],S44,3951481745);state[0]+=g;state[1]+=f;state[2]+=m;state[3]+=k}function init(){count[0]=count[1]=0;state[0]=1732584193;state[1]=4023233417;state[2]=2562383102;state[3]=271733878;for(i=0;i<digestBits.length;i++){digestBits[i]=0}}function update(a){var c,d;c=and(shr(count[0],3),63);if(count[0]<4294967295-7){count[0]+=8}else{count[1]++;count[0]-=4294967295+1;count[0]+=8}buffer[c]=and(a,255);if(c>=63){transform(buffer,0)}}function finish(){var d=new array(8);var e;var c=0,b=0,a=0;for(c=0;c<4;c++){d[c]=and(shr(count[0],(c*8)),255)}for(c=0;c<4;c++){d[c+4]=and(shr(count[1],(c*8)),255)}b=and(shr(count[0],3),63);a=(b<56)?(56-b):(120-b);e=new array(64);e[0]=128;for(c=0;c<a;c++){update(e[c])}for(c=0;c<8;c++){update(d[c])}for(c=0;c<4;c++){for(j=0;j<4;j++){digestBits[c*4+j]=and(shr(state[c],(j*8)),255)}}}function hexa(d){var c="0123456789abcdef";var a="";var b=d;for(hexa_i=0;hexa_i<8;hexa_i++){a=c.charAt(Math.abs(b)%16)+a;b=Math.floor(b/16)}return a}var ascii="01234567890123456789012345678901 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";function MD5(a){var b,g,c,h,f,e,d;init();for(c=0;c<a.length;c++){b=a.charAt(c);update(ascii.lastIndexOf(b))}finish();h=f=e=d=0;for(i=0;i<4;i++){h+=shl(digestBits[15-i],(i*8))}for(i=4;i<8;i++){f+=shl(digestBits[15-i],((i-4)*8))}for(i=8;i<12;i++){e+=shl(digestBits[15-i],((i-8)*8))}for(i=12;i<16;i++){d+=shl(digestBits[15-i],((i-12)*8))}g=hexa(d)+hexa(e)+hexa(f)+hexa(h);return g};

var tooltip={tooltipElement:null,delay:1500,offsetx:10,offsety:25,mouse:{x:0,y:0},timeMouseOver:null,display:false,saveOnMouseMove:null};tooltip.getTooltipElement=function(b){var c=MD5(b);if(document.getElementById(c)){var a=document.getElementById(c)}else{var a=document.createElement("div");a.id=c;a.className="tooltip";a.style.display="none";document.getElementsByTagName("body")[0].appendChild(a)}return a};tooltip.show=function(c,a){this.timeMouseOver=(new Date()).getTime();var b=!!a;this.display=true;this.tooltipElement=this.getTooltipElement(c);this.saveOnMouseMove=document.onmousemove;document.onmousemove=this.mouseMove;this.move();if(b){this.tooltipElement.innerHTML=c}if(this.tooltipElement.innerHTML.length>0){this.delay=200}else{this.delay=1500}if(this.delay>0){setTimeout(function(){tooltip.showDelayed(c)},this.delay)}else{this.showDelayed(c)}};tooltip.showDelayed=function(c){var b=this.timeMouseOver+this.delay;var a=(new Date()).getTime();if(a>=b&&this.display){this.tooltipElement.style.display="block";if(this.tooltipElement.innerHTML.length==0){this.loadContent(c)}this.move()}};tooltip.loadContent=function(a){(function(c,b){if(!$(c).is(".tooltip-load")){$(c).addClass("tooltip-load");$.get(b,function(d){$(c).removeClass("tooltip-load");c.innerHTML=d})}})(tooltip.tooltipElement,a)};tooltip.hide=function(){if(!document.getElementById){return}document.onmousemove=this.saveOnMouseMove;this.tooltipElement.style.display="none";this.display=false};tooltip.mouseMove=function(a){a=getStandardEvent(a);if(a.pageX!=undefined){tooltip.mouse.x=a.pageX;tooltip.mouse.y=a.pageY}else{if(a.clientX!=undefined){if(document.documentElement){tooltip.mouse.x=a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft);tooltip.mouse.y=a.clientY+(document.documentElement.scrollTop||document.body.scrollTop)}else{tooltip.mouse.x=a.clientX+document.body.scrollLeft;tooltip.mouse.y=a.clientY+document.body.scrollTop}}else{tooltip.mouse.x=0;tooltip.mouse.y=0}}tooltip.move()};tooltip.move=function(){var b,f;if(self.innerHeight){b=self.innerWidth;f=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;f=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;f=document.body.clientHeight}}}var c,d;if(typeof(window.pageYOffset)=="number"){c=window.pageYOffset;d=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){c=document.body.scrollTop;d=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){c=document.documentElement.scrollTop;d=document.documentElement.scrollLeft}}}b=parseInt(b);f=parseInt(f);c=parseInt(c);c=isNaN(c)?0:c;d=parseInt(d);d=isNaN(d)?0:d;var a=this.mouse.x+this.offsetx;var e=this.mouse.y+this.offsety;if(this.mouse.x>((b/2)+d)){this.tooltipElement.style.right=(b-a+this.offsetx)+"px";this.tooltipElement.style.left=""}else{this.tooltipElement.style.left=a+"px";this.tooltipElement.style.right=""}if(this.mouse.y>((f/2)+c)){if($.browser.msie&&navigator.appVersion.indexOf("MSIE 6.0")!=-1){this.tooltipElement.style.bottom=c+f-this.mouse.y+this.offsety+"px";this.tooltipElement.style.top=""}else{this.tooltipElement.style.bottom=(f-e+this.offsety*1.5)+"px";this.tooltipElement.style.top=""}}else{this.tooltipElement.style.top=e+"px";this.tooltipElement.style.bottom=""}};

function showTab(f){var g=f.target;var a=$(g);var c=a.attr("href");var d=c.substring(c.lastIndexOf("#"),c.length);var b=$(d);b.parent().find(">div").hide();b.show();a.parent().parent().find("a").removeClass("tab_active");a.addClass("tab_active");if(a.attr("rel")&&b.html().length==0){setTimeout(function(){loadTabContent(d,a.attr("rel"))},100)}else{initSlider()}f.preventDefault();return false}function reloadTabContent(b,c){var a=b;while(a.parentNode){if(a.className&&$(a).is(".tab_content")){loadTabContent("#"+a.id,c);break}a=a.parentNode}}function loadTabContent(a,b){if(!$(a).is(".tab_load")){$(a).addClass("tab_load");$(a).html("&nbsp;");$.get(b,function(c){$(a).removeClass("tab_load");$(a).html(c);initComponents()})}}function initTabs(){var c,d,b,a;$("ul.tab_menu_section a[@href]").filter(":not(.tab_initialize)").each(function(){$(this).click(function(f){showTab(f);return false}).addClass("tab_initialize")})}function ajaxDeleteAndReloadTab(b,a,c){var b=b;var a=a;var c=c;confirmCss(removeUserConfirm,function(){setTimeout(function(){loadingLayout.show();$.get(a,function(d){var d=d;loadingLayout.hide();reloadTabContent(b,c);setTimeout(function(){processXmlHttpResponse(d)},1000)})},1000)})}function activeTab(a){$("a[@href*="+a+"]").click()}function removeTab(b){var a=$("a[@href*="+b+"]");if(!a.is(".tab_default")){a.parents("ul:first").find("a.tab_default:first").click();a.unbind("click").parent("li").hide("slow",function(){$(this).remove()});$("#"+b).remove()}}function getTabsRelContext(a){return $(a).parents("div[@rel]:first").attr("rel")}function getTabContext(a){return $(a).parents("div.tab_content:first").attr("id")}$(document).ready(function(){initTabs()});

var loadingLayout={layout:document.createElement("div"),layoutId:"global-loading",loadingImageWidth:128,loadingImageHeight:128,documentBody:null};loadingLayout.init=function(){loadingLayout.layout.id=loadingLayout.layoutId;loadingLayout.documentBody=document.getElementsByTagName("body")[0]};loadingLayout.show=function(){var b=this.getPageSize();var d=this.getPageScroll();var f=(d[0])?d[0]:0;var e=(d[1])?d[1]:0;var c=f+((b[2]-this.loadingImageWidth)/2);var a=e+((b[3]-this.loadingImageHeight)/2);this.layout.style.height=b[1]+"px";this.layout.style.backgroundPosition=c+"px "+a+"px";this.layout.style.position="absolute";this.documentBody.appendChild(this.layout)};loadingLayout.hide=function(){this.documentBody.removeChild(this.layout)};loadingLayout.getPageScroll=function(){var a,b;if(self.pageYOffset){a=self.pageYOffset;b=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft}else{if(document.body){a=document.body.scrollTop;b=document.body.scrollLeft}}}arrayPageScroll=new Array(b,a);return arrayPageScroll};loadingLayout.getPageSize=function(){var e,a;if(window.innerHeight&&window.scrollMaxY){e=document.body.scrollWidth;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){e=document.body.scrollWidth;a=document.body.scrollHeight}else{e=document.body.offsetWidth;a=document.body.offsetHeight}}var c,f;if(self.innerHeight){c=self.innerWidth;f=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){c=document.documentElement.clientWidth;f=document.documentElement.clientHeight}else{if(document.body){c=document.body.clientWidth;f=document.body.clientHeight}}}var d;if(a<f){d=f}else{d=a}var b;if(e<c){b=c}else{b=e}arrayPageSize=new Array(b,d,c,f);return arrayPageSize};$(document).ready(function(){loadingLayout.init()});

var confirmCSS_HTML,alertCSS_HTML;confirmCSS_HTML='<div class="confirmBox">';confirmCSS_HTML+='<input type="button" value="{ANNULER}" title="{ANNULER}" class="close closeCross">';confirmCSS_HTML+="<h1>{TITRE}</h1>";confirmCSS_HTML+='<p class="message">{MESSAGE}</p>';confirmCSS_HTML+='<p class="button">';confirmCSS_HTML+='<input type="button" value="{OUI}" title="{OUI}" class="close yes">';confirmCSS_HTML+='<input type="button" value="{NON}" title="{NON}" class="close no">';confirmCSS_HTML+='<input type="button" value="{ANNULER}" title="{ANNULER}" class="close cancel">';confirmCSS_HTML+="</p>";confirmCSS_HTML+="</div>";alertCSS_HTML='<div class="alertBox">';alertCSS_HTML+='<input type="button" value="{FERMER}" title="{FERMER}" class="close closeCross">';alertCSS_HTML+="<h1>{TITRE}</h1>";alertCSS_HTML+='<p class="message">{MESSAGE}</p>';alertCSS_HTML+='<p class="button">';alertCSS_HTML+='<input type="button" value="{FERMER}" title="{FERMER}" class="close closeButton">';alertCSS_HTML+="</p>";alertCSS_HTML+="</div>";function alertConfirmCommon(b,c,a){c=!!c;return $(b).appendTo(document.body).jqm({trigger:false,overlay:60,overlayClass:"alertOverlay",closeClass:"close",modal:c,onShow:show=function(d){if($.browser.msie&&navigator.appVersion.indexOf("MSIE 6.0")!=-1){$("select:visible").hide().addClass("x-select-filter")}setTimeout(function(){d.w.fadeIn("normal").css("height","250px").css("width","500px").jqDrag("h1");if($.browser.msie){d.w.viewportCenter()}else{d.w.css({position:"fixed",top:"50%",left:"50%",marginTop:"-125px",marginLeft:"-250px"})}},100)},onHide:function(d){d.w.fadeOut("fast",function(){d.o.fadeOut("fast",function(){d.o.remove()});d.w.remove();if($.browser.msie&&navigator.appVersion.indexOf("MSIE 6.0")!=-1){$("select.x-select-filter").show().removeClass("x-select-filter")}if($.isFunction(a)){a()}})}}).jqmShow()}function alertCss(b,d,c){var a=alertCSS_HTML;a=a.replace(/{FERMER}+/g,closeText);a=a.replace(/{TITRE}+/g,alertTitle);a=a.replace(/{MESSAGE}+/g,b);return alertConfirmCommon(a,c,d)}function confirmCss(f,a,d,b){var e=confirmCSS_HTML;e=e.replace(/{ANNULER}+/g,cancelText);e=e.replace(/{TITRE}+/g,confirmationRequired);e=e.replace(/{MESSAGE}+/g,f);e=e.replace(/{OUI}+/g,yesText);e=e.replace(/{NON}+/g,noText);var c=alertConfirmCommon(e,true);if($.isFunction(a)){$(c).find("input.yes").click(a)}if($.isFunction(d)){$(c).find("input.no").click(d)}if($.isFunction(b)){$(c).find("input.cancel").click(b)}return c};

if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=b[e].split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]]}}return g};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c)}else{return false}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules;if(!k[a]){k[a]={versions:[],builds:[]}}var c=k[a],j=e.version,h=e.build,g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(var d=0;d<g.length;d=d+1){g[d](c)}if(f){f.VERSION=j;f.BUILD=h}else{YAHOO.log("mainClass is undefined for module "+a,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null};YAHOO.env.ua=function(){var c={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var b=navigator.userAgent,a;if((/KHTML/).test(b)){c.webkit=1}a=b.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){c.webkit=parseFloat(a[1]);if(/ Mobile\//.test(b)){c.mobile="Apple"}else{a=b.match(/NokiaN[^\/]*/);if(a){c.mobile=a[0]}}a=b.match(/AdobeAIR\/([^\s]*)/);if(a){c.air=a[0]}}if(!c.webkit){a=b.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){c.opera=parseFloat(a[1]);a=b.match(/Opera Mini[^;]*/);if(a){c.mobile=a[0]}}else{a=b.match(/MSIE\s([^;]*)/);if(a&&a[1]){c.ie=parseFloat(a[1])}else{a=b.match(/Gecko\/([^\s]*)/);if(a){c.gecko=1;a=b.match(/rv:([^\s\)]*)/);if(a&&a[1]){c.gecko=parseFloat(a[1])}}}}}return c}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c=c+1){if(a[c]==b){d=false;break}}if(d){a.push(b)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var a=YAHOO.lang,c=["toString","valueOf"],b={isArray:function(d){if(d){return a.isNumber(d.length)&&a.isFunction(d.splice)}return false},isBoolean:function(d){return typeof d==="boolean"},isFunction:function(d){return typeof d==="function"},isNull:function(d){return d===null},isNumber:function(d){return typeof d==="number"&&isFinite(d)},isObject:function(d){return(d&&(typeof d==="object"||a.isFunction(d)))||false},isString:function(d){return typeof d==="string"},isUndefined:function(d){return typeof d==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(g,e){for(var d=0;d<c.length;d=d+1){var j=c[d],h=e[j];if(a.isFunction(h)&&h!=Object.prototype[j]){g[j]=h}}}:function(){},extend:function(g,h,f){if(!h||!g){throw new Error("extend failed, please check that all dependencies are included.")}var e=function(){};e.prototype=h.prototype;g.prototype=new e();g.prototype.constructor=g;g.superclass=h.prototype;if(h.prototype.constructor==Object.prototype.constructor){h.prototype.constructor=h}if(f){for(var d in f){if(a.hasOwnProperty(f,d)){g.prototype[d]=f[d]}}a._IEEnumFix(g.prototype,f)}},augmentObject:function(h,g){if(!g||!h){throw new Error("Absorb failed, verify dependencies.")}var d=arguments,f,j,e=d[2];if(e&&e!==true){for(f=2;f<d.length;f=f+1){h[d[f]]=g[d[f]]}}else{for(j in g){if(e||!(j in h)){h[j]=g[j]}}a._IEEnumFix(h,g)}},augmentProto:function(g,f){if(!f||!g){throw new Error("Augment failed, verify dependencies.")}var d=[g.prototype,f.prototype];for(var e=2;e<arguments.length;e=e+1){d.push(arguments[e])}a.augmentObject.apply(this,d)},dump:function(e,k){var g,j,m=[],n="{...}",f="f(){...}",l=", ",h=" => ";if(!a.isObject(e)){return e+""}else{if(e instanceof Date||("nodeType" in e&&"tagName" in e)){return e}else{if(a.isFunction(e)){return f}}}k=(a.isNumber(k))?k:3;if(a.isArray(e)){m.push("[");for(g=0,j=e.length;g<j;g=g+1){if(a.isObject(e[g])){m.push((k>0)?a.dump(e[g],k-1):n)}else{m.push(e[g])}m.push(l)}if(m.length>1){m.pop()}m.push("]")}else{m.push("{");for(g in e){if(a.hasOwnProperty(e,g)){m.push(g+h);if(a.isObject(e[g])){m.push((k>0)?a.dump(e[g],k-1):n)}else{m.push(e[g])}m.push(l)}}if(m.length>1){m.pop()}m.push("}")}return m.join("")},substitute:function(z,e,q){var m,l,h,u,w,y,t=[],g,n="dump",r=" ",d="{",x="}";for(;;){m=z.lastIndexOf(d);if(m<0){break}l=z.indexOf(x,m);if(m+1>=l){break}g=z.substring(m+1,l);u=g;y=null;h=u.indexOf(r);if(h>-1){y=u.substring(h+1);u=u.substring(0,h)}w=e[u];if(q){w=q(u,w,y)}if(a.isObject(w)){if(a.isArray(w)){w=a.dump(w,parseInt(y,10))}else{y=y||"";var p=y.indexOf(n);if(p>-1){y=y.substring(4)}if(w.toString===Object.prototype.toString||p>-1){w=a.dump(w,parseInt(y,10))}else{w=w.toString()}}}else{if(!a.isString(w)&&!a.isNumber(w)){w="~-"+t.length+"-~";t[t.length]=g}}z=z.substring(0,m)+w+z.substring(l+1)}for(m=t.length-1;m>=0;m=m-1){z=z.replace(new RegExp("~-"+m+"-~"),"{"+t[m]+"}","g")}return z},trim:function(d){try{return d.replace(/^\s+|\s+$/g,"")}catch(f){return d}},merge:function(){var g={},e=arguments;for(var f=0,d=e.length;f<d;f=f+1){a.augmentObject(g,e[f],true)}return g},later:function(n,g,p,i,j){n=n||0;g=g||{};var h=p,l=i,k,e;if(a.isString(p)){h=g[p]}if(!h){throw new TypeError("method undefined")}if(!a.isArray(l)){l=[i]}k=function(){h.apply(g,l)};e=(j)?setInterval(k,n):setTimeout(k,n);return{interval:j,cancel:function(){if(this.interval){clearInterval(e)}else{clearTimeout(e)}}}},isValue:function(d){return(a.isObject(d)||a.isString(d)||a.isNumber(d)||a.isBoolean(d))}};a.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(d,e){return d&&d.hasOwnProperty(e)}:function(d,e){return !a.isUndefined(d[e])&&d.constructor.prototype[e]!==d[e]};b.augmentObject(a,b,true);YAHOO.util.Lang=a;a.augment=a.augmentProto;YAHOO.augment=a.augmentProto;YAHOO.extend=a.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.6.0",build:"1321"});

(function(){var b=YAHOO.util,f=YAHOO.lang,l,j,k={},g={},n=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var c=YAHOO.env.ua.opera,m=YAHOO.env.ua.webkit,a=YAHOO.env.ua.gecko,h=YAHOO.env.ua.ie;var e={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var o=function(q){if(!e.HYPHEN.test(q)){return q}if(k[q]){return k[q]}var r=q;while(e.HYPHEN.exec(r)){r=r.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())}k[q]=r;return r};var p=function(r){var q=g[r];if(!q){q=new RegExp("(?:^|\\s+)"+r+"(?:\\s+|$)");g[r]=q}return q};if(n.defaultView&&n.defaultView.getComputedStyle){l=function(q,t){var s=null;if(t=="float"){t="cssFloat"}var r=q.ownerDocument.defaultView.getComputedStyle(q,"");if(r){s=r[o(t)]}return q.style[t]||s}}else{if(n.documentElement.currentStyle&&h){l=function(q,s){switch(o(s)){case"opacity":var u=100;try{u=q.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(t){try{u=q.filters("alpha").opacity}catch(t){}}return u/100;case"float":s="styleFloat";default:var r=q.currentStyle?q.currentStyle[s]:null;return(q.style[s]||r)}}}else{l=function(q,r){return q.style[r]}}}if(h){j=function(q,r,s){switch(r){case"opacity":if(f.isString(q.style.filter)){q.style.filter="alpha(opacity="+s*100+")";if(!q.currentStyle||!q.currentStyle.hasLayout){q.style.zoom=1}}break;case"float":r="styleFloat";default:q.style[r]=s}}}else{j=function(q,r,s){if(r=="float"){r="cssFloat"}q.style[r]=s}}var d=function(q,r){return q&&q.nodeType==1&&(!r||r(q))};YAHOO.util.Dom={get:function(s){if(s){if(s.nodeType||s.item){return s}if(typeof s==="string"){return n.getElementById(s)}if("length" in s){var t=[];for(var r=0,q=s.length;r<q;++r){t[t.length]=b.Dom.get(s[r])}return t}return s}return null},getStyle:function(q,s){s=o(s);var r=function(t){return l(t,s)};return b.Dom.batch(q,r,b.Dom,true)},setStyle:function(q,s,t){s=o(s);var r=function(u){j(u,s,t)};b.Dom.batch(q,r,b.Dom,true)},getXY:function(q){var r=function(s){if((s.parentNode===null||s.offsetParent===null||this.getStyle(s,"display")=="none")&&s!=s.ownerDocument.body){return false}return i(s)};return b.Dom.batch(q,r,b.Dom,true)},getX:function(q){var r=function(s){return b.Dom.getXY(s)[0]};return b.Dom.batch(q,r,b.Dom,true)},getY:function(q){var r=function(s){return b.Dom.getXY(s)[1]};return b.Dom.batch(q,r,b.Dom,true)},setXY:function(q,t,s){var r=function(w){var v=this.getStyle(w,"position");if(v=="static"){this.setStyle(w,"position","relative");v="relative"}var y=this.getXY(w);if(y===false){return false}var x=[parseInt(this.getStyle(w,"left"),10),parseInt(this.getStyle(w,"top"),10)];if(isNaN(x[0])){x[0]=(v=="relative")?0:w.offsetLeft}if(isNaN(x[1])){x[1]=(v=="relative")?0:w.offsetTop}if(t[0]!==null){w.style.left=t[0]-y[0]+x[0]+"px"}if(t[1]!==null){w.style.top=t[1]-y[1]+x[1]+"px"}if(!s){var u=this.getXY(w);if((t[0]!==null&&u[0]!=t[0])||(t[1]!==null&&u[1]!=t[1])){this.setXY(w,t,true)}}};b.Dom.batch(q,r,b.Dom,true)},setX:function(r,q){b.Dom.setXY(r,[q,null])},setY:function(q,r){b.Dom.setXY(q,[null,r])},getRegion:function(q){var r=function(s){if((s.parentNode===null||s.offsetParent===null||this.getStyle(s,"display")=="none")&&s!=s.ownerDocument.body){return false}var t=b.Region.getRegion(s);return t};return b.Dom.batch(q,r,b.Dom,true)},getClientWidth:function(){return b.Dom.getViewportWidth()},getClientHeight:function(){return b.Dom.getViewportHeight()},getElementsByClassName:function(u,y,v,w){u=f.trim(u);y=y||"*";v=(v)?b.Dom.get(v):null||n;if(!v){return[]}var r=[],q=v.getElementsByTagName(y),x=p(u);for(var s=0,t=q.length;s<t;++s){if(x.test(q[s].className)){r[r.length]=q[s];if(w){w.call(q[s],q[s])}}}return r},hasClass:function(s,r){var q=p(r);var t=function(u){return q.test(u.className)};return b.Dom.batch(s,t,b.Dom,true)},addClass:function(r,q){var s=function(t){if(this.hasClass(t,q)){return false}t.className=f.trim([t.className,q].join(" "));return true};return b.Dom.batch(r,s,b.Dom,true)},removeClass:function(s,r){var q=p(r);var t=function(w){var v=false,x=w.className;if(r&&x&&this.hasClass(w,r)){w.className=x.replace(q," ");if(this.hasClass(w,r)){this.removeClass(w,r)}w.className=f.trim(w.className);if(w.className===""){var u=(w.hasAttribute)?"class":"className";w.removeAttribute(u)}v=true}return v};return b.Dom.batch(s,t,b.Dom,true)},replaceClass:function(t,r,q){if(!q||r===q){return false}var s=p(r);var u=function(v){if(!this.hasClass(v,r)){this.addClass(v,q);return true}v.className=v.className.replace(s," "+q+" ");if(this.hasClass(v,r)){this.removeClass(v,r)}v.className=f.trim(v.className);return true};return b.Dom.batch(t,u,b.Dom,true)},generateId:function(q,s){s=s||"yui-gen";var r=function(t){if(t&&t.id){return t.id}var u=s+YAHOO.env._id_counter++;if(t){t.id=u}return u};return b.Dom.batch(q,r,b.Dom,true)||r.apply(b.Dom,arguments)},isAncestor:function(r,s){r=b.Dom.get(r);s=b.Dom.get(s);var q=false;if((r&&s)&&(r.nodeType&&s.nodeType)){if(r.contains&&r!==s){q=r.contains(s)}else{if(r.compareDocumentPosition){q=!!(r.compareDocumentPosition(s)&16)}}}else{}return q},inDocument:function(q){return this.isAncestor(n.documentElement,q)},getElementsBy:function(x,r,s,u){r=r||"*";s=(s)?b.Dom.get(s):null||n;if(!s){return[]}var t=[],w=s.getElementsByTagName(r);for(var v=0,q=w.length;v<q;++v){if(x(w[v])){t[t.length]=w[v];if(u){u(w[v])}}}return t},batch:function(u,x,w,s){u=(u&&(u.tagName||u.item))?u:b.Dom.get(u);if(!u||!x){return false}var t=(s)?w:window;if(u.tagName||u.length===undefined){return x.call(t,u,w)}var v=[];for(var r=0,q=u.length;r<q;++r){v[v.length]=x.call(t,u[r],w)}return v},getDocumentHeight:function(){var r=(n.compatMode!="CSS1Compat")?n.body.scrollHeight:n.documentElement.scrollHeight;var q=Math.max(r,b.Dom.getViewportHeight());return q},getDocumentWidth:function(){var r=(n.compatMode!="CSS1Compat")?n.body.scrollWidth:n.documentElement.scrollWidth;var q=Math.max(r,b.Dom.getViewportWidth());return q},getViewportHeight:function(){var q=self.innerHeight;var r=n.compatMode;if((r||h)&&!c){q=(r=="CSS1Compat")?n.documentElement.clientHeight:n.body.clientHeight}return q},getViewportWidth:function(){var q=self.innerWidth;var r=n.compatMode;if(r||h){q=(r=="CSS1Compat")?n.documentElement.clientWidth:n.body.clientWidth}return q},getAncestorBy:function(q,r){while((q=q.parentNode)){if(d(q,r)){return q}}return null},getAncestorByClassName:function(r,q){r=b.Dom.get(r);if(!r){return null}var s=function(t){return b.Dom.hasClass(t,q)};return b.Dom.getAncestorBy(r,s)},getAncestorByTagName:function(r,q){r=b.Dom.get(r);if(!r){return null}var s=function(t){return t.tagName&&t.tagName.toUpperCase()==q.toUpperCase()};return b.Dom.getAncestorBy(r,s)},getPreviousSiblingBy:function(q,r){while(q){q=q.previousSibling;if(d(q,r)){return q}}return null},getPreviousSibling:function(q){q=b.Dom.get(q);if(!q){return null}return b.Dom.getPreviousSiblingBy(q)},getNextSiblingBy:function(q,r){while(q){q=q.nextSibling;if(d(q,r)){return q}}return null},getNextSibling:function(q){q=b.Dom.get(q);if(!q){return null}return b.Dom.getNextSiblingBy(q)},getFirstChildBy:function(q,s){var r=(d(q.firstChild,s))?q.firstChild:null;return r||b.Dom.getNextSiblingBy(q.firstChild,s)},getFirstChild:function(q,r){q=b.Dom.get(q);if(!q){return null}return b.Dom.getFirstChildBy(q)},getLastChildBy:function(q,s){if(!q){return null}var r=(d(q.lastChild,s))?q.lastChild:null;return r||b.Dom.getPreviousSiblingBy(q.lastChild,s)},getLastChild:function(q){q=b.Dom.get(q);return b.Dom.getLastChildBy(q)},getChildrenBy:function(r,t){var s=b.Dom.getFirstChildBy(r,t);var q=s?[s]:[];b.Dom.getNextSiblingBy(s,function(u){if(!t||t(u)){q[q.length]=u}return false});return q},getChildren:function(q){q=b.Dom.get(q);if(!q){}return b.Dom.getChildrenBy(q)},getDocumentScrollLeft:function(q){q=q||n;return Math.max(q.documentElement.scrollLeft,q.body.scrollLeft)},getDocumentScrollTop:function(q){q=q||n;return Math.max(q.documentElement.scrollTop,q.body.scrollTop)},insertBefore:function(r,q){r=b.Dom.get(r);q=b.Dom.get(q);if(!r||!q||!q.parentNode){return null}return q.parentNode.insertBefore(r,q)},insertAfter:function(r,q){r=b.Dom.get(r);q=b.Dom.get(q);if(!r||!q||!q.parentNode){return null}if(q.nextSibling){return q.parentNode.insertBefore(r,q.nextSibling)}else{return q.parentNode.appendChild(r)}},getClientRegion:function(){var u=b.Dom.getDocumentScrollTop(),s=b.Dom.getDocumentScrollLeft(),v=b.Dom.getViewportWidth()+s,q=b.Dom.getViewportHeight()+u;return new b.Region(u,v,q,s)}};var i=function(){if(n.documentElement.getBoundingClientRect){return function(s){var t=s.getBoundingClientRect(),r=Math.round;var q=s.ownerDocument;return[r(t.left+b.Dom.getDocumentScrollLeft(q)),r(t.top+b.Dom.getDocumentScrollTop(q))]}}else{return function(s){var t=[s.offsetLeft,s.offsetTop];var r=s.offsetParent;var q=(m&&b.Dom.getStyle(s,"position")=="absolute"&&s.offsetParent==s.ownerDocument.body);if(r!=s){while(r){t[0]+=r.offsetLeft;t[1]+=r.offsetTop;if(!q&&m&&b.Dom.getStyle(r,"position")=="absolute"){q=true}r=r.offsetParent}}if(q){t[0]-=s.ownerDocument.body.offsetLeft;t[1]-=s.ownerDocument.body.offsetTop}r=s.parentNode;while(r.tagName&&!e.ROOT_TAG.test(r.tagName)){if(r.scrollTop||r.scrollLeft){t[0]-=r.scrollLeft;t[1]-=r.scrollTop}r=r.parentNode}return t}}}()})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this[0]=c};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top);var e=Math.min(this.right,f.right);var a=Math.min(this.bottom,f.bottom);var c=Math.max(this.left,f.left);if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c)}else{return null}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top);var e=Math.max(this.right,f.right);var a=Math.max(this.bottom,f.bottom);var c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c)};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}")};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e);var d=g[1];var f=g[0]+e.offsetWidth;var a=g[1]+e.offsetHeight;var c=g[0];return new YAHOO.util.Region(d,f,a,c)};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0]}this.x=this.right=this.left=this[0]=a;this.y=this.top=this.bottom=this[1]=b};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.6.0",build:"1321"});

YAHOO.util.CustomEvent=function(d,b,c,a){this.type=d;this.scope=b||window;this.silent=c;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var e="_YUICEOnSubscribe";if(d!==e){this.subscribeEvent=new YAHOO.util.CustomEvent(e,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,a){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,a)}this.subscribers.push(new YAHOO.util.Subscriber(b,c,a))},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll()}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true}}return e},fire:function(){this.lastError=null;var m=[],f=this.subscribers.length;if(!f&&this.silent){return true}var k=[].slice.call(arguments,0),h=true,d,l=false;if(!this.silent){}var c=this.subscribers.slice(),a=YAHOO.util.Event.throwErrors;for(d=0;d<f;++d){var o=c[d];if(!o){l=true}else{if(!this.silent){}var n=o.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var b=null;if(k.length>0){b=k[0]}try{h=o.fn.call(n,b,o.obj)}catch(g){this.lastError=g;if(a){throw g}}}else{try{h=o.fn.call(n,this.type,k,o.obj)}catch(j){this.lastError=j;if(a){throw j}}}if(false===h){if(!this.silent){}break}}}return(h!==false)},unsubscribeAll:function(){for(var a=this.subscribers.length-1;a>-1;a--){this._delete(a)}this.subscribers=[];return a},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj}this.subscribers.splice(a,1)},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope}};YAHOO.util.Subscriber=function(b,c,a){this.fn=b;this.obj=YAHOO.lang.isUndefined(c)?null:c;this.override=a};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.override){if(this.override===true){return this.obj}else{return this.override}}return a};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b)}else{return(this.fn==a)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var h=false;var i=[];var j=[];var g=[];var e=[];var c=0;var f=[];var b=[];var a=0;var d={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var k=YAHOO.env.ua.ie?"focusin":"focus";var l=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var m=this;var n=function(){m._tryPreloadAttach()};this._interval=setInterval(n,this.POLL_INTERVAL)}},onAvailable:function(r,o,s,q,p){var m=(YAHOO.lang.isString(r))?[r]:r;for(var n=0;n<m.length;n=n+1){f.push({id:m[n],fn:o,obj:s,override:q,checkReady:p})}c=this.POLL_RETRYS;this.startInterval()},onContentReady:function(o,m,p,n){this.onAvailable(o,m,p,n,true)},onDOMReady:function(m,o,n){if(this.DOMReady){setTimeout(function(){var p=window;if(n){if(n===true){p=o}else{p=n}}m.call(p,"DOMReady",[],o)},0)}else{this.DOMReadyEvent.subscribe(m,o,n)}},_addListener:function(o,m,x,s,n,A){if(!x||!x.call){return false}if(this._isValidCollection(o)){var y=true;for(var t=0,v=o.length;t<v;++t){y=this._addListener(o[t],m,x,s,n,A)&&y}return y}else{if(YAHOO.lang.isString(o)){var r=this.getEl(o);if(r){o=r}else{this.onAvailable(o,function(){YAHOO.util.Event._addListener(o,m,x,s,n,A)});return true}}}if(!o){return false}if("unload"==m&&s!==this){j[j.length]=[o,m,x,s,n,A];return true}var B=o;if(n){if(n===true){B=s}else{B=n}}var p=function(C){return x.call(B,YAHOO.util.Event.getEvent(C,o),s)};var z=[o,m,x,p,B,s,n,A];var u=i.length;i[u]=z;if(this.useLegacyEvent(o,m)){var q=this.getLegacyIndex(o,m);if(q==-1||o!=g[q][0]){q=g.length;b[o.id+m]=q;g[q]=[o,m,o["on"+m]];e[q]=[];o["on"+m]=function(C){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(C),q)}}e[q].push(z)}else{try{this._simpleAdd(o,m,p,A)}catch(w){this.lastError=w;this._removeListener(o,m,x,A);return false}}return true},addListener:function(o,q,n,p,m){return this._addListener(o,q,n,p,m,false)},addFocusListener:function(o,n,p,m){return this._addListener(o,k,n,p,m,true)},removeFocusListener:function(n,m){return this._removeListener(n,k,m,true)},addBlurListener:function(o,n,p,m){return this._addListener(o,l,n,p,m,true)},removeBlurListener:function(n,m){return this._removeListener(n,l,m,true)},fireLegacyEvent:function(q,o){var s=true,m,u,t,v,r;u=e[o].slice();for(var n=0,p=u.length;n<p;++n){t=u[n];if(t&&t[this.WFN]){v=t[this.ADJ_SCOPE];r=t[this.WFN].call(v,q);s=(s&&r)}}m=g[o];if(m&&m[2]){m[2](q)}return s},getLegacyIndex:function(n,o){var m=this.generateId(n)+o;if(typeof b[m]=="undefined"){return -1}else{return b[m]}},useLegacyEvent:function(m,n){return(this.webkit&&this.webkit<419&&("click"==n||"dblclick"==n))},_removeListener:function(n,m,v,y){var q,t,x;if(typeof n=="string"){n=this.getEl(n)}else{if(this._isValidCollection(n)){var w=true;for(q=n.length-1;q>-1;q--){w=(this._removeListener(n[q],m,v,y)&&w)}return w}}if(!v||!v.call){return this.purgeElement(n,false,m)}if("unload"==m){for(q=j.length-1;q>-1;q--){x=j[q];if(x&&x[0]==n&&x[1]==m&&x[2]==v){j.splice(q,1);return true}}return false}var r=null;var s=arguments[4];if("undefined"===typeof s){s=this._getCacheIndex(n,m,v)}if(s>=0){r=i[s]}if(!n||!r){return false}if(this.useLegacyEvent(n,m)){var p=this.getLegacyIndex(n,m);var o=e[p];if(o){for(q=0,t=o.length;q<t;++q){x=o[q];if(x&&x[this.EL]==n&&x[this.TYPE]==m&&x[this.FN]==v){o.splice(q,1);break}}}}else{try{this._simpleRemove(n,m,r[this.WFN],y)}catch(u){this.lastError=u;return false}}delete i[s][this.WFN];delete i[s][this.FN];i.splice(s,1);return true},removeListener:function(n,o,m){return this._removeListener(n,o,m,false)},getTarget:function(o,n){var m=o.target||o.srcElement;return this.resolveTextNode(m)},resolveTextNode:function(o){try{if(o&&3==o.nodeType){return o.parentNode}}catch(m){}return o},getPageX:function(n){var m=n.pageX;if(!m&&0!==m){m=n.clientX||0;if(this.isIE){m+=this._getScrollLeft()}}return m},getPageY:function(m){var n=m.pageY;if(!n&&0!==n){n=m.clientY||0;if(this.isIE){n+=this._getScrollTop()}}return n},getXY:function(m){return[this.getPageX(m),this.getPageY(m)]},getRelatedTarget:function(n){var m=n.relatedTarget;if(!m){if(n.type=="mouseout"){m=n.toElement}else{if(n.type=="mouseover"){m=n.fromElement}}}return this.resolveTextNode(m)},getTime:function(o){if(!o.time){var n=new Date().getTime();try{o.time=n}catch(m){this.lastError=m;return n}}return o.time},stopEvent:function(m){this.stopPropagation(m);this.preventDefault(m)},stopPropagation:function(m){if(m.stopPropagation){m.stopPropagation()}else{m.cancelBubble=true}},preventDefault:function(m){if(m.preventDefault){m.preventDefault()}else{m.returnValue=false}},getEvent:function(o,m){var n=o||window.event;if(!n){var p=this.getEvent.caller;while(p){n=p.arguments[0];if(n&&Event==n.constructor){break}p=p.caller}}return n},getCharCode:function(n){var m=n.keyCode||n.charCode||0;if(YAHOO.env.ua.webkit&&(m in d)){m=d[m]}return m},_getCacheIndex:function(q,r,p){for(var o=0,n=i.length;o<n;o=o+1){var m=i[o];if(m&&m[this.FN]==p&&m[this.EL]==q&&m[this.TYPE]==r){return o}}return -1},generateId:function(m){var n=m.id;if(!n){n="yuievtautoid-"+a;++a;m.id=n}return n},_isValidCollection:function(n){try{return(n&&typeof n!=="string"&&n.length&&!n.tagName&&!n.alert&&typeof n[0]!=="undefined")}catch(m){return false}},elCache:{},getEl:function(m){return(typeof m==="string")?document.getElementById(m):m},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(n){if(!h){h=true;var m=YAHOO.util.Event;m._ready();m._tryPreloadAttach()}},_ready:function(n){var m=YAHOO.util.Event;if(!m.DOMReady){m.DOMReady=true;m.DOMReadyEvent.fire();m._simpleRemove(document,"DOMContentLoaded",m._ready)}},_tryPreloadAttach:function(){if(f.length===0){c=0;clearInterval(this._interval);this._interval=null;return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var s=!h;if(!s){s=(c>0&&f.length>0)}var r=[];var t=function(v,w){var u=v;if(w.override){if(w.override===true){u=w.obj}else{u=w.override}}w.fn.call(u,w.obj)};var n,m,q,p,o=[];for(n=0,m=f.length;n<m;n=n+1){q=f[n];if(q){p=this.getEl(q.id);if(p){if(q.checkReady){if(h||p.nextSibling||!s){o.push(q);f[n]=null}}else{t(p,q);f[n]=null}}else{r.push(q)}}}for(n=0,m=o.length;n<m;n=n+1){q=o[n];t(this.getEl(q.id),q)}c--;if(s){for(n=f.length-1;n>-1;n--){q=f[n];if(!q||!q.id){f.splice(n,1)}}this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false},purgeElement:function(q,r,t){var o=(YAHOO.lang.isString(q))?this.getEl(q):q;var s=this.getListeners(o,t),p,m;if(s){for(p=s.length-1;p>-1;p--){var n=s[p];this._removeListener(o,n.type,n.fn,n.capture)}}if(r&&o&&o.childNodes){for(p=0,m=o.childNodes.length;p<m;++p){this.purgeElement(o.childNodes[p],r,t)}}},getListeners:function(o,m){var r=[],n;if(!m){n=[i,j]}else{if(m==="unload"){n=[j]}else{n=[i]}}var t=(YAHOO.lang.isString(o))?this.getEl(o):o;for(var q=0;q<n.length;q=q+1){var v=n[q];if(v){for(var s=0,u=v.length;s<u;++s){var p=v[s];if(p&&p[this.EL]===t&&(!m||m===p[this.TYPE])){r.push({type:p[this.TYPE],fn:p[this.FN],obj:p[this.OBJ],adjust:p[this.OVERRIDE],scope:p[this.ADJ_SCOPE],capture:p[this.CAPTURE],index:s})}}}}return(r.length)?r:null},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice();for(p=0,r=j.length;p<r;++p){n=t[p];if(n){var u=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){u=n[m.UNLOAD_OBJ]}else{u=n[m.ADJ_SCOPE]}}n[m.FN].call(u,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);t[p]=null;n=null;u=null}}j=null;if(i){for(o=i.length-1;o>-1;o--){n=i[o];if(n){m._removeListener(n[m.EL],n[m.TYPE],n[m.FN],n[m.CAPTURE],o)}}n=null}g=null;m._simpleRemove(window,"unload",m._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var m=document.documentElement,n=document.body;if(m&&(m.scrollTop||m.scrollLeft)){return[m.scrollTop,m.scrollLeft]}else{if(n){return[n.scrollTop,n.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(o,p,n,m){o.addEventListener(p,n,(m))}}else{if(window.attachEvent){return function(o,p,n,m){o.attachEvent("on"+p,n)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(o,p,n,m){o.removeEventListener(p,n,(m))}}else{if(window.detachEvent){return function(n,o,m){n.detachEvent("on"+o,m)}}else{return function(){}}}}()}}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
if(a.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null}catch(c){}},a.POLL_INTERVAL)}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready()}},a.POLL_INTERVAL)}else{a._simpleAdd(document,"DOMContentLoaded",a._ready)}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e)}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[]}b[a].push({fn:c,obj:f,override:e})}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g)}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g)}}return b}return false},unsubscribeAll:function(a){return this.unsubscribe(a)},createEvent:function(g,d){this.__yui_events=this.__yui_events||{};var a=d||{};var j=this.__yui_events;if(j[g]){}else{var h=a.scope||this;var e=(a.silent);var b=new YAHOO.util.CustomEvent(g,h,e,YAHOO.util.CustomEvent.FLAT);j[g]=b;if(a.onSubscribeCallback){b.subscribeEvent.subscribe(a.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var f=this.__yui_subscribers[g];if(f){for(var c=0;c<f.length;++c){b.subscribe(f[c].fn,f[c].obj,f[c].override)}}}return j[g]},fireEvent:function(e,d,a,c){this.__yui_events=this.__yui_events||{};var g=this.__yui_events[e];if(!g){return null}var b=[];for(var f=1;f<arguments.length;++f){b.push(arguments[f])}return g.fire.apply(g,b)},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true}}return false}};YAHOO.util.KeyListener=function(a,f,b,c){if(!a){}else{if(!f){}else{if(!b){}}}if(!c){c=YAHOO.util.KeyListener.KEYDOWN}var d=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof a=="string"){a=document.getElementById(a)}if(typeof b=="function"){d.subscribe(b)}else{d.subscribe(b.fn,b.scope,b.correctScope)}function e(k,j){if(!f.shift){f.shift=false}if(!f.alt){f.alt=false}if(!f.ctrl){f.ctrl=false}if(k.shiftKey==f.shift&&k.altKey==f.alt&&k.ctrlKey==f.ctrl){var g;if(f.keys instanceof Array){for(var h=0;h<f.keys.length;h++){g=f.keys[h];if(g==k.charCode){d.fire(k.charCode,k);break}else{if(g==k.keyCode){d.fire(k.keyCode,k);break}}}}else{g=f.keys;if(g==k.charCode){d.fire(k.charCode,k)}else{if(g==k.keyCode){d.fire(k.keyCode,k)}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(a,c,e);this.enabledEvent.fire(f)}this.enabled=true};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(a,c,e);this.disabledEvent.fire(f)}this.enabled=false};this.toString=function(){return"KeyListener ["+f.keys+"] "+a.tagName+(a.id?"["+a.id+"]":"")}};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.6.0",build:"1321"});

if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var a=YAHOO.util.Event,b=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var c=document.createElement("div");c.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(c,document.body.firstChild)}else{document.body.appendChild(c)}c.style.display="none";c.style.backgroundColor="red";c.style.position="absolute";c.style.zIndex="99999";b.setStyle(c,"opacity","0");this._shim=c;a.on(c,"mouseup",this.handleMouseUp,this,true);a.on(c,"mousemove",this.handleMouseMove,this,true);a.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var c=this._shim;c.style.height=b.getDocumentHeight()+"px";c.style.width=b.getDocumentWidth()+"px";c.style.top="0";c.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var c=this._shim,d="0";if(this._debugShim){d=".5"}b.setStyle(c,"opacity",d);this._sizeShim();c.style.display="block"}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(e,d){for(var f in this.ids){for(var c in this.ids[f]){var g=this.ids[f][c];if(!this.isTypeOfDD(g)){continue}g[e].apply(g,d)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(c){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(d,c){if(!this.initialized){this.init()}if(!this.ids[c]){this.ids[c]={}}this.ids[c][d.id]=d},removeDDFromGroup:function(e,c){if(!this.ids[c]){this.ids[c]={}}var d=this.ids[c];if(d&&d[e.id]){delete d[e.id]}},_remove:function(e){for(var d in e.groups){if(d){var c=this.ids[d];if(c&&c[e.id]){delete c[e.id]}}}delete this.handleIds[e.id]},regHandle:function(d,c){if(!this.handleIds[d]){this.handleIds[d]={}}this.handleIds[d][c]=c},isDragDrop:function(c){return(this.getDDById(c))?true:false},getRelated:function(h,d){var g=[];for(var f in h.groups){for(var e in this.ids[f]){var c=this.ids[f][e];if(!this.isTypeOfDD(c)){continue}if(!d||c.isTarget){g[g.length]=c}}}return g},isLegalTarget:function(g,f){var d=this.getRelated(g,true);for(var e=0,c=d.length;e<c;++e){if(d[e].id==f.id){return true}}return false},isTypeOfDD:function(c){return(c&&c.__ygDragDrop)},isHandle:function(d,c){return(this.handleIds[d]&&this.handleIds[d][c])},getDDById:function(d){for(var c in this.ids){if(this.ids[c][d]){return this.ids[c][d]}}return null},handleMouseDown:function(f,d){this.currentTarget=YAHOO.util.Event.getTarget(f);this.dragCurrent=d;var c=d.getEl();this.startX=YAHOO.util.Event.getPageX(f);this.startY=YAHOO.util.Event.getPageY(f);this.deltaX=this.startX-c.offsetLeft;this.deltaY=this.startY-c.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var e=YAHOO.util.DDM;e.startDrag(e.startX,e.startY);e.fromTimeout=true},this.clickTimeThresh)},startDrag:function(c,e){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var d=this.dragCurrent;if(d&&d.events.b4StartDrag){d.b4StartDrag(c,e);d.fireEvent("b4StartDragEvent",{x:c,y:e})}if(d&&d.events.startDrag){d.startDrag(c,e);d.fireEvent("startDragEvent",{x:c,y:e})}this.dragThreshMet=true},handleMouseUp:function(c){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(c)}this.fromTimeout=false;this.fireEvents(c,true)}else{}this.stopDrag(c);this.stopEvent(c)}},stopEvent:function(c){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(c)}if(this.preventDefault){YAHOO.util.Event.preventDefault(c)}},stopDrag:function(f,d){var c=this.dragCurrent;if(c&&!d){if(this.dragThreshMet){if(c.events.b4EndDrag){c.b4EndDrag(f);c.fireEvent("b4EndDragEvent",{e:f})}if(c.events.endDrag){c.endDrag(f);c.fireEvent("endDragEvent",{e:f})}}if(c.events.mouseUp){c.onMouseUp(f);c.fireEvent("mouseUpEvent",{e:f})}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false}}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(g){var c=this.dragCurrent;if(c){if(YAHOO.util.Event.isIE&&!g.button){this.stopEvent(g);return this.handleMouseUp(g)}else{if(g.clientX<0||g.clientY<0){}}if(!this.dragThreshMet){var f=Math.abs(this.startX-YAHOO.util.Event.getPageX(g));var d=Math.abs(this.startY-YAHOO.util.Event.getPageY(g));if(f>this.clickPixelThresh||d>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(c&&c.events.b4Drag){c.b4Drag(g);c.fireEvent("b4DragEvent",{e:g})}if(c&&c.events.drag){c.onDrag(g);c.fireEvent("dragEvent",{e:g})}if(c){this.fireEvents(g,false)}}this.stopEvent(g)}},fireEvents:function(z,n){var E=this.dragCurrent;if(!E||E.isLocked()||E.dragOnly){return}var p=YAHOO.util.Event.getPageX(z),o=YAHOO.util.Event.getPageY(z),r=new YAHOO.util.Point(p,o),m=E.getTargetCoord(r.x,r.y),g=E.getDragEl(),f=["out","over","drop","enter"],w=new YAHOO.util.Region(m.y,m.x+g.offsetWidth,m.y+g.offsetHeight,m.x),k=[],d={},s=[],F={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var u in this.dragOvers){var G=this.dragOvers[u];if(!this.isTypeOfDD(G)){continue}if(!this.isOverTarget(r,G,this.mode,w)){F.outEvts.push(G)}k[u]=true;delete this.dragOvers[u]}for(var t in E.groups){if("string"!=typeof t){continue}for(u in this.ids[t]){var h=this.ids[t][u];if(!this.isTypeOfDD(h)){continue}if(h.isTarget&&!h.isLocked()&&h!=E){if(this.isOverTarget(r,h,this.mode,w)){d[t]=true;if(n){F.dropEvts.push(h)}else{if(!k[h.id]){F.enterEvts.push(h)}else{F.overEvts.push(h)}this.dragOvers[h.id]=h}}}}}this.interactionInfo={out:F.outEvts,enter:F.enterEvts,over:F.overEvts,drop:F.dropEvts,point:r,draggedRegion:w,sourceRegion:this.locationCache[E.id],validDrop:n};for(var c in d){s.push(c)}if(n&&!F.dropEvts.length){this.interactionInfo.validDrop=false;if(E.events.invalidDrop){E.onInvalidDrop(z);E.fireEvent("invalidDropEvent",{e:z})}}for(u=0;u<f.length;u++){var C=null;if(F[f[u]+"Evts"]){C=F[f[u]+"Evts"]}if(C&&C.length){var j=f[u].charAt(0).toUpperCase()+f[u].substr(1),B="onDrag"+j,l="b4Drag"+j,q="drag"+j+"Event",A="drag"+j;if(this.mode){if(E.events[l]){E[l](z,C,s);E.fireEvent(l+"Event",{event:z,info:C,group:s})}if(E.events[A]){E[B](z,C,s);E.fireEvent(q,{event:z,info:C,group:s})}}else{for(var D=0,v=C.length;D<v;++D){if(E.events[l]){E[l](z,C[D].id,s[0]);E.fireEvent(l+"Event",{event:z,info:C[D].id,group:s[0]})}if(E.events[A]){E[B](z,C[D].id,s[0]);E.fireEvent(q,{event:z,info:C[D].id,group:s[0]})}}}}}},getBestMatch:function(e){var g=null;var d=e.length;if(d==1){g=e[0]}else{for(var f=0;f<d;++f){var c=e[f];if(this.mode==this.INTERSECT&&c.cursorIsOver){g=c;break}else{if(!g||!g.overlap||(c.overlap&&g.overlap.getArea()<c.overlap.getArea())){g=c}}}}return g},refreshCache:function(d){var f=d||this.ids;for(var c in f){if("string"!=typeof c){continue}for(var e in this.ids[c]){var h=this.ids[c][e];if(this.isTypeOfDD(h)){var j=this.getLocation(h);if(j){this.locationCache[h.id]=j}else{delete this.locationCache[h.id]}}}}},verifyEl:function(d){try{if(d){var c=d.offsetParent;if(c){return true}}}catch(f){}return false},getLocation:function(i){if(!this.isTypeOfDD(i)){return null}var g=i.getEl(),m,f,d,o,n,p,c,k,h;try{m=YAHOO.util.Dom.getXY(g)}catch(j){}if(!m){return null}f=m[0];d=f+g.offsetWidth;o=m[1];n=o+g.offsetHeight;p=o-i.padding[0];c=d+i.padding[1];k=n+i.padding[2];h=f-i.padding[3];return new YAHOO.util.Region(p,c,k,h)},isOverTarget:function(k,c,e,f){var g=this.locationCache[c.id];if(!g||!this.useCache){g=this.getLocation(c);this.locationCache[c.id]=g}if(!g){return false}c.cursorIsOver=g.contains(k);var j=this.dragCurrent;if(!j||(!e&&!j.constrainX&&!j.constrainY)){return c.cursorIsOver}c.overlap=null;if(!f){var h=j.getTargetCoord(k.x,k.y);var d=j.getDragEl();f=new YAHOO.util.Region(h.y,h.x+d.offsetWidth,h.y+d.offsetHeight,h.x)}var i=f.intersect(g);if(i){c.overlap=i;return(e)?true:c.cursorIsOver}else{return false}},_onUnload:function(d,c){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(d){var c=this.elementCache[d];if(!c||!c.el){c=this.elementCache[d]=new this.ElementWrapper(YAHOO.util.Dom.get(d))}return c},getElement:function(c){return YAHOO.util.Dom.get(c)},getCss:function(d){var c=YAHOO.util.Dom.get(d);return(c)?c.style:null},ElementWrapper:function(c){this.el=c||null;this.id=this.el&&c.id;this.css=this.el&&c.style},getPosX:function(c){return YAHOO.util.Dom.getX(c)},getPosY:function(c){return YAHOO.util.Dom.getY(c)},swapNode:function(e,c){if(e.swapNode){e.swapNode(c)}else{var f=c.parentNode;var d=c.nextSibling;if(d==e){f.insertBefore(e,c)}else{if(c==e.nextSibling){f.insertBefore(c,e)}else{e.parentNode.replaceChild(c,e);f.insertBefore(e,d)}}}},getScroll:function(){var e,c,f=document.documentElement,d=document.body;if(f&&(f.scrollTop||f.scrollLeft)){e=f.scrollTop;c=f.scrollLeft}else{if(d){e=d.scrollTop;c=d.scrollLeft}else{}}return{top:e,left:c}},getStyle:function(d,c){return YAHOO.util.Dom.getStyle(d,c)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(c,e){var d=YAHOO.util.Dom.getXY(e);YAHOO.util.Dom.setXY(c,d)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){var c=YAHOO.util.DDM;if(YAHOO.util.Event&&document){c._onLoad()}else{if(c._timeoutCount>2000){}else{setTimeout(c._addListeners,10);if(document&&document.body){c._timeoutCount+=1}}}},handleWasClicked:function(c,e){if(this.isHandle(e,c.id)){return true}else{var d=c.parentNode;while(d){if(this.isHandle(e,d.id)){return true}else{d=d.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var a=YAHOO.util.Event;var b=YAHOO.util.Dom;YAHOO.util.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments)},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=b.get(this.id)}return this._domRef},getDragEl:function(){return b.get(this.dragElId)},init:function(f,c,d){this.initTarget(f,c,d);a.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var e in this.events){this.createEvent(e+"Event")}},initTarget:function(e,c,d){this.config=d||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof e!=="string"){this._domRef=e;e=b.generateId(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;a.onAvailable(e,this.handleOnAvailable,this,true);this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var c in this.config.events){if(this.config.events[c]===false){this.events[c]=false}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,f,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!f&&0!==f){this.padding=[e,c,e,c]}else{this.padding=[e,c,f,d]}}},setInitPosition:function(f,e){var g=this.getEl();if(!this.DDM.verifyEl(g)){if(g&&g.style&&(g.style.display=="none")){}else{}return}var d=f||0;var c=e||0;var h=b.getXY(g);this.initPageX=h[0]-d;this.initPageY=h[1]-c;this.lastPageX=h[0];this.lastPageY=h[1];this.setStartPosition(h)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=b.generateId(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=b.generateId(c)}a.on(c,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(k,j){var d=k.which||k.button;if(this.primaryButtonOnly&&d>1){return}if(this.isLocked()){return}var c=this.b4MouseDown(k),g=true;if(this.events.b4MouseDown){g=this.fireEvent("b4MouseDownEvent",k)}var f=this.onMouseDown(k),i=true;if(this.events.mouseDown){i=this.fireEvent("mouseDownEvent",k)}if((c===false)||(f===false)||(g===false)||(i===false)){return}this.DDM.refreshCache(this.groups);var h=new YAHOO.util.Point(a.getPageX(k),a.getPageY(k));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(h,this)){}else{if(this.clickValidator(k)){this.setStartPosition();this.DDM.handleMouseDown(k,this);this.DDM.stopEvent(k)}else{}}},clickValidator:function(d){var c=YAHOO.util.Event.getTarget(d);return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},getTargetCoord:function(e,d){var c=e-this.deltaX;var f=d-this.deltaY;if(this.constrainX){if(c<this.minX){c=this.minX}if(c>this.maxX){c=this.maxX}}if(this.constrainY){if(f<this.minY){f=this.minY}if(f>this.maxY){f=this.maxY}}c=this.getTick(c,this.xTicks);f=this.getTick(f,this.yTicks);return{x:c,y:f}},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=b.generateId(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=b.generateId(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e<c;++e){if(this.invalidHandleClasses[e]==d){delete this.invalidHandleClasses[e]}}},isValidHandleChild:function(g){var f=true;var j;try{j=g.nodeName.toUpperCase()}catch(h){j=g.nodeName}f=f&&!this.invalidHandleTypes[j];f=f&&!this.invalidHandleIds[g.id];for(var d=0,c=this.invalidHandleClasses.length;f&&d<c;++d){f=!b.hasClass(g,this.invalidHandleClasses[d])}return f},setXTicks:function(f,c){this.xTicks=[];this.xTickSize=c;var e={};for(var d=this.initPageX;d>=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(f,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=parseInt(e,10);this.rightConstraint=parseInt(d,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=parseInt(c,10);this.bottomConstraint=parseInt(e,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(j,f){if(!f){return j}else{if(f[0]>=j){return f[0]}else{for(var d=0,c=f.length;d<c;++d){var e=d+1;if(f[e]&&f[e]>=j){var h=j-f[d];var g=f[e]-j;return(g>h)?f[d]:f[e]}}return f[f.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(c,a,b){if(c){this.init(c,a,b)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,g,f){var e=this.getTargetCoord(g,f);if(!this.deltaSetXY){var h=[e.x,e.y];YAHOO.util.Dom.setXY(c,h);var d=parseInt(YAHOO.util.Dom.getStyle(c,"left"),10);var b=parseInt(YAHOO.util.Dom.getStyle(c,"top"),10);this.deltaSetXY=[d-e.x,b-e.y]}else{YAHOO.util.Dom.setStyle(c,"left",(e.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(c,"top",(e.y+this.deltaSetXY[1])+"px")}this.cachePosition(e.x,e.y);var a=this;setTimeout(function(){a.autoScroll.call(a,e.x,e.y,c.offsetHeight,c.offsetWidth)},0)},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(k,j,e,l){if(this.scroll){var m=this.DDM.getClientHeight();var b=this.DDM.getClientWidth();var o=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var i=e+j;var n=l+k;var g=(m+o-j-this.deltaY);var f=(b+d-k-this.deltaX);var c=40;var a=(document.all)?80:30;if(i>m&&g<c){window.scrollTo(d,o+a)}if(j<o&&o>0&&j-o<c){window.scrollTo(d,o-a)}if(n>b&&f<c){window.scrollTo(d+a,o)}if(k<d&&d>0&&k-d<c){window.scrollTo(d-a,o)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(a),YAHOO.util.Event.getPageY(a))},b4Drag:function(a){this.setDragElPos(YAHOO.util.Event.getPageX(a),YAHOO.util.Event.getPageY(a))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this,a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var g=this.getDragEl(),e=YAHOO.util.Dom;if(!g){g=document.createElement("div");g.id=this.dragElId;var d=g.style;d.position="absolute";d.visibility="hidden";d.cursor="move";d.border="2px solid #aaa";d.zIndex=999;d.height="25px";d.width="25px";var c=document.createElement("div");e.setStyle(c,"height","100%");e.setStyle(c,"width","100%");e.setStyle(c,"background-color","#ccc");e.setStyle(c,"opacity","0");g.appendChild(c);if(YAHOO.env.ua.ie){var f=document.createElement("iframe");f.setAttribute("src","javascript: false;");f.setAttribute("scrolling","no");f.setAttribute("frameborder","0");g.insertBefore(f,g.firstChild);e.setStyle(f,"height","100%");e.setStyle(f,"width","100%");e.setStyle(f,"position","absolute");e.setStyle(f,"top","0");e.setStyle(f,"left","0");e.setStyle(f,"opacity","0");e.setStyle(f,"zIndex","-1");e.setStyle(f.nextSibling,"zIndex","2")}a.insertBefore(g,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);YAHOO.util.Dom.setStyle(a,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var h=YAHOO.util.Dom;var b=this.getEl();var c=this.getDragEl();var g=parseInt(h.getStyle(c,"borderTopWidth"),10);var i=parseInt(h.getStyle(c,"borderRightWidth"),10);var f=parseInt(h.getStyle(c,"borderBottomWidth"),10);var d=parseInt(h.getStyle(c,"borderLeftWidth"),10);if(isNaN(g)){g=0}if(isNaN(i)){i=0}if(isNaN(f)){f=0}if(isNaN(d)){d=0}var e=Math.max(0,b.offsetWidth-i-d);var a=Math.max(0,b.offsetHeight-g-f);h.setStyle(c,"width",e+"px");h.setStyle(c,"height",a+"px")}},b4MouseDown:function(b){this.setStartPosition();var a=YAHOO.util.Event.getPageX(b);var c=YAHOO.util.Event.getPageY(b);this.autoOffset(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(d){var c=YAHOO.util.Dom;var b=this.getEl();var a=this.getDragEl();c.setStyle(a,"visibility","");c.setStyle(b,"visibility","hidden");YAHOO.util.DDM.moveToEl(b,a);c.setStyle(a,"visibility","hidden");c.setStyle(b,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id)}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.6.0",build:"1321"});

YAHOO.widget.Slider=function(c,a,b,d){YAHOO.widget.Slider.ANIM_AVAIL=(!YAHOO.lang.isUndefined(YAHOO.util.Anim));if(c){this.init(c,a,true);this.initSlider(d);this.initThumb(b)}};YAHOO.widget.Slider.getHorizSlider=function(b,c,e,d,a){return new YAHOO.widget.Slider(b,b,new YAHOO.widget.SliderThumb(c,b,e,d,0,0,a),"horiz")};YAHOO.widget.Slider.getVertSlider=function(c,d,a,e,b){return new YAHOO.widget.Slider(c,c,new YAHOO.widget.SliderThumb(d,c,0,0,a,e,b),"vert")};YAHOO.widget.Slider.getSliderRegion=function(c,d,f,e,a,g,b){return new YAHOO.widget.Slider(c,c,new YAHOO.widget.SliderThumb(d,c,f,e,a,g,b),"region")};YAHOO.widget.Slider.ANIM_AVAIL=false;YAHOO.extend(YAHOO.widget.Slider,YAHOO.util.DragDrop,{dragOnly:true,initSlider:function(a){this.type=a;this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);this.isTarget=false;this.animate=YAHOO.widget.Slider.ANIM_AVAIL;this.backgroundEnabled=true;this.tickPause=40;this.enableKeys=true;this.keyIncrement=20;this.moveComplete=true;this.animationDuration=0.2;this.SOURCE_UI_EVENT=1;this.SOURCE_SET_VALUE=2;this.valueChangeSource=0;this._silent=false;this.lastOffset=[0,0]},initThumb:function(b){var a=this;this.thumb=b;b.cacheBetweenDrags=true;if(b._isHoriz&&b.xTicks&&b.xTicks.length){this.tickPause=Math.round(360/b.xTicks.length)}else{if(b.yTicks&&b.yTicks.length){this.tickPause=Math.round(360/b.yTicks.length)}}b.onAvailable=function(){return a.setStartSliderState()};b.onMouseDown=function(){return a.focus()};b.startDrag=function(){a._slideStart()};b.onDrag=function(){a.fireEvents(true)};b.onMouseUp=function(){a.thumbMouseUp()}},onAvailable:function(){var a=YAHOO.util.Event;a.on(this.id,"keydown",this.handleKeyDown,this,true);a.on(this.id,"keypress",this.handleKeyPress,this,true)},handleKeyPress:function(c){if(this.enableKeys){var a=YAHOO.util.Event;var b=a.getCharCode(c);switch(b){case 37:case 38:case 39:case 40:case 36:case 35:a.preventDefault(c);break;default:}}},handleKeyDown:function(f){if(this.enableKeys){var i=YAHOO.util.Event;var c=i.getCharCode(f),k=this.thumb;var b=this.getXValue(),g=this.getYValue();var j=false;var d=true;switch(c){case 37:b-=this.keyIncrement;break;case 38:g-=this.keyIncrement;break;case 39:b+=this.keyIncrement;break;case 40:g+=this.keyIncrement;break;case 36:b=k.leftConstraint;g=k.topConstraint;break;case 35:b=k.rightConstraint;g=k.bottomConstraint;break;default:d=false}if(d){if(k._isRegion){this.setRegionValue(b,g,true)}else{var a=(k._isHoriz)?b:g;this.setValue(a,true)}i.stopEvent(f)}}},setStartSliderState:function(){this.setThumbCenterPoint();this.baselinePos=YAHOO.util.Dom.getXY(this.getEl());this.thumb.startOffset=this.thumb.getOffsetFromParent(this.baselinePos);if(this.thumb._isRegion){if(this.deferredSetRegionValue){this.setRegionValue.apply(this,this.deferredSetRegionValue);this.deferredSetRegionValue=null}else{this.setRegionValue(0,0,true,true,true)}}else{if(this.deferredSetValue){this.setValue.apply(this,this.deferredSetValue);this.deferredSetValue=null}else{this.setValue(0,true,true,true)}}},setThumbCenterPoint:function(){var a=this.thumb.getEl();if(a){this.thumbCenterPoint={x:parseInt(a.offsetWidth/2,10),y:parseInt(a.offsetHeight/2,10)}}},lock:function(){this.thumb.lock();this.locked=true},unlock:function(){this.thumb.unlock();this.locked=false},thumbMouseUp:function(){if(!this.isLocked()&&!this.moveComplete){this.endMove()}},onMouseUp:function(){if(this.backgroundEnabled&&!this.isLocked()&&!this.moveComplete){this.endMove()}},getThumb:function(){return this.thumb},focus:function(){this.valueChangeSource=this.SOURCE_UI_EVENT;var a=this.getEl();if(a.focus){try{a.focus()}catch(b){}}this.verifyOffset();if(this.isLocked()){return false}else{this._slideStart();return true}},onChange:function(a,b){},onSlideStart:function(){},onSlideEnd:function(){},getValue:function(){return this.thumb.getValue()},getXValue:function(){return this.thumb.getXValue()},getYValue:function(){return this.thumb.getYValue()},handleThumbChange:function(){},setValue:function(g,c,d,a){this._silent=a;this.valueChangeSource=this.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetValue=arguments;return false}if(this.isLocked()&&!d){return false}if(isNaN(g)){return false}var b=this.thumb;b.lastOffset=[g,g];var f,e;this.verifyOffset(true);if(b._isRegion){return false}else{if(b._isHoriz){this._slideStart();f=b.initPageX+g+this.thumbCenterPoint.x;this.moveThumb(f,b.initPageY,c)}else{this._slideStart();e=b.initPageY+g+this.thumbCenterPoint.y;this.moveThumb(b.initPageX,e,c)}}return true},setRegionValue:function(h,a,d,e,b){this._silent=b;this.valueChangeSource=this.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetRegionValue=arguments;return false}if(this.isLocked()&&!e){return false}if(isNaN(h)){return false}var c=this.thumb;c.lastOffset=[h,a];this.verifyOffset(true);if(c._isRegion){this._slideStart();var g=c.initPageX+h+this.thumbCenterPoint.x;var f=c.initPageY+a+this.thumbCenterPoint.y;this.moveThumb(g,f,d);return true}return false},verifyOffset:function(b){var c=YAHOO.util.Dom.getXY(this.getEl()),a=this.thumb;if(c){if(c[0]!=this.baselinePos[0]||c[1]!=this.baselinePos[1]){this.setInitPosition();this.baselinePos=c;a.initPageX=this.initPageX+a.startOffset[0];a.initPageY=this.initPageY+a.startOffset[1];a.deltaSetXY=null;this.resetThumbConstraints();return false}}return true},moveThumb:function(g,f,e,d){var h=this.thumb;var i=this;if(!h.available){return}h.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);var b=h.getTargetCoord(g,f);var c=[Math.round(b.x),Math.round(b.y)];this._slideStart();if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&h._graduated&&!e){this.lock();this.curCoord=YAHOO.util.Dom.getXY(this.thumb.getEl());this.curCoord=[Math.round(this.curCoord[0]),Math.round(this.curCoord[1])];setTimeout(function(){i.moveOneTick(c)},this.tickPause)}else{if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&!e){this.lock();var a=new YAHOO.util.Motion(h.id,{points:{to:c}},this.animationDuration,YAHOO.util.Easing.easeOut);a.onComplete.subscribe(function(){i.endMove()});a.animate()}else{h.setDragElPos(g,f);if(!d){this.endMove()}}}},_slideStart:function(){if(!this._sliding){if(!this._silent){this.onSlideStart();this.fireEvent("slideStart")}this._sliding=true}},_slideEnd:function(){if(this._sliding&&this.moveComplete){var a=this._silent;this._sliding=false;this._silent=false;this.moveComplete=false;if(!a){this.onSlideEnd();this.fireEvent("slideEnd")}}},moveOneTick:function(b){var e=this.thumb,d;var f=null,a,g;if(e._isRegion){f=this._getNextX(this.curCoord,b);a=(f!==null)?f[0]:this.curCoord[0];f=this._getNextY(this.curCoord,b);g=(f!==null)?f[1]:this.curCoord[1];f=a!==this.curCoord[0]||g!==this.curCoord[1]?[a,g]:null}else{if(e._isHoriz){f=this._getNextX(this.curCoord,b)}else{f=this._getNextY(this.curCoord,b)}}if(f){this.curCoord=f;this.thumb.alignElWithMouse(e.getEl(),f[0]+this.thumbCenterPoint.x,f[1]+this.thumbCenterPoint.y);if(!(f[0]==b[0]&&f[1]==b[1])){var c=this;setTimeout(function(){c.moveOneTick(b)},this.tickPause)}else{this.endMove()}}else{this.endMove()}},_getNextX:function(a,b){var d=this.thumb;var f;var c=[];var e=null;if(a[0]>b[0]){f=d.tickSize-this.thumbCenterPoint.x;c=d.getTargetCoord(a[0]-f,a[1]);e=[c.x,c.y]}else{if(a[0]<b[0]){f=d.tickSize+this.thumbCenterPoint.x;c=d.getTargetCoord(a[0]+f,a[1]);e=[c.x,c.y]}else{}}return e},_getNextY:function(a,b){var d=this.thumb;var f;var c=[];var e=null;if(a[1]>b[1]){f=d.tickSize-this.thumbCenterPoint.y;c=d.getTargetCoord(a[0],a[1]-f);e=[c.x,c.y]}else{if(a[1]<b[1]){f=d.tickSize+this.thumbCenterPoint.y;c=d.getTargetCoord(a[0],a[1]+f);e=[c.x,c.y]}else{}}return e},b4MouseDown:function(a){if(!this.backgroundEnabled){return false}this.thumb.autoOffset();this.resetThumbConstraints()},onMouseDown:function(b){if(!this.backgroundEnabled||this.isLocked()){return false}var a=YAHOO.util.Event.getPageX(b);var c=YAHOO.util.Event.getPageY(b);this.focus();this.moveThumb(a,c)},onDrag:function(b){if(this.backgroundEnabled&&!this.isLocked()){var a=YAHOO.util.Event.getPageX(b);var c=YAHOO.util.Event.getPageY(b);this.moveThumb(a,c,true,true);this.fireEvents()}},endMove:function(){this.unlock();this.moveComplete=true;this.fireEvents()},resetThumbConstraints:function(){var a=this.thumb;a.setXConstraint(a.leftConstraint,a.rightConstraint,a.xTickSize);a.setYConstraint(a.topConstraint,a.bottomConstraint,a.xTickSize)},fireEvents:function(c){var b=this.thumb;if(!c){b.cachePosition()}if(!this.isLocked()){if(b._isRegion){var e=b.getXValue();var d=b.getYValue();if(e!=this.previousX||d!=this.previousY){if(!this._silent){this.onChange(e,d);this.fireEvent("change",{x:e,y:d})}}this.previousX=e;this.previousY=d}else{var a=b.getValue();if(a!=this.previousVal){if(!this._silent){this.onChange(a);this.fireEvent("change",a)}}this.previousVal=a}this._slideEnd()}},toString:function(){return("Slider ("+this.type+") "+this.id)}});YAHOO.augment(YAHOO.widget.Slider,YAHOO.util.EventProvider);YAHOO.widget.SliderThumb=function(g,b,e,d,a,f,c){if(g){YAHOO.widget.SliderThumb.superclass.constructor.call(this,g,b);this.parentElId=b}this.isTarget=false;this.tickSize=c;this.maintainOffset=true;this.initSlider(e,d,a,f,c);this.scroll=false};YAHOO.extend(YAHOO.widget.SliderThumb,YAHOO.util.DD,{startOffset:null,dragOnly:true,_isHoriz:false,_prevVal:0,_graduated:false,getOffsetFromParent0:function(c){var a=YAHOO.util.Dom.getXY(this.getEl());var b=c||YAHOO.util.Dom.getXY(this.parentElId);return[(a[0]-b[0]),(a[1]-b[1])]},getOffsetFromParent:function(h){var a=this.getEl(),e;if(!this.deltaOffset){var i=YAHOO.util.Dom.getXY(a);var f=h||YAHOO.util.Dom.getXY(this.parentElId);e=[(i[0]-f[0]),(i[1]-f[1])];var b=parseInt(YAHOO.util.Dom.getStyle(a,"left"),10);var k=parseInt(YAHOO.util.Dom.getStyle(a,"top"),10);var d=b-e[0];var c=k-e[1];if(isNaN(d)||isNaN(c)){}else{this.deltaOffset=[d,c]}}else{var j=parseInt(YAHOO.util.Dom.getStyle(a,"left"),10);var g=parseInt(YAHOO.util.Dom.getStyle(a,"top"),10);e=[j+this.deltaOffset[0],g+this.deltaOffset[1]]}return e},initSlider:function(d,c,a,e,b){this.initLeft=d;this.initRight=c;this.initUp=a;this.initDown=e;this.setXConstraint(d,c,b);this.setYConstraint(a,e,b);if(b&&b>1){this._graduated=true}this._isHoriz=(d||c);this._isVert=(a||e);this._isRegion=(this._isHoriz&&this._isVert)},clearTicks:function(){YAHOO.widget.SliderThumb.superclass.clearTicks.call(this);this.tickSize=0;this._graduated=false},getValue:function(){return(this._isHoriz)?this.getXValue():this.getYValue()},getXValue:function(){if(!this.available){return 0}var a=this.getOffsetFromParent();if(YAHOO.lang.isNumber(a[0])){this.lastOffset=a;return(a[0]-this.startOffset[0])}else{return(this.lastOffset[0]-this.startOffset[0])}},getYValue:function(){if(!this.available){return 0}var a=this.getOffsetFromParent();if(YAHOO.lang.isNumber(a[1])){this.lastOffset=a;return(a[1]-this.startOffset[1])}else{return(this.lastOffset[1]-this.startOffset[1])}},toString:function(){return"SliderThumb "+this.id},onChange:function(a,b){}});YAHOO.widget.DualSlider=function(e,b,d,a){var c=this,g=YAHOO.lang;this.minSlider=e;this.maxSlider=b;this.activeSlider=e;this.isHoriz=e.thumb._isHoriz;a=YAHOO.lang.isArray(a)?a:[0,d];a[0]=Math.min(Math.max(parseInt(a[0],10)|0,0),d);a[1]=Math.max(Math.min(parseInt(a[1],10)|0,d),0);if(a[0]>a[1]){a.splice(0,2,a[1],a[0])}var f={min:false,max:false};this.minSlider.thumb.onAvailable=function(){e.setStartSliderState();f.min=true;if(f.max){e.setValue(a[0],true,true,true);b.setValue(a[1],true,true,true);c.updateValue(true);c.fireEvent("ready",c)}};this.maxSlider.thumb.onAvailable=function(){b.setStartSliderState();f.max=true;if(f.min){e.setValue(a[0],true,true,true);b.setValue(a[1],true,true,true);c.updateValue(true);c.fireEvent("ready",c)}};e.onMouseDown=function(h){return c._handleMouseDown(h)};b.onMouseDown=function(h){if(c.minSlider.isLocked()&&!c.minSlider._sliding){return c._handleMouseDown(h)}else{YAHOO.util.Event.stopEvent(h);return false}};e.onDrag=b.onDrag=function(h){c._handleDrag(h)};e.subscribe("change",this._handleMinChange,e,this);e.subscribe("slideStart",this._handleSlideStart,e,this);e.subscribe("slideEnd",this._handleSlideEnd,e,this);b.subscribe("change",this._handleMaxChange,b,this);b.subscribe("slideStart",this._handleSlideStart,b,this);b.subscribe("slideEnd",this._handleSlideEnd,b,this);this.createEvent("ready",this);this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this)};YAHOO.widget.DualSlider.prototype={minVal:-1,maxVal:-1,minRange:0,_handleSlideStart:function(b,a){this.fireEvent("slideStart",a)},_handleSlideEnd:function(b,a){this.fireEvent("slideEnd",a)},_handleDrag:function(a){YAHOO.widget.Slider.prototype.onDrag.call(this.activeSlider,a)},_handleMinChange:function(){this.activeSlider=this.minSlider;this.updateValue()},_handleMaxChange:function(){this.activeSlider=this.maxSlider;this.updateValue()},setValues:function(e,h,f,b,g){var c=this.minSlider,j=this.maxSlider,a=c.thumb,i=j.thumb,k=this,d={min:false,max:false};if(a._isHoriz){a.setXConstraint(a.leftConstraint,i.rightConstraint,a.tickSize);i.setXConstraint(a.leftConstraint,i.rightConstraint,i.tickSize)}else{a.setYConstraint(a.topConstraint,i.bottomConstraint,a.tickSize);i.setYConstraint(a.topConstraint,i.bottomConstraint,i.tickSize)}this._oneTimeCallback(c,"slideEnd",function(){d.min=true;if(d.max){k.updateValue(g);setTimeout(function(){k._cleanEvent(c,"slideEnd");k._cleanEvent(j,"slideEnd")},0)}});this._oneTimeCallback(j,"slideEnd",function(){d.max=true;if(d.min){k.updateValue(g);setTimeout(function(){k._cleanEvent(c,"slideEnd");k._cleanEvent(j,"slideEnd")},0)}});c.setValue(e,f,b,false);j.setValue(h,f,b,false)},setMinValue:function(c,e,f,b){var d=this.minSlider;this.activeSlider=d;var a=this;this._oneTimeCallback(d,"slideEnd",function(){a.updateValue(b);setTimeout(function(){a._cleanEvent(d,"slideEnd")},0)});d.setValue(c,e,f,b)},setMaxValue:function(a,e,f,c){var d=this.maxSlider;this.activeSlider=d;var b=this;this._oneTimeCallback(d,"slideEnd",function(){b.updateValue(c);setTimeout(function(){b._cleanEvent(d,"slideEnd")},0)});d.setValue(a,e,f,c)},updateValue:function(g){var b=this.minSlider.getValue(),h=this.maxSlider.getValue(),c=false;if(b!=this.minVal||h!=this.maxVal){c=true;var a=this.minSlider.thumb,j=this.maxSlider.thumb,d=this.isHoriz?"x":"y";var e=this.minSlider.thumbCenterPoint[d]+this.maxSlider.thumbCenterPoint[d];var f=Math.max(h-e-this.minRange,0);var i=Math.min(-b-e-this.minRange,0);if(this.isHoriz){f=Math.min(f,j.rightConstraint);a.setXConstraint(a.leftConstraint,f,a.tickSize);j.setXConstraint(i,j.rightConstraint,j.tickSize)}else{f=Math.min(f,j.bottomConstraint);a.setYConstraint(a.leftConstraint,f,a.tickSize);j.setYConstraint(i,j.bottomConstraint,j.tickSize)}}this.minVal=b;this.maxVal=h;if(c&&!g){this.fireEvent("change",this)}},selectActiveSlider:function(g){var b=this.minSlider,a=this.maxSlider,i=b.isLocked(),f=a.isLocked(),c=YAHOO.util.Event,h;if(i||f){this.activeSlider=i?a:b}else{if(this.isHoriz){h=c.getPageX(g)-b.thumb.initPageX-b.thumbCenterPoint.x}else{h=c.getPageY(g)-b.thumb.initPageY-b.thumbCenterPoint.y}this.activeSlider=h*2>a.getValue()+b.getValue()?a:b}},_handleMouseDown:function(a){this.selectActiveSlider(a);YAHOO.widget.Slider.prototype.onMouseDown.call(this.activeSlider,a)},_oneTimeCallback:function(c,a,b){c.subscribe(a,function(){c.unsubscribe(a,arguments.callee);b.apply({},[].slice.apply(arguments))})},_cleanEvent:function(h,b){if(h.__yui_events&&h.events[b]){var g,f,a;for(f=h.__yui_events.length;f>=0;--f){if(h.__yui_events[f].type===b){g=h.__yui_events[f];break}}if(g){var e=g.subscribers,c=[],d=0;for(f=0,a=e.length;f<a;++f){if(e[f]){c[d++]=e[f]}}g.subscribers=c}}}};YAHOO.augment(YAHOO.widget.DualSlider,YAHOO.util.EventProvider);YAHOO.widget.Slider.getHorizDualSlider=function(f,c,k,g,h,b){var a,j;var d=YAHOO.widget,e=d.Slider,i=d.SliderThumb;a=new i(c,f,0,g,0,0,h);j=new i(k,f,0,g,0,0,h);return new d.DualSlider(new e(f,f,a,"horiz"),new e(f,f,j,"horiz"),g,b)};YAHOO.widget.Slider.getVertDualSlider=function(f,c,k,g,h,b){var a,j;var d=YAHOO.widget,e=d.Slider,i=d.SliderThumb;a=new i(c,f,0,0,0,g,h);j=new i(k,f,0,0,0,g,h);return new d.DualSlider(new e(f,f,a,"vert"),new e(f,f,j,"vert"),g,b)};YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.6.0",build:"1321"});

function arrayCopy(b){var a=new Array(b.length);for(i in b){if(typeof(b[i])=="array"){a[i]=arrayCopy(b[i])}else{a[i]=b[i]}}return a}function TreeMenu(d,c,e,a,f,b){this.iconpath=d;this.myname=c;this.linkTarget=e;this.defaultClass=a;this.usePersistence=f;this.noTopLevelImages=b;this.n=new Array();this.output="";this.nodeRefs=new Array();this.branches=new Array();this.branchStatus=new Array();this.layerRelations=new Array();this.childParents=new Array();this.cookieStatuses=new Array();this.preloadImages()}TreeMenu.prototype.addItem=function(a){newIndex=this.n.length;this.n[newIndex]=a;return this.n[newIndex]};TreeMenu.prototype.preloadImages=function(){var d=new Image;d.src=this.iconpath+"/plustop.gif";var a=new Image;a.src=this.iconpath+"/plusbottom.gif";var e=new Image;e.src=this.iconpath+"/plus.gif";var g=new Image;g.src=this.iconpath+"/minustop.gif";var f=new Image;f.src=this.iconpath+"/minusbottom.gif";var c=new Image;c.src=this.iconpath+"/minus.gif";var b=new Image;b.src=this.iconpath+"/branchtop.gif";var l=new Image;l.src=this.iconpath+"/branchbottom.gif";var h=new Image;h.src=this.iconpath+"/branch.gif";var k=new Image;k.src=this.iconpath+"/linebottom.gif";var m=new Image;m.src=this.iconpath+"/line.gif"};TreeMenu.prototype.drawMenu=function(){var g="";var a="";var c="";var q="";var r=arguments[0]?arguments[0]:this.n;var b=arguments[1]?arguments[1]:[];var x=arguments[2]?arguments[2]:"";var t=arguments[3]?arguments[3]:false;var w=arguments[4]?arguments[4]:"inline";var q=arguments[5]?arguments[5]:null;var l=b.length;for(var v=0;v<r.length;v++){b[l]=v+1;c=this.myname+"_node_"+this.implode("_",b);this.nodeRefs[c]=r[v];this.childParents[c]=q;if(v==0&&q==null){a=r.length>1?"top":"single"}else{if(v==(r.length-1)){a="bottom"}else{a=""}}if(!this.doesMenu()||(q==null&&(r.length==1||this.noTopLevelImages))){t=true}else{if(r[v].expanded){t=true}else{t=false}}w=this.checkParentVisibility(c)?w:"none";if(r[v].n.length>0){this.branchStatus[c]=t;this.branches[this.branches.length]=c}if(!this.layerRelations[q]){this.layerRelations[q]=new Array()}this.layerRelations[q][this.layerRelations[q].length]=c;var o=r[v].n.length&&this.doesMenu()&&r[v].isDynamic?(t?"minus":"plus"):"branch";var e=t&&r[v].expandedIcon?r[v].expandedIcon:r[v].icon;var s=r[v].icon?this.stringFormat('<img src="{0}/{1}" width="19" height="19" align="top" id="icon_{2}">',this.iconpath,e,c):"";var m="";for(j in r[v].events){m+=this.stringFormat('{0}="{1}" ',j,r[v].events[j])}var d=this.doesMenu()?this.stringFormat('<div id="{0}" style="display: {1}" class="{2}">',c,w,(r[v].cssClass?r[v].cssClass:this.defaultClass)):this.stringFormat('<div class="{0}">',r[v].cssClass?r[v].cssClass:this.defaultClass);var k=this.doesMenu()&&r[v].n.length&&r[v].isDynamic?this.stringFormat('onmousedown="{0}.toggleBranch(\'{1}\', true)" style="cursor: pointer; cursor: hand"',this.myname,c):"";var u=this.stringFormat('<img src="{0}/{1}{2}.gif" width="20" height="20" align="top" border="0" name="img_{3}" {4}>',this.iconpath,o,a,c,k);var n=r[v].linkTarget?r[v].linkTarget:this.linkTarget;var f=r[v].link?this.stringFormat('<a class="lien" href="{0}" target="{1}">',r[v].link,n):"";var p=r[v].link?"</a>":"";this.output+=this.stringFormat("{0}<nobr>{1}{2}{3}{4}<span {5}>{6}</span>{7}</nobr><br /></div>\n",d,x,q==null&&(r.length==1||this.noTopLevelImages)?"":u,s,f,m,r[v].title,p);if(r[v].n.length){if(q==null&&(r.length==1||this.noTopLevelImages)){var h=""}else{if(v<(r.length-1)){var h=x+this.stringFormat('<img src="{0}/line.gif" width="20" height="20" align="top">',this.iconpath)}else{var h=x+this.stringFormat('<img src="{0}/linebottom.gif" width="20" height="20" align="top">',this.iconpath)}}this.drawMenu(r[v].n,arrayCopy(b),h,r[v].expanded,t?"inline":"none",c)}}};TreeMenu.prototype.writeOutput=function(){document.write(this.output)};TreeMenu.prototype.toggleBranch=function(layerID,updateStatus){var currentDisplay=this.getLayer(layerID).style.display;var newDisplay=(this.branchStatus[layerID]&&currentDisplay=="inline")?"none":"inline";var fireEvents=arguments[2]!=null?arguments[2]:true;for(var i=0;i<this.layerRelations[layerID].length;i++){if(this.branchStatus[this.layerRelations[layerID][i]]){this.toggleBranch(this.layerRelations[layerID][i],false)}this.getLayer(this.layerRelations[layerID][i]).style.display=newDisplay}if(updateStatus){this.branchStatus[layerID]=!this.branchStatus[layerID];if(this.doesPersistence()&&!arguments[2]&&this.usePersistence){this.setExpandedStatusForCookie(layerID,this.branchStatus[layerID])}if(fireEvents){nodeObject=this.nodeRefs[layerID];if(nodeObject.ontoggle!=null){eval(nodeObject.ontoggle)}if(newDisplay=="none"&&nodeObject.oncollapse!=null){eval(nodeObject.oncollapse)}else{if(newDisplay=="inline"&&nodeObject.onexpand!=null){eval(nodeObject.onexpand)}}}this.swapImage(layerID)}this.swapIcon(layerID)};TreeMenu.prototype.swapImage=function(a){var c=document.images["img_"+a].src;var b=/^(.*)(plus|minus)(bottom|top|single)?.gif$/;if(matches=c.match(b)){document.images["img_"+a].src=this.stringFormat("{0}{1}{2}{3}",matches[1],matches[2]=="plus"?"minus":"plus",matches[3]?matches[3]:"",".gif")}};TreeMenu.prototype.swapIcon=function(a){if(document.images["icon_"+a]){var c=document.images["icon_"+a].src;if(this.nodeRefs[a].icon&&this.nodeRefs[a].expandedIcon){var b=(c.indexOf(this.nodeRefs[a].expandedIcon)==-1?this.nodeRefs[a].expandedIcon:this.nodeRefs[a].icon);document.images["icon_"+a].src=this.iconpath+"/"+b}}};TreeMenu.prototype.doesMenu=function(){return(is_ie4up||is_nav6up||is_gecko||is_opera7)};TreeMenu.prototype.doesPersistence=function(){return(is_ie4up||is_gecko||is_nav6up||is_opera7)};TreeMenu.prototype.getLayer=function(a){if(is_ie4){return document.all(a)}else{if(document.getElementById(a)){return document.getElementById(a)}else{if(document.all(a)){return document.all(a)}}}};TreeMenu.prototype.setExpandedStatusForCookie=function(a,b){this.cookieStatuses[a]=b;this.saveCookie()};TreeMenu.prototype.getExpandedStatusFromCookie=function(a){if(this.cookieStatuses[a]){return this.cookieStatuses[a]}return false};TreeMenu.prototype.saveCookie=function(){var b=new Array();for(var a in this.cookieStatuses){if(this.cookieStatuses[a]==true){b[b.length]=a}}document.cookie="TreeMenuBranchStatus="+b.join(":")};TreeMenu.prototype.loadCookie=function(){var d=document.cookie.split("; ");for(var c=0;c<d.length;c++){var a=d[c].split("=");if("TreeMenuBranchStatus"==a[0]&&a[1]){var e=a[1].split(":");for(var b=0;b<e.length;b++){this.cookieStatuses[e[b]]=true}}}};TreeMenu.prototype.resetBranches=function(){if(!this.doesPersistence()){return false}this.loadCookie();for(var b=0;b<this.branches.length;b++){var a=this.getExpandedStatusFromCookie(this.branches[b]);if(a==true&&this.branchStatus[this.branches[b]]!=true){if(this.checkParentVisibility(this.branches[b])){this.toggleBranch(this.branches[b],true,false)}else{this.branchStatus[this.branches[b]]=true;this.swapImage(this.branches[b])}}}};TreeMenu.prototype.checkParentVisibility=function(a){if(this.in_array(this.childParents[a],this.branches)&&this.branchStatus[this.childParents[a]]&&this.checkParentVisibility(this.childParents[a])){return true}else{if(this.childParents[a]==null){return true}}return false};TreeMenu.prototype.stringFormat=function(c){var a=0;for(var b=1;b<arguments.length;b++){while((a=c.indexOf("{"+(b-1)+"}",a))!=-1){c=c.substring(0,a)+arguments[b]+c.substr(a+3)}}return c};TreeMenu.prototype.implode=function(d,b){var a="";for(var c=0;c<b.length;c++){if(c==0){a+=b[c]}else{a+=d+b[c]}}return a};TreeMenu.prototype.in_array=function(c,a){for(var b=0;b<a.length;b++){if(a[b]==c){return true}}return false};function TreeNode(h,e,f,d,c,b,g,a){this.title=h;this.icon=e;this.expandedIcon=a;this.link=f;this.expanded=d;this.isDynamic=c;this.cssClass=b;this.linkTarget=g;this.n=new Array();this.events=new Array();this.handlers=null;this.oncollapse=null;this.onexpand=null;this.ontoggle=null}TreeNode.prototype.addItem=function(a){newIndex=this.n.length;this.n[newIndex]=a;return this.n[newIndex]};TreeNode.prototype.setEvent=function(a,b){switch(a.toLowerCase()){case"onexpand":this.onexpand=b;break;case"oncollapse":this.oncollapse=b;break;case"ontoggle":this.ontoggle=b;break;default:this.events[a]=b}};var agt=navigator.userAgent.toLowerCase();var is_major=parseInt(navigator.appVersion);var is_minor=parseFloat(navigator.appVersion);var is_nav=((agt.indexOf("mozilla")!=-1)&&(agt.indexOf("spoofer")==-1)&&(agt.indexOf("compatible")==-1)&&(agt.indexOf("opera")==-1)&&(agt.indexOf("webtv")==-1)&&(agt.indexOf("hotjava")==-1));var is_nav6up=(is_nav&&(is_major>=5));var is_gecko=(agt.indexOf("gecko")!=-1);var is_ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));var is_ie4=(is_ie&&(is_major==4)&&(agt.indexOf("msie 4")!=-1));var is_ie4up=(is_ie&&(is_major>=4));var is_opera=(agt.indexOf("opera")!=-1);var is_opera7=is_opera&&(agt.indexOf("opera 7")!=-1);if(agt.indexOf("konqueror")!=-1){var is_nav=false;var is_nav6up=false;var is_gecko=false;var is_ie=true;var is_ie4=true;var is_ie4up=true};

if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.version="07-01";if(typeof Zapatec.zapatecPath=="undefined"){Zapatec.zapatecPath=function(){if(document.documentElement){var a=document.documentElement.innerHTML.match(/<script[^>]+src="([^"]*zapatec(-core|-src)?.js[^"]*)"/i);if(a&&a.length>=2){a=a[1].split("?");a=a[0].split("/");if(Array.prototype.pop){a.pop()}else{a.length-=1}return a.length?a.join("/")+"/":""}}return""}()}if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.Utils={};Zapatec.Utils.getAbsolutePos=function(e,g){var a=0,d=0;if(!g){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};Zapatec.Utils.getElementOffset=function(d){var e=iTop=iWidth=iHeight=0;var c;if(d.getBoundingClientRect){var g=d.getBoundingClientRect();e=g.left;iTop=g.top;iWidth=g.right-e;iHeight=g.bottom-iTop;e+=Zapatec.Utils.getPageScrollX()-2;iTop+=Zapatec.Utils.getPageScrollY()-2}else{iWidth=d.offsetWidth;iHeight=d.offsetHeight;var a=Zapatec.Utils.getStyleProperty(d,"position");if(a=="fixed"){e=d.offsetLeft+Zapatec.Utils.getPageScrollX();iTop=d.offsetTop+Zapatec.Utils.getPageScrollY()}else{if(a=="absolute"){while(d){c=d.tagName;if(c){c=c.toLowerCase();if(c!="body"&&c!="html"){e+=parseInt(d.offsetLeft,10)||0;iTop+=parseInt(d.offsetTop,10)||0}}d=d.offsetParent;c=d?d.tagName:null;if(c){c=c.toLowerCase();if(c!="body"&&c!="html"){e-=d.scrollLeft;iTop-=d.scrollTop}}}}else{var b=(Zapatec.is_gecko&&!Zapatec.is_khtml);var h=Zapatec.Utils.getStyleProperty;var f=d;while(f){if(b){c=f.tagName;if(c){c=c.toLowerCase();if(c=="body"&&!(h(f,"-moz-box-sizing")=="border-box")){e+=parseInt(h(f,"border-left-width"));iTop+=parseInt(h(f,"border-top-width"))}}}e+=parseInt(f.offsetLeft,10)||0;iTop+=parseInt(f.offsetTop,10)||0;f=f.offsetParent}f=d;while(f.parentNode){f=f.parentNode;c=f.tagName;if(c){c=c.toLowerCase();if(c!="body"&&c!="html"&&c!="tr"){e-=f.scrollLeft;iTop-=f.scrollTop}}}}}}return{left:e,top:iTop,x:e,y:iTop,width:iWidth,height:iHeight}};Zapatec.Utils.getElementOffsetScrollable=function(b){var a=Zapatec.Utils.getElementOffset(b);if(b.scrollLeft){a.left-=b.scrollLeft;a.x=a.left}if(b.scrollTop){a.top-=b.scrollTop;a.y=a.top}return a};Zapatec.Utils.fixBoxPosition=function(e,a){var c=Zapatec.Utils.getPageScrollX();var b=Zapatec.Utils.getPageScrollY();var d=Zapatec.Utils.getWindowSize();a=parseInt(a,10)||0;if(e.x<c){e.x=c+a}if(e.y<b){e.y=b+a}if(e.x+e.width>c+d.width){e.x=c+d.width-e.width-a}if(e.y+e.height>b+d.height){e.y=b+d.height-e.height-a}};Zapatec.Utils.isRelated=function(c,a){a||(a=window.event);var f=a.relatedTarget;if(!f){var b=a.type;if(b=="mouseover"){f=a.fromElement}else{if(b=="mouseout"){f=a.toElement}}}try{while(f){if(f==c){return true}f=f.parentNode}}catch(d){}return false};Zapatec.Utils.removeClass=function(e,d){if(!(e&&e.className)){return}var a=e.className.split(" ");var b=[];for(var c=a.length;c>0;){if(a[--c]!=d){b[b.length]=a[c]}}e.className=b.join(" ")};Zapatec.Utils.addClass=function(b,a){Zapatec.Utils.removeClass(b,a);b.className+=" "+a};Zapatec.Utils.replaceClass=function(c,b,a){if(!Zapatec.isHtmlElement(c)||!b){return false}c.className.replace(b,a)};Zapatec.Utils.getElement=function(a){if(Zapatec.is_ie){return window.event.srcElement}else{return a.currentTarget}};Zapatec.Utils.getTargetElement=function(a){if(Zapatec.is_ie){return window.event.srcElement}else{return a.target}};Zapatec.Utils.getMousePos=function(d){d||(d=window.event);var c={pageX:0,pageY:0,clientX:0,clientY:0};if(d){var b=(typeof d.pageX!="undefined");var a=(typeof d.clientX!="undefined");if(b||a){if(b){c.pageX=d.pageX;c.pageY=d.pageY}else{c.pageX=d.clientX+Zapatec.Utils.getPageScrollX();c.pageY=d.clientY+Zapatec.Utils.getPageScrollY()}if(a){c.clientX=d.clientX;c.clientY=d.clientY}else{c.clientX=d.pageX-Zapatec.Utils.getPageScrollX();c.clientY=d.pageY-Zapatec.Utils.getPageScrollY()}}}return c};Zapatec.Utils.stopEvent=function(a){a||(a=window.event);if(a){if(Zapatec.is_ie){a.cancelBubble=true;a.returnValue=false}else{a.preventDefault();a.stopPropagation()}}return false};Zapatec.Utils.removeOnUnload=[];Zapatec.Utils.addEvent=function(c,d,b,a){if(c.addEventListener){if(!a){a=false}c.addEventListener(d,b,a)}else{if(c.attachEvent){c.detachEvent("on"+d,b);c.attachEvent("on"+d,b);if(a){c.setCapture(false)}}}Zapatec.Utils.removeOnUnload.push({element:c,event:d,listener:b,capture:a})};Zapatec.Utils.removeEvent=function(e,f,d,c){if(e.removeEventListener){e.removeEventListener(f,d,c)}else{if(e.detachEvent){e.detachEvent("on"+f,d)}}for(var b=Zapatec.Utils.removeOnUnload.length-1;b>=0;b--){var a=Zapatec.Utils.removeOnUnload[b];if(!a){continue}if(e==a.element&&f==a.event&&d==a.listener&&c==a.capture){Zapatec.Utils.removeOnUnload[b]=null;Zapatec.Utils.removeEvent(a.element,a.event,a.listener,a.capture)}}};Zapatec.Utils.createElement=function(d,c,a){var b=null;if(document.createElementNS){b=document.createElementNS("http://www.w3.org/1999/xhtml",d)}else{b=document.createElement(d)}if(typeof c!="undefined"&&c!=null){c.appendChild(b)}if(!a){if(Zapatec.is_ie){b.setAttribute("unselectable",true)}if(Zapatec.is_gecko){b.style.setProperty("-moz-user-select","none","")}}return b};Zapatec.Utils.writeCookie=function(c,e,d,f,b){e=escape(e);var a=c+"="+e,g;if(d){a+=";domain="+d}if(f){a+=";path="+f}if(b){g=new Date();g.setTime(b*86400000+g.getTime());a+=";expires="+g.toGMTString()}document.cookie=a};Zapatec.Utils.getCookie=function(b){var e=b+"=";var d=0;while(d<document.cookie.length){var a=d+e.length;if(document.cookie.substring(d,a)==e){var c=document.cookie.indexOf(";",a);if(c==-1){c=document.cookie.length}return unescape(document.cookie.substring(a,c))}d=document.cookie.indexOf(" ",d)+1;if(d==0){break}}return null};Zapatec.Utils.makePref=function(c){function d(e){if(typeof e=="object"&&!e){return"null"}else{if(typeof e=="number"||typeof e=="boolean"){return e}else{if(typeof e=="string"){return'"'+e.replace(/\x22/,"\\22")+'"'}else{return null}}}}var a="",b;for(b in c){a+=(a?",'":"'")+b+"':"+d(c[b])}return a};Zapatec.Utils.loadPref=function(txt){var obj=null;try{eval("obj={"+txt+"}")}catch(e){}return obj};Zapatec.Utils.mergeObjects=function(a,c){for(var b in c){a[b]=c[b]}};Zapatec.Utils.__wch_id=0;Zapatec.Utils.createWCH=function(b){if(!Zapatec.is_ie||Zapatec.is_ie5||Zapatec.is_ie7){return null}var a="WCH"+(++Zapatec.Utils.__wch_id);var c=['<iframe id="',a,'" scrolling="no" frameborder="0" style="z-index:0;position:absolute;visibility:hidden;filter:progid:DXImageTransform.Microsoft.alpha(style=0,opacity=0);border:0;top:0;left:0;width:0;height:0" src="javascript:false"></iframe>'].join("");if(!b){b=document.body}if(Zapatec.windowLoaded){b.insertAdjacentHTML("beforeEnd",c)}else{Zapatec.Utils.addEvent(window,"load",function(){b.insertAdjacentHTML("beforeEnd",c);b=null})}return document.getElementById(a)};Zapatec.Utils.setupWCH_el=function(l,a,d){if(l){var m=Zapatec.Utils.getAbsolutePos(a),g=m.x,p=m.y,c=g+a.offsetWidth,o=p+a.offsetHeight;if(d){var n=Zapatec.Utils.getAbsolutePos(d),i=n.x,e=n.y,h=i+d.offsetWidth,b=e+d.offsetHeight;if(g>i){g=i}if(p>e){p=e}if(c<h){c=h}if(o<b){o=b}}Zapatec.Utils.setupWCH(l,g,p,c-g,o-p)}};Zapatec.Utils.setupWCH=function(e,a,g,b,d){if(e){var c=e.style;(typeof a!="undefined")&&(c.left=a+"px");(typeof g!="undefined")&&(c.top=g+"px");(typeof b!="undefined")&&(c.width=b+"px");(typeof d!="undefined")&&(c.height=d+"px");c.visibility="inherit"}};Zapatec.Utils.hideWCH=function(a){if(a){a.style.visibility="hidden"}};Zapatec.Utils.getPageScrollY=function(){if(window.pageYOffset){return window.pageYOffset}else{if(document.body&&document.body.scrollTop){return document.body.scrollTop}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}}}return 0};Zapatec.Utils.getPageScrollX=function(){if(window.pageXOffset){return window.pageXOffset}else{if(document.body&&document.body.scrollLeft){return document.body.scrollLeft}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft}}}return 0};Zapatec.ScrollWithWindow={};Zapatec.ScrollWithWindow.list=[];Zapatec.ScrollWithWindow.stickiness=0.25;Zapatec.ScrollWithWindow.register=function(a){var c=a.offsetTop||0;var b=a.offsetLeft||0;Zapatec.ScrollWithWindow.list.push({node:a,origTop:c,origLeft:b});if(!Zapatec.ScrollWithWindow.interval){Zapatec.ScrollWithWindow.on()}};Zapatec.ScrollWithWindow.unregister=function(a){for(var b=0;b<Zapatec.ScrollWithWindow.list.length;b++){var c=Zapatec.ScrollWithWindow.list[b];if(a==c.node){Zapatec.ScrollWithWindow.list.splice(b,1);if(!Zapatec.ScrollWithWindow.list.length){Zapatec.ScrollWithWindow.off()}return}}};Zapatec.ScrollWithWindow.moveTop=function(c){Zapatec.ScrollWithWindow.top+=(c-Zapatec.ScrollWithWindow.top)*Zapatec.ScrollWithWindow.stickiness;if(Math.abs(Zapatec.ScrollWithWindow.top-c)<=1){Zapatec.ScrollWithWindow.top=c}for(var b=0;b<Zapatec.ScrollWithWindow.list.length;b++){var d=Zapatec.ScrollWithWindow.list[b];var a=d.node;a.style.position="absolute";if(!d.origTop&&d.origTop!==0){d.origTop=parseInt(a.style.top)||0}a.style.top=d.origTop+parseInt(Zapatec.ScrollWithWindow.top)+"px"}};Zapatec.ScrollWithWindow.moveLeft=function(c){Zapatec.ScrollWithWindow.left+=(c-Zapatec.ScrollWithWindow.left)*Zapatec.ScrollWithWindow.stickiness;if(Math.abs(Zapatec.ScrollWithWindow.left-c)<=1){Zapatec.ScrollWithWindow.left=c}for(var b=0;b<Zapatec.ScrollWithWindow.list.length;b++){var d=Zapatec.ScrollWithWindow.list[b];var a=d.node;a.style.position="absolute";if(!d.origLeft&&d.origLeft!==0){d.origLeft=parseInt(a.style.left)||0}a.style.left=d.origLeft+parseInt(Zapatec.ScrollWithWindow.left)+"px"}};Zapatec.ScrollWithWindow.cycle=function(){var b=Zapatec.Utils.getPageScrollY();var a=Zapatec.Utils.getPageScrollX();if(b!=Zapatec.ScrollWithWindow.top){Zapatec.ScrollWithWindow.moveTop(b)}if(a!=Zapatec.ScrollWithWindow.left){Zapatec.ScrollWithWindow.moveLeft(a)}};Zapatec.ScrollWithWindow.on=function(){if(Zapatec.ScrollWithWindow.interval){return}Zapatec.ScrollWithWindow.top=Zapatec.Utils.getPageScrollY();Zapatec.ScrollWithWindow.left=Zapatec.Utils.getPageScrollX();Zapatec.ScrollWithWindow.interval=setInterval(Zapatec.ScrollWithWindow.cycle,50)};Zapatec.ScrollWithWindow.off=function(){if(!Zapatec.ScrollWithWindow.interval){return}clearInterval(Zapatec.ScrollWithWindow.interval);Zapatec.ScrollWithWindow.interval=null};Zapatec.FixateOnScreen={};Zapatec.FixateOnScreen.getExpression=function(b,a){return"Zapatec.Utils.getPageScroll"+a.toUpperCase()+"() + "+b};Zapatec.FixateOnScreen.parseCoordinates=function(b){if(!this.isRegistered(b)){return false}var a=0;var d=0;var c=b.style;if(Zapatec.is_ie&&!Zapatec.is_ie7){a=c.getExpression("left").split(" ");a=parseInt(a[a.length-1],10);d=c.getExpression("top").split(" ");d=parseInt(d[d.length-1],10)}else{a=parseInt(c.left,10);d=parseInt(c.top,10)}a+=Zapatec.Utils.getPageScrollX();d+=Zapatec.Utils.getPageScrollY();return{x:a,y:d}};Zapatec.FixateOnScreen.correctCoordinates=function(a,b){position={x:a,y:b};if(position.x||position.x===0){position.x-=Zapatec.Utils.getPageScrollX();if(Zapatec.is_ie&&!Zapatec.is_ie7){position.x=this.getExpression(position.x,"X")}else{position.x+="px"}}if(position.y||position.y===0){position.y-=Zapatec.Utils.getPageScrollY();if(Zapatec.is_ie&&!Zapatec.is_ie7){position.y=this.getExpression(position.y,"Y")}else{position.y+="px"}}return position};Zapatec.FixateOnScreen.register=function(b){if(!Zapatec.isHtmlElement(b)){return false}if(this.isRegistered(b)){return true}var c=Zapatec.Utils.getElementOffset(b);c={x:parseInt(b.style.left,10)||c.x,y:parseInt(b.style.top,10)||c.y};c=this.correctCoordinates(c.x,c.y);if(!Zapatec.is_ie||Zapatec.is_ie7){var a=b.restorer;if(!a||!a.getObject||a.getObject()!=b){a=b.restorer=new Zapatec.SRProp(b)}a.saveProp("style.position");b.style.position="fixed";b.style.left=c.x;b.style.top=c.y}else{b.style.setExpression("left",c.x);b.style.setExpression("top",c.y)}b.zpFixed=true;return true};Zapatec.FixateOnScreen.unregister=function(a){if(!Zapatec.isHtmlElement(a)){return false}var b=this.parseCoordinates(a);if(b===false){return true}if(Zapatec.is_ie&&!Zapatec.is_ie7){a.style.removeExpression("left");a.style.removeExpression("top")}a.style.left=b.x+"px";a.style.top=b.y+"px";if(!Zapatec.is_ie||Zapatec.is_ie7){a.restorer.restoreProp("style.position",true)}a.zpFixed=false;return true};Zapatec.FixateOnScreen.isRegistered=function(a){if(a.zpFixed){return true}return false};Zapatec.Utils.destroy=function(a){if(a&&a.parentNode){a.parentNode.removeChild(a)}};Zapatec.Utils.newCenteredWindow=function(a,h,b,i,f){var d=0;var g=0;if(screen.width){d=(screen.width-b)/2}if(screen.height){g=(screen.height-i)/2}var c="height="+i+",width="+b+",top="+g+",left="+d+",scrollbars="+f+",resizable";var e=window.open(a,h,c);return e};Zapatec.Utils.getWindowSize=function(){var a=0;var b=0;if(Zapatec.is_opera){a=document.body.clientWidth||0;b=document.body.clientHeight||0}else{if(Zapatec.is_khtml){a=window.innerWidth||0;b=window.innerHeight||0}else{if(document.compatMode&&document.compatMode=="CSS1Compat"){a=document.documentElement.clientWidth||0;b=document.documentElement.clientHeight||0}else{a=document.body.clientWidth||0;b=document.body.clientHeight||0}}}return{width:a,height:b}};Zapatec.Utils.selectOption=function(sel,val,call_default){var a=sel.options,i,o;for(i=a.length;--i>=0;){o=a[i];o.selected=(o.value==val)}sel.value=val;if(call_default){if(typeof sel.onchange=="function"){sel.onchange()}else{if(typeof sel.onchange=="string"){eval(sel.onchange)}}}};Zapatec.Utils.getNextSibling=function(c,a,b){c=c.nextSibling;if(!a){return c}a=a.toLowerCase();if(b){b=b.toLowerCase()}while(c){if(c.nodeType==1&&(c.tagName.toLowerCase()==a||(b&&c.tagName.toLowerCase()==b))){return c}c=c.nextSibling}return c};Zapatec.Utils.getPreviousSibling=function(c,a,b){c=c.previousSibling;if(!a){return c}a=a.toLowerCase();if(b){b=b.toLowerCase()}while(c){if(c.nodeType==1&&(c.tagName.toLowerCase()==a||(b&&c.tagName.toLowerCase()==b))){return c}c=c.previousSibling}return c};Zapatec.Utils.getFirstChild=function(c,a,b){if(!c){return null}c=c.firstChild;if(!c){return null}if(!a){return c}a=a.toLowerCase();if(c.nodeType==1){if(c.tagName.toLowerCase()==a){return c}else{if(b){b=b.toLowerCase();if(c.tagName.toLowerCase()==b){return c}}}}return Zapatec.Utils.getNextSibling(c,a,b)};Zapatec.Utils.getLastChild=function(c,a,b){if(!c){return null}c=c.lastChild;if(!c){return null}if(!a){return c}a=a.toLowerCase();if(c.nodeType==1){if(c.tagName.toLowerCase()==a){return c}else{if(b){b=b.toLowerCase();if(c.tagName.toLowerCase()==b){return c}}}}return Zapatec.Utils.getPreviousSibling(c,a,b)};Zapatec.Utils.getChildText=function(c){if(c==null){return""}var b=[];var a=c.firstChild;while(a!=null){if(a.nodeType==3){b.push(a.data)}a=a.nextSibling}return b.join(" ")};Zapatec.Utils.insertAfter=function(b,a){if(b.nextSibling){b.parentNode.insertBefore(a,b.nextSibling)}else{b.parentNode.appendChild(a)}};Zapatec.Utils._ids={};Zapatec.Utils.generateID=function(a,b){if(typeof b=="undefined"){if(typeof this._ids[a]=="undefined"){this._ids[a]=0}b=++this._ids[a]}return"zapatec-"+a+"-"+b};Zapatec.Utils.addTooltip=function(b,a){return new Zapatec.Tooltip({target:b,tooltip:a})};Zapatec.isLite=true;Zapatec.Utils.checkLinks=function(){var b=document.getElementsByTagName("A");for(var a=0;a<b.length;a++){if(Zapatec.Utils.checkLink(b[a])){return true}}return false};Zapatec.Utils.checkLink=function(e){if(!e){return false}if(!/^https?:\/\/((dev|www)\.)?zapatec\.com/i.test(e.href)){return false}var c="";for(var b=0;b<e.childNodes.length;b++){if(e.childNodes[b].nodeType==3){c+=e.childNodes[b].nodeValue}}if(c.length<4){return false}var a=e;while(a&&a.nodeName.toLowerCase()!="html"){if(Zapatec.Utils.getStyleProperty(a,"display")=="none"||Zapatec.Utils.getStyleProperty(a,"visibility")=="hidden"||Zapatec.Utils.getStyleProperty(a,"opacity")=="0"||Zapatec.Utils.getStyleProperty(a,"-moz-opacity")=="0"||/alpha\(opacity=0\)/i.test(Zapatec.Utils.getStyleProperty(a,"filter"))){return false}a=a.parentNode}var d=Zapatec.Utils.getElementOffset(e);if(d.left<0||d.top<0){return false}return true};Zapatec.Utils.checkActivation=function(){if(!Zapatec.isLite){return true}var f=[];add_product=function(i,h,l){f[i]={webdir:h,name:l,bActive:false}};add_product("calendar.js","prod1","Calendar");add_product("zpmenu.js","menu","Menu");add_product("tree.js","prod3","Tree");add_product("form.js","forms","Forms");add_product("effects.js","effects","Effects");add_product("hoverer.js","effects","Effects - Hoverer");add_product("slideshow.js","effects","Effects - Slideshow");add_product("zpgrid.js","grid","Grid");add_product("slider.js","slider","Slider");add_product("zptabs.js","tabs","Tabs");add_product("zptime.js","time","Time");add_product("window.js","windows","Window");var e,g,d;var b=false;var a=document.getElementsByTagName("script");for(d=0;d<a.length;d++){if(/wizard.js/i.test(a[d].src)){return true}g=a[d].src.split("/");if(g.length==0){e=a[d]}else{e=g[g.length-1]}e=e.toLowerCase();if(typeof f[e]!="undefined"){b=true;f[e].bActive=true}}if(!b||Zapatec.Utils.checkLinks()){return true}var c="You are using the Free version of the Zapatec Software.\nWhile using the Free version, a link to www.zapatec.com in this page is required.";for(d in f){if(f[d].bActive==true){return true}}};Zapatec.Utils.clone=function(a){if(typeof a=="object"&&a){var d=new a.constructor();var c=Zapatec.Utils.clone;for(var b in a){d[b]=c(a[b])}return d}return a};Zapatec.is_opera=/opera/i.test(navigator.userAgent);Zapatec.is_ie=(/msie/i.test(navigator.userAgent)&&!Zapatec.is_opera);Zapatec.is_ie5=(Zapatec.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Zapatec.is_ie7=(Zapatec.is_ie&&/msie 7\.0/i.test(navigator.userAgent));Zapatec.is_mac_ie=(/msie.*mac/i.test(navigator.userAgent)&&!Zapatec.is_opera);Zapatec.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Zapatec.is_konqueror=/Konqueror/i.test(navigator.userAgent);Zapatec.is_gecko=/Gecko/i.test(navigator.userAgent);Zapatec.is_webkit=/WebKit/i.test(navigator.userAgent);Zapatec.webkitVersion=Zapatec.is_webkit?parseInt(navigator.userAgent.replace(/.+WebKit\/([0-9]+)\..+/,"$1")):-1;if(!Object.prototype.hasOwnProperty){Object.prototype.hasOwnProperty=function(a){try{var b=this.constructor.prototype;while(b){if(b[a]==this[a]){return false}b=b.prototype}}catch(c){}return true}}if(!Function.prototype.call){Function.prototype.call=function(){var objThis=arguments[0];objThis._this_func=this;var arrArgs=[];for(var iArg=1;iArg<arguments.length;iArg++){arrArgs[arrArgs.length]="arguments["+iArg+"]"}var ret=eval("objThis._this_func("+arrArgs.join(",")+")");objThis._this_func=null;return ret}}if(!Function.prototype.apply){Function.prototype.apply=function(){var objThis=arguments[0];var objArgs=arguments[1];objThis._this_func=this;var arrArgs=[];if(objArgs){for(var iArg=0;iArg<objArgs.length;iArg++){arrArgs[arrArgs.length]="objArgs["+iArg+"]"}}var ret=eval("objThis._this_func("+arrArgs.join(",")+")");objThis._this_func=null;return ret}}if(!Array.prototype.pop){Array.prototype.pop=function(){var a;if(this.length){a=this[this.length-1];this.length-=1}return a}}if(!Array.prototype.push){Array.prototype.push=function(){for(var a=0;a<arguments.length;a++){this[this.length]=arguments[a]}return this.length}}if(!Array.prototype.shift){Array.prototype.shift=function(){var b;if(this.length){b=this[0];for(var a=0;a<this.length-1;a++){this[a]=this[a+1]}this.length-=1}return b}}if(!Array.prototype.unshift){Array.prototype.unshift=function(){if(arguments.length){var b,a=arguments.length;for(b=this.length+a-1;b>=a;b--){this[b]=this[b-a]}for(b=0;b<a;b++){this[b]=arguments[b]}}return this.length}}if(!Array.prototype.splice){Array.prototype.splice=function(a,c){var d=[],e=[],b;for(b=2;b<arguments.length;b++){d.push(arguments[b])}for(b=a;(b<a+c)&&(b<this.length);b++){e.push(this[b])}for(b=a+c;b<this.length;b++){this[b-c]=this[b]}this.length-=e.length;for(b=this.length+d.length-1;b>=a+d.length;b--){this[b]=this[b-d.length]}for(b=0;b<d.length;b++){this[a+b]=d[b]}return e}}Zapatec.Utils.arrIndexOf=function(b,a,c){if(!(b instanceof Array)){return -1}if(Array.prototype.indexOf){return b.indexOf(a,c)}if(!c){c=0}var d=b.length;for(var e=c;e<d;e++){if(b[e]==a){return e}}return -1};Zapatec.Log=function(a){if(!a){return}var b=a.description;if(a.severity){b=a.severity+":\n"+b}if(a.type!="warning"){alert(b)}};Zapatec.Utils.Array={};Zapatec.Utils.Array.insertBefore=function(b,f,e,a){var d=new Array();for(var c in b){if(c==a){if(e){d[e]=f}else{d.push(f)}}d[c]=b[c]}return d};Zapatec.inherit=function(d,b,a){var c=function(){};c.prototype=b.prototype;d.prototype=new c();d.prototype.constructor=d;d.SUPERconstructor=b;d.SUPERclass=b.prototype;if(typeof b.path!="undefined"){if(a&&a.keepPath){d.path=b.path}else{d.path=Zapatec.getPath(d.id)}}};Zapatec.getPath=function(c){var a;if(typeof c=="string"){var e=document.getElementById(c);if(e){a=e.getAttribute("src")}}if(!a){if(typeof Zapatec.lastLoadedModule=="string"){return Zapatec.lastLoadedModule}if(document.documentElement){var f=document.documentElement.innerHTML;var b=f.match(/<script[^>]+src=[^>]+>/gi);if(b&&b.length){f=b[b.length-1];b=f.match(/src="([^"]+)/i);if(b&&b.length==2){a=b[1]}}}if(!a){return""}}a=a.replace(/\\/g,"/");var d=a.split("?");d=d[0].split("/");d=d.slice(0,-1);if(!d.length){return""}return d.join("/")+"/"};Zapatec.Utils.setWindowEvent=function(a){if(a){window.event=a}};Zapatec.Utils.emulateWindowEvent=function(b){if(document.addEventListener){var a=b.length;var d=Zapatec.Utils;var c;for(c=0;c<a;c++){document.addEventListener(b[c],d.setWindowEvent,true)}}};Zapatec.windowLoaded=typeof(document.readyState)!="undefined"?(document.readyState=="loaded"||document.readyState=="complete"):document.getElementsByTagName!=null&&typeof(document.getElementsByTagName("body")[0])!="undefined";Zapatec.Utils.addEvent(window,"load",function(){Zapatec.windowLoaded=true});Zapatec.Utils.warnUnload=function(b,a){Zapatec.Utils.warnUnloadFlag=true;if(typeof(b)!="string"){b="All your changes will be lost."}if(typeof(a)=="undefined"){a=window}Zapatec.Utils.addEvent(a,"beforeunload",function(c){if(Zapatec.Utils.warnUnloadFlag!=true){return true}if(typeof(c)=="undefined"){c=window.event}c.returnValue=b;return false})};Zapatec.Utils.unwarnUnload=function(b,a){Zapatec.Utils.warnUnloadFlag=false};Zapatec.Utils.warnUnloadFlag=false;Zapatec.Utils.getMaxZindex=function(){if(window.opera||Zapatec.is_khtml){return 2147483583}else{if(Zapatec.is_ie){return 2147483647}else{return 10737418239}}};Zapatec.Utils.correctCssLength=function(a){if(typeof a=="undefined"||(typeof a=="object"&&!a)){return"auto"}a+="";if(!a.length){return"auto"}if(/\d$/.test(a)){a+="px"}return a};Zapatec.Utils.destroyOnUnload=[];Zapatec.Utils.addDestroyOnUnload=function(b,a){Zapatec.Utils.destroyOnUnload.push([b,a])};Zapatec.Utils.createProperty=function(b,a,c){b[a]=c;Zapatec.Utils.addDestroyOnUnload(b,a)};Zapatec.Utils.addEvent(window,"unload",function(){for(var d=Zapatec.Utils.destroyOnUnload.length-1;d>=0;d--){var c=Zapatec.Utils.destroyOnUnload[d];c[0][c[1]]=null;c[0]=null}for(var b=Zapatec.Utils.removeOnUnload.length-1;b>=0;b--){var a=Zapatec.Utils.removeOnUnload[b];if(!a){continue}Zapatec.Utils.removeOnUnload[b]=null;Zapatec.Utils.removeEvent(a.element,a.event,a.listener,a.capture)}});Zapatec.Utils.htmlEncode=function(a){a=a.replace(/&/ig,"&amp;");a=a.replace(/</ig,"&lt;");a=a.replace(/>/ig,"&gt;");a=a.replace(/\x22/ig,"&quot;");return a};Zapatec.Utils.applyStyle=function(c,a){if(typeof(c)=="string"){c=document.getElementById(c)}if(c==null||a==null||c.style==null){return null}if(Zapatec.is_opera){var b=a.split(";");for(var l=0;l<b.length;l++){var g=b[l].split(":");if(!g[1]){continue}var h=g[1].replace(/^\s*/,"").replace(/\s*$/,"");var i="";for(var d=0;d<g[0].length;d++){if(g[0].charAt(d)=="-"){d++;if(d<g[0].length){i+=g[0].charAt(d).toUpperCase()}continue}i+=g[0].charAt(d)}switch(i){case"float":i="cssFloat";break}try{c.style[i]=h}catch(f){}}}else{c.style.cssText=a}return true};Zapatec.Utils.getStyleProperty=function(d,c){var a=document.defaultView;if(a&&a.getComputedStyle){var b=a.getComputedStyle(d,"");if(b){c=c.replace(/([A-Z])/g,"-$1").toLowerCase();return b.getPropertyValue(c)}}else{if(d.currentStyle){return d.currentStyle[c]}}return d.style[c]};Zapatec.Utils.getPrecision=function(a){return(a+"").replace(/^-?\d*\.*/,"").length};Zapatec.Utils.setPrecision=function(a,c){a*=1;if(a.toFixed){return a.toFixed(c)*1}var b=Math.pow(10,c);return parseInt(a*b,10)/b};Zapatec.Utils.setPrecisionString=function(d,f){var b=Zapatec.Utils.setPrecision(d,f)+"";var a=Zapatec.Utils.getPrecision(b);var c=f-a;if(c){if(!a){b+="."}for(var e=0;e<c;e++){b+="0"}}return b};Zapatec.Utils.createNestedHash=function(c,d,e){if(c==null||d==null){return null}var a=c;for(var b=0;b<d.length;b++){if(typeof(a[d[b]])=="undefined"){a[d[b]]={}}if(b==d.length-1&&typeof(e)!="undefined"){a[d[b]]=e}a=a[d[b]]}};Zapatec.implement=function(c,d){if(typeof d!="string"){return false}if(typeof c=="function"){c=c.prototype}if(!c||typeof c!="object"){return false}var b=window;var g=d.split(".");try{for(var a=0;a<g.length;++a){b=b[g[a]]}}catch(f){return false}if(typeof c.interfaces!="object"){c.interfaces={};c.interfaces[d]=true}else{if(c.interfaces[d]!==true){c.interfaces=Zapatec.Utils.clone(c.interfaces);c.interfaces[d]=true}else{return true}}for(var h in b){c[h]=b[h]}c.hasInterface=function(e){if(this.interfaces[e]===true){return true}return false};c.requireInterface=function(e){if(!this.hasInterface(e)){Zapatec.Log({description:"The object with ID '"+this.id+"' has no "+e+" interface!"});return false}return true};b.setNamedProperty=c.setNamedProperty=function(e,i){this[e]=i};b.getNamedProperty=c.getNamedProperty=function(e){return this[e]};return true};Zapatec.Utils.getCharFromEvent=function(a){if(!a){a=window.event}var b={};if(Zapatec.is_gecko&&!Zapatec.is_khtml&&a.type!="keydown"&&a.type!="keyup"){if(a.charCode){b.chr=String.fromCharCode(a.charCode)}else{b.charCode=a.keyCode}}else{b.charCode=a.keyCode||a.which;b.chr=String.fromCharCode(b.charCode)}if(Zapatec.is_opera&&b.charCode==0){b.charCode=null;b.chr=null}if(Zapatec.is_khtml&&b.charCode==63272){b.charCode=46;b.chr=null}return b};Zapatec.Utils.convertHTML2DOM=function(a){var c=document.createElement("div");c.innerHTML=a;var b=c.firstChild;while(!b.nodeType||b.nodeType!=1){b=b.nextSibling}Zapatec.Utils.destroy(b);return b};Zapatec.Utils.escapeRegExp=function(a){return a.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")};if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.EventDriven=function(){};Zapatec.EventDriven.prototype.init=function(){this.events={}};Zapatec.EventDriven.prototype.addEventListener=function(c,a){if(typeof a!="function"){return false}var b=this.events;if(!b[c]){b[c]={listeners:[]}}else{this.removeEventListener(c,a)}b[c].listeners.push(a)};Zapatec.EventDriven.prototype.unshiftEventListener=function(c,a){if(typeof a!="function"){return false}var b=this.events;if(!b[c]){b[c]={listeners:[]}}else{this.removeEventListener(c,a)}b[c].listeners.unshift(a)};Zapatec.EventDriven.prototype.removeEventListener=function(f,c){var d=this.events;if(!d[f]){return 0}var b=d[f].listeners;var e=0;for(var a=b.length-1;a>=0;a--){if(b[a]==c){b.splice(a,1);e++}}return e};Zapatec.EventDriven.prototype.getEventListeners=function(b){var a=this.events;if(!a[b]){return[]}return a[b].listeners};Zapatec.EventDriven.prototype.isEventListener=function(e,c){var d=this.events;if(!d[e]){return false}var b=d[e].listeners;for(var a=b.length-1;a>=0;a--){if(b[a]==c){return true}}return false};Zapatec.EventDriven.prototype.isEvent=function(a){if(this.events[a]){return true}return false};Zapatec.EventDriven.prototype.removeEvent=function(c){var b=this.events;if(b[c]){var a;b[c]=a}};Zapatec.EventDriven.prototype.fireEvent=function(f){var d=this.events;if(!d[f]){return}var c=d[f].listeners.slice();var b=c.length;var e;for(var a=0;b--;a++){e=[].slice.call(arguments,1);c[a].apply(this,e)}};Zapatec.EventDriven.events={};Zapatec.EventDriven.addEventListener=function(d,a){if(typeof a!="function"){return false}var c=Zapatec.EventDriven;var b=c.events;if(!b[d]){b[d]={listeners:[]}}else{c.removeEventListener(d,a)}b[d].listeners.push(a)};Zapatec.EventDriven.unshiftEventListener=function(d,a){if(typeof a!="function"){return false}var c=Zapatec.EventDriven;var b=c.events;if(!b[d]){b[d]={listeners:[]}}else{c.removeEventListener(d,a)}b[d].listeners.unshift(a)};Zapatec.EventDriven.removeEventListener=function(f,c){var d=Zapatec.EventDriven.events;if(!d[f]){return 0}var b=d[f].listeners;var e=0;for(var a=b.length-1;a>=0;a--){if(b[a]==c){b.splice(a,1);e++}}return e};Zapatec.EventDriven.getEventListeners=function(b){var a=Zapatec.EventDriven.events;if(!a[b]){return[]}return a[b].listeners};Zapatec.EventDriven.isEventListener=function(e,c){var d=Zapatec.EventDriven.events;if(!d[e]){return false}var b=d[e].listeners;for(var a=b.length-1;a>=0;a--){if(b[a]==c){return true}}return false};Zapatec.EventDriven.isEvent=function(a){if(Zapatec.EventDriven.events[a]){return true}return false};Zapatec.EventDriven.removeEvent=function(c){var b=Zapatec.EventDriven.events;if(b[c]){var a;b[c]=a}};Zapatec.EventDriven.fireEvent=function(f){var d=Zapatec.EventDriven.events;if(!d[f]){return}var c=d[f].listeners.slice();var b=c.length;var e;for(var a=0;b--;a++){e=[].slice.call(arguments,1);c[a].apply(c[a],e)}};Zapatec.ImagePreloader=function(a){this.job=null;this.image=null;if(arguments.length>0){this.init(a)}};Zapatec.ImagePreloader.prototype.init=function(b){if(!b||!b.job){return}this.job=b.job;this.image=new Image();this.job.images.push(this.image);var a=this;this.image.onload=function(){a.job.loadedUrls.push(b.url);setTimeout(function(){a.onLoad()},0)};this.image.onerror=function(){a.job.invalidUrls.push(b.url);a.onLoad()};this.image.onabort=function(){a.job.abortedUrls.push(b.url);a.onLoad()};this.image.src=b.url;if(typeof b.timeout=="number"){setTimeout(function(){if(a.job){if(a.image.complete){a.job.loadedUrls.push(b.url)}else{a.job.abortedUrls.push(b.url)}a.onLoad()}},b.timeout)}};Zapatec.ImagePreloader.prototype.onLoad=function(){if(!this.job){return}this.image.onload=null;this.image.onerror=null;this.image.onabort=null;var b=this.job;this.job=null;b.leftToLoad--;if(b.leftToLoad==0&&typeof b.onLoad=="function"){var a=b.onLoad;b.onLoad=null;a(b)}};Zapatec.PreloadImages=function(a){this.images=[];this.leftToLoad=0;this.loadedUrls=[];this.invalidUrls=[];this.abortedUrls=[];this.onLoad=null;if(arguments.length>0){this.init(a)}};Zapatec.PreloadImages.prototype.init=function(b){if(!b){return}if(!b.urls||!b.urls.length){if(typeof b.onLoad=="function"){b.onLoad(this)}return}this.images=[];this.leftToLoad=b.urls.length;this.loadedUrls=[];this.invalidUrls=[];this.abortedUrls=[];this.onLoad=b.onLoad;for(var a=0;a<b.urls.length;a++){new Zapatec.ImagePreloader({job:this,url:b.urls[a],timeout:b.timeout})}};if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.StyleSheet=function(d){if(d){if(document.createStyleSheet){if(document.styleSheets.length){this.styleSheet=document.styleSheets[document.styleSheets.length-1]}}else{var a=document.getElementsByTagName("style");if(a.length){this.styleSheet=a[a.length-1]}}}if(!this.styleSheet){if(document.createStyleSheet){try{this.styleSheet=document.createStyleSheet()}catch(c){this.styleSheet=document.styleSheets[document.styleSheets.length-1]}}else{this.styleSheet=document.createElement("style");this.styleSheet.type="text/css";var b=document.getElementsByTagName("head")[0];if(!b){b=document.documentElement}if(b){b.appendChild(this.styleSheet)}}}};Zapatec.StyleSheet.prototype.addRule=function(a,b){if(!this.styleSheet){return}if(document.createStyleSheet){this.styleSheet.cssText+=a+" { "+b+" }"}else{this.styleSheet.appendChild(document.createTextNode(a+" { "+b+" }"))}};Zapatec.StyleSheet.prototype.removeRules=function(){if(!this.styleSheet){return}if(document.createStyleSheet){var a=this.styleSheet.rules.length;for(var b=0;b<a;b++){this.styleSheet.removeRule()}}else{while(this.styleSheet.firstChild){this.styleSheet.removeChild(this.styleSheet.firstChild)}}};Zapatec.StyleSheet.prototype.addParse=function(c){var i=[];var d=c.split("/*");for(var g=0;g<d.length;g++){var a=d[g].split("*/");i.push(a[a.length-1])}c=i.join("");c=c.replace(/@[^{]*;/g,"");var e=c.split("}");for(var f=0;f<e.length;f++){var b=e[f].split("{");if(b[0]&&b[1]){var l=b[0].split(",");for(var h=0;h<l.length;h++){this.addRule(l[h],b[1])}}}};if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.Transport=function(){};if(typeof ActiveXObject!="undefined"){Zapatec.Transport.XMLDOM=null;Zapatec.Transport.XMLHTTP=null;Zapatec.Transport.pickActiveXVersion=function(a){for(var d=0;d<a.length;d++){try{var b=new ActiveXObject(a[d]);if(b){return a[d]}}catch(c){}}return null};Zapatec.Transport.XMLDOM=Zapatec.Transport.pickActiveXVersion(["Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"]);Zapatec.Transport.XMLHTTP=Zapatec.Transport.pickActiveXVersion(["Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]);Zapatec.Transport.pickActiveXVersion=null}Zapatec.Transport.createXmlHttpRequest=function(){if(typeof ActiveXObject!="undefined"){try{return new ActiveXObject(Zapatec.Transport.XMLHTTP)}catch(a){}}if(typeof XMLHttpRequest!="undefined"){return new XMLHttpRequest()}return null};Zapatec.Transport.isBusy=function(e){var b=e.busyContainer;if(typeof b=="string"){b=document.getElementById(b)}if(!b){return}var a=e.busyImage;if(typeof a!="string"){a=""}a=a.split("/").pop();if(!a.length){a="zpbusy.gif"}var d=b.firstChild;if(d){d=d.firstChild;if(d){d=d.firstChild;if(d&&d.tagName&&d.tagName.toLowerCase()=="img"){var c=d.getAttribute("src");if(typeof c=="string"&&c.length){c=c.split("/").pop();if(c==a){return true}}}}}return false};Zapatec.Transport.showBusy=function(a){if(Zapatec.Transport.isBusy(a)){return}var n=a.busyContainer;if(typeof n=="string"){n=document.getElementById(n)}if(!n){return}var g=a.busyImage;var i=a.busyImageWidth;var m=a.busyImageHeight;if(typeof g!="string"||!g.length){g="zpbusy.gif"}else{if(typeof i=="number"||(typeof i=="string"&&/\d$/.test(i))){i+="px"}if(typeof m=="number"||(typeof m=="string"&&/\d$/.test(m))){m+="px"}}if(!i){i="65px"}if(!m){m="35px"}var f="";if(g.indexOf("/")<0){if(Zapatec.zapatecPath){f=Zapatec.zapatecPath}else{f=Zapatec.Transport.getPath("transport.js")}}var d=[];d.push('<img src="');d.push(f);d.push(g);d.push('"');if(i||m){d.push(' style="');if(i){d.push("width:");d.push(i);d.push(";")}if(m){d.push("height:");d.push(m)}d.push('"')}d.push(" />");var b=n.offsetWidth;var l=n.offsetHeight;var h=Zapatec.Utils.createElement("div");h.style.position="relative";h.style.zIndex=2147483583;var e=Zapatec.Utils.createElement("div",h);e.style.position="absolute";e.innerHTML=d.join("");n.insertBefore(h,n.firstChild);var o=e.offsetWidth;var c=e.offsetHeight;if(b>o){e.style.left=n.scrollLeft+(b-o)/2+"px"}if(l>c){e.style.top=n.scrollTop+(l-c)/2+"px"}};Zapatec.Transport.removeBusy=function(b){var a=b.busyContainer;if(typeof a=="string"){a=document.getElementById(a)}if(!a){return}if(Zapatec.Transport.isBusy(b)){a.removeChild(a.firstChild)}};Zapatec.Transport.fetch=function(b){if(b==null||typeof b!="object"){return null}if(!b.url){return null}if(!b.method){b.method="GET"}if(typeof b.async=="undefined"){b.async=true}if(!b.contentType&&b.method.toUpperCase()=="POST"){b.contentType="application/x-www-form-urlencoded"}if(!b.content){b.content=null}if(!b.onLoad){b.onLoad=null}if(!b.onError){b.onError=null}var c=Zapatec.Transport.createXmlHttpRequest();if(c==null){return null}Zapatec.Transport.showBusy(b);var e=false;var d=function(){Zapatec.Transport.removeBusy(b);try{if(c.status==200||c.status==304||(location.protocol=="file:"&&!c.status)){if(typeof b.onLoad=="function"){b.onLoad(c)}}else{if(!e){e=true;Zapatec.Transport.displayError(c.status,"Error: Can't fetch "+b.url+".\n"+(c.statusText||""),b.onError)}}}catch(f){if(!e){e=true;if(f.name&&f.name=="NS_ERROR_NOT_AVAILABLE"){Zapatec.Transport.displayError(0,"Error: Can't fetch "+b.url+".\nFile not found.",b.onError)}else{Zapatec.Transport.displayError(0,"Error: Can't fetch "+b.url+".\n"+(f.message||""),b.onError)}}}};try{if(typeof b.username!="undefined"&&typeof b.password!="undefined"){c.open(b.method,b.url,b.async,b.username,b.password)}else{c.open(b.method,b.url,b.async)}if(b.async){c.onreadystatechange=function(){if(c.readyState==4){d();c.onreadystatechange={}}}}if(b.contentType){c.setRequestHeader("Content-Type",b.contentType)}c.send(b.content);if(!b.async){d();return c}}catch(a){Zapatec.Transport.removeBusy(b);if(!e){e=true;if(a.name&&a.name=="NS_ERROR_FILE_NOT_FOUND"){Zapatec.Transport.displayError(0,"Error: Can't fetch "+b.url+".\nFile not found.",b.onError)}else{Zapatec.Transport.displayError(0,"Error: Can't fetch "+b.url+".\n"+(a.message||""),b.onError)}}}return null};Zapatec.Transport.parseHtml=function(b){b+="";b=b.replace(/^\s+/g,"");var a;if(document.createElementNS){a=document.createElementNS("http://www.w3.org/1999/xhtml","div")}else{a=document.createElement("div")}a.innerHTML=b;return a};Zapatec.Transport.evalGlobalScope=function(sScript){if(typeof sScript!="string"||!sScript.match(/\S/)){return}if(window.execScript){window.execScript(sScript,"javascript")}else{if(window.eval){window.eval(sScript)}}};Zapatec.Transport.setInnerHtml=function(c){if(!c||typeof c.html!="string"){return}var p=c.html;var r=null;if(typeof c.container=="string"){r=document.getElementById(c.container)}else{if(typeof c.container=="object"){r=c.container}}var n=[];if(p.match(/<\s*\/\s*script\s*>/i)){var m=p.split(/<\s*\/\s*script\s*>/i);var g=[];for(var e=m.length-1;e>=0;e--){var f=m[e];if(f.match(/\S/)){var b=f.match(/<\s*script([^>]*)>/i);if(b){var i=f.split(/<\s*script[^>]*>/i);while(i.length<2){if(f.match(/^<\s*script[^>]*>/i)){i.unshift("")}else{i.push("")}}g.unshift(i[0]);var s=b[1];var a=i[1];if(s.match(/\s+src\s*=/i)){a=""}else{a=a.replace(/function\s+([^(]+)/g,"$1=function")}n.push([s,a])}else{if(e<m.length-1){m[e-1]+="<\/script>"+f}else{g.unshift(f)}}}else{g.unshift(f)}}p=g.join("")}if(r){if(window.opera){r.innerHTML="<form></form>"}r.innerHTML=p}for(var q=0;q<n.length;q++){if(n[q][1].length){Zapatec.Transport.evalGlobalScope(n[q][1])}var s=n[q][0];s=s.replace(/\s+/g," ").replace(/^\s/,"").replace(/\s$/,"").replace(/ = /g,"=");if(s.indexOf("src=")>=0){var r=document.body;if(!r){r=document.getElementsByTagName("head")[0];if(!r){r=document}}var h=s.split(" ");var d=Zapatec.Utils.createElement("script");for(var o=0;o<h.length;o++){var l=h[o].split("=");if(l.length>1){d.setAttribute(l[0],l[1].match(/^[\s|"|']*([\s|\S]*[^'|"])[\s|"|']*$/)[1])}else{d.setAttribute(l[0],l[0])}}r.appendChild(d)}}};Zapatec.Transport.fetchXmlDoc=function(c){if(c==null||typeof c!="object"){return null}if(!c.url){return null}if(typeof c.async=="undefined"){c.async=true}if(!c.onLoad){c.onLoad=null}if(!c.onError){c.onError=null}if(!c.method&&typeof c.username=="undefined"&&typeof c.password=="undefined"){if(document.implementation&&document.implementation.createDocument){var a=null;if(!c.reliable){c.reliable=false}var e={};for(var f in c){e[f]=c[f]}if(c.async){e.onLoad=function(h){e.onLoad=null;var i=new DOMParser();a=i.parseFromString(h.responseText,"text/xml");Zapatec.Transport.removeBusy(c);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError)}}else{e.onLoad=null}var d=Zapatec.Transport.fetch(e);if(!c.async&&d){var g=new DOMParser();a=g.parseFromString(d.responseText,"text/xml");Zapatec.Transport.removeBusy(c);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);return a}return null}if(typeof ActiveXObject!="undefined"){Zapatec.Transport.showBusy(c);try{var a=new ActiveXObject(Zapatec.Transport.XMLDOM);a.async=c.async;if(c.async){a.onreadystatechange=function(){if(a.readyState==4){Zapatec.Transport.removeBusy(c);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);a.onreadystatechange={}}}}a.load(c.url);if(!c.async){Zapatec.Transport.removeBusy(c);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);return a}return null}catch(b){Zapatec.Transport.removeBusy(c)}}}var e={};for(var f in c){e[f]=c[f]}if(c.async){e.onLoad=function(h){Zapatec.Transport.parseXml({strXml:h.responseText,onLoad:c.onLoad,onError:c.onError})}}else{e.onLoad=null}var d=Zapatec.Transport.fetch(e);if(!c.async&&d){return Zapatec.Transport.parseXml({strXml:d.responseText,onLoad:c.onLoad,onError:c.onError})}return null};Zapatec.Transport.parseXml=function(c){if(c==null||typeof c!="object"){return null}if(!c.strXml){return null}if(!c.onLoad){c.onLoad=null}if(!c.onError){c.onError=null}if(window.DOMParser){try{var a=(new DOMParser()).parseFromString(c.strXml,"text/xml");Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);return a}catch(b){Zapatec.Transport.displayError(0,"Error: Can't parse.\nString does not appear to be a valid XML fragment.",c.onError)}return null}if(typeof ActiveXObject!="undefined"){try{var a=new ActiveXObject(Zapatec.Transport.XMLDOM);a.loadXML(c.strXml);Zapatec.Transport.onXmlDocLoad(a,c.onLoad,c.onError);return a}catch(b){}}return null};Zapatec.Transport.onXmlDocLoad=function(a,b,d){var c=null;if(a.parseError){c=a.parseError.reason;if(a.parseError.srcText){c+="Location: "+a.parseError.url+"\nLine number "+a.parseError.line+", column "+a.parseError.linepos+":\n"+a.parseError.srcText+"\n"}}else{if(a.documentElement&&a.documentElement.tagName=="parsererror"){c=a.documentElement.firstChild.data+"\n"+a.documentElement.firstChild.nextSibling.firstChild.data}else{if(!a.documentElement){c="String does not appear to be a valid XML fragment."}}}if(c){Zapatec.Transport.displayError(0,"Error: Can't parse.\n"+c,d)}else{if(typeof b=="function"){b(a)}}};Zapatec.Transport.serializeXmlDoc=function(a){if(window.XMLSerializer){return(new XMLSerializer).serializeToString(a)}if(a.xml){return a.xml}};Zapatec.Transport.fetchJsonObj=function(a){if(a==null||typeof a!="object"){return null}if(!a.url){return null}if(typeof a.async=="undefined"){a.async=true}if(!a.reliable){a.reliable=false}var c={};for(var d in a){c[d]=a[d]}if(a.async){c.onLoad=function(e){Zapatec.Transport.parseJson({strJson:e.responseText,reliable:a.reliable,onLoad:a.onLoad,onError:a.onError})}}else{c.onLoad=null}var b=Zapatec.Transport.fetch(c);if(!a.async&&b){return Zapatec.Transport.parseJson({strJson:b.responseText,reliable:a.reliable,onLoad:a.onLoad,onError:a.onError})}return null};Zapatec.Transport.parseJson=function(oArg){if(oArg==null||typeof oArg!="object"){return null}if(!oArg.reliable){oArg.reliable=false}if(!oArg.onLoad){oArg.onLoad=null}if(!oArg.onError){oArg.onError=null}var oJson=null;try{if(oArg.reliable){if(oArg.strJson){oJson=eval("("+oArg.strJson+")")}}else{oJson=Zapatec.Transport.parseJsonStr(oArg.strJson)}}catch(oExpn){var sError="Error: Can't parse.\nString doesn't appear to be a valid JSON fragment: ";sError+=oExpn.message;if(typeof oExpn.text!="undefined"&&oExpn.text.length){sError+="\n"+oExpn.text}sError+="\n"+oArg.strJson;Zapatec.Transport.displayError(0,sError,oArg.onError);return null}if(typeof oArg.onLoad=="function"){oArg.onLoad(oJson)}return oJson};Zapatec.Transport.parseJsonStr=function(text){var p=/^\s*(([,:{}\[\]])|"(\\.|[^\x00-\x1f"\\])*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)\s*/,token,operator;function error(m,t){throw {name:"JSONError",message:m,text:t||operator||token}}function next(b){if(b&&b!=operator){error("Expected '"+b+"'")}if(text){var t=p.exec(text);if(t){if(t[2]){token=null;operator=t[2]}else{operator=null;try{token=eval(t[1])}catch(e){error("Bad token",t[1])}}text=text.substring(t[0].length)}else{error("Unrecognized token",text)}}else{token=operator=null}}function val(){var k,o;switch(operator){case"{":next("{");o={};if(operator!="}"){for(;;){if(operator||typeof token!="string"){error("Missing key")}k=token;next();next(":");o[k]=val();if(operator!=","){break}next(",")}}next("}");return o;case"[":next("[");o=[];if(operator!="]"){for(;;){o.push(val());if(operator!=","){break}next(",")}}next("]");return o;default:if(operator!==null){error("Missing value")}k=token;next();return k}}next();return val()};Zapatec.Transport.serializeJsonObj=function(c){var b=[];function f(a){b[b.length]=a}function d(a){var m,h,e,g;switch(typeof a){case"object":if(a){if(a instanceof Array){f("[");e=b.length;for(h=0;h<a.length;h+=1){g=a[h];if(typeof g!="undefined"&&typeof g!="function"){if(e<b.length){f(",")}d(g)}}f("]");return}else{if(typeof a.toString!="undefined"){f("{");e=b.length;for(h in a){g=a[h];if(a.hasOwnProperty(h)&&typeof g!="undefined"&&typeof g!="function"){if(e<b.length){f(",")}d(h);f(":");d(g)}}return f("}")}}}f("null");return;case"number":f(isFinite(a)?+a:"null");return;case"string":e=a.length;f('"');for(h=0;h<e;h+=1){m=a.charAt(h);if(m>=" "){if(m=="\\"||m=='"'){f("\\")}f(m)}else{switch(m){case"\b":f("\\b");break;case"\f":f("\\f");break;case"\n":f("\\n");break;case"\r":f("\\r");break;case"\t":f("\\t");break;default:m=m.charCodeAt();f("\\u00"+Math.floor(m/16).toString(16)+(m%16).toString(16))}}}f('"');return;case"boolean":f(String(a));return;default:f("null");return}}d(c);return b.join("")};Zapatec.Transport.displayError=function(a,c,b){if(typeof b=="function"){b({errorCode:a,errorDescription:c})}else{alert(c)}};Zapatec.Transport.translateUrl=function(a){if(!a||!a.url){return null}var c=a.url.split("?",2);var d=c[0];if(d.indexOf(":")>=0){return a.url}var i=document.location;var h=i.port;if(h){h=":"+h}if(d[0]=="/"){return[i.protocol,"//",i.hostname,h,d].join("")}var g;if(h){g=[i.protocol,"//",i.hostname,h,i.pathname].join("")}else{g=i.toString()}var b;if(typeof a.relativeTo!="string"){b=g.split("?",2)[0]}else{b=a.relativeTo.split("?",2)[0];if(b.indexOf("/")<0){b=g.split("?",2)[0]}else{if(b.charAt(0)!="/"&&b.indexOf(":")<0){b=Zapatec.Transport.translateUrl({url:b})}}}b=b.split("#")[0];var m=d.split("/");var l=b.split("/");l.pop();for(var e=0;e<m.length;e++){var f=m[e];if(f==".."){l.pop()}else{if(f!="."){l.push(f)}}}c[0]=l.join("/");return c.join("?")};Zapatec.Transport.loading={};Zapatec.Transport.setupEvents=function(a){if(!a){return{}}if(a.force||!Zapatec.EventDriven||!a.url){return{onLoad:a.onLoad,onError:a.onError}}var b=a.url;if(typeof a.onLoad=="function"){Zapatec.EventDriven.addEventListener("zpTransportOnLoad"+b,a.onLoad)}if(typeof a.onError=="function"){Zapatec.EventDriven.addEventListener("zpTransportOnError"+b,a.onError)}if(Zapatec.Transport.loading[b]){return{loading:true}}else{Zapatec.Transport.loading[b]=true;return{onLoad:new Function("Zapatec.EventDriven.fireEvent('zpTransportOnLoad"+b+"');Zapatec.EventDriven.removeEvent('zpTransportOnLoad"+b+"');Zapatec.EventDriven.removeEvent('zpTransportOnError"+b+"');Zapatec.Transport.loading['"+b+"'] = false;"),onError:new Function("oError","Zapatec.EventDriven.fireEvent('zpTransportOnError"+b+"',oError);Zapatec.EventDriven.removeEvent('zpTransportOnLoad"+b+"');Zapatec.EventDriven.removeEvent('zpTransportOnError"+b+"');Zapatec.Transport.loading['"+b+"'] = false;")}}};Zapatec.Transport.loadedJS={};Zapatec.Transport.isLoadedJS=function(d,e){if(typeof e=="undefined"){e=Zapatec.Transport.translateUrl({url:d})}if(Zapatec.Transport.loadedJS[e]){return true}var c=document.getElementsByTagName("script");for(var a=0;a<c.length;a++){var b=c[a].getAttribute("src")||"";if(b==d){Zapatec.Transport.loadedJS[e]=true;return true}}return false};Zapatec.Transport.getPath=function(b){var e=document.getElementsByTagName("script");for(var a=e.length-1;a>=0;a--){var c=e[a].getAttribute("src")||"";var d=c.split("/");var f=d.pop();if(f==b){return d.length?d.join("/")+"/":""}}for(var c in Zapatec.Transport.loadedJS){var d=c.split("/");var f=d.pop();if(f==b){return d.length?d.join("/")+"/":""}}return""};Zapatec.Transport.include=function(a,b,c){if(Zapatec.doNotInclude){return}var d=Zapatec.Transport.translateUrl({url:a});if(!c&&Zapatec.Transport.isLoadedJS(a,d)){return}document.write('<script type="text/javascript" src="'+a+(typeof b=="string"?'" id="'+b:"")+'"><\/script>');Zapatec.Transport.loadedJS[d]=true};Zapatec.include=Zapatec.Transport.include;Zapatec.Transport.includeJS=function(a,b){setTimeout(function(){var c=document.body;if(!c){c=document.getElementsByTagName("head")[0];if(!c){c=document}}var d=document.createElement("script");d.type="text/javascript";d.src=a;if(typeof b=="string"){d.id=b}c.appendChild(d)},0)};Zapatec.Transport.loadJS=function(c){if(!(c instanceof Object)){return}if(typeof c.async=="undefined"){c.async=true}var d=null;if(c.url){d=c.url}else{if(c.module){var a="";if(typeof c.path!="undefined"){a=c.path}else{if(typeof Zapatec.zapatecPath!="undefined"){a=Zapatec.zapatecPath}}d=a+c.module+".js"}else{return}}var e=Zapatec.Transport.translateUrl({url:d});if(!c.onLoad){c.onLoad=null}if(!c.onError){c.onError=null}if(Zapatec.doNotInclude||(!c.force&&Zapatec.Transport.isLoadedJS(d,e))){if(typeof c.onLoad=="function"){c.onLoad()}return}var b=Zapatec.Transport.setupEvents({url:e,force:c.force,onLoad:c.onLoad,onError:c.onError});if(b.loading){return}Zapatec.Transport.fetch({url:d,async:c.async,onLoad:function(g){if(c.force||!Zapatec.Transport.loadedJS[e]){var f=d.split("/");var h=f.pop();Zapatec.lastLoadedModule=f.join("/")+"/";Zapatec.Transport.evalGlobalScope(g.responseText);Zapatec.lastLoadedModule=null;Zapatec.Transport.loadedJS[e]=true}if(typeof b.onLoad=="function"){b.onLoad()}},onError:b.onError})};Zapatec.Transport.includeCSS=function(b){var a=document.getElementsByTagName("head")[0];if(!a){return}var c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("href",b);a.appendChild(c)};Zapatec.Transport.loadedCss={};Zapatec.Transport.loadCss=function(c){if(!(c instanceof Object)){return}if(!c.url){return}if(typeof c.async=="undefined"){c.async=true}var e=Zapatec.Transport.translateUrl({url:c.url});if(!c.force){if(Zapatec.Transport.loadedCss[e]){if(typeof c.onLoad=="function"){c.onLoad()}return}var a=document.getElementsByTagName("link");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href")||"";d=Zapatec.Transport.translateUrl({url:d});if(d==e){Zapatec.Transport.loadedCss[e]=true;if(typeof c.onLoad=="function"){c.onLoad()}return}}}var b=Zapatec.Transport.setupEvents({url:e,force:c.force,onLoad:c.onLoad,onError:c.onError});if(b.loading){return}Zapatec.Transport.fetch({url:c.url,async:c.async,onLoad:function(h){var p=h.responseText;var n=[];var q=[];var g=[];var l=0;var m=p.indexOf("url(",l);while(m>=0){m+=4;var i=p.substring(l,m);var r=/@import\s+url\($/.test(i);n.push(i);l=m;m=p.indexOf(")",l);if(m>=0){var o=p.substring(l,m);o=o.replace(/['"]/g,"");o=Zapatec.Transport.translateUrl({url:o,relativeTo:c.url});o=Zapatec.Transport.translateUrl({url:o});n.push(o);if(r){g.push(o)}else{q.push(o)}l=m;m=p.indexOf("url(",l)}}n.push(p.substr(l));p=n.join("");Zapatec.Transport.loadCssList({urls:g,async:c.async,onLoad:function(){(new Zapatec.StyleSheet()).addParse(p);if(typeof b.onLoad=="function"){b.onLoad()}}});Zapatec.Transport.loadedCss[e]=true;Zapatec.Transport.preloadImages({urls:q,timeout:60000})},onError:b.onError})};Zapatec.Transport.loadCssList=function(b){if(!(b instanceof Object)){return}if(typeof b.async=="undefined"){b.async=true}if(!b.onLoad){b.onLoad=null}if(!b.onError){b.onError=null}if(!b.urls||!b.urls.length){if(typeof b.onLoad=="function"){b.onLoad()}return}var c=b.urls.shift();var a=function(){Zapatec.Transport.loadCssList({urls:b.urls,async:b.async,force:b.force,onLoad:b.onLoad,onError:b.onError})};Zapatec.Transport.loadCss({url:c,async:b.async,force:b.force,onLoad:a,onError:function(d){Zapatec.Transport.displayError(d.errorCode,d.errorDescription,b.onError);a()}})};Zapatec.Transport.imagePreloads=[];Zapatec.Transport.preloadImages=function(a){Zapatec.Transport.imagePreloads.push(new Zapatec.PreloadImages(a))};Zapatec.Drag={};Zapatec.Utils.emulateWindowEvent(["mousedown","mousemove","mouseup"]);Zapatec.Drag.currentId=null;Zapatec.Drag.start=function(l,d,a){var c=Zapatec.Drag;var f=Zapatec.Utils;if(c.currentId){return true}var e=Zapatec.Widget.getElementById(d);if(!e||e.zpDrag){return true}if(!a){a={}}var h=f.getMousePos(l||window.event);Zapatec.EventDriven.fireEvent("dragStart",{el:e,event:l});e.zpDrag=true;if(a.resize){e.zpDragResize=true}e.zpDragPageX=h.pageX;e.zpDragPageY=h.pageY;e.zpDragWidth=e.clientWidth;e.zpDragHeight=e.clientHeight;var b;var i=e.offsetParent;if(i){b=i.tagName.toLowerCase()}if(b&&b!="body"&&b!="html"){h=f.getElementOffset(e);var g=f.getElementOffset(i);e.zpDragLeft=h.left-g.left;e.zpDragTop=h.top-g.top}else{e.zpDragLeft=e.offsetLeft;e.zpDragTop=e.offsetTop}e.zpDragRight=e.zpDragLeft+e.zpDragWidth;e.zpDragBottom=e.zpDragTop+e.zpDragHeight;e.zpDragPrevLeft=e.zpDragPrevRealLeft=e.zpDragLeft;e.zpDragPrevTop=e.zpDragPrevRealTop=e.zpDragTop;e.zpDragV=a.vertical;e.zpDragH=a.horizontal;e.zpDragLimTop=typeof a.limitTop=="number"?a.limitTop:-Infinity;e.zpDragLimBot=typeof a.limitBottom=="number"?a.limitBottom:Infinity;e.zpDragLimLft=typeof a.limitLeft=="number"?a.limitLeft:-Infinity;e.zpDragLimRgh=typeof a.limitRight=="number"?a.limitRight:Infinity;if(typeof a.step=="number"){e.zpDragStepV=e.zpDragStepH=a.step}if(typeof a.stepVertical=="number"){e.zpDragStepV=a.stepVertical}if(typeof a.stepHorizontal=="number"){e.zpDragStepH=a.stepHorizontal}c.currentId=d;f.addEvent(document,"mousemove",c.move);f.addEvent(document,"mouseup",c.end);return true};Zapatec.Drag.move=function(m){var b=Zapatec.Drag;var i=Zapatec.Utils;m||(m=window.event);if(!b.currentId){return i.stopEvent(m)}var g=document.getElementById(b.currentId);if(!(g&&g.zpDrag)){return i.stopEvent(m)}var d=g.style;var l=i.getMousePos(m);var a={el:g,startLeft:g.zpDragLeft,startTop:g.zpDragTop,prevLeft:g.zpDragPrevLeft,prevTop:g.zpDragPrevTop,left:g.zpDragLeft,top:g.zpDragTop,realLeft:g.zpDragLeft,realTop:g.zpDragTop,event:m};var h,e,f,c;h=l.pageX-g.zpDragPageX;f=g.zpDragStepH;if(f){e=g.zpDragLeft+Math.floor(h/f)*f;a.realLeft=g.zpDragPrevRealLeft=g.zpDragLeft+h}else{a.realLeft=g.zpDragPrevRealLeft=e=g.zpDragLeft+h}if(!g.zpDragV){if(g.zpDragLimLft<=e&&g.zpDragLimRgh>=e){if(d.right){d.right=""}if(g.zpDragResize){if(h>0){c=g.zpDragWidth+h;if(f){c=Math.floor(c/f)*f}d.left=g.zpDragLeft+"px"}else{c=g.zpDragWidth-h;if(f){c=Math.ceil(c/f)*f}d.left=g.zpDragLeft-c+"px"}d.width=c+"px"}else{d.left=e+"px"}a.left=e;g.zpDragPrevLeft=e}else{a.left=a.prevLeft}}h=l.pageY-g.zpDragPageY;f=g.zpDragStepV;if(f){e=g.zpDragTop+Math.floor(h/f)*f;a.realTop=g.zpDragPrevRealTop=g.zpDragTop+h}else{e=a.realTop=g.zpDragPrevRealTop=g.zpDragTop+h}if(!g.zpDragH){if(g.zpDragLimTop<=e&&g.zpDragLimBot>=e){if(d.bottom){d.bottom=""}if(g.zpDragResize){if(h>0){c=g.zpDragHeight+h;if(f){c=Math.floor(c/f)*f}d.top=g.zpDragTop+"px"}else{c=g.zpDragHeight-h;if(f){c=Math.ceil(c/f)*f}d.top=g.zpDragBottom-c+"px"}d.height=c+"px"}else{d.top=e+"px"}a.top=e;g.zpDragPrevTop=e}else{a.top=a.prevTop}}Zapatec.EventDriven.fireEvent("dragMove",a);return i.stopEvent(m)};Zapatec.Drag.end=function(b){var e=Zapatec.Drag;var d=Zapatec.Utils;b||(b=window.event);if(!e.currentId){return d.stopEvent(b)}var a=document.getElementById(e.currentId);if(!(a&&a.zpDrag)){return d.stopEvent(b)}d.removeEvent(document,"mousemove",e.move);d.removeEvent(document,"mouseup",e.end);var c={el:a,startLeft:a.zpDragLeft,startTop:a.zpDragTop,left:a.zpDragPrevLeft,top:a.zpDragPrevTop,realLeft:a.zpDragPrevRealLeft,realTop:a.zpDragPrevRealTop,event:b};e.currentId=null;a.zpDrag=null;a.zpDragPageY=null;a.zpDragPageX=null;a.zpDragTop=null;a.zpDragLeft=null;a.zpDragPrevTop=null;a.zpDragPrevLeft=null;a.zpDragPrevRealTop=null;a.zpDragPrevRealLeft=null;a.zpDragV=null;a.zpDragH=null;a.zpDragLimTop=null;a.zpDragLimBot=null;a.zpDragLimLft=null;a.zpDragLimRgh=null;a.zpDragStepV=null;a.zpDragStepH=null;Zapatec.EventDriven.fireEvent("dragEnd",c);return d.stopEvent(b)};if(typeof Zapatec=="undefined"){Zapatec=function(){}}Zapatec.Widget=function(a){this.config={};Zapatec.Widget.SUPERconstructor.call(this);this.init(a)};Zapatec.inherit(Zapatec.Widget,Zapatec.EventDriven);Zapatec.Widget.path=Zapatec.getPath("Zapatec.Widget");Zapatec.Widget.prototype.init=function(a){Zapatec.Widget.SUPERclass.init.call(this);if(typeof this.id=="undefined"){var b=0;while(Zapatec.Widget.all[b]){b++}this.id=b;Zapatec.Widget.all[b]=this}this.configure(a);this.addUserEventListeners();this.addStandardEventListeners();this.initLang();this.loadTheme()};Zapatec.Widget.prototype.reconfigure=function(a){this.configure(a);this.loadTheme();if(a.lang||a.langCountryCode||a.langEncoding){this.langStr=this.config.lang;if(this.config.langCountryCode&&this.config.langCountryCode.length>0){this.langStr+="_"+this.config.langCountryCode}if(this.config.langEncoding&&this.config.langEncoding.length>0){this.langStr+="-"+this.config.langEncoding}}if(this.config.lang&&this.config.lang.length>0&&!(Zapatec.Langs[this.config.langId]&&Zapatec.Langs[this.config.langId][this.langStr])){Zapatec.Log({description:this.config.lang+(this.config.langCountryCode?" and country code "+this.config.langCountryCode:"")+(this.config.langEncoding?" and encoding "+this.config.langEncoding:"")});this.config.lang=null;this.config.langEncoding=null;this.langStr=null}};Zapatec.Widget.prototype.configure=function(b){this.defineConfigOption("theme","default");var a=this.constructor.path;if(typeof a!="undefined"){this.defineConfigOption("themePath",a+"../themes/")}else{this.defineConfigOption("themePath","../themes/")}this.defineConfigOption("asyncTheme",false);this.defineConfigOption("source");this.defineConfigOption("sourceType");this.defineConfigOption("callbackSource");this.defineConfigOption("asyncSource",true);this.defineConfigOption("reliableSource",true);this.defineConfigOption("callbackConvertSource");this.defineConfigOption("eventListeners",{});this.defineConfigOption("langId");this.defineConfigOption("lang");this.defineConfigOption("langCountryCode");this.defineConfigOption("langEncoding");if(b){var c=this.config;for(var d in b){if(typeof c[d]!="undefined"){c[d]=b[d]}else{Zapatec.Log({description:"Unknown config option: "+d})}}}};Zapatec.Widget.prototype.getConfiguration=function(){return this.config};Zapatec.Widget.all=[];Zapatec.Widget.getWidgetById=function(a){return Zapatec.Widget.all[a]};Zapatec.Widget.prototype.addCircularRef=function(a,b){if(!this.widgetCircularRefs){this.widgetCircularRefs=[]}this.widgetCircularRefs.push([a,b])};Zapatec.Widget.prototype.createProperty=function(a,b,c){a[b]=c;this.addCircularRef(a,b)};Zapatec.Widget.prototype.removeCircularRefs=function(){if(!this.widgetCircularRefs){return}for(var a=this.widgetCircularRefs.length-1;a>=0;a--){var b=this.widgetCircularRefs[a];b[0][b[1]]=null;b[0]=null}};Zapatec.Widget.prototype.discard=function(){Zapatec.Widget.all[this.id]=null;this.removeCircularRefs()};Zapatec.Widget.removeCircularRefs=function(){for(var b=Zapatec.Widget.all.length-1;b>=0;b--){var a=Zapatec.Widget.all[b];if(a&&a.removeCircularRefs){a.removeCircularRefs()}}};Zapatec.Utils.addEvent(window,"unload",Zapatec.Widget.removeCircularRefs);Zapatec.Widget.prototype.defineConfigOption=function(b,a){if(typeof this.config[b]=="undefined"){if(typeof a=="undefined"){this.config[b]=null}else{this.config[b]=a}}};Zapatec.Widget.prototype.addUserEventListeners=function(){var d=this.config.eventListeners;var c,a,b;for(var e in d){if(d.hasOwnProperty(e)){vListener=d[e];if(vListener instanceof Array){a=vListener.length;for(b=0;b<a;b++){this.addEventListener(e,vListener[b])}}else{this.addEventListener(e,vListener)}}}};Zapatec.Widget.prototype.addStandardEventListeners=function(){this.addEventListener("loadThemeError",Zapatec.Widget.loadThemeError)};Zapatec.Widget.loadThemeError=function(b){var a="Can't load theme.";if(b&&b.errorDescription){a+=" "+b.errorDescription}Zapatec.Log({description:a})};Zapatec.Widget.prototype.loadTheme=function(){var d=this.config;if(typeof d.theme=="string"&&d.theme.length){var e=d.theme.lastIndexOf("/");if(e>=0){e++;d.themePath=d.theme.substring(0,e);d.theme=d.theme.substring(e)}e=d.theme.lastIndexOf(".");if(e>=0){d.theme=d.theme.substring(0,e)}d.theme=d.theme.toLowerCase();if(d.theme=="auto"){var b=navigator.userAgent;if(b.indexOf("Windows NT 6")!=-1){d.theme="winvista"}else{if(b.indexOf("Windows NT 5")!=-1){d.theme="winxp"}else{if(b.indexOf("Win")!=-1){d.theme="win2k"}else{if(b.indexOf("Mac")!=-1){d.theme="macosx"}else{d.theme="default"}}}}}}else{d.theme=""}if(d.theme){this.fireEvent("loadThemeStart");this.themeLoaded=false;var a=this;var c=d.themePath+d.theme+".css";Zapatec.Transport.loadCss({url:c,async:d.asyncTheme,onLoad:function(){a.fireEvent("loadThemeEnd");a.themeLoaded=true},onError:function(f){a.fireEvent("loadThemeEnd");a.fireEvent("loadThemeError",f);a.themeLoaded=true}})}};Zapatec.Widget.prototype.getClassName=function(b){var c=[];if(b&&b.prefix){c.push(b.prefix)}var a=this.config.theme;if(a!=""){c.push(a.charAt(0).toUpperCase());c.push(a.substr(1))}if(b&&b.suffix){c.push(b.suffix)}return c.join("")};Zapatec.Widget.prototype.formElementId=function(a){var b=[];if(a&&a.prefix){b.push(a.prefix)}else{b.push("zpWidget")}b.push(this.id);if(a&&a.suffix){b.push(a.suffix)}else{b.push("-")}if(typeof this.widgetUniqueIdCounter=="undefined"){this.widgetUniqueIdCounter=0}else{this.widgetUniqueIdCounter++}b.push(this.widgetUniqueIdCounter);return b.join("")};Zapatec.Widget.prototype.showContainer=function(a,c,b){return this.showHideContainer(a,c,b,true)};Zapatec.Widget.prototype.hideContainer=function(a,c,b){return this.showHideContainer(a,c,b,false)};Zapatec.Widget.prototype.showHideContainer=function(c,e,d,a){if(this.container==null){return null}if(c&&c.length>0&&typeof(Zapatec.Effects)=="undefined"){var b=this;Zapatec.Transport.loadJS({url:Zapatec.zapatecPath+"../zpeffects/src/effects.js",onLoad:function(){b.showHideContainer(c,e,d,a)}});return false}if(e==null&&isNaN(parseInt(e))){e=5}if(!c||c.length==0){if(a){this.container.style.display=this.originalContainerDisplay;this.originalContainerDisplay=null}else{this.originalContainerDisplay=this.container.style.display;this.container.style.display="none"}if(d){d()}}else{if(a){Zapatec.Effects.show(this.container,e,c,d)}else{Zapatec.Effects.hide(this.container,e,c,d)}}return true};Zapatec.Widget.prototype.loadData=function(oArg){var oConfig=this.config;if(typeof oConfig.callbackSource=="function"){var oSource=oConfig.callbackSource(oArg);if(oSource){if(typeof oSource.source!="undefined"){oConfig.source=oSource.source}if(typeof oSource.sourceType!="undefined"){oConfig.sourceType=oSource.sourceType}}}var vSource=oConfig.source;if(typeof oConfig.callbackConvertSource=="function"){vSource=oConfig.callbackConvertSource(vSource)}var sSourceType=oConfig.sourceType;if(vSource!=null&&sSourceType!=null){sSourceType=sSourceType.toLowerCase();if(sSourceType=="html"){this.fireEvent("loadDataStart");this.loadDataHtml(Zapatec.Widget.getElementById(vSource));this.fireEvent("loadDataEnd")}else{if(sSourceType=="html/text"){this.fireEvent("loadDataStart");this.loadDataHtmlText(vSource);this.fireEvent("loadDataEnd")}else{if(sSourceType=="html/url"){this.fireEvent("fetchSourceStart");var oWidget=this;Zapatec.Transport.fetch({url:vSource,async:oConfig.asyncSource,onLoad:function(oRequest){oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataStart");oWidget.loadDataHtmlText(oRequest.responseText);oWidget.fireEvent("loadDataEnd")},onError:function(oError){oWidget.fireEvent("fetchSourceError",oError);oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataEnd")}})}else{if(sSourceType=="json"){this.fireEvent("loadDataStart");if(typeof vSource=="object"){this.loadDataJson(vSource)}else{if(oConfig.reliableSource){this.loadDataJson(eval(["(",vSource,")"].join("")))}else{this.loadDataJson(Zapatec.Transport.parseJson({strJson:vSource}))}}this.fireEvent("loadDataEnd")}else{if(sSourceType=="json/url"){this.fireEvent("fetchSourceStart");var oWidget=this;Zapatec.Transport.fetchJsonObj({url:vSource,async:oConfig.asyncSource,reliable:oConfig.reliableSource,onLoad:function(oResult){oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataStart");oWidget.loadDataJson(oResult);oWidget.fireEvent("loadDataEnd")},onError:function(oError){oWidget.fireEvent("fetchSourceError",oError);oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataEnd")}})}else{if(sSourceType=="xml"){this.fireEvent("loadDataStart");if(typeof vSource=="object"){this.loadDataXml(vSource)}else{this.loadDataXml(Zapatec.Transport.parseXml({strXml:vSource}))}this.fireEvent("loadDataEnd")}else{if(sSourceType=="xml/url"){this.fireEvent("fetchSourceStart");var oWidget=this;Zapatec.Transport.fetchXmlDoc({url:vSource,async:oConfig.asyncSource,onLoad:function(oResult){oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataStart");oWidget.loadDataXml(oResult);oWidget.fireEvent("loadDataEnd")},onError:function(oError){oWidget.fireEvent("fetchSourceError",oError);oWidget.fireEvent("fetchSourceEnd");oWidget.fireEvent("loadDataEnd")}})}}}}}}}}else{this.fireEvent("loadDataStart");this.loadDataHtml(Zapatec.Widget.getElementById(vSource));this.fireEvent("loadDataEnd")}};Zapatec.Widget.prototype.loadDataHtml=function(a){};Zapatec.Widget.prototype.loadDataHtmlText=function(a){var b=Zapatec.Transport.parseHtml(a);this.loadDataHtml(b.firstChild)};Zapatec.Widget.prototype.loadDataJson=function(a){};Zapatec.Widget.prototype.loadDataXml=function(a){};Zapatec.Widget.prototype.receiveData=function(a){if(!a){a={}}this.dataSender=a.widget;this.fireEvent("receiveData",a)};Zapatec.Widget.prototype.replyData=function(){return null};Zapatec.Widget.prototype.replyDataCancel=function(){this.fireEvent("replyDataCancel");if(typeof this.hide=="function"){this.hide()}this.dataSender=null};Zapatec.Widget.prototype.replyDataReturn=function(b){if(!b){b={}}this.fireEvent("replyDataReturn",b);var a=b.widget;if(!a){a=this.dataSender}if(!a||typeof a.acceptData!="function"){return}a.acceptData({widget:this,data:this.replyData()});this.replyDataCancel()};Zapatec.Widget.prototype.acceptData=function(a){this.fireEvent("acceptData",a)};Zapatec.Widget.prototype.initLang=function(){this.langStr=this.config.lang;if(this.config.langCountryCode&&this.config.langCountryCode.length>0){this.langStr+="_"+this.config.langCountryCode}if(this.config.langEncoding&&this.config.langEncoding.length>0){this.langStr+="-"+this.config.langEncoding}if(this.config.lang&&this.config.lang.length>0&&!(Zapatec.Langs[this.config.langId]&&Zapatec.Langs[this.config.langId][this.langStr])){Zapatec.Log({description:"No language data found for language "+this.config.lang+(this.config.langCountryCode?" and country code "+this.config.langCountryCode:"")+(this.config.langEncoding?" and encoding "+this.config.langEncoding:"")});this.config.lang=null;this.config.langCountryCode=null;this.config.langEncoding=null;this.langStr=null}};Zapatec.Widget.prototype.getMessage=function(b){if(arguments.length==0){return null}if(!Zapatec.Langs[this.config.langId]||!Zapatec.Langs[this.config.langId][this.langStr]||!Zapatec.Langs[this.config.langId][this.langStr][b]){return b}var a=Zapatec.Langs[this.config.langId][this.langStr][b];if(arguments.length>1&&typeof(a)=="string"){for(var d=1;d<arguments.length;d++){var c=new RegExp("(^|([^\\\\]))%"+d);a=a.replace(c,"$2"+arguments[d])}}return a};Zapatec.Widget.callMethod=function(b,c){var a=Zapatec.Widget.getWidgetById(b);if(a&&typeof a[c]=="function"){var d=[].slice.call(arguments,2);return a[c].apply(a,d)}};Zapatec.Widget.getElementById=function(a){if(typeof a=="string"){return document.getElementById(a)}return a};Zapatec.Widget.getStyle=function(a){var b=a.getAttribute("style")||"";if(typeof b=="string"){return b}return b.cssText};Zapatec.tooltipPath=Zapatec.getPath("Zapatec.TooltipWidget");Zapatec.Tooltip=function(a){if(arguments.length==0){a={}}Zapatec.Tooltip.SUPERconstructor.call(this,a)};Zapatec.Tooltip.id="Zapatec.Tooltip";Zapatec.inherit(Zapatec.Tooltip,Zapatec.Widget);Zapatec.Tooltip.prototype.init=function(a){Zapatec.Tooltip.SUPERclass.init.call(this,a);this.createTooltip()};Zapatec.Tooltip.prototype.configure=function(a){this.defineConfigOption("target",null);this.defineConfigOption("tooltip",null);this.defineConfigOption("parent",null);this.defineConfigOption("movable",false);this.defineConfigOption("content",null);this.defineConfigOption("offsetX",2);this.defineConfigOption("offsetY",20);Zapatec.Tooltip.SUPERclass.configure.call(this,a);if(typeof this.config.target=="string"){this.config.target=Zapatec.Widget.getElementById(this.config.target)}if(!this.config.target){Zapatec.Log({description:'Can\'t find tooltip target ("target" config option)'});return false}if(typeof this.config.tooltip=="string"){this.config.tooltip=Zapatec.Widget.getElementById(this.config.tooltip)}if(!this.config.tooltip){if(this.config.content){this.config.tooltip=Zapatec.Utils.createElement("div")}else{Zapatec.Log({description:'Can\'t find "tooltip" config option'});return false}}if(this.config.content){this.setContent(this.config.content)}if(typeof this.config.parent=="string"){this.config.parent=Zapatec.Widget.getElementById(this.config.parent)}};Zapatec.Tooltip.prototype.createTooltip=function(){var b=this;this.visible=false;this.config.tooltip.style.position="absolute";this.config.tooltip.style.display="none";this.inTooltip=false;this.timeout=null;var a=!this.config.parent;if(a){this.config.parent=this.config.target}var c=this.config.parent;if(a&&c.tagName&&c.tagName.toLowerCase()=="input"){document.body.appendChild(this.config.tooltip)}else{c.appendChild(this.config.tooltip)}Zapatec.Utils.addClass(this.config.tooltip,this.getClassName({prefix:"zpTooltip",suffix:""}));if(this.config.tooltip.title){var d=Zapatec.Utils.createElement("div");this.config.tooltip.insertBefore(d,this.config.tooltip.firstChild);d.className=this.getClassName({prefix:"zpTooltip",suffix:"Title"});d.innerHTML=unescape(this.config.tooltip.title);this.config.tooltip.title=""}this.wch=Zapatec.Utils.createWCH(this.config.tooltip);if(this.wch){this.wch.style.zIndex=-1}this.createProperty(this,"_targetMouseOverListener",function(e){return b._onMouseMove(e)});Zapatec.Utils.addEvent(this.config.target,"mouseover",this._targetMouseOverListener);if(this.config.movable){this.createProperty(this,"_targetMouseMoveListener",function(e){return b._onMouseMove(e)});Zapatec.Utils.addEvent(this.config.target,"mousemove",this._targetMouseMoveListener)}this.createProperty(this,"_targetMouseOutListener",function(e){return b._onMouseOut(e)});Zapatec.Utils.addEvent(this.config.target,"mouseout",this._targetMouseOutListener);this.createProperty(this,"_tooltipMouseOverListener",function(e){b.inTooltip=true;return true});Zapatec.Utils.addEvent(this.config.tooltip,"mouseover",this._tooltipMouseOverListener);this.createProperty(this,"_tooltipMouseOutListener",function(e){e||(e=window.event);if(!Zapatec.Utils.isRelated(b.config.tooltip,e)){b.inTooltip=false;b.hide()}return true});Zapatec.Utils.addEvent(this.config.tooltip,"mouseout",this._tooltipMouseOutListener)};Zapatec.Tooltip.prototype.destroy=function(){this.hide();Zapatec.Utils.removeEvent(this.config.target,"mouseover",this._targetMouseOverListener);Zapatec.Utils.removeEvent(this.config.target,"mousemove",this._targetMouseMoveListener);Zapatec.Utils.removeEvent(this.config.target,"mouseout",this._targetMouseOutListener);Zapatec.Utils.removeEvent(this.config.tooltip,"mouseover",this._tooltipMouseOverListener);Zapatec.Utils.removeEvent(this.config.tooltip,"mouseout",this._tooltipMouseOutListener);if(this.wch){this.wch.parentNode.removeChild(this.wch)}};Zapatec.Tooltip.setupFromDFN=function(a){var d=document.getElementsByTagName("dfn");if(typeof a=="string"){a=new RegExp("(^|\\s)"+a+"(\\s|$)","i")}for(var e=0;e<d.length;++e){var c=d[e];if(!a||a.test(c.className)){var g=document.createElement("div");if(c.title){g.title=c.title;c.title=""}g.className=c.className;if(c.style.width){g.style.width=c.style.width}if(c.style.height){g.style.height=c.style.height}while(c.firstChild){g.appendChild(c.firstChild)}c.innerHTML="?";var f=new Zapatec.Tooltip({target:c,parent:document.body,tooltip:g});var b=f.getClassName({prefix:"zpTooltip",suffix:"Dfn"});Zapatec.Utils.addClass(c,b)}}};Zapatec.Tooltip._currentTooltip=null;Zapatec.Tooltip.prototype._onMouseMove=function(b){b||(b=window.event);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}if((!this.visible||this.config.movable)&&!Zapatec.Utils.isRelated(this.config.target,b)){var a=Zapatec.Utils.getMousePos(b);this.show(a.pageX+this.config.offsetX,a.pageY+this.config.offsetY)}return true};Zapatec.Tooltip.prototype._onMouseOut=function(b){b||(b=window.event);var a=this;if(!Zapatec.Utils.isRelated(this.config.target,b)){if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){a.hide()},150)}return true};Zapatec.Tooltip.prototype.show=function(h,g){if(Zapatec.Tooltip._currentTooltip){if(Zapatec.Tooltip._currentTooltip.timeout){clearTimeout(Zapatec.Tooltip._currentTooltip.timeout);Zapatec.Tooltip._currentTooltip.timeout=null}Zapatec.Tooltip._currentTooltip.hide()}this.config.tooltip.style.display="block";if(null==h&&null==g){var m=Zapatec.Utils.getElementOffset(this.config.target);h=m.left;g=m.top}this.config.tooltip.style.left=h+"px";this.config.tooltip.style.top=g+"px";var f=Zapatec.Utils.getElementOffset(this.config.tooltip);var a=h-f.left;if(a){h+=a;this.config.tooltip.style.left=h+"px"}var c=g-f.top;if(c){g+=c;this.config.tooltip.style.top=g+"px"}f=Zapatec.Utils.getElementOffset(this.config.tooltip);var i=f.left+f.width;var b=f.top+f.height;var d=Zapatec.Utils.getWindowSize();var l=Zapatec.Utils.getPageScrollX()+d.width;var e=Zapatec.Utils.getPageScrollY()+d.height;if(i>l){h+=l-i;this.config.tooltip.style.left=h+"px"}if(b>e){g+=e-b;this.config.tooltip.style.top=g+"px"}Zapatec.Utils.setupWCH(this.wch,0,0,f.width,f.height);Zapatec.Utils.addClass(this.config.target,this.getClassName({prefix:"zpTooltip",suffix:"Hover"}));this.visible=true;Zapatec.Tooltip._currentTooltip=this};Zapatec.Tooltip.prototype.hide=function(){if(!this.inTooltip){this.config.tooltip.style.display="none";Zapatec.Utils.hideWCH(this.wch);Zapatec.Utils.removeClass(this.config.target,this.getClassName({prefix:"zpTooltip",suffix:"Hover"}));this.visible=false}};Zapatec.Tooltip.prototype.setContent=function(a){this.config.tooltip.innerHTML=a};Zapatec.Calendar=function(c,b,f,a){if(typeof this.id=="undefined"){var e=0;while(Zapatec.Widget.all[e]){e++}this.id=e;Zapatec.Widget.all[e]=this}this.bShowHistoryEvent=false;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.onFDOW=null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.minMonth=0;this.maxMonth=11;this.dateFormat=Zapatec.Calendar.i18n("DEF_DATE_FORMAT");this.ttDateFormat=Zapatec.Calendar.i18n("TT_DATE_FORMAT");this.historyDateFormat="%B %d, %Y";this.isPopup=true;this.weekNumbers=true;this.noGrab=false;if(Zapatec.Calendar.prefs.fdow||(Zapatec.Calendar.prefs.fdow==0)){this.firstDayOfWeek=parseInt(Zapatec.Calendar.prefs.fdow,10)}else{var d=0;if(typeof c=="number"){d=c}else{if(typeof Zapatec.Calendar._FD=="number"){d=Zapatec.Calendar._FD}}this.firstDayOfWeek=d}this.showsOtherMonths=false;this.dateStr=b;this.showsTime=false;this.sortOrder="asc";this.time24=true;this.timeInterval=null;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=new Array();this.firstdayname=null;this.monthsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.yearsCombo=null;this.hilitedYear=null;this.activeYear=null;this.histCombo=null;this.hilitedHist=null;this.dateClicked=false;this.numberMonths=1;this.controlMonth=1;this.vertical=false;this.monthsInRow=1;this.titles=new Array();this.rowsOfDayNames=new Array();this.helpButton=true;this.disableFdowClick=true;this.disableDrag=false;this.yearNav=true;this.closeButton=true;Zapatec.Calendar._initSDN()};Zapatec.Calendar._initSDN=function(){if(typeof Zapatec.Calendar._TT._SDN=="undefined"){if(typeof Zapatec.Calendar._TT._SDN_len=="undefined"){Zapatec.Calendar._TT._SDN_len=3}var a=[];for(var b=8;b>0;){a[--b]=Zapatec.Calendar._TT._DN[b].substr(0,Zapatec.Calendar._TT._SDN_len)}Zapatec.Calendar._TT._SDN=a;if(typeof Zapatec.Calendar._TT._SMN_len=="undefined"){Zapatec.Calendar._TT._SMN_len=3}a=[];for(var b=12;b>0;){a[--b]=Zapatec.Calendar._TT._MN[b].substr(0,Zapatec.Calendar._TT._SMN_len)}Zapatec.Calendar._TT._SMN=a}if(typeof Zapatec.Calendar._TT._AMPM=="undefined"){Zapatec.Calendar._TT._AMPM={am:"am",pm:"pm"}}};Zapatec.Calendar.i18n=function(c,a){var b="";if(!a){if(Zapatec.Calendar._TT){b=Zapatec.Calendar._TT[c]}if(!b&&Zapatec.Calendar._TT_en){b=Zapatec.Calendar._TT_en[c]}}else{switch(a){case"dn":b=Zapatec.Calendar._TT._DN[c];break;case"sdn":b=Zapatec.Calendar._TT._SDN[c];break;case"mn":b=Zapatec.Calendar._TT._MN[c];break;case"smn":b=Zapatec.Calendar._TT._SMN[c];break;case"ampm":b=Zapatec.Calendar._TT._AMPM[c];break}}if(!b){b=""+c}return b};Zapatec.Calendar._C=null;Zapatec.Calendar.prefs={fdow:null,history:"",sortOrder:"asc",hsize:9};Zapatec.Calendar.savePrefs=function(){Zapatec.Utils.writeCookie("ZP_CAL",Zapatec.Utils.makePref(this.prefs),null,"/",30)};Zapatec.Calendar.loadPrefs=function(){var a=Zapatec.Utils.getCookie("ZP_CAL"),b;if(a){b=Zapatec.Utils.loadPref(a);if(b){Zapatec.Utils.mergeObjects(this.prefs,b)}}};Zapatec.Calendar._add_evs=function(a){var b=Zapatec.Calendar;a.onmouseover=b.dayMouseOver;a.onmousedown=b.dayMouseDown;a.onmouseout=b.dayMouseOut;if(Zapatec.is_ie){a.ondblclick=b.dayMouseDblClick}};Zapatec.Calendar._del_evs=function(a){a.onmouseover=null;a.onmousedown=null;a.onmouseout=null;if(Zapatec.is_ie){a.ondblclick=null}};Zapatec.Calendar.findMonth=function(a){if(typeof a.month!="undefined"){return a}else{if(a.parentNode&&typeof a.parentNode.month!="undefined"){return a.parentNode}}return null};Zapatec.Calendar.findHist=function(a){if(typeof a.histDate!="undefined"){return a}else{if(a.parentNode&&typeof a.parentNode.histDate!="undefined"){return a.parentNode}}return null};Zapatec.Calendar.findYear=function(a){if(typeof a.year!="undefined"){return a}else{if(a.parentNode&&typeof a.parentNode.year!="undefined"){return a.parentNode}}return null};Zapatec.Calendar.showMonthsCombo=function(){var b=Zapatec.Calendar._C;if(!b){return false}var d=b.activeDiv;var n=b.monthsCombo;var f=b.date,o=b.date.getMonth(),c=b.date.getFullYear(),g=(c==b.minYear),l=(c==b.maxYear);for(var h=n.firstChild;h;h=h.nextSibling){var e=h.month;Zapatec.Utils.removeClass(h,"hilite");Zapatec.Utils.removeClass(h,"active");Zapatec.Utils.removeClass(h,"disabled");h.disabled=false;if((g&&e<b.minMonth)||(l&&e>b.maxMonth)){Zapatec.Utils.addClass(h,"disabled");h.disabled=true}if(e==o){Zapatec.Utils.addClass(b.activeMonth=h,"active")}}var p=n.style;p.display="block";if(d.navtype<0){p.left=d.offsetLeft+"px"}else{var a=n.offsetWidth;if(typeof a=="undefined"){a=50}p.left=(d.offsetLeft+d.offsetWidth-a)+"px"}p.top=(d.offsetTop+d.offsetHeight)+"px";b.updateWCH(n)};Zapatec.Calendar.showHistoryCombo=function(){var c=Zapatec.Calendar._C,m,g,e,d,l,n,f,b;if(!c){return false}l=c.histCombo;while(l.firstChild){l.removeChild(l.lastChild)}if(Zapatec.Calendar.prefs.history){m=Zapatec.Calendar.prefs.history.split(/,/);e=0;while(f=m[e++]){f=f.split(/\//);g=Zapatec.Utils.createElement("div");g.className=Zapatec.is_ie?"label-IEfix":"label";g.id="zpCal"+c.id+"HistoryDropdownItem"+(e-1);g.histDate=new Date(parseInt(f[0],10),parseInt(f[1],10)-1,parseInt(f[2],10),f[3]?parseInt(f[3],10):0,f[4]?parseInt(f[4],10):0);g.appendChild(window.document.createTextNode(g.histDate.print(c.historyDateFormat)));l.appendChild(g);if(g.histDate.dateEqualsTo(c.date)){Zapatec.Utils.addClass(g,"active")}}}d=c.activeDiv;n=l.style;n.display="block";n.left=Math.floor(d.offsetLeft+(d.offsetWidth-l.offsetWidth)/2)+"px";n.top=(d.offsetTop+d.offsetHeight)+"px";c.updateWCH(l);c.bEventShowHistory=true};Zapatec.Calendar.showYearsCombo=function(d){var a=Zapatec.Calendar._C;if(!a){return false}var c=a.activeDiv;var f=a.yearsCombo;if(a.hilitedYear){Zapatec.Utils.removeClass(a.hilitedYear,"hilite")}if(a.activeYear){Zapatec.Utils.removeClass(a.activeYear,"active")}a.activeYear=null;var b=a.date.getFullYear()+(d?1:-1);var l=f.firstChild;var h=false;for(var e=12;e>0;--e){if(b>=a.minYear&&b<=a.maxYear){l.firstChild.data=b;l.year=b;l.style.display="block";h=true}else{l.style.display="none"}l=l.nextSibling;b+=d?a.yearStep:-a.yearStep}if(h){var m=f.style;m.display="block";if(c.navtype<0){m.left=c.offsetLeft+"px"}else{var g=f.offsetWidth;if(typeof g=="undefined"){g=50}m.left=(c.offsetLeft+c.offsetWidth-g)+"px"}m.top=(c.offsetTop+c.offsetHeight)+"px"}a.updateWCH(f)};Zapatec.Calendar.tableMouseUp=function(e){var h=Zapatec.Calendar._C;if(!h){return false}if(h.timeout){clearTimeout(h.timeout)}var d=h.activeDiv;if(!d){return false}var g=Zapatec.Utils.getTargetElement(e);if(typeof(d.navtype)=="undefined"){while(g&&!g.calendar){g=g.parentNode}}e||(e=window.event);Zapatec.Utils.removeClass(d,"active");if(g==d||g.parentNode==d){Zapatec.Calendar.cellClick(d,e)}var c=Zapatec.Calendar.findMonth(g);var a=null;if(c){if(!c.disabled){a=new Date(h.date);if(c.month!=a.getMonth()){a.setMonth(c.month);h.setDate(a,true);h.dateClicked=false;h.callHandler()}}}else{var b=Zapatec.Calendar.findYear(g);if(b){a=new Date(h.date);if(b.year!=a.getFullYear()){a.setFullYear(b.year);h.setDate(a,true);h.dateClicked=false;h.callHandler()}}else{var f=Zapatec.Calendar.findHist(g);if(f&&!f.histDate.dateEqualsTo(h.date)){a=new Date(f.histDate);h._init(h.firstDayOfWeek,h.date=a);h.dateClicked=false;h.callHandler();h.updateHistory()}}}Zapatec.Utils.removeEvent(window.document,"mouseup",Zapatec.Calendar.tableMouseUp);Zapatec.Utils.removeEvent(window.document,"mouseover",Zapatec.Calendar.tableMouseOver);Zapatec.Utils.removeEvent(window.document,"mousemove",Zapatec.Calendar.tableMouseOver);h._hideCombos();Zapatec.Calendar._C=null;return Zapatec.Utils.stopEvent(e)};Zapatec.Calendar.tableMouseOver=function(z){var p=Zapatec.Calendar._C;if(!p){return}var d=p.activeDiv;var B=Zapatec.Utils.getTargetElement(z);if(B==d||B.parentNode==d){Zapatec.Utils.addClass(d,"hilite active");Zapatec.Utils.addClass(d.parentNode,"rowhilite")}else{if(typeof d.navtype=="undefined"||(d.navtype!=50&&((d.navtype==0&&!p.histCombo)||Math.abs(d.navtype)>2))){Zapatec.Utils.removeClass(d,"active")}Zapatec.Utils.removeClass(d,"hilite");Zapatec.Utils.removeClass(d.parentNode,"rowhilite")}z||(z=window.event);if(d.navtype==50&&B!=d){var g=Zapatec.Utils.getAbsolutePos(d);var m=d.offsetWidth;var l=z.clientX;var o;var a=true;if(l>g.x+m){o=l-g.x-m;a=false}else{o=g.x-l}if(o<0){o=0}var q=d._range;var s=d._current;var A=p.currentDate;var y=(A.getHours()>=12);var b=d.firstChild.data;var h=Math.floor(o/10)%q.length;for(var v=q.length;--v>=0;){if(q[v]==s){break}}while(h-->0){if(a){if(--v<0){v=q.length-1}}else{if(++v>=q.length){v=0}}}if(p.getDateStatus){var r=null;var f=null;var c=new Date(A);if(d.className.indexOf("ampm",0)!=-1){r=A.getMinutes();if(b!=q[v]){f=(q[v]==Zapatec.Calendar.i18n("pm","ampm"))?((A.getHours()==0)?(12):(A.getHours()+12)):(A.getHours()-12)}else{f=A.getHours()}c.setHours(f)}if(d.className.indexOf("hour",0)!=-1){r=A.getMinutes();f=(!p.time24)?((y)?((q[v]!=12)?(parseInt(q[v],10)+12):(12)):((q[v]!=12)?(q[v]):(0))):(q[v]);c.setHours(f)}if(d.className.indexOf("minute",0)!=-1){f=A.getHours();r=q[v];c.setMinutes(r)}}var t=false;if(p.getDateStatus){t=p.getDateStatus(c,A.getFullYear(),A.getMonth(),A.getDate(),parseInt(f,10),parseInt(r,10))}if(t==false){if(!((!p.time24)&&(q[v]==Zapatec.Calendar.i18n("pm","ampm"))&&(f>23))){d.firstChild.data=q[v]}}p.onUpdateTime()}var u=Zapatec.Calendar.findMonth(B);if(u){if(!u.disabled){if(u.month!=p.date.getMonth()){if(p.hilitedMonth){Zapatec.Utils.removeClass(p.hilitedMonth,"hilite")}Zapatec.Utils.addClass(u,"hilite");p.hilitedMonth=u}else{if(p.hilitedMonth){Zapatec.Utils.removeClass(p.hilitedMonth,"hilite")}}}}else{if(p.hilitedMonth){Zapatec.Utils.removeClass(p.hilitedMonth,"hilite")}var n=Zapatec.Calendar.findYear(B);if(n){if(n.year!=p.date.getFullYear()){if(p.hilitedYear){Zapatec.Utils.removeClass(p.hilitedYear,"hilite")}Zapatec.Utils.addClass(n,"hilite");p.hilitedYear=n}else{if(p.hilitedYear){Zapatec.Utils.removeClass(p.hilitedYear,"hilite")}}}else{if(p.hilitedYear){Zapatec.Utils.removeClass(p.hilitedYear,"hilite")}var e=Zapatec.Calendar.findHist(B);if(e){if(!e.histDate.dateEqualsTo(p.date)){if(p.hilitedHist){Zapatec.Utils.removeClass(p.hilitedHist,"hilite")}Zapatec.Utils.addClass(e,"hilite");p.hilitedHist=e}else{if(p.hilitedHist){Zapatec.Utils.removeClass(p.hilitedHist,"hilite")}}}else{if(p.hilitedHist){Zapatec.Utils.removeClass(p.hilitedHist,"hilite")}}}}return Zapatec.Utils.stopEvent(z)};Zapatec.Calendar.tableMouseDown=function(a){if(Zapatec.Utils.getTargetElement(a)==Zapatec.Utils.getElement(a)){return Zapatec.Utils.stopEvent(a)}};Zapatec.Calendar.calDragIt=function(d){d||(d=window.event);var e=Zapatec.Calendar._C;if(!e){Zapatec.Calendar.calDragEnd()}if(!e.disableDrag){if(!(e&&e.dragging)){return false}var g=d.clientX+window.document.body.scrollLeft;var f=d.clientY+window.document.body.scrollTop;e.hideShowCovered();var c=e.element.style,a=g-e.xOffs,b=f-e.yOffs;c.left=a+"px";c.top=b+"px";Zapatec.Utils.setupWCH(e.WCH,a,b)}return Zapatec.Utils.stopEvent(d)};Zapatec.Calendar.calDragEnd=function(a){var b=Zapatec.Calendar._C;Zapatec.Utils.removeEvent(window.document,"mousemove",Zapatec.Calendar.calDragIt);Zapatec.Utils.removeEvent(window.document,"mouseover",Zapatec.Calendar.calDragIt);Zapatec.Utils.removeEvent(window.document,"mouseup",Zapatec.Calendar.calDragEnd);if(!b){return false}b.dragging=false;Zapatec.Calendar.tableMouseUp(a);b.hideShowCovered()};Zapatec.Calendar.dayMouseDown=function(c){var a=true;var b=Zapatec.Utils.getElement(c);if(b.className.indexOf("disabled")!=-1||b.className.indexOf("true")!=-1){return false}var d=b.calendar;while(!d){b=b.parentNode;d=b.calendar}d.bEventShowHistory=false;d.activeDiv=b;Zapatec.Calendar._C=d;if(b.navtype!=300){if(b.navtype==50){if(!((d.timeInterval==null)||((d.timeInterval<60)&&(b.className.indexOf("hour",0)!=-1)))){a=false}b._current=b.firstChild.data;if(a){Zapatec.Utils.addEvent(window.document,"mousemove",Zapatec.Calendar.tableMouseOver)}}else{if(((b.navtype==201)||(b.navtype==202))&&(d.timeInterval>30)&&(b.timePart.className.indexOf("minute",0)!=-1)){a=false}if(a){Zapatec.Utils.addEvent(window.document,Zapatec.is_ie5?"mousemove":"mouseover",Zapatec.Calendar.tableMouseOver)}}if(a){Zapatec.Utils.addClass(b,"hilite active")}Zapatec.Utils.addEvent(window.document,"mouseup",Zapatec.Calendar.tableMouseUp)}else{if(d.isPopup){d._dragStart(c)}else{Zapatec.Calendar._C=null}}if(b.navtype==-1||b.navtype==1){if(d.timeout){clearTimeout(d.timeout)}d.timeout=setTimeout("Zapatec.Calendar.showMonthsCombo()",250)}else{if(b.navtype==-2||b.navtype==2){if(d.timeout){clearTimeout(d.timeout)}d.timeout=setTimeout((b.navtype>0)?"Zapatec.Calendar.showYearsCombo(true)":"Zapatec.Calendar.showYearsCombo(false)",250)}else{if(b.navtype==0&&Zapatec.Calendar.prefs.history){if(d.timeout){clearTimeout(d.timeout)}d.timeout=setTimeout("Zapatec.Calendar.showHistoryCombo()",250)}else{d.timeout=null}}}return Zapatec.Utils.stopEvent(c)};Zapatec.Calendar.dayMouseDblClick=function(a){Zapatec.Calendar.cellClick(Zapatec.Utils.getElement(a),a||window.event);if(Zapatec.is_ie){window.document.selection.empty()}};Zapatec.Calendar.dayMouseOver=function(d){var c=Zapatec.Utils.getElement(d),a=c.caldate;while(!c.calendar){c=c.parentNode;a=c.caldate}var e=c.calendar;var b=c.timePart;if(a){a=new Date(a[0],a[1],a[2]);if(a.getDate()!=c.caldate[2]){a.setDate(c.caldate[2])}}if(Zapatec.Utils.isRelated(c,d)||Zapatec.Calendar._C||c.className.indexOf("disabled")!=-1||c.className.indexOf("true")!=-1){return false}if(c.ttip){if(c.ttip.substr(0,1)=="_"){c.ttip=a.print(c.calendar.ttDateFormat)+c.ttip.substr(1)}c.calendar.showHint(c.ttip)}if(c.navtype!=300){if(!((e.timeInterval==null)||(c.className.indexOf("ampm",0)!=-1)||((e.timeInterval<60)&&(c.className.indexOf("hour",0)!=-1)))&&(c.navtype==50)){return Zapatec.Utils.stopEvent(d)}if(((c.navtype==201)||(c.navtype==202))&&(e.timeInterval>30)&&(b.className.indexOf("minute",0)!=-1)){return Zapatec.Utils.stopEvent(d)}Zapatec.Utils.addClass(c,"hilite");if(a){Zapatec.Utils.addClass(c.parentNode,"rowhilite")}}return Zapatec.Utils.stopEvent(d)};Zapatec.Calendar.dayMouseOut=function(b){var a=Zapatec.Utils.getElement(b);while(!a.calendar){a=a.parentNode;caldate=a.caldate}if(Zapatec.Utils.isRelated(a,b)||Zapatec.Calendar._C||a.className.indexOf("disabled")!=-1||a.className.indexOf("true")!=-1){return false}Zapatec.Utils.removeClass(a,"hilite");if(a.caldate){Zapatec.Utils.removeClass(a.parentNode,"rowhilite")}if(a.calendar){a.calendar.showHint(Zapatec.Calendar.i18n("SEL_DATE"))}return Zapatec.Utils.stopEvent(b)};Zapatec.Calendar.cellClick=function(c,x){var n=c.calendar;var g=false;var b=false;var y=null;while(!n){c=c.parentNode;n=c.calendar}if(c.className.indexOf("disabled")!=-1||c.className.indexOf("true")!=-1){return false}if(typeof c.navtype=="undefined"){if(n.currentDateEl){Zapatec.Utils.removeClass(n.currentDateEl,"selected");Zapatec.Utils.addClass(c,"selected");g=(n.currentDateEl==c);if(!g){n.currentDateEl=c}}var d=new Date(c.caldate[0],c.caldate[1],c.caldate[2]);if(d.getDate()!=c.caldate[2]){d.setDate(c.caldate[2])}n.date.setDateOnly(d);n.currentDate.setDateOnly(d);y=n.date;n.dateClicked=true;if(n.multiple){n._toggleMultipleDate(new Date(y))}b=true;if(c.otherMonth){n._init(n.firstDayOfWeek,y)}n.onSetTime()}else{if(c.navtype==200){Zapatec.Utils.removeClass(c,"hilite");n.callCloseHandler();return}y=new Date(n.date);if(c.navtype==0&&!n.bEventShowHistory){y.setDateOnly(new Date())}n.dateClicked=false;var m=y.getFullYear();var t=y.getMonth();function l(A){var B=y.getDate();var i=y.getMonthDays(A);if(B>i){y.setDate(i)}y.setMonth(A)}switch(c.navtype){case 400:Zapatec.Utils.removeClass(c,"hilite");var o=Zapatec.Calendar.i18n("ABOUT");if(typeof o!="undefined"){o+=n.showsTime?Zapatec.Calendar.i18n("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 <support@zapatec.com> to get it into the distribution  ;-)\n\nThank you!\nhttp://www.zapatec.com\n'}alert(o);return;case -2:if(m>n.minYear){y.setFullYear(m-1)}break;case -1:if(t>0){l(t-1)}else{if(m-->n.minYear){y.setFullYear(m);l(11)}}break;case 1:if(t<11){l(t+1)}else{if(m<n.maxYear){y.setFullYear(m+1);l(0)}}break;case 2:if(m<n.maxYear){y.setFullYear(m+1)}break;case 100:n.setFirstDayOfWeek(c.fdow);Zapatec.Calendar.prefs.fdow=n.firstDayOfWeek;Zapatec.Calendar.savePrefs();if(n.onFDOW){n.onFDOW(n.firstDayOfWeek)}return;case 50:var y=n.currentDate;if(c.className.indexOf("ampm",0)>=0){}else{if(!((n.timeInterval==null)||((n.timeInterval<60)&&(c.className.indexOf("hour",0)!=-1)))){break}}var p=c._range;var r=c.firstChild.data;var v=(y.getHours()>=12);for(var u=p.length;--u>=0;){if(p[u]==r){break}}if(x&&x.shiftKey){if(--u<0){u=p.length-1}}else{if(++u>=p.length){u=0}}if(n.getDateStatus){var q=null;var f=null;var a=new Date(y);if(c.className.indexOf("ampm",0)!=-1){q=y.getMinutes();f=(p[u]==Zapatec.Calendar.i18n("pm","ampm"))?((y.getHours()==12)?(y.getHours()):(y.getHours()+12)):(y.getHours()-12);if(n.getDateStatus&&n.getDateStatus(a,y.getFullYear(),y.getMonth(),y.getDate(),parseInt(f,10),parseInt(q,10))){var h;if(p[u]==Zapatec.Calendar.i18n("pm","ampm")){h=-5}else{h=5}hours=f;minutes=q;do{minutes+=h;if(minutes>=60){minutes-=60;++hours;if(hours>=24){hours-=24}a.setHours(hours)}if(minutes<0){minutes+=60;--hours;if(hours<0){hours+=24}a.setHours(hours)}a.setMinutes(minutes);if(!n.getDateStatus(a,y.getFullYear(),y.getMonth(),y.getDate(),parseInt(hours,10),parseInt(minutes,10))){f=hours;q=minutes;if(f>12){u=1}else{u=0}n.date.setHours(f);n.date.setMinutes(q);n.onSetTime()}}while((f!=hours)||(q!=minutes))}a.setHours(f)}if(c.className.indexOf("hour",0)!=-1){q=y.getMinutes();f=(!n.time24)?((v)?((p[u]!=12)?(parseInt(p[u],10)+12):(12)):((p[u]!=12)?(p[u]):(0))):(p[u]);a.setHours(f)}if(c.className.indexOf("minute",0)!=-1){f=y.getHours();q=p[u];a.setMinutes(q)}}var s=false;if(n.getDateStatus){s=n.getDateStatus(a,y.getFullYear(),y.getMonth(),y.getDate(),parseInt(f,10),parseInt(q,10))}if(!s){c.firstChild.data=p[u]}n.onUpdateTime();return;case 201:case 202:var w=c.timePart;var y=n.currentDate;if((w.className.indexOf("minute",0)!=-1)&&(n.timeInterval>30)){break}var z=parseInt(w.firstChild.data,10);var v=(y.getHours()>=12);var p=w._range;for(var u=p.length;--u>=0;){if(z==p[u]){z=u;break}}var e=w._step;if(c.navtype==201){z=e*Math.floor(z/e);z+=e;if(z>=p.length){z=0}}else{z=e*Math.ceil(z/e);z-=e;if(z<0){z=p.length-e}}if(n.getDateStatus){var q=null;var f=null;var a=new Date(y);if(w.className=="hour"){q=y.getMinutes();f=(!n.time24)?((v)?((p[z]!=12)?(parseInt(p[z],10)+12):(12)):((p[z]!=12)?(p[z]):(0))):(p[z]);a.setHours(f)}if(w.className=="minute"){f=y.getHours();q=z;a.setMinutes(p[z])}}var s=false;if(n.getDateStatus){s=n.getDateStatus(a,y.getFullYear(),y.getMonth(),y.getDate(),parseInt(f,10),parseInt(q,10))}if(!s){w.firstChild.data=p[z]}n.onUpdateTime();return;case 0:if(n.getDateStatus&&((n.getDateStatus(y,y.getFullYear(),y.getMonth(),y.getDate())==true)||(n.getDateStatus(y,y.getFullYear(),y.getMonth(),y.getDate())=="disabled"))){return false}break}if(!y.equalsTo(n.date)){if((c.navtype>=-2&&c.navtype<=2)&&(c.navtype!=0)){n._init(n.firstDayOfWeek,y,true);return}n.setDate(y);b=!(c.navtype&&(c.navtype>=-2&&c.navtype<=2))}}if(b){n.callHandler()}if(g){Zapatec.Utils.removeClass(c,"hilite");n.callCloseHandler()}};Zapatec.Calendar.prototype.create=function(o){var g=null;if(!o){g=window.document.getElementsByTagName("body")[0];this.isPopup=true;this.WCH=Zapatec.Utils.createWCH()}else{g=o;this.isPopup=false}this.currentDate=this.date=this.dateStr?new Date(this.dateStr):new Date();var x=Zapatec.Utils.createElement("table");this.table=x;x.cellSpacing=0;x.cellPadding=0;Zapatec.Utils.createProperty(x,"calendar",this);Zapatec.Utils.addEvent(x,"mousedown",Zapatec.Calendar.tableMouseDown);var n=Zapatec.Utils.createElement("div");this.element=n;n.className="calendar";n.id="zpCal"+this.id+"Container";if(Zapatec.is_opera){x.style.width=(this.monthsInRow*((this.weekNumbers)?(8):(7))*2+4.4*this.monthsInRow)+"em"}if(this.isPopup){n.style.position="absolute";n.style.display="none"}n.appendChild(x);var c=null;var f=null;var m=this;var d=function(B,A,l,i){c=Zapatec.Utils.createElement("td",f);if(i){c.id="zpCal"+m.id+i+"ButtonStatus"}c.colSpan=A;c.className="button";if(Math.abs(l)<=2){c.className+=" nav"}Zapatec.Calendar._add_evs(c);Zapatec.Utils.createProperty(c,"calendar",m);c.navtype=l;if(B.substr(0,1)!="&"){c.appendChild(document.createTextNode(B))}else{c.innerHTML=B}return c};var e=function(l,A,i){c=Zapatec.Utils.createElement("td",l);if(i){c.id="zpCal"+m.id+i+"ButtonStatus"}c.colSpan=A;c.className="button";c.innerHTML="<div>&nbsp</div>";return c};var y=((this.weekNumbers)?(8):(7))*this.monthsInRow-2;var w=Zapatec.Utils.createElement("thead",x);if(this.numberMonths==1){this.title=w}f=Zapatec.Utils.createElement("tr",w);if(this.helpButton){d("?",1,400,"Help").ttip=Zapatec.Calendar.i18n("INFO")}else{e(f,1,"Help")}this.title=d("&nbsp;",y,300);this.title.className="title";this.title.id="zpCal"+this.id+"Title";if(this.isPopup){if(!this.disableDrag){this.title.ttip=Zapatec.Calendar.i18n("DRAG_TO_MOVE");this.title.style.cursor="move"}if(this.closeButton){d("&#x00d7;",1,200,"Close").ttip=Zapatec.Calendar.i18n("CLOSE")}else{e(f,1,"Close")}}else{e(f,1,"Close")}f=Zapatec.Utils.createElement("tr",w);this._nav_py=d("&#x00ab;",1,-2,"PrevYear");this._nav_py.ttip=Zapatec.Calendar.i18n("PREV_YEAR");this._nav_pm=d("&#x2039;",1,-1,"PrevMonth");this._nav_pm.ttip=Zapatec.Calendar.i18n("PREV_MONTH");this._nav_now=d(Zapatec.Calendar.i18n("TODAY"),y-2,0,"Today");this._nav_now.ttip=Zapatec.Calendar.i18n("GO_TODAY");this._nav_nm=d("&#x203a;",1,1,"NextMonth");this._nav_nm.ttip=Zapatec.Calendar.i18n("NEXT_MONTH");this._nav_ny=d("&#x00bb;",1,2,"NextYear");this._nav_ny.ttip=Zapatec.Calendar.i18n("NEXT_YEAR");var z=Math.floor(this.numberMonths/this.monthsInRow);if(this.numberMonths%this.monthsInRow>0){++z}for(var p=1;p<=z;++p){var w=Zapatec.Utils.createElement("thead",x);if(Zapatec.is_opera){w.style.display="table-row-group"}if(this.numberMonths!=1){f=Zapatec.Utils.createElement("tr",w);var y=5;this.weekNumbers&&++y;this.titles[p]=new Array();for(var q=1;(q<=this.monthsInRow)&&((p-1)*this.monthsInRow+q<=this.numberMonths);++q){e(f,1);this.titles[p][q]=d("&nbsp;",y,300);this.titles[p][q].className="title";this.titles[p][q].id="zpCal"+this.id+"SubTitle"+((p-1)*this.monthsInRow+q);e(f,1)}}f=Zapatec.Utils.createElement("tr",w);f.className="daynames";for(q=1;(q<=this.monthsInRow)&&((p-1)*this.monthsInRow+q<=this.numberMonths);++q){if(this.weekNumbers){c=Zapatec.Utils.createElement("td",f);c.className="name wn";c.appendChild(window.document.createTextNode(Zapatec.Calendar.i18n("WK")));if(q>1){Zapatec.Utils.addClass(c,"month-left-border")}var v=Zapatec.Calendar.i18n("WK");if(v==null){v=""}}for(var u=7;u>0;--u){c=Zapatec.Utils.createElement("td",f);c.appendChild(document.createTextNode("&nbsp;"));c.id="zpCal"+this.id+"WeekDayButton"+(7-u)+"Status"}}this.firstdayname=f.childNodes[this.weekNumbers?1:0];this.rowsOfDayNames[p]=this.firstdayname;this._displayWeekdays();var b=Zapatec.Utils.createElement("tbody",x);this.tbody[p]=b;for(u=6;u>0;--u){f=Zapatec.Utils.createElement("tr",b);for(q=1;(q<=this.monthsInRow)&&((p-1)*this.monthsInRow+q<=this.numberMonths);++q){if(this.weekNumbers){c=Zapatec.Utils.createElement("td",f);c.id="zpCal"+this.id+"WeekNumber"+(6-u);c.appendChild(document.createTextNode("&nbsp;"))}for(var r=7;r>0;--r){c=Zapatec.Utils.createElement("td",f);c.id="zpCal"+this.id+"DateCell"+((p-1)*this.monthsInRow+q)+"-"+(6-u)+"-"+(7-r);c.appendChild(document.createTextNode("&nbsp;"));Zapatec.Utils.createProperty(c,"calendar",this);Zapatec.Calendar._add_evs(c)}}}}var h=Zapatec.Utils.createElement("tfoot",x);if(this.showsTime){f=Zapatec.Utils.createElement("tr",h);f.className="time";var a;if(this.monthsInRow!=1){c=Zapatec.Utils.createElement("td",f);a=c.colSpan=Math.ceil((((this.weekNumbers)?8:7)*(this.monthsInRow-1))/2);c.className="timetext";c.innerHTML="&nbsp"}c=Zapatec.Utils.createElement("td",f);c.className="timetext";c.colSpan=this.weekNumbers?2:1;c.innerHTML=Zapatec.Calendar.i18n("TIME")||"&nbsp;";(function(){function D(Q,P,U,H,T){var V,O,R,K,J;if(T){c=Zapatec.Utils.createElement("td",f);c.colSpan=1;if(m.showsTime!="seconds"){++c.colSpan}c.className="parent-"+Q;V=Zapatec.Utils.createElement("table",c);V.cellSpacing=V.cellPadding=0;if(Q=="hour"){V.align="right"}V.className="calendar-time-scroller";O=Zapatec.Utils.createElement("tbody",V);R=Zapatec.Utils.createElement("tr",O);K=Zapatec.Utils.createElement("tr",O)}else{R=f}J=Zapatec.Utils.createElement("td",R);J.className=Q;J.id="zpTime"+m.id+P+"SelectStatus";J.appendChild(window.document.createTextNode(U));Zapatec.Utils.createProperty(J,"calendar",m);J.ttip=Zapatec.Calendar.i18n("TIME_PART");J.navtype=50;J._range=[];if(!T){J._range=H}else{J.rowSpan=2;for(var N=H;N<=T;++N){var M;if(N<10&&T>=10){M="0"+N}else{M=""+N}J._range[J._range.length]=M}var L=Zapatec.Utils.createElement("td",R);L.className="up";L.navtype=201;L.id="zpTime"+m.id+P+"UpButtonStatus";Zapatec.Utils.createProperty(L,"calendar",m);L.timePart=J;if(Zapatec.is_khtml){L.innerHTML="&nbsp;"}Zapatec.Calendar._add_evs(L);var S=Zapatec.Utils.createElement("td",K);S.className="down";S.navtype=202;S.id="zpTime"+m.id+P+"DownButtonStatus";Zapatec.Utils.createProperty(S,"calendar",m);S.timePart=J;if(Zapatec.is_khtml){S.innerHTML="&nbsp;"}Zapatec.Calendar._add_evs(S)}Zapatec.Calendar._add_evs(J);return J}var G=m.currentDate.getHours();var i=m.currentDate.getMinutes();if(m.showsTime=="seconds"){var B=m.currentDate.getSeconds()}var I=!m.time24;var l=(G>12);if(I&&l){G-=12}var E=D("hour","Hours",G,I?1:0,I?12:23);E._step=(m.timeInterval>30)?(m.timeInterval/60):1;c=Zapatec.Utils.createElement("td",f);c.innerHTML=":";c.className="colon";var C=D("minute","Minutes",i,0,59);C._step=((m.timeInterval)&&(m.timeInterval<60))?(m.timeInterval):5;if(m.showsTime=="seconds"){c=Zapatec.Utils.createElement("td",f);c.innerHTML=":";c.className="colon";var A=D("minute","Seconds",B,0,59);A._step=5}var F=null;if(I){F=D("ampm","AMPM",l?Zapatec.Calendar.i18n("pm","ampm"):Zapatec.Calendar.i18n("am","ampm"),[Zapatec.Calendar.i18n("am","ampm"),Zapatec.Calendar.i18n("pm","ampm")]);F.className+=" button"}else{Zapatec.Utils.createElement("td",f).innerHTML="&nbsp;"}m.onSetTime=function(){var L=this.currentDate.getHours();var M=this.currentDate.getMinutes();if(this.showsTime=="seconds"){var K=m.currentDate.getSeconds()}if(this.timeInterval){M+=this.timeInterval-((M-1+this.timeInterval)%this.timeInterval)-1}while(M>=60){M-=60;++L}if(this.timeInterval>60){var H=this.timeInterval/60;if(L%H!=0){L+=H-((L-1+H)%H)-1}if(L>=24){L-=24}}var N=new Date(this.currentDate);if(this.getDateStatus&&this.getDateStatus(this.currentDate,this.currentDate.getFullYear(),this.currentDate.getMonth(),this.currentDate.getDate(),L,M)){hours=L;minutes=M;do{if(this.timeInterval){if(this.timeInterval<60){minutes+=this.timeInterval}else{L+=this.timeInterval/60}}else{minutes+=5}if(minutes>=60){minutes-=60;hours+=1}if(hours>=24){hours-=24}N.setMinutes(minutes);N.setHours(hours);if(!this.getDateStatus(N,this.currentDate.getFullYear(),this.currentDate.getMonth(),this.currentDate.getDate(),hours,minutes)){L=hours;M=minutes}}while((L!=hours)||(M!=minutes))}this.currentDate.setMinutes(M);this.currentDate.setHours(L);var J=(L>=12);if(J&&I&&L!=12){L-=12}if(!J&&I&&L==0){L=12}E.firstChild.data=(L<10)?("0"+L):L;C.firstChild.data=(M<10)?("0"+M):M;if(this.showsTime=="seconds"){A.firstChild.data=(K<10)?("0"+K):K}if(I){F.firstChild.data=J?Zapatec.Calendar.i18n("pm","ampm"):Zapatec.Calendar.i18n("am","ampm")}};m.onUpdateTime=function(){var J=this.currentDate;var K=parseInt(E.firstChild.data,10);if(I){if(/pm/i.test(F.firstChild.data)&&K<12){K+=12}else{if(/am/i.test(F.firstChild.data)&&K==12){K=0}}}var L=J.getDate();var H=J.getMonth();var M=J.getFullYear();J.setHours(K);J.setMinutes(parseInt(C.firstChild.data,10));if(this.showsTime=="seconds"){J.setSeconds(parseInt(A.firstChild.data,10))}J.setFullYear(M);J.setMonth(H);J.setDate(L);this.dateClicked=false;this.callHandler()}})();if(this.monthsInRow!=1){c=Zapatec.Utils.createElement("td",f);c.colSpan=((this.weekNumbers)?8:7)*(this.monthsInRow-1)-Math.ceil(a);c.className="timetext";c.innerHTML="&nbsp"}}else{this.onSetTime=this.onUpdateTime=function(){}}f=Zapatec.Utils.createElement("tr",h);f.className="footrow";c=d(Zapatec.Calendar.i18n("SEL_DATE"),this.weekNumbers?(8*this.numberMonths):(7*this.numberMonths),300);c.className="ttip";c.id="zpCal"+this.id+"Status";if(this.isPopup&&!this.disableDrag){c.ttip=Zapatec.Calendar.i18n("DRAG_TO_MOVE");c.style.cursor="move"}this.tooltips=c;n=this.monthsCombo=Zapatec.Utils.createElement("div",this.element);n.className="combo";n.id="zpCal"+this.id+"MonthDropdownCombo";for(u=0;u<12;++u){var t=Zapatec.Utils.createElement("div");t.className=Zapatec.is_ie?"label-IEfix":"label";t.id="zpCal"+this.id+"MonthDropdownItem"+u;t.month=u;t.appendChild(window.document.createTextNode(Zapatec.Calendar.i18n(u,"smn")));n.appendChild(t)}n=this.yearsCombo=Zapatec.Utils.createElement("div",this.element);n.className="combo";n.id="zpCal"+this.id+"YearDropdownCombo";for(u=0;u<12;++u){var s=Zapatec.Utils.createElement("div");s.className=Zapatec.is_ie?"label-IEfix":"label";s.id="zpCal"+this.id+"YearDropdownItem"+u;s.appendChild(window.document.createTextNode("&nbsp;"));n.appendChild(s)}n=this.histCombo=Zapatec.Utils.createElement("div",this.element);n.id="zpCal"+this.id+"HistoryDropdownCombo";n.className="combo history";this._init(this.firstDayOfWeek,this.date);g.appendChild(this.element)};Zapatec.Calendar._keyEvent=function(d){if(!window.calendar){return false}(Zapatec.is_ie)&&(d=window.event);var e=window.calendar;var b=(Zapatec.is_ie||d.type=="keypress");var a=d.keyCode;var c=new Date(e.date);if(d.ctrlKey){switch(a){case 37:b&&Zapatec.Calendar.cellClick(e._nav_pm);break;case 38:b&&Zapatec.Calendar.cellClick(e._nav_py);break;case 39:b&&Zapatec.Calendar.cellClick(e._nav_nm);break;case 40:b&&Zapatec.Calendar.cellClick(e._nav_ny);break;default:return false}}else{switch(a){case 32:Zapatec.Calendar.cellClick(e._nav_now);break;case 27:b&&e.callCloseHandler();break;case 37:if(b&&!e.multiple){c.setTime(c.getTime()-86400000);e.setDate(c)}break;case 38:if(b&&!e.multiple){c.setTime(c.getTime()-7*86400000);e.setDate(c)}break;case 39:if(b&&!e.multiple){c.setTime(c.getTime()+86400000);e.setDate(c)}break;case 40:if(b&&!e.multiple){c.setTime(c.getTime()+7*86400000);e.setDate(c)}break;case 13:if(b){Zapatec.Calendar.cellClick(e.currentDateEl)}break;default:return false}}return Zapatec.Utils.stopEvent(d)};Zapatec.Calendar.prototype._init=function(u,T,r){var m=new Date(),Q=m.getDate(),F=m.getFullYear(),L=m.getMonth();if(this.getDateStatus&&!r){var D=this.getDateStatus(T,T.getFullYear(),T.getMonth(),T.getDate());var f=new Date(T);while(((D==true)||(D=="disabled"))&&(f.getMonth()==T.getMonth())){T.setTime(T.getTime()+86400000);var D=this.getDateStatus(T,T.getFullYear(),T.getMonth(),T.getDate())}if(f.getMonth()!=T.getMonth()){T=new Date(f);while(((D==true)||(D=="disabled"))&&(f.getMonth()==T.getMonth())){T.setTime(T.getTime()-86400000);var D=this.getDateStatus(T,T.getFullYear(),T.getMonth(),T.getDate())}}if(f.getMonth()!=T.getMonth()){r=true;T=new Date(f)}}var e=T.getFullYear();var a=T.getMonth();var V=Math.floor(this.numberMonths/this.monthsInRow);var t;var x,E,o;if(!this.vertical){x=(this.controlMonth-1);t=a-x}else{E=((this.numberMonths-1)%this.monthsInRow)+1;o=(this.controlMonth-1)%this.monthsInRow;bottom=(o>=(E)?(E):(o));x=(o)*(V-1)+Math.floor((this.controlMonth-1)/this.monthsInRow)+bottom;t=a-x}var q=e;if(t<0){t+=12;--q}var y=t+this.numberMonths-1;var w=q;if(y>11){y-=12;++w}function A(i){Zapatec.Calendar._del_evs(i);i.disabled=true;i.className="button";i.innerHTML="<div>&nbsp</div>"}function d(l,i){Zapatec.Calendar._add_evs(l);l.disabled=false;l.className="button nav";l.innerHTML=i}if((q<=this.minYear)||!this.yearNav){if(!this._nav_py.disabled){A(this._nav_py)}}else{if(this._nav_py.disabled){d(this._nav_py,"&#x00ab;")}}if(w>=this.maxYear||!this.yearNav){if(!this._nav_ny.disabled){A(this._nav_ny)}}else{if(this._nav_ny.disabled){d(this._nav_ny,"&#x00bb;")}}if(((q==this.minYear)&&(t<=this.minMonth))||(q<this.minYear)){if(!this._nav_pm.disabled){A(this._nav_pm)}}else{if(this._nav_pm.disabled){d(this._nav_pm,"&#x2039;")}}if(((w==this.maxYear)&&(y>=this.maxMonth))||(w>this.maxYear)){if(!this._nav_nm.disabled){A(this._nav_nm)}}else{if(this._nav_nm.disabled){d(this._nav_nm,"&#x203a;")}}upperMonth=this.maxMonth+1;upperYear=this.maxYear;if(upperMonth>11){upperMonth-=12;++upperYear}bottomMonth=this.minMonth-1;bottomYear=this.minYear;if(bottomMonth<0){bottomMonth+=12;--bottomYear}maxDate1=new Date(w,y,T.getMonthDays(y),23,59,59,999);maxDate2=new Date(upperYear,upperMonth,1,0,0,0,0);minDate1=new Date(q,t,1,0,0,0,0);minDate2=new Date(bottomYear,bottomMonth,T.getMonthDays(bottomMonth),23,59,59,999);if(maxDate1.getTime()>maxDate2.getTime()){T.setTime(T.getTime()-(maxDate1.getTime()-maxDate2.getTime()))}if(minDate1.getTime()<minDate2.getTime()){T.setTime(T.getTime()+(minDate2.getTime()-minDate1.getTime())+1)}delete maxDate1;delete maxDate2;delete minDate1;delete minDate2;this.firstDayOfWeek=u;if(!r){this.currentDate=T}this.date=T;(this.date=new Date(this.date)).setDateOnly(T);e=this.date.getFullYear();a=this.date.getMonth();var h=T.getMonth();var g=this.date.getDate();var I=T.getMonthDays();var v=new Array();if(this.numberMonths%this.monthsInRow>0){++V}for(var O=1;O<=V;++O){v[O]=new Array();for(var P=1;(P<=this.monthsInRow)&&((O-1)*this.monthsInRow+P<=this.numberMonths);++P){var H=new Date(T);if(this.vertical){var U=T.getMonth()-x+((P-1)*(V-1)+(O-1)+((E<P)?(E):(P-1)))}else{var U=T.getMonth()-x+(O-1)*this.monthsInRow+P-1}if(U<0){H.setFullYear(H.getFullYear()-1);U=12+U}if(U>11){H.setFullYear(H.getFullYear()+1);U=U-12}H.setDate(1);H.setMonth(U);var M=(H.getDay()-this.firstDayOfWeek)%7;if(M<0){M+=7}var z=H.getHours();H.setDate(-M);H.setDate(H.getDate()+1);if(z!=H.getHours()){H.setDate(1);H.setMonth(U);H.setDate(-M);H.setDate(H.getDate()+1)}v[O][P]=H}}var b=Zapatec.Calendar.i18n(a,"smn");var c=Zapatec.Calendar.i18n("WEEKEND");var N=this.multiple?(this.datesCells={}):null;var J=this.getDateText;for(var O=1;O<=V;++O){var n=this.tbody[O].firstChild;for(var R=7;--R>0;n=n.nextSibling){var B=n.firstChild;var W=false;for(var P=1;(P<=this.monthsInRow)&&((O-1)*this.monthsInRow+P<=this.numberMonths);++P){T=v[O][P];if(this.weekNumbers){B.className=" day wn";B.innerHTML=T.getWeekNumber();if(P>1){Zapatec.Utils.addClass(B,"month-left-border")}B=B.nextSibling}n.className="daysrow";n.id="zpCal"+this.id+"Daysrow"+(6-R);var C;for(j=7;B&&(C=T.getDate())&&(j>0);T.setDate(C+1),((T.getDate()==C)?(T.setHours(1)&&T.setDate(C+1)):(false)),B=B.nextSibling,--j){var p=T.getDay(),G=T.getMonth(),K=T.getFullYear();B.className=" day";if((!this.weekNumbers)&&(j==7)&&(P!=1)){Zapatec.Utils.addClass(B,"month-left-border")}if((j==1)&&(P!=this.monthsInRow)){Zapatec.Utils.addClass(B,"month-right-border")}if(this.vertical){U=h-x+((P-1)*(V-1)+(O-1)+((E<P)?(E):(P-1)))}else{U=h-x+((O-1)*this.monthsInRow+P-1)}if(U<0){U=12+U}if(U>11){U=U-12}var S=!(B.otherMonth=!(G==U));if(!S){if(this.showsOtherMonths){B.className+=" othermonth"}else{B.className+=" true";B.innerHTML="<div>&nbsp;</div>";continue}}else{W=true}B.innerHTML=J?J(T,K,G,C):C;N&&(N[T.print("%Y%m%d")]=B);if(this.getDateStatus){var D=this.getDateStatus(T,K,G,C);if(this.getDateToolTip){var s=this.getDateToolTip(T,K,G,C);if(s){B.title=s}}if(D==true){B.className+=" disabled"}else{B.className+=" "+D}}if(!B.disabled){B.caldate=[K,G,C];B.ttip="_";if(!this.multiple&&S&&C==this.currentDate.getDate()&&this.hiliteToday&&(G==this.currentDate.getMonth())&&(K==this.currentDate.getFullYear())){B.className+=" selected";this.currentDateEl=B}if(K==F&&G==L&&C==Q){B.className+=" today";B.ttip+=Zapatec.Calendar.i18n("PART_TODAY")}if((c!=null)&&(c.indexOf(p.toString())!=-1)){B.className+=B.otherMonth?" oweekend":" weekend"}}}if(!(W||this.showsOtherMonths)){n.className="emptyrow"}}if((R==1)&&(O<V)){if(n.className=="emptyrow"){n=n.previousSibling}B=n.firstChild;while(B!=null){Zapatec.Utils.addClass(B,"month-bottom-border");B=B.nextSibling}}}}if(this.numberMonths==1){this.title.innerHTML=Zapatec.Calendar.i18n(a,"mn")+", "+e;if(this.params&&this.params.titleHtml){if(typeof this.params.titleHtml=="function"){this.title.innerHTML=this.params.titleHtml(this.title.innerHTML,a,e)}else{this.title.innerHTML+=this.params.titleHtml}}}else{if(this.params&&this.params.titleHtml){if(typeof this.params.titleHtml=="function"){this.title.innerHTML=this.params.titleHtml(Zapatec.Calendar.i18n(a,"mn")+", "+e,a,e)}else{this.title.innerHTML=this.params.titleHtml}}for(var O=1;O<=V;++O){for(var P=1;(P<=this.monthsInRow)&&((O-1)*this.monthsInRow+P<=this.numberMonths);++P){if(this.vertical){U=a-x+((P-1)*(V-1)+(O-1)+((E<P)?(E):(P-1)))}else{U=a-x+(O-1)*this.monthsInRow+P-1}validYear=e;if(U<0){--validYear;U=12+U}if(U>11){++validYear;U=U-12}this.titles[O][P].innerHTML=Zapatec.Calendar.i18n(U,"mn")+", "+validYear}}}this.onSetTime();this._initMultipleDates();this.updateWCH()};Zapatec.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"}}}};Zapatec.Calendar.prototype._toggleMultipleDate=function(b){if(this.multiple){var c=b.print("%Y%m%d");var a=this.datesCells[c];if(a){var e=this.multiple[c];if(!e){Zapatec.Utils.addClass(a,"selected");this.multiple[c]=b}else{Zapatec.Utils.removeClass(a,"selected");delete this.multiple[c]}}}};Zapatec.Calendar.prototype.setDateToolTipHandler=function(a){this.getDateToolTip=a};Zapatec.Calendar.prototype.setDate=function(b,d){if(!b){b=new Date()}if(!b.equalsTo(this.date)){var c=b.getFullYear(),a=b.getMonth();if(c<this.minYear||(c==this.minYear&&a<this.minMonth)){this.showHint("<div class='error'>"+Zapatec.Calendar.i18n("E_RANGE")+" ??????</div>")}else{if(c>this.maxYear||(c==this.maxYear&&a>this.maxMonth)){this.showHint("<div class='error'>?????? "+Zapatec.Calendar.i18n("E_RANGE")+"</div>")}}this._init(this.firstDayOfWeek,b,d)}};Zapatec.Calendar.prototype.showHint=function(a){this.tooltips.innerHTML=a};Zapatec.Calendar.prototype.reinit=function(){this._init(this.firstDayOfWeek,this.date)};Zapatec.Calendar.prototype.refresh=function(){var b=this.isPopup?null:this.element.parentNode;var a=parseInt(this.element.style.left);var c=parseInt(this.element.style.top);this.destroy();this.dateStr=this.date;this.create(b);if(this.isPopup){this.showAt(a,c)}else{this.show()}};Zapatec.Calendar.prototype.setFirstDayOfWeek=function(b){if(this.firstDayOfWeek!=b){this._init(b,this.date);var c=Math.floor(this.numberMonths/this.monthsInRow);if(this.numberMonths%this.monthsInRow>0){++c}for(var a=1;a<=c;++a){this.firstdayname=this.rowsOfDayNames[a];this._displayWeekdays()}}};Zapatec.Calendar.prototype.setDateStatusHandler=Zapatec.Calendar.prototype.setDisabledHandler=function(a){this.getDateStatus=a};Zapatec.Calendar.prototype.setRange=function(c,e){var b,d=Math.min(c,e),f=Math.max(c,e);this.minYear=b=Math.floor(d);this.minMonth=(b==d)?0:Math.ceil((d-b)*100-1);this.maxYear=b=Math.floor(f);this.maxMonth=(b==f)?11:Math.ceil((f-b)*100-1)};Zapatec.Calendar.prototype.setMultipleDates=function(a){if(!a||typeof a=="undefined"){return}this.multiple={};for(var b=a.length;--b>=0;){var e=a[b];var c=e.print("%Y%m%d");this.multiple[c]=e}};Zapatec.Calendar.prototype.submitFlatDates=function(){if(typeof this.params.flatCallback=="function"){Zapatec.Utils.sortOrder=(this.sortOrder!="asc"&&this.sortOrder!="desc"&&this.sortOrder!="none")?"none":this.sortOrder;if(this.multiple&&(Zapatec.Utils.sortOrder!="none")){var e=new Array();for(var b in this.multiple){var a=this.multiple[b];if(a){e[e.length]=a}e.sort(Zapatec.Utils.compareDates)}this.multiple={};for(var b=0;b<e.length;b++){var f=e[b];var c=f.print("%Y%m%d");this.multiple[c]=f}}this.params.flatCallback(this)}};Zapatec.Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat))}};Zapatec.Calendar.prototype.updateHistory=function(){var c,f,l,e,g,h="",b=Zapatec.Calendar.prefs.hsize-1;if(Zapatec.Calendar.prefs.history){c=Zapatec.Calendar.prefs.history.split(/,/);f=0;while(f<b&&(e=c[f++])){g=e.split(/\//);l=new Date(parseInt(g[0],10),parseInt(g[1],10)-1,parseInt(g[2],10),parseInt(g[3],10),parseInt(g[4],10));if(!l.dateEqualsTo(this.date)){h+=","+e}}}Zapatec.Calendar.prefs.history=this.date.print("%Y/%m/%d/%H/%M")+h;Zapatec.Calendar.savePrefs()};Zapatec.Calendar.prototype.callCloseHandler=function(){if(this.dateClicked){this.updateHistory()}if(this.onClose){this.onClose(this)}this.hideShowCovered()};Zapatec.Calendar.prototype.destroy=function(){this.hide();Zapatec.Utils.destroy(this.element);Zapatec.Utils.destroy(this.WCH);Zapatec.Calendar._C=null;window.calendar=null};Zapatec.Calendar.prototype.reparent=function(b){var a=this.element;a.parentNode.removeChild(a);b.appendChild(a)};Zapatec.Calendar._checkCalendar=function(b){if(!window.calendar){return false}var a=Zapatec.is_ie?Zapatec.Utils.getElement(b):Zapatec.Utils.getTargetElement(b);for(;a!=null&&a!=calendar.element;a=a.parentNode){}if(a==null){window.calendar.callCloseHandler()}};Zapatec.Calendar.prototype.updateWCH=function(a){Zapatec.Utils.setupWCH_el(this.WCH,this.element,a)};Zapatec.Calendar.prototype.show=function(){var e=this.table.getElementsByTagName("tr");for(var d=e.length;d>0;){var f=e[--d];Zapatec.Utils.removeClass(f,"rowhilite");var c=f.getElementsByTagName("td");for(var b=c.length;b>0;){var a=c[--b];Zapatec.Utils.removeClass(a,"hilite");Zapatec.Utils.removeClass(a,"active")}}if(this.element.style.display!="block"){this.element.style.display="block"}this.hidden=false;if(this.isPopup){this.updateWCH();window.calendar=this;if(!this.noGrab){Zapatec.Utils.addEvent(window.document,"keydown",Zapatec.Calendar._keyEvent);Zapatec.Utils.addEvent(window.document,"keypress",Zapatec.Calendar._keyEvent);Zapatec.Utils.addEvent(window.document,"mousedown",Zapatec.Calendar._checkCalendar)}}this.hideShowCovered()};Zapatec.Calendar.prototype.hide=function(){if(this.isPopup){Zapatec.Utils.removeEvent(window.document,"keydown",Zapatec.Calendar._keyEvent);Zapatec.Utils.removeEvent(window.document,"keypress",Zapatec.Calendar._keyEvent);Zapatec.Utils.removeEvent(window.document,"mousedown",Zapatec.Calendar._checkCalendar)}this.element.style.display="none";Zapatec.Utils.hideWCH(this.WCH);this.hidden=true;this.hideShowCovered()};Zapatec.Calendar.prototype.showAt=function(a,c){var b=this.element.style;b.left=a+"px";b.top=c+"px";this.show()};Zapatec.Calendar.prototype.showAtElement=function(e,f){var b=this;var i=Zapatec.Utils.getElementOffset(e);if(!f||typeof f!="string"){this.showAt(i.x,i.y+e.offsetHeight);return true}this.element.style.display="block";var a=b.element.offsetWidth;var d=b.element.offsetHeight;b.element.style.display="none";var c=f.substr(0,1);var g="l";if(f.length>1){g=f.substr(1,1)}switch(c){case"T":i.y-=d;break;case"B":i.y+=e.offsetHeight;break;case"C":i.y+=(e.offsetHeight-d)/2;break;case"t":i.y+=e.offsetHeight-d;break;case"b":break}switch(g){case"L":i.x-=a;break;case"R":i.x+=e.offsetWidth;break;case"C":i.x+=(e.offsetWidth-a)/2;break;case"l":i.x+=e.offsetWidth-a;break;case"r":break}i.width=a;i.height=d;b.monthsCombo.style.display="none";Zapatec.Utils.fixBoxPosition(i,10);b.showAt(i.x,i.y)};Zapatec.Calendar.prototype.setDateFormat=function(a){this.dateFormat=a};Zapatec.Calendar.prototype.setTtDateFormat=function(a){this.ttDateFormat=a};Zapatec.Calendar.prototype.parseDate=function(c,a){if(!c){return this.setDate(this.date)}if(!a){a=this.dateFormat}var b=Date.parseDate(c,a);return this.setDate(b)};Zapatec.Calendar.prototype.hideShowCovered=function(){if(!Zapatec.is_ie5){return}var t=this;function b(p){var i=p.style.visibility;if(!i){if(window.document.defaultView&&typeof(window.document.defaultView.getComputedStyle)=="function"){if(!Zapatec.is_khtml){i=window.document.defaultView.getComputedStyle(p,"").getPropertyValue("visibility")}else{i=""}}else{if(p.currentStyle){i=p.currentStyle.visibility}else{i=""}}}return i}var u=["applet","iframe","select"];var c=t.element;var a=Zapatec.Utils.getAbsolutePos(c);var f=a.x;var d=c.offsetWidth+f;var s=a.y;var r=c.offsetHeight+s;for(var h=u.length;h>0;){var g=window.document.getElementsByTagName(u[--h]);var e=null;for(var m=g.length;m>0;){e=g[--m];a=Zapatec.Utils.getAbsolutePos(e);var q=a.x;var o=e.offsetWidth+q;var n=a.y;var l=e.offsetHeight+n;if(t.hidden||(q>d)||(o<f)||(n>r)||(l<s)){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"}}}};Zapatec.Calendar.prototype._displayWeekdays=function(){var b=this.firstDayOfWeek;var a=this.firstdayname;var d=Zapatec.Calendar.i18n("WEEKEND");for(k=1;(k<=this.monthsInRow)&&(a);++k){for(var c=0;c<7;++c){a.className=" day name";if((!this.weekNumbers)&&(c==0)&&(k!=1)){Zapatec.Utils.addClass(a,"month-left-border")}if((c==6)&&(k!=this.monthsInRow)){Zapatec.Utils.addClass(a,"month-right-border")}var e=(c+b)%7;if((!this.disableFdowClick)&&((this.params&&this.params.fdowClick)||c)){if(Zapatec.Calendar.i18n("DAY_FIRST")!=null){a.ttip=Zapatec.Calendar.i18n("DAY_FIRST").replace("%s",Zapatec.Calendar.i18n(e,"dn"))}a.navtype=100;a.calendar=this;a.fdow=e;Zapatec.Calendar._add_evs(a)}if((d!=null)&&(d.indexOf(e.toString())!=-1)){Zapatec.Utils.addClass(a,"weekend")}a.innerHTML=Zapatec.Calendar.i18n((c+b)%7,"sdn");a=a.nextSibling}if(this.weekNumbers&&a){a=a.nextSibling}}};Zapatec.Utils.compareDates=function(b,a){if(Zapatec.Calendar.prefs.sortOrder=="asc"){return b-a}else{return a-b}};Zapatec.Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";this.histCombo.style.display="none";this.updateWCH()};Zapatec.Calendar.prototype._dragStart=function(b){b||(b=window.event);if(this.dragging){return}this.dragging=true;var d=b.clientX+window.document.body.scrollLeft;var c=b.clientY+window.document.body.scrollTop;var a=this.element.style;this.xOffs=d-parseInt(a.left);this.yOffs=c-parseInt(a.top);Zapatec.Utils.addEvent(window.document,"mousemove",Zapatec.Calendar.calDragIt);Zapatec.Utils.addEvent(window.document,"mouseover",Zapatec.Calendar.calDragIt);Zapatec.Utils.addEvent(window.document,"mouseup",Zapatec.Calendar.calDragEnd)};Date._MD=[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.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.round(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.dateEqualsTo=function(a){return((this.getFullYear()==a.getFullYear())&&(this.getMonth()==a.getMonth())&&(this.getDate()==a.getDate()))};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(o){var b=this.getMonth();var n=this.getDate();var p=this.getFullYear();var r=this.getWeekNumber();var t=this.getDay();var z={};var u=this.getHours();var c=(u>=12);var h=(c)?(u-12):u;var x=this.getDayOfYear();if(h==0){h=12}var e=this.getMinutes();var l=this.getSeconds();z["%a"]=Zapatec.Calendar.i18n(t,"sdn");z["%A"]=Zapatec.Calendar.i18n(t,"dn");z["%b"]=Zapatec.Calendar.i18n(b,"smn");z["%B"]=Zapatec.Calendar.i18n(b,"mn");z["%C"]=1+Math.floor(p/100);z["%d"]=(n<10)?("0"+n):n;z["%e"]=n;z["%H"]=(u<10)?("0"+u):u;z["%I"]=(h<10)?("0"+h):h;z["%j"]=(x<100)?((x<10)?("00"+x):("0"+x)):x;z["%k"]=u?u:"0";z["%l"]=h;z["%m"]=(b<9)?("0"+(1+b)):(1+b);z["%M"]=(e<10)?("0"+e):e;z["%n"]="\n";z["%p"]=c?"PM":"AM";z["%P"]=c?"pm":"am";z["%s"]=Math.floor(this.getTime()/1000);z["%S"]=(l<10)?("0"+l):l;z["%t"]="\t";z["%U"]=z["%W"]=z["%V"]=(r<10)?("0"+r):r;z["%u"]=(t==0)?7:t;z["%w"]=t?t:"0";z["%y"]=""+p%100;if(z["%y"]<10){z["%y"]="0"+z["%y"]}z["%Y"]=p;z["%%"]="%";var v=/%./g;var q=o.match(v)||[];for(var g=0;g<q.length;g++){var f=z[q[g]];if(f){v=new RegExp(q[g],"g");o=o.replace(v,f)}}return o};Date.parseDate=function(t,x){var b=x,a=0,g=null,i=null,u=null,p=null,A=null,B=new Date(),c={};var q=["%d","%H","%I","%m","%M","%S","%s","%W","%u","%w","%y","%e","%k","%l","%s","%Y","%C"];function d(D){if(Zapatec.Utils.arrIndexOf(q,D)!=-1){return true}return false}function h(){for(var D=p[0];D<p[1];++D){var E=Zapatec.Calendar.i18n(D,A);if(!E){return null}if(E==t.substr(a,E.length)){u=E.length;return D}}return null}function n(){var D=t.substr(a,u);if(D.length!=u||/$\d+^/.test(D)){return null}return parseInt(D,10)}function v(){var D=(t.substr(a,u).toLowerCase()==Zapatec.Calendar.i18n("pm","ampm"))?true:false;return D||((t.substr(a,u).toLowerCase()==Zapatec.Calendar.i18n("am","ampm"))?false:null)}function m(){return""}function l(D){return(c[D]=i())}function r(D){if(typeof D=="undefined"||D===null){return false}return true}function e(){for(var D=0;D<arguments.length;++D){if(arguments[D]!==null&&typeof arguments[D]!="undefined"&&!isNaN(arguments[D])){return arguments[D]}}return null}if(typeof b!="string"||typeof t!="string"||t==""||b==""){return null}while(b){i=n;u=b.indexOf("%");u=(u==-1)?b.length:u;g=b.slice(0,u);if(g!=t.substr(a,u)){return null}a+=u;b=b.slice(u);if(b==""){break}g=b.slice(0,2);u=2;switch(g){case"%A":case"%a":A=(g=="%A")?"dn":"sdn";p=[0,7];i=h;break;case"%B":case"%b":A=(g=="%B")?"mn":"smn";p=[0,12];i=h;break;case"%p":case"%P":i=v;break;case"%Y":u=4;if(d(b.substr(2,2))){return null}while(isNaN(parseInt(t.charAt(a+u-1)))&&u>0){--u}if(u==0){break}break;case"%C":case"%s":u=1;if(d(b.substr(2,2))){return null}while(!isNaN(parseInt(t.charAt(a+u)))){++u}break;case"%k":case"%l":case"%e":u=1;if(d(b.substr(2,2))){return null}if(!isNaN(parseInt(t.charAt(a+1)))){++u}break;case"%j":u=3;break;case"%u":case"%w":u=1;case"%y":case"%m":case"%d":case"%W":case"%H":case"%I":case"%M":case"%S":break}if(l(g)===null){return null}a+=u;b=b.slice(2)}if(r(c["%s"])){B.setTime(c["%s"]*1000)}else{var o=e(c["%Y"],c["%y"]+ --c["%C"]*100,c["%y"]+(B.getFullYear()-B.getFullYear()%100),c["%C"]*100+B.getFullYear()%100);var C=e(c["%m"]-1,c["%b"],c["%B"]);var w=e(c["%d"]||c["%e"]);if(w===null||C===null){var s=e(c["%a"],c["%A"],c["%u"]==7?0:c["%u"],c["%w"])}var f=e(c["%H"],c["%k"]);if(f===null&&(r(c["%p"])||r(c["%P"]))){var z=e(c["%p"],c["%P"]);f=e(c["%I"],c["%l"]);f=z?((f==12)?12:(f+12)):((f==12)?(0):f)}if(o||o===0){B.setFullYear(o)}if(C||C===0){B.setMonth(C)}if(w||w===0){B.setDate(w)}if(r(c["%j"])){B.setMonth(0);B.setDate(1);B.setDate(c["%j"])}if(r(s)){B.setDate(B.getDate()+(s-B.getDay()))}if(r(c["%W"])){var y=B.getWeekNumber();if(y!=c["%W"]){B.setDate(B.getDate()+(c["%W"]-y)*7)}}if(f!==null){B.setHours(f)}if(r(c["%M"])){B.setMinutes(c["%M"])}if(r(c["%S"])){B.setSeconds(c["%S"])}}if(B.print(x)!=t){return null}return B};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)};Date.prototype.compareDatesOnly=function(e,d){var c=e.getYear();var b=d.getYear();var a=e.getMonth();var h=d.getMonth();var g=e.getDate();var f=d.getDate();if(c>b){return -1}if(b>c){return 1}if(a>h){return -1}if(h>a){return 1}if(g>f){return -1}if(f>g){return 1}return 0};Zapatec.Setup=function(){};Zapatec.Setup.test=true;Zapatec.Calendar.setup=function(b){paramsList=["id"];function f(i,o){if(typeof b[i]=="undefined"){b[i]=o}paramsList.push(i)}b.id=Zapatec.Utils.generateID("calendar");f("inputField",null);f("displayArea",null);f("button",null);f("eventName","click");f("closeEventName",null);f("ifFormat","%Y/%m/%d");f("daFormat","%Y/%m/%d");f("singleClick",true);f("disableFunc",null);f("dateStatusFunc",b.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("sortOrder","asc");f("timeFormat","24");f("timeInterval",null);f("electric",true);f("step",2);f("position",null);f("cache",false);f("showOthers",false);f("multiple",null);f("saveDate",null);f("fdowClick",false);f("titleHtml",null);f("noHelp",false);f("noCloseButton",false);f("disableYearNav",false);f("disableFdowChange",false);if(b.weekNumbers){b.disableFdowChange=true;b.firstDay=1}f("disableDrag",false);f("numberMonths",1);if((b.numberMonths>12)||(b.numberMonths<1)){b.numberMonths=1}if(b.numberMonths>1){b.showOthers=false}b.numberMonths=parseInt(b.numberMonths,10);f("controlMonth",1);if((b.controlMonth>b.numberMonths)||(b.controlMonth<1)){b.controlMonth=1}b.controlMonth=parseInt(b.controlMonth,10);f("vertical",false);if(b.monthsInRow>b.numberMonths){b.monthsInRow=b.numberMonths}f("monthsInRow",b.numberMonths);b.monthsInRow=parseInt(b.monthsInRow,10);f("multiple",false);if(b.multiple){b.singleClick=false}f("canType",false);var d=["inputField","displayArea","button"];for(var e in d){if(typeof b[d[e]]=="string"){b[d[e]]=document.getElementById(b[d[e]])}}if(!b.inputField){b.canType=false}else{b.inputField.setAttribute("autocomplete","off")}if(!(b.flat||b.multiple||b.inputField||b.displayArea||b.button)){alert("Calendar.setup '"+b.id+"':\n  Nothing to setup (no fields found).  Please check your code");return false}if(((b.timeInterval)&&((b.timeInterval!==Math.floor(b.timeInterval))||((60%b.timeInterval!==0)&&(b.timeInterval%60!==0))))||(b.timeInterval>360)){alert("'"+b.id+"': timeInterval option can only have the following number of minutes:\n1, 2, 3, 4, 5, 6, 10, 15, 30,  60, 120, 180, 240, 300, 360 ");b.timeInterval=null}if(b.date&&!Date.parse(b.date)){alert("'"+b.id+"' Start Date Invalid: "+b.date+".\nSee date option.\nDefaulting to today.");b.date=null}if(b.saveDate){f("cookiePrefix",window.location.href+"--"+b.button.id);var l=b.cookiePrefix;var g=Zapatec.Utils.getCookie(l);if(g!=null){document.getElementById(b.inputField.id).value=g}}for(var m in b){if(typeof b.constructor.prototype[m]!="undefined"){continue}if(Zapatec.Utils.arrIndexOf(paramsList,m)==-1){alert("Wrong config option: "+m)}}function h(o){var i=o.params;var r=(o.dateClicked||i.electric);if(r&&i.flat){if(typeof i.flatCallback=="function"){if(!i.multiple){i.flatCallback(o)}}else{alert("'"+o.id+"': No flatCallback given -- doing nothing.")}return false}if(r&&i.inputField){i.inputField.value=o.currentDate.print(i.ifFormat);if(typeof i.inputField.onchange=="function"){i.inputField.onchange()}}if(r&&i.displayArea){i.displayArea.innerHTML=o.currentDate.print(i.daFormat)}if(r&&i.singleClick&&o.dateClicked){o.callCloseHandler()}if(r&&typeof i.onUpdate=="function"){i.onUpdate(o)}if(i.saveDate){var q=i.cookiePrefix;Zapatec.Utils.writeCookie(q,i.inputField.value,null,"/",i.saveDate)}}if(b.flat!=null){if(typeof b.flat=="string"){b.flat=document.getElementById(b.flat)}if(!b.flat){alert("Calendar.setup '"+b.id+"':\n  Flat specified but can't find parent.");return false}var a=new Zapatec.Calendar(b.firstDay,b.date,b.onSelect||h);a.disableFdowClick=b.disableFdowChange;a.showsOtherMonths=b.showOthers;a.showsTime=b.showsTime;a.time24=(b.timeFormat=="24");a.timeInterval=b.timeInterval;a.params=b;a.weekNumbers=b.weekNumbers;a.sortOrder=b.sortOrder.toLowerCase();a.setRange(b.range[0],b.range[1]);a.setDateStatusHandler(b.dateStatusFunc);a.getDateText=b.dateText;a.numberMonths=b.numberMonths;a.controlMonth=b.controlMonth;a.vertical=b.vertical;a.yearStep=b.step;a.monthsInRow=b.monthsInRow;a.helpButton=!b.noHelp;a.closeButton=!b.noCloseButton;a.yearNav=!b.disableYearNav;if(b.ifFormat){a.setDateFormat(b.ifFormat)}if(b.inputField&&b.inputField.type=="text"&&typeof b.inputField.value=="string"){a.parseDate(b.inputField.value)}if(b.multiple){a.setMultipleDates(b.multiple)}a.create(b.flat);a.show();return a}var n=b.button||b.displayArea||b.inputField;if(b.canType){function c(i){i=i||window.event;if(Zapatec.is_ie){i.cancelBubble=true}else{i.stopPropagation()}}Zapatec.Utils.addEvent(b.inputField,"mousedown",c);Zapatec.Utils.addEvent(b.inputField,"keydown",c);Zapatec.Utils.addEvent(b.inputField,"keypress",c);Zapatec.Utils.addEvent(b.inputField,"keyup",function(o){var q=b.inputField?b.ifFormat:b.daFormat;var i=Date.parseDate(b.inputField.value,q);var p=window.calendar;if(p&&i&&!p.hidden){p.setDate(i)}})}n["on"+b.eventName]=function(){var i=b.inputField||b.displayArea;if((!b.canType||b.inputField!=n)&&n.blur){n.blur()}var q=b.inputField?b.ifFormat:b.daFormat;var s=false;var r=window.calendar;if(b.canType&&(b.inputField==n)&&r&&!r.hidden){return}if(!(r&&b.cache)){window.calendar=r=new Zapatec.Calendar(b.firstDay,b.date,b.onSelect||h,b.onClose||function(t){if(b.cache){t.hide()}else{t.destroy()}});r.disableFdowClick=b.disableFdowChange;r.showsTime=b.showsTime;r.time24=(b.timeFormat=="24");r.timeInterval=b.timeInterval;r.weekNumbers=b.weekNumbers;r.numberMonths=b.numberMonths;r.controlMonth=b.controlMonth;r.vertical=b.vertical;r.monthsInRow=b.monthsInRow;r.historyDateFormat=b.ifFormat||b.daFormat;r.helpButton=!b.noHelp;r.disableDrag=b.disableDrag;r.closeButton=!b.noCloseButton;r.yearNav=!b.disableYearNav;r.sortOrder=b.sortOrder.toLowerCase();s=true}else{if(b.date){r.setDate(b.date)}r.hide()}if(b.multiple){r.setMultipleDates(b.multiple)}r.showsOtherMonths=b.showOthers;r.yearStep=b.step;r.setRange(b.range[0],b.range[1]);r.params=b;r.setDateStatusHandler(b.dateStatusFunc);r.getDateText=b.dateText;r.setDateFormat(q);if(s){r.create()}if(i){var o;if(i.value){o=i.value}else{o=i.innerHTML}if(o!=""){var p=Date.parseDate(i.value||i.innerHTML,q);if(p!=null){r.setDate(p)}}}if(!b.position){r.showAtElement(b.button||b.displayArea||b.inputField,b.align)}else{r.showAt(b.position[0],b.position[1])}return false};if(b.closeEventName){n["on"+b.closeEventName]=function(){if(window.calendar){window.calendar.callCloseHandler()}}}return a};Zapatec.Utils.addEvent(window,"load",Zapatec.Utils.checkActivation);

