/*
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.2.0
*/

if(typeof YAHOO=="undefined"){var YAHOO={};}
YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}
return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.init=function(){this.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}
if(unique){ls.push(l);}}}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}
var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}
if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[],getVersion:function(name){return YAHOO.env.modules[name]||null;}};YAHOO.lang={isArray:function(obj){if(obj.constructor&&obj.constructor.toString().indexOf('Array')>-1){return true;}else{return YAHOO.lang.isObject(obj)&&obj.constructor==Array;}},isBoolean:function(obj){return typeof obj=='boolean';},isFunction:function(obj){return typeof obj=='function';},isNull:function(obj){return obj===null;},isNumber:function(obj){return typeof obj=='number'&&isFinite(obj);},isObject:function(obj){return typeof obj=='object'||YAHOO.lang.isFunction(obj);},isString:function(obj){return typeof obj=='string';},isUndefined:function(obj){return typeof obj=='undefined';},hasOwnProperty:function(obj,prop){if(Object.prototype.hasOwnProperty){return obj.hasOwnProperty(prop);}
return!YAHOO.lang.isUndefined(obj[prop])&&obj.constructor.prototype[prop]!==obj[prop];},extend:function(subc,superc,overrides){var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}
if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}}},augment:function(r,s){var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;i=i+1){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}}};YAHOO.init();YAHOO.util.Lang=YAHOO.lang;YAHOO.augment=YAHOO.lang.augment;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.2.0",build:"127"});/*
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.2.0
*/

