//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, <http://mad4milk.net>, MIT Style License.

var MooTools={version:'1.11'};function $defined(obj){return(obj!=undefined);};function $type(obj){if(!$defined(obj))return false;if(obj.htmlElement)return'element';var type=typeof obj;if(type=='object'&&obj.nodeName){switch(obj.nodeType){case 1:return'element';case 3:return(/\S/).test(obj.nodeValue)?'textnode':'whitespace';}}
if(type=='object'||type=='function'){switch(obj.constructor){case Array:return'array';case RegExp:return'regexp';case Class:return'class';}
if(typeof obj.length=='number'){if(obj.item)return'collection';if(obj.callee)return'arguments';}}
return type;};function $merge(){var mix={};for(var i=0;i<arguments.length;i++){for(var property in arguments[i]){var ap=arguments[i][property];var mp=mix[property];if(mp&&$type(ap)=='object'&&$type(mp)=='object')mix[property]=$merge(mp,ap);else mix[property]=ap;}}
return mix;};var $extend=function(){var args=arguments;if(!args[1])args=[this,args[0]];for(var property in args[1])args[0][property]=args[1][property];return args[0];};var $native=function(){for(var i=0,l=arguments.length;i<l;i++){arguments[i].extend=function(props){for(var prop in props){if(!this.prototype[prop])this.prototype[prop]=props[prop];if(!this[prop])this[prop]=$native.generic(prop);}};}};$native.generic=function(prop){return function(bind){return this.prototype[prop].apply(bind,Array.prototype.slice.call(arguments,1));};};$native(Function,Array,String,Number);function $chk(obj){return!!(obj||obj===0);};function $pick(obj,picked){return $defined(obj)?obj:picked;};function $random(min,max){return Math.floor(Math.random()*(max-min+1)+min);};function $time(){return new Date().getTime();};function $clear(timer){clearTimeout(timer);clearInterval(timer);return null;};var Abstract=function(obj){obj=obj||{};obj.extend=$extend;return obj;};var Window=new Abstract(window);var Document=new Abstract(document);document.head=document.getElementsByTagName('head')[0];window.xpath=!!(document.evaluate);if(window.ActiveXObject)window.ie=window[window.XMLHttpRequest?'ie7':'ie6']=true;else if(document.childNodes&&!document.all&&!navigator.taintEnabled)window.webkit=window[window.xpath?'webkit420':'webkit419']=true;else if(document.getBoxObjectFor!=null)window.gecko=true;window.khtml=window.webkit;Object.extend=$extend;if(typeof HTMLElement=='undefined'){var HTMLElement=function(){};if(window.webkit)document.createElement("iframe");HTMLElement.prototype=(window.webkit)?window["[[DOMElement.prototype]]"]:{};}
HTMLElement.prototype.htmlElement=function(){};if(window.ie6)try{document.execCommand("BackgroundImageCache",false,true);}catch(e){};var Class=function(properties){var klass=function(){return(arguments[0]!==null&&this.initialize&&$type(this.initialize)=='function')?this.initialize.apply(this,arguments):this;};$extend(klass,this);klass.prototype=properties;klass.constructor=Class;return klass;};Class.empty=function(){};Class.prototype={extend:function(properties){var proto=new this(null);for(var property in properties){var pp=proto[property];proto[property]=Class.Merge(pp,properties[property]);}
return new Class(proto);},implement:function(){for(var i=0,l=arguments.length;i<l;i++)$extend(this.prototype,arguments[i]);}};Class.Merge=function(previous,current){if(previous&&previous!=current){var type=$type(current);if(type!=$type(previous))return current;switch(type){case'function':var merged=function(){this.parent=arguments.callee.parent;return current.apply(this,arguments);};merged.parent=previous;return merged;case'object':return $merge(previous,current);}}
return current;};var Chain=new Class({chain:function(fn){this.chains=this.chains||[];this.chains.push(fn);return this;},callChain:function(){if(this.chains&&this.chains.length)this.chains.shift().delay(10,this);},clearChain:function(){this.chains=[];}});var Events=new Class({addEvent:function(type,fn){if(fn!=Class.empty){this.$events=this.$events||{};this.$events[type]=this.$events[type]||[];this.$events[type].include(fn);}
return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);}
return this;},removeEvent:function(type,fn){if(this.$events&&this.$events[type])this.$events[type].remove(fn);return this;}});var Options=new Class({setOptions:function(){this.options=$merge.apply(null,[this.options].extend(arguments));if(this.addEvent){for(var option in this.options){if($type(this.options[option]=='function')&&(/^on[A-Z]/).test(option))this.addEvent(option,this.options[option]);}}
return this;}});Array.extend({forEach:function(fn,bind){for(var i=0,j=this.length;i<j;i++)fn.call(bind,this[i],i,this);},filter:function(fn,bind){var results=[];for(var i=0,j=this.length;i<j;i++){if(fn.call(bind,this[i],i,this))results.push(this[i]);}
return results;},map:function(fn,bind){var results=[];for(var i=0,j=this.length;i<j;i++)results[i]=fn.call(bind,this[i],i,this);return results;},every:function(fn,bind){for(var i=0,j=this.length;i<j;i++){if(!fn.call(bind,this[i],i,this))return false;}
return true;},some:function(fn,bind){for(var i=0,j=this.length;i<j;i++){if(fn.call(bind,this[i],i,this))return true;}
return false;},indexOf:function(item,from){var len=this.length;for(var i=(from<0)?Math.max(0,len+from):from||0;i<len;i++){if(this[i]===item)return i;}
return-1;},copy:function(start,length){start=start||0;if(start<0)start=this.length+start;length=length||(this.length-start);var newArray=[];for(var i=0;i<length;i++)newArray[i]=this[start++];return newArray;},remove:function(item){var i=0;var len=this.length;while(i<len){if(this[i]===item){this.splice(i,1);len--;}else{i++;}}
return this;},contains:function(item,from){return this.indexOf(item,from)!=-1;},associate:function(keys){var obj={},length=Math.min(this.length,keys.length);for(var i=0;i<length;i++)obj[keys[i]]=this[i];return obj;},extend:function(array){for(var i=0,j=array.length;i<j;i++)this.push(array[i]);return this;},merge:function(array){for(var i=0,l=array.length;i<l;i++)this.include(array[i]);return this;},include:function(item){if(!this.contains(item))this.push(item);return this;},getRandom:function(){return this[$random(0,this.length-1)]||null;},getLast:function(){return this[this.length-1]||null;}});Array.prototype.each=Array.prototype.forEach;Array.each=Array.forEach;function $A(array){return Array.copy(array);};function $each(iterable,fn,bind){if(iterable&&typeof iterable.length=='number'&&$type(iterable)!='object'){Array.forEach(iterable,fn,bind);}else{for(var name in iterable)fn.call(bind||iterable,iterable[name],name);}};Array.prototype.test=Array.prototype.contains;String.extend({test:function(regex,params){return(($type(regex)=='string')?new RegExp(regex,params):regex).test(this);},toInt:function(){return parseInt(this,10);},toFloat:function(){return parseFloat(this);},camelCase:function(){return this.replace(/-\D/g,function(match){return match.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/\w[A-Z]/g,function(match){return(match.charAt(0)+'-'+match.charAt(1).toLowerCase());});},capitalize:function(){return this.replace(/\b[a-z]/g,function(match){return match.toUpperCase();});},trim:function(){return this.replace(/^\s+|\s+$/g,'');},clean:function(){return this.replace(/\s{2,}/g,' ').trim();},rgbToHex:function(array){var rgb=this.match(/\d{1,3}/g);return(rgb)?rgb.rgbToHex(array):false;},hexToRgb:function(array){var hex=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(hex)?hex.slice(1).hexToRgb(array):false;},contains:function(string,s){return(s)?(s+this+s).indexOf(s+string+s)>-1:this.indexOf(string)>-1;},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,'\\$1');}});Array.extend({rgbToHex:function(array){if(this.length<3)return false;if(this.length==4&&this[3]==0&&!array)return'transparent';var hex=[];for(var i=0;i<3;i++){var bit=(this[i]-0).toString(16);hex.push((bit.length==1)?'0'+bit:bit);}
return array?hex:'#'+hex.join('');},hexToRgb:function(array){if(this.length!=3)return false;var rgb=[];for(var i=0;i<3;i++){rgb.push(parseInt((this[i].length==1)?this[i]+this[i]:this[i],16));}
return array?rgb:'rgb('+rgb.join(',')+')';}});Function.extend({create:function(options){var fn=this;options=$merge({'bind':fn,'event':false,'arguments':null,'delay':false,'periodical':false,'attempt':false},options);if($chk(options.arguments)&&$type(options.arguments)!='array')options.arguments=[options.arguments];return function(event){var args;if(options.event){event=event||window.event;args=[(options.event===true)?event:new options.event(event)];if(options.arguments)args.extend(options.arguments);}
else args=options.arguments||arguments;var returns=function(){return fn.apply($pick(options.bind,fn),args);};if(options.delay)return setTimeout(returns,options.delay);if(options.periodical)return setInterval(returns,options.periodical);if(options.attempt)try{return returns();}catch(err){return false;};return returns();};},pass:function(args,bind){return this.create({'arguments':args,'bind':bind});},attempt:function(args,bind){return this.create({'arguments':args,'bind':bind,'attempt':true})();},bind:function(bind,args){return this.create({'bind':bind,'arguments':args});},bindAsEventListener:function(bind,args){return this.create({'bind':bind,'event':true,'arguments':args});},delay:function(delay,bind,args){return this.create({'delay':delay,'bind':bind,'arguments':args})();},periodical:function(interval,bind,args){return this.create({'periodical':interval,'bind':bind,'arguments':args})();}});Number.extend({toInt:function(){return parseInt(this);},toFloat:function(){return parseFloat(this);},limit:function(min,max){return Math.min(max,Math.max(min,this));},round:function(precision){precision=Math.pow(10,precision||0);return Math.round(this*precision)/precision;},times:function(fn){for(var i=0;i<this;i++)fn(i);}});var Element=new Class({initialize:function(el,props){if($type(el)=='string'){if(window.ie&&props&&(props.name||props.type)){var name=(props.name)?' name="'+props.name+'"':'';var type=(props.type)?' type="'+props.type+'"':'';delete props.name;delete props.type;el='<'+el+name+type+'>';}
el=document.createElement(el);}
el=$(el);return(!props||!el)?el:el.set(props);}});var Elements=new Class({initialize:function(elements){return(elements)?$extend(elements,this):this;}});Elements.extend=function(props){for(var prop in props){this.prototype[prop]=props[prop];this[prop]=$native.generic(prop);}};function $(el){if(!el)return null;if(el.htmlElement)return Garbage.collect(el);if([window,document].contains(el))return el;var type=$type(el);if(type=='string'){el=document.getElementById(el);type=(el)?'element':false;}
if(type!='element')return null;if(el.htmlElement)return Garbage.collect(el);if(['object','embed'].contains(el.tagName.toLowerCase()))return el;$extend(el,Element.prototype);el.htmlElement=function(){};return Garbage.collect(el);};document.getElementsBySelector=document.getElementsByTagName;function $$(){var elements=[];for(var i=0,j=arguments.length;i<j;i++){var selector=arguments[i];switch($type(selector)){case'element':elements.push(selector);case'boolean':break;case false:break;case'string':selector=document.getElementsBySelector(selector,true);default:elements.extend(selector);}}
return $$.unique(elements);};$$.unique=function(array){var elements=[];for(var i=0,l=array.length;i<l;i++){if(array[i].$included)continue;var element=$(array[i]);if(element&&!element.$included){element.$included=true;elements.push(element);}}
for(var n=0,d=elements.length;n<d;n++)elements[n].$included=null;return new Elements(elements);};Elements.Multi=function(property){return function(){var args=arguments;var items=[];var elements=true;for(var i=0,j=this.length,returns;i<j;i++){returns=this[i][property].apply(this[i],args);if($type(returns)!='element')elements=false;items.push(returns);};return(elements)?$$.unique(items):items;};};Element.extend=function(properties){for(var property in properties){HTMLElement.prototype[property]=properties[property];Element.prototype[property]=properties[property];Element[property]=$native.generic(property);var elementsProperty=(Array.prototype[property])?property+'Elements':property;Elements.prototype[elementsProperty]=Elements.Multi(property);}};Element.extend({set:function(props){for(var prop in props){var val=props[prop];switch(prop){case'styles':this.setStyles(val);break;case'events':if(this.addEvents)this.addEvents(val);break;case'properties':this.setProperties(val);break;default:this.setProperty(prop,val);}}
return this;},inject:function(el,where){el=$(el);switch(where){case'before':el.parentNode.insertBefore(this,el);break;case'after':var next=el.getNext();if(!next)el.parentNode.appendChild(this);else el.parentNode.insertBefore(this,next);break;case'top':var first=el.firstChild;if(first){el.insertBefore(this,first);break;}
default:el.appendChild(this);}
return this;},injectBefore:function(el){return this.inject(el,'before');},injectAfter:function(el){return this.inject(el,'after');},injectInside:function(el){return this.inject(el,'bottom');},injectTop:function(el){return this.inject(el,'top');},adopt:function(){var elements=[];$each(arguments,function(argument){elements=elements.concat(argument);});$$(elements).inject(this);return this;},remove:function(){return this.parentNode.removeChild(this);},clone:function(contents){var el=$(this.cloneNode(contents!==false));if(!el.$events)return el;el.$events={};for(var type in this.$events)el.$events[type]={'keys':$A(this.$events[type].keys),'values':$A(this.$events[type].values)};return el.removeEvents();},replaceWith:function(el){el=$(el);this.parentNode.replaceChild(el,this);return el;},appendText:function(text){this.appendChild(document.createTextNode(text));return this;},hasClass:function(className){return this.className.contains(className,' ');},addClass:function(className){if(!this.hasClass(className))this.className=(this.className+' '+className).clean();return this;},removeClass:function(className){this.className=this.className.replace(new RegExp('(^|\\s)'+className+'(?:\\s|$)'),'$1').clean();return this;},toggleClass:function(className){return this.hasClass(className)?this.removeClass(className):this.addClass(className);},setStyle:function(property,value){switch(property){case'opacity':return this.setOpacity(parseFloat(value));case'float':property=(window.ie)?'styleFloat':'cssFloat';}
property=property.camelCase();switch($type(value)){case'number':if(!['zIndex','zoom'].contains(property))value+='px';break;case'array':value='rgb('+value.join(',')+')';}
this.style[property]=value;return this;},setStyles:function(source){switch($type(source)){case'object':Element.setMany(this,'setStyle',source);break;case'string':this.style.cssText=source;}
return this;},setOpacity:function(opacity){if(opacity==0){if(this.style.visibility!="hidden")this.style.visibility="hidden";}else{if(this.style.visibility!="visible")this.style.visibility="visible";}
if(!this.currentStyle||!this.currentStyle.hasLayout)this.style.zoom=1;if(window.ie)this.style.filter=(opacity==1)?'':"alpha(opacity="+opacity*100+")";this.style.opacity=this.$tmp.opacity=opacity;return this;},getStyle:function(property){property=property.camelCase();var result=this.style[property];if(!$chk(result)){if(property=='opacity')return this.$tmp.opacity;result=[];for(var style in Element.Styles){if(property==style){Element.Styles[style].each(function(s){var style=this.getStyle(s);result.push(parseInt(style)?style:'0px');},this);if(property=='border'){var every=result.every(function(bit){return(bit==result[0]);});return(every)?result[0]:false;}
return result.join(' ');}}
if(property.contains('border')){if(Element.Styles.border.contains(property)){return['Width','Style','Color'].map(function(p){return this.getStyle(property+p);},this).join(' ');}else if(Element.borderShort.contains(property)){return['Top','Right','Bottom','Left'].map(function(p){return this.getStyle('border'+p+property.replace('border',''));},this).join(' ');}}
if(document.defaultView)result=document.defaultView.getComputedStyle(this,null).getPropertyValue(property.hyphenate());else if(this.currentStyle)result=this.currentStyle[property];}
if(window.ie)result=Element.fixStyle(property,result,this);if(result&&property.test(/color/i)&&result.contains('rgb')){return result.split('rgb').splice(1,4).map(function(color){return color.rgbToHex();}).join(' ');}
return result;},getStyles:function(){return Element.getMany(this,'getStyle',arguments);},walk:function(brother,start){brother+='Sibling';var el=(start)?this[start]:this[brother];while(el&&$type(el)!='element')el=el[brother];return $(el);},getPrevious:function(){return this.walk('previous');},getNext:function(){return this.walk('next');},getFirst:function(){return this.walk('next','firstChild');},getLast:function(){return this.walk('previous','lastChild');},getParent:function(){return $(this.parentNode);},getChildren:function(){return $$(this.childNodes);},hasChild:function(el){return!!$A(this.getElementsByTagName('*')).contains(el);},getProperty:function(property){var index=Element.Properties[property];if(index)return this[index];var flag=Element.PropertiesIFlag[property]||0;if(!window.ie||flag)return this.getAttribute(property,flag);var node=this.attributes[property];return(node)?node.nodeValue:null;},removeProperty:function(property){var index=Element.Properties[property];if(index)this[index]='';else this.removeAttribute(property);return this;},getProperties:function(){return Element.getMany(this,'getProperty',arguments);},setProperty:function(property,value){var index=Element.Properties[property];if(index)this[index]=value;else this.setAttribute(property,value);return this;},setProperties:function(source){return Element.setMany(this,'setProperty',source);},setHTML:function(){this.innerHTML=$A(arguments).join('');return this;},setText:function(text){var tag=this.getTag();if(['style','script'].contains(tag)){if(window.ie){if(tag=='style')this.styleSheet.cssText=text;else if(tag=='script')this.setProperty('text',text);return this;}else{this.removeChild(this.firstChild);return this.appendText(text);}}
this[$defined(this.innerText)?'innerText':'textContent']=text;return this;},getText:function(){var tag=this.getTag();if(['style','script'].contains(tag)){if(window.ie){if(tag=='style')return this.styleSheet.cssText;else if(tag=='script')return this.getProperty('text');}else{return this.innerHTML;}}
return($pick(this.innerText,this.textContent));},getTag:function(){return this.tagName.toLowerCase();},empty:function(){Garbage.trash(this.getElementsByTagName('*'));return this.setHTML('');}});Element.fixStyle=function(property,result,element){if($chk(parseInt(result)))return result;if(['height','width'].contains(property)){var values=(property=='width')?['left','right']:['top','bottom'];var size=0;values.each(function(value){size+=element.getStyle('border-'+value+'-width').toInt()+element.getStyle('padding-'+value).toInt();});return element['offset'+property.capitalize()]-size+'px';}else if(property.test(/border(.+)Width|margin|padding/)){return'0px';}
return result;};Element.Styles={'border':[],'padding':[],'margin':[]};['Top','Right','Bottom','Left'].each(function(direction){for(var style in Element.Styles)Element.Styles[style].push(style+direction);});Element.borderShort=['borderWidth','borderStyle','borderColor'];Element.getMany=function(el,method,keys){var result={};$each(keys,function(key){result[key]=el[method](key);});return result;};Element.setMany=function(el,method,pairs){for(var key in pairs)el[method](key,pairs[key]);return el;};Element.Properties=new Abstract({'class':'className','for':'htmlFor','colspan':'colSpan','rowspan':'rowSpan','accesskey':'accessKey','tabindex':'tabIndex','maxlength':'maxLength','readonly':'readOnly','frameborder':'frameBorder','value':'value','disabled':'disabled','checked':'checked','multiple':'multiple','selected':'selected'});Element.PropertiesIFlag={'href':2,'src':2};Element.Methods={Listeners:{addListener:function(type,fn){if(this.addEventListener)this.addEventListener(type,fn,false);else this.attachEvent('on'+type,fn);return this;},removeListener:function(type,fn){if(this.removeEventListener)this.removeEventListener(type,fn,false);else this.detachEvent('on'+type,fn);return this;}}};window.extend(Element.Methods.Listeners);document.extend(Element.Methods.Listeners);Element.extend(Element.Methods.Listeners);var Garbage={elements:[],collect:function(el){if(!el.$tmp){Garbage.elements.push(el);el.$tmp={'opacity':1};}
return el;},trash:function(elements){for(var i=0,j=elements.length,el;i<j;i++){if(!(el=elements[i])||!el.$tmp)continue;if(el.$events)el.fireEvent('trash').removeEvents();for(var p in el.$tmp)el.$tmp[p]=null;for(var d in Element.prototype)el[d]=null;Garbage.elements[Garbage.elements.indexOf(el)]=null;el.htmlElement=el.$tmp=el=null;}
Garbage.elements.remove(null);},empty:function(){Garbage.collect(window);Garbage.collect(document);Garbage.trash(Garbage.elements);}};window.addListener('beforeunload',function(){window.addListener('unload',Garbage.empty);if(window.ie)window.addListener('unload',CollectGarbage);});var Event=new Class({initialize:function(event){if(event&&event.$extended)return event;this.$extended=true;event=event||window.event;this.event=event;this.type=event.type;this.target=event.target||event.srcElement;if(this.target.nodeType==3)this.target=this.target.parentNode;this.shift=event.shiftKey;this.control=event.ctrlKey;this.alt=event.altKey;this.meta=event.metaKey;if(['DOMMouseScroll','mousewheel'].contains(this.type)){this.wheel=(event.wheelDelta)?event.wheelDelta/120:-(event.detail||0)/3;}else if(this.type.contains('key')){this.code=event.which||event.keyCode;for(var name in Event.keys){if(Event.keys[name]==this.code){this.key=name;break;}}
if(this.type=='keydown'){var fKey=this.code-111;if(fKey>0&&fKey<13)this.key='f'+fKey;}
this.key=this.key||String.fromCharCode(this.code).toLowerCase();}else if(this.type.test(/(click|mouse|menu)/)){this.page={'x':event.pageX||event.clientX+document.documentElement.scrollLeft,'y':event.pageY||event.clientY+document.documentElement.scrollTop};this.client={'x':event.pageX?event.pageX-window.pageXOffset:event.clientX,'y':event.pageY?event.pageY-window.pageYOffset:event.clientY};this.rightClick=(event.which==3)||(event.button==2);switch(this.type){case'mouseover':this.relatedTarget=event.relatedTarget||event.fromElement;break;case'mouseout':this.relatedTarget=event.relatedTarget||event.toElement;}
this.fixRelatedTarget();}
return this;},stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this;},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this;}});Event.fix={relatedTarget:function(){if(this.relatedTarget&&this.relatedTarget.nodeType==3)this.relatedTarget=this.relatedTarget.parentNode;},relatedTargetGecko:function(){try{Event.fix.relatedTarget.call(this);}catch(e){this.relatedTarget=this.target;}}};Event.prototype.fixRelatedTarget=(window.gecko)?Event.fix.relatedTargetGecko:Event.fix.relatedTarget;Event.keys=new Abstract({'enter':13,'up':38,'down':40,'left':37,'right':39,'esc':27,'space':32,'backspace':8,'tab':9,'delete':46});Element.Methods.Events={addEvent:function(type,fn){this.$events=this.$events||{};this.$events[type]=this.$events[type]||{'keys':[],'values':[]};if(this.$events[type].keys.contains(fn))return this;this.$events[type].keys.push(fn);var realType=type;var custom=Element.Events[type];if(custom){if(custom.add)custom.add.call(this,fn);if(custom.map)fn=custom.map;if(custom.type)realType=custom.type;}
if(!this.addEventListener)fn=fn.create({'bind':this,'event':true});this.$events[type].values.push(fn);return(Element.NativeEvents.contains(realType))?this.addListener(realType,fn):this;},removeEvent:function(type,fn){if(!this.$events||!this.$events[type])return this;var pos=this.$events[type].keys.indexOf(fn);if(pos==-1)return this;var key=this.$events[type].keys.splice(pos,1)[0];var value=this.$events[type].values.splice(pos,1)[0];var custom=Element.Events[type];if(custom){if(custom.remove)custom.remove.call(this,fn);if(custom.type)type=custom.type;}
return(Element.NativeEvents.contains(type))?this.removeListener(type,value):this;},addEvents:function(source){return Element.setMany(this,'addEvent',source);},removeEvents:function(type){if(!this.$events)return this;if(!type){for(var evType in this.$events)this.removeEvents(evType);this.$events=null;}else if(this.$events[type]){this.$events[type].keys.each(function(fn){this.removeEvent(type,fn);},this);this.$events[type]=null;}
return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].keys.each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);}
return this;},cloneEvents:function(from,type){if(!from.$events)return this;if(!type){for(var evType in from.$events)this.cloneEvents(from,evType);}else if(from.$events[type]){from.$events[type].keys.each(function(fn){this.addEvent(type,fn);},this);}
return this;}};window.extend(Element.Methods.Events);document.extend(Element.Methods.Events);Element.extend(Element.Methods.Events);Element.Events=new Abstract({'mouseenter':{type:'mouseover',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseenter',event);}},'mouseleave':{type:'mouseout',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseleave',event);}},'mousewheel':{type:(window.gecko)?'DOMMouseScroll':'mousewheel'}});Element.NativeEvents=['click','dblclick','mouseup','mousedown','mousewheel','DOMMouseScroll','mouseover','mouseout','mousemove','keydown','keypress','keyup','load','unload','beforeunload','resize','move','focus','blur','change','submit','reset','select','error','abort','contextmenu','scroll'];Function.extend({bindWithEvent:function(bind,args){return this.create({'bind':bind,'arguments':args,'event':Event});}});Elements.extend({filterByTag:function(tag){return new Elements(this.filter(function(el){return(Element.getTag(el)==tag);}));},filterByClass:function(className,nocash){var elements=this.filter(function(el){return(el.className&&el.className.contains(className,' '));});return(nocash)?elements:new Elements(elements);},filterById:function(id,nocash){var elements=this.filter(function(el){return(el.id==id);});return(nocash)?elements:new Elements(elements);},filterByAttribute:function(name,operator,value,nocash){var elements=this.filter(function(el){var current=Element.getProperty(el,name);if(!current)return false;if(!operator)return true;switch(operator){case'=':return(current==value);case'*=':return(current.contains(value));case'^=':return(current.substr(0,value.length)==value);case'$=':return(current.substr(current.length-value.length)==value);case'!=':return(current!=value);case'~=':return current.contains(value,' ');}
return false;});return(nocash)?elements:new Elements(elements);}});function $E(selector,filter){return($(filter)||document).getElement(selector);};function $ES(selector,filter){return($(filter)||document).getElementsBySelector(selector);};$$.shared={'regexp':/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([!*^$]?=)["']?([^"'\]]*)["']?)?])?$/,'xpath':{getParam:function(items,context,param,i){var temp=[context.namespaceURI?'xhtml:':'',param[1]];if(param[2])temp.push('[@id="',param[2],'"]');if(param[3])temp.push('[contains(concat(" ", @class, " "), " ',param[3],' ")]');if(param[4]){if(param[5]&&param[6]){switch(param[5]){case'*=':temp.push('[contains(@',param[4],', "',param[6],'")]');break;case'^=':temp.push('[starts-with(@',param[4],', "',param[6],'")]');break;case'$=':temp.push('[substring(@',param[4],', string-length(@',param[4],') - ',param[6].length,' + 1) = "',param[6],'"]');break;case'=':temp.push('[@',param[4],'="',param[6],'"]');break;case'!=':temp.push('[@',param[4],'!="',param[6],'"]');}}else{temp.push('[@',param[4],']');}}
items.push(temp.join(''));return items;},getItems:function(items,context,nocash){var elements=[];var xpath=document.evaluate('.//'+items.join('//'),context,$$.shared.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,j=xpath.snapshotLength;i<j;i++)elements.push(xpath.snapshotItem(i));return(nocash)?elements:new Elements(elements.map($));}},'normal':{getParam:function(items,context,param,i){if(i==0){if(param[2]){var el=context.getElementById(param[2]);if(!el||((param[1]!='*')&&(Element.getTag(el)!=param[1])))return false;items=[el];}else{items=$A(context.getElementsByTagName(param[1]));}}else{items=$$.shared.getElementsByTagName(items,param[1]);if(param[2])items=Elements.filterById(items,param[2],true);}
if(param[3])items=Elements.filterByClass(items,param[3],true);if(param[4])items=Elements.filterByAttribute(items,param[4],param[5],param[6],true);return items;},getItems:function(items,context,nocash){return(nocash)?items:$$.unique(items);}},resolver:function(prefix){return(prefix=='xhtml')?'http://www.w3.org/1999/xhtml':false;},getElementsByTagName:function(context,tagName){var found=[];for(var i=0,j=context.length;i<j;i++)found.extend(context[i].getElementsByTagName(tagName));return found;}};$$.shared.method=(window.xpath)?'xpath':'normal';Element.Methods.Dom={getElements:function(selector,nocash){var items=[];selector=selector.trim().split(' ');for(var i=0,j=selector.length;i<j;i++){var sel=selector[i];var param=sel.match($$.shared.regexp);if(!param)break;param[1]=param[1]||'*';var temp=$$.shared[$$.shared.method].getParam(items,this,param,i);if(!temp)break;items=temp;}
return $$.shared[$$.shared.method].getItems(items,this,nocash);},getElement:function(selector){return $(this.getElements(selector,true)[0]||false);},getElementsBySelector:function(selector,nocash){var elements=[];selector=selector.split(',');for(var i=0,j=selector.length;i<j;i++)elements=elements.concat(this.getElements(selector[i],true));return(nocash)?elements:$$.unique(elements);}};Element.extend({getElementById:function(id){var el=document.getElementById(id);if(!el)return false;for(var parent=el.parentNode;parent!=this;parent=parent.parentNode){if(!parent)return false;}
return el;},getElementsByClassName:function(className){return this.getElements('.'+className);}});document.extend(Element.Methods.Dom);Element.extend(Element.Methods.Dom);Element.extend({getValue:function(){switch(this.getTag()){case'select':var values=[];$each(this.options,function(option){if(option.selected)values.push($pick(option.value,option.text));});return(this.multiple)?values:values[0];case'input':if(!(this.checked&&['checkbox','radio'].contains(this.type))&&!['hidden','text','password'].contains(this.type))break;case'textarea':return this.value;}
return false;},getFormElements:function(){return $$(this.getElementsByTagName('input'),this.getElementsByTagName('select'),this.getElementsByTagName('textarea'));},toQueryString:function(){var queryString=[];this.getFormElements().each(function(el){var name=el.name;var value=el.getValue();if(value===false||!name||el.disabled)return;var qs=function(val){queryString.push(name+'='+encodeURIComponent(val));};if($type(value)=='array')value.each(qs);else qs(value);});return queryString.join('&');}});Element.extend({scrollTo:function(x,y){this.scrollLeft=x;this.scrollTop=y;},getSize:function(){return{'scroll':{'x':this.scrollLeft,'y':this.scrollTop},'size':{'x':this.offsetWidth,'y':this.offsetHeight},'scrollSize':{'x':this.scrollWidth,'y':this.scrollHeight}};},getPosition:function(overflown){overflown=overflown||[];var el=this,left=0,top=0;do{left+=el.offsetLeft||0;top+=el.offsetTop||0;el=el.offsetParent;}while(el);overflown.each(function(element){left-=element.scrollLeft||0;top-=element.scrollTop||0;});return{'x':left,'y':top};},getTop:function(overflown){return this.getPosition(overflown).y;},getLeft:function(overflown){return this.getPosition(overflown).x;},getCoordinates:function(overflown){var position=this.getPosition(overflown);var obj={'width':this.offsetWidth,'height':this.offsetHeight,'left':position.x,'top':position.y};obj.right=obj.left+obj.width;obj.bottom=obj.top+obj.height;return obj;}});Element.Events.domready={add:function(fn){if(window.loaded){fn.call(this);return;}
var domReady=function(){if(window.loaded)return;window.loaded=true;window.timer=$clear(window.timer);this.fireEvent('domready');}.bind(this);if(document.readyState&&window.webkit){window.timer=function(){if(['loaded','complete'].contains(document.readyState))domReady();}.periodical(50);}else if(document.readyState&&window.ie){if(!$('ie_ready')){var src=(window.location.protocol=='https:')?'://0':'javascript:void(0)';document.write('<script id="ie_ready" defer src="'+src+'"><\/script>');$('ie_ready').onreadystatechange=function(){if(this.readyState=='complete')domReady();};}}else{window.addListener("load",domReady);document.addListener("DOMContentLoaded",domReady);}}};window.onDomReady=function(fn){return this.addEvent('domready',fn);};window.extend({getWidth:function(){if(this.webkit419)return this.innerWidth;if(this.opera)return document.body.clientWidth;return document.documentElement.clientWidth;},getHeight:function(){if(this.webkit419)return this.innerHeight;if(this.opera)return document.body.clientHeight;return document.documentElement.clientHeight;},getScrollWidth:function(){if(this.ie)return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth);if(this.webkit)return document.body.scrollWidth;return document.documentElement.scrollWidth;},getScrollHeight:function(){if(this.ie)return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight);if(this.webkit)return document.body.scrollHeight;return document.documentElement.scrollHeight;},getScrollLeft:function(){return this.pageXOffset||document.documentElement.scrollLeft;},getScrollTop:function(){return this.pageYOffset||document.documentElement.scrollTop;},getSize:function(){return{'size':{'x':this.getWidth(),'y':this.getHeight()},'scrollSize':{'x':this.getScrollWidth(),'y':this.getScrollHeight()},'scroll':{'x':this.getScrollLeft(),'y':this.getScrollTop()}};},getPosition:function(){return{'x':0,'y':0};}});var Fx={};Fx.Base=new Class({options:{onStart:Class.empty,onComplete:Class.empty,onCancel:Class.empty,transition:function(p){return-(Math.cos(Math.PI*p)-1)/2;},duration:500,unit:'px',wait:true,fps:50},initialize:function(options){this.element=this.element||null;this.setOptions(options);if(this.options.initialize)this.options.initialize.call(this);},step:function(){var time=$time();if(time<this.time+this.options.duration){this.delta=this.options.transition((time-this.time)/this.options.duration);this.setNow();this.increase();}else{this.stop(true);this.set(this.to);this.fireEvent('onComplete',this.element,10);this.callChain();}},set:function(to){this.now=to;this.increase();return this;},setNow:function(){this.now=this.compute(this.from,this.to);},compute:function(from,to){return(to-from)*this.delta+from;},start:function(from,to){if(!this.options.wait)this.stop();else if(this.timer)return this;this.from=from;this.to=to;this.change=this.to-this.from;this.time=$time();this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);this.fireEvent('onStart',this.element);return this;},stop:function(end){if(!this.timer)return this;this.timer=$clear(this.timer);if(!end)this.fireEvent('onCancel',this.element);return this;},custom:function(from,to){return this.start(from,to);},clearTimer:function(end){return this.stop(end);}});Fx.Base.implement(new Chain,new Events,new Options);Fx.CSS={select:function(property,to){if(property.test(/color/i))return this.Color;var type=$type(to);if((type=='array')||(type=='string'&&to.contains(' ')))return this.Multi;return this.Single;},parse:function(el,property,fromTo){if(!fromTo.push)fromTo=[fromTo];var from=fromTo[0],to=fromTo[1];if(!$chk(to)){to=from;from=el.getStyle(property);}
var css=this.select(property,to);return{'from':css.parse(from),'to':css.parse(to),'css':css};}};Fx.CSS.Single={parse:function(value){return parseFloat(value);},getNow:function(from,to,fx){return fx.compute(from,to);},getValue:function(value,unit,property){if(unit=='px'&&property!='opacity')value=Math.round(value);return value+unit;}};Fx.CSS.Multi={parse:function(value){return value.push?value:value.split(' ').map(function(v){return parseFloat(v);});},getNow:function(from,to,fx){var now=[];for(var i=0;i<from.length;i++)now[i]=fx.compute(from[i],to[i]);return now;},getValue:function(value,unit,property){if(unit=='px'&&property!='opacity')value=value.map(Math.round);return value.join(unit+' ')+unit;}};Fx.CSS.Color={parse:function(value){return value.push?value:value.hexToRgb(true);},getNow:function(from,to,fx){var now=[];for(var i=0;i<from.length;i++)now[i]=Math.round(fx.compute(from[i],to[i]));return now;},getValue:function(value){return'rgb('+value.join(',')+')';}};Fx.Style=Fx.Base.extend({initialize:function(el,property,options){this.element=$(el);this.property=property;this.parent(options);},hide:function(){return this.set(0);},setNow:function(){this.now=this.css.getNow(this.from,this.to,this);},set:function(to){this.css=Fx.CSS.select(this.property,to);return this.parent(this.css.parse(to));},start:function(from,to){if(this.timer&&this.options.wait)return this;var parsed=Fx.CSS.parse(this.element,this.property,[from,to]);this.css=parsed.css;return this.parent(parsed.from,parsed.to);},increase:function(){this.element.setStyle(this.property,this.css.getValue(this.now,this.options.unit,this.property));}});Element.extend({effect:function(property,options){return new Fx.Style(this,property,options);}});Fx.Styles=Fx.Base.extend({initialize:function(el,options){this.element=$(el);this.parent(options);},setNow:function(){for(var p in this.from)this.now[p]=this.css[p].getNow(this.from[p],this.to[p],this);},set:function(to){var parsed={};this.css={};for(var p in to){this.css[p]=Fx.CSS.select(p,to[p]);parsed[p]=this.css[p].parse(to[p]);}
return this.parent(parsed);},start:function(obj){if(this.timer&&this.options.wait)return this;this.now={};this.css={};var from={},to={};for(var p in obj){var parsed=Fx.CSS.parse(this.element,p,obj[p]);from[p]=parsed.from;to[p]=parsed.to;this.css[p]=parsed.css;}
return this.parent(from,to);},increase:function(){for(var p in this.now)this.element.setStyle(p,this.css[p].getValue(this.now[p],this.options.unit,p));}});Element.extend({effects:function(options){return new Fx.Styles(this,options);}});Fx.Elements=Fx.Base.extend({initialize:function(elements,options){this.elements=$$(elements);this.parent(options);},setNow:function(){for(var i in this.from){var iFrom=this.from[i],iTo=this.to[i],iCss=this.css[i],iNow=this.now[i]={};for(var p in iFrom)iNow[p]=iCss[p].getNow(iFrom[p],iTo[p],this);}},set:function(to){var parsed={};this.css={};for(var i in to){var iTo=to[i],iCss=this.css[i]={},iParsed=parsed[i]={};for(var p in iTo){iCss[p]=Fx.CSS.select(p,iTo[p]);iParsed[p]=iCss[p].parse(iTo[p]);}}
return this.parent(parsed);},start:function(obj){if(this.timer&&this.options.wait)return this;this.now={};this.css={};var from={},to={};for(var i in obj){var iProps=obj[i],iFrom=from[i]={},iTo=to[i]={},iCss=this.css[i]={};for(var p in iProps){var parsed=Fx.CSS.parse(this.elements[i],p,iProps[p]);iFrom[p]=parsed.from;iTo[p]=parsed.to;iCss[p]=parsed.css;}}
return this.parent(from,to);},increase:function(){for(var i in this.now){var iNow=this.now[i],iCss=this.css[i];for(var p in iNow)this.elements[i].setStyle(p,iCss[p].getValue(iNow[p],this.options.unit,p));}}});Fx.Scroll=Fx.Base.extend({options:{overflown:[],offset:{'x':0,'y':0},wheelStops:true},initialize:function(element,options){this.now=[];this.element=$(element);this.bound={'stop':this.stop.bind(this,false)};this.parent(options);if(this.options.wheelStops){this.addEvent('onStart',function(){document.addEvent('mousewheel',this.bound.stop);}.bind(this));this.addEvent('onComplete',function(){document.removeEvent('mousewheel',this.bound.stop);}.bind(this));}},setNow:function(){for(var i=0;i<2;i++)this.now[i]=this.compute(this.from[i],this.to[i]);},scrollTo:function(x,y){if(this.timer&&this.options.wait)return this;var el=this.element.getSize();var values={'x':x,'y':y};for(var z in el.size){var max=el.scrollSize[z]-el.size[z];if($chk(values[z]))values[z]=($type(values[z])=='number')?values[z].limit(0,max):max;else values[z]=el.scroll[z];values[z]+=this.options.offset[z];}
return this.start([el.scroll.x,el.scroll.y],[values.x,values.y]);},toTop:function(){return this.scrollTo(false,0);},toBottom:function(){return this.scrollTo(false,'full');},toLeft:function(){return this.scrollTo(0,false);},toRight:function(){return this.scrollTo('full',false);},toElement:function(el){var parent=this.element.getPosition(this.options.overflown);var target=$(el).getPosition(this.options.overflown);return this.scrollTo(target.x-parent.x,target.y-parent.y);},increase:function(){this.element.scrollTo(this.now[0],this.now[1]);}});Fx.Slide=Fx.Base.extend({options:{mode:'vertical'},initialize:function(el,options){this.element=$(el);this.wrapper=new Element('div',{'styles':$extend(this.element.getStyles('margin'),{'overflow':'hidden'})}).injectAfter(this.element).adopt(this.element);this.element.setStyle('margin',0);this.setOptions(options);this.now=[];this.parent(this.options);this.open=true;this.addEvent('onComplete',function(){this.open=(this.now[0]===0);});if(window.webkit419)this.addEvent('onComplete',function(){if(this.open)this.element.remove().inject(this.wrapper);});},setNow:function(){for(var i=0;i<2;i++)this.now[i]=this.compute(this.from[i],this.to[i]);},vertical:function(){this.margin='margin-top';this.layout='height';this.offset=this.element.offsetHeight;},horizontal:function(){this.margin='margin-left';this.layout='width';this.offset=this.element.offsetWidth;},slideIn:function(mode){this[mode||this.options.mode]();return this.start([this.element.getStyle(this.margin).toInt(),this.wrapper.getStyle(this.layout).toInt()],[0,this.offset]);},slideOut:function(mode){this[mode||this.options.mode]();return this.start([this.element.getStyle(this.margin).toInt(),this.wrapper.getStyle(this.layout).toInt()],[-this.offset,0]);},hide:function(mode){this[mode||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(mode){this[mode||this.options.mode]();this.open=true;return this.set([0,this.offset]);},toggle:function(mode){if(this.wrapper.offsetHeight==0||this.wrapper.offsetWidth==0)return this.slideIn(mode);return this.slideOut(mode);},increase:function(){this.element.setStyle(this.margin,this.now[0]+this.options.unit);this.wrapper.setStyle(this.layout,this.now[1]+this.options.unit);}});Fx.Transition=function(transition,params){params=params||[];if($type(params)!='array')params=[params];return $extend(transition,{easeIn:function(pos){return transition(pos,params);},easeOut:function(pos){return 1-transition(1-pos,params);},easeInOut:function(pos){return(pos<=0.5)?transition(2*pos,params)/2:(2-transition(2*(1-pos),params))/2;}});};Fx.Transitions=new Abstract({linear:function(p){return p;}});Fx.Transitions.extend=function(transitions){for(var transition in transitions){Fx.Transitions[transition]=new Fx.Transition(transitions[transition]);Fx.Transitions.compat(transition);}};Fx.Transitions.compat=function(transition){['In','Out','InOut'].each(function(easeType){Fx.Transitions[transition.toLowerCase()+easeType]=Fx.Transitions[transition]['ease'+easeType];});};Fx.Transitions.extend({Pow:function(p,x){return Math.pow(p,x[0]||6);},Expo:function(p){return Math.pow(2,8*(p-1));},Circ:function(p){return 1-Math.sin(Math.acos(p));},Sine:function(p){return 1-Math.sin((1-p)*Math.PI/2);},Back:function(p,x){x=x[0]||1.618;return Math.pow(p,2)*((x+1)*p-x);},Bounce:function(p){var value;for(var a=0,b=1;1;a+=b,b/=2){if(p>=(7-4*a)/11){value=-Math.pow((11-6*a-11*p)/4,2)+b*b;break;}}
return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/3);}});['Quad','Cubic','Quart','Quint'].each(function(transition,i){Fx.Transitions[transition]=new Fx.Transition(function(p){return Math.pow(p,[i+2]);});Fx.Transitions.compat(transition);});var Drag={};Drag.Base=new Class({options:{handle:false,unit:'px',onStart:Class.empty,onBeforeStart:Class.empty,onComplete:Class.empty,onSnap:Class.empty,onDrag:Class.empty,limit:false,modifiers:{x:'left',y:'top'},grid:false,snap:6},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.handle=$(this.options.handle)||this.element;this.mouse={'now':{},'pos':{}};this.value={'start':{},'now':{}};this.bound={'start':this.start.bindWithEvent(this),'check':this.check.bindWithEvent(this),'drag':this.drag.bindWithEvent(this),'stop':this.stop.bind(this)};this.attach();if(this.options.initialize)this.options.initialize.call(this);},attach:function(){this.handle.addEvent('mousedown',this.bound.start);return this;},detach:function(){this.handle.removeEvent('mousedown',this.bound.start);return this;},start:function(event){this.fireEvent('onBeforeStart',this.element);this.mouse.start=event.page;var limit=this.options.limit;this.limit={'x':[],'y':[]};for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.element.getStyle(this.options.modifiers[z]).toInt();this.mouse.pos[z]=event.page[z]-this.value.now[z];if(limit&&limit[z]){for(var i=0;i<2;i++){if($chk(limit[z][i]))this.limit[z][i]=($type(limit[z][i])=='function')?limit[z][i]():limit[z][i];}}}
if($type(this.options.grid)=='number')this.options.grid={'x':this.options.grid,'y':this.options.grid};document.addListener('mousemove',this.bound.check);document.addListener('mouseup',this.bound.stop);this.fireEvent('onStart',this.element);event.stop();},check:function(event){var distance=Math.round(Math.sqrt(Math.pow(event.page.x-this.mouse.start.x,2)+Math.pow(event.page.y-this.mouse.start.y,2)));if(distance>this.options.snap){document.removeListener('mousemove',this.bound.check);document.addListener('mousemove',this.bound.drag);this.drag(event);this.fireEvent('onSnap',this.element);}
event.stop();},drag:function(event){this.out=false;this.mouse.now=event.page;for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.mouse.now[z]-this.mouse.pos[z];if(this.limit[z]){if($chk(this.limit[z][1])&&(this.value.now[z]>this.limit[z][1])){this.value.now[z]=this.limit[z][1];this.out=true;}else if($chk(this.limit[z][0])&&(this.value.now[z]<this.limit[z][0])){this.value.now[z]=this.limit[z][0];this.out=true;}}
if(this.options.grid[z])this.value.now[z]-=(this.value.now[z]%this.options.grid[z]);this.element.setStyle(this.options.modifiers[z],this.value.now[z]+this.options.unit);}
this.fireEvent('onDrag',this.element);event.stop();},stop:function(){document.removeListener('mousemove',this.bound.check);document.removeListener('mousemove',this.bound.drag);document.removeListener('mouseup',this.bound.stop);this.fireEvent('onComplete',this.element);}});Drag.Base.implement(new Events,new Options);Element.extend({makeResizable:function(options){return new Drag.Base(this,$merge({modifiers:{x:'width',y:'height'}},options));}});Drag.Move=Drag.Base.extend({options:{droppables:[],container:false,overflown:[]},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.droppables=$$(this.options.droppables);this.container=$(this.options.container);this.position={'element':this.element.getStyle('position'),'container':false};if(this.container)this.position.container=this.container.getStyle('position');if(!['relative','absolute','fixed'].contains(this.position.element))this.position.element='absolute';var top=this.element.getStyle('top').toInt();var left=this.element.getStyle('left').toInt();if(this.position.element=='absolute'&&!['relative','absolute','fixed'].contains(this.position.container)){top=$chk(top)?top:this.element.getTop(this.options.overflown);left=$chk(left)?left:this.element.getLeft(this.options.overflown);}else{top=$chk(top)?top:0;left=$chk(left)?left:0;}
this.element.setStyles({'top':top,'left':left,'position':this.position.element});this.parent(this.element);},start:function(event){this.overed=null;if(this.container){var cont=this.container.getCoordinates();var el=this.element.getCoordinates();if(this.position.element=='absolute'&&!['relative','absolute','fixed'].contains(this.position.container)){this.options.limit={'x':[cont.left,cont.right-el.width],'y':[cont.top,cont.bottom-el.height]};}else{this.options.limit={'y':[0,cont.height-el.height],'x':[0,cont.width-el.width]};}}
this.parent(event);},drag:function(event){this.parent(event);var overed=this.out?false:this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=overed){if(this.overed)this.overed.fireEvent('leave',[this.element,this]);this.overed=overed?overed.fireEvent('over',[this.element,this]):null;}
return this;},checkAgainst:function(el){el=el.getCoordinates(this.options.overflown);var now=this.mouse.now;return(now.x>el.left&&now.x<el.right&&now.y<el.bottom&&now.y>el.top);},stop:function(){if(this.overed&&!this.out)this.overed.fireEvent('drop',[this.element,this]);else this.element.fireEvent('emptydrop',this);this.parent();return this;}});Element.extend({makeDraggable:function(options){return new Drag.Move(this,options);}});var XHR=new Class({options:{method:'post',async:true,onRequest:Class.empty,onSuccess:Class.empty,onFailure:Class.empty,urlEncoded:true,encoding:'utf-8',autoCancel:false,headers:{}},setTransport:function(){this.transport=(window.XMLHttpRequest)?new XMLHttpRequest():(window.ie?new ActiveXObject('Microsoft.XMLHTTP'):false);return this;},initialize:function(options){this.setTransport().setOptions(options);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers={};if(this.options.urlEncoded&&this.options.method=='post'){var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';this.setHeader('Content-type','application/x-www-form-urlencoded'+encoding);}
if(this.options.initialize)this.options.initialize.call(this);},onStateChange:function(){if(this.transport.readyState!=4||!this.running)return;this.running=false;var status=0;try{status=this.transport.status;}catch(e){};if(this.options.isSuccess.call(this,status))this.onSuccess();else this.onFailure();this.transport.onreadystatechange=Class.empty;},isSuccess:function(status){return((status>=200)&&(status<300));},onSuccess:function(){this.response={'text':this.transport.responseText,'xml':this.transport.responseXML};this.fireEvent('onSuccess',[this.response.text,this.response.xml]);this.callChain();},onFailure:function(){this.fireEvent('onFailure',this.transport);},setHeader:function(name,value){this.headers[name]=value;return this;},send:function(url,data){if(this.options.autoCancel)this.cancel();else if(this.running)return this;this.running=true;if(data&&this.options.method=='get'){url=url+(url.contains('?')?'&':'?')+data;data=null;}
this.transport.open(this.options.method.toUpperCase(),url,this.options.async);this.transport.onreadystatechange=this.onStateChange.bind(this);if((this.options.method=='post')&&this.transport.overrideMimeType)this.setHeader('Connection','close');$extend(this.headers,this.options.headers);for(var type in this.headers)try{this.transport.setRequestHeader(type,this.headers[type]);}catch(e){};this.fireEvent('onRequest');this.transport.send($pick(data,null));return this;},cancel:function(){if(!this.running)return this;this.running=false;this.transport.abort();this.transport.onreadystatechange=Class.empty;this.setTransport();this.fireEvent('onCancel');return this;}});XHR.implement(new Chain,new Events,new Options);var Ajax=XHR.extend({options:{data:null,update:null,onComplete:Class.empty,evalScripts:false,evalResponse:false},initialize:function(url,options){this.addEvent('onSuccess',this.onComplete);this.setOptions(options);this.options.data=this.options.data||this.options.postBody;if(!['post','get'].contains(this.options.method)){this._method='_method='+this.options.method;this.options.method='post';}
this.parent();this.setHeader('X-Requested-With','XMLHttpRequest');this.setHeader('Accept','text/javascript, text/html, application/xml, text/xml, */*');this.url=url;},onComplete:function(){if(this.options.update)$(this.options.update).empty().setHTML(this.response.text);if(this.options.evalScripts||this.options.evalResponse)this.evalScripts();this.fireEvent('onComplete',[this.response.text,this.response.xml],20);},request:function(data){data=data||this.options.data;switch($type(data)){case'element':data=$(data).toQueryString();break;case'object':data=Object.toQueryString(data);}
if(this._method)data=(data)?[this._method,data].join('&'):this._method;return this.send(this.url,data);},evalScripts:function(){var script,scripts;if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))scripts=this.response.text;else{scripts=[];var regexp=/<script[^>]*>([\s\S]*?)<\/script>/gi;while((script=regexp.exec(this.response.text)))scripts.push(script[1]);scripts=scripts.join('\n');}
if(scripts)(window.execScript)?window.execScript(scripts):window.setTimeout(scripts,0);},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){};return null;}});Object.toQueryString=function(source){var queryString=[];for(var property in source)queryString.push(encodeURIComponent(property)+'='+encodeURIComponent(source[property]));return queryString.join('&');};Element.extend({send:function(options){return new Ajax(this.getProperty('action'),$merge({data:this.toQueryString()},options,{method:'post'})).request();}});var Cookie=new Abstract({options:{domain:false,path:false,duration:false,secure:false},set:function(key,value,options){options=$merge(this.options,options);value=encodeURIComponent(value);if(options.domain)value+='; domain='+options.domain;if(options.path)value+='; path='+options.path;if(options.duration){var date=new Date();date.setTime(date.getTime()+options.duration*24*60*60*1000);value+='; expires='+date.toGMTString();}
if(options.secure)value+='; secure';document.cookie=key+'='+value;return $extend(options,{'key':key,'value':value});},get:function(key){var value=document.cookie.match('(?:^|;)\\s*'+key.escapeRegExp()+'=([^;]*)');return value?decodeURIComponent(value[1]):false;},remove:function(cookie,options){if($type(cookie)=='object')this.set(cookie.key,'',$merge(cookie,{duration:-1}));else this.set(cookie,'',$merge(options,{duration:-1}));}});var Json={toString:function(obj){switch($type(obj)){case'string':return'"'+obj.replace(/(["\\])/g,'\\$1')+'"';case'array':return'['+obj.map(Json.toString).join(',')+']';case'object':var string=[];for(var property in obj)string.push(Json.toString(property)+':'+Json.toString(obj[property]));return'{'+string.join(',')+'}';case'number':if(isFinite(obj))break;case false:return'null';}
return String(obj);},evaluate:function(str,secure){return(($type(str)!='string')||(secure&&!str.test(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/)))?null:eval('('+str+')');}};Json.Remote=XHR.extend({initialize:function(url,options){this.url=url;this.addEvent('onSuccess',this.onComplete);this.parent(options);this.setHeader('X-Request','JSON');},send:function(obj){return this.parent(this.url,'json='+Json.toString(obj));},onComplete:function(){this.fireEvent('onComplete',[Json.evaluate(this.response.text,this.options.secure)]);}});var Asset=new Abstract({javascript:function(source,properties){properties=$merge({'onload':Class.empty},properties);var script=new Element('script',{'src':source}).addEvents({'load':properties.onload,'readystatechange':function(){if(this.readyState=='complete')this.fireEvent('load');}});delete properties.onload;return script.setProperties(properties).inject(document.head);},css:function(source,properties){return new Element('link',$merge({'rel':'stylesheet','media':'screen','type':'text/css','href':source},properties)).inject(document.head);},image:function(source,properties){properties=$merge({'onload':Class.empty,'onabort':Class.empty,'onerror':Class.empty},properties);var image=new Image();image.src=source;var element=new Element('img',{'src':source});['load','abort','error'].each(function(type){var event=properties['on'+type];delete properties['on'+type];element.addEvent(type,function(){this.removeEvent(type,arguments.callee);event.call(this);});});if(image.width&&image.height)element.fireEvent('load',element,1);return element.setProperties(properties);},images:function(sources,options){options=$merge({onComplete:Class.empty,onProgress:Class.empty},options);if(!sources.push)sources=[sources];var images=[];var counter=0;sources.each(function(source){var img=new Asset.image(source,{'onload':function(){options.onProgress.call(this,counter);counter++;if(counter==sources.length)options.onComplete();}});images.push(img);});return new Elements(images);}});var Hash=new Class({length:0,initialize:function(object){this.obj=object||{};this.setLength();},get:function(key){return(this.hasKey(key))?this.obj[key]:null;},hasKey:function(key){return(key in this.obj);},set:function(key,value){if(!this.hasKey(key))this.length++;this.obj[key]=value;return this;},setLength:function(){this.length=0;for(var p in this.obj)this.length++;return this;},remove:function(key){if(this.hasKey(key)){delete this.obj[key];this.length--;}
return this;},each:function(fn,bind){$each(this.obj,fn,bind);},extend:function(obj){$extend(this.obj,obj);return this.setLength();},merge:function(){this.obj=$merge.apply(null,[this.obj].extend(arguments));return this.setLength();},empty:function(){this.obj={};this.length=0;return this;},keys:function(){var keys=[];for(var property in this.obj)keys.push(property);return keys;},values:function(){var values=[];for(var property in this.obj)values.push(this.obj[property]);return values;}});function $H(obj){return new Hash(obj);};Hash.Cookie=Hash.extend({initialize:function(name,options){this.name=name;this.options=$extend({'autoSave':true},options||{});this.load();},save:function(){if(this.length==0){Cookie.remove(this.name,this.options);return true;}
var str=Json.toString(this.obj);if(str.length>4096)return false;Cookie.set(this.name,str,this.options);return true;},load:function(){this.obj=Json.evaluate(Cookie.get(this.name),true)||{};this.setLength();}});Hash.Cookie.Methods={};['extend','set','merge','empty','remove'].each(function(method){Hash.Cookie.Methods[method]=function(){Hash.prototype[method].apply(this,arguments);if(this.options.autoSave)this.save();return this;};});Hash.Cookie.implement(Hash.Cookie.Methods);var Color=new Class({initialize:function(color,type){type=type||(color.push?'rgb':'hex');var rgb,hsb;switch(type){case'rgb':rgb=color;hsb=rgb.rgbToHsb();break;case'hsb':rgb=color.hsbToRgb();hsb=color;break;default:rgb=color.hexToRgb(true);hsb=rgb.rgbToHsb();}
rgb.hsb=hsb;rgb.hex=rgb.rgbToHex();return $extend(rgb,Color.prototype);},mix:function(){var colors=$A(arguments);var alpha=($type(colors[colors.length-1])=='number')?colors.pop():50;var rgb=this.copy();colors.each(function(color){color=new Color(color);for(var i=0;i<3;i++)rgb[i]=Math.round((rgb[i]/100*(100-alpha))+(color[i]/100*alpha));});return new Color(rgb,'rgb');},invert:function(){return new Color(this.map(function(value){return 255-value;}));},setHue:function(value){return new Color([value,this.hsb[1],this.hsb[2]],'hsb');},setSaturation:function(percent){return new Color([this.hsb[0],percent,this.hsb[2]],'hsb');},setBrightness:function(percent){return new Color([this.hsb[0],this.hsb[1],percent],'hsb');}});function $RGB(r,g,b){return new Color([r,g,b],'rgb');};function $HSB(h,s,b){return new Color([h,s,b],'hsb');};Array.extend({rgbToHsb:function(){var red=this[0],green=this[1],blue=this[2];var hue,saturation,brightness;var max=Math.max(red,green,blue),min=Math.min(red,green,blue);var delta=max-min;brightness=max/255;saturation=(max!=0)?delta/max:0;if(saturation==0){hue=0;}else{var rr=(max-red)/delta;var gr=(max-green)/delta;var br=(max-blue)/delta;if(red==max)hue=br-gr;else if(green==max)hue=2+rr-br;else hue=4+gr-rr;hue/=6;if(hue<0)hue++;}
return[Math.round(hue*360),Math.round(saturation*100),Math.round(brightness*100)];},hsbToRgb:function(){var br=Math.round(this[2]/100*255);if(this[1]==0){return[br,br,br];}else{var hue=this[0]%360;var f=hue%60;var p=Math.round((this[2]*(100-this[1]))/10000*255);var q=Math.round((this[2]*(6000-this[1]*f))/600000*255);var t=Math.round((this[2]*(6000-this[1]*(60-f)))/600000*255);switch(Math.floor(hue/60)){case 0:return[br,t,p];case 1:return[q,br,p];case 2:return[p,br,t];case 3:return[p,q,br];case 4:return[t,p,br];case 5:return[br,p,q];}}
return false;}});var Scroller=new Class({options:{area:20,velocity:1,onChange:function(x,y){this.element.scrollTo(x,y);}},initialize:function(element,options){this.setOptions(options);this.element=$(element);this.mousemover=([window,document].contains(element))?$(document.body):this.element;},start:function(){this.coord=this.getCoords.bindWithEvent(this);this.mousemover.addListener('mousemove',this.coord);},stop:function(){this.mousemover.removeListener('mousemove',this.coord);this.timer=$clear(this.timer);},getCoords:function(event){this.page=(this.element==window)?event.client:event.page;if(!this.timer)this.timer=this.scroll.periodical(50,this);},scroll:function(){var el=this.element.getSize();var pos=this.element.getPosition();var change={'x':0,'y':0};for(var z in this.page){if(this.page[z]<(this.options.area+pos[z])&&el.scroll[z]!=0)
change[z]=(this.page[z]-this.options.area-pos[z])*this.options.velocity;else if(this.page[z]+this.options.area>(el.size[z]+pos[z])&&el.scroll[z]+el.size[z]!=el.scrollSize[z])
change[z]=(this.page[z]-el.size[z]+this.options.area-pos[z])*this.options.velocity;}
if(change.y||change.x)this.fireEvent('onChange',[el.scroll.x+change.x,el.scroll.y+change.y]);}});Scroller.implement(new Events,new Options);var Slider=new Class({options:{onChange:Class.empty,onComplete:Class.empty,onTick:function(pos){this.knob.setStyle(this.p,pos);},mode:'horizontal',steps:100,offset:0},initialize:function(el,knob,options){this.element=$(el);this.knob=$(knob);this.setOptions(options);this.previousChange=-1;this.previousEnd=-1;this.step=-1;this.element.addEvent('mousedown',this.clickedElement.bindWithEvent(this));var mod,offset;switch(this.options.mode){case'horizontal':this.z='x';this.p='left';mod={'x':'left','y':false};offset='offsetWidth';break;case'vertical':this.z='y';this.p='top';mod={'x':false,'y':'top'};offset='offsetHeight';}
this.max=this.element[offset]-this.knob[offset]+(this.options.offset*2);this.half=this.knob[offset]/2;this.getPos=this.element['get'+this.p.capitalize()].bind(this.element);this.knob.setStyle('position','relative').setStyle(this.p,-this.options.offset);var lim={};lim[this.z]=[-this.options.offset,this.max-this.options.offset];this.drag=new Drag.Base(this.knob,{limit:lim,modifiers:mod,snap:0,onStart:function(){this.draggedKnob();}.bind(this),onDrag:function(){this.draggedKnob();}.bind(this),onComplete:function(){this.draggedKnob();this.end();}.bind(this)});if(this.options.initialize)this.options.initialize.call(this);},set:function(step){this.step=step.limit(0,this.options.steps);this.checkStep();this.end();this.fireEvent('onTick',this.toPosition(this.step));return this;},clickedElement:function(event){var position=event.page[this.z]-this.getPos()-this.half;position=position.limit(-this.options.offset,this.max-this.options.offset);this.step=this.toStep(position);this.checkStep();this.end();this.fireEvent('onTick',position);},draggedKnob:function(){this.step=this.toStep(this.drag.value.now[this.z]);this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent('onChange',this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent('onComplete',this.step+'');}},toStep:function(position){return Math.round((position+this.options.offset)/this.max*this.options.steps);},toPosition:function(step){return this.max*step/this.options.steps;}});Slider.implement(new Events);Slider.implement(new Options);var SmoothScroll=Fx.Scroll.extend({initialize:function(options){this.parent(window,options);this.links=(this.options.links)?$$(this.options.links):$$(document.links);var location=window.location.href.match(/^[^#]*/)[0]+'#';this.links.each(function(link){if(link.href.indexOf(location)!=0)return;var anchor=link.href.substr(location.length);if(anchor&&$(anchor))this.useLink(link,anchor);},this);if(!window.webkit419)this.addEvent('onComplete',function(){window.location.hash=this.anchor;});},useLink:function(link,anchor){link.addEvent('click',function(event){this.anchor=anchor;this.toElement(anchor);event.stop();}.bindWithEvent(this));}});var Sortables=new Class({options:{handles:false,onStart:Class.empty,onComplete:Class.empty,ghost:true,snap:3,onDragStart:function(element,ghost){ghost.setStyle('opacity',0.7);element.setStyle('opacity',0.7);},onDragComplete:function(element,ghost){element.setStyle('opacity',1);ghost.remove();this.trash.remove();}},initialize:function(list,options){this.setOptions(options);this.list=$(list);this.elements=this.list.getChildren();this.handles=(this.options.handles)?$$(this.options.handles):this.elements;this.bound={'start':[],'moveGhost':this.moveGhost.bindWithEvent(this)};for(var i=0,l=this.handles.length;i<l;i++){this.bound.start[i]=this.start.bindWithEvent(this,this.elements[i]);}
this.attach();if(this.options.initialize)this.options.initialize.call(this);this.bound.move=this.move.bindWithEvent(this);this.bound.end=this.end.bind(this);},attach:function(){this.handles.each(function(handle,i){handle.addEvent('mousedown',this.bound.start[i]);},this);},detach:function(){this.handles.each(function(handle,i){handle.removeEvent('mousedown',this.bound.start[i]);},this);},start:function(event,el){this.active=el;this.coordinates=this.list.getCoordinates();if(this.options.ghost){var position=el.getPosition();this.offset=event.page.y-position.y;this.trash=new Element('div').inject(document.body);this.ghost=el.clone().inject(this.trash).setStyles({'position':'absolute','left':position.x,'top':event.page.y-this.offset});document.addListener('mousemove',this.bound.moveGhost);this.fireEvent('onDragStart',[el,this.ghost]);}
document.addListener('mousemove',this.bound.move);document.addListener('mouseup',this.bound.end);this.fireEvent('onStart',el);event.stop();},moveGhost:function(event){var value=event.page.y-this.offset;value=value.limit(this.coordinates.top,this.coordinates.bottom-this.ghost.offsetHeight);this.ghost.setStyle('top',value);event.stop();},move:function(event){var now=event.page.y;this.previous=this.previous||now;var up=((this.previous-now)>0);var prev=this.active.getPrevious();var next=this.active.getNext();if(prev&&up&&now<prev.getCoordinates().bottom)this.active.injectBefore(prev);if(next&&!up&&now>next.getCoordinates().top)this.active.injectAfter(next);this.previous=now;},serialize:function(converter){return this.list.getChildren().map(converter||function(el){return this.elements.indexOf(el);},this);},end:function(){this.previous=null;document.removeListener('mousemove',this.bound.move);document.removeListener('mouseup',this.bound.end);if(this.options.ghost){document.removeListener('mousemove',this.bound.moveGhost);this.fireEvent('onDragComplete',[this.active,this.ghost]);}
this.fireEvent('onComplete',this.active);}});Sortables.implement(new Events,new Options);var Tips=new Class({options:{onShow:function(tip){tip.setStyle('visibility','visible');},onHide:function(tip){tip.setStyle('visibility','hidden');},maxTitleChars:30,showDelay:100,hideDelay:100,className:'tool',offsets:{'x':16,'y':16},fixed:false},initialize:function(elements,options){this.setOptions(options);this.toolTip=new Element('div',{'class':this.options.className+'-tip','styles':{'position':'absolute','top':'0','left':'0','visibility':'hidden'}}).inject(document.body);this.wrapper=new Element('div').inject(this.toolTip);$$(elements).each(this.build,this);if(this.options.initialize)this.options.initialize.call(this);},build:function(el){el.$tmp.myTitle=(el.href&&el.getTag()=='a')?el.href.replace('http://',''):(el.rel||false);if(el.title){var dual=el.title.split('::');if(dual.length>1){el.$tmp.myTitle=dual[0].trim();el.$tmp.myText=dual[1].trim();}else{el.$tmp.myText=el.title;}
el.removeAttribute('title');}else{el.$tmp.myText=false;}
if(el.$tmp.myTitle&&el.$tmp.myTitle.length>this.options.maxTitleChars)el.$tmp.myTitle=el.$tmp.myTitle.substr(0,this.options.maxTitleChars-1)+"&hellip;";el.addEvent('mouseenter',function(event){this.start(el);if(!this.options.fixed)this.locate(event);else this.position(el);}.bind(this));if(!this.options.fixed)el.addEvent('mousemove',this.locate.bindWithEvent(this));var end=this.end.bind(this);el.addEvent('mouseleave',end);el.addEvent('trash',end);},start:function(el){this.wrapper.empty();if(el.$tmp.myTitle){this.title=new Element('span').inject(new Element('div',{'class':this.options.className+'-title'}).inject(this.wrapper)).setHTML(el.$tmp.myTitle);}
if(el.$tmp.myText){this.text=new Element('span').inject(new Element('div',{'class':this.options.className+'-text'}).inject(this.wrapper)).setHTML(el.$tmp.myText);}
$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);},end:function(event){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this);},position:function(element){var pos=element.getPosition();this.toolTip.setStyles({'left':pos.x+this.options.offsets.x,'top':pos.y+this.options.offsets.y});},locate:function(event){var win={'x':window.getWidth(),'y':window.getHeight()};var scroll={'x':window.getScrollLeft(),'y':window.getScrollTop()};var tip={'x':this.toolTip.offsetWidth,'y':this.toolTip.offsetHeight};var prop={'x':'left','y':'top'};for(var z in prop){var pos=event.page[z]+this.options.offsets[z];if((pos+tip[z]-scroll[z])>win[z])pos=event.page[z]-this.options.offsets[z]-tip[z];this.toolTip.setStyle(prop[z],pos);};},show:function(){if(this.options.timeout)this.timer=this.hide.delay(this.options.timeout,this);this.fireEvent('onShow',[this.toolTip]);},hide:function(){this.fireEvent('onHide',[this.toolTip]);}});Tips.implement(new Events,new Options);var Group=new Class({initialize:function(){this.instances=$A(arguments);this.events={};this.checker={};},addEvent:function(type,fn){this.checker[type]=this.checker[type]||{};this.events[type]=this.events[type]||[];if(this.events[type].contains(fn))return false;else this.events[type].push(fn);this.instances.each(function(instance,i){instance.addEvent(type,this.check.bind(this,[type,instance,i]));},this);return this;},check:function(type,instance,i){this.checker[type][i]=true;var every=this.instances.every(function(current,j){return this.checker[type][j]||false;},this);if(!every)return;this.checker[type]={};this.events[type].each(function(event){event.call(this,this.instances,instance);},this);}});var Accordion=Fx.Elements.extend({options:{onActive:Class.empty,onBackground:Class.empty,display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var options,togglers,elements,container;$each(arguments,function(argument,i){switch($type(argument)){case'object':options=argument;break;case'element':container=$(argument);break;default:var temp=$$(argument);if(!togglers)togglers=temp;else elements=temp;}});this.togglers=togglers||[];this.elements=elements||[];this.container=$(container);this.setOptions(options);this.previous=-1;if(this.options.alwaysHide)this.options.wait=true;if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show;}
if(this.options.start){this.options.display=false;this.options.show=false;}
this.effects={};if(this.options.opacity)this.effects.opacity='fullOpacity';if(this.options.width)this.effects.width=this.options.fixedWidth?'fullWidth':'offsetWidth';if(this.options.height)this.effects.height=this.options.fixedHeight?'fullHeight':'scrollHeight';for(var i=0,l=this.togglers.length;i<l;i++)this.addSection(this.togglers[i],this.elements[i]);this.elements.each(function(el,i){if(this.options.show===i){this.fireEvent('onActive',[this.togglers[i],el]);}else{for(var fx in this.effects)el.setStyle(fx,0);}},this);this.parent(this.elements);if($chk(this.options.display))this.display(this.options.display);},addSection:function(toggler,element,pos){toggler=$(toggler);element=$(element);var test=this.togglers.contains(toggler);var len=this.togglers.length;this.togglers.include(toggler);this.elements.include(element);if(len&&(!test||pos)){pos=$pick(pos,len-1);toggler.injectBefore(this.togglers[pos]);element.injectAfter(toggler);}else if(this.container&&!test){toggler.inject(this.container);element.inject(this.container);}
var idx=this.togglers.indexOf(toggler);toggler.addEvent('click',this.display.bind(this,idx));if(this.options.height)element.setStyles({'padding-top':0,'border-top':'none','padding-bottom':0,'border-bottom':'none'});if(this.options.width)element.setStyles({'padding-left':0,'border-left':'none','padding-right':0,'border-right':'none'});element.fullOpacity=1;if(this.options.fixedWidth)element.fullWidth=this.options.fixedWidth;if(this.options.fixedHeight)element.fullHeight=this.options.fixedHeight;element.setStyle('overflow','hidden');if(!test){for(var fx in this.effects)element.setStyle(fx,0);}
return this;},display:function(index){index=($type(index)=='element')?this.elements.indexOf(index):index;if((this.timer&&this.options.wait)||(index===this.previous&&!this.options.alwaysHide))return this;this.previous=index;var obj={};this.elements.each(function(el,i){obj[i]={};var hide=(i!=index)||(this.options.alwaysHide&&(el.offsetHeight>0));this.fireEvent(hide?'onBackground':'onActive',[this.togglers[i],el]);for(var fx in this.effects)obj[i][fx]=hide?0:el[this.effects[fx]];},this);return this.start(obj);},showThisHideOpen:function(index){return this.display(index);}});Fx.Accordion=Accordion;
/**
* @version		$Id: modal.js 5263 2006-10-02 01:25:24Z webImagery $
* @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

/**
 * JCaption javascript behavior
 *
 * Used for displaying image captions
 *
 * @package		Joomla
 * @since		1.5
 * @version     1.0
 */
var JCaption = new Class({
	initialize: function(selector)
	{
		this.selector = selector;

		var images = $$(selector);
		images.each(function(image){ this.createCaption(image); }, this);
	},

	createCaption: function(element)
	{
		var caption   = document.createTextNode(element.title);
		var container = document.createElement("div");
		var text      = document.createElement("p");
		var width     = element.getAttribute("width");
		var align     = element.getAttribute("align");

		if(!width) {
			width = element.width;
		}

		text.appendChild(caption);
		element.parentNode.insertBefore(container, element);
		container.appendChild(element);
		if ( element.title != "" ) {
			container.appendChild(text);
		}
		container.className   = this.selector.replace('.', '_');
		container.className   = container.className + " " + align;
		container.setAttribute("style","float:"+align);
		container.style.width = width + "px";

	}
});

document.caption = null
window.addEvent('load', function() {
  var caption = new JCaption('img.caption')
  document.caption = caption
});

<!-- BEGIN LivePerson Monitor. --><script language='javascript'>var lpMTagConfig = {'lpServer' : "server.iad.liveperson.net",'lpNumber' : "40462137",'lpProtocol' : "http", 'lpMTagSrc' : 'if(typeof Array.prototype.splice===\'undefined\'){Array.prototype.splice=function(a,c){var i=0,e=arguments,d=this.copy(),f=a;if(!c){c=this.length-a;}for(i;i<e.length-2;i++){this[a+i]=e[i+2];}for(a;a<this.length-c;a++){this[a+e.length-2]=d[a-c];}this.length-=c-e.length+2;return d.slice(f,f+c);};}function hcArrayStorage(){this.index=0;this.nameArray=new Array();this.valueArray=new Array();}hcArrayStorage.prototype.add=function(name,value,unescapeData){if(typeof(unescapeData)==\'undefined\'){unescapeData=false;}if(typeof(value)==\'undefined\'){var temp=name.split(\'=\');name=temp[0];value=temp[1];}if(unescapeData){this.nameArray[this.index]=unescape(name);this.valueArray[this.index]=unescape(value);}else{this.nameArray[this.index]=name;this.valueArray[this.index]=value;}this.index++;};hcArrayStorage.prototype.size=function(){return this.index;};hcArrayStorage.prototype.get=function(i){if(typeof(this.nameArray[i])==\'undefined\'){return\'\';}var tmp=escape(this.nameArray[i])+\'=\'+escape(this.valueArray[i]);tmp=tmp.replace(/\+/g,"%2B");return tmp;};hcArrayStorage.prototype.getName=function(i){return this.nameArray[i];};hcArrayStorage.prototype.getValue=function(i){return this.valueArray[i];};hcArrayStorage.prototype.getValueEsc=function(i){return escape(this.valueArray[i]);};hcArrayStorage.prototype.getByName=function(name){for(var i=0;i<this.index;i++){if(this.getName(i)==name){return i;}}return-1;};hcArrayStorage.prototype.remove=function(i){if(typeof(i)==\'undefined\'||i==null||typeof(this.nameArray[i])==\'undefined\'){return;}this.nameArray.splice(i,1);this.valueArray.splice(i,1);this.index--;};hcArrayStorage.prototype.paramLength=function(i){var url=\'&\'+this.get(i);return url.length;};hcArrayStorage.prototype.fullLength=function(){var length=0;for(var i=0;i<this.index;i++){length+=this.paramLength(i);}return length;};hcArrayStorage.prototype.getMaxLengthItem=function(){var max=0;var maxItemId=-1;for(var i=0;i<this.index;i++){if(this.paramLength(i)>max){max=this.paramLength(i);maxItemId=i;}}return maxItemId;};hcArrayStorage.prototype.clone=function(){var cloneObj=new hcArrayStorage();cloneObj.index=this.index;for(var i=0;i<this.index;i++){cloneObj.nameArray[i]=this.nameArray[i];cloneObj.valueArray[i]=this.valueArray[i];}return cloneObj;};function lpRequest(protocolVer,Url,params,Callback,requireConfirm,maxretries,prunIdentify,lpjson,dataEncoding,browser,postAutoConfirm,spImmediateCleanup,partial,part,outOf,forceget,forcePost,encodingBlankUrl,minimizePost,minimizePostMaxGets,allowTruncate){this.headLoc=document.getElementsByTagName("head").item(0);this.timeStamp=new Date();this.callId=this.BuildCallID();this.protocolVer=protocolVer;this.scriptId=\'lpScriptId\'+this.callId;this.callbackFunc=Callback;this.requireConfirm=requireConfirm;this.spImmediateCleanup=spImmediateCleanup;this.postAutoConfirm=postAutoConfirm;this.params=params;this.BaseUrl=Url;this.fullUrl=\'\';if(typeof(dataEncoding)!=\'undefined\'&&dataEncoding!=\'\'&&dataEncoding!=null){this.dataEncoding=dataEncoding.toUpperCase();}else{this.dataEncoding="UTF-8";}this.retries=0;this.confirmed=false;this.usedget=true;this.usedSpecialPost=false;this.maxretries=maxretries;this.prunIdentify=prunIdentify;this.lpjson=lpjson;this.browser=browser;this.spImmediateCleanup=true;if(typeof(partial)==\'undefined\'){partial=false;}this.partial=partial;if(typeof(part)==\'undefined\'){part=0;}this.part=part;if(typeof(outOf)==\'undefined\'){outOf=0;}this.outOf=outOf;this.forceget=forceget;this.forcePost=forcePost;this.encodingBlankUrl=encodingBlankUrl;this.minimizePost=minimizePost;this.minimizePostMaxGets=minimizePostMaxGets;this.allowTruncate=allowTruncate;}lpRequest.prototype.BuildCallID=function(){var sessionKey=this.getCookie(\'HumanClickKEY\');if(sessionKey==null){sessionKey=Math.round(Math.random()*999999999999);}return sessionKey+\'-\'+Math.round(Math.random()*9999999999);};lpRequest.prototype.getCookie=function(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length))){return null;}if(start==-1){return null;}var end=document.cookie.indexOf(";",len);if(end==-1){end=document.cookie.length;}return unescape(document.cookie.substring(len,end));};lpRequest.prototype.BuildBaseCallUrl=function(){var url=this.BaseUrl;if(url.indexOf(\'?\')==-1){url+=\'?\';}else{url+=\'&\';}url+=\'lpCallId=\'+this.callId;url+=\'&protV=\'+this.protocolVer;url+=\'&\'+this.prunIdentify+this.lpjson;return url;};lpRequest.prototype.BuildCallUrl=function(type,maxLength,nolog){var callUrl=this.BuildBaseCallUrl();var urlLength=callUrl.length;if(type==\'get\'){if(this.params.size()>0){for(var i=0;i<this.params.size();i++){callUrl+=\'&\'+this.params.get(i);}}urlLength=callUrl.length;if(urlLength>maxLength){if(lpConnLib.DebugDisplay&&!nolog){lpMTagDebug.Display(\'lpRequest.BuildCallUrl Cutting length:\'+urlLength+\' max=\'+maxLength,\'WARN\',\'EMT\');}callUrl=callUrl.substring(0,maxLength);}}this.fullUrl=callUrl;return urlLength;};lpRequest.prototype.MakeCallByScript=function(){this.scriptObj=document.createElement("script");this.scriptObj.setAttribute("type","text/javascript");this.scriptObj.setAttribute("charset",this.dataEncoding);this.scriptObj.setAttribute("src",this.fullUrl);this.scriptObj.setAttribute("id",this.scriptId);this.headLoc.appendChild(this.scriptObj);};lpRequest.prototype.removeScriptTag=function(){try{this.headLoc.removeChild(this.scriptObj);}catch(e){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'lpRequest.removeScriptTag FAILED with error:\'+e,\'ERROR\',\'EMT\');}}};lpRequest.prototype.MakeCallByIframeSpecial=function(iframeRef){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'MakeCallByIframeSpecial IFRM Charset=\'+(iframeRef.contentDocument?iframeRef.contentDocument.characterSet:\'No doc\')+\'   \'+this.dataEncoding,\'DEBUG\',\'EMT\');}this.usedget=false;this.usedSpecialPost=true;if(iframeRef.contentDocument&&iframeRef.contentDocument.characterSet.toUpperCase()==this.dataEncoding.toUpperCase()){this.specialPostMakeCall(iframeRef.contentDocument);return true;}return false;};lpRequest.prototype.specialPostMakeCall=function(doc){this.BuildCallUrl(\'post\');var form=doc.createElement(\'form\');form.setAttribute(\'id\',\'hcPostSubmitForm-\'+this.callId);form.setAttribute(\'target\',\'_self\');form.setAttribute(\'action\',this.fullUrl+"&A_ID="+Math.round(10000*Math.random())+\'&\'+this.prunIdentify+this.lpjson);form.setAttribute(\'method\',\'post\');var i;var urlParams=this.urlToParams(this.fullUrl);for(i=0;i<urlParams.size();i++){this.createInput(doc,form,urlParams.getName(i),urlParams.getValue(i));form[urlParams.getName(i)].value=urlParams.getValue(i);}for(i=0;i<this.params.size();i++){this.createInput(doc,form,this.params.getName(i),this.params.getValue(i));form[this.params.getName(i)].value=this.params.getValue(i);}doc.body.appendChild(form);form.submit();};lpRequest.prototype.createInput=function(doc,form,name,value){var input=doc.createElement(\'textarea\');input.setAttribute(\'type\',\'text\');input.setAttribute(\'name\',name);input.setAttribute(\'id\',name);input.setAttribute(\'value\',value);form.appendChild(input);};lpRequest.prototype.urlToParams=function(url){var urlParams=new hcArrayStorage();var tempD=url.split(\'?\');var par=tempD[1];if(typeof(par)!=\'undefined\'&&par!=\'\'){var data=par.split(\'&\');for(var i=0;i<data.length;i++){if(data[i]!=\'\'){var splitParam=data[i].split(\'=\');urlParams.add(splitParam[0],splitParam[1]);}}}return urlParams;};lpRequest.prototype.MakeCallByIframe=function(browser){this.usedget=false;this.BuildCallUrl(\'post\');var container=\'\';if(!document.getElementById(lpConnLib.iframeName)){container=this.CreateIframeContainer(browser);}else{if(browser==\'IE\'){document.body.removeChild(document.getElementById(\'SPAN\'+lpConnLib.iframeName));}else{document.body.removeChild(document.getElementById(lpConnLib.iframeName));}container=this.CreateIframeContainer(browser);}var out_str=\'<html><head>\';out_str+="<meta http-equiv=\'Content-Type\' content=\'text/html; charset="+this.dataEncoding+"\'>";out_str+=\'</head><body>\';out_str+="<form name=\'hcPostSubmitForm\' id=\'hcPostSubmitForm\' method=\'post\' target=\'_self\' action=\'"+this.fullUrl+"&A_ID="+Math.round(10000*Math.random())+"\'>";var urlParams=this.urlToParams(this.fullUrl);var i;for(i=0;i<urlParams.size();i++){out_str+="<input type=\'hidden\' name=\'"+urlParams.getName(i)+"\' value=\'"+urlParams.getValue(i)+"\'>";}var dataObj={};if(this.params.size()>0){for(i=0;i<this.params.size();i++){out_str+="<input type=\'hidden\' name=\'"+this.params.getName(i)+"\' value=\'\'>";dataObj[this.params.getName(i)]=this.params.getValue(i);}}out_str+="</form></body></html>";if(browser==\'IE\'||browser==\'FF\'||browser==\'SAFARI\'){var doc=null;if(browser==\'IE\'){doc=container.document;}else{doc=container.contentDocument;}doc.open();doc.write(out_str);doc.close();var j=doc.forms[\'hcPostSubmitForm\'].length;for(i=0;i<j;i++){if(typeof(dataObj[doc.forms[\'hcPostSubmitForm\'].elements[i].name])!=\'undefined\'){doc.forms[\'hcPostSubmitForm\'].elements[i].value=dataObj[doc.forms[\'hcPostSubmitForm\'].elements[i].name];}}doc.forms[\'hcPostSubmitForm\'].submit();}else{lpConnLib.postParams[this.callId]=dataObj;setTimeout("var container = document.getElementById(\'hcIframeContainer1\'); var doc =  container.contentDocument; doc.open(); doc.write(\""+out_str+"\"); doc.close(); var j = doc.forms[\'hcPostSubmitForm\'].length; for(var i=0;i<j;i++){if(typeof(lpConnLib.postParams[\'"+this.callId+"\'][doc.forms[\'hcPostSubmitForm\'].elements[i].name])!=\'undefined\'){doc.forms[\'hcPostSubmitForm\'].elements[i].value=lpConnLib.postParams[\'"+this.callId+"\'][doc.forms[\'hcPostSubmitForm\'].elements[i].name];}} doc.forms[\'hcPostSubmitForm\'].submit(); delete lpConnLib.postParams[\'"+this.callId+"\'];",250);}if(browser=="IE"){setTimeout("try {document.body.removeChild(document.getElementById(\'SPAN\'+lpConnLib.iframeName));} catch (e) {}",lpConnLib.postDeleteIfrDelay*1000);}else{setTimeout("try {document.body.removeChild(document.getElementById(lpConnLib.iframeName));} catch (e) {}",lpConnLib.postDeleteIfrDelay*1000);}};lpRequest.prototype.CreateIframeContainer=function(browser){var containerName=lpConnLib.iframeName;var container,span,iframe;switch(browser){case \'NS\':container=new Layer(100);container.name=containerName;container.visibility=\'hidden\';container.clip.width=100;container.clip.height=100;container.visibility=\'hidden\';break;case \'IE\':document.body.insertAdjacentHTML(\'afterBegin\',"<span id=\'SPAN"+containerName+"\'></span>");span=document.all("SPAN"+containerName);var html="<iframe name=\'"+containerName+"\' src=\"javascript:\'\'\"></iframe>";span.innerHTML=html;span.style.display=\'none\';span.style.visibility=\'hidden\';span.style.position=\'absolute\';span.style.width=\'0px\';span.style.height=\'0px\';container=window.frames[containerName];document.all("SPAN"+containerName).style.display=\'none\';break;case \'OPR\':span=document.createElement(\'SPAN\');span.id="SPAN"+containerName;document.body.appendChild(span);iframe=document.createElement(\'IFRAME\');iframe.name=containerName;iframe.id=containerName;iframe.frameBorder=0;iframe.width=0;iframe.height=0;span.appendChild(iframe);container=iframe;document.getElementById("SPAN"+containerName).style.visibility=\'hidden\';break;case \'KONQ\':span=document.createElement(\'SPAN\');span.id="SPAN"+containerName;document.body.appendChild(span);iframe=document.createElement(\'IFRAME\');iframe.name=containerName;iframe.id=containerName;span.appendChild(iframe);container=iframe;span.style.display=none;iframe.style.display=none;iframe.style.visibility=\'hidden\';iframe.height=0;iframe.width=0;break;default:iframe=document.createElement(\'IFRAME\');iframe.setAttribute("id",containerName);iframe.setAttribute("name",containerName);iframe.setAttribute("src","");iframe.frameBorder=0;iframe.scrolling=\'no\';iframe.style.top="0px";iframe.style.left="0px";iframe.style.position=\'absolute\';iframe.style.width=\'0px\';iframe.style.height=\'0px\';iframe.style.visibility=\'hidden\';document.body.appendChild(iframe);container=iframe;break;}return container;};lpRequest.prototype.clone=function(){var cloneReq=new lpRequest();for(var p in this){if(typeof(this[p])!=\'undefined\'){if(typeof(this[p])!=\'object\'){cloneReq[p]=this[p];}else if(typeof(this[p])!=\'undefined\'&&this[p]!=null&&this[p].constructor==hcArrayStorage){cloneReq[p]=this[p].clone();}else{cloneReq[p]=this[p];}}}return cloneReq;};function lpConnectionLibrary(){this.protocolVer=20;this.garbagePeriod=10;this.garbageTimer=0;this.callTimeoutPeriod=3*this.garbagePeriod;this.maxurllengthMZ=2083;this.maxurllengthIE=2083;this.postDeleteIfrDelay=3;this.iframeName=\'lpIframeContainer-\'+Math.round(1000*Math.random());this.onPostAutoConfirm=true;this.queue=new Array();this.partialQueue=new Array();this.fullForPartialQueue=new Object();this.browser=this.BrowserSniff();if(this.browser==\'IE\'){this.maxurlgetlength=this.maxurllengthIE;}else{this.maxurlgetlength=this.maxurllengthMZ;}this.callCounter=0;this.garbageCollectCounter=0;this.forcedGet=0;this.reconfirmedCalls=0;this.resendCounter=0;this.partialCounter=0;this.lpExecuteErrors=0;this.lpCallbackCnt=0;this.lpjson=1;this.prunIdentify=\'lpjson=\';this.DebugSend=true;this.DebugDisplay=false;this.postParams=new Array();this.spPostIframesFree=new Array();this.spPostIframesBusy=new Array();}lpConnectionLibrary.prototype.specialPostHandler=function(callId){if(this.DebugDisplay){lpMTagDebug.Display(\'specialPostHandler:\'+callId,\'DEBUG\',\'EMT\');}for(var i=0;i<this.queue.length;i++){if(this.queue[i].callId==callId){var iframeObj=this.findCreateIframe(this.queue[i].callId,this.queue[i].dataEncoding,this.queue[i].spImmediateCleanup);if(this.queue[i].MakeCallByIframeSpecial(iframeObj[\'iframeRef\'])){iframeObj[\'callMade\']=true;}else{setTimeout("lpConnLib.specialPostHandler(\'"+callId+"\')",1000);}}}};lpConnectionLibrary.prototype.findCreateIframe=function(callId,encoding,spImmediateCleanup){var iframeRef,i;for(i=0;i<this.spPostIframesBusy.length;i++){if(this.spPostIframesBusy[i][\'callID\']==callId){if(this.DebugDisplay){lpMTagDebug.Display(\'FOUND IN BUSY IFRAME:\'+callId,\'DEBUG\',\'EMT\');}return this.spPostIframesBusy[i];}}for(i=0;i<this.spPostIframesFree.length;i++){if(this.spPostIframesFree[i][\'encoding\']==encoding){if(this.DebugDisplay){lpMTagDebug.Display(\'FOUND A FREE IFRAME:\'+callId,\'DEBUG\',\'EMT\');}iframeRef=this.spPostIframesFree[i][\'iframeRef\'];this.spPostIframesFree.splice(i,1);return this.addIframeToBusy(callId,encoding,iframeRef,spImmediateCleanup);}}iframeRef=this.createIframe(callId,encoding);return this.addIframeToBusy(callId,encoding,iframeRef,spImmediateCleanup);};lpConnectionLibrary.prototype.releaseIframe=function(callId){if(this.DebugDisplay){lpMTagDebug.Display(\'trying to release \'+callId,\'DEBUG\',\'EMT\');}for(var i=0;i<this.spPostIframesBusy.length;i++){if(this.spPostIframesBusy[i][\'callID\']==callId){var iframeRef=this.spPostIframesBusy[i][\'iframeRef\'];var doc=iframeRef.contentDocument;var frm=doc.getElementById(\'hcPostSubmitForm-\'+callId);if(frm!=null){if(this.DebugDisplay){lpMTagDebug.Display(\'form still exists \'+callId,\'DEBUG\',\'EMT\');}return;}if(this.spPostIframesBusy[i][\'encoding\']!=iframeRef.contentDocument.characterSet.toUpperCase()){if(this.DebugDisplay){lpMTagDebug.Display(\'deleting since encodings DO not match \'+callId,\'DEBUG\',\'EMT\');}iframeRef.parentNode.removeChild(iframeRef);}else{var cnt=this.spPostIframesFree.length;this.spPostIframesFree[cnt]=new Array();this.spPostIframesFree[cnt]=this.spPostIframesBusy[i];}this.spPostIframesBusy.splice(i,1);if(this.DebugDisplay){lpMTagDebug.Display(\'released ok \'+callId,\'DEBUG\',\'EMT\');}return;}}};lpConnectionLibrary.prototype.addIframeToBusy=function(callId,encoding,iframeRef,spImmediateCleanup){var cnt=this.spPostIframesBusy.length;this.spPostIframesBusy[cnt]=new Array();this.spPostIframesBusy[cnt][\'callID\']=callId;this.spPostIframesBusy[cnt][\'encoding\']=encoding.toUpperCase();this.spPostIframesBusy[cnt][\'spImmediateCleanup\']=spImmediateCleanup;this.spPostIframesBusy[cnt][\'callMade\']=false;this.spPostIframesBusy[cnt][\'iframeRef\']=iframeRef;return this.spPostIframesBusy[cnt];};lpConnectionLibrary.prototype.createIframe=function(callId,encoding){if(this.DebugDisplay){lpMTagDebug.Display(\'Created iframe for: \'+callId,\'DEBUG\',\'EMT\');}var containerName=\'hcIframeContainer1\';var iframe=document.createElement(\'IFRAME\');iframe.setAttribute("id",containerName+\'-\'+callId);iframe.setAttribute("name",containerName+\'-\'+callId);iframe.setAttribute("src",this.encodingBlankUrl+\'?encoding=\'+encoding);iframe.frameBorder=0;iframe.scrolling=\'no\';iframe.style.top="1px";iframe.style.left="1px";iframe.style.position=\'absolute\';iframe.style.width=\'1px\';iframe.style.height=\'1px\';iframe.style.visibility=\'hidden\';document.body.appendChild(iframe);return iframe;};lpConnectionLibrary.prototype.reportError=function(url,msg,logger,site){if(!this.DebugSend){return;}try{var vaParams=new hcArrayStorage();vaParams.add("cmd","visitorDebugPrint");vaParams.add("site",site);vaParams.add("log",msg);vaParams.add("logger",logger);this.addToQueue(url,vaParams,null,false);}catch(e){var errorImage=new Image;errorImage.src=url+"?cmd=visitorDebugPrint&site="+site+"&logger="+logger+"&d="+(new Date()).getTime()+"&log="+msg;}};lpConnectionLibrary.prototype.SortQueue=function(first,second){if(first.confirmed==second.confirmed){return first.timeStamp.getTime()-second.timeStamp.getTime();}if(first.confirmed&&!second.confirmed){return-1;}if(!first.confirmed&&second.confirmed){return 1;}return 0;};lpConnectionLibrary.prototype.confirmConnection=function(idList){var tempList=\',\'+idList+\',\';for(var i=0;i<this.queue.length;i++){var myid=\',\'+this.queue[i].callId+\',\';if(!this.queue[i].confirmed&&tempList.indexOf(myid)>-1){this.queue[i].confirmed=true;}}};lpConnectionLibrary.prototype.getRequestForCallId=function(callId){for(var i=0;i<this.queue.length;i++){if(callId==this.queue[i].callId){return this.queue[i];}}return null;};lpConnectionLibrary.prototype.addToQueue=function(Url,params,Callback,requireConfirm,maxretries,forceget,onPostAutoConfirm,lpjson,dataEncoding,forcePost,specialPost,spImmediateCleanup,encodingBlankUrl,minimizePost,minimizePostMaxGets,allowTruncate){var callType=\'\';var postAutoConfirm=false;if(typeof(lpjson)!=\'undefined\'){this.lpjson=lpjson;}if(typeof(onPostAutoConfirm)!=\'undefined\'){postAutoConfirm=onPostAutoConfirm;}else{postAutoConfirm=this.onPostAutoConfirm;}if(typeof(encodingBlankUrl)==\'undefined\'){if(typeof(lpMTagConfig)!=\'undefined\'){encodingBlankUrl=lpMTagConfig.lpProtocol+\'://\'+lpMTagConfig.lpServer+\'/hcp/asp/blankenc.asp\';}else if(typeof(lpChatConfig)!=\'undefined\'){encodingBlankUrl=lpChatConfig.lpProtocol+\'://\'+lpChatConfig.lpServer+\'/hcp/asp/blankenc.asp\';}}this.encodingBlankUrl=encodingBlankUrl;if(typeof(spImmediateCleanup)==\'undefined\'){spImmediateCleanup=true;}var request=new lpRequest(this.protocolVer,Url,params,Callback,requireConfirm,maxretries,this.prunIdentify,this.lpjson,dataEncoding,this.browser,postAutoConfirm,spImmediateCleanup,undefined,0,0,forceget,forcePost,encodingBlankUrl,minimizePost,minimizePostMaxGets,allowTruncate);if(typeof(lpMTagDebug)!=\'undefined\'){this.DebugDisplay=true;}if(forceget){this.forcedGet++;}var partial=\'\';var urlLength=request.BuildCallUrl(\'get\',this.maxurlgetlength,true);if(!forcePost&&(urlLength<this.maxurlgetlength||forceget)){callType=this.makeTheCall(request,\'get\',requireConfirm);}else{if(typeof(minimizePost)==\'undefined\'){if(typeof(lpMTagConfig.minimizePost)==\'undefined\'){minimizePost=false;}else{minimizePost=lpMTagConfig.minimizePost;}}var minPostStatus=false;if(!forcePost&&minimizePost){if(typeof(minimizePostMaxGets)==\'undefined\'){if(typeof(lpMTagConfig.minimizePostMaxGets)==\'undefined\'){minimizePostMaxGets=3;}else{minimizePostMaxGets=lpMTagConfig.minimizePostMaxGets;}}if(typeof(allowTruncate)==\'undefined\'){if(typeof(lpMTagConfig.allowTruncate)==\'undefined\'){allowTruncate=false;}else{allowTruncate=lpMTagConfig.allowTruncate;}}var origRequest=request.clone();var req=this.splitRequestIntoGets(request,minimizePostMaxGets,allowTruncate);if(req){this.partialCounter++;origRequest.callId=this.splitPartialFromStr(req.callId);this.fullForPartialQueue[origRequest.callId]=origRequest;minPostStatus=true;callType=this.makeTheCall(req,\'get\',requireConfirm);partial=\'PARTIAL\';}}if(!minPostStatus){if(specialPost){callType=this.makeTheCall(request,\'sp-post\',!postAutoConfirm,spImmediateCleanup);}else{callType=this.makeTheCall(request,\'post\',!postAutoConfirm);}}}return callType;};lpConnectionLibrary.prototype.makeTheCall=function(request,protocol){protocol=protocol.toUpperCase();var ret,qsize;if(protocol==\'GET\'){request.BuildCallUrl(\'get\',this.maxurlgetlength);qsize=this.queue.length;this.queue[qsize]=request;this.queue[qsize].MakeCallByScript();if(!request.requireConfirm){this.queue[qsize].confirmed=true;}ret=\'GET\';}else if(protocol==\'POST\'){request.BuildCallUrl(\'post\',this.maxurlgetlength);qsize=this.queue.length;this.queue[qsize]=request;this.queue[qsize].MakeCallByIframe(this.browser);if(request.postAutoConfirm){this.queue[qsize].confirmed=true;}ret=\'POST\';}else if(protocol==\'SP-POST\'){request.BuildCallUrl(\'post\',this.maxurlgetlength);qsize=this.queue.length;this.queue[qsize].spImmediateCleanup=request.spImmediateCleanup;this.specialPostHandler(request.callId);if(request.postAutoConfirm){this.queue[qsize].confirmed=true;}ret=\'POST\';}if(this.DebugDisplay){var cmd=\'\';try{cmd=request.params.getValue(request.params.getByName(\'cmd\'));if(typeof(cmd)==\'undefined\'){cmd=request.fullUrl.match(/cmd=.*?&/).toString();if(cmd!=null&&cmd!=\'null\'){cmd=cmd.replace(/&/g,\'\');}}cmd=\'<strong><span style="color:rgb(255,153,0);">\'+cmd+\'</span></strong>\';}catch(e){}lpMTagDebug.Display(\'Making \'+protocol+\' Call id=\'+request.callId+\' \'+cmd,\'DEBUG\',\'EMT\');}this.callCounter++;return ret;};lpConnectionLibrary.prototype.splitRequestIntoGets=function(request,maxNum,allowTruncate){var getrequestLength=request.BuildCallUrl(\'get\');var i;request.BuildCallUrl(\'post\');var maxDataLength=this.maxurlgetlength-request.fullUrl.length-20;var numRequests=getrequestLength/maxDataLength;if(numRequests>(numRequests|0)){numRequests=parseInt(numRequests+1);}else{numRequests=parseInt(numRequests);}if(numRequests>maxNum){if(this.DebugDisplay){lpMTagDebug.Display(\'Minimize POST for call id=\'+request.callId+\' - failed - too Many GETs needed (\'+numRequests+\')\',\'DEBUG\',\'EMT\');}return false;}var numBuckets=1;var dataContain=new Array();dataContain[numBuckets-1]=new hcArrayStorage();var maxId=request.params.getMaxLengthItem();if(request.params.paramLength(maxId)>maxDataLength){if(allowTruncate){var tmpData=request.params.get(maxId);tmpData=tmpData.substring(0,maxDataLength-1);tmpData=unescape(tmpData);request.params.remove(maxId);request.params.add(tmpData);if(this.DebugDisplay){lpMTagDebug.Display(\'Minimize POST for call id=\'+request.callId+\' - TRUNCATING too long pair\',\'DEBUG\',\'EMT\');}}else{if(this.DebugDisplay){lpMTagDebug.Display(\'Minimize POST for call id=\'+request.callId+\' - failed - too long pair\',\'DEBUG\',\'EMT\');}return false;}}while(request.params.size()>0){var foundBucket=false;for(i=0;i<numBuckets;i++){if((dataContain[i].fullLength()+request.params.paramLength(maxId))<maxDataLength){dataContain[i].add(request.params.getName(maxId),request.params.getValue(maxId));foundBucket=true;}}if(!foundBucket){numBuckets++;if(numBuckets>maxNum){if(this.DebugDisplay){lpMTagDebug.Display(\'Minimize POST for call id=\'+request.callId+\' - failed - too Many GETs required (\'+numBuckets+\') max=\'+maxNum,\'DEBUG\',\'EMT\');}return false;}dataContain[numBuckets-1]=new hcArrayStorage();dataContain[numBuckets-1].add(request.params.getName(maxId),request.params.getValue(maxId));}request.params.remove(maxId);maxId=request.params.getMaxLengthItem();}var numGets=dataContain.length;var req=null;var callId;for(i=0;i<numGets;i++){var part=i+1;var outOf=numGets;dataContain[i].add(\'part\',part);dataContain[i].add(\'outof\',outOf);var partial=true;if(i==0){req=new lpRequest(this.protocolVer,request.BaseUrl,dataContain[i],request.callbackFunc,request.requireConfirm,request.maxretries,this.prunIdentify,this.lpjson,request.dataEncoding,this.browser,request.postAutoConfirm,request.spImmediateCleanup,partial,part,outOf,request.forceget,request.forcePost,request.encodingBlankUrl,request.minimizePost,request.minimizePostMaxGets,request.allowTruncate);callId=req.callId;req.callId=callId+\'!\'+(i+1);}else{var tmpReq=new lpRequest(this.protocolVer,request.BaseUrl,dataContain[i],request.callbackFunc,request.requireConfirm,request.maxretries,this.prunIdentify,this.lpjson,request.dataEncoding,this.browser,request.postAutoConfirm,request.spImmediateCleanup,partial,part,outOf,request.forceget,request.forcePost,request.encodingBlankUrl,request.minimizePost,request.minimizePostMaxGets,request.allowTruncate);tmpReq.callId=callId+\'!\'+(i+1);this.partialQueue[tmpReq.callId]=tmpReq;}}return req;};lpConnectionLibrary.prototype.hasNonLatinChars=function(params){for(var i=0;i<params.size();i++){if(params.get(i).indexOf("%u")!=-1){return true;}}return false;};lpConnectionLibrary.prototype.BrowserSniff=function(){var agt=navigator.userAgent.toLowerCase();if(agt.indexOf("safari")!=-1){return \'SAFARI\';}if(document.layers){return "NS";}if(document.all){var is_opera=(agt.indexOf("opera")!=-1);var is_konq=(agt.indexOf("konqueror")!=-1);if(is_opera){return "OPR";}else{if(is_konq){return "KONQ";}else{return "IE";}}}if(document.getElementById){var is_ff=(agt.indexOf("firefox")!=-1);if(is_ff){return "FF";}return "MOZ";}return "MOZ";};lpConnectionLibrary.prototype.GetCallbackFunc=function(usrCallId){var qSize=this.queue.length;for(var i=0;i<qSize;i++){if(this.queue[i].callId==usrCallId){return this.queue[i].callbackFunc;}}return null;};lpConnectionLibrary.prototype.CleanUpBusySpecialPost=function(callID){if(typeof(callID)==\'undefined\'){callID=null;}for(var i=0;i<this.spPostIframesBusy.length;i++){if((this.spPostIframesBusy[i][\'spImmediateCleanup\']&&this.spPostIframesBusy[i][\'callMade\'])||this.spPostIframesBusy[i][\'callID\']==callID){this.releaseIframe(this.spPostIframesBusy[i][\'callID\']);}}};lpConnectionLibrary.prototype.garbageCollection=function(){if(this.DebugDisplay){lpMTagDebug.Display(\'Garbage Collection\',\'OK\',\'EMT\');}this.queue.sort(this.SortQueue);var confirmedCnt=0;var i;for(i=0;i<this.queue.length;i++){if(this.queue[i].confirmed){if(this.queue[i].usedget){this.queue[i].removeScriptTag();}confirmedCnt++;}}this.queue.splice(0,confirmedCnt);this.garbageCollectCounter++;this.CleanUpBusySpecialPost();var timeNow=new Date().getTime();for(i=0;i<this.queue.length;i++){if(!this.queue[i].confirmed&&(timeNow-this.queue[i].timeStamp.getTime())>this.callTimeoutPeriod*1000){if(this.queue[i].retries<this.queue[i].maxretries){this.queue[i].retries++;this.callCounter++;this.reconfirmedCalls++;if(this.DebugDisplay){lpMTagDebug.Display(\'Retrying \'+this.queue[i].retries+\'/\'+this.queue[i].maxretries+\' callId=\'+this.queue[i].callId,\'DEBUG\',\'EMT\');}this.queue[i].timeStamp=new Date();if(this.queue[i].usedget){this.queue[i].MakeCallByScript();}else{if(this.usedSpecialPost){this.CleanUpBusySpecialPost(this.queue[i].callId);this.specialPostHandler(this.queue[i].callId);}else{this.queue[i].MakeCallByIframe(this.browser);}}}else{this.queue[i].confirmed=true;if(this.DebugDisplay){lpMTagDebug.Display(\'Timeout for callId=\'+this.queue[i].callId,\'DEBUG\',\'EMT\');}var lpDataObj={"ResultSet":{"lpCallId":this.queue[i].callId,"lpCallError":"TIMEOUT"}};this.CallUsrCallbackFunc(lpDataObj);}}}};lpConnectionLibrary.prototype.Process=function(lpDataObj){if(lpDataObj==null){if(this.DebugDisplay){lpMTagDebug.Display(\'Callback No data recieved\',\'ERROR\',\'EMT\');}return;}this.lpCallbackCnt++;lpDataObj.ServiceInfo={};if(lpDataObj.ResultSet.lpCallId==0||lpDataObj.ResultSet.lpCallId==null||lpDataObj.ResultSet.lpCallId==\'\'){if(this.DebugDisplay){lpMTagDebug.Display(\'Callback No Call ID recieved\',\'ERROR\',\'EMT\');}return;}lpDataObj.ServiceInfo.requestType=\'REGULAR\';lpDataObj.ServiceInfo.resendCall=false;lpDataObj.ServiceInfo.origCallId=lpDataObj.ResultSet.lpCallId;if(typeof(lpDataObj.ResultSet.lpData)!=\'undefined\'&&typeof(lpDataObj.ResultSet.lpData)==\'object\'&&typeof(lpDataObj.ResultSet.lpData[0])!=\'undefined\'){if(typeof(lpDataObj.ResultSet.lpData[0].TYPE)!=\'undefined\'){lpDataObj.ServiceInfo.requestType=lpDataObj.ResultSet.lpData[0].TYPE;}if(typeof(lpDataObj.ResultSet.lpData[0].RESEND)!=\'undefined\'){lpDataObj.ServiceInfo.resendCall=lpDataObj.ResultSet.lpData[0].RESEND;}}if(lpDataObj.ServiceInfo.resendCall){this.resendCounter++;}if(lpDataObj.ServiceInfo.requestType==\'PARTIAL REQUEST\'){lpDataObj.ResultSet.lpCallId=lpDataObj.ResultSet.lpCallId+\'!\'+lpDataObj.ResultSet.lpData[0].PART;}if(this.DebugDisplay){lpMTagDebug.Display(\'Callback callId=\'+lpDataObj.ResultSet.lpCallId,\'DEBUG\',\'EMT\');}if(typeof(lpDataObj.ResultSet.lpCallConfirm)==\'undefined\'||lpDataObj.ResultSet.lpCallConfirm==\'\'){lpDataObj.ResultSet.lpCallConfirm=lpDataObj.ResultSet.lpCallId;}else{lpDataObj.ResultSet.lpCallConfirm+=\',\'+lpDataObj.ResultSet.lpCallId;}var req;if(lpDataObj.ServiceInfo.requestType==\'PARTIAL REQUEST\'&&lpDataObj.ServiceInfo.resendCall){req=this.fullForPartialQueue[lpDataObj.ServiceInfo.origCallId];delete this.fullForPartialQueue[lpDataObj.ServiceInfo.origCallId];if(this.DebugDisplay){lpMTagDebug.Display(\'CallId=\'+lpDataObj.ResultSet.lpCallId+\' Deleted - fullForPartialQueue[\'+lpDataObj.ServiceInfo.origCallId+\']\',\'DEBUG\',\'EMT\');}}else{req=this.getRequestForCallId(lpDataObj.ResultSet.lpCallId);if(req!=null&&req.partial){req=this.fullForPartialQueue[lpDataObj.ServiceInfo.origCallId];}}if(lpDataObj.ServiceInfo.requestType!=\'PARTIAL REQUEST\'){if(this.fullForPartialQueue[lpDataObj.ServiceInfo.origCallId]){delete this.fullForPartialQueue[lpDataObj.ServiceInfo.origCallId];if(this.DebugDisplay){lpMTagDebug.Display(\'CallId=\'+lpDataObj.ResultSet.lpCallId+\' Deleted fullForPartialQueue[\'+lpDataObj.ServiceInfo.origCallId+\']\',\'DEBUG\',\'EMT\');}}}if(req==null){if(this.DebugDisplay){lpMTagDebug.Display(\'REQUEST is NULL callId=\'+lpDataObj.ServiceInfo.origCallId,\'ERROR\',\'EMT\');}}this.confirmConnection(lpDataObj.ResultSet.lpCallConfirm);if(lpDataObj.ServiceInfo.requestType==\'PARTIAL REQUEST\'){var callNum;var outOfcalls;if(typeof(lpDataObj.ResultSet.lpData)!=\'undefined\'&&typeof(lpDataObj.ResultSet.lpData)==\'object\'){if(typeof(lpDataObj.ResultSet.lpData[0].PART)!=\'undefined\'){callNum=lpDataObj.ResultSet.lpData[0].PART;}if(typeof(lpDataObj.ResultSet.lpData[0].OUTOF)!=\'undefined\'){outOfcalls=lpDataObj.ResultSet.lpData[0].OUTOF;}}if(lpDataObj.ServiceInfo.resendCall){for(var i=(callNum+1);i<=outOfcalls;i++){var cid=lpDataObj.ServiceInfo.origCallId+\'!\'+i;delete this.partialQueue[cid];}}else{try{var nextCallId=lpDataObj.ServiceInfo.origCallId+\'!\'+(callNum+1);if(this.DebugDisplay){lpMTagDebug.Display(\'Partial Call Response recieved  - \'+lpDataObj.ResultSet.lpCallId+\' part=\'+callNum+\' outof=\'+outOfcalls,\'DEBUG\',\'EMT\');}var request=this.partialQueue[nextCallId];if(request!=null){delete this.partialQueue[nextCallId];if(request.part==request.outOf){request.callId=this.splitPartialFromStr(request.callId);}this.makeTheCall(request,\'get\');}else{if(lpMTagDebug){lpMTagDebug.Display(\'Partial Call NOT found for id=\'+nextCallId,\'ERROR\',\'EMT\');}}}catch(e){if(lpMTagDebug){lpMTagDebug.Display(\'Partial Call Processing error for id=\'+lpDataObj.ResultSet.lpCallId+\' exception=\'+e,\'ERROR\',\'EMT\');}}return;}}if(typeof(lpDataObj.ResultSet.lpJS_Execute)!=\'undefined\'){var debug_msg=new Array();for(var MTagI=0;MTagI<lpDataObj.ResultSet.lpJS_Execute.length;MTagI++){var no_err_flag=true;var err_msg=\'\';var code_id=lpDataObj.ResultSet.lpJS_Execute[MTagI].code_id;try{eval(lpDataObj.ResultSet.lpJS_Execute[MTagI].js_code);}catch(hcExecError){this.lpExecuteErrors++;no_err_flag=false;err_msg=hcExecError;}if(this.DebugDisplay){if(no_err_flag){debug_msg[debug_msg.length]=\'OK Executed snippet=<strong>\'+code_id+\'</strong><!!>\'+\'EXEC-OK\';}else{debug_msg[debug_msg.length]=\'ERROR Executing snippet=<strong>\'+code_id+\'</strong> &nbsp #\'+err_msg+\'#\'+\'<!!>\'+\'ERROR\';}}}if(this.DebugDisplay){lpMTagDebug.DisplayArray(debug_msg,\'EMT\');}}if(typeof(lpDataObj.ResultSet.lpCallError)!=\'undefined\'&&this.DebugDisplay){lpMTagDebug.Display(\'ERROR Reply Recieved=\'+lpDataObj.ResultSet.lpCallError+\' &nbsp # CallID = \'+lpDataObj.ResultSet.lpCallId+\'#\',\'ERROR\',\'EMT\');}this.CallUsrCallbackFunc(lpDataObj,req);};lpConnectionLibrary.prototype.splitPartialFromStr=function(str){var temp=str.split(\'!\');return temp[0];};lpConnectionLibrary.prototype.CallUsrCallbackFunc=function(lpDataObj,request){var userCallbackFunc=this.GetCallbackFunc(lpDataObj.ResultSet.lpCallId);if(userCallbackFunc!=\'\'&&userCallbackFunc!=null){var no_err_flag=true;var err_msg=\'\';try{userCallbackFunc(lpDataObj,request);}catch(hcExecError){no_err_flag=false;err_msg=hcExecError;}if(this.DebugDisplay){if(no_err_flag){lpMTagDebug.Display(\'OK Executed User CallBackFunction - \'+lpDataObj.ResultSet.lpCallId,\'EXEC-OK\',\'EMT\');}else{lpMTagDebug.Display(\'ERROR Executing User CallBackFunction=\'+userCallbackFunc+\' &nbsp #\'+err_msg+\'#\',\'ERROR\',\'EMT\');}}}};if(typeof(lpConnLib)==\'undefined\'){function lpJSLibrary(){}var lpJSLib=new lpJSLibrary();var lpConnLib=new lpConnectionLibrary();lpConnLib.garbageTimer=setInterval(\'lpConnLib.garbageCollection()\',lpConnLib.garbagePeriod*1000);}function lpMonitorTag(){this.maxretries=3;this.maxErrorCnt=2;this.connErrorCnt=0;this.errorDelay=10;if(typeof(lpMTagConfig.lpProtocol)==\'undefined\'){lpMTagConfig.lpProtocol=(document.location.toString().indexOf("https:")==0)?"https":"http";}this.lpURL=lpMTagConfig.lpProtocol+\'://\'+lpMTagConfig.lpServer+\'/hc/\'+lpMTagConfig.lpNumber+\'/\';this.lpPageLocation=document.location.toString();if(typeof(lpMTagConfig.lpUseSecureCookies)==\'undefined\'){lpMTagConfig.lpUseSecureCookies=false;}if(typeof(lpMTagConfig.sendCookies)==\'undefined\'){lpMTagConfig.sendCookies=true;}if(typeof(lpMTagConfig.lpSendCookies)==\'undefined\'){lpMTagConfig.lpSendCookies=false;}this.dataCookieName=\'LP_DATA_COOKIE\';this.lpScriptType=\'SERVERBASED\';this.lpVisitorStatus=\'INSITE_STATUS\';this.lpCmd=\'mTagKnockPage\';this.webServerCookie=\'LPNMT_DOMAIN-\'+lpMTagConfig.lpNumber;this.lpPageID=Math.round(Math.random()*9999999999);this.title=\'\';if(typeof(document.title)!="undefined"&&document.title.length>0){this.title=document.title;}this.referrer=\'\';if(typeof(document.referrer)!="undefined"&&document.referrer.length>0){this.referrer=document.referrer;}this.lpJavaEnabled=(this.lpIsJavaEnabled()?\'true\':\'false\');this.lpScriptVersion=\'1.1\';this.lpLoopTimer=-1;this.lpFirstInPage=true;this.lpKnockPageRequestDelay=0;this.lpStartPageRequestDelay=0;this.lpFirstInPageRequestDelay=0;this.lpInPageRequestDelay=30;this.lpDelayAfterPost=10;this.lpBrowser=lpConnLib.browser;this.lpDataToSend=\'\';if(typeof(lpMTagConfig.activePlugin)==\'undefined\'){lpMTagConfig.activePlugin=\'none\';}if(typeof(lpMTagConfig.enableActivityMon)!=\'undefined\'){this.activityMonitor=lpMTagConfig.enableActivityMon;}else{this.activityMonitor=true;}if(typeof(lpMTagConfig.inactivityPeriod)!=\'undefined\'){this.inactivityPeriod=lpMTagConfig.inactivityPeriod;}else{this.inactivityPeriod=120;}if(typeof(lpMTagConfig.actPollingInterval)!=\'undefined\'){this.actPollingInterval=lpMTagConfig.actPollingInterval;}else{this.actPollingInterval=3;}this.lastActiveDate=new Date();if(this.activityMonitor){lpMTagConfig.visitorActive=true;if(typeof(lpMTagConfig.pageVar)==\'undefined\'){lpMTagConfig.pageVar=[];}lpMTagConfig.pageVar[lpMTagConfig.pageVar.length]=\'visitorActive=1\';if(window.attachEvent){document.attachEvent(\'onmousedown\',this.MonitorActivity);document.attachEvent(\'onmousemove\',this.MonitorActivity);document.attachEvent(\'onmouseover\',this.MonitorActivity);window.attachEvent(\'onresize\',this.MonitorActivity);window.attachEvent(\'onblur\',this.MonitorActivity);window.attachEvent(\'onfocus\',this.MonitorActivity);document.attachEvent(\'onkeydown\',this.MonitorActivity);document.attachEvent(\'onscroll\',this.MonitorActivity);}else{window.addEventListener("mousedown",this.MonitorActivity,false);window.addEventListener("mousemove",this.MonitorActivity,false);window.addEventListener("mouseover",this.MonitorActivity,false);window.addEventListener("scroll",this.MonitorActivity,false);window.addEventListener("resize",this.MonitorActivity,false);window.addEventListener("blur",this.MonitorActivity,false);window.addEventListener("focus",this.MonitorActivity,false);window.addEventListener("keydown",this.MonitorActivity,false);}this.activityTimer=setInterval(this.checkActivity,this.actPollingInterval*1000);}this.cookieRemovedCnt=0;}lpMonitorTag.prototype.MonitorActivity=function(){lpMTag.lastActiveDate=new Date();};lpMonitorTag.prototype.checkActivity=function(){var currentTime=new Date().getTime();var lastActiveTime=lpMTag.lastActiveDate.getTime();var actStatus=lpMTagConfig.visitorActive;actStatus=(currentTime-lastActiveTime)<=(lpMTag.inactivityPeriod*1000);if(actStatus!=lpMTagConfig.visitorActive){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'Visitor Active STATUS= \'+(actStatus?\'1\':\'0\'),\'DEBUG\',\'EMT\');}lpMTagConfig.pageVar[lpMTagConfig.pageVar.length]=\'visitorActive=\'+(actStatus?\'1\':\'0\');lpMTagConfig.visitorActive=actStatus;}};lpMonitorTag.prototype.removeUrlParameter=function(url,parameter){var pnt=url.indexOf(\'&\'+parameter+\'=\');if(pnt>-1){var tmp=url.substring(pnt+(\'&\'+parameter+\'=\').length);var endpnt=tmp.indexOf(\'&\');if(endpnt>-1){url=url.substring(0,pnt)+tmp.substring(endpnt);}else{url=url.substring(0,pnt);}}return url;};lpMonitorTag.prototype.addFirstPartyCookies=function(url,cmd,params){if(typeof(cmd)==\'undefined\'){var pnt=url.indexOf(\'&cmd=\');if(pnt>-1){var tmp=url.substring(pnt+5);if(tmp.indexOf(\'&\')>-1){tmp=tmp.substring(0,tmp.indexOf(\'&\'));}cmd=tmp;}else{cmd=\'\';}}if(typeof(lpMTagConfig.useFirstParty)!=\'undefined\'&&lpMTagConfig.useFirstParty||cmd==\'mTagKnockPage\'){var vid=this.lpGetCookie(lpMTagConfig.FPC_VID_NAME?lpMTagConfig.FPC_VID_NAME:lpMTagConfig.lpNumber+\'-VID\');var skey=this.lpGetCookie(lpMTagConfig.FPC_SKEY_NAME?lpMTagConfig.FPC_SKEY_NAME:lpMTagConfig.lpNumber+\'-SKEY\');var contId=this.lpGetCookie(lpMTagConfig.FPC_CONT_NAME?lpMTagConfig.FPC_CONT_NAME:\'HumanClickSiteContainerID_\'+lpMTagConfig.lpNumber);if(url.indexOf(\'?\')==-1){url+=\'?\';}if(url.indexOf(\'&visitor=\')>-1){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'MTAG FPC Found &visitor in the url - removing\',\'DEBUG\',\'EMT\');}url=this.removeUrlParameter(url,\'visitor\');}if(url.indexOf(\'&msessionkey=\')>-1){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'MTAG FPC Found &msessionkey in the url - removing\',\'DEBUG\',\'EMT\');}url=this.removeUrlParameter(url,\'msessionkey\');}if(url.indexOf(\'&siteContainer=\')>-1){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'MTAG FPC Found &siteContainer in the url - removing\',\'DEBUG\',\'EMT\');}url=this.removeUrlParameter(url,\'siteContainer\');}if(typeof(params)!=\'undefined\'){var idx;idx=params.getByName(\'visitor\');if(idx>-1){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'MTAG FPC Found visitor in params - removing\',\'DEBUG\',\'EMT\');}params.remove(idx);}idx=params.getByName(\'msessionkey\');if(idx>-1){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'MTAG FPC Found msessionkey in params - removing\',\'DEBUG\',\'EMT\');}params.remove(idx);}idx=params.getByName(\'siteContainer\');if(idx>-1){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'MTAG FPC Found siteContainer in params - removing\',\'DEBUG\',\'EMT\');}params.remove(idx);}}if(vid!=null){url+=\'&visitor=\'+vid;}if(skey!=null){url+=\'&msessionkey=\'+skey;}if(contId!=null){if(typeof(lpMTagConfig.allowThirdPartyByServer)!=\'undefined\'&&!lpMTagConfig.allowThirdPartyByServer){url+=\'&siteContainer=\'+contId;}}}return url;};lpMonitorTag.prototype.mtagAddReqToQueue=function(req){this.mtagAddToQueue(req.BaseUrl,req.params,req.callbackFunc,req.requireConfirm,req.maxretries,req.forceget,req.postAutoConfirm,req.lpjson,req.dataEncoding,req.forcePost,req.usedSpecialPost,req.spImmediateCleanup,req.encodingBlankUrl,req.minimizePost,req.minimizePostMaxGets,req.allowTruncate);};lpMonitorTag.prototype.mtagAddToQueue=function(Url,params,Callback,requireConfirm,maxretries,forceget,onPostAutoConfirm,lpjson,dataEncoding,forcePost,specialPost,spImmediateCleanup,encodingBlankUrl,minimizePost,minimizePostMaxGets,allowTruncate){var cmd=params.getValue(params.getByName(\'cmd\'));Url=this.addFirstPartyCookies(Url,cmd,params);Url=this.addStaticCommandstoUrl(Url,params);params=this.avoidPost(Url,params);return lpConnLib.addToQueue(Url,params,Callback,requireConfirm,maxretries,forceget,onPostAutoConfirm,lpjson,dataEncoding,forcePost,specialPost,spImmediateCleanup,encodingBlankUrl,minimizePost,minimizePostMaxGets,allowTruncate);};lpMonitorTag.prototype.addStaticCommandstoUrl=function(url,params){var indx;var value=\'\';if(url.indexOf(\'?\')==-1){url+=\'?\';}indx=params.getByName(\'site\');if(indx!=-1){value=params.getValue(indx);url+=\'&site=\'+value;params.remove(indx);}indx=params.getByName(\'cmd\');if(indx!=-1){value=params.getValue(indx);url+=\'&cmd=\'+value;params.remove(indx);}return url;};lpMonitorTag.prototype.avoidPost=function(Url,params,cmd){var avoidPost=this.getAvoiPostSettings();if(!avoidPost.avoidPost){return params;}var r=new lpRequest(lpConnLib.protocolVer,Url,params,null,false,0,lpConnLib.prunIdentify,lpConnLib.lpjson,\'UTF-8\',lpConnLib.browser,false,true,undefined,0,0,false,false);var baseUrl=r.BuildBaseCallUrl();var urlLength=baseUrl.length+params.fullLength()+1;var originalCookie=\'\';if(urlLength>lpConnLib.maxurlgetlength){var indx=params.getByName(\'cookie\');if(indx>-1){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost true over Limit \'+urlLength+\': dropping cookies\',\'DEBUG\',\'EMT\');}originalCookie=params.getValue(indx);params.remove(indx);this.cookieRemovedCnt++;if(this.cookieRemovedCnt>1){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost setting sendCookies to FALSE\',\'DEBUG\',\'EMT\');}lpMTagConfig.sendCookies=false;}}else{if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost true over Limit \'+urlLength+\': cookies not FOUND\',\'DEBUG\',\'EMT\');}}urlLength=baseUrl.length+params.fullLength()+1;if(urlLength>lpConnLib.maxurlgetlength){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost true over Limit \'+urlLength+\': after dropping cookies - trimming\',\'DEBUG\',\'EMT\');}params=this.trimParam(params,\'title\',avoidPost.emtMaxTitleLength);urlLength=baseUrl.length+params.fullLength()+1;if(urlLength>lpConnLib.maxurlgetlength){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost over Limit \'+urlLength,\'DEBUG\',\'EMT\');}params=this.trimParam(params,\'referrer\',avoidPost.emtMaxReferLength);}urlLength=baseUrl.length+params.fullLength()+1;if(urlLength>lpConnLib.maxurlgetlength){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost over Limit \'+urlLength,\'DEBUG\',\'EMT\');}params=this.trimParam(params,\'page\',avoidPost.emtMaxUrlLength);}urlLength=baseUrl.length+params.fullLength()+1;if(urlLength>lpConnLib.maxurlgetlength){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost over Limit \'+urlLength,\'DEBUG\',\'EMT\');}params=this.trimParam(params,\'title\',avoidPost.emtMinTitleLength);}urlLength=baseUrl.length+params.fullLength()+1;if(urlLength>lpConnLib.maxurlgetlength){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost over Limit \'+urlLength,\'DEBUG\',\'EMT\');}params=this.trimParam(params,\'referrer\',avoidPost.emtMinReferLength);}urlLength=baseUrl.length+params.fullLength()+1;if(urlLength>lpConnLib.maxurlgetlength){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost over Limit \'+urlLength,\'DEBUG\',\'EMT\');}params=this.trimParam(params,\'page\',avoidPost.emtMinUrlLength);}urlLength=baseUrl.length+params.fullLength()+1;if(urlLength>lpConnLib.maxurlgetlength){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'emtAvoidPost true nothing helps over limit  \'+urlLength+\': DOING POST\',\'DEBUG\',\'EMT\');}var idx=params.getByName(\'page\');if(idx>-1){params.remove(idx);params.add(\'page\',this.lpPageLocation);}idx=params.getByName(\'referrer\');if(idx>-1){params.remove(idx);params.add(\'referrer\',this.referrer);}idx=params.getByName(\'title\');if(idx>-1){params.remove(idx);params.add(\'title\',this.title);}if(originalCookie!=\'\'){this.cookieRemovedCnt--;params.add(\'cookie\',originalCookie);}}}}return params;};lpMonitorTag.prototype.trimParam=function(p,name,maxSize){var str=\'\';var indx=p.getByName(name);if(indx>-1){str=p.getValueEsc(indx);}if(str.length>maxSize){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'trimParam \'+name.toUpperCase()+\' length \'+str.length+\' to \'+maxSize,\'DEBUG\',\'EMT\');}str=this.trimLength(str,maxSize);p.remove(indx);if(str!=\'\'){p.add(name,str,true);}}return p;};lpMonitorTag.prototype.getAvoiPostSettings=function(){var ret={avoidPost:false};if(lpMTagConfig.emtAvoidPOST||(typeof(lpMTagConfig.emtAvoidPOST)==\'undefined\'&&lpMTagConfig.sgpemtAvoidPOST)){ret.avoidPost=true;}else{return ret;}if(typeof(lpMTagConfig.emtMaxUrlLength)!=\'undefined\'){ret.emtMaxUrlLength=lpMTagConfig.emtMaxUrlLength;}else{if(typeof(lpMTagConfig.sgpemtMaxUrlLength)==\'undefined\'){ret.emtMaxUrlLength=500;}else{ret.emtMaxUrlLength=lpMTagConfig.sgpemtMaxUrlLength;}}if(typeof(lpMTagConfig.emtMinUrlLength)!=\'undefined\'){ret.emtMinUrlLength=lpMTagConfig.emtMinUrlLength;}else{if(typeof(lpMTagConfig.sgpemtMinUrlLength)==\'undefined\'){ret.emtMinUrlLength=100;}else{ret.emtMinUrlLength=lpMTagConfig.sgpemtMinUrlLength;}}if(typeof(lpMTagConfig.emtMaxReferLength)!=\'undefined\'){ret.emtMaxReferLength=lpMTagConfig.emtMaxReferLength;}else{if(typeof(lpMTagConfig.sgpemtMaxReferLength)==\'undefined\'){ret.emtMaxReferLength=300;}else{ret.emtMaxReferLength=lpMTagConfig.sgpemtMaxReferLength;}}if(typeof(lpMTagConfig.emtMinReferLength)!=\'undefined\'){ret.emtMinReferLength=lpMTagConfig.emtMinReferLength;}else{if(typeof(lpMTagConfig.sgpemtMinReferLength)==\'undefined\'){ret.emtMinReferLength=100;}else{ret.emtMinReferLength=lpMTagConfig.sgpemtMinReferLength;}}if(typeof(lpMTagConfig.emtMaxTitleLength)!=\'undefined\'){ret.emtMaxTitleLength=lpMTagConfig.emtMaxTitleLength;}else{if(typeof(lpMTagConfig.sgpemtMaxTitleLength)==\'undefined\'){ret.emtMaxTitleLength=100;}else{ret.emtMaxTitleLength=lpMTagConfig.sgpemtMaxTitleLength;}}if(typeof(lpMTagConfig.emtMinTitleLength)!=\'undefined\'){ret.emtMinTitleLength=lpMTagConfig.emtMinTitleLength;}else{if(typeof(lpMTagConfig.sgpemtMinTitleLength)==\'undefined\'){ret.emtMinTitleLength=50;}else{ret.emtMinTitleLength=lpMTagConfig.sgpemtMinTitleLength;}}return ret;};lpMonitorTag.prototype.lpSetCallParams=function(lpCmd,extra){var i;var tmpData;var CallParams=new hcArrayStorage();CallParams.add(\'site\',lpMTagConfig.lpNumber);CallParams.add(\'cmd\',lpCmd);if(lpCmd!=\'mTagKnockPage\'){CallParams.add(\'page\',this.lpPageLocation);}CallParams.add(\'id\',this.lpPageID);CallParams.add(\'javaSupport\',this.lpJavaEnabled);CallParams.add(\'visitorStatus\',this.lpVisitorStatus);if(lpCmd==\'mTagInPage\'){var data=this.lpGetCookie(this.dataCookieName);if(data!=\'\'&&data!=null){this.lpDeleteCookie(this.dataCookieName);CallParams.add(data);}}if(lpCmd!=\'mTagKnockPage\'){if(typeof(lpMTagConfig.defaultChatInvite)!=\'undefined\'){CallParams.add(\'defCInvite\',lpMTagConfig.defaultChatInvite);}if(typeof(lpMTagConfig.defaultVoiceInvite)!=\'undefined\'){CallParams.add(\'defVInvite\',lpMTagConfig.defaultVoiceInvite);}if(typeof(lpMTagConfig.defaultMultiChannelInvite)!=\'undefined\'){CallParams.add(\'defMCInvite\',lpMTagConfig.defaultMultiChannelInvite);}if(typeof(lpMTagConfig.defaultInvite)!=\'undefined\'){CallParams.add(\'defInvite\',lpMTagConfig.defaultInvite);}if(typeof(lpMTagConfig.cobrowseEnabled)!=\'undefined\'){if(typeof(lpMTagConfig.lpActivePlugin)==\'undefined\'){lpMTagConfig.lpActivePlugin=\'none\';}CallParams.add(\'activePlugin\',lpMTagConfig.lpActivePlugin);CallParams.add(\'cobrowse\',\'true\');if(typeof(lpMTagConfig.pageWindowName)!=\'undefined\'){CallParams.add(\'pageWindowName\',lpMTagConfig.pageWindowName);}else{var name=\'\';try{if(top&&typeof(top.document)!=\'undefined\'){name=\'\'+top.name;}}catch(e){name=\'\';}if(name!=\'\'){if(escape(name).length>250){name=this.trimLength(name,250);}CallParams.add(\'pageWindowName\',name);}}if(typeof(lpMTagConfig.lpOperatorPageType)!="undefined"){CallParams.add(\'cobrowsetitle\',lpMTagConfig.lpOperatorPageType);}if(typeof(lpMTagConfig.lpOperatorPageUrl)!="undefined"){CallParams.add(\'cobrowseurl\',lpMTagConfig.lpOperatorPageUrl);}}}if(lpCmd==\'mTagStartPage\'||lpCmd==\'mTagInPage\'){var shortUdeNotation=false;if(typeof(lpMTagConfig.useShortUDEnotation)!=\'undefined\'&&lpMTagConfig.useShortUDEnotation){shortUdeNotation=true;}if(typeof(lpMTagConfig.pageVar)!=\'undefined\'&&lpMTagConfig.pageVar.length>0){for(i=0;i<lpMTagConfig.pageVar.length;i++){if(shortUdeNotation){CallParams.add(\'PV!\'+lpMTagConfig.pageVar[i],undefined,true);}else{CallParams.add(\'PAGEVAR!\'+lpMTagConfig.pageVar[i],undefined,true);}}lpMTagConfig.pageVar=new Array();}if(typeof(lpMTagConfig.sessionVar)!=\'undefined\'&&lpMTagConfig.sessionVar.length>0){for(i=0;i<lpMTagConfig.sessionVar.length;i++){if(shortUdeNotation){CallParams.add(\'SV!\'+lpMTagConfig.sessionVar[i],undefined,true);}else{CallParams.add(\'SESSIONVAR!\'+lpMTagConfig.sessionVar[i],undefined,true);}}lpMTagConfig.sessionVar=new Array();}if(typeof(lpMTagConfig.visitorVar)!=\'undefined\'&&lpMTagConfig.visitorVar.length>0){for(i=0;i<lpMTagConfig.visitorVar.length;i++){if(shortUdeNotation){CallParams.add(\'VV!\'+lpMTagConfig.visitorVar[i],undefined,true);}else{CallParams.add(\'VISITORVAR!\'+lpMTagConfig.visitorVar[i],undefined,true);}}lpMTagConfig.visitorVar=new Array();}}if(lpCmd==\'mTagKnockPage\'){if(typeof(lpMTagConfig.dynButton)!=\'undefined\'&&lpMTagConfig.dynButton.length>0){var dbut=\'\';for(i=0;i<lpMTagConfig.dynButton.length;i++){if(i>0){dbut+=\'#\';}dbut+=lpMTagConfig.dynButton[i].name+\'|\';if(typeof(lpMTagConfig.dynButton[i].ovr)!=\'undefined\'){dbut+=lpMTagConfig.dynButton[i].ovr+\'|\';}else{dbut+=\'null|\';}if(typeof(lpMTagConfig.dynButton[i].pid)!=\'undefined\'){dbut+=lpMTagConfig.dynButton[i].pid+\'|\';}else{dbut+=\'null|\';}}CallParams.add(\'dbut\',dbut);}}if(typeof(lpMTagConfig.sendSnippets)!=\'undefined\'){CallParams.add(\'sendSnippets\',lpMTagConfig.sendSnippets);lpMTagConfig.sendSnippets=undefined;}if(typeof(extra)!=\'undefined\'){tmpData=extra.split(\'&\');for(i=0;i<tmpData.length;i++){if(tmpData[i]!=\'\'){CallParams.add(tmpData[i]);}}}if(this.lpDataToSend!=\'\'){tmpData=this.lpDataToSend.split(\'&\');for(i=0;i<tmpData.length;i++){if(tmpData[i]!=\'\'){CallParams.add(tmpData[i]);}}this.lpDataToSend=\'\';}if(lpCmd!=\'mTagKnockPage\'&&lpCmd!=\'mTagInPage\'){if(this.title!=\'\'){CallParams.add(\'title\',this.title);}if(this.referrer!=\'\'){CallParams.add(\'referrer\',this.referrer);}}if(lpCmd!=\'mTagKnockPage\'&&lpMTagConfig.lpSendCookies&&lpMTagConfig.sendCookies){var cookies=null;if(typeof(lpMTagConfig.GetPageCookies)==\'function\'){cookies=lpMTagConfig.GetPageCookies();}else{cookies=document.cookie;}if((typeof(cookies)==\'undefined\')||cookies==null){cookies=\'\';}if(!lpMTagConfig.cobrowseEnabled){CallParams.add(\'cobrowse\',\'true\');}CallParams.add(\'cookie\',cookies);}return CallParams;};lpMonitorTag.prototype.lpIsJavaEnabled=function(){var rc=false;var agent=navigator.appName;var ver=parseInt(navigator.appVersion);if(agent=="Microsoft Internet Explorer"){if((ver>=4)&&navigator.javaEnabled()){rc=true;}}else{for(var i=0;i<navigator.plugins.length;i++){rc=rc||(navigator.plugins[i].name.toUpperCase().indexOf("JAVA")!=-1);}}return rc;};lpMonitorTag.prototype.trimLength=function(str,max){if(str.length>max&&max>-1){return str.substring(0,max);}return str;};lpMonitorTag.prototype.lpFixProtocol=function(str){if((str!=null)&&(str.indexOf(\'http:\')==0)&&(lpMTagConfig.lpProtocol==\'https\')){return lpMTagConfig.lpProtocol+str.substring(4);}return str;};lpMonitorTag.prototype.lpFormData=function(formName,useCookie,fieldList,exclude,useSendPrefix){if(typeof(useCookie)==\'undefined\'){useCookie=false;}if(typeof(fieldList)==\'undefined\'){fieldList=null;}if(typeof(exclude)==\'undefined\'){exclude=false;}var hcForm=document.forms[formName];if(hcForm){var data=this.lpGetFormData(hcForm,fieldList,exclude,useSendPrefix);if(useCookie){this.lpAddToSetCookie(this.dataCookieName,data,lpMTagConfig.lpUseSecureCookies);}else{var cParam=new hcArrayStorage();cParam=this.lpSetCallParams(this.lpCmd,data);this.mtagAddToQueue(this.lpURL,cParam,this.MTagCallback,true,this.maxretries,false,1,1,lpMTagConfig.charSet);}return true;}else{if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'Cannot get the form=\'+formName,\'ERROR\',\'EMT\');}return false;}};lpMonitorTag.prototype.lpFormField=function(formName,fieldName,useCookie,useSendPrefix){return this.lpFormData(formName,useCookie,[fieldName],false,useSendPrefix);};lpMonitorTag.prototype.lpGetFormData=function(form,fieldList,exclude,useSendPrefix){var nvps=new Array();for(var e=0;form.length>e;e++){var el=form.elements[e];if((exclude&&!this.lpValueInArray(el.name,fieldList))||((!exclude&&this.lpValueInArray(el.name,fieldList)))){switch(el.type){case "text":case "password":case "hidden":nvps[nvps.length]=(el.name?escape(el.name):"undefined"+e)+"="+escape(el.value);break;case "select-one":case "select-multiple":{if(el.length){for(var m=0;el.length>m;m++){if(el[m].selected){nvps[nvps.length]=(el.name?escape(el.name):"undefined"+e)+"="+escape(el[m].value);}}}}break;case "checkbox":case "radio":{if(el.checked){nvps[nvps.length]=(el.name?escape(el.name):"undefined"+e)+"="+escape(el.value);}}break;case "file":case "image":case "reset":case "submit":case "button":default:if(el.tagName=="BUTTON"||el.tagName=="TEXTAREA"){nvps[nvps.length]=(el.name?escape(el.name):"undefined"+e)+"="+escape(el.value);}break;}}}var qs=\'\';for(var i=0;i<nvps.length;i++){if(typeof(useSendPrefix)!=\'undefined\'&&useSendPrefix!=""){qs+=useSendPrefix;}else{qs+="PV!";}qs+=\'\'+nvps[i]+\'&\';}return qs;};lpMonitorTag.prototype.lpValueInArray=function(value,list){if(typeof(list)==\'undefined\'){return false;}for(var i=0;i<list.length;i++){if(list[i]==value){return true;}}return false;};lpMonitorTag.prototype.lpSendData=function(data,immediate){if(data.length<=0){return false;}if(typeof(immediate)==\'undefined\'){immediate=false;}if(immediate){var send_data=new hcArrayStorage();send_data=this.lpSetCallParams(\'mTagUDEsend\',data);this.mtagAddToQueue(this.lpURL,send_data,null,false,0,false,0,1,lpMTagConfig.charSet);}else{this.lpDataToSend+=data+\'&\';}};lpMonitorTag.prototype.lpAddToSetCookie=function(name,value,secure,expires,path,domain){var cookieValue=this.lpGetCookie(name);if(cookieValue==null){cookieValue=\'\';}this.lpSetCookie(name,value+cookieValue,expires,path,domain,secure);};lpMonitorTag.prototype.lpSetCookie=function(name,value,expires,path,domain){var today=new Date();today.setTime(today.getTime());if(expires){expires=expires*1000*60*60*24;}var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+((expires)?";expires="+expires_date.toGMTString():"")+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+((lpMTagConfig.lpUseSecureCookies)?";secure":"");};lpMonitorTag.prototype.lpGetCookie=function(name){var start=document.cookie.indexOf(name+"=");if(typeof(name)==\'undefined\'||start==-1){return null;}var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length))){return null;}var end=document.cookie.indexOf(";",len);if(end==-1){end=document.cookie.length;}return unescape(document.cookie.substring(len,end));};lpMonitorTag.prototype.lpDeleteCookie=function(name,path,domain){if(this.lpGetCookie(name)){document.cookie=name+"="+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";}};lpMonitorTag.prototype.ifVisitorActions=function(data){if(typeof(lpMTagConfig.ifVisitorCode)!=\'undefined\'){for(var i=0;i<lpMTagConfig.ifVisitorCode.length;i++){var tempfunc=lpMTagConfig.ifVisitorCode[i];try{tempfunc(data);if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'OK Executing Visitor dependent function\',\'EXEC-OK\',\'EMT\');}}catch(hcError){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'ERROR Executing Visitor dependent function=\'+tempfunc+\' &nbsp #\'+hcError+\'#\',\'ERROR\',\'EMT\');}}}lpMTagConfig.ifVisitorCode=new Array();}lpMTagConfig.isVisitor=true;};lpMonitorTag.prototype.MTagCallback=function(lpDataObj,request){var delay=0;if(typeof(lpDataObj.ResultSet.lpCallError)!=\'undefined\'){lpMTag.connErrorCnt++;if(lpMTag.connErrorCnt<=lpMTag.maxErrorCnt){lpMTag.lpLoopTimer=setTimeout(\'lpMTag.lpMTagMain()\',lpMTag.errorDelay*1000);}return;}lpMTag.connErrorCnt=0;if(lpDataObj.ServiceInfo.resendCall){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'Resending connection \'+lpDataObj.ResultSet.lpCallId,\'WARN\',\'EMT\');}if(request!=null){lpMTag.mtagAddReqToQueue(request);}return;}if(lpMTag.lpCmd==\'mTagKnockPage\'){lpMTag.lpCmd=\'mTagStartPage\';delay=lpMTag.lpStartPageRequestDelay;}else{if(lpMTag.lpCmd==\'mTagStartPage\'){lpMTag.lpCmd=\'mTagInPage\';delay=lpMTag.lpFirstInPageRequestDelay;}else{delay=lpMTag.lpInPageRequestDelay;}lpMTag.ifVisitorActions();}if(!lpMTag.stopMTag){if(lpMTag.lpLoopTimer!=-1){clearTimeout(lpMTag.lpLoopTimer);}lpMTag.lpLoopTimer=setTimeout(\'lpMTag.lpMTagMain()\',delay*1000);}};lpMonitorTag.prototype.overrideLPServer=function(serverName,setCookie){if(setCookie){this.lpSetCookie(this.webServerCookie,serverName);}lpMTagConfig.lpServer=serverName;this.lpURL=lpMTagConfig.lpProtocol+\'://\'+lpMTagConfig.lpServer+\'/hc/\'+lpMTagConfig.lpNumber+\'/\';};lpMonitorTag.prototype.MTagOnLoad=function(){if(this.lpGetCookie(this.webServerCookie)!=null){this.overrideLPServer(this.lpGetCookie(this.webServerCookie),false);}if(typeof(lpMTagConfig.onLoadCode)!=\'undefined\'){for(var i=0;i<lpMTagConfig.onLoadCode.length;i++){var tempfunc=lpMTagConfig.onLoadCode[i];try{tempfunc();if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'OK Executing MTag ONLoad dependent function\',\'EXEC-OK\',\'EMT\');}}catch(hcError){if(lpConnLib.DebugDisplay){lpMTagDebug.Display(\'ERROR Executing MTag ONLoad dependent function=\'+tempfunc+\' &nbsp #\'+hcError+\'#\',\'ERROR\',\'EMT\');}}}lpMTagConfig.onLoadCode=new Array();}if(typeof(lpGetVariables)!=\'undefined\'&&typeof(lpGetVariables)==\'function\'){this.lpProcessUDEs(lpGetVariables());}if(typeof(lpUDEs)!=\'undefined\'){this.lpProcessUDEs(lpUDEs);}};lpMonitorTag.prototype.lpProcessUDEs=function(udes){for(var indx in udes){for(var i=0;i<udes[indx].length;i++){if(indx==\'session\'){if(typeof(lpMTagConfig.sessionVar)==\'undefined\'){lpMTagConfig.sessionVar=[];}lpMTagConfig.sessionVar[lpMTagConfig.sessionVar.length]=udes[indx][i];}else if(indx==\'page\'){if(typeof(lpMTagConfig.pageVar)==\'undefined\'){lpMTagConfig.pageVar=[];}lpMTagConfig.pageVar[lpMTagConfig.pageVar.length]=udes[indx][i];}else if(indx==\'visitor\'){if(typeof(lpMTagConfig.visitorVar)==\'undefined\'){lpMTagConfig.visitorVar=[];}lpMTagConfig.visitorVar[lpMTagConfig.visitorVar.length]=udes[indx][i];}}}};lpMonitorTag.prototype.lpMTagMain=function(forceGet){var cParam=new hcArrayStorage();if(typeof(forceGet)==\'undefined\'){forceGet=false;}cParam=this.lpSetCallParams(this.lpCmd);var callType=this.mtagAddToQueue(this.lpURL,cParam,this.MTagCallback,true,this.maxretries,forceGet,undefined,1,lpMTagConfig.charSet);if(callType==\'POST\'){if(this.lpCmd==\'mTagKnockPage\'){this.lpCmd=\'mTagStartPage\';}else if(this.lpCmd==\'mTagStartPage\'){this.lpCmd=\'mTagInPage\';}lpMTag.lpLoopTimer=setTimeout(\'lpMTag.lpMTagMain(true)\',lpMTag.lpDelayAfterPost*1000);}};var lpMTag=new lpMonitorTag();lpMTag.ver=\'8.6\';lpMTag.build=\'6\';lpMTag.MTagOnLoad();lpMTag.lpLoopTimer=setTimeout(\'lpMTag.lpMTagMain()\',lpMTag.lpKnockPageRequestDelay*1000);'}; function lpAddMonitorTag(src){if(typeof(src)=='undefined'||typeof(src)=='object'){src=lpMTagConfig.lpMTagSrc?lpMTagConfig.lpMTagSrc:'/hcp/html/mTag.js';}if(src.indexOf('http')!=0){src=lpMTagConfig.lpProtocol+"://"+lpMTagConfig.lpServer+src+'?site='+lpMTagConfig.lpNumber;}else{if(src.indexOf('site=')<0){if(src.indexOf('?')<0)src=src+'?';else src=src+'&';src=src+'site='+lpMTagConfig.lpNumber;}};var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('charset','iso-8859-1');s.setAttribute('src',src);document.getElementsByTagName('head').item(0).appendChild(s);} if (window.attachEvent) window.attachEvent('onload',lpAddMonitorTag); else window.addEventListener("load",lpAddMonitorTag,false);</script><!-- END LivePerson Monitor. -->

/*
 * jQuery 1.2.6 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008/07/24 14:22:43 $
 * $Rev: 5685 $
 */
(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else
for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else
while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();

/*
 * Superfish v1.4.1 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
 */

;(function($){
	$.superfish = {};
	$.superfish.o = [];
	$.superfish.op = {};
	$.superfish.defaults = {
		hoverClass	: 'sfHover',
		pathClass	: 'overideThisToUse',
		delay		: 800,
		animation	: {opacity:'show'},
		speed		: 'normal',
		oldJquery	: false, /* set to true if using jQuery version below 1.2 */
		disableHI	: false, /* set to true to disable hoverIntent usage */
		// callback functions:
		onInit		: function(){},
		onBeforeShow: function(){},
		onShow		: function(){}, /* note this name changed ('onshow' to 'onShow') from version 1.4 onward */
		onHide		: function(){}
	};
	$.fn.superfish = function(op){
		var bcClass = 'sfbreadcrumb',
			over = function(){
				var $$ = $(this), menu = getMenu($$);
				getOpts(menu,true);
				clearTimeout(menu.sfTimer);
				$$.showSuperfishUl().siblings().hideSuperfishUl();
			},
			out = function(){
				var $$ = $(this), menu = getMenu($$);
				var o = getOpts(menu,true);
				clearTimeout(menu.sfTimer);
				if ( !$$.is('.'+bcClass) ) {
					menu.sfTimer=setTimeout(function(){
						$$.hideSuperfishUl();
						if (o.$path.length){over.call(o.$path);}
					},o.delay);
				}		
			},
			getMenu = function($el){ return $el.parents('ul.superfish:first')[0]; },
			getOpts = function(el,menuFound){ el = menuFound ? el : getMenu(el); return $.superfish.op = $.superfish.o[el.serial]; },
			hasUl = function(){ return $.superfish.op.oldJquery ? 'li[ul]' : 'li:has(ul)'; };

		return this.each(function() {
			var s = this.serial = $.superfish.o.length;
			var o = $.extend({},$.superfish.defaults,op);
			o.$path = $('li.'+o.pathClass,this).each(function(){
				$(this).addClass(o.hoverClass+' '+bcClass)
					.filter(hasUl()).removeClass(o.pathClass);
			});
			$.superfish.o[s] = $.superfish.op = o;
			
			$(hasUl(),this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out)
			.not('.'+bcClass)
				.hideSuperfishUl();
			
			var $a = $('a',this);
			$a.each(function(i){
				var $li = $a.eq(i).parents('li');
				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
			});
			
			o.onInit.call(this);
			
		}).addClass('superfish');
	};
	
	$.fn.extend({
		hideSuperfishUl : function(){
			var o = $.superfish.op,
				$ul = $('li.'+o.hoverClass,this).add(this).removeClass(o.hoverClass)
					.find('>ul').hide().css('visibility','hidden');
			o.onHide.call($ul);
			return this;
		},
		showSuperfishUl : function(){
			var o = $.superfish.op,
				$ul = this.addClass(o.hoverClass)
					.find('>ul:hidden').css('visibility','visible');
			o.onBeforeShow.call($ul);
			$ul.animate(o.animation,o.speed,function(){ o.onShow.call(this); });
			return this;
		}
	});
	
	$(window).unload(function(){
		$('ul.superfish').each(function(){
			$('li',this).unbind('mouseover','mouseout','mouseenter','mouseleave');
		});
	});
})(jQuery);

	//<![CDATA[

	// Begin Variable Declarations

	wa_account="8C9E93899E989A9B9E8B9E"; wa_location=111;

	wa_pageName=location.pathname;  // you can customize the page name here

	// End Variable Declarations

	document.cookie='__support_check=1';wa_hp='http';

	wa_rf=document.referrer;wa_sr=window.location.search;

	wa_tz=new Date();if(location.href.substr(0,6).toLowerCase()=='https:')

	wa_hp='https';wa_data='&an='+escape(navigator.appName)+

	'&sr='+escape(wa_sr)+'&ck='+document.cookie.length+

	'&rf='+escape(wa_rf)+'&sl='+escape(navigator.systemLanguage)+

	'&av='+escape(navigator.appVersion)+'&l='+escape(navigator.language)+

	'&pf='+escape(navigator.platform)+'&pg='+escape(wa_pageName);

	wa_data=wa_data+'&cd='+

	screen.colorDepth+'&rs='+escape(screen.width+ ' x '+screen.height)+

	'&tz='+wa_tz.getTimezoneOffset()+'&je='+ navigator.javaEnabled();

	wa_img=new Image();wa_img.src=wa_hp+'://counter.hitslink.com/statistics.asp'+

	'?v=1&s='+wa_location+'&eacct='+wa_account+wa_data+'&tks='+wa_tz.getTime();

	 //]]>
var wa_isenc = (wa_img.src.indexOf('&eacct=') > 0); function wa_exit(l){var img,ln,pos,ext,b,dl,dlt,tz,k,m,tp;dlt="aif,bmp,docx,gif,jpeg,jpg,mp4,pict,png,pptx,raw,tif,tiff,wma,wmv,xlsx,dmg,aam,arc,au,avi,bak,bat,bin,cab,cfg,csv,dat,dd,dir,dll,doc,dcr,exe,fnt,gzip,gz,ico,img,hqx,inf,iso,jar,log,mid,midi,mov,mp3,mpg,mpeg,msi,nlm,pdf,ppt,psd,ram,rar,rpm,rtf,scr,scexe,swf,tar,tgz,tar,ttf,txt,wav,xls,xml,zip";ln='';tp=90;dl='';tz=new Date();b=l.href.toLowerCase();if(b.indexOf('?')>0)b=b.substring(0,b.indexOf('?'));if(b.indexOf('#')>0)b=b.substring(0,b.indexOf('#'));pos=b.lastIndexOf('.');if(pos>0){ext=b.substring(pos+1);if((dlt+',').indexOf(ext+',')> -1){ln=l.href;dl='1';}}k=tz.getTime();m=new Date();if(document.domain!=l.hostname)ln=l.href;else if(dl=='1')ln=l.pathname;if(ln!=''){if(ln.indexOf('javascript:')!=0&&l.name!='notrack'&&ln!='#'){img=new Image();img.src=wa_hp+"://loc1.hitsprocessor.com/track-link.aspx?" + (wa_isenc ? "e" : "") + "acct="+wa_account+"&s="+wa_location+"&dl="+dl+"&page="+escape(wa_pageName)+"&link="+escape(ln)+'&tks='+tz.getTime();if(navigator.userAgent.indexOf("Firefox")!= -1){while(!img.complete&&(m.getTime()-k)<tp){m=new Date()}}}}};function wa_add(o,t,fn){if(o.attachEvent){o['e'+t+fn]=fn;o[t+fn]=function(){o['e'+t+fn](window.event);};o.attachEvent('on'+t,o[t+fn]);}else o.addEventListener(t,fn,false);};function wa_rmv(o,t,fn){if(o.detachEvent){o.detachEvent('on'+t,o[t+fn]);o[t+fn]=null;}else o.removeEventListener(t,fn,false);};function wa_click(e){var s,l;s=e.srcElement?e.srcElement:e.target;l=wa_getLink(s);if(l){wa_exit(l)}};function wa_getLink(o){var l=o;if(l.tagName){if(l.tagName=='A'||l.tagName=='AREA'){return l;}}while(l.parentNode){l=l.parentNode;if(l.tagName){if(l.tagName=='A'||l.tagName=='AREA'){return l;}}}};function wa_ul(e){wa_rmv(document,'click',wa_click);wa_rmv(window,'unload',wa_ul);};wa_add(document,'click',wa_click);wa_add(window,'unload',wa_ul);var wa_n=navigator,wa_sl=0,wa_f=0,wa_wpf=0;if(wa_n.mimeTypes&&wa_n.mimeTypes.length){for(var wa_i=0;wa_i<wa_n.mimeTypes.length;wa_i++){wa_p=wa_n.mimeTypes[wa_i].type.indexOf('x-silverlight-');if(wa_p>0){wa_tmp=wa_n.mimeTypes[wa_i].type.substr(wa_p+14,1);if(wa_tmp>wa_sl){wa_sl=wa_tmp}}else if(wa_n.mimeTypes[wa_i].type.indexOf('x-silverlight')>0){if(wa_sl==0){wa_sl=1};}}}else if(window.ActiveXObject){try{var wa_ag=new ActiveXObject("AgControl.AgControl");for(var wa_i=5;wa_i>=1;wa_i--){if(wa_ag.IsVersionSupported(wa_i+'.5')){wa_sl=wa_i+.5;break;}if(wa_ag.IsVersionSupported(wa_i+'.1')){wa_sl=wa_i+.1;break;}if(wa_ag.IsVersionSupported(wa_i+'.0')){wa_sl=wa_i;break;}}wa_ag=null;}catch(wa_e){}}if(wa_n.mimeTypes&&wa_n.mimeTypes.length){if(wa_n.mimeTypes["application/x-ms-xbap"]){wa_wpf=1;}}if(wa_n.plugins&&wa_n.plugins.length){for(var wa_ii=0;wa_ii<wa_n.plugins.length;wa_ii++){if(wa_n.plugins[wa_ii].name.indexOf('Shockwave Flash')!= -1){wa_f=wa_n.plugins[wa_ii].description.substr(16,1);break;}}}else if(window.ActiveXObject){for(var wa_ii=11;wa_ii>=4;wa_ii--){try{var wa_fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+wa_ii+"');");if(wa_fl){wa_f=wa_ii;break;}}catch(wa_e){}}} wa_img=new Image();wa_img.src=wa_hp+'://loc1.hitsprocessor.com/track2.aspx?f='+wa_f+'&sl='+wa_sl+'&av='+escape(wa_n.appVersion)+'&an='+escape(wa_n.appName)+'&pf='+escape(wa_n.platform)+ '&' + (wa_isenc ? 'e' : '') + 'acct='+wa_account+'&wpf='+wa_wpf;

$(function() 
	{
		if ($.browser.mozilla && parseFloat($.browser.version) < 1.9 && navigator.appVersion.indexOf('Mac') !== -1) 
			$('body').css('-moz-opacity',.999);
		$('.menu').superfish
		({
			pathClass: 'current'
		});
	});
$(document).ready(function()
			{
				$('#leftBanner1').css('display','none'); //Jan	
				$('#leftBanner2').css('display','none'); //Jan
				$('#leftBanner3').css('display','none'); //Jan
				$('#leftBanner4').css('display','none'); //Jan
			
				var banners = 4; //there are 4 banners to be change
				//var lastHovered = 'rightBannerLink1'; //by default first link and first image are set to be active - clicked
				//var shownImage = 'leftBanner1';
			
				var lastHovered = ''; //by default none link and default image are set to be shown
				var shownImage = 'leftBanner0';
			
				var linksImages = new Array();
				linksImages['rightBannerLink1'] = 'leftBanner1';
				linksImages['rightBannerLink2'] = 'leftBanner2';
				linksImages['rightBannerLink3'] = 'leftBanner3';
				linksImages['rightBannerLink4'] = 'leftBanner4';
			
				$('a.rightBannerLink').hover(
					function()
					{
						var selectedLink = $(this).attr('id');
			
						if(selectedLink != lastHovered)
						{
							$('#' + lastHovered).children('div.rightBanner_option').removeClass('rightBanner_optionHv');
							$('#' + lastHovered).children('div.rightBanner_option').children('div.line').children('div.arrow').removeClass('arrowHv');
							$('#' + lastHovered).children('div.rightBanner_option').children('div.line').children('div.text').removeClass('textHv');
							//$('#'+shownImage).removeClass('leftBannerVisible'); //Jan
							$('#'+shownImage).css('display', 'none'); //Jan
						}
						$('#' + selectedLink).children('div.rightBanner_option').addClass('rightBanner_optionHv');
						$('#' + selectedLink).children('div.rightBanner_option').children('div.line').children('div.arrow').addClass('arrowHv');
						$('#' + selectedLink).children('div.rightBanner_option').children('div.line').children('div.text').addClass('textHv');
							
						var newImage = linksImages[selectedLink];	
						//$('#'+newImage).addClass('leftBannerVisible'); //Jan
						$('#'+newImage).css('display', 'inline'); //Jan
			
						shownImage =  newImage;
						lastHovered = selectedLink;
					}
					,
					function()
					{
					//no effects for 'out' Hover
					}
				);
			
			});
$(document).ready(function()
				{
					var tabs = 4; //there are 4 banners
					//by default first link and first content are set to be active
					var lastClicked = 'homePageTab1';
				
					var linksContents = new Array();
						
					linksContents['homePageTab1'] = 'homePageLeftContent1';
					linksContents['homePageTab2'] = 'homePageLeftContent2';
					linksContents['homePageTab3'] = 'homePageLeftContent3';
					linksContents['homePageTab4'] = 'homePageLeftContent4';
				
					$('div.homePageTab').mouseover(
						function()
						{
							var clickedLink = $(this).attr('id');
							if(clickedLink != lastClicked)
							{
								$('#' + lastClicked).removeClass('homePageTabActive');
								$('#' + linksContents[lastClicked]).removeClass('homePageLeftContentActive');
								$('#' + clickedLink).addClass('homePageTabActive');
								$('#' + linksContents[clickedLink]).addClass('homePageLeftContentActive');
								lastClicked = clickedLink;				
							}
						}
					);
				
				});
$(document).ready(function()
				{
					$('#RC2').hide();
					$('#RC3').hide();
					$('#RC4').hide();
					$('#RC5').hide();
					
					var contActive = 'RC1';
					//var size = $('.homePageRightContent').css('height');
					//alert (size);
					var action = false;
					
					$('.homePageRightTitle').mouseover(function(){
					//$('.homePageRightTitle').click(function(){
						
						var titleId = $(this).attr('id');
						var contId = 'RC'+titleId.substring(2);
						
						//alert(contId);
							
						if(contActive != contId)
						{
							//$('#'+contActive).slideUp('500');
							//$('#'+contId).slideDown('500');
							//contActive = contId;
							if(action == false)
							{
								action = true;
								$('#'+contActive).slideUp('300');
								$('#'+contId).slideDown('300', function(){ action = false; });
								contActive = contId;
							}
				
						}
					});
				});
				
				function validMail(element)
				{
					var reg = new RegExp('([a-zA-Z0-9_\.\-\])+\@(([a-zA-Z0-9\-])+\.)+(([a-zA-Z]{2})|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum)$');
					
					return reg.test(element);
				}
					
				$(document).ready(function(){
					$('#newsletterEmail').click(function(){
						$('#newsletterEmail').attr('value','');		
					});
				
				
					$('.submitSmall').click(function(){
						var email = $('#newsletterEmail').attr('value');
						if(validMail(email))
						{
							$('#HomePageNewsletterForm').submit();
						}
						else
						{
							alert('Write down proper email address.')
						}
						
					});
				});