if(typeof YAHOO=="undefined"){var YAHOO={};}
YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}
return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.init=function(){this.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}
if(unique){ls.push(l);}}}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}
var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}
if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[],getVersion:function(name){return YAHOO.env.modules[name]||null;}};YAHOO.lang={isArray:function(obj){if(obj.constructor&&obj.constructor.toString().indexOf('Array')>-1){return true;}else{return YAHOO.lang.isObject(obj)&&obj.constructor==Array;}},isBoolean:function(obj){return typeof obj=='boolean';},isFunction:function(obj){return typeof obj=='function';},isNull:function(obj){return obj===null;},isNumber:function(obj){return typeof obj=='number'&&isFinite(obj);},isObject:function(obj){return typeof obj=='object'||YAHOO.lang.isFunction(obj);},isString:function(obj){return typeof obj=='string';},isUndefined:function(obj){return typeof obj=='undefined';},hasOwnProperty:function(obj,prop){if(Object.prototype.hasOwnProperty){return obj.hasOwnProperty(prop);}
return!YAHOO.lang.isUndefined(obj[prop])&&obj.constructor.prototype[prop]!==obj[prop];},extend:function(subc,superc,overrides){var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}
if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}}},augment:function(r,s){var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;i=i+1){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}}};YAHOO.init();YAHOO.util.Lang=YAHOO.lang;YAHOO.augment=YAHOO.lang.augment;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.2.0",build:"127"});
(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={};var ua=navigator.userAgent.toLowerCase(),isOpera=(ua.indexOf('opera')>-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}
if(propertyCache[property]){return propertyCache[property];}
while(patterns.HYPHEN.exec(property)){property=property.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}
propertyCache[property]=property;return property;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}
return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}
return val/100;break;default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}
if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(typeof el.style.filter=='string'){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}
break;default:el.style[property]=val;}};}else{setStyle=function(el,property,val){el.style[property]=val;};}
YAHOO.util.Dom={get:function(el){if(!el){return null;}
if(typeof el!='string'&&!(el instanceof Array)){return el;}
if(typeof el=='string'){return document.getElementById(el);}
else{var collection=[];for(var i=0,len=el.length;i<len;++i){collection[collection.length]=Y.Dom.get(el[i]);}
return collection;}
return null;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if(el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none'){return false;}
var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}
var scrollTop=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var scrollLeft=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return[box.left+scrollLeft,box.top+scrollTop];}
else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;parentNode=parentNode.offsetParent;}}
if(isSafari&&this.getStyle(el,'position')=='absolute'){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}
if(el.parentNode){parentNode=el.parentNode;}
else{parentNode=null;}
while(parentNode&&parentNode.tagName.toUpperCase()!='BODY'&&parentNode.tagName.toUpperCase()!='HTML')
{if(Y.Dom.getStyle(parentNode,'display')!='inline'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
if(parentNode.parentNode){parentNode=parentNode.parentNode;}else{parentNode=null;}}
return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}
var pageXY=this.getXY(el);if(pageXY===false){return false;}
var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}
if(isNaN(delta[1])){delta[1]=(style_pos=='relative')?0:el.offsetTop;}
if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}
if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}
if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');var f=function(el){return re.test(el['className']);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}
el['className']=[el['className'],className].join(' ');};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,className)){return;}
var c=el['className'];el['className']=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;}
var re=new RegExp('(?:^|\\s+)'+oldClassName+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}
el['className']=el['className'].replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}
if(!el.id){el.id=prefix+id_counter++;}
return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}
var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}
else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}
else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}
else if(!parent.tagName||parent.tagName.toUpperCase()=='HTML'){return false;}
parent=parent.parentNode;}
return false;}};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||'*';var nodes=[];if(root){root=Y.Dom.get(root);if(!root){return nodes;}}else{root=document;}
var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag=='*'&&root.all)){elements=root.all;}
for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}
return nodes;},batch:function(el,method,o,override){var id=el;el=Y.Dom.get(el);var scope=(override)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}
return method.call(scope,el,o);}
var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}
collection[collection.length]=method.call(scope,el[i],o);}
return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!='CSS1Compat')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!='CSS1Compat')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode=='CSS1Compat')?document.documentElement.clientHeight:document.body.clientHeight;}
return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode=='CSS1Compat')?document.documentElement.clientWidth:document.body.clientWidth;}
return width;}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}
this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.0",build:"127"});
if(!YAHOO.util.Event){YAHOO.util.Event=function(){var loadComplete=false;var listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var lastError=null;return{POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var v=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);if(v&&v[1]){return v[1];}
return null;}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var self=this;var callback=function(){self._tryPreloadAttach();};this._interval=setInterval(callback,this.POLL_INTERVAL);}},onAvailable:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:false});retryCount=this.POLL_RETRYS;this.startInterval();},onContentReady:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:true});retryCount=this.POLL_RETRYS;this.startInterval();},addListener:function(el,sType,fn,obj,override){if(!fn||!fn.call){return false;}
if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],sType,fn,obj,override)&&ok;}
return ok;}else if(typeof el=="string"){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){YAHOO.util.Event.on(el,sType,fn,obj,override);});return true;}}
if(!el){return false;}
if("unload"==sType&&obj!==this){unloadListeners[unloadListeners.length]=[el,sType,fn,obj,override];return true;}
var scope=el;if(override){if(override===true){scope=obj;}else{scope=override;}}
var wrappedFn=function(e){return fn.call(scope,YAHOO.util.Event.getEvent(e),obj);};var li=[el,sType,fn,wrappedFn,scope];var index=listeners.length;listeners[index]=li;if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);if(legacyIndex==-1||el!=legacyEvents[legacyIndex][0]){legacyIndex=legacyEvents.length;legacyMap[el.id+sType]=legacyIndex;legacyEvents[legacyIndex]=[el,sType,el["on"+sType]];legacyHandlers[legacyIndex]=[];el["on"+sType]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),legacyIndex);};}
legacyHandlers[legacyIndex].push(li);}else{try{this._simpleAdd(el,sType,wrappedFn,false);}catch(ex){this.lastError=ex;this.removeListener(el,sType,fn);return false;}}
return true;},fireLegacyEvent:function(e,legacyIndex){var ok=true,le,lh,li,scope,ret;lh=legacyHandlers[legacyIndex];for(var i=0,len=lh.length;i<len;++i){li=lh[i];if(li&&li[this.WFN]){scope=li[this.ADJ_SCOPE];ret=li[this.WFN].call(scope,e);ok=(ok&&ret);}}
le=legacyEvents[legacyIndex];if(le&&le[2]){le[2](e);}
return ok;},getLegacyIndex:function(el,sType){var key=this.generateId(el)+sType;if(typeof legacyMap[key]=="undefined"){return-1;}else{return legacyMap[key];}},useLegacyEvent:function(el,sType){if(this.webkit&&("click"==sType||"dblclick"==sType)){var v=parseInt(this.webkit,10);if(!isNaN(v)&&v<418){return true;}}
return false;},removeListener:function(el,sType,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],sType,fn)&&ok);}
return ok;}
if(!fn||!fn.call){return this.purgeElement(el,false,sType);}
if("unload"==sType){for(i=0,len=unloadListeners.length;i<len;i++){var li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners.splice(i,1);return true;}}
return false;}
var cacheItem=null;var index=arguments[3];if("undefined"==typeof index){index=this._getCacheIndex(el,sType,fn);}
if(index>=0){cacheItem=listeners[index];}
if(!el||!cacheItem){return false;}
if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i<len;++i){li=llist[i];if(li&&li[this.EL]==el&&li[this.TYPE]==sType&&li[this.FN]==fn){llist.splice(i,1);break;}}}}else{try{this._simpleRemove(el,sType,cacheItem[this.WFN],false);}catch(ex){this.lastError=ex;return false;}}
delete listeners[index][this.WFN];delete listeners[index][this.FN];listeners.splice(index,1);return true;},getTarget:function(ev,resolveTextNode){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(node){if(node&&3==node.nodeType){return node.parentNode;}else{return node;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}
return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}
return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else if(ev.type=="mouseover"){t=ev.fromElement;}}
return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}
return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}
c=c.caller;}}
return ev;},getCharCode:function(ev){return ev.charCode||ev.keyCode||0;},_getCacheIndex:function(el,sType,fn){for(var i=0,len=listeners.length;i<len;++i){var li=listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==sType){return i;}}
return-1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+counter;++counter;el.id=id;}
return id;},_isValidCollection:function(o){return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},_load:function(e){loadComplete=true;var EU=YAHOO.util.Event;if(this.isIE){EU._simpleRemove(window,"load",EU._load);}},_tryPreloadAttach:function(){if(this.locked){return false;}
this.locked=true;var tryAgain=!loadComplete;if(!tryAgain){tryAgain=(retryCount>0);}
var notAvail=[];for(var i=0,len=onAvailStack.length;i<len;++i){var item=onAvailStack[i];if(item){var el=this.getEl(item.id);if(el){if(!item.checkReady||loadComplete||el.nextSibling||(document&&document.body)){var scope=el;if(item.override){if(item.override===true){scope=item.obj;}else{scope=item.override;}}
item.fn.call(scope,item.obj);onAvailStack[i]=null;}}else{notAvail.push(item);}}}
retryCount=(notAvail.length===0)?0:retryCount-1;if(tryAgain){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}
this.locked=false;return true;},purgeElement:function(el,recurse,sType){var elListeners=this.getListeners(el,sType);if(elListeners){for(var i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(el,l.type,l.fn);}}
if(recurse&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],recurse,sType);}}},getListeners:function(el,sType){var results=[],searchLists;if(!sType){searchLists=[listeners,unloadListeners];}else if(sType=="unload"){searchLists=[unloadListeners];}else{searchLists=[listeners];}
for(var j=0;j<searchLists.length;++j){var searchList=searchLists[j];if(searchList&&searchList.length>0){for(var i=0,len=searchList.length;i<len;++i){var l=searchList[i];if(l&&l[this.EL]===el&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}
return(results.length)?results:null;},_unload:function(e){var EU=YAHOO.util.Event,i,j,l,len,index;for(i=0,len=unloadListeners.length;i<len;++i){l=unloadListeners[i];if(l){var scope=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){scope=l[EU.OBJ];}else{scope=l[EU.ADJ_SCOPE];}}
l[EU.FN].call(scope,EU.getEvent(e),l[EU.OBJ]);unloadListeners[i]=null;l=null;scope=null;}}
unloadListeners=null;if(listeners&&listeners.length>0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}
j=j-1;}
l=null;EU.clearCache();}
for(i=0,len=legacyEvents.length;i<len;++i){legacyEvents[i][0]=null;legacyEvents[i]=null;}
legacyEvents=null;EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(el,sType,fn,capture){el.addEventListener(sType,fn,(capture));};}else if(window.attachEvent){return function(el,sType,fn,capture){el.attachEvent("on"+sType,fn);};}else{return function(){};}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,sType,fn,capture){el.removeEventListener(sType,fn,(capture));};}else if(window.detachEvent){return function(el,sType,fn){el.detachEvent("on"+sType,fn);};}else{return function(){};}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if(document&&document.body){EU._load();}else{EU._simpleAdd(window,"load",EU._load);}
EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}
YAHOO.util.CustomEvent=function(type,oScope,silent,signature){this.type=type;this.scope=oScope||window;this.silent=silent;this.signature=signature||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}
var onsubscribeType="_YUICEOnSubscribe";if(type!==onsubscribeType){this.subscribeEvent=new YAHOO.util.CustomEvent(onsubscribeType,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,obj,override){if(this.subscribeEvent){this.subscribeEvent.fire(fn,obj,override);}
this.subscribers.push(new YAHOO.util.Subscriber(fn,obj,override));},unsubscribe:function(fn,obj){if(!fn){return this.unsubscribeAll();}
var found=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,obj)){this._delete(i);found=true;}}
return found;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}
var args=[],ret=true,i;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}
var argslength=args.length;if(!this.silent){}
for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}
var scope=s.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var param=null;if(args.length>0){param=args[0];}
ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);}
if(false===ret){if(!this.silent){}
return false;}}}
return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}
return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}
this.subscribers.splice(index,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=obj||null;this.override=override;};YAHOO.util.Subscriber.prototype.getScope=function(defaultScope){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}
return defaultScope;};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return(this.fn==fn&&this.obj==obj);}else{return(this.fn==fn);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(p_type,p_fn,p_obj,p_override){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}else{this.__yui_subscribers=this.__yui_subscribers||{};var subs=this.__yui_subscribers;if(!subs[p_type]){subs[p_type]=[];}
subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}else{return false;}},unsubscribeAll:function(p_type){return this.unsubscribe(p_type);},createEvent:function(p_type,p_config){this.__yui_events=this.__yui_events||{};var opts=p_config||{};var events=this.__yui_events;if(events[p_type]){}else{var scope=opts.scope||this;var silent=opts.silent||null;var ce=new YAHOO.util.CustomEvent(p_type,scope,silent,YAHOO.util.CustomEvent.FLAT);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}
this.__yui_subscribers=this.__yui_subscribers||{};var qs=this.__yui_subscribers[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}
return events[p_type];},fireEvent:function(p_type,arg1,arg2,etc){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}
return ce.fire.apply(ce,args);}else{return null;}},hasEvent:function(type){if(this.__yui_events){if(this.__yui_events[type]){return true;}}
return false;}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!attachTo){}else if(!keyData){}else if(!handler){}
if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
function handleKeyPress(e,obj){if(!keyData.shift){keyData.shift=false;}
if(!keyData.alt){keyData.alt=false;}
if(!keyData.ctrl){keyData.ctrl=false;}
if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){var dataItem;var keyPressed;if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){dataItem=keyData.keys[i];if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);break;}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);break;}}}else{dataItem=keyData.keys;if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);}}}}
this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+
(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.2.0",build:"127"});/*
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.2.0
*/

(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={};var ua=navigator.userAgent.toLowerCase(),isOpera=(ua.indexOf('opera')>-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}
if(propertyCache[property]){return propertyCache[property];}
while(patterns.HYPHEN.exec(property)){property=property.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}
propertyCache[property]=property;return property;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}
return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}
return val/100;break;default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}
if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(typeof el.style.filter=='string'){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}
break;default:el.style[property]=val;}};}else{setStyle=function(el,property,val){el.style[property]=val;};}
YAHOO.util.Dom={get:function(el){if(!el){return null;}
if(typeof el!='string'&&!(el instanceof Array)){return el;}
if(typeof el=='string'){return document.getElementById(el);}
else{var collection=[];for(var i=0,len=el.length;i<len;++i){collection[collection.length]=Y.Dom.get(el[i]);}
return collection;}
return null;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if(el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none'){return false;}
var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}
var scrollTop=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var scrollLeft=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return[box.left+scrollLeft,box.top+scrollTop];}
else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;parentNode=parentNode.offsetParent;}}
if(isSafari&&this.getStyle(el,'position')=='absolute'){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}
if(el.parentNode){parentNode=el.parentNode;}
else{parentNode=null;}
while(parentNode&&parentNode.tagName.toUpperCase()!='BODY'&&parentNode.tagName.toUpperCase()!='HTML')
{if(Y.Dom.getStyle(parentNode,'display')!='inline'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
if(parentNode.parentNode){parentNode=parentNode.parentNode;}else{parentNode=null;}}
return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}
var pageXY=this.getXY(el);if(pageXY===false){return false;}
var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}
if(isNaN(delta[1])){delta[1]=(style_pos=='relative')?0:el.offsetTop;}
if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}
if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}
if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');var f=function(el){return re.test(el['className']);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}
el['className']=[el['className'],className].join(' ');};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,className)){return;}
var c=el['className'];el['className']=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;}
var re=new RegExp('(?:^|\\s+)'+oldClassName+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}
el['className']=el['className'].replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}
if(!el.id){el.id=prefix+id_counter++;}
return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}
var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}
else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}
else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}
else if(!parent.tagName||parent.tagName.toUpperCase()=='HTML'){return false;}
parent=parent.parentNode;}
return false;}};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||'*';var nodes=[];if(root){root=Y.Dom.get(root);if(!root){return nodes;}}else{root=document;}
var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag=='*'&&root.all)){elements=root.all;}
for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}
return nodes;},batch:function(el,method,o,override){var id=el;el=Y.Dom.get(el);var scope=(override)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}
return method.call(scope,el,o);}
var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}
collection[collection.length]=method.call(scope,el[i],o);}
return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!='CSS1Compat')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!='CSS1Compat')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode=='CSS1Compat')?document.documentElement.clientHeight:document.body.clientHeight;}
return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode=='CSS1Compat')?document.documentElement.clientWidth:document.body.clientWidth;}
return width;}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}
this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.0",build:"127"});/* Copyright (c) 2006, Yahoo! Inc. All rights reserved. */
YAHOO.util.Anim=function(el,attributes,duration,method)
{if(el){this.init(el,attributes,duration,method);}};YAHOO.util.Anim.prototype={doMethod:function(attribute,start,end){return this.method(this.currentFrame,start,end-start,this.totalFrames);},setAttribute:function(attribute,val,unit){YAHOO.util.Dom.setStyle(this.getEl(),attribute,val+unit);},getAttribute:function(attribute){return parseFloat(YAHOO.util.Dom.getStyle(this.getEl(),attribute));},defaultUnit:'px',defaultUnits:{opacity:' '},init:function(el,attributes,duration,method){var isAnimated=false;var startTime=null;var endTime=null;var actualFrames=0;var defaultValues={};el=YAHOO.util.Dom.get(el);this.attributes=attributes||{};this.duration=duration||1;this.method=method||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.getEl=function(){return el;};this.setDefault=function(attribute,val){if(val.constructor!=Array&&(val=='auto'||isNaN(val))){switch(attribute){case'width':val=el.clientWidth||el.offsetWidth;break;case'height':val=el.clientHeight||el.offsetHeight;break;case'left':if(YAHOO.util.Dom.getStyle(el,'position')=='absolute'){val=el.offsetLeft;}else{val=0;}
break;case'top':if(YAHOO.util.Dom.getStyle(el,'position')=='absolute'){val=el.offsetTop;}else{val=0;}
break;default:val=0;}}
defaultValues[attribute]=val;};this.getDefault=function(attribute){return defaultValues[attribute];};this.isAnimated=function(){return isAnimated;};this.getStartTime=function(){return startTime;};this.animate=function(){if(this.isAnimated()){return false;}
this.onStart.fire();this._onStart.fire();this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;YAHOO.util.AnimMgr.registerElement(this);var attributes=this.attributes;var el=this.getEl();var val;for(var attribute in attributes){val=this.getAttribute(attribute);this.setDefault(attribute,val);}
isAnimated=true;actualFrames=0;startTime=new Date();};this.stop=function(){if(!this.isAnimated()){return false;}
this.currentFrame=0;endTime=new Date();var data={time:endTime,duration:endTime-startTime,frames:actualFrames,fps:actualFrames/this.duration};isAnimated=false;actualFrames=0;this.onComplete.fire(data);};var onTween=function(){var start;var end=null;var val;var unit;var attributes=this['attributes'];for(var attribute in attributes){unit=attributes[attribute]['unit']||this.defaultUnits[attribute]||this.defaultUnit;if(typeof attributes[attribute]['from']!='undefined'){start=attributes[attribute]['from'];}else{start=this.getDefault(attribute);}
if(typeof attributes[attribute]['to']!='undefined'){end=attributes[attribute]['to'];}
else if(typeof attributes[attribute]['by']!='undefined')
{if(typeof start!=='string'){end=[];for(var i=0,len=start.length;i<len;++i)
{end[i]=start[i]+attributes[attribute]['by'][i];}}
else
{end=start+attributes[attribute]['by'];}}
if(end!==null&&typeof end!='undefined'){val=this.doMethod(attribute,start,end);if((attribute=='width'||attribute=='height'||attribute=='opacity')&&val<0){val=0;}
this.setAttribute(attribute,val,unit);}}
actualFrames+=1;};this._onStart=new YAHOO.util.CustomEvent('_onStart',this);this.onStart=new YAHOO.util.CustomEvent('start',this);this.onTween=new YAHOO.util.CustomEvent('tween',this);this._onTween=new YAHOO.util.CustomEvent('_tween',this);this.onComplete=new YAHOO.util.CustomEvent('complete',this);this._onTween.subscribe(onTween);}};YAHOO.util.AnimMgr=new function(){var thread=null;var queue=[];var tweenCount=0;this.fps=200;this.delay=1;this.registerElement=function(tween){if(tween.isAnimated()){return false;}
queue[queue.length]=tween;tweenCount+=1;this.start();};this.start=function(){if(thread===null){thread=setInterval(this.run,this.delay);}};this.stop=function(tween){if(!tween)
{clearInterval(thread);for(var i=0,len=queue.length;i<len;++i){if(queue[i].isAnimated()){queue[i].stop();}}
queue=[];thread=null;tweenCount=0;}
else{tween.stop();tweenCount-=1;if(tweenCount<=0){this.stop();}}};this.run=function(){for(var i=0,len=queue.length;i<len;++i){var tween=queue[i];if(!tween||!tween.isAnimated()){continue;}
if(tween.currentFrame<tween.totalFrames||tween.totalFrames===null)
{tween.currentFrame+=1;if(tween.useSeconds){correctFrame(tween);}
tween.onTween.fire();tween._onTween.fire();}
else{YAHOO.util.AnimMgr.stop(tween);}}};var correctFrame=function(tween){var frames=tween.totalFrames;var frame=tween.currentFrame;var expected=(tween.currentFrame*tween.duration*1000/tween.totalFrames);var elapsed=(new Date()-tween.getStartTime());var tweak=0;if(elapsed<tween.duration*1000){tweak=Math.round((elapsed/expected-1)*tween.currentFrame);}else{tweak=frames-(frame+1);}
if(tweak>0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}
tween.currentFrame+=tweak;}};}
YAHOO.util.Bezier=new function()
{this.getPosition=function(points,t)
{var n=points.length;var tmp=[];for(var i=0;i<n;++i){tmp[i]=[points[i][0],points[i][1]];}
for(var j=1;j<n;++j){for(i=0;i<n-j;++i){tmp[i][0]=(1-t)*tmp[i][0]+t*tmp[parseInt(i+1,10)][0];tmp[i][1]=(1-t)*tmp[i][1]+t*tmp[parseInt(i+1,10)][1];}}
return[tmp[0][0],tmp[0][1]];};};YAHOO.util.Easing=new function(){this.easeNone=function(t,b,c,d){return b+c*(t/=d);};this.easeIn=function(t,b,c,d){return b+c*((t/=d)*t*t);};this.easeOut=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(tc+-3*ts+3*t);};this.easeBoth=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(-2*tc+3*ts);};this.backIn=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(-3.4005*tc*ts+10.2*ts*ts+-6.2*tc+0.4*ts);};this.backOut=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(8.292*tc*ts+-21.88*ts*ts+22.08*tc+-12.69*ts+5.1975*t);};this.backBoth=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(0.402*tc*ts+-2.1525*ts*ts+-3.2*tc+8*ts+-2.05*t);};};YAHOO.util.Motion=function(el,attributes,duration,method){if(el){this.initMotion(el,attributes,duration,method);}};YAHOO.util.Motion.prototype=new YAHOO.util.Anim();YAHOO.util.Motion.prototype.defaultUnits.points='px';YAHOO.util.Motion.prototype.doMethod=function(attribute,start,end){var val=null;if(attribute=='points'){var translatedPoints=this.getTranslatedPoints();var t=this.method(this.currentFrame,0,100,this.totalFrames)/100;if(translatedPoints){val=YAHOO.util.Bezier.getPosition(translatedPoints,t);}}else{val=this.method(this.currentFrame,start,end-start,this.totalFrames);}
return val;};YAHOO.util.Motion.prototype.getAttribute=function(attribute){var val=null;if(attribute=='points'){val=[this.getAttribute('left'),this.getAttribute('top')];if(isNaN(val[0])){val[0]=0;}
if(isNaN(val[1])){val[1]=0;}}else{val=parseFloat(YAHOO.util.Dom.getStyle(this.getEl(),attribute));}
return val;};YAHOO.util.Motion.prototype.setAttribute=function(attribute,val,unit){if(attribute=='points'){YAHOO.util.Dom.setStyle(this.getEl(),'left',val[0]+unit);YAHOO.util.Dom.setStyle(this.getEl(),'top',val[1]+unit);}else{YAHOO.util.Dom.setStyle(this.getEl(),attribute,val+unit);}};YAHOO.util.Motion.prototype.initMotion=function(el,attributes,duration,method){YAHOO.util.Anim.call(this,el,attributes,duration,method);attributes=attributes||{};attributes.points=attributes.points||{};attributes.points.control=attributes.points.control||[];this.attributes=attributes;var start;var end=null;var translatedPoints=null;this.getTranslatedPoints=function(){return translatedPoints;};var translateValues=function(val,self){var pageXY=YAHOO.util.Dom.getXY(self.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var onStart=function(){start=this.getAttribute('points');var attributes=this.attributes;var control=attributes['points']['control']||[];if(control.length>0&&control[0].constructor!=Array){control=[control];}
if(YAHOO.util.Dom.getStyle(this.getEl(),'position')=='static'){YAHOO.util.Dom.setStyle(this.getEl(),'position','relative');}
if(typeof attributes['points']['from']!='undefined'){YAHOO.util.Dom.setXY(this.getEl(),attributes['points']['from']);start=this.getAttribute('points');}
else if((start[0]===0||start[1]===0)){YAHOO.util.Dom.setXY(this.getEl(),YAHOO.util.Dom.getXY(this.getEl()));start=this.getAttribute('points');}
var i,len;if(typeof attributes['points']['to']!='undefined'){end=translateValues(attributes['points']['to'],this);for(i=0,len=control.length;i<len;++i){control[i]=translateValues(control[i],this);}}else if(typeof attributes['points']['by']!='undefined'){end=[start[0]+attributes['points']['by'][0],start[1]+attributes['points']['by'][1]];for(i=0,len=control.length;i<len;++i){control[i]=[start[0]+control[i][0],start[1]+control[i][1]];}}
if(end){translatedPoints=[start];if(control.length>0){translatedPoints=translatedPoints.concat(control);}
translatedPoints[translatedPoints.length]=end;}};this._onStart.subscribe(onStart);};YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Anim.call(this,el,attributes,duration,method);}};YAHOO.util.Scroll.prototype=new YAHOO.util.Anim();YAHOO.util.Scroll.prototype.defaultUnits.scroll=' ';YAHOO.util.Scroll.prototype.doMethod=function(attribute,start,end){var val=null;if(attribute=='scroll'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=this.method(this.currentFrame,start,end-start,this.totalFrames);}
return val;};YAHOO.util.Scroll.prototype.getAttribute=function(attribute){var val=null;var el=this.getEl();if(attribute=='scroll'){val=[el.scrollLeft,el.scrollTop];}else{val=parseFloat(YAHOO.util.Dom.getStyle(el,attribute));}
return val;};YAHOO.util.Scroll.prototype.setAttribute=function(attribute,val,unit){var el=this.getEl();if(attribute=='scroll'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{YAHOO.util.Dom.setStyle(el,attribute,val+unit);}};

var O=new Object();
//var O.currentTagButton=null;
O.addedTags=new Array();
O.activeHelpBoxes=new Array();

function init() {

var nojs=YAHOO.util.Dom.getElementsByClassName("no_js");
for(i=0;i<nojs.length;i++) {nojs[i].style.display="none";}

var adsFrames=document.getElementsByName("google_ads_frame");
for(i=0;i<adsFrames.length;i++) {adsFrames[i].style.display="block";}


Notice: Undefined index: HTTP_REFERER in /srv/d_ouzi/ouzi.org/www/www.ouzi.org/htdocs/jscript.php on line 44

if (document.getElementById("field")) {document.getElementById("field").focus();}



tags_dom_operations();

var h2=document.getElementsByTagName("h2");
for(i=0;i<h2.length;i++) {
if (h2[i].parentNode.getAttribute("id")=="main_entry_points") {}
else if (h2[i].parentNode.getAttribute("id")=="word_definition" || h2[i].parentNode.getAttribute("id")=="tags_map" || h2[i].parentNode.getAttribute("id")=="about_ouzi" || h2[i].parentNode.getAttribute("id")=="contact_form" || h2[i].parentNode.getAttribute("id")=="ouzi_help" || h2[i].parentNode.getAttribute("id")=="tags_map_by_initials" || h2[i].parentNode.getAttribute("id").substr(0,10)=="webmasters") {
h2[i].innerHTML='<span class="box_links"><a name="expand-box-button" onclick="expand_box(this);return false;"><img name=\"box-button\" src="files/expand-box.png" /></a></span>'+h2[i].innerHTML;
}
else {
h2[i].innerHTML='<span class="box_links"><a name="expand-box-button" onclick="expand_box(this);return false;"><img src="files/expand-box.png" /></a><a name="expand-content-button" onclick="expand_content(this);return false;"><img src="files/expand-content.png" /></a></span>'+h2[i].innerHTML;
}

if (h2[i].parentNode.id!="query_related_feeds" && h2[i].parentNode.id!="webmasters_add_manually" && h2[i].parentNode.id!="webmasters_account") {
YAHOO.util.Event.addListener(h2[i].parentNode,"click",function () {
var ccf=document.getElementsByName("expand-box-button");
for(i=0;i<ccf.length;i++) {
if (ccf[i].parentNode.parentNode.parentNode==this) {expand_box(ccf[i]);}
}
//h2[i].onmouseover=function () {expand_box(this.getElementsByName("expand-box-button")[0]);};
});
}

}

document.getElementById("help_help_link").innerHTML="<div>"+document.getElementById("help_help_link").innerHTML+"</div>";
document.getElementById("help_about_link").innerHTML="<div>"+document.getElementById("help_about_link").innerHTML+"</div>";

YAHOO.util.Event.addListener(document.getElementById("help_link"),"mouseover",function (e) {
//document.getElementById("help_link").onmouseover=function (e) {
var posx=0;var posy=0;
if (!e) var e=window.event;
if (e.pageX || e.pageY) 	{posx=e.pageX;posy=e.pageY;}
else if (e.clientX || e.clientY) 	{
posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;
}
posy+=32;
posx-=40;
var a={opacity:{to:100},maxWidth:{to:150},maxHeight:{to:300},fontSize:{to:14},top:{from:posy,to:posy},left:{to:posx}}; //IE BUG
var linkSHAnim=new YAHOO.util.Anim("help_help_link",a,0.7,YAHOO.util.Easing.backOut);
linkSHAnim.animate();
});
YAHOO.util.Event.addListener(document.getElementById("help_link"),"mouseout",function (e) {
//document.getElementById("help_link").onmouseout=function (e) {
var a={opacity:{to:0},maxWidth:{to:0},maxHeight:{to:0},fontSize:{to:0},left:{to:0}}; //IE BUG
var linkHHAnim=new YAHOO.util.Anim(document.getElementById("help_help_link"),a,0.7,YAHOO.util.Easing.backOut);
linkHHAnim.animate();
});

YAHOO.util.Event.addListener(document.getElementById("about_link"),"mouseover",function (e) {
var posx=0;var posy=0;
if (!e) var e=window.event;
if (e.pageX || e.pageY) 	{posx=e.pageX;posy=e.pageY;}
else if (e.clientX || e.clientY) 	{
posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;
}
posy+=32;
posx-=40;
var a={opacity:{to:100},maxWidth:{to:150},maxHeight:{to:300},fontSize:{to:14},top:{from:posy,to:posy},left:{to:posx}}; //IE BUG
var linkSHAnim=new YAHOO.util.Anim("help_about_link",a,0.7,YAHOO.util.Easing.backOut);
linkSHAnim.animate();
});
YAHOO.util.Event.addListener(document.getElementById("about_link"),"mouseout",function (e) {
var a={opacity:{to:0},maxWidth:{to:0},maxHeight:{to:0},fontSize:{to:0},left:{to:0}}; //IE BUG
var linkHHAnim=new YAHOO.util.Anim(document.getElementById("help_about_link"),a,0.7,YAHOO.util.Easing.backOut);
linkHHAnim.animate();
});


target_links();

var ifr0=document.createElement("iframe");
ifr0.setAttribute("src","http://www.ouzi.org/ouzi?action=crawl-some-page&s=
Notice: Undefined index: HTTP_REFERER in /srv/d_ouzi/ouzi.org/www/www.ouzi.org/htdocs/jscript.php on line 126
");
document.body.parentNode.insertBefore(ifr0,document.body.nextSibling);
var ifr1=document.createElement("iframe");
ifr1.setAttribute("src","http://www.ouzi.org/cronjobs.php5");
document.body.parentNode.insertBefore(ifr1,document.body.nextSibling);

}

function tags_dom_operations() {

if (document.getElementById("natural_cloud")) {

add_button_to_tags(document.getElementById("natural_cloud").getElementsByTagName("a"));

if (document.getElementById("query_related_tags")) {add_button_to_tags(document.getElementById("query_related_tags").getElementsByTagName("a"));}
if (document.getElementById("related_tags_active_worldwide")) {add_button_to_tags(document.getElementById("related_tags_active_worldwide").getElementsByTagName("a"));}
if (document.getElementById("query_related_feeds")) {add_reader_to_feeds(document.getElementById("query_related_feeds").getElementsByTagName("a"));}

/*var divs=document.getElementsByTagName("div");
for(i=0;i<divs.length;i++) {
if (divs[i].getAttribute("id")!="natural_cloud") {
//1
divs[i].onmouseover=function () {
for(u=0;u<cl.length;u++) {if (cl[u].er) {cl[u].innerHTML=cl[u].er;}}}
//
}
}*/

}}

function target_links() {
var alinks=document.getElementsByTagName("a");
for(i=0;i<alinks.length;i++) {
if (alinks[i].getAttribute("href")) {
if (alinks[i].getAttribute("href").substr(0,7)=="http://" && alinks[i].getAttribute("href").substr(0,19)!="http://www.ouzi.org") {//} else {
//alinks[i].onclick=function () {}
alinks[i].setAttribute("target","_blank");
}}}
}

function gup(uvar) {
var regexS="[\\?&]"+uvar+"=([^&#]*)";
var regex=new RegExp(regexS);
var tmpURL=window.location.href;
var results=regex.exec(tmpURL);
if(results==null){if(uvar=="s" && document.getElementById("field").value!=""){return document.getElementById("field").value;}else{return "";}}
else return results[1];
}

function getXmlHttp() {
var xmlhttp=false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
xmlhttp=new XMLHttpRequest();
if (xmlhttp.overrideMimeType) {xmlhttp.overrideMimeType('text/xml');}
} else if (window.ActiveXObject) { // IE
try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch (e) {
try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch (e) {}
}
}
if (!xmlhttp) {
alert('Abandon : (Impossible de créer une instance XMLHTTP');
return false;
}
else {return (xmlhttp);}
}

function add_uri() {
if (!document.getElementById("add_page_uri")) {return;} else {var p1=document.getElementById("add_page_uri").value;}
if (!document.getElementById("add_xml_uri")) {return;} else {var p2=document.getElementById("add_xml_uri").value;}
if (document.getElementById("add_uri_status")) {var obj=document.getElementById("add_uri_status");}
if (p1+p2=="" || p1+p2=="http://http://" || p1+p2=="http://" || (p1+p2).length<10) {
if (obj) {obj.innerHTML="<p>Please fill one or more fields ...</p>";}
return;
}
if (obj) {obj.innerHTML="<p>Please wait ...</p>";}
xmlhttpAddUri=getXmlHttp();
var xcall="files/handlers.ajax.php5?action=add-uri&html="+escape(p1)+"&xml="+escape(p2)+"&async=1";
xmlhttpAddUri.open("GET",xcall,true);
xmlhttpAddUri.onreadystatechange=function() {
if (xmlhttpAddUri.readyState==4) {
if (xmlhttpAddUri.status==200) {
//var bits=xmlhttpAddUri.responseText.substr(0,1);
var bits=xmlhttpAddUri.responseText.split("|||");
if (bits[0].indexOf("<1#2>")!=-1) {document.getElementById("add_page_uri").style.borderColor="#edb338";} else {document.getElementById("add_page_uri").style.borderColor="";}
if (bits[0].indexOf("<2#2>")!=-1) {document.getElementById("add_xml_uri").style.borderColor="#edb338";} else {document.getElementById("add_xml_uri").style.borderColor="";}
//if (bits[0]==0) {}
if (obj && bits[1]) {obj.style.display="block";obj.innerHTML=bits[1];}
//if (bits==1) {}
else {}
}
else {
alert("Error: Your request did not succeed.");
if (obj) {obj.innerHTML="<p>Error ...</p>";}
}
}
}
xmlhttpAddUri.send(null);
}

function expand_content(obj,p,cloud) {
expand_box(obj);
if (O.currentTagButton) {O.currentTagButton=O.currentTagButton.parentNode.removeChild(O.currentTagButton);delete O.currentTagButton;}
obj=obj.parentNode.parentNode.parentNode;
if (!p) {var p=1;}
if (!cloud) {var cloud=0;}
var h2=obj.innerHTML.match(/(<h2>.*<\/h2>)/i);
obj.innerHTML=h2[1]+"<div>Please wait ... </div>";
xmlhttpExpandContent=getXmlHttp();
//var xcall="files/handlers.ajax.php?action=expand&box="+obj.getAttribute("id")+"&s="+gup("s")+"&p="+p+"&async=1";
var xcall="files/handlers.ajax.php5?action=expand&box="+obj.getAttribute("id")+"&s="+gup("s")+"&p="+p+"&cloud="+cloud+"&async=1";
xmlhttpExpandContent.open("GET",xcall,true);
xmlhttpExpandContent.onreadystatechange=function() {
if (xmlhttpExpandContent.readyState==4) {
if (xmlhttpExpandContent.status==200) {
var bits=xmlhttpExpandContent.responseText.substr(0,1);
obj.innerHTML=h2[1]+"<div>"+xmlhttpExpandContent.responseText+"</div>";
tags_dom_operations();
target_links();
if (O.switchHelp==1) {switchHelp();}
//document.getElementById(obj.getAttribute("id")+"_expanded").innerHTML=xmlhttpExpandContent.responseText;
if (bits==1) {
//xmlhttpURate.responseText.substr(2);
}
else {
}
}
else {
alert("Error: Your request did not succeed.");
}
}
}
xmlhttpExpandContent.send(null);
}

function font_size(size) {
if (size) {
document.getElementById("top_links").style.fontSize="0.9em";
var a={fontSize:{to:size}};var fontAnim=new YAHOO.util.Anim(document.body,a,0.3,YAHOO.util.Easing.easeOut);fontAnim.animate();
}
}

function trim(s) {
return s.replace(/^\s+/,"").replace(/\s+$/,"");
}

function find(ary,element) {
for (var i=0;i<ary.length;i++) {if (ary[i]==element) {return i;}}
return -1;
}

function close_reader() {
if (document.getElementById("feed_reader")) {
var g=document.getElementById("feed_reader");
var a={opacity:{to:0},maxWidth:{to:350},maxHeight:{to:0},fontSize:{to:0}}; //IE BUG
var readerAnim=new YAHOO.util.Anim(g,a,0.5,YAHOO.util.Easing.backOut);readerAnim.animate();
}}

function add_reader_to_feeds(cl) {
for(i=0;i<cl.length;i++) {
if (cl[i].parentNode.getAttribute("class")!="navigate_into_results" && cl[i].parentNode.getAttribute("className")!="navigate_into_results" && cl[i].getAttribute("name")!="expand-box-button" && cl[i].getAttribute("name")!="expand-content-button") {
//cl[i].onclick=function (e) {

//OPTIMIZE!!!!

cl[i].onclick=function () {return false;}
YAHOO.util.Event.addListener(cl[i],"mouseover",function (e) {
//cl[i].onmouseover=function (e) {
var h=this.href;
var g=document.getElementById("feed_reader");
g.innerHTML="<div></div>";
//coords
var posx=0;var posy=0;
if (!e) var e=window.event;
//Yahoo DOM utils
//ty0=ty.match(/^(help_)?(.*)$/);
//var pos=YAHOO.util.Dom.getXY(ty0[2]);
//posy=pos[1]+32;posx=pos[0]-40;
if (e.pageX || e.pageY) 	{posx=e.pageX;posy=e.pageY;}
else if (e.clientX || e.clientY) 	{
posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;
}posy+=16;posx-=20;
var a={opacity:{to:100},maxWidth:{to:350},maxHeight:{from:0,to:300},fontSize:{to:13},top:{from:posy,to:posy},left:{to:posx}}; //IE BUG
var readerAnim=new YAHOO.util.Anim(g,a,0.5,YAHOO.util.Easing.backOut);readerAnim.animate();
g.innerHTML="<div>Please wait ...</div>";
read_feed(h,g);
return false;
}
);
//YAHOO.util.Event.addListener(cl[i],"click",function (e) {return false;});

}
}
}

function read_feed(uri,obj) {
xmlhttpReadFeed=getXmlHttp();
var xcall="http://www.ouzi.org/files/handlers.ajax.php5?action=read-feed&uri="+escape(uri)+"&async=1";
xmlhttpReadFeed.open("GET",xcall,true);
xmlhttpReadFeed.onreadystatechange=function() {
if (xmlhttpReadFeed.readyState==4) {
if (xmlhttpReadFeed.status==200) {
var bits=xmlhttpReadFeed.responseText.substr(0,1);
obj.innerHTML="<div>"+xmlhttpReadFeed.responseText.substr(1)+"</div>";
if (bits==1) {}
else {}
}
else {
alert("Error: Your request did not succeed.");
close_reader();
}
}
}
xmlhttpReadFeed.send(null);
}

function add_button_to_tags(cl) {
for(i=0;i<cl.length;i++) {
if (cl[i].parentNode.getAttribute("class")!="navigate_into_results" && cl[i].parentNode.getAttribute("className")!="navigate_into_results" && cl[i].getAttribute("name")!="expand-box-button" && cl[i].getAttribute("name")!="expand-content-button") {
YAHOO.util.Event.addListener(cl[i],"mouseover",function () {
//cl[i].onmouseover=function () {
if (O.addedTags.length==0) {O.addedTags.push(trim(document.getElementById("field").value));}
var h=this.innerHTML.match(/^([^<]*)/);
if (find(O.addedTags,h[1])==-1) {
if (O.currentTagButton) {O.currentTagButton=O.currentTagButton.parentNode.removeChild(O.currentTagButton);}
var g=document.createElement("img");
var tg=this.innerHTML.match(/^([^<]*)/);
g.setAttribute("alt","add tag "+tg[1]);
g.setAttribute("title","add tag "+tg[1]);
g.setAttribute("src","files/add.png");
g.setAttribute("className","tag_button"); //IE
g.setAttribute("class","tag_button"); //FF
YAHOO.util.Event.addListener(g,"click",function() {add_tag_to_query(this,tg[1]);});
//g.onclick=function () {add_tag_to_query(this,tg[1]);}
YAHOO.util.Event.addListener(g,"mouseover",function() {var a={padding:{to:1},borderWidth:{to:1}};var buttonAnim=new YAHOO.util.Anim(this,a,0.3,YAHOO.util.Easing.backOut);buttonAnim.animate();});
//g.onmouseover=function () {var a={padding:{to:1},borderWidth:{to:1}};var buttonAnim=new YAHOO.util.Anim(this,a,0.3,YAHOO.util.Easing.backOut);buttonAnim.animate();}
YAHOO.util.Event.addListener(g,"mouseout",function() {var a={padding:{to:0},borderWidth:{to:0}};var buttonAnim=new YAHOO.util.Anim(this,a,0.3,YAHOO.util.Easing.backOut);buttonAnim.animate();});
//g.onmouseout=function () {var a={padding:{to:0},borderWidth:{to:0}};var buttonAnim=new YAHOO.util.Anim(this,a,0.3,YAHOO.util.Easing.backOut);buttonAnim.animate();}
g.style.width="0px";
g.style.height="0px";
this.parentNode.insertBefore(g,this.nextSibling);
var a={width:{to:11},height:{to:9}};var buttonAnim=new YAHOO.util.Anim(g,a,0.2,YAHOO.util.Easing.backOut);buttonAnim.animate();
O.currentTagButton=g;
}
else {
if (O && O.currentTagButton) {
YAHOO.util.Event.addListener(O.currentTagButton,"click",function() {});
YAHOO.util.Event.addListener(O.currentTagButton,"mouseover",function() {});
YAHOO.util.Event.removeListener(O.currentTagButton,"click");
YAHOO.util.Event.removeListener(O.currentTagButton,"mouseover");
/*
O.currentTagButton.onclick=function () {};
O.currentTagButton.onmouseover=function () {};
*/
O.currentTagButton.style.cursor="default";
O.currentTagButton.style.border="none";
}
}
}
);
}
}
}

function add_tag_to_query(obj,str) {

//if (document.getElementById("field").value+=" "+str) {
if (document.getElementById("field").value=str+" "+document.getElementById("field").value) {
O.addedTags.push(str);
O.currentTagButton=null;
var a={opacity:{to:0},borderWidth:{to:0}};
var buttonAnim=new YAHOO.util.Anim(obj,a,0.4,YAHOO.util.Easing.backOut);
buttonAnim.onComplete.subscribe(function () {
var added=document.createElement("span");
added.setAttribute("class","added");
added.setAttribute("className","added");
var a_t=document.createTextNode("Added");
added.appendChild(a_t);
obj.parentNode.replaceChild(added,obj);
obj=added;
/*
obj.setAttribute("alt","Added");
obj.setAttribute("src","files/added.png");
obj.style.border="none";
obj.onclick=function () {};
obj.onmouseover=function () {};
obj.style.cursor="default";
obj.style.border="none";
*/
var a2={opacity:{from:0,to:1}};
var buttonAnim2=new YAHOO.util.Anim(obj,a2,0.7,YAHOO.util.Easing.backOut);
buttonAnim2.animate();
});
buttonAnim.animate();
}
}

function collapse_all(size) {
close_reader();
var boxes=new Array("word_definition","query_related_pages","query_related_feeds","related_tags_active_worldwide","query_related_sites","natural_cloud","tags_map","tags_map_by_initials","about_ouzi","contact_form","recent_searches","asso_searches","webmasters_welcome","webmasters_add_manually","webmasters_automated_adding","webmasters_advanced","webmasters_examples","webmasters_account");
for(i=0;i<boxes.length;i++) {
collapse_box(boxes[i],size);
}
}

function collapse_box(id,size) {
if (obj=document.getElementById(id)) {
if (size=="small") {var a={width:{to:260},maxHeight:{to:250}};}
else {
if (id=="natural_cloud" || obj.getAttribute("id").substr(0,10)=="webmasters") {var a={width:{to:550},maxHeight:{to:350}};}
else if (id=="contact_form") {var a={width:{to:390},maxHeight:{to:100,unit:"%"}};}
else if (id=="about_ouzi") {var a={width:{to:260},maxHeight:{to:100,unit:"%"}};}
else {var a={width:{to:260},maxHeight:{to:250}};}
if (id=="webmasters_welcome" || id=="webmasters_account" || id=="webmasters_examples") {var a={width:{to:260},maxHeight:{to:250}};}
}
var boxAnim=new YAHOO.util.Anim(obj,a,0.7,YAHOO.util.Easing.backOut);
boxAnim.onComplete.subscribe(function (e,obj) {
var scrollBoxAnim=new YAHOO.util.Scroll(obj,{scroll:{to:[0,0]}});
scrollBoxAnim.animate();
});
boxAnim.animate();
var scrollBoxAnim=new YAHOO.util.Scroll(obj,{scroll:{to:[0,0]}},0.00001);
scrollBoxAnim.animate();
if (id!="about_ouzi" && id !="contact_form") {obj.style.overflow="hidden";}
var ads=YAHOO.util.Dom.getElementsByClassName("ads_sky","div",obj);
if (ads.length>0) {ads[0].style.display="none";}
O.activeBox="";
}}

function expand_box(obj,size) {
obj=obj.parentNode.parentNode.parentNode;
if (O.activeBox!=obj) {
collapse_all(size);
//obj.firstChild.src="files/collapse-box.png";
//obj.onclick=function () {collapse_box(obj.parentNode.parentNode.parentNode.getAttribute("id"));}
if (obj.getAttribute("id")=="natural_cloud" || obj.getAttribute("id").substr(0,10)=="webmasters") {var a={width:{to:840},maxHeight:{to:450}};}
else {var a={width:{to:550},maxHeight:{to:400}};}
var boxAnim=new YAHOO.util.Anim(obj,a,0.7,YAHOO.util.Easing.backOut);
boxAnim.animate();
obj.style.overflow="auto";
var ads=YAHOO.util.Dom.getElementsByClassName("ads_sky","div",obj);
if (ads.length>0) {ads[0].style.display="block";}
O.activeBox=obj;
}}

function switchHelp(obj) {
for(k=0;k<O.activeHelpBoxes.length;k++) {hide_help(O.activeHelpBoxes[k]);}
O.na=new Array("previous-page","next-page","less-tags","more-tags","expand-box-button","expand-content-button");
O.nb=new Array();
O.h2=document.getElementsByTagName("h2");
for(k=0;k<O.h2.length;k++) {
if (document.getElementById("help_"+O.h2[k].parentNode.getAttribute("id"))) {
if (O.switchHelp!=1) {
document.getElementById("help_"+O.h2[k].parentNode.getAttribute("id")).innerHTML="<div>"+document.getElementById("help_"+O.h2[k].parentNode.getAttribute("id")).innerHTML+"</div>";
}}}
for(k=0;k<O.na.length;k++) {
var ecb=document.getElementsByName(O.na[k]);
if (document.getElementById("help_"+O.na[k])) {
if (O.switchHelp!=1) {document.getElementById("help_"+O.na[k]).innerHTML="<div>"+document.getElementById("help_"+O.na[k]).innerHTML+"</div>";}
O.nb.push(document.getElementsByName(O.na[k]));
}}
YAHOO.util.Event.removeListener(O.nb,"mouseover");
YAHOO.util.Event.removeListener(O.nb,"mouseout");
YAHOO.util.Event.removeListener(O.h2,"mouseover");
YAHOO.util.Event.removeListener(O.h2,"mouseout");
YAHOO.util.Event.addListener(O.nb,"mouseover",function(e) {show_help(e,"help_"+this.name);});
YAHOO.util.Event.addListener(O.nb,"mouseout",function(e) {hide_help("help_"+this.name);});
YAHOO.util.Event.addListener(O.h2,"mouseover",function(e) {show_help(e,"help_"+this.parentNode.id);});
YAHOO.util.Event.addListener(O.h2,"mouseout",function(e) {hide_help("help_"+this.parentNode.id);});
if (obj) {
//YAHOO.util.Event.addListener(document.getElementById("help_link"),"mouseout",
var a={opacity:{to:0},fontSize:{to:0}}; //IE BUG
var linkAnim=new YAHOO.util.Anim(obj,a,0.7,YAHOO.util.Easing.easeOut);
linkAnim.animate();
}
O.switchHelp=1;
}

function show_help(e,ty) {
if (document.getElementById(ty)) {
//coords
var posx=0;var posy=0;
if (!e) var e=window.event;
//Yahoo DOM utils
//ty0=ty.match(/^(help_)?(.*)$/);
//var pos=YAHOO.util.Dom.getXY(ty0[2]);
//posy=pos[1]+32;posx=pos[0]-40;
if (e.pageX || e.pageY) 	{posx=e.pageX;posy=e.pageY;}
else if (e.clientX || e.clientY) 	{
posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;
}posy+=32;posx-=40;
var a={opacity:{to:100},maxWidth:{to:150},maxHeight:{to:300},fontSize:{to:14},top:{from:posy,to:posy},left:{to:posx}}; //IE BUG
//var a={opacity:{to:100},width:{to:150},height:{to:300},fontSize:{to:11},top:{from:posy,to:posy},left:{to:posx}};
var linkAnim=new YAHOO.util.Anim(document.getElementById(ty),a,0.7,YAHOO.util.Easing.backOut);
linkAnim.animate();
//document.getElementById("help_"+this.parentNode.getAttribute("id")).style.overflow="auto";
O.activeHelpBoxes.push(ty);
}
}

function hide_help(ty) {
if (document.getElementById(ty)) {
var a={opacity:{to:0},maxWidth:{to:0},maxHeight:{to:0},fontSize:{to:0},left:{to:0}}; //IE BUG
//var a={opacity:{to:0},width:{to:0},height:{to:0},fontSize:{to:0},left:{to:0}};
var linkAnim=new YAHOO.util.Anim(document.getElementById(ty),a,0.7,YAHOO.util.Easing.backOut);
linkAnim.animate();
//document.getElementById("help_"+this.parentNode.getAttribute("id")).style.overflow="hidden";
}
}

/**
* Function : dump()
* Arguments: The data - array,hash(associative array),object
*    The level - OPTIONAL
* Returns  : The textual representation of the array.
* This function was inspired by the print_r function of PHP.
* This will accept some data as the argument and return a
* text that will be a more readable version of the
* array/hash/object that is given.
*/
function dump(arr,level) {
if(arr){
var dumped_text="";
if (!level) level=0;
//The padding given at the beginning of the line.
var level_padding="";
for(var j=0;j<level+1;j++) level_padding+="&nbsp;&nbsp;&nbsp;&nbsp;";
if (typeof(arr)=='object') { //Array/Hashes/Objects
for(var item in arr) {
var value=arr[item];
if(typeof(value)=='object') { //If it is an array,
dumped_text+=level_padding+"['"+item+"'] ...<br />";
dumped_text+=dump(value,level+1);
} else {
dumped_text+=level_padding+"['"+item+"'] => \""+value+"\"<br />";
}}
} else { //Stings/Chars/Numbers etc.
dumped_text="===>"+arr+"<===("+typeof(arr)+")";
}
return dumped_text;
}
}

function sign_in(obj) {
var login_id=document.getElementById("login_id").value;
var login_pass=document.getElementById("login_pass").value;
if (document.getElementById("login_sess_id")) {var sess_id=document.getElementById("login_sess_id").value;}
else {var sess_id="";}
if (login_id=="" || login_pass=="") {return false;}
if (document.getElementById("login_status")) {document.getElementById("login_status").innerHTML="Please wait ...";}
//var h2=document.getElementById("webmasters_account").innerHTML.match(/(<h2>.*<\/h2>)/i);
xmlhttpLogin=getXmlHttp();
var xcall="files/handlers.ajax.php5?action=login&login_id="+escape(login_id)+"&login_pass="+escape(login_pass)+"&sess_id="+sess_id;
xmlhttpLogin.open("GET",xcall,false);
xmlhttpLogin.onreadystatechange=function() {
if (xmlhttpLogin.readyState==4) {
if (xmlhttpLogin.status==200) {
var out=trim(xmlhttpLogin.responseText);
var bits=out.substr(0,1);
if (bits==1) {
document.getElementById("account_details").innerHTML="";
document.getElementById("login_form").style.display="none";
//alert(document.getElementById("login_form_table").parentNode.parentNode.parentNode.getAttribute("id"));
expand_box(document.getElementById("login_form_table"),"small");
}
else if (bits==0) {}
document.getElementById("account_details").innerHTML="<div>"+out.substr(1)+"</div>";
document.getElementById("login_status").innerHTML="";
}
else {alert("Error: Your request did not succeed.");}
}}
xmlhttpLogin.send(null);
}

function log_out() {
if (document.getElementById("login_sess_id")) {var sess_id=document.getElementById("login_sess_id").value;}
else {var sess_id="";}
xmlhttpLogout=getXmlHttp();
var xcall="files/handlers.ajax.php5?action=logout&sess_id="+sess_id;
xmlhttpLogout.open("GET",xcall,false);
xmlhttpLogout.onreadystatechange=function() {
if (xmlhttpLogout.readyState==4) {
if (xmlhttpLogout.status==200) {
var out=trim(xmlhttpLogout.responseText);
var bits=out.substr(0,1);
if (bits==1) {
document.getElementById("login_status").innerHTML="You are now logged out.";
document.getElementById("account_details").innerHTML="";
document.getElementById("login_form").style.display="block";
document.getElementById("login_pass").value="";
collapse_box("webmasters_account","small");}
else if (bits==0) {document.getElementById("login_status").innerHTML="You are NOT logged out.";}
else if (bits==4) {document.getElementById("login_status").innerHTML="Your IP is locked for a while.";}
else if (bits==5) {document.getElementById("login_status").innerHTML="Your E-mail is locked for a while.";}
}
else {alert("Error: Your request did not succeed.");}
}}
xmlhttpLogout.send(null);
}

function send_pass() {
var login_id=document.getElementById("login_id").value;
if (login_id=="") {
document.getElementById("login_status").innerHTML="Enter your E-mail before.";
return false;
}
if (document.getElementById("login_status")) {document.getElementById("login_status").innerHTML="Please wait ...";}
xmlhttpSendPass=getXmlHttp();
var xcall="files/handlers.ajax.php5?action=send-pass&login_id="+escape(login_id);
xmlhttpSendPass.open("GET",xcall,false);
xmlhttpSendPass.onreadystatechange=function() {
if (xmlhttpSendPass.readyState==4) {
if (xmlhttpSendPass.status==200) {
var out=trim(xmlhttpSendPass.responseText);
var bits=out.substr(0,1);
if (bits==1) {document.getElementById("login_status").innerHTML="An E-mail has been sent.";}
else if (bits==0) {document.getElementById("login_status").innerHTML=out.substr(1);}
document.getElementById("account_details").innerHTML="";
}
else {alert("Error: Your request did not succeed.");}
}}
xmlhttpSendPass.send(null);
}

function default_pattern(n) {
if (n!=0 && (!n || n>9)) {return false;}
xmlhttpGetPattern=getXmlHttp();
var xcall="files/handlers.ajax.php5?action=get-pattern&default=1&n="+escape(n);
xmlhttpGetPattern.open("GET",xcall,false);
xmlhttpGetPattern.onreadystatechange=function() {
if (xmlhttpGetPattern.readyState==4) {
if (xmlhttpGetPattern.status==200) {
var out=trim(xmlhttpGetPattern.responseText);
var bits=out.substr(0,1);
if (bits==1) {
if (document.getElementById("pattern_"+n)) {
//document.getElementById("pattern_"+n).innerHTML=out.substr(1);}
document.getElementById("pattern_"+n).value=out.substr(1);
document.getElementById("pattern_"+n+"_status").innerHTML="<span style=\"font-style:italic;\">Default Pattern Restored (not saved yet)</span>";
var a={opacity:{from:0,to:1}};
var statusAnim=new YAHOO.util.Anim("pattern_"+n+"_status",a,0.4,YAHOO.util.Easing.EaseOut);
statusAnim.animate();
}}}
else {alert("Error: Your request did not succeed.");}
}}
xmlhttpGetPattern.send(null);
}

function save_pattern(n) {
if (n!=0 && (!n || n>9)) {return false;}
if (document.getElementById("login_sess_id")) {var sess_id=document.getElementById("login_sess_id").value;}
else {var sess_id="";}
document.getElementById("pattern_"+n+"_status").innerHTML="<span style=\"font-style:italic;\">Please wait ... </span> ";
xmlhttpSavePattern=getXmlHttp();
var xcall="files/handlers.ajax.php5?action=save-pattern&pattern="+escape(document.getElementById("pattern_"+n).value)+"&n="+escape(n)+"&sess_id="+sess_id;
xmlhttpSavePattern.open("GET",xcall,false);
xmlhttpSavePattern.onreadystatechange=function() {
if (xmlhttpSavePattern.readyState==4) {
if (xmlhttpSavePattern.status==200) {
var out=trim(xmlhttpSavePattern.responseText);
var bits=out.substr(0,1);
//if (bits==1) {
if (document.getElementById("pattern_"+n)) {
document.getElementById("pattern_"+n+"_status").innerHTML=out.substr(1);
var a={opacity:{from:0,to:1}};
var statusAnim=new YAHOO.util.Anim("pattern_"+n+"_status",a,0.4,YAHOO.util.Easing.EaseOut);
statusAnim.animate();
}}
else {alert("Error: Your request did not succeed.");}
}}
xmlhttpSavePattern.send(null);
}

