if(typeof YUI!="undefined"){var _YUI=YUI;}var YUI=function(){var c=0,e=this,b=arguments,a=b.length,d=(typeof YUI_config!=="undefined")&&YUI_config;if(!(e instanceof YUI)){e=new YUI();}else{e._init();if(d){e.applyConfig(d);}if(!a){e._setup();}}if(a){for(;c<a;c++){e.applyConfig(b[c]);}e._setup();}return e;};(function(){var n,b,o="3.2.0",l="http://yui.yahooapis.com/",r="yui3-js-enabled",j=function(){},g=Array.prototype.slice,p={"io.xdrReady":1,"io.xdrResponse":1,"SWF.eventHandler":1},f=(typeof window!="undefined"),e=(f)?window:null,t=(f)?e.document:null,d=t&&t.documentElement,a=d&&d.className,c={},h=new Date().getTime(),k=function(x,w,v,u){if(x&&x.addEventListener){x.addEventListener(w,v,u);}else{if(x&&x.attachEvent){x.attachEvent("on"+w,v);}}},s=function(y,x,w,u){if(y&&y.removeEventListener){try{y.removeEventListener(x,w,u);}catch(v){}}else{if(y&&y.detachEvent){y.detachEvent("on"+x,w);}}},q=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;if(f){s(window,"load",q);}},i=function(w,v){var u=w.Env._loader;if(u){u.ignoreRegistered=false;u.onEnd=null;u.data=null;u.required=[];u.loadType=null;}else{u=new w.Loader(w.config);w.Env._loader=u;}return u;},m=function(w,v){for(var u in v){if(v.hasOwnProperty(u)){w[u]=v[u];}}};if(d&&a.indexOf(r)==-1){if(a){a+=" ";}a+=r;d.className=a;}if(o.indexOf("@")>-1){o="3.2.0pr1";}n={applyConfig:function(B){B=B||j;var w,y,x=this.config,z=x.modules,v=x.groups,A=x.rls,u=this.Env._loader;for(y in B){if(B.hasOwnProperty(y)){w=B[y];if(z&&y=="modules"){m(z,w);}else{if(v&&y=="groups"){m(v,w);}else{if(A&&y=="rls"){m(A,w);}else{if(y=="win"){x[y]=w.contentWindow||w;x.doc=x[y].document;}else{if(y=="_yuid"){}else{x[y]=w;}}}}}}}if(u){u._config(B);}},_config:function(u){this.applyConfig(u);},_init:function(){var x,y=this,u=YUI.Env,v=y.Env,z,w;y.version=o;if(!v){y.Env={mods:{},versions:{},base:l,cdn:l+o+"/build/",_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:"y",_loaded:{},getBase:u&&u.getBase||function(F,E){var A,B,D,G,C;B=(t&&t.getElementsByTagName("script"))||[];for(D=0;D<B.length;D=D+1){G=B[D].src;if(G){C=G.match(F);A=C&&C[1];if(A){x=C[2];if(x){C=x.indexOf("js");if(C>-1){x=x.substr(0,C);}}C=G.match(E);if(C&&C[3]){A=C[1]+C[3];}break;}}}return A||v.cdn;}};v=y.Env;v._loaded[o]={};if(u&&y!==YUI){v._yidx=++u._yidx;v._guidp=("yui_"+o+"_"+v._yidx+"_"+h).replace(/\./g,"_");}else{if(typeof _YUI!="undefined"){u=_YUI.Env;v._yidx+=u._yidx;v._uidx+=u._uidx;for(z in u){if(!(z in v)){v[z]=u[z];}}}}y.id=y.stamp(y);c[y.id]=y;}y.constructor=YUI;y.config=y.config||{win:e,doc:t,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,fetchCSS:true};w=y.config;w.base=YUI.config.base||y.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);w.loaderPath=YUI.config.loaderPath||"loader/loader"+(x||"-min.")+"js";},_setup:function(z){var v,y=this,u=[],x=YUI.Env.mods,w=y.config.core||["get","rls","intl-base","loader","yui-log","yui-later","yui-throttle"];for(v=0;v<w.length;v++){if(x[w[v]]){u.push(w[v]);}}y._attach(["yui-base"]);y._attach(u);},applyTo:function(A,z,w){if(!(z in p)){this.log(z+": applyTo not allowed","warn","yui");return null;}var v=c[A],y,u,x;if(v){y=z.split(".");u=v;for(x=0;x<y.length;x=x+1){u=u[y[x]];if(!u){this.log("applyTo not found: "+z,"warn","yui");}}return u.apply(v,w);}return null;},add:function(w,B,v,z){z=z||{};var A=YUI.Env,y={name:w,fn:B,version:v,details:z},u,x;A.mods[w]=y;A.versions[v]=A.versions[v]||{};A.versions[v][w]=y;for(x in c){if(c.hasOwnProperty(x)){u=c[x].Env._loader;if(u){if(!u.moduleInfo[w]){u.addModule(z,w);}}}}return this;},_attach:function(u,z){var B,x,F,v,E,w,G=YUI.Env.mods,y=this,A=y.Env._attached,C=u.length;for(B=0;B<C;B++){x=u[B];F=G[x];if(!A[x]&&F){A[x]=true;v=F.details;E=v.requires;w=v.use;if(E&&E.length){if(!y._attach(E)){return false;}}if(F.fn){try{F.fn(y,x);}catch(D){y.error("Attach error: "+x,D,x);return false;}}if(w&&w.length){if(!y._attach(w)){return false;}}}}return true;},use:function(){if(!this.Array){this._attach(["yui-base"]);}var K,D,L,v=this,M=YUI.Env,w=g.call(arguments,0),x=M.mods,u=v.Env,A=u._used,I=M._loaderQueue,Q=w[0],y=w[w.length-1],C=v.Array,O=v.config,B=O.bootstrap,J=[],G=[],N,P=true,z=O.fetchCSS,H=function(S,R){if(!S.length){return;}C.each(S,function(V){if(!R){G.push(V);}if(A[V]){return;}var T=x[V],W,U;if(T){A[V]=true;W=T.details.requires;U=T.details.use;}else{if(!M._loaded[o][V]){J.push(V);}else{A[V]=true;}}if(W&&W.length){H(W);}if(U&&U.length){H(U,1);}});},F=function(R){if(y){try{y(v,R);}catch(S){v.error("use callback error",S,w);}}},E=function(W){var T=W||{success:true,msg:"not dynamic"},V,S,R,U=true,X=T.data;v._loading=false;if(X){R=J.concat();J=[];G=[];H(X);S=J.length;if(S){if(J.sort().join()==R.sort().join()){S=false;}}}if(S&&X){V=w.concat();V.push(function(){if(v._attach(X)){F(T);}});v._loading=false;v.use.apply(v,V);}else{if(X){U=v._attach(X);}if(U){F(T);}}if(v._useQueue&&v._useQueue.size()&&!v._loading){v.use.apply(v,v._useQueue.next());}};if(v._loading){v._useQueue=v._useQueue||new v.Queue();v._useQueue.add(w);return v;}if(typeof y==="function"){w.pop();}else{y=null;}if(Q==="*"){N=true;w=v.Object.keys(x);}if(B&&!N&&v.Loader&&w.length){D=i(v);D.require(w);D.ignoreRegistered=true;D.calculate(null,(z)?null:"js");w=D.sorted;}H(w);K=J.length;if(K){J=v.Object.keys(C.hash(J));K=J.length;}if(B&&K&&v.Loader){v._loading=true;D=i(v);D.onEnd=E;D.context=v;D.data=w;D.require((z)?J:w);D.insert(null,(z)?null:"js");}else{if(K&&v.config.use_rls){v.Get.script(v._rls(w),{onEnd:function(R){E(R);},data:w});}else{if(B&&K&&v.Get&&!u.bootstrapped){v._loading=true;w=C(arguments,0,true);L=function(){v._loading=false;I.running=false;u.bootstrapped=true;if(v._attach(["loader"])){v.use.apply(v,w);}};if(M._bootstrapping){I.add(L);}else{M._bootstrapping=true;v.Get.script(O.base+O.loaderPath,{onEnd:L});}}else{if(K){v.message("Requirement NOT loaded: "+J,"warn","yui");}P=v._attach(w);if(P){E();}}}}return v;},namespace:function(){var u=arguments,y=null,w,v,x;for(w=0;w<u.length;w=w+1){x=(""+u[w]).split(".");y=this;for(v=(x[0]=="YAHOO")?1:0;v<x.length;v=v+1){y[x[v]]=y[x[v]]||{};y=y[x[v]];}}return y;},log:j,message:j,error:function(x,v){var w=this,u;if(w.config.errorFn){u=w.config.errorFn.apply(w,arguments);}if(w.config.throwFail&&!u){throw(v||new Error(x));}else{w.message(x,"error");}return w;},guid:function(u){var v=this.Env._guidp+(++this.Env._uidx);return(u)?(u+v):v;},stamp:function(w,x){var u;if(!w){return w;}if(w.uniqueID&&w.nodeType&&w.nodeType!==9){u=w.uniqueID;}else{u=(typeof w==="string")?w:w._yuid;}if(!u){u=this.guid();if(!x){try{w._yuid=u;}catch(v){u=null;}}}return u;}};YUI.prototype=n;for(b in n){if(n.hasOwnProperty(b)){YUI[b]=n[b];}}YUI._init();if(f){k(window,"load",q);}else{q();}YUI.Env.add=k;YUI.Env.remove=s;if(typeof exports=="object"){exports.YUI=YUI;}})();YUI.add("yui-base",function(b){b.Lang=b.Lang||{};var g=b.Lang,q="array",j="boolean",d="date",e="error",f="function",l="number",p="null",i="object",n="regexp",k="string",h=Object.prototype.toString,s="undefined",a={"undefined":s,"number":l,"boolean":j,"string":k,"[object Function]":f,"[object RegExp]":n,"[object Array]":q,"[object Date]":d,"[object Error]":e},m=/^\s+|\s+$/g,o="",c=/\{\s*([^\|\}]+?)\s*(?:\|([^\}]*))?\s*\}/g;g.isArray=function(t){return g.type(t)===q;};g.isBoolean=function(t){return typeof t===j;};g.isFunction=function(t){return g.type(t)===f;};g.isDate=function(t){return g.type(t)===d&&t.toString()!=="Invalid Date"&&!isNaN(t);};g.isNull=function(t){return t===null;};g.isNumber=function(t){return typeof t===l&&isFinite(t);};g.isObject=function(w,v){var u=typeof w;return(w&&(u===i||(!v&&(u===f||g.isFunction(w)))))||false;};g.isString=function(t){return typeof t===k;};g.isUndefined=function(t){return typeof t===s;};g.trim=function(t){try{return t.replace(m,o);}catch(u){return t;}};g.isValue=function(v){var u=g.type(v);switch(u){case l:return isFinite(v);case p:case s:return false;default:return!!(u);}};g.type=function(t){return a[typeof t]||a[h.call(t)]||(t?i:p);};g.sub=function(t,u){return((t.replace)?t.replace(c,function(v,w){return(!g.isUndefined(u[w]))?u[w]:v;}):t);};(function(){var t=b.Lang,u=Array.prototype,v="length",w=function(D,B,z){var A=(z)?2:w.test(D),y,x,E=B||0;if(A){try{return u.slice.call(D,E);}catch(C){x=[];y=D.length;for(;E<y;E++){x.push(D[E]);}return x;}}else{return[D];}};b.Array=w;w.test=function(z){var x=0;if(t.isObject(z)){if(t.isArray(z)){x=1;}else{try{if((v in z)&&!z.tagName&&!z.alert&&!z.apply){x=2;}}catch(y){}}}return x;};w.each=(u.forEach)?function(x,y,z){u.forEach.call(x||[],y,z||b);return b;}:function(y,A,B){var x=(y&&y.length)||0,z;for(z=0;z<x;z=z+1){A.call(B||b,y[z],z,y);}return b;};w.hash=function(z,y){var C={},x=z.length,B=y&&y.length,A;for(A=0;A<x;A=A+1){C[z[A]]=(B&&B>A)?y[A]:true;}return C;};w.indexOf=(u.indexOf)?function(x,y){return u.indexOf.call(x,y);}:function(x,z){for(var y=0;y<x.length;y=y+1){if(x[y]===z){return y;}}return-1;};w.numericSort=function(y,x){return(y-x);};w.some=(u.some)?function(x,y,z){return u.some.call(x,y,z);}:function(y,A,B){var x=y.length,z;for(z=0;z<x;z=z+1){if(A.call(B,y[z],z,y)){return true;}}return false;};})();function r(){this._init();this.add.apply(this,arguments);}r.prototype={_init:function(){this._q=[];},next:function(){return this._q.shift();},last:function(){return this._q.pop();},add:function(){b.Array.each(b.Array(arguments,0,true),function(t){this._q.push(t);},this);return this;},size:function(){return this._q.length;}};b.Queue=r;YUI.Env._loaderQueue=YUI.Env._loaderQueue||new r();(function(){var u=b.Lang,t="__",v=function(y,x){var w=x.toString;if(u.isFunction(w)&&w!=Object.prototype.toString){y.toString=w;}};b.merge=function(){var x=arguments,z={},y,w=x.length;for(y=0;y<w;y=y+1){b.mix(z,x[y],true);}return z;};b.mix=function(w,F,y,E,B,D){if(!F||!w){return w||b;}if(B){switch(B){case 1:return b.mix(w.prototype,F.prototype,y,E,0,D);case 2:b.mix(w.prototype,F.prototype,y,E,0,D);break;case 3:return b.mix(w,F.prototype,y,E,0,D);case 4:return b.mix(w.prototype,F,y,E,0,D);default:}}var A,z,x,C;if(E&&E.length){for(A=0,z=E.length;A<z;++A){x=E[A];C=u.type(w[x]);if(F.hasOwnProperty(x)){if(D&&C=="object"){b.mix(w[x],F[x]);}else{if(y||!(x in w)){w[x]=F[x];}}}}}else{for(A in F){if(F.hasOwnProperty(A)){if(D&&u.isObject(w[A],true)){b.mix(w[A],F[A],y,E,0,true);}else{if(y||!(A in w)){w[A]=F[A];}}}}if(b.UA.ie){v(w,F);}}return w;};b.cached=function(y,w,x){w=w||{};return function(A){var z=(arguments.length>1)?Array.prototype.join.call(arguments,t):A;if(!(z in w)||(x&&w[z]==x)){w[z]=y.apply(y,arguments);}return w[z];};};})();(function(){b.Object=function(y){var x=function(){};x.prototype=y;return new x();};var v=b.Object,w=function(y,x){return y&&y.hasOwnProperty&&y.hasOwnProperty(x);},u,t=function(B,A){var z=(A===2),x=(z)?0:[],y;for(y in B){if(w(B,y)){if(z){x++;}else{x.push((A)?B[y]:y);}}}return x;};v.keys=function(x){return t(x);};v.values=function(x){return t(x,1);};v.size=function(x){return t(x,2);};v.hasKey=w;v.hasValue=function(y,x){return(b.Array.indexOf(v.values(y),x)>-1);};v.owns=w;v.each=function(B,A,C,z){var y=C||b,x;for(x in B){if(z||w(B,x)){A.call(y,B[x],x,B);}}return b;};v.some=function(B,A,C,z){var y=C||b,x;for(x in B){if(z||w(B,x)){if(A.call(y,B[x],x,B)){return true;}}}return false;};v.getValue=function(B,A){if(!b.Lang.isObject(B)){return u;}var y,z=b.Array(A),x=z.length;for(y=0;B!==u&&y<x;y++){B=B[z[y]];}return B;};v.setValue=function(D,B,C){var x,A=b.Array(B),z=A.length-1,y=D;if(z>=0){for(x=0;y!==u&&x<z;x++){y=y[A[x]];}if(y!==u){y[A[x]]=C;}else{return u;}}return D;};v.isEmpty=function(y){for(var x in y){if(w(y,x)){return false;}}return true;};})();b.UA=YUI.Env.UA||function(){var w=function(B){var C=0;return parseFloat(B.replace(/\./g,function(){return(C++==1)?"":".";}));},x=b.config.win,A=x&&x.navigator,z={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,caja:A&&A.cajaVersion,secure:false,os:null},v=A&&A.userAgent,y=x&&x.location,u=y&&y.href,t;z.secure=u&&(u.toLowerCase().indexOf("https")===0);if(v){if((/windows|win32/i).test(v)){z.os="windows";}else{if((/macintosh/i).test(v)){z.os="macintosh";}else{if((/rhino/i).test(v)){z.os="rhino";}}}if((/KHTML/).test(v)){z.webkit=1;}t=v.match(/AppleWebKit\/([^\s]*)/);if(t&&t[1]){z.webkit=w(t[1]);if(/ Mobile\//.test(v)){z.mobile="Apple";t=v.match(/OS ([^\s]*)/);if(t&&t[1]){t=w(t[1].replace("_","."));}z.ipad=(navigator.platform=="iPad")?t:0;z.ipod=(navigator.platform=="iPod")?t:0;z.iphone=(navigator.platform=="iPhone")?t:0;z.ios=z.ipad||z.iphone||z.ipod;}else{t=v.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(t){z.mobile=t[0];}if(/ Android/.test(v)){z.mobile="Android";t=v.match(/Android ([^\s]*);/);if(t&&t[1]){z.android=w(t[1]);}}}t=v.match(/Chrome\/([^\s]*)/);if(t&&t[1]){z.chrome=w(t[1]);}else{t=v.match(/AdobeAIR\/([^\s]*)/);if(t){z.air=t[0];}}}if(!z.webkit){t=v.match(/Opera[\s\/]([^\s]*)/);if(t&&t[1]){z.opera=w(t[1]);t=v.match(/Opera Mini[^;]*/);if(t){z.mobile=t[0];}}else{t=v.match(/MSIE\s([^;]*)/);if(t&&t[1]){z.ie=w(t[1]);}else{t=v.match(/Gecko\/([^\s]*)/);if(t){z.gecko=1;t=v.match(/rv:([^\s\)]*)/);if(t&&t[1]){z.gecko=w(t[1]);}}}}}}YUI.Env.UA=z;return z;}();},"3.2.0");YUI.add("get",function(a){(function(){var c=a.UA,b=a.Lang,e="text/javascript",f="text/css",d="stylesheet";a.Get=function(){var m,n,j,l={},k=0,u,w=function(A,x,B){var y=B||a.config.win,C=y.document,D=C.createElement(A),z;for(z in x){if(x[z]&&x.hasOwnProperty(z)){D.setAttribute(z,x[z]);}}return D;},t=function(y,z,x){var A={id:a.guid(),type:f,rel:d,href:y};if(x){a.mix(A,x);}return w("link",A,z);},s=function(y,z,x){var A={id:a.guid(),type:e};if(x){a.mix(A,x);}A.src=y;return w("script",A,z);},p=function(y,z,x){return{tId:y.tId,win:y.win,data:y.data,nodes:y.nodes,msg:z,statusText:x,purge:function(){n(this.tId);}};},o=function(B,A,x){var y=l[B],z;if(y&&y.onEnd){z=y.context||y;y.onEnd.call(z,p(y,A,x));}},v=function(A,z){var x=l[A],y;if(x.timer){clearTimeout(x.timer);}if(x.onFailure){y=x.context||x;x.onFailure.call(y,p(x,z));}o(A,z,"failure");},i=function(A){var x=l[A],z,y;if(x.timer){clearTimeout(x.timer);}x.finished=true;if(x.aborted){z="transaction "+A+" was aborted";v(A,z);return;}if(x.onSuccess){y=x.context||x;x.onSuccess.call(y,p(x));}o(A,z,"OK");},q=function(z){var x=l[z],y;if(x.onTimeout){y=x.context||x;x.onTimeout.call(y,p(x));}o(z,"timeout","timeout");},h=function(z,C){var y=l[z],B,G,F,D,A,x,H,E;if(y.timer){clearTimeout(y.timer);}if(y.aborted){B="transaction "+z+" was aborted";v(z,B);return;}if(C){y.url.shift();if(y.varName){y.varName.shift();}}else{y.url=(b.isString(y.url))?[y.url]:y.url;if(y.varName){y.varName=(b.isString(y.varName))?[y.varName]:y.varName;}}G=y.win;F=G.document;D=F.getElementsByTagName("head")[0];if(y.url.length===0){i(z);return;}x=y.url[0];if(!x){y.url.shift();return h(z);}if(y.timeout){y.timer=setTimeout(function(){q(z);},y.timeout);}if(y.type==="script"){A=s(x,G,y.attributes);}else{A=t(x,G,y.attributes);}j(y.type,A,z,x,G,y.url.length);y.nodes.push(A);E=y.insertBefore||F.getElementsByTagName("base")[0];if(E){H=m(E,z);if(H){H.parentNode.insertBefore(A,H);}}else{D.appendChild(A);}if((c.webkit||c.gecko)&&y.type==="css"){h(z,x);}},g=function(){if(u){return;}u=true;var x,y;for(x in l){if(l.hasOwnProperty(x)){y=l[x];if(y.autopurge&&y.finished){n(y.tId);delete l[x];}}}u=false;},r=function(y,x,z){z=z||{};var C="q"+(k++),A,B=z.purgethreshold||a.Get.PURGE_THRESH;if(k%B===0){g();}l[C]=a.merge(z,{tId:C,type:y,url:x,finished:false,nodes:[]});A=l[C];A.win=A.win||a.config.win;A.context=A.context||A;A.autopurge=("autopurge"in A)?A.autopurge:(y==="script")?true:false;A.attributes=A.attributes||{};A.attributes.charset=z.charset||A.attributes.charset||"utf-8";h(C);return{tId:C};};j=function(z,E,D,y,C,B,x){var A=x||h;if(c.ie){E.onreadystatechange=function(){var F=this.readyState;if("loaded"===F||"complete"===F){E.onreadystatechange=null;A(D,y);}};}else{if(c.webkit){if(z==="script"){E.addEventListener("load",function(){A(D,y);});}}else{E.onload=function(){A(D,y);};E.onerror=function(F){v(D,F+": "+y);};}}};m=function(x,A){var y=l[A],z=(b.isString(x))?y.win.document.getElementById(x):x;if(!z){v(A,"target node not found: "+x);}return z;};n=function(C){var y,A,G,D,H,B,z,F,E,x=l[C];if(x){y=x.nodes;A=y.length;G=x.win.document;D=G.getElementsByTagName("head")[0];E=x.insertBefore||G.getElementsByTagName("base")[0];if(E){H=m(E,C);if(H){D=H.parentNode;}}for(B=0;B<A;B=B+1){z=y[B];if(z.clearAttributes){z.clearAttributes();}else{for(F in z){if(z.hasOwnProperty(F)){delete z[F];}}}D.removeChild(z);}}x.nodes=[];};return{PURGE_THRESH:20,_finalize:function(x){setTimeout(function(){i(x);},0);},abort:function(y){var z=(b.isString(y))?y:y.tId,x=l[z];if(x){x.aborted=true;}},script:function(x,y){return r("script",x,y);},css:function(x,y){return r("css",x,y);}};}();})();},"3.2.0");YUI.add("features",function(c){var a={};c.mix(c.namespace("Features"),{tests:a,add:function(d,e,f){a[d]=a[d]||{};a[d][e]=f;},all:function(e,f){var g=a[e],d="";if(g){c.Object.each(g,function(i,h){d+=h+":"+(c.Features.test(e,h,f)?1:0)+";";});}return d;},test:function(e,g,f){var d,i,k,j=a[e],h=j&&j[g];if(!h){}else{d=h.result;if(c.Lang.isUndefined(d)){i=h.ua;if(i){d=(c.UA[i]);}k=h.test;if(k&&((!i)||d)){d=k.apply(c,f);}h.result=d;}}return d;}});var b=c.Features.add;b("load","0",{"trigger":"dom-style","ua":"ie"});b("load","1",{"test":function(e){var d=e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange"in e.config.win)||!d||d<8);},"trigger":"history-hash"});b("load","2",{"test":function(d){return(d.config.win&&("ontouchstart"in d.config.win&&!d.UA.chrome));},"trigger":"dd-drag"});},"3.2.0",{requires:["yui-base"]});YUI.add("rls",function(a){a._rls=function(g){var d=a.config,f=d.rls||{m:1,v:a.version,gv:d.gallery,env:1,lang:d.lang,"2in3v":d["2in3"],"2v":d.yui2,filt:d.filter,filts:d.filters,tests:1},b=d.rls_base||"load?",e=d.rls_tmpl||function(){var h="",i;for(i in f){if(i in f&&f[i]){h+=i+"={"+i+"}&";}}return h;}(),c;f.m=g;f.env=a.Object.keys(YUI.Env.mods);f.tests=a.Features.all("load",[a]);c=a.Lang.sub(b+e,f);d.rls=f;d.rls_tmpl=e;return c;};},"3.2.0",{requires:["yui-base","get","features"]});YUI.add("intl-base",function(b){var a=/[, ]/;b.mix(b.namespace("Intl"),{lookupBestLang:function(g,h){var f,j,c,e;function d(l){var k;for(k=0;k<h.length;k+=1){if(l.toLowerCase()===h[k].toLowerCase()){return h[k];}}}if(b.Lang.isString(g)){g=g.split(a);}for(f=0;f<g.length;f+=1){j=g[f];if(!j||j==="*"){continue;}while(j.length>0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.2.0",{requires:["yui-base"]});YUI.add("yui-log",function(a){(function(){var d=a,e="yui:log",b="undefined",c={debug:1,info:1,warn:1,error:1};d.log=function(j,s,g,q){var l,p,n,k,o,i=d,r=i.config,h=(i.fire)?i:YUI.Env.globalEvents;if(r.debug){if(g){p=r.logExclude;n=r.logInclude;if(n&&!(g in n)){l=1;}else{if(p&&(g in p)){l=1;}}}if(!l){if(r.useBrowserConsole){k=(g)?g+": "+j:j;if(i.Lang.isFunction(r.logFn)){r.logFn.call(i,j,s,g);}else{if(typeof console!=b&&console.log){o=(s&&console[s]&&(s in c))?s:"log";console[o](k);}else{if(typeof opera!=b){opera.postError(k);}}}}if(h&&!q){if(h==i&&(!h.getEvent(e))){h.publish(e,{broadcast:2});}h.fire(e,{msg:j,cat:s,src:g});}}}return i;};d.message=function(){return d.log.apply(d,arguments);};})();},"3.2.0",{requires:["yui-base"]});YUI.add("yui-later",function(a){(function(){var b=a.Lang,c=function(e,k,g,j,i){e=e||0;var d=g,h,l;if(k&&b.isString(g)){d=k[g];}h=!b.isUndefined(j)?function(){d.apply(k,a.Array(j));}:function(){d.call(k);};l=(i)?setInterval(h,e):setTimeout(h,e);return{id:l,interval:i,cancel:function(){if(this.interval){clearInterval(l);}else{clearTimeout(l);}}};};a.later=c;b.later=c;})();},"3.2.0",{requires:["yui-base"]});YUI.add("yui-throttle",function(b){
/* Based on work by Simon Willison: http://gist.github.com/292562 */
var a=function(d,c){c=(c)?c:(b.config.throttleTime||150);if(c===-1){return(function(){d.apply(null,arguments);});}var e=(new Date()).getTime();return(function(){var f=(new Date()).getTime();if(f-e>c){e=f;d.apply(null,arguments);}});};b.throttle=a;},"3.2.0",{requires:["yui-base"]});YUI.add("yui",function(a){},"3.2.0",{use:["yui-base","get","features","rls","intl-base","yui-log","yui-later","yui-throttle"]});function aniWindowShade(div,activator,duration){if(typeof(div)=='string')div=getObj(div);var min_height=0;var max_height,width;div.style.overflow="hidden";if(div.style.height=="0px"){getObj(activator.id).innerHTML=activator.open_text;div.style.height="auto";max_height=div.clientHeight;width=div.clientWidth;div.style.height="0px";debug("max_height: "+max_height+"<br/>width: "+width);if(max_height==0||!max_height){div.style.height="auto";}else{YUIanimate(div,duration,{height:max_height,width:width,top:0,left:0});}}else{getObj(activator.id).innerHTML=activator.close_text;width=div.clientWidth;if(width==0){div.style.height="0px";}else{YUIanimate(div,duration,{height:min_height,width:width,top:0,left:0});}}
return}
function aniDivExpand(div,delta,duration){if(typeof(div)=='string')div=getObj(div);div.style.overflow="hidden";div.style.display="block";var height=div.clientHeight;var width=div.clientWidth;YUIanimate(div,duration,{height:height+delta,width:width,top:0,left:0});return}
function getObj(b){if(typeof(b)=='string'){var a=null;if(document.layers){a=document.layers[b]}else{if(document.all){a=document.all[b]}else{if(document.getElementById){a=document.getElementById(b)}}}
return a}else{return b}}
function xEvent(evt){var e=evt||window.event;if(!e)return;this.type=e.type;this.target=e.target||e.srcElement;this.relatedTarget=e.relatedTarget;/*@cc_on if (e.type == 'mouseover') this.relatedTarget = e.fromElement;
   else if (e.type == 'mouseout') this.relatedTarget = e.toElement; @*/if(xDef([e.pageX])){this.pageX=e.pageX;this.pageY=e.pageY;}else if(xDef([e.clientX])){this.pageX=e.clientX+xScrollLeft();this.pageY=e.clientY+xScrollTop();}
if(xDef([e.offsetX])){this.offsetX=e.offsetX;this.offsetY=e.offsetY;}else if(xDef([e.layerX])){this.offsetX=e.layerX;this.offsetY=e.layerY;}else{this.offsetX=this.pageX-xPageX(this.target);this.offsetY=this.pageY-xPageY(this.target);}
this.keyCode=e.keyCode||e.which||0;this.shiftKey=e.shiftKey;this.ctrlKey=e.ctrlKey;this.altKey=e.altKey;if(typeof e.type=='string'){if(e.type.indexOf('click')!=-1){this.button=0;}else if(e.type.indexOf('mouse')!=-1){this.button=e.button;/*@cc_on if (e.button & 1) this.button = 0;
        else if (e.button & 4) this.button = 1;
        else if (e.button & 2) this.button = 2; @*/}}}
function xDef(arguments){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}
return true;}
function xPageXY(el){var el=getObj(el);var x=0;var y=0;while(el){if(xDef([el.offsetLeft]))x+=el.offsetLeft;if(xDef([el.offsetTop]))y+=el.offsetTop;el=xDef([el.offsetParent])?el.offsetParent:null;}
return{x:x,y:y};}
function xPageX(el){var x=0;el=getObj(el);while(el){if(xDef([el.offsetLeft]))x+=el.offsetLeft;el=xDef([el.offsetParent])?el.offsetParent:null;}
return x;}
function xPageY(el){var y=0;el=getObj(el);while(el){if(xDef([el.offsetTop]))y+=el.offsetTop;el=xDef([el.offsetParent])?el.offsetParent:null;}
return y;}
function xScrollLeft(e,bWin){var w,offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollLeft){offset=w.document.documentElement.scrollLeft;}else if(w.document.body&&xDef(w.document.body.scrollLeft)){offset=w.document.body.scrollLeft;}}else{e=getObj(e);if(e&&xNum(e.scrollLeft))offset=e.scrollLeft;}
return offset;}
function xScrollTop(e,bWin){var w,offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollTop){offset=w.document.documentElement.scrollTop;}else if(w.document.body&&xDef(w.document.body.scrollTop)){offset=w.document.body.scrollTop;}}else{e=getObj(e);if(e&&xNum(e.scrollTop))offset=e.scrollTop;}
return offset;}
function xNum(arguments){for(var i=0;i<arguments.length;++i){if(isNaN(arguments[i])||typeof(arguments[i])!='number')return false;}
return true;}
function xCSSrules(sheet){var rules;if(sheet.cssRules)rules=sheet.cssRules;else if(sheet.rules)rules=sheet.rules;return rules;}
function xJSONstringify(a){if(window.Prototype&&Object.toJSON){return Object.toJSON(a);}else{return JSON.stringify(a);}}
function xStopBubble(ev){if(!ev)var ev=window.event;ev.cancelBubble=true;if(ev.stopPropagation)ev.stopPropagation();}
function cursorPosPage(e){e=e||window.event;return{x:e.pageX!=null?e.pageX:document.documentElement!=null?e.clientX+document.documentElement.scrollLeft-document.documentElement.clientLeft:document.body!=null?e.clientX+document.body.scrollLeft:null,y:e.pageY!=null?e.pageY:document.documentElement!=null?e.clientY+document.documentElement.scrollTop-document.documentElement.clientTop:document.body!=null?e.clientY+document.body.scrollLeft:null};}
function cursorPosWindow(e){e=e||window.event;return{x:e.clientX!=null?e.clientX:null,y:e.clientY!=null?e.clientY:null};}
function browserSize(){return{width:window.innerWidth!=null?window.innerWidth:document.documentElement!=null?document.documentElement.clientWidth+15:document.body!=null?document.body.clientWidth+15:null,height:window.innerHeight!=null?window.innerHeight:document.documentElement!=null?document.documentElement.clientHeight:document.body!=null?document.body.clientHeight:null};}
function moveBallonFade(ev,el,desc){var xy={};xy=xPageXY(el);var parent=el.parentNode;x=xy.x-parent.scrollLeft;y=xy.y-parent.scrollTop-3;debug("X:"+x+"  Y:"+y+"  scrollTop: "+parent.scrollTop);var ballon=getObj('ballon');ballon.style.left=x+"px";ballon.style.top=y+"px";ballon.style.display='block';getObj("ballon_text").innerHTML=desc+" Added";setTimeout(function(){ballon.style.display='none';},3000);return;}
function moveBallon(ev,el,desc){var xy={};xy=xPageXY(el);var parent=el.parentNode;x=xy.x-parent.scrollLeft;y=xy.y-parent.scrollTop;var ballon=getObj('ballon');var text=getObj("ballon_text");var point=getObj('ballon_point');text.innerHTML=desc;ballon.style.display='block';var width=text.offsetWidth;var height=text.offsetHeight;text.style.top=(-5-height)+"px";point.style.top=-15+"px";point.style.left="-2px";text.style.left=(x<(browserSize().width/2))?"-23px":(-width+33)+"px";ballon.style.left=x+"px";ballon.style.top=y+"px";return;}
function hideBallon(){var ballon=getObj('ballon');ballon.style.display='none';return;}
function clearInput(elem){if(elem.defaultValue==elem.value){elem.value='';elem.style.color='black';}
else if(elem.value==''){elem.value=elem.defaultValue;elem.style.color='gray';}}
function setStyle(a,b){if(typeof(a)=="string"){a=getObj(a)}
if(a.style.setAttribute){a.style.setAttribute("cssText",b)}else{a.setAttribute("style",b)}}
function removeHtmlTags(b){var a=/<(?:.|\s)*?>/g;return b.replace(a,"")}
function stripslashes(a){a=a.replace(/%5C/g,"");return a.replace(/\\/g,"");}
function randomString(a){var c="";var d="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(i=0;i<a;i++){var b=Math.floor(Math.random()*d.length);c+=d.substring(b,b+1)}
return c}
function trimZero(a){return a.replace(/^0+/,"")}
function inputEncode(a){var b=a.replace(/<script>.*<\/script>/g,"");b=b.replace(/%/g,"%25");b=b.replace(/_/g,"%5F");b=b.replace(/<!--/g,"");b=b.replace(/-->/g,"");b=b.replace(/-+/g,"-");b=escape(b);b=b.replace(/\+/g,"%2B");b=b.replace(/\//g,"%2F");if(debugging)debug(b);return b}
function php(fnName,params){var debug_result="";if(debugging)debug_result+="PHP Function: <b>"+fnName+"</b><br/>";var str=fn+"="+fnName+"('";for(var i=0;i<params.length;i++){if(debugging)debug_result+="Param"+i+": <b>"+params[i]+"</b><br/>";if(typeof(params[i])=='string'){params[i]=params[i].replace(/'/g,"\\'");params[i]=params[i].replace(/%27/g,"%5C%27");}else if(typeof(params[i])=='object'&&params[i]!=null){params[i]=xJSONstringify(params[i]);params[i]=params[i].replace(/'/g,"\\'");params[i]=params[i].replace(/%27/g,"%5C%27");}
str+=params[i]+"','";}
if(fnName.length!=0){str=chop(str,3)}
str+="');";if(debugging)debug(debug_result);return str}
function getDialogAJAX(query,id,title,size,fn){var b;if(id!=null){b=getObj(id);b.innerHTML="";}
else{b=document.createElement("div");id=randomString(8);b.setAttribute("id",id);document.body.appendChild(b);}
var p=addCloseBox(id);var o=getMaxZindex(getPositionedDivs());var a=document.createElement("div");a.setAttribute("id",id+"_content_wrapper");var l=document.createElement("div");l.setAttribute("id",id+"_title");l.className="dialog_title";var title_bold=document.createElement("b");title_bold.innerHTML=title;l.appendChild(title_bold);var h=document.createElement("div");h.setAttribute("id",id+"_content");h.className="dialog_content_box";b.className="dialog";setStyle(b,"position:absolute; visibility:hidden; z-index:"+o+";");b.onmousedown=function(){bringToFront(this)};AJAX(query,function(jx){var r=AJAXResponseDiv(jx,h);if(r){a.appendChild(l);a.appendChild(h);b.appendChild(p);b.appendChild(a);b.style.width=(size.width!=null)?parseInt(size.width)+"px":"auto";b.style.height=(size.height!=null)?parseInt(size.height)+"px":"auto";var browserWH=browserSize();b.style.top=(size.top!=null)?parseInt(size.top)+"px":parseInt((browserWH.height-a.offsetHeight)/2)+"px";b.style.left=(size.left!=null)?parseInt(size.left)+"px":parseInt((browserWH.width-a.offsetWidth)/2)+"px";b.style.visibility="visible";if(fn){fn(b,l)}}})}
function getDialog(content,id,title,size,fn){var b;if(id!=""){b=getObj(id);b.innerHTML="";}
else{b=document.createElement("div");id=getTime();b.setAttribute("id",id);document.body.appendChild(b);}
var p=addCloseBox(id);var o=getMaxZindex(getPositionedDivs());var a=document.createElement("div");a.setAttribute("id",id+"_content_wrapper");var l=document.createElement("div");l.setAttribute("id",id+"_title");l.className="title_dialog";var title_bold=document.createElement("b");title_bold.innerHTML=title;l.appendChild(title_bold);var h=document.createElement("div");h.setAttribute("id",id+"_content");h.className="dialog_content_box";b.className="dialog";setStyle(b,"position:absolute; visibility:hidden; z-index:"+o+";");b.onmousedown=function(){bringToFront(this)};h.innerHTML=content;a.appendChild(l);a.appendChild(h);b.appendChild(p);b.appendChild(a);b.style.width=(size.width!=null)?parseInt(size.width)+"px":"auto";b.style.height=(size.height!=null)?parseInt(size.height)+"px":"auto";var browserWH=browserSize();b.style.top=(size.top!=null)?parseInt(size.top)+"px":parseInt((browserWH.height-a.offsetHeight)/2)+"px";b.style.left=(size.left!=null)?parseInt(size.left)+"px":parseInt((browserWH.width-a.offsetWidth)/2)+"px";b.style.visibility="visible";if(fn){fn(b,l)}}
function clrDglg(b){var a=getObj(b);a.innerHTML="";a.style.visibility="hidden";return}
function deleteEl(c){if(typeof(c)=='string')c=getObj(c);c.parentNode.removeChild(c);return}
function chop(a,b){if(b<=0){return""}else{if(b>String(a).length){return a}else{return String(a).substring(0,String(a).length-b)}}}
function addCloseBox(c){var b=document.createElement("div");var a=document.createElement("img");a.className="dialog_cb clickable";a.setAttribute("src","/imgs/cb.png");setStyle(a,"float:right;");a.onmouseover=function(){this.className="dialog_cbOvr clickable"};a.onmouseout=function(){this.className="dialog_cb clickable"};a.onclick=function(){clrDglg(c)};b.appendChild(a);return b}
function getMaxZindex(divs){var max=0;for(var i=0;i<divs.length;i++){if(divs[i].style.zIndex=="")continue;if(max<parseInt(divs[i].style.zIndex))max=parseInt(divs[i].style.zIndex);}
for(var i=0;i<document.styleSheets.length;i++){var rules=xCSSrules(document.styleSheets[i]);for(var i=0;i<rules.length;i++){if(rules[i].style.zIndex=="")continue;if(max<parseInt(rules[i].style.zIndex))max=parseInt(rules[i].style.zIndex);}}
if(debugging)debug("max-z: <b>"+max+1+"</b>");return max+1}
function getPositionedDivs(){var b=new Array();var a=document.body.getElementsByTagName("DIV");var c=0;for(i=0;i<a.length;i++){if(a.item(i).style.position=="absolute"||a.item(i).style.position=="relative"||a.item(i).style.position=="fixed"){b[c]=a.item(i);c++}}
return b}
function bringToFront(a){if(!document.getElementsByTagName){return}
a.style.zIndex=getMaxZindex(getPositionedDivs())}
function submitOnReturnKey(evt,name){var keyValue=(window.event)?window.event.keyCode:evt.which;if(keyValue==13)eval("document."+name+".submit();");return}
function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="
+escape(value)
+((expiredays==null)?"":";expires="+exdate.toUTCString());}
function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}
function AJAX(q,fn){var x;try{x=new XMLHttpRequest()}
catch(x){try{x=new ActiveXObject("Msxml2.XMLHTTP")}
catch(x){try{x=new ActiveXObject("Microsoft.XMLHTTP")}
catch(x){alert("Your browser broke!")}}}
x.open("POST",url,true);x.setRequestHeader("Content-type","application/x-www-form-urlencoded");x.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2005 00:00:00 GMT");x.onreadystatechange=function(){fn(x)};x.send(q);return}
function AJAXResponseText(b){return(b.readyState==4&&b.status==200)?b.responseText:false}
function AJAXResponseDiv(jx,div){if(typeof(div)=="string"){div=getObj(div)}
if(jx.readyState==4&&jx.status==200&&div){div.innerHTML=jx.responseText;return true}else{return false}}
function AJAXResponseJSON(ajaxObj){return(ajaxObj.readyState==4&&ajaxObj.status==200)?eval(ajaxObj.responseText):false}
function debug(str,orientation){if(debugging){var debug=getObj('debug');if(!debug){debug=document.createElement("div");debug.setAttribute("id","debug");document.body.appendChild(debug);if(orientation=='side'){var height=browserSize().height-10;var width=browserSize().width*0.3;document.body.style.marginLeft=(width+10)+"px";}else if(orientation=='top'){var height=browserSize().height*0.15;var width=browserSize().width;document.body.style.marginTop=(height+10)+"px";}
setStyle(debug,"position:fixed;top:0px;left:0px;font-size:7pt;padding:5px;background:white;width:"+width+"px;height:"+height+"px;overflow:scroll;");}
debug.innerHTML+='<p style="margin-bottom:5px;">'+str+'</p>';debug.scrollTop=debug.scrollHeight;}
return;}
var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone"},{string:navigator.userAgent,subString:"iPad",identity:"iPad"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();function randomString(iLen){var sRnd='';var sChrs='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';for(var i=0;i<iLen;i++){var randomPoz=Math.floor(Math.random()*sChrs.length);sRnd+=sChrs.substring(randomPoz,randomPoz+1);}
return sRnd;}
function getDatePicker_noTable(data){var month=data.month;var year=data.year;var pickerID=data.id;var targetID=data.target_id;var picker=getObj(pickerID);var width=picker.style.width;picker.style.display="block";var date_picker_tmpl='\
 <style>.datePckrCell{width:18px; height:10px; margin:0px 1px; float:left; text-align:center; font-size:8pt;}</style>\
 <div style="position:relative; z-index:1; width:145px; border:1px solid black; background:white;">\
  <!-- Navigation -->\
  <div style="text-align:center;">\
   <span onclick="getDatePicker({month:_PRYMON,year:_PRYYEAR,id:\'_ID\',target_id:\'_TID\'});" class="clickable" style="font-size:125%;">&#171;&#171;</span>\
   &nbsp;&nbsp;\
   <span onclick="getDatePicker({month:_PRMON,year:_PRMYEAR,id:\'_ID\',target_id:\'_TID\'});" class="clickable" style="font-size:125%;">&#171;</span>\
   <span><b> _TITLE </b></span>\
   <span onclick="getDatePicker({month:_NXMON,year:_NXMYEAR,id:\'_ID\',target_id:\'_TID\'});" class="clickable" style="font-size:125%;">&#187;</span>\
   &nbsp;&nbsp;\
   <span onclick="getDatePicker({month:_NXYMON,year:_NXYYEAR,id:\'_ID\',target_id:\'_TID\'});" class="clickable" style="font-size:125%;">&#187;&#187;</span>\
  </div>\
  <!-- Calendar -->\
  <div style="background:gray; color:white;">\
   <div class="datePckrCell"><b>SU</b></div>\
   <div class="datePckrCell"><b>MO</b></div>\
   <div class="datePckrCell"><b>TU</b></div>\
   <div class="datePckrCell"><b>WE</b></div>\
   <div class="datePckrCell"><b>TH</b></div>\
   <div class="datePckrCell"><b>FR</b></div>\
   <div class="datePckrCell"><b>SA</b></div>\
  </div>\
  _BOXES\
 </div>';var date_picker_cell_tmpl='<div class="clickable datePckrCell" style="font-size:80%; color:_COLOR; border:1px solid _BORDER;" onclick="_ONCLK" onmouseover="this.style.background=\'rgb(200,200,200)\';" onmouseout="this.style.background=\'white\';">_DAY</div>';var Month=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];var today=new Date();if(month==null||year==null){month=today.getMonth();year=today.getFullYear();}
var date=new Date(year,month,0,0,0,0,0);var timestamp=date.getTime();var ts=timestamp;while(date.getDay()!=0){timestamp=timestamp-86400000;date.setTime(timestamp);}
timestamp+=43200000;var boxes="";for(var i=0;i<42;i++){boxes+=ReadTmpl([date_picker_cell_tmpl,['_DAY',date.getDate()],['_COLOR',(date.getMonth()==month)?'black':'gray'],['_BORDER',(date.getDate()==today.getDate()&&date.getMonth()==today.getMonth()&&date.getFullYear()==today.getFullYear())?'black':'transparent'],['_ONCLK',"getObj('"+targetID+"').value = padDate("+date.getFullYear()+", "+date.getMonth()+", "+date.getDate()+");"]]);timestamp=timestamp+86400000;date.setTime(timestamp);}
picker.style.width=width;picker.innerHTML=ReadTmpl([date_picker_tmpl,["_PRMON",(month==0)?11:month-1],["_PRMYEAR",(month==0)?year-1:year],["_PRYMON",month],["_PRYYEAR",year-1],["_NXMON",(month==11)?0:month+1],["_NXMYEAR",(month==11)?year+1:year],["_NXYMON",month],["_NXYYEAR",year+1],["_TITLE",Month[month]+' '+year],["_ID",pickerID],["_WIDTH",width],["_TID",targetID],["_BOXES",boxes]]);}
function getDatePicker(data){var month=data.month;var year=data.year;var pickerID=data.id;var targetID=data.target_id;var picker=getObj(pickerID);var width=picker.style.width;picker.style.display="block";var date_picker_tmpl='\
 <div style="position:relative; z-index:10; width:_WIDTH; border:0px solid black; background:white;">\
  <table border="1" rules="none" width="100%;">\
   <!-- Navigation -->\
   <caption>\
    <div style="text-align:center; background:rgb(225,225,225); border:1px solid black;">\
     <div class="clickable" style="float:right; color:blue; margin:0px 4px 0px 0px;" onclick="getObj(\''+pickerID+'\').style.display=\'none\';">x</div>\
     <span onclick="getDatePicker({month:_PRYMON,year:_PRYYEAR,id:\'_ID\',target_id:\'_TID\'});" class="clickable" style="font-size:125%;">&#171;&#171;</span>&nbsp;\
     <span onclick="getDatePicker({month:_PRMON,year:_PRMYEAR,id:\'_ID\',target_id:\'_TID\'});" class="clickable" style="font-size:125%;">&#171;</span>\
     <span><b> _TITLE </b></span>\
     <span onclick="getDatePicker({month:_NXMON,year:_NXMYEAR,id:\'_ID\',target_id:\'_TID\'});" class="clickable" style="font-size:125%;">&#187;</span>&nbsp;\
     <span onclick="getDatePicker({month:_NXYMON,year:_NXYYEAR,id:\'_ID\',target_id:\'_TID\'});" class="clickable" style="font-size:125%;">&#187;&#187;</span>\
    </div>\
   </caption>\
   <!-- Calendar -->\
   <tbody>\
    <tr bgcolor="black" style="text-align:center; font-size:90%; background:black;">\
     <td><span style="color:white;"><b>SU</b></span></td>\
     <td><span style="color:white;"><b>MO</b></span></td>\
     <td><span style="color:white;"><b>TU</b></span></td>\
     <td><span style="color:white;"><b>WE</b></span></td>\
     <td><span style="color:white;"><b>TH</b></span></td>\
     <td><span style="color:white;"><b>FR</b></span></td>\
     <td><span style="color:white;"><b>SA</b></span></td>\
    </tr>\
    <tr bgcolor="white">_BOX00_BOX01_BOX02_BOX03_BOX04_BOX05_BOX06</tr>\
    <tr bgcolor="white">_BOX07_BOX08_BOX09_BOX10_BOX11_BOX12_BOX13</tr>\
    <tr bgcolor="white">_BOX14_BOX15_BOX16_BOX17_BOX18_BOX19_BOX20</tr>\
    <tr bgcolor="white">_BOX21_BOX22_BOX23_BOX24_BOX25_BOX26_BOX27</tr>\
    <tr bgcolor="white">_BOX28_BOX29_BOX30_BOX31_BOX32_BOX33_BOX34</tr>\
    <tr bgcolor="white">_BOX35_BOX36_BOX37_BOX38_BOX39_BOX40_BOX41</tr>\
   </tbody>\
  </table>\
 </div>';var date_picker_cell_tmpl='<td><div class="clickable" style="font-size:80%; color:_COLOR; border:1px solid _BORDER; text-align:center; margin:0px 1px;" onclick="_ONCLK" onmouseover="this.style.background=\'rgb(200,200,200)\';" onmouseout="this.style.background=\'white\';">_DAY</div></td>';var Month=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];var today=new Date();if(month==null||year==null){month=today.getMonth();year=today.getFullYear();}
var date=new Date(year,month,0,0,0,0,0);var timestamp=date.getTime();var ts=timestamp;while(date.getDay()!=0){timestamp=timestamp-86400000;date.setTime(timestamp);}
timestamp+=43200000;var boxes=[];for(var i=0;i<42;i++){var onclk="getObj('"+targetID+"').value = padDate("+date.getFullYear()+", "+date.getMonth()+", "+date.getDate()+");";onclk+="setTimeout(function(){getObj('"+pickerID+"').style.display='none';}, 300);";boxes[i]=ReadTmpl([date_picker_cell_tmpl,['_DAY',date.getDate()],['_COLOR',(date.getMonth()==month)?'black':'gray'],['_BORDER',(date.getDate()==today.getDate()&&date.getMonth()==today.getMonth()&&date.getFullYear()==today.getFullYear())?'black':'transparent'],['_ONCLK',onclk]]);timestamp=timestamp+86400000;date.setTime(timestamp);}
picker.style.width=width;picker.innerHTML=ReadTmpl([date_picker_tmpl,["_PRMON",(month==0)?11:month-1],["_PRMYEAR",(month==0)?year-1:year],["_PRYMON",month],["_PRYYEAR",year-1],["_NXMON",(month==11)?0:month+1],["_NXMYEAR",(month==11)?year+1:year],["_NXYMON",month],["_NXYYEAR",year+1],["_TITLE",Month[month]+' '+year],["_ID",pickerID],["_WIDTH",width],["_TID",targetID],["_BOX00",boxes[0]],["_BOX01",boxes[1]],["_BOX02",boxes[2]],["_BOX03",boxes[3]],["_BOX04",boxes[4]],["_BOX05",boxes[5]],["_BOX06",boxes[6]],["_BOX07",boxes[7]],["_BOX08",boxes[8]],["_BOX09",boxes[9]],["_BOX10",boxes[10]],["_BOX11",boxes[11]],["_BOX12",boxes[12]],["_BOX13",boxes[13]],["_BOX14",boxes[14]],["_BOX15",boxes[15]],["_BOX16",boxes[16]],["_BOX17",boxes[17]],["_BOX18",boxes[18]],["_BOX19",boxes[19]],["_BOX20",boxes[20]],["_BOX21",boxes[21]],["_BOX22",boxes[22]],["_BOX23",boxes[23]],["_BOX24",boxes[24]],["_BOX25",boxes[25]],["_BOX26",boxes[26]],["_BOX27",boxes[27]],["_BOX28",boxes[28]],["_BOX29",boxes[29]],["_BOX30",boxes[30]],["_BOX31",boxes[31]],["_BOX32",boxes[32]],["_BOX33",boxes[33]],["_BOX34",boxes[34]],["_BOX35",boxes[35]],["_BOX36",boxes[36]],["_BOX37",boxes[37]],["_BOX38",boxes[38]],["_BOX39",boxes[39]],["_BOX40",boxes[40]],["_BOX41",boxes[41]]]);}
function ReadTmpl(input){var body=input[0];for(var i=1;i<input.length;i++){var matchKey=new RegExp(input[i][0],'gm');body=body.replace(matchKey,input[i][1]);}
return body;}
function padDate(year,month,day){month++;if(month<10)month="0"+month;if(day<10)day="0"+day;return year+"-"+month+"-"+day;}
if(!this.JSON){this.JSON={};}
(function(){function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());function menuOpen(ID){var arrow=getObj(ID+'_arrow');var dsply=getObj(ID+'_dsply');var title=getObj(ID+'_title');title.className="menuTitleOvr";dsply.style.visibility='visible';arrow.className='nvArwOpen';arrow.src='imgs/nvDn.png';}
function menuClose(ID){var arrow=getObj(ID+'_arrow');var dsply=getObj(ID+'_dsply');var title=getObj(ID+'_title');title.className="menuTitle clickable";arrow.className='nvArw clickable';dsply.style.visibility='hidden';arrow.className='nvArw clickable';arrow.src='imgs/nvRt.png';}
function menuClk(ID){setTimeout(function(){var arrow=getObj(ID+'_arrow');var dsply=getObj(ID+'_dsply');},300);}
function radius(tlVal,trVal,blVal,brVal){return{tl:{radius:tlVal},tr:{radius:trVal},bl:{radius:blVal},br:{radius:brVal},antiAlias:true}}
function runCurvy(){var d=document.getElementsByTagName('div');for(var i=0;i<d.length;i++){if(d.item(i).getAttribute('name')=='curvyCorner'){var string=d.item(i).getAttribute('radius');if(string!=null){if(BrowserDetect.browser=='Explorer'||(BrowserDetect.browser=="Opera"&&BrowserDetect.version<10.50)){var r=string.split(',');var id=d.item(i).getAttribute('id');curvyCorners(radius(parseInt(r[0]),parseInt(r[1]),parseInt(r[2]),parseInt(r[3])),"#"+id);d.item(i).setAttribute('radius',"");}}}}
return;}
var Y;YUI().use('dd','anim',function(YUI_instance){Y=YUI_instance;});function YUIenableDrag(div,handle){if(!handle)handle=div;var dd=new Y.DD.Drag({node:div}).addHandle("#"+handle.id);handle.style.cursor='move';}
function YUIenableDragProxy(div){var dd=new Y.DD.Drag({node:div}).plug(Y.Plugin.DDProxy);div.style.cursor='move';}
function YUIanimate(div,dur,to){var myAnim=new Y.Anim({node:div,to:{width:to.width,height:to.height,top:to.top,left:to.left}});myAnim.set('duration',dur);myAnim.set('easing',Y.Easing.easeOut);myAnim.run();return}
function YuiFadeOut(div){var myAnim=new Y.Anim({node:div,to:{opacity:0}});myAnim.run();return;}
var api_key="cc661fb07507a4e98f2f3c664785c8ab";var channel_path="channel/xd_receiver.htm";var api;var FB_app_id=152332461801;var dflt_fb_prfl_pic="http://static.ak.fbcdn.net/pics/q_silhouette.gif";var fb_prfl_url='http://www.facebook.com/profile.php?id=';var publish_stream=true;var access_token="";var tab_added=false;var me={};var pg={};var visitor_id;var session={};var friend='false';var wait_icon='<img src="/imgs/wait-fb.gif" alt="" />';var open_url="http://rs.ultraholics.com";var img_url=open_url+"/imgs";var url;var fn="tag=FN&fn";var curvyCornersVerbose=false;var debugging=false;var IE8_js=false;function ADMgetUsers(){getDialogAJAX(php("ADM_getUsers",["whatever"]),null,"Users List",{width:null,height:null,top:null,left:null},function(div,handle){});}
function AdClickThrough(url,id){AJAX(php("SQL_insAdClickThrough",[id]),function(jx){var ready=AJAXResponseText(jx);if(ready){}});var load=window.open(url,'','');}
function FBInit(a){if(window.FB_RequireFeatures){FB_RequireFeatures(["XFBML"],function(){var b={doNotUseCachedConnectState:true,reloadIfSessionStateChanged:true};FB.init(api_key,channel_path,b);FB.ensureInit(function(){api=FB.Facebook.apiClient;a()})})}else{setTimeout(function(){getObj("wait_image").innerHTML="<span style='color:#FF0000;'>Facebook's API is not responding! Please try again later.</span>"},1000)}
return}
function FBstartPollLogin(authorize){FB.Connect.pollLoginStatus(2000,200,function(){if(authorize&&_gaq)_gaq.push(['_trackEvent','Visitor','Visitor clicked Connect and authorized app','Those who authorize app for first time']);location.reload(true);});return;}
function FBPublishStream(race,message,action){if(debugging)debug("Race Name: "+escape(race.name));var uid=CANVgetUserOrPageId();var verb,preposition;if(action=='add'){verb="added";preposition="to";}
if(action=='upd'){verb="updated the results of";preposition="on";}
if(action=='del'){verb="deleted";preposition="from";}
var tab={};if(pg.id){tab.href="http://www.facebook.com/profile.php?v=app_"+FB_app_id+"&id="+pg.id;tab.text=pg.name;}else{tab.href=open_url+"/?fid="+me.id;tab.text=me.name;}
if(race.result=='')race.result="None";var message="";var action_links=[{"text":"My RS","href":open_url+"/"}];var prompt="Write A Personal Message!";var attachment={toString:function(){return xJSONstringify(this);},"name":(pg.name)?pg.name+" has "+verb+" a race "+preposition+" My Racing Schedule":me.name+" has "+verb+" a race "+preposition+" My Racing Schedule","href":open_url+"/","description":"My Racing Schedule allows facebook users to enter and share their racing schedules with their friends. It is simple and easy to use","properties":{"Race Name":(race.url!="")?{"text":unescape(race.name),"href":unescape(race.url)}:unescape(race.name),"Race Date":unescape(race.date),"Race Result":unescape(race.result),"View Schedule":{"text":tab.text,"href":tab.href},"Doing This Race?":{"text":"Add To My Schedule","href":open_url+"/?tag=ADDRACE&rName="+race.name+"&rDate="+race.date+"&url="+race.url}},"media":[{"type":"image","src":img_url+"/logo.png","href":open_url+"/"}],"comments_xid":race.rid+"_"+race.uid};FB.Connect.streamPublish(message,attachment,action_links,null,prompt,function(post_id,exception){if(post_id){if(debugging)debug("the story was published with id: <b>"+post_id+"</b><br/> comments_xid: <b>"+attachment.comments_xid+"</b>");if(_gaq)_gaq.push(['_trackEvent','Stream','Published','Published with stream id: '+post_id]);AJAX(php("SQL_insPublish",[race.uid,post_id,race.rid]),function(){});}else{if(debugging){debug("publish cancelled");debug(exception);}
if(_gaq)_gaq.push(['_trackEvent','Stream','Skipped','User canceled the publish dialog or publish not sucessful']);}},false,null);return}
function FBPublishStreamComment(race,message,target_id){var uid=CANVgetUserOrPageId();var attachment={toString:function(){return xJSONstringify(this);},"name":"Comments Made On A Race","href":open_url+"/","description":"My Racing Schedule allows facebook users to enter and share their racing schedules with their friends. It is simple and easy to use","properties":{"Race Name":(race.url!="")?{"text":unescape(race.name),"href":unescape(race.url)}:unescape(race.name),"Race Date":unescape(race.date),"Race Result":unescape(race.result)},"media":[{"type":"image","src":img_url+"/logo.png","href":open_url+"/"}]};FB.Connect.streamPublish(unescape(message),attachment,null,target_id,null,function(post_id,exception){if(post_id){if(debugging)debug("the comment was published with id: <b>"+post_id+"</b>");if(_gaq)_gaq.push(['_trackEvent','Comments','Published','Published with id: '+post_id]);}else{if(debugging){debug("publish cancelled");debug(exception);}
if(_gaq)_gaq.push(['_trackEvent','Comments','Skipped','User canceled the publish comments dialog or publish not sucessful']);}},false,uid);return}
function FBconnectStatus(page_id,story,fid){if(BrowserDetect.OS=="iPhone"){}else if(BrowserDetect.OS=="iPad"){}
if(fid!=''){if(debugging)debug("fid: "+fid);CANVviewRaces(fid);return;}
if(story!=false&&_gaq)_gaq.push(['_trackEvent','Stream','Clicked Through','Those who Clicked on Stream Stories']);FB.getLoginStatus(function(response){if(response.authResponse){access_token=response.authResponse.accessToken;if(debugging)debug('connected.');if(_gaq)_gaq.push(['_trackEvent','Visitor','Returned User','Those who had valid sessions and had already authorized app']);CONNconnectYes(story);}
else if(response){if(debugging)debug('no session.');CONNconnectAuthorize(story);}
else{getObj("wait_image").innerHTML="<span style='color:#FF0000;'>Facebook's API is not responding! Please try again later.</span>";}});return}
function FBconnectStatusOld(page_id,story){if(story!=false&&_gaq)_gaq.push(['_trackEvent','Stream','Clicked Through','Those who Clicked on Stream Stories']);FB.Connect.get_status().waitUntilReady(function(b){switch(b){case FB.ConnectState.connected:debug('connected.');FB.Connect.requireSession(function(){debug('got session.');CONNconnectYes(story)
if(_gaq)_gaq.push(['_trackEvent','Visitor','Returned User','Those who had valid sessions and had already authorized app']);});break;case FB.ConnectState.appNotAuthorized:debug('App Not Authorized.');CONNconnectAuthorize();if(_gaq)_gaq.push(['_trackEvent','Visitor','Not Authorized User','Those who had valid sessions but had not yet authorized app']);break;case FB.ConnectState.userNotLoggedIn:debug('User not logged in.');CONNconnectNo();if(_gaq)_gaq.push(['_trackEvent','Visitor','Not Logged-in User','Those who had not yet logged-in to Facebook']);break;}});return}
function CANVviewRaces(fid){AJAX(php("CANV_viewRaces",[fid]),function(jx){var html=AJAXResponseText(jx);if(html){AJAX(php("CANV_viewRacesUserInfo",[fid]),function(jx2){var r=AJAXResponseJSON(jx2);if(r){getObj('main_content_area').innerHTML=html;getObj("profile_pic").src=r.src;var name=getObj("uname");name.innerHTML=r.name;}});}})
return;}
function CONNconnectYes(story){if(story!=false&&debugging)debug("Race Name: "+story.rName+",  Race Date: "+story.rDate+",  Race url: "+story.url);AJAX(php("CANV_getMainPage",[access_token]),function(jx){var r=AJAXResponseJSON(jx);if(r){getObj("main_content_area").innerHTML=r.races;if(r.me!=null){if(debugging){debug("tab_added: "+r.tab_added);debug("publish stream: "+publish_stream);debug("access_token: "+r.access_token);debug("uid: "+r.me.id);}
me=r.me;tab_added=r.tab_added;if(story!=false)CANVaddRacePicklist(story.rDate,story.rName,"",story.url);CANVfillUserInfo();CANVgetinviteFriendsTmpl();CANVfillTopRaces(0);FB.XFBML.parse();getDatePicker({month:null,year:null,id:'date_picker_div',target_id:'date_000'});getObj('date_picker_div').style.display="none";runCurvy();AJAX(php("CANV_getRaces",[me.id,access_token,"false"]),function(jx2){AJAXResponseDiv(jx2,'races_div');});}}});return}
function CONNswitchToPage(page){pg=page;debug("page id: <b>"+pg.id+"</b><br/>has_added_app: <b>"+pg.has_added_app+"</b>");if(!pg.has_added_app){alert(pg.name+" has not added this app yet. You can continue to use this app, but your racing schedule will not be published until you add it. We recommend that you add My Racing Schedule now and then return here.");}
CONNtogglePageOrUser();return;}
function CONNswitchToUser(){friend='false';pg={};CONNtogglePageOrUser();return;}
function CONNtogglePageOrUser(){CANVfillUserInfo();CANVgetRaces();return;}
function CONNconnectNo(){AJAX(php("CONN_getLoginPage",[""]),function(jx){var r=AJAXResponseDiv(jx,"login_div");if(r){FB.XFBML.parse();}});return}
function CONNconnectAuthorize(){AJAX(php("CONN_getAuthorizePage",[""]),function(jx){var r=AJAXResponseDiv(jx,"login_div");if(r){FB.XFBML.parse();}});return}
function CONNfailure(){AJAX(php("fetchTmpl",["CONN_open_try_again"]),function(jx){var r=AJAXResponseDiv(jx,"login_div");if(r){FB.XFBML.parse();}});return}
function CANVgetRaces(){var uid=CANVgetUserOrPageId();getObj("races_div").innerHTML='<div style="text-align:center; margin:30px;">'+wait_icon+'</div>';AJAX(php("CANV_getRaces",[uid,access_token,'false']),function(jx){var r=AJAXResponseDiv(jx,'races_div');if(r){}})
return;}
function CANVfillTopRaces(start,el){if(getObj("toprace_login_text")){getObj("toprace_login_text").innerHTML=wait_icon;}
else if(el){el.innerHTML=wait_icon;}
AJAX(php("CANV_getTopRace",[access_token,me.id,start]),function(jx){var ready=AJAXResponseDiv(jx,"toprace_content");if(ready){if(start==0)getObj('toprace_prev_page_link').style.display='none';}});return}
function CANVtoggleToprace(id){var more=getObj(id+"_more");var less=getObj(id+"_less");var lines=getObj(id);if(lines.style.display=="none"){lines.style.display="block";more.style.display="none";less.style.display="block";}else if(lines.style.display=="block"){lines.style.display="none";more.style.display="block";less.style.display="none";}
return;}
function CANVmouseOverTopRace(el,id,ev,a,b,c,d){el.onmouseover=function(){getObj(id).style.display='block';el.style.background='#3399CC';el.style.cursor="default";return false};el.style.background='#3399CC';el.style.cursor="default";var p=cursorPosWindow(ev);var s=browserSize();if(p.y>s.height/2){getObj(id+'_arrw').style.top=a;getObj(id).style.top=b;}else{getObj(id+'_arrw').style.top=c;getObj(id).style.top=d;}
getObj(id).style.display='block';return;}
function CANVmouseOutTopRace(el,id,ev){el.style.background='';getObj(id).style.display='none';}
function CANVinviteFriends(){getDialogAJAX(php("CANV_getFriendSelector",[me.id,access_token]),"invite_friends_dialog","Invite Friends To My Racing Schedule",{width:635,height:557,top:5,left:126},function(div,handle){div.setAttribute("name","curvyCorner");div.setAttribute("radius","10,10,10,10");runCurvy();FB.XFBML.parse();YUIenableDrag(div,handle);if(_gaq)_gaq.push(['_trackEvent','Invite','Clicked Button','Those who Clicked on button and opened the dialog']);});return}
function CANVgetRacesFriend(friendInfo){friend='true';getObj("races_div").innerHTML='<div style="text-align:center; margin:30px;">'+wait_icon+'</div>';AJAX(php("CANV_getRaces",[friendInfo.uid,access_token,friend]),function(jx){var r=AJAXResponseDiv(jx,'races_div');if(r){getObj('friends_pic_name_display').style.display="block";getObj('friend_pic').src=friendInfo.src;getObj('friend_name').innerHTML=friendInfo.name;}})
return;}
function CANVgetinviteFriendsTmpl(){AJAX(php("fetchTmpl",["CANV_invite_box_tmpl"]),function(jx){var ready=AJAXResponseDiv(jx,'invite_content');if(ready){getObj('invite_personal_name').innerHTML=me.first_name;getObj('invite_link').onclick=function(){CANVinviteFriends()};getObj('invite_button').onclick=function(){CANVinviteFriends()};runCurvy();}});return}
function CANVseeFriends(el){var wait_replace=el.innerHTML;el.innerHTML=wait_icon;getDialogAJAX(php("CANV_getFriends",[me.id,access_token]),null,"Friends Using My Racing Schedule",{width:465,height:null,top:null,left:null},function(div,handle){div.setAttribute("name","curvyCorner");div.setAttribute("radius","10,10,10,10");runCurvy();el.innerHTML=wait_replace;YUIenableDrag(div,handle);if(_gaq)_gaq.push(['_trackEvent','Toprace','Viewed Friends Using App','Those who Clicked on link to see their friends who is on My Racing Schedule']);});return}
function CMNTgetRaceCommentsHtml(target_id,rid,el){var uid=CANVgetUserOrPageId();var pic_squre=CANVgetUserOrPagePic();if(el.innerHTML=="Hide Comments"){aniWindowShade('comment'+rid,{id:el.id,close_text:'Comments',open_text:'Hide Comments'},0.75);return;}
var div=getObj('comment'+rid);div.style.height='auto';div.innerHTML='<div style="text-align:center; margin:2px;">'+wait_icon+'</div>';AJAX(php("CMNT_getRaceCommentsHtml",[rid,uid,target_id,pic_squre,access_token,friend]),function(jx){var r=AJAXResponseDiv(jx,'comment'+rid);if(r){div.style.height='0px';aniWindowShade('comment'+rid,{id:el.id,close_text:el.innerHTML,open_text:'Hide Comments'},0.75);}})
return;}
function CMNTaddComment(target_id,rid){var cmnt={};cmnt.uid=CANVgetUserOrPageId();cmnt.msg=inputEncode(getObj("cmnt_input"+rid).value);cmnt.rid=rid;var pub=getObj('cmnt_pub'+rid).value;debug("pub: "+pub);AJAX(php("SQL_insComment",[cmnt]),function(jx){var cid=AJAXResponseText(jx);if(cid){CMNTrefreshComments(rid);getObj("cmnt_input"+rid).value="";if(_gaq)_gaq.push(['_trackEvent','Comments','Add','Added comments to a race']);if(pub){AJAX(php("SQL_getRace",[rid]),function(jx2){var race=AJAXResponseJSON(jx2);if(race){FBPublishStreamComment(race,cmnt.msg,target_id);}})}}});}
function CMNTdelComment(cid,rid){AJAX(php("SQL_delComment",[cid]),function(jx){var ready=AJAXResponseText(jx);if(ready){if(debugging)debug(ready);CMNTrefreshComments(rid);}});}
function CMNTrefreshComments(rid){var uid=CANVgetUserOrPageId();AJAX(php("CMNT_refreshComments",[rid,uid,access_token,friend]),function(jx){var r=AJAXResponseJSON(jx);if(r){getObj("comment_count"+rid).innerHTML=r.count;var cmnt_list=getObj('cmnt_list'+rid);var old_height=cmnt_list.clientHeight;cmnt_list.innerHTML=r.html;var new_height=cmnt_list.clientHeight;var diff=new_height-old_height;debug("difference: "+diff);(diff==0)?getObj("comment"+rid).style.height="auto":aniDivExpand("comment"+rid,diff,0.5);}})
return;}
function CANVfillUserInfo(){if(pg.id){if(pg.name)getObj("uname").innerHTML=pg.name;if(pg.pic)getObj("profile_pic").src=pg.pic;}
else{if(me.name)getObj("uname").innerHTML=me.name;if(me.pic)getObj("profile_pic").src=me.pic;}
return}
function CANVraceFinder(keypress){if(debugging)debug(keypress);AJAX(php("CANV_getRaceFinderList",[me.id,keypress]),function(jx){var ready=AJAXResponseDiv(jx,'race_finder_list');if(ready){getObj("race_finder_list").style.display="block";}});return;}
function CANVgetUserOrPageId(){return(pg.id)?pg.id:me.id;}
function CANVgetUserOrPagePic(){return(pg.id)?pg.pic_square:me.pic_square;}
function cleanURLprefix(url){url=url.replace(/http:\/\//g,"");return(url=="")?"":"http://"+url;}
function CANVrefreshRaceList(race,msg,action){var uid=CANVgetUserOrPageId();AJAX(php("CANV_getRaces",[uid,access_token,'false']),function(jx){var r=AJAXResponseText(jx);if(r){getObj("races_div").innerHTML=r;if(msg!=""&&msg){if(debugging)debug("msg not empty");if(publish_stream)FBPublishStream(race,msg,action);}}})}
function CANVaddRacePicklist(date,name,result,url){var race={};race.uid=CANVgetUserOrPageId();race.date=inputEncode(date);race.name=inputEncode(name);race.url=inputEncode(url);race.result=inputEncode(result);AJAX(php("SQL_insRace",[race.uid,race.date,race.name,race.result,race.url]),function(jx){var rid=AJAXResponseText(jx);if(rid){race.rid=rid;race.name=removeHtmlTags(race.name);race.date=removeHtmlTags(race.date);CANVrefreshRaceList(race,"Write a personal message","add");if(_gaq)_gaq.push(['_trackEvent','Races List','Add from Picklist','Added race to list from a picklist']);}});return}
function CANVaddRace(){var race={};race.uid=CANVgetUserOrPageId();race.date=inputEncode(getObj("date_000").value);race.name=inputEncode(getObj("name_000").value);race.url=inputEncode(cleanURLprefix(getObj("url_000").value));race.result=inputEncode(getObj("result_000").value);AJAX(php("SQL_insRace",[race.uid,race.date,race.name,race.result,race.url]),function(jx){var rid=AJAXResponseText(jx);if(rid){race.rid=rid;race.name=removeHtmlTags(race.name);race.date=removeHtmlTags(race.date);if(debugging)debug("url: "+race.url);CANVrefreshRaceList(race,"Write a personal message","add");getObj("date_000").value="";getObj("name_000").value="";getObj("result_000").value="";getObj("url_000").value="http://";if(_gaq)_gaq.push(['_trackEvent','Races List','Add','Added race to list']);}});return}
function CANVeditRace(b){AJAX(php("CANV_getRaceEditForm",[b]),function(jx){var e=AJAXResponseJSON(jx);if(e){getObj("dateDiv"+b).innerHTML=e.date;getObj("nameDivRow"+b).innerHTML=e.name+e.url;getObj("resultDiv"+b).innerHTML=e.result;getObj("button"+b).innerHTML="Update";getObj("button"+b).onclick=function g(d){CANVupdRace(b)};var f=getObj("actionsDiv"+b);var h=getObj("delete"+b);f.removeChild(h);}})}
function CANVupdRace(e){var race={};race.uid=CANVgetUserOrPageId();race.date=inputEncode(getObj("date"+e).value);race.name=inputEncode(getObj("name"+e).value);race.url=inputEncode(cleanURLprefix(getObj("url"+e).value));race.result=inputEncode(getObj("result"+e).value);race.rid=e;AJAX(php("SQL_updRace",[race.rid,race.date,race.name,race.result,race.url]),function(jx){var g=AJAXResponseJSON(jx);if(g.update){race.name=removeHtmlTags(race.name);race.date=removeHtmlTags(race.date);(g.resultChange)?CANVrefreshRaceList(race,"Write a personal message","upd"):CANVrefreshRaceList(race,"","upd");if(_gaq)_gaq.push(['_trackEvent','Races List','Update','Updated a race on the list']);}})}
function CANVdeleteRace(rid,url){var race={};race.uid=CANVgetUserOrPageId();race.date=inputEncode(getObj("dateDiv"+rid).innerHTML);race.name=inputEncode(stripslashes(removeHtmlTags(getObj("nameDiv"+rid).innerHTML)));race.url=inputEncode(url);race.result="";race.rid=rid;AJAX(php("SQL_dltRace",[race.rid]),function(jx){var e=AJAXResponseText(jx);if(e){CANVrefreshRaceList(race,"Write a personal message","del");if(_gaq)_gaq.push(['_trackEvent','Races List','Delete','Deleted a race from the list']);}})}
function CANVupdateSettings(){var date_format=(getObj('date_format1').checked)?"1":(getObj('date_format2').checked)?"2":"0";var race_format=(getObj('race_format1').checked)?"1":(getObj('race_format2').checked)?"2":"0";if(date_format!="0")setCookie("date_format",date_format,3650);if(race_format!="0")setCookie("race_format",race_format,3650);CANVrefreshRaceList(null,"",null);return;}
function CANVmouseOverPic(el,desc){var xy={};xy=xPageXY(el);var parent=el.parentNode;x=xy.x-parent.scrollLeft;y=xy.y-parent.scrollTop-3;if(debugging)debug("X:"+x+"  Y:"+y+"  scrollTop: "+parent.scrollTop);var ballon=getObj('ballon');ballon.style.left=x+"px";ballon.style.top=y+"px";getObj("ballon_text").innerHTML=desc;ballon.style.display='block';return;}
function CANVmouseOutPic(){getObj('ballon').style.display='none';return;}
function FBSetProfileBox(a){var b=AJAXObj();AJAXPost(url,b,php("PBOXget",[a]),function(){var d=AJAXResponseText(b);if(d){var c="<fb:wide>"+d+"</fb:wide><fb:narrow>"+d+"</fb:narrow>";api.profile_setFBML(a,c,"","",c,function(e,f){if(a=="100000187338024"){alert("exception:"+f)}
var g=getObj("addProfileButton");if(g.innerHTML==""){FB.Connect.showAddSectionButton("profile",g)}})}})}
function FBgetFriendSelector(){var c=0;var a=getObj("invite_div");var b=FB.Connect.get_loggedInUser();api.friends_getAppUsers(function(d,e){if(e=="Invalid session state"){if(b=="1124240344"){alert(e)}
a.innerHTML='<div style="font-size:12pt; color:red; text-align:center; padding:100px;">Your session has expired, please login again.</div>'}
else{var f=AJAXObj();AJAXPost(url,f,php("CANV_getFriendSelector",[b,d]),function(){var g=AJAXResponseDiv(f,a);if(g){FB.XFBML.parse()}
c=1})}});setTimeout(function(){if(!c){a.innerHTML='<div style="font-size:12pt; color:red; text-align:center; padding:100px;">Your session has expired, please login again.</div>'}},5000)}
function AJAXObj(){var a;try{a=new XMLHttpRequest()}
catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}
catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}
catch(b){alert("Your browser broke!");return false}}}
return a}
function AJAXPost(a,d,c,b){d.open("POST",a,true);d.setRequestHeader("Content-type","application/x-www-form-urlencoded");d.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2005 00:00:00 GMT");d.onreadystatechange=b;d.send(c);timerExpire=false;setTimeout(function(){timerExpire=true},1000);return}
function CANVshowVideo(){getDialogAJAX(php("CANV_showVideo",["whatever"]),null,"Add To Profile Tab",507,460,80,200)}
function CANVgetFriendsInRace(race_name,race_date,id){race_name=inputEncode(race_name);AJAX(php("CANV_getFriendsInRace",[race_name,race_date]),function(jx){var html=AJAXResponseText(jx);if(html){getObj("friendsDiv"+id).innerHTML=html;FB.XFBML.parse();if(_gaq)_gaq.push(['_trackEvent','Races List','See Friends','Clicked on See Friends']);}})}
function CANVseeMoreTopRaceFriends(uids,title){var query=php("CANV_getTopRaceSeeMoreFriends",[uids,access_token]);getDialogAJAX(query,null,title,{width:635,height:557,top:5,left:126},function(div,handle){div.setAttribute("name","curvyCorner");div.setAttribute("radius","10,10,10,10");runCurvy();FB.XFBML.parse();YUIenableDrag(div,handle);if(_gaq)_gaq.push(['_trackEvent','Top Race','Viewed More...','Those who Clicked on button and opened the dialog']);});}
function browserdetect(){var agent=navigator.userAgent.toLowerCase();this.isIE=agent.indexOf("msie")>-1;if(this.isIE){this.ieVer=/msie\s(\d\.\d)/.exec(agent)[1];this.quirksMode=!document.compatMode||document.compatMode.indexOf("BackCompat")>-1;this.get_style=function(obj,prop){if(!(prop in obj.currentStyle))return"";var matches=/^([\d.]+)(\w*)/.exec(obj.currentStyle[prop]);if(!matches)return obj.currentStyle[prop];if(matches[1]==0)return'0';if(matches[2]&&matches[2]!=='px'){var style=obj.style.left;var rtStyle=obj.runtimeStyle.left;obj.runtimeStyle.left=obj.currentStyle.left;obj.style.left=matches[1]+matches[2];matches[0]=obj.style.pixelLeft;obj.style.left=style;obj.runtimeStyle.left=rtStyle;}
return matches[0];};this.supportsCorners=false;}
else{this.ieVer=this.quirksMode=0;this.get_style=function(obj,prop){prop=prop.replace(/([a-z])([A-Z])/g,'$1-$2').toLowerCase();return document.defaultView.getComputedStyle(obj,'').getPropertyValue(prop);};this.isSafari=agent.indexOf('safari')!=-1;this.isWebKit=agent.indexOf('webkit')!=-1;this.isOp='opera'in window;if(this.isOp)
this.supportsCorners=(this.isOp=window.opera.version())>=10.5;else{if(!this.isWebkit){if(!(this.isMoz=agent.indexOf('firefox')!==-1)){for(var i=document.childNodes.length;--i>=0;)if('style'in document.childNodes[i]){this.isMoz='MozBorderRadius'in document.childNodes[i];break;}}}
this.supportsCorners=this.isWebKit||this.isMoz;}}}
var curvyBrowser=new browserdetect;if(curvyBrowser.isIE){try{document.execCommand("BackgroundImageCache",false,true);}
catch(e){};}
function curvyCnrSpec(selText){this.selectorText=selText;this.tlR=this.trR=this.blR=this.brR=0;this.tlu=this.tru=this.blu=this.bru="";this.antiAlias=true;}
curvyCnrSpec.prototype.setcorner=function(tb,lr,radius,unit){if(!tb){this.tlR=this.trR=this.blR=this.brR=parseInt(radius);this.tlu=this.tru=this.blu=this.bru=unit;}
else{propname=tb.charAt(0)+lr.charAt(0);this[propname+'R']=parseInt(radius);this[propname+'u']=unit;}}
curvyCnrSpec.prototype.get=function(prop){if(/^(t|b)(l|r)(R|u)$/.test(prop))return this[prop];if(/^(t|b)(l|r)Ru$/.test(prop)){var pname=prop.charAt(0)+prop.charAt(1);return this[pname+'R']+this[pname+'u'];}
if(/^(t|b)Ru?$/.test(prop)){var tb=prop.charAt(0);tb+=this[tb+'lR']>this[tb+'rR']?'l':'r';var retval=this[tb+'R'];if(prop.length===3&&prop.charAt(2)==='u')
retval+=this[tb='u'];return retval;}
throw new Error('Don\'t recognize property '+prop);}
curvyCnrSpec.prototype.radiusdiff=function(tb){if(tb!=='t'&&tb!=='b')throw new Error("Param must be 't' or 'b'");return Math.abs(this[tb+'lR']-this[tb+'rR']);}
curvyCnrSpec.prototype.setfrom=function(obj){this.tlu=this.tru=this.blu=this.bru='px';if('tl'in obj)this.tlR=obj.tl.radius;if('tr'in obj)this.trR=obj.tr.radius;if('bl'in obj)this.blR=obj.bl.radius;if('br'in obj)this.brR=obj.br.radius;if('antiAlias'in obj)this.antiAlias=obj.antiAlias;};curvyCnrSpec.prototype.cloneOn=function(box){var props=['tl','tr','bl','br'];var converted=0;var i,propu;for(i in props)if(!isNaN(i)){propu=this[props[i]+'u'];if(propu!==''&&propu!=='px'){converted=new curvyCnrSpec;break;}}
if(!converted)
converted=this;else{var propi,propR,save=curvyBrowser.get_style(box,'left');for(i in props)if(!isNaN(i)){propi=props[i];propu=this[propi+'u'];propR=this[propi+'R'];if(propu!=='px'){var save=box.style.left;box.style.left=propR+propu;propR=box.style.pixelLeft;box.style.left=save;}
converted[propi+'R']=propR;converted[propi+'u']='px';}
box.style.left=save;}
return converted;}
curvyCnrSpec.prototype.radiusSum=function(tb){if(tb!=='t'&&tb!=='b')throw new Error("Param must be 't' or 'b'");return this[tb+'lR']+this[tb+'rR'];}
curvyCnrSpec.prototype.radiusCount=function(tb){var count=0;if(this[tb+'lR'])++count;if(this[tb+'rR'])++count;return count;}
curvyCnrSpec.prototype.cornerNames=function(){var ret=[];if(this.tlR)ret.push('tl');if(this.trR)ret.push('tr');if(this.blR)ret.push('bl');if(this.brR)ret.push('br');return ret;}
function operasheet(sheetnumber){var txt=document.styleSheets.item(sheetnumber).ownerNode.text;txt=txt.replace(/\/\*(\n|\r|.)*?\*\//g,'');var pat=new RegExp("^\\s*([\\w.#][-\\w.#, ]+)[\\n\\s]*\\{([^}]+border-((top|bottom)-(left|right)-)?radius[^}]*)\\}","mg");var matches;this.rules=[];while((matches=pat.exec(txt))!==null){var pat2=new RegExp("(..)border-((top|bottom)-(left|right)-)?radius:\\s*([\\d.]+)(in|em|px|ex|pt)","g");var submatches,cornerspec=new curvyCnrSpec(matches[1]);while((submatches=pat2.exec(matches[2]))!==null)
if(submatches[1]!=="z-")
cornerspec.setcorner(submatches[3],submatches[4],submatches[5],submatches[6]);this.rules.push(cornerspec);}}
operasheet.contains_border_radius=function(sheetnumber){return /border-((top|bottom)-(left|right)-)?radius/.test(document.styleSheets.item(sheetnumber).ownerNode.text);}
function curvyCorners(){var i,j,boxCol,settings,startIndex;if(typeof arguments[0]!=="object")throw curvyCorners.newError("First parameter of curvyCorners() must be an object.");if(arguments[0]instanceof curvyCnrSpec){settings=arguments[0];if(!settings.selectorText&&typeof arguments[1]==='string')
settings.selectorText=arguments[1];}
else{if(typeof arguments[1]!=="object"&&typeof arguments[1]!=="string")throw curvyCorners.newError("Second parameter of curvyCorners() must be an object or a class name.");j=arguments[1];if(typeof j!=='string')j='';if(j!==''&&j.charAt(0)!=='.'&&'autoPad'in arguments[0])j='.'+j;settings=new curvyCnrSpec(j);settings.setfrom(arguments[0]);}
if(settings.selectorText){startIndex=0;var args=settings.selectorText.replace(/\s+$/,'').split(/,\s*/);boxCol=new Array;for(i=0;i<args.length;++i){if((j=args[i].lastIndexOf('#'))!==-1)
args[i]=args[i].substr(j);boxCol=boxCol.concat(curvyCorners.getElementsBySelector(args[i].split(/\s+/)));}}
else{startIndex=1;boxCol=arguments;}
for(i=startIndex,j=boxCol.length;i<j;++i){var theBox=boxCol[i];var skipCorners=false;if(!theBox.className)
theBox.className='curvyIgnore';else{skipCorners=theBox.className.indexOf('curvyIgnore')!==-1;if(!skipCorners)theBox.className+=' curvyIgnore';}
if(!skipCorners){if(theBox.className.indexOf('curvyRedraw')!==-1){if(typeof curvyCorners.redrawList==='undefined')curvyCorners.redrawList=new Array;curvyCorners.redrawList.push({node:theBox,spec:settings,copy:theBox.cloneNode(false)});}
var obj=new curvyObject(settings,theBox);obj.applyCorners();}}}
curvyCorners.prototype.applyCornersToAll=function(){throw curvyCorners.newError('This function is now redundant. Just call curvyCorners(). See documentation.');};curvyCorners.redraw=function(){if(curvyBrowser.supportsCorners)return;if(!curvyCorners.redrawList)throw curvyCorners.newError('curvyCorners.redraw() has nothing to redraw.');var old_block_value=curvyCorners.block_redraw;curvyCorners.block_redraw=true;for(var i in curvyCorners.redrawList){if(isNaN(i))continue;var o=curvyCorners.redrawList[i];if(!o.node.clientWidth)continue;var newchild=o.copy.cloneNode(false);for(var contents=o.node.firstChild;contents!=null;contents=contents.nextSibling)
if(contents.className==='autoPadDiv')break;if(!contents){curvyCorners.alert('Couldn\'t find autoPad DIV');break;}
o.node.parentNode.replaceChild(newchild,o.node);var scripts=contents.getElementsByTagName('script');for(var j=scripts.length-1;j>=0;--j)
scripts[j].parentNode.removeChild(scripts[j]);while(contents.firstChild)newchild.appendChild(contents.removeChild(contents.firstChild));o=new curvyObject(o.spec,o.node=newchild);o.applyCorners();}
curvyCorners.block_redraw=old_block_value;}
curvyCorners.adjust=function(obj,prop,newval){if(!curvyBrowser.supportsCorners){if(!curvyCorners.redrawList)throw curvyCorners.newError('curvyCorners.adjust() has nothing to adjust.');var i,j=curvyCorners.redrawList.length;for(i=0;i<j;++i)if(curvyCorners.redrawList[i].node===obj)break;if(i===j)throw curvyCorners.newError('Object not redrawable');obj=curvyCorners.redrawList[i].copy;}
if(prop.indexOf('.')===-1)
obj[prop]=newval;else eval('obj.'+prop+"='"+newval+"'");}
curvyCorners.handleWinResize=function(){if(!curvyCorners.block_redraw)curvyCorners.redraw();}
curvyCorners.setWinResize=function(onoff){curvyCorners.block_redraw=!onoff;}
curvyCorners.newError=function(errorMessage){return new Error("curvyCorners Error:\n"+errorMessage)}
curvyCorners.alert=function(errorMessage){if(typeof curvyCornersVerbose==='undefined'||curvyCornersVerbose)alert(errorMessage);}
function curvyObject(){var boxDisp;this.box=arguments[1];this.settings=arguments[0];this.topContainer=this.bottomContainer=this.shell=boxDisp=null;var boxWidth=this.box.clientWidth;if(('canHaveChildren'in this.box&&!this.box.canHaveChildren)||this.box.tagName==='TABLE')
throw new Error(this.errmsg("You cannot apply corners to "+this.box.tagName+" elements.","Error"));if(!boxWidth&&curvyBrowser.isIE){this.box.style.zoom=1;boxWidth=this.box.clientWidth;}
if(!boxWidth&&curvyBrowser.get_style(this.box,'display')==='inline'){this.box.style.display='inline-block';curvyCorners.alert(this.errmsg("Converting inline element to inline-block","warning"));boxWidth=this.box.clientWidth;}
if(!boxWidth){if(!this.box.parentNode)throw this.newError("box has no parent!");for(boxDisp=this.box;;boxDisp=boxDisp.parentNode){if(!boxDisp||boxDisp.tagName==='BODY'){this.applyCorners=function(){}
curvyCorners.alert(this.errmsg("zero-width box with no accountable parent","warning"));return;}
if(curvyBrowser.get_style(boxDisp,'display')==='none')break;}
var boxDispSave=boxDisp.style.display;boxDisp.style.display='block';boxWidth=this.box.clientWidth;}
if(!boxWidth){curvyCorners.alert(this.errmsg("zero-width box, cannot display","error"));this.applyCorners=function(){}
return;}
if(arguments[0]instanceof curvyCnrSpec)
this.spec=arguments[0].cloneOn(this.box);else{this.spec=new curvyCnrSpec('');this.spec.setfrom(this.settings);}
var borderWidth=curvyBrowser.get_style(this.box,"borderTopWidth");var borderWidthB=curvyBrowser.get_style(this.box,"borderBottomWidth");var borderWidthL=curvyBrowser.get_style(this.box,"borderLeftWidth");var borderWidthR=curvyBrowser.get_style(this.box,"borderRightWidth");var borderColour=curvyBrowser.get_style(this.box,"borderTopColor");var borderColourB=curvyBrowser.get_style(this.box,"borderBottomColor");var borderColourL=curvyBrowser.get_style(this.box,"borderLeftColor");var borderColourR=curvyBrowser.get_style(this.box,"borderRightColor");var borderStyle=curvyBrowser.get_style(this.box,"borderTopStyle");var borderStyleB=curvyBrowser.get_style(this.box,"borderBottomStyle");var borderStyleL=curvyBrowser.get_style(this.box,"borderLeftStyle");var borderStyleR=curvyBrowser.get_style(this.box,"borderRightStyle");var boxColour=curvyBrowser.get_style(this.box,"backgroundColor");var backgroundImage=curvyBrowser.get_style(this.box,"backgroundImage");var backgroundRepeat=curvyBrowser.get_style(this.box,"backgroundRepeat");var backgroundPosX,backgroundPosY;if(this.box.currentStyle&&this.box.currentStyle.backgroundPositionX){backgroundPosX=curvyBrowser.get_style(this.box,"backgroundPositionX");backgroundPosY=curvyBrowser.get_style(this.box,"backgroundPositionY");}
else{backgroundPosX=curvyBrowser.get_style(this.box,'backgroundPosition');backgroundPosX=backgroundPosX.split(' ');backgroundPosY=backgroundPosX.length===2?backgroundPosX[1]:0;backgroundPosX=backgroundPosX[0];}
var boxPosition=curvyBrowser.get_style(this.box,"position");var topPadding=curvyBrowser.get_style(this.box,"paddingTop");var bottomPadding=curvyBrowser.get_style(this.box,"paddingBottom");var leftPadding=curvyBrowser.get_style(this.box,"paddingLeft");var rightPadding=curvyBrowser.get_style(this.box,"paddingRight");var border=curvyBrowser.get_style(this.box,"border");var filter=curvyBrowser.ieVer>7?curvyBrowser.get_style(this.box,'filter'):null;var topMaxRadius=this.spec.get('tR');var botMaxRadius=this.spec.get('bR');var styleToNPx=function(val){if(typeof val==='number')return val;if(typeof val!=='string')throw new Error('unexpected styleToNPx type '+typeof val);var matches=/^[-\d.]([a-z]+)$/.exec(val);if(matches&&matches[1]!='px')throw new Error('Unexpected unit '+matches[1]);if(isNaN(val=parseInt(val)))val=0;return val;}
var min0Px=function(val){return val<=0?"0":val+"px";}
try{this.borderWidth=styleToNPx(borderWidth);this.borderWidthB=styleToNPx(borderWidthB);this.borderWidthL=styleToNPx(borderWidthL);this.borderWidthR=styleToNPx(borderWidthR);this.boxColour=curvyObject.format_colour(boxColour);this.topPadding=styleToNPx(topPadding);this.bottomPadding=styleToNPx(bottomPadding);this.leftPadding=styleToNPx(leftPadding);this.rightPadding=styleToNPx(rightPadding);this.boxWidth=boxWidth;this.boxHeight=this.box.clientHeight;this.borderColour=curvyObject.format_colour(borderColour);this.borderColourB=curvyObject.format_colour(borderColourB);this.borderColourL=curvyObject.format_colour(borderColourL);this.borderColourR=curvyObject.format_colour(borderColourR);this.borderString=this.borderWidth+"px"+" "+borderStyle+" "+this.borderColour;this.borderStringB=this.borderWidthB+"px"+" "+borderStyleB+" "+this.borderColourB;this.borderStringL=this.borderWidthL+"px"+" "+borderStyleL+" "+this.borderColourL;this.borderStringR=this.borderWidthR+"px"+" "+borderStyleR+" "+this.borderColourR;this.backgroundImage=((backgroundImage!="none")?backgroundImage:"");this.backgroundRepeat=backgroundRepeat;}
catch(e){throw this.newError(e.message);}
var clientHeight=this.boxHeight;var clientWidth=boxWidth;if(curvyBrowser.isOp){backgroundPosX=styleToNPx(backgroundPosX);backgroundPosY=styleToNPx(backgroundPosY);if(backgroundPosX){var t=clientWidth+this.borderWidthL+this.borderWidthR;if(backgroundPosX>t)backgroundPosX=t;backgroundPosX=(t/backgroundPosX*100)+'%';}
if(backgroundPosY){var t=clientHeight+this.borderWidth+this.borderWidthB;if(backgroundPosY>t)backgroundPosY=t;backgroundPosY=(t/backgroundPosY*100)+'%';}}
if(curvyBrowser.quirksMode){}
else{this.boxWidth-=this.leftPadding+this.rightPadding;this.boxHeight-=this.topPadding+this.bottomPadding;}
this.contentContainer=document.createElement("div");if(filter)this.contentContainer.style.filter=filter;while(this.box.firstChild)this.contentContainer.appendChild(this.box.removeChild(this.box.firstChild));if(boxPosition!="absolute")this.box.style.position="relative";this.box.style.padding='0';this.box.style.border=this.box.style.backgroundImage='none';this.box.style.backgroundColor='transparent';this.box.style.width=(clientWidth+this.borderWidthL+this.borderWidthR)+'px';this.box.style.height=(clientHeight+this.borderWidth+this.borderWidthB)+'px';var newMainContainer=document.createElement("div");newMainContainer.style.position="absolute";if(filter)newMainContainer.style.filter=filter;if(curvyBrowser.quirksMode){newMainContainer.style.width=(clientWidth+this.borderWidthL+this.borderWidthR)+'px';}else{newMainContainer.style.width=clientWidth+'px';}
newMainContainer.style.height=min0Px(clientHeight+this.borderWidth+this.borderWidthB-topMaxRadius-botMaxRadius);newMainContainer.style.padding="0";newMainContainer.style.top=topMaxRadius+"px";newMainContainer.style.left="0";if(this.borderWidthL)
newMainContainer.style.borderLeft=this.borderStringL;if(this.borderWidth&&!topMaxRadius)
newMainContainer.style.borderTop=this.borderString;if(this.borderWidthR)
newMainContainer.style.borderRight=this.borderStringR;if(this.borderWidthB&&!botMaxRadius)
newMainContainer.style.borderBottom=this.borderStringB;newMainContainer.style.backgroundColor=boxColour;newMainContainer.style.backgroundImage=this.backgroundImage;newMainContainer.style.backgroundRepeat=this.backgroundRepeat;newMainContainer.style.direction='ltr';this.shell=this.box.appendChild(newMainContainer);boxWidth=curvyBrowser.get_style(this.shell,"width");if(boxWidth===""||boxWidth==="auto"||boxWidth.indexOf("%")!==-1)throw this.newError('Shell width is '+boxWidth);this.boxWidth=(boxWidth!=""&&boxWidth!="auto"&&boxWidth.indexOf("%")==-1)?parseInt(boxWidth):this.shell.clientWidth;this.applyCorners=function(){this.backgroundPosX=this.backgroundPosY=0;if(this.backgroundObject){var bgOffset=function(style,imglen,boxlen){if(style===0)return 0;var retval;if(style==='right'||style==='bottom')return boxlen-imglen;if(style==='center')return(boxlen-imglen)/2;if(style.indexOf('%')>0)return(boxlen-imglen)*100/parseInt(style);return styleToNPx(style);}
this.backgroundPosX=bgOffset(backgroundPosX,this.backgroundObject.width,clientWidth);this.backgroundPosY=bgOffset(backgroundPosY,this.backgroundObject.height,clientHeight);}
else if(this.backgroundImage){this.backgroundPosX=styleToNPx(backgroundPosX);this.backgroundPosY=styleToNPx(backgroundPosY);}
if(topMaxRadius){newMainContainer=document.createElement("div");newMainContainer.style.width=this.boxWidth+"px";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidth+"px";newMainContainer.style.paddingRight=this.borderWidth+"px";newMainContainer.style.height=topMaxRadius+"px";newMainContainer.style.top=-topMaxRadius+"px";newMainContainer.style.left=-this.borderWidthL+"px";this.topContainer=this.shell.appendChild(newMainContainer);}
if(botMaxRadius){var newMainContainer=document.createElement("div");newMainContainer.style.width=this.boxWidth+"px";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidthB+"px";newMainContainer.style.paddingRight=this.borderWidthB+"px";newMainContainer.style.height=botMaxRadius+"px";newMainContainer.style.bottom=-botMaxRadius+"px";newMainContainer.style.left=-this.borderWidthL+"px";this.bottomContainer=this.shell.appendChild(newMainContainer);}
var corners=this.spec.cornerNames();for(var i in corners)if(!isNaN(i)){var cc=corners[i];var specRadius=this.spec[cc+'R'];var bwidth,bcolor,borderRadius,borderWidthTB;if(cc=="tr"||cc=="tl"){bwidth=this.borderWidth;bcolor=this.borderColour;borderWidthTB=this.borderWidth;}else{bwidth=this.borderWidthB;bcolor=this.borderColourB;borderWidthTB=this.borderWidthB;}
borderRadius=specRadius-borderWidthTB;var newCorner=document.createElement("div");newCorner.style.height=this.spec.get(cc+'Ru');newCorner.style.width=this.spec.get(cc+'Ru');newCorner.style.position="absolute";newCorner.style.fontSize="1px";newCorner.style.overflow="hidden";var intx,inty,outsideColour;var trans=filter?parseInt(/alpha\(opacity.(\d+)\)/.exec(filter)[1]):100;for(intx=0;intx<specRadius;++intx){var y1=(intx+1>=borderRadius)?-1:Math.floor(Math.sqrt(Math.pow(borderRadius,2)-Math.pow(intx+1,2)))-1;if(borderRadius!=specRadius){var y2=(intx>=borderRadius)?-1:Math.ceil(Math.sqrt(Math.pow(borderRadius,2)-Math.pow(intx,2)));var y3=(intx+1>=specRadius)?-1:Math.floor(Math.sqrt(Math.pow(specRadius,2)-Math.pow((intx+1),2)))-1;}
var y4=(intx>=specRadius)?-1:Math.ceil(Math.sqrt(Math.pow(specRadius,2)-Math.pow(intx,2)));if(y1>-1)this.drawPixel(intx,0,this.boxColour,trans,(y1+1),newCorner,true,specRadius);if(borderRadius!=specRadius){if(this.spec.antiAlias){for(inty=y1+1;inty<y2;++inty){if(this.backgroundImage!=""){var borderFract=curvyObject.pixelFraction(intx,inty,borderRadius)*100;this.drawPixel(intx,inty,bcolor,trans,1,newCorner,borderFract>=30,specRadius);}
else if(this.boxColour!=='transparent'){var pixelcolour=curvyObject.BlendColour(this.boxColour,bcolor,curvyObject.pixelFraction(intx,inty,borderRadius));this.drawPixel(intx,inty,pixelcolour,trans,1,newCorner,false,specRadius);}
else this.drawPixel(intx,inty,bcolor,trans>>1,1,newCorner,false,specRadius);}
if(y3>=y2){if(y2==-1)y2=0;this.drawPixel(intx,y2,bcolor,trans,(y3-y2+1),newCorner,false,0);}
outsideColour=bcolor;inty=y3;}
else{if(y3>y1){this.drawPixel(intx,(y1+1),bcolor,trans,(y3-y1),newCorner,false,0);}}}
else{outsideColour=this.boxColour;inty=y1;}
if(this.spec.antiAlias&&this.boxColour!=='transparent'){while(++inty<y4){this.drawPixel(intx,inty,outsideColour,(curvyObject.pixelFraction(intx,inty,specRadius)*trans),1,newCorner,borderWidthTB<=0,specRadius);}}}
for(var t=0,k=newCorner.childNodes.length;t<k;++t){var pixelBar=newCorner.childNodes[t];var pixelBarTop=parseInt(pixelBar.style.top);var pixelBarLeft=parseInt(pixelBar.style.left);var pixelBarHeight=parseInt(pixelBar.style.height);if(cc=="tl"||cc=="bl"){pixelBar.style.left=(specRadius-pixelBarLeft-1)+"px";}
if(cc=="tr"||cc=="tl"){pixelBar.style.top=(specRadius-pixelBarHeight-pixelBarTop)+"px";}
pixelBar.style.backgroundRepeat=this.backgroundRepeat;if(this.backgroundImage)switch(cc){case"tr":pixelBar.style.backgroundPosition=(this.backgroundPosX-this.borderWidthL+specRadius-clientWidth-pixelBarLeft)+"px "+(this.backgroundPosY+pixelBarHeight+pixelBarTop+this.borderWidth-specRadius)+"px";break;case"tl":pixelBar.style.backgroundPosition=(this.backgroundPosX-specRadius+pixelBarLeft+1+this.borderWidthL)+"px "+(this.backgroundPosY-specRadius+pixelBarHeight+pixelBarTop+this.borderWidth)+"px";break;case"bl":pixelBar.style.backgroundPosition=(this.backgroundPosX-specRadius+pixelBarLeft+1+this.borderWidthL)+"px "+(this.backgroundPosY-clientHeight-this.borderWidth+(curvyBrowser.quirksMode?pixelBarTop:-pixelBarTop)+specRadius)+"px";break;case"br":if(curvyBrowser.quirksMode){pixelBar.style.backgroundPosition=(this.backgroundPosX-this.borderWidthL-clientWidth+specRadius-pixelBarLeft)+"px "+(this.backgroundPosY-clientHeight-this.borderWidth+pixelBarTop+specRadius)+"px";}else{pixelBar.style.backgroundPosition=(this.backgroundPosX-this.borderWidthL-clientWidth+specRadius-pixelBarLeft)+"px "+(this.backgroundPosY-clientHeight-this.borderWidth+specRadius-pixelBarTop)+"px";}}}
switch(cc){case"tl":newCorner.style.top=newCorner.style.left="0";this.topContainer.appendChild(newCorner);break;case"tr":newCorner.style.top=newCorner.style.right="0";this.topContainer.appendChild(newCorner);break;case"bl":newCorner.style.bottom=newCorner.style.left="0";this.bottomContainer.appendChild(newCorner);break;case"br":newCorner.style.bottom=newCorner.style.right="0";this.bottomContainer.appendChild(newCorner);}}
var radiusDiff={t:this.spec.radiusdiff('t'),b:this.spec.radiusdiff('b')};for(z in radiusDiff){if(typeof z==='function')continue;if(!this.spec.get(z+'R'))continue;if(radiusDiff[z]){var smallerCornerType=(this.spec[z+"lR"]<this.spec[z+"rR"])?z+"l":z+"r";var newFiller=document.createElement("div");newFiller.style.height=radiusDiff[z]+"px";newFiller.style.width=this.spec.get(smallerCornerType+'Ru');newFiller.style.position="absolute";newFiller.style.fontSize="1px";newFiller.style.overflow="hidden";newFiller.style.backgroundColor=this.boxColour;if(filter)newFiller.style.filter=filter;newFiller.style.backgroundImage=this.backgroundImage;newFiller.style.backgroundRepeat=this.backgroundRepeat;switch(smallerCornerType){case"tl":newFiller.style.bottom=newFiller.style.left="0";newFiller.style.borderLeft=this.borderStringL;newFiller.style.backgroundPosition=this.backgroundPosX+"px "+(this.borderWidth+this.backgroundPosY-this.spec.tlR)+"px";this.topContainer.appendChild(newFiller);break;case"tr":newFiller.style.bottom=newFiller.style.right="0";newFiller.style.borderRight=this.borderStringR;newFiller.style.backgroundPosition=(this.backgroundPosX-this.boxWidth+this.spec.trR)+"px "+(this.borderWidth+this.backgroundPosY-this.spec.trR)+"px";this.topContainer.appendChild(newFiller);break;case"bl":newFiller.style.top=newFiller.style.left="0";newFiller.style.borderLeft=this.borderStringL;newFiller.style.backgroundPosition=this.backgroundPosX+"px "+(this.backgroundPosY-this.borderWidth-this.boxHeight+radiusDiff[z]+this.spec.blR)+"px";this.bottomContainer.appendChild(newFiller);break;case"br":newFiller.style.top=newFiller.style.right="0";newFiller.style.borderRight=this.borderStringR;newFiller.style.backgroundPosition=(this.borderWidthL+this.backgroundPosX-this.boxWidth+this.spec.brR)+"px "+(this.backgroundPosY-this.borderWidth-this.boxHeight+radiusDiff[z]+this.spec.brR)+"px";this.bottomContainer.appendChild(newFiller);}}
var newFillerBar=document.createElement("div");if(filter)newFillerBar.style.filter=filter;newFillerBar.style.position="relative";newFillerBar.style.fontSize="1px";newFillerBar.style.overflow="hidden";newFillerBar.style.width=this.fillerWidth(z);newFillerBar.style.backgroundColor=this.boxColour;newFillerBar.style.backgroundImage=this.backgroundImage;newFillerBar.style.backgroundRepeat=this.backgroundRepeat;switch(z){case"t":if(this.topContainer){if(curvyBrowser.quirksMode){newFillerBar.style.height=100+topMaxRadius+"px";}else{newFillerBar.style.height=100+topMaxRadius-this.borderWidth+"px";}
newFillerBar.style.marginLeft=this.spec.tlR?(this.spec.tlR-this.borderWidthL)+"px":"0";newFillerBar.style.borderTop=this.borderString;if(this.backgroundImage){var x_offset=this.spec.tlR?(this.borderWidthL+this.backgroundPosX-this.spec.tlR)+"px ":this.backgroundPosX+"px ";newFillerBar.style.backgroundPosition=x_offset+this.backgroundPosY+"px";this.shell.style.backgroundPosition=this.backgroundPosX+"px "+(this.backgroundPosY-topMaxRadius+this.borderWidthL)+"px";}
this.topContainer.appendChild(newFillerBar);}
break;case"b":if(this.bottomContainer){if(curvyBrowser.quirksMode){newFillerBar.style.height=botMaxRadius+"px";}else{newFillerBar.style.height=botMaxRadius-this.borderWidthB+"px";}
newFillerBar.style.marginLeft=this.spec.blR?(this.spec.blR-this.borderWidthL)+"px":"0";newFillerBar.style.borderBottom=this.borderStringB;if(this.backgroundImage){var x_offset=this.spec.blR?(this.backgroundPosX+this.borderWidthL-this.spec.blR)+"px ":this.backgroundPosX+"px ";newFillerBar.style.backgroundPosition=x_offset+(this.backgroundPosY-clientHeight-this.borderWidth+botMaxRadius)+"px";}
this.bottomContainer.appendChild(newFillerBar);}}}
this.contentContainer.style.position="absolute";this.contentContainer.className="autoPadDiv";this.contentContainer.style.left=this.borderWidthL+"px";this.contentContainer.style.paddingTop=this.topPadding+"px";this.contentContainer.style.top=this.borderWidth+"px";this.contentContainer.style.paddingLeft=this.leftPadding+"px";this.contentContainer.style.paddingRight=this.rightPadding+"px";z=clientWidth;if(!curvyBrowser.quirksMode)z-=this.leftPadding+this.rightPadding;this.contentContainer.style.width=z+"px";this.contentContainer.style.textAlign=curvyBrowser.get_style(this.box,'textAlign');this.box.style.textAlign='left';this.box.appendChild(this.contentContainer);if(boxDisp)boxDisp.style.display=boxDispSave;}
if(this.backgroundImage){backgroundPosX=this.backgroundCheck(backgroundPosX);backgroundPosY=this.backgroundCheck(backgroundPosY);if(this.backgroundObject){this.backgroundObject.holdingElement=this;this.dispatch=this.applyCorners;this.applyCorners=function(){if(this.backgroundObject.complete)
this.dispatch();else this.backgroundObject.onload=new Function('curvyObject.dispatch(this.holdingElement);');}}}}
curvyObject.prototype.backgroundCheck=function(style){if(style==='top'||style==='left'||parseInt(style)===0)return 0;if(!(/^[-\d.]+px$/.test(style))&&!this.backgroundObject){this.backgroundObject=new Image;var imgName=function(str){var matches=/url\("?([^'"]+)"?\)/.exec(str);return(matches?matches[1]:str);}
this.backgroundObject.src=imgName(this.backgroundImage);}
return style;}
curvyObject.dispatch=function(obj){if('dispatch'in obj)
obj.dispatch();else throw obj.newError('No dispatch function');}
curvyObject.prototype.drawPixel=function(intx,inty,colour,transAmount,height,newCorner,image,cornerRadius){var pixel=document.createElement("div");pixel.style.height=height+"px";pixel.style.width="1px";pixel.style.position="absolute";pixel.style.fontSize="1px";pixel.style.overflow="hidden";var topMaxRadius=this.spec.get('tR');pixel.style.backgroundColor=colour;if(image&&this.backgroundImage!=""){pixel.style.backgroundImage=this.backgroundImage;pixel.style.backgroundPosition="-"+(this.boxWidth-(cornerRadius-intx)+this.borderWidth)+"px -"+((this.boxHeight+topMaxRadius+inty)-this.borderWidth)+"px";}
if(transAmount!=100)curvyObject.setOpacity(pixel,transAmount);pixel.style.top=inty+"px";pixel.style.left=intx+"px";newCorner.appendChild(pixel);}
curvyObject.prototype.fillerWidth=function(tb){var b_width,f_width;b_width=curvyBrowser.quirksMode?0:this.spec.radiusCount(tb)*this.borderWidthL;if((f_width=this.boxWidth-this.spec.radiusSum(tb)+b_width)<0)
throw this.newError("Radius exceeds box width");return f_width+'px';}
curvyObject.prototype.errmsg=function(msg,gravity){var extradata="\ntag: "+this.box.tagName;if(this.box.id)extradata+="\nid: "+this.box.id;if(this.box.className)extradata+="\nclass: "+this.box.className;var parent;if((parent=this.box.parentNode)===null)
extradata+="\n(box has no parent)";else{extradata+="\nParent tag: "+parent.tagName;if(parent.id)extradata+="\nParent ID: "+parent.id;if(parent.className)extradata+="\nParent class: "+parent.className;}
if(gravity===undefined)gravity='warning';return'curvyObject '+gravity+":\n"+msg+extradata;}
curvyObject.prototype.newError=function(msg){return new Error(this.errmsg(msg,'exception'));}
curvyObject.IntToHex=function(strNum){var hexdig=['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'];return hexdig[strNum>>>4]+''+hexdig[strNum&15];}
curvyObject.BlendColour=function(Col1,Col2,Col1Fraction){if(Col1==='transparent'||Col2==='transparent')throw this.newError('Cannot blend with transparent');if(Col1.charAt(0)!=='#'){Col1=curvyObject.format_colour(Col1);}
if(Col2.charAt(0)!=='#'){Col2=curvyObject.format_colour(Col2);}
var red1=parseInt(Col1.substr(1,2),16);var green1=parseInt(Col1.substr(3,2),16);var blue1=parseInt(Col1.substr(5,2),16);var red2=parseInt(Col2.substr(1,2),16);var green2=parseInt(Col2.substr(3,2),16);var blue2=parseInt(Col2.substr(5,2),16);if(Col1Fraction>1||Col1Fraction<0)Col1Fraction=1;var endRed=Math.round((red1*Col1Fraction)+(red2*(1-Col1Fraction)));if(endRed>255)endRed=255;if(endRed<0)endRed=0;var endGreen=Math.round((green1*Col1Fraction)+(green2*(1-Col1Fraction)));if(endGreen>255)endGreen=255;if(endGreen<0)endGreen=0;var endBlue=Math.round((blue1*Col1Fraction)+(blue2*(1-Col1Fraction)));if(endBlue>255)endBlue=255;if(endBlue<0)endBlue=0;return"#"+curvyObject.IntToHex(endRed)+curvyObject.IntToHex(endGreen)+curvyObject.IntToHex(endBlue);}
curvyObject.pixelFraction=function(x,y,r){var fraction;var rsquared=r*r;var xvalues=new Array(2);var yvalues=new Array(2);var point=0;var whatsides="";var intersect=Math.sqrt(rsquared-Math.pow(x,2));if(intersect>=y&&intersect<(y+1)){whatsides="Left";xvalues[point]=0;yvalues[point]=intersect-y;++point;}
intersect=Math.sqrt(rsquared-Math.pow(y+1,2));if(intersect>=x&&intersect<(x+1)){whatsides+="Top";xvalues[point]=intersect-x;yvalues[point]=1;++point;}
intersect=Math.sqrt(rsquared-Math.pow(x+1,2));if(intersect>=y&&intersect<(y+1)){whatsides+="Right";xvalues[point]=1;yvalues[point]=intersect-y;++point;}
intersect=Math.sqrt(rsquared-Math.pow(y,2));if(intersect>=x&&intersect<(x+1)){whatsides+="Bottom";xvalues[point]=intersect-x;yvalues[point]=0;}
switch(whatsides){case"LeftRight":fraction=Math.min(yvalues[0],yvalues[1])+((Math.max(yvalues[0],yvalues[1])-Math.min(yvalues[0],yvalues[1]))/2);break;case"TopRight":fraction=1-(((1-xvalues[0])*(1-yvalues[1]))/2);break;case"TopBottom":fraction=Math.min(xvalues[0],xvalues[1])+((Math.max(xvalues[0],xvalues[1])-Math.min(xvalues[0],xvalues[1]))/2);break;case"LeftBottom":fraction=yvalues[0]*xvalues[1]/2;break;default:fraction=1;}
return fraction;}
curvyObject.rgb2Array=function(rgbColour){var rgbValues=rgbColour.substring(4,rgbColour.indexOf(")"));return rgbValues.split(", ");}
curvyObject.rgb2Hex=function(rgbColour){try{var rgbArray=curvyObject.rgb2Array(rgbColour);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);var hexColour="#"+curvyObject.IntToHex(red)+curvyObject.IntToHex(green)+curvyObject.IntToHex(blue);}
catch(e){var msg='getMessage'in e?e.getMessage():e.message;throw new Error("Error ("+msg+") converting RGB value to Hex in rgb2Hex");}
return hexColour;}
curvyObject.setOpacity=function(obj,opacity){opacity=(opacity==100)?99.999:opacity;if(curvyBrowser.isSafari&&obj.tagName!="IFRAME"){var rgbArray=curvyObject.rgb2Array(obj.style.backgroundColor);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);obj.style.backgroundColor="rgba("+red+", "+green+", "+blue+", "+opacity/100+")";}
else if(typeof obj.style.opacity!=="undefined"){obj.style.opacity=opacity/100;}
else if(typeof obj.style.MozOpacity!=="undefined"){obj.style.MozOpacity=opacity/100;}
else if(typeof obj.style.filter!=="undefined"){obj.style.filter="alpha(opacity="+opacity+")";}
else if(typeof obj.style.KHTMLOpacity!=="undefined"){obj.style.KHTMLOpacity=opacity/100;}}
curvyCorners.addEvent=function(elm,evType,fn,useCapture){if(elm.addEventListener){elm.addEventListener(evType,fn,useCapture);return true;}
if(elm.attachEvent)return elm.attachEvent('on'+evType,fn);elm['on'+evType]=fn;return false;}
if(typeof addEvent==='undefined')addEvent=curvyCorners.addEvent;curvyObject.getComputedColour=function(colour){var d=document.createElement('DIV');d.style.backgroundColor=colour;document.body.appendChild(d);if(window.getComputedStyle){var rtn=document.defaultView.getComputedStyle(d,null).getPropertyValue('background-color');d.parentNode.removeChild(d);if(rtn.substr(0,3)==="rgb")rtn=curvyObject.rgb2Hex(rtn);return rtn;}
else{var rng=document.body.createTextRange();rng.moveToElementText(d);rng.execCommand('ForeColor',false,colour);var iClr=rng.queryCommandValue('ForeColor');var rgb="rgb("+(iClr&0xFF)+", "+((iClr&0xFF00)>>8)+", "+((iClr&0xFF0000)>>16)+")";d.parentNode.removeChild(d);rng=null;return curvyObject.rgb2Hex(rgb);}}
curvyObject.format_colour=function(colour){if(colour!=""&&colour!="transparent"){if(colour.substr(0,3)==="rgb"){colour=curvyObject.rgb2Hex(colour);}
else if(colour.charAt(0)!=='#'){colour=curvyObject.getComputedColour(colour);}
else if(colour.length===4){colour="#"+colour.charAt(1)+colour.charAt(1)+colour.charAt(2)+colour.charAt(2)+colour.charAt(3)+colour.charAt(3);}}
return colour;}
curvyCorners.getElementsByClass=function(searchClass,node){var classElements=new Array;if(node===undefined)node=document;searchClass=searchClass.split('.');var tag='*';if(searchClass.length===1){tag=searchClass[0];searchClass=false;}
else{if(searchClass[0])tag=searchClass[0];searchClass=searchClass[1];}
var i,els,elsLen;if(tag.charAt(0)==='#'){els=document.getElementById(tag.substr(1));if(els)classElements.push(els);}
else{els=node.getElementsByTagName(tag);elsLen=els.length;if(searchClass){var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0;i<elsLen;++i){if(pattern.test(els[i].className))classElements.push(els[i]);}}
else for(i=0;i<elsLen;++i)classElements.push(els[i]);}
return classElements;}
curvyCorners.getElementsBySelector=function(selectors,parent){var ret;var sel=selectors[0];if(parent===undefined)parent=document;if(sel.indexOf('#')!==-1)
ret=[parent.getElementById(sel.substr(1))];else
ret=curvyCorners.getElementsByClass(sel,parent);if(selectors.length>1){var subret=[];for(var i=ret.length;--i>=0;)
subret=subret.concat(curvyCorners.getElementsBySelector(selectors.slice(1),ret[i]));ret=subret;}
return ret;}
if(curvyBrowser.supportsCorners){var curvyCornersNoAutoScan=true;curvyCorners.init=function(){};}
else{curvyCorners.scanStyles=function(){function units(num){if(!parseInt(num))return'px';var matches=/^[\d.]+(\w+)$/.exec(num);return matches[1];}
var t,i,j;if(curvyBrowser.isIE){function procIEStyles(rule){var style=rule.style;if(curvyBrowser.ieVer>6.0){var allR=style['-moz-border-radius']||0;var tR=style['-moz-border-radius-topright']||0;var tL=style['-moz-border-radius-topleft']||0;var bR=style['-moz-border-radius-bottomright']||0;var bL=style['-moz-border-radius-bottomleft']||0;}
else{var allR=style['moz-border-radius']||0;var tR=style['moz-border-radius-topright']||0;var tL=style['moz-border-radius-topleft']||0;var bR=style['moz-border-radius-bottomright']||0;var bL=style['moz-border-radius-bottomleft']||0;}
if(allR){var t=allR.split('/');t=t[0].split(/\s+/);if(t[t.length-1]==='')t.pop();switch(t.length){case 3:tL=t[0];tR=bL=t[1];bR=t[2];allR=false;break;case 2:tL=bR=t[0];tR=bL=t[1];allR=false;case 1:break;case 4:tL=t[0];tR=t[1];bR=t[2];bL=t[3];allR=false;break;default:curvyCorners.alert('Illegal corners specification: '+allR);}}
if(allR||tL||tR||bR||bL){var settings=new curvyCnrSpec(rule.selectorText);if(allR)
settings.setcorner(null,null,parseInt(allR),units(allR));else{if(tR)settings.setcorner('t','r',parseInt(tR),units(tR));if(tL)settings.setcorner('t','l',parseInt(tL),units(tL));if(bL)settings.setcorner('b','l',parseInt(bL),units(bL));if(bR)settings.setcorner('b','r',parseInt(bR),units(bR));}
curvyCorners(settings);}}
for(t=0;t<document.styleSheets.length;++t){try{if(document.styleSheets[t].imports){for(i=0;i<document.styleSheets[t].imports.length;++i)
for(j=0;j<document.styleSheets[t].imports[i].rules.length;++j)
procIEStyles(document.styleSheets[t].imports[i].rules[j]);}
for(i=0;i<document.styleSheets[t].rules.length;++i)
procIEStyles(document.styleSheets[t].rules[i]);}
catch(e){if(typeof curvyCornersVerbose!=='undefined'&&curvyCornersVerbose)
alert(e.message+" - ignored");}}}
else if(curvyBrowser.isOp){for(t=0;t<document.styleSheets.length;++t){if(operasheet.contains_border_radius(t)){j=new operasheet(t);for(i in j.rules)if(!isNaN(i))
curvyCorners(j.rules[i]);}}}
else curvyCorners.alert('Scanstyles does nothing in Webkit/Firefox/Opera');};curvyCorners.init=function(){if(arguments.callee.done)return;arguments.callee.done=true;if(curvyBrowser.isWebKit&&curvyCorners.init.timer){clearInterval(curvyCorners.init.timer);curvyCorners.init.timer=null;}
curvyCorners.scanStyles();};}
if(typeof curvyCornersNoAutoScan==='undefined'||curvyCornersNoAutoScan===false){if(curvyBrowser.isOp)
document.addEventListener("DOMContentLoaded",curvyCorners.init,false);else curvyCorners.addEvent(window,'load',curvyCorners.init,false);}
IE8_js=true;;(function(L,r){var h=L.IE7={version:"2.1(beta4)",toString:bJ("[IE7]")};h.compat=8;var s=h.appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1]-0;if(/ie7_off/.test(top.location.search)||s<5.5||s>=h.compat)return;var C=s<6,bh=bJ(),bt=r.documentElement,A,w,ci="!",X=":link{ie7-link:link}:visited{ie7-link:visited}",cj=/^[\w\.]+[^:]*$/;function bi(b,a){if(cj.test(b))b=(a||"")+b;return b};function bu(b,a){b=bi(b,a);return b.slice(0,b.lastIndexOf("/")+1)};var bK=r.scripts[r.scripts.length-1],ck=bu(bK.src);try{var Q=new ActiveXObject("Microsoft.XMLHTTP")}catch(ex){}var bj={};function cl(b,a){try{b=bi(b,a);if(!bj[b]){Q.open("GET",b,false);Q.send();if(Q.status==0||Q.status==200){bj[b]=Q.responseText}}}catch(ex){}return bj[b]||""};var dl=Array.prototype.slice,dm=/%([1-9])/g,cm=/^\s\s*/,cn=/\s\s*$/,co=/([\/()[\]{}|*+-.,^$?\\])/g,bL=/\bbase\b/,bM=["constructor","toString"],bk;function D(){};D.extend=function(f,d){bk=true;var c=new this;Y(c,f);bk=false;var b=c.constructor;function a(){if(!bk)b.apply(this,arguments)};c.constructor=a;a.extend=arguments.callee;Y(a,d);a.prototype=c;return a};D.prototype.extend=function(a){return Y(this,a)};var M="#",N="#",Z=".",bl="/",dn=/\\(\d+)/g,cp=/\[(\\.|[^\]\\])+\]|\\.|\(\?/g,cq=/\(/g,cr=/\$(\d+)/,cs=/^\$\d+$/,ct=/(\[(\\.|[^\]\\])+\]|\\.|\(\?)|\(/g,cu=/^<#\w+>$/,cv=/<#(\w+)>/g,E=D.extend({constructor:function(a){this[Z]=[];this[N]={};this.merge(a)},add:function(b,a){delete this[bl];if(b instanceof RegExp){b=b.source}if(!this[M+b])this[Z].push(String(b));return this[N][M+b]=new E.Item(b,a,this)},compile:function(a){if(a||!this[bl]){this[bl]=new RegExp(this,this.ignoreCase?"gi":"g")}return this[bl]},merge:function(b){for(var a in b)this.add(a,b[a])},exec:function(n){var j=this,k=j[Z],l=j[N],i,g=this.compile(true).exec(n);if(g){var f=0,d=1;while((i=l[M+k[f++]])){var c=d+i.length+1;if(g[d]){if(i.replacement===0){return j.exec(n)}else{var b=g.slice(d,c),a=b.length;while(--a)b[a]=b[a]||"";b[0]={match:b[0],item:i};return b}}d=c}}return null},parse:function(n){n+="";var j=this,k=j[Z],l=j[N];return n.replace(this.compile(),function(i){var g=[],f,d=1,c=arguments.length;while(--c)g[c]=arguments[c]||"";while((f=l[M+k[c++]])){var b=d+f.length+1;if(g[d]){var a=f.replacement;switch(typeof a){case"function":return a.apply(j,g.slice(d,b));case"number":return g[d+a];default:return a}}d=b}return i})},toString:function(){var f=[],d=this[Z],c=this[N],b;for(var a=0;b=c[M+d[a]];a++){f[a]=b.source}return"("+f.join(")|(")+")"}},{IGNORE:null,Item:D.extend({constructor:function(j,k,l){var i=j.indexOf("(")===-1?0:E.count(j),g=l.dictionary;if(g&&j.indexOf("<#")!==-1){if(cu.test(j)){var f=g[N][M+j.slice(2,-1)];j=f.replacement;i=f._4}else{j=g.parse(j)}}if(typeof k=="number")k=String(k);else if(k==null)k=0;if(typeof k=="string"&&cr.test(k)){if(cs.test(k)){var d=k.slice(1)-0;if(d&&d<=i)k=d}else{var c=k,b;k=function(a){if(!b){b=new RegExp(j,"g"+(this.ignoreCase?"i":""))}return a.replace(b,c)}}}this.length=i;this.source=String(j);this.replacement=k}}),count:function(a){return(String(a).replace(cp,"").match(cq)||"").length}}),cw=E.extend({parse:function(d){var c=this[N];return d.replace(cv,function(b,a){a=c[M+a];return a?a._5:b})},add:function(f,d){if(d instanceof RegExp){d=d.source}var c=d.replace(ct,cx);if(d.indexOf("(")!==-1){var b=E.count(d)}if(d.indexOf("<#")!==-1){d=this.parse(d);c=this.parse(c)}var a=this.base(f,d);a._5=c;a._4=b||a.length;return a},toString:function(){return"(<#"+this[PATTERNS].join(">)|(<#")+">)"}});function cx(b,a){return a||"(?:"};function Y(g,f){if(g&&f){var d=(typeof f=="function"?Function:Object).prototype;var c=bM.length,b;if(bk)while(b=bM[--c]){var a=f[b];if(a!=d[b]){if(bL.test(a)){bN(g,b,a)}else{g[b]=a}}}for(b in f)if(typeof d[b]=="undefined"){var a=f[b];if(g[b]&&typeof a=="function"&&bL.test(a)){bN(g,b,a)}else{g[b]=a}}}return g};function bN(g,f,d){var c=g[f];g[f]=function(){var b=this.base;this.base=c;var a=d.apply(this,arguments);this.base=b;return a}};function cy(d,c){if(!c)c=d;var b={};for(var a in d)b[a]=c[a];return b};function F(f){var d=arguments,c=new RegExp("%([1-"+arguments.length+"])","g");return String(f).replace(c,function(b,a){return a<d.length?d[a]:b})};function bm(b,a){return String(b).match(a)||[]};function bO(a){return String(a).replace(co,"\\$1")};function bP(a){return String(a).replace(cm,"").replace(cn,"")};function bJ(a){return function(){return a}};var bQ=E.extend({ignoreCase:true}),cz=/'/g,bR=/'(\d+)'/g,o0=/\\/g,bv=/\\([nrtf'"])/g,R=[],bS=new bQ({"<!\\-\\-|\\-\\->":"","\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/":"","@(namespace|import)[^;\\n]+[;\\n]":"","'(\\\\.|[^'\\\\])*'":bT,'"(\\\\.|[^"\\\\])*"':bT,"\\s+":" "});function cA(a){return bS.parse(a).replace(bv,"$1")};function ba(a){return a.replace(bR,cB)};function bT(b){var a=R.length;R[a]=b.slice(1,-1).replace(bv,"$1").replace(cz,"\\'");return"'"+a+"'"};function cB(c,b){var a=R[b];if(a==null)return c;return"'"+R[b]+"'"};function bn(a){return a.indexOf("'")===0?R[a.slice(1,-1)]:a};var cC=new E({Width:"Height",width:"height",Left:"Top",left:"top",Right:"Bottom",right:"bottom",onX:"onY"});function bU(a){return cC.parse(a)};var bV=[];function bw(a){cD(a);x(L,"onresize",a)};function x(c,b,a){c.attachEvent(b,a);bV.push(arguments)};function cE(c,b,a){try{c.detachEvent(b,a)}catch(ex){}};x(L,"onunload",function(){var a;while(a=bV.pop()){cE(a[0],a[1],a[2])}});function bb(c,b,a){if(!c.elements)c.elements={};if(a)c.elements[b.uniqueID]=b;else delete c.elements[b.uniqueID];return a};x(L,"onbeforeprint",function(){if(!h.CSS.print)new bW("print");h.CSS.print.recalc()});var bX=/^\d+(px)?$/i,S=/^\d+%$/,B=function(d,c){if(bX.test(c))return parseInt(c);var b=d.style.left,a=d.runtimeStyle.left;d.runtimeStyle.left=d.currentStyle.left;d.style.left=c||0;c=d.style.pixelLeft;d.style.left=b;d.runtimeStyle.left=a;return c},bx="ie7-",bY=D.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:bh}),by=[];function cD(a){by.push(a)};h.recalc=function(){h.HTML.recalc();h.CSS.recalc();for(var a=0;a<by.length;a++)by[a]()};function bo(a){return a.currentStyle["ie7-position"]=="fixed"};function bz(b,a){return b.currentStyle[bx+a]||b.currentStyle[a]};function T(c,b,a){if(c.currentStyle[bx+b]==null){c.runtimeStyle[bx+b]=c.currentStyle[b]}c.runtimeStyle[b]=a};function bZ(b){var a=r.createElement(b||"object");a.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";a.ie7_anon=true;return a};var cF="(e.nextSibling&&IE7._1(e,'next'))",cG=cF.replace(/next/g,"previous"),ca="e.nodeName>'@'",cb="if("+ca+"){",cH="(e.nodeName==='FORM'?IE7._0(e,'id'):e.id)",cI=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i,cJ=/(.*)(:first-(line|letter))/,cK=/\s/,cL=/((?:\\.|[^{\\])+)\{((?:\\.|[^}\\])+)\}/g,cM=/(?:\\.|[^,\\])+/g,G=r.styleSheets,bA=[];h.CSS=new(bY.extend({parser:new bQ,screen:"",print:"",styles:[],rules:[],pseudoClasses:s<7?"first\\-child":"",dynamicPseudoClasses:{toString:function(){var b=[];for(var a in this)b.push(a);return b.join("|")}},init:function(){var i="^\x01$",g="\\[class=?[^\\]]*\\]",f=[];if(this.pseudoClasses)f.push(this.pseudoClasses);var d=this.dynamicPseudoClasses.toString();if(d)f.push(d);f=f.join("|");var c=s<7?["[>+~\\[(]|([:.])[\\w-]+\\1"]:[g];if(f)c.push(":("+f+")");this.UNKNOWN=new RegExp(c.join("|")||i,"i");var b=s<7?["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"]:[g],a=b.concat();if(f)a.push(":("+f+")");t.COMPLEX=new RegExp(a.join("|")||i,"ig");if(this.pseudoClasses)b.push(":("+this.pseudoClasses+")");bc.COMPLEX=new RegExp(b.join("|")||i,"i");d="not\\(:"+d.split("|").join("\\)|not\\(:")+"\\)|"+d;bc.MATCH=new RegExp(d?"(.*?):("+d+")(.*)":i,"i");this.createStyleSheet();this.refresh()},addEventHandler:function(){x.apply(null,arguments)},addFix:function(b,a){this.parser.add(b,a)},addRecalc:function(g,f,d,c){g=g.source||g;f=new RegExp("([{;\\s])"+g+"\\s*:\\s*"+f+"[^;}]*");var b=this.recalcs.length;if(typeof c=="string")c=g+":"+c;this.addFix(f,function(a){if(typeof c=="function")c=c(a);return(c?c:a)+";ie7-"+a.slice(1)+";ie7_recalc"+b+":1"});this.recalcs.push(arguments);return b},apply:function(){this.getInlineCSS();new bW("screen");this.trash()},createStyleSheet:function(){r.getElementsByTagName("head")[0].appendChild(r.createElement("style"));this.styleSheet=G[G.length-1];this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7=true;this.styleSheet.cssText=X},getInlineCSS:function(){var c=r.getElementsByTagName("style"),b;for(var a=c.length-1;b=c[a];a--){if(!b.disabled&&!b.ie7){b._6=b.innerHTML}}},getText:function(c,b){try{var a=c.cssText}catch(e){a=""}if(Q)a=cl(c.href,b)||a;return a},recalc:function(){this.screen.recalc();var o=/ie7_recalc\d+/g,m=X.match(/[{,]/g).length,n=this.styleSheet.rules,j,k,l,i,g,f,d,c,b;for(f=m;j=n[f];f++){var a=j.style.cssText;if(k=a.match(o)){i=H(j.selectorText);if(i.length)for(d=0;d<k.length;d++){b=k[d];l=h.CSS.recalcs[b.slice(10)][2];for(c=0;(g=i[c]);c++){if(g.currentStyle[b])l(g,a)}}}}},refresh:function(){this.styleSheet.cssText=X+this.screen+this.print},trash:function(){for(var b=0;b<G.length;b++){if(!G[b].ie7){try{var a=G[b].cssText}catch(e){a=""}if(a)G[b].cssText=""}}}}));var bW=D.extend({constructor:function(a){this.media=a;this.load();h.CSS[a]=this;h.CSS.refresh()},createRule:function(c,b){var a;if(O&&(a=c.match(O.MATCH))){return new O(a[1],a[2],b)}else if(a=c.match(bc.MATCH)){if(!cI.test(a[0])||bc.COMPLEX.test(a[0])){return new bc(c,a[1],a[2],a[3],b)}}else{return new t(c,b)}return c+" {"+b+"}"},getText:function(){var u=/@media\s+([^{]+?)\s*\{([^@]+\})\s*\}/gi,U=/@import[^;\n]+/gi,P=/@import\s+url\s*\(\s*["']?|["']?\s*\)\s*/gi,V=/(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi,I=this,J={};function y(j,k,l,i){var g="";if(!i){l=o(j.media);i=0}if(l==="none"){j.disabled=true;return""}if(l==="all"||l===I.media){try{var f=!!j.cssText}catch(exe){}if(i<3&&f){var d=j.cssText.match(U);for(var c=0,b;c<j.imports.length;c++){var b=j.imports[c];var a=j._2||j.href;b._2=d[c].replace(P,"");g+=y(b,bu(a,k),l,i+1)}}g+=cA(j.href?m(j,k):j.owningElement._6);g=z(g,I.media)}return g};for(var v=0;v<G.length;v++){var p=G[v];if(!p.disabled&&!p.ie7)this.cssText+=y(p)}function z(b,a){q.value=a;return b.replace(u,q)};function q(c,b,a){b=o(b);switch(b){case"screen":case"print":if(b!==q.value)return"";case"all":return a}return""};function o(c){if(!c)return"all";var b=c.toLowerCase().split(/\s*,\s*/);c="none";for(var a=0;a<b.length;a++){if(b[a]==="all")return"all";if(b[a]==="screen"){if(c==="print")return"all";c="screen"}else if(b[a]==="print"){if(c==="screen")return"all";c="print"}}return c};function m(d,c){var b=d._2||d.href,a=bi(b,c);if(J[a])return"";J[a]=d.disabled?"":n(h.CSS.getText(d,c),bu(b,c));return J[a]};function n(b,a){return b.replace(V,"$1"+a.slice(0,a.lastIndexOf("/")+1)+"$2")}},load:function(){this.cssText="";this.getText();this.parse();if(bA.length){this.cssText=cN(this.cssText)}this.cssText=ba(this.cssText);bj={}},parse:function(){var i=h.CSS.parser.parse(this.cssText),n="";this.cssText=i.replace(/@charset[^;]+;|@font\-face[^\}]+\}/g,function(a){n+=a+"\n";return""});this.declarations=ba(n);var j=h.CSS.rules.length,k=[],l;while((l=cL.exec(this.cssText))){var i=l[2];if(i){var g=s<7&&i.indexOf("AlphaImageLoader")!==-1;var f=l[1].match(cM),d;for(var c=0;d=f[c];c++){d=bP(d);var b=h.CSS.UNKNOWN.test(d);f[c]=b?this.createRule(d,i):d+"{"+i+"}";if(g)f[c]+=this.createRule(d+">*","position:relative")}k.push(f.join("\n"))}}this.cssText=k.join("\n");this.rules=h.CSS.rules.slice(j)},recalc:function(){var b,a;for(a=0;(b=this.rules[a]);a++)b.recalc()},toString:function(){return this.declarations+"@media "+this.media+"{"+this.cssText+"}"}}),O,t=h.Rule=D.extend({constructor:function(c,b){this.id=h.CSS.rules.length;this.className=t.PREFIX+this.id;var a=c.match(cJ);this.selector=(a?a[1]:c)||"*";this.selectorText=this.parse(this.selector)+(a?a[2]:"");this.cssText=b;this.MATCH=new RegExp("\\s"+this.className+"(\\s|$)","g");h.CSS.rules.push(this);this.init()},init:bh,add:function(a){a.className+=" "+this.className},recalc:function(){var b=H(this.selector);for(var a=0;a<b.length;a++)this.add(b[a])},parse:function(f){var d=f.replace(t.CHILD," ").replace(t.COMPLEX,"");if(s<7)d=d.replace(t.MULTI,"");var c=bm(d,t.TAGS).length-bm(f,t.TAGS).length,b=bm(d,t.CLASSES).length-bm(f,t.CLASSES).length+1;while(b>0&&t.CLASS.test(d)){d=d.replace(t.CLASS,"");b--}while(c>0&&t.TAG.test(d)){d=d.replace(t.TAG,"$1*");c--}d+="."+this.className;b=Math.min(b,2);c=Math.min(c,2);var a=-10*b-c;if(a>0){d=d+","+t.MAP[a]+" "+d}return d},remove:function(a){a.className=a.className.replace(this.MATCH,"$1")},toString:function(){return F("%1 {%2}",this.selectorText,this.cssText)}},{CHILD:/>/g,CLASS:/\.[\w-]+/,CLASSES:/[.:\[]/g,MULTI:/(\.[\w-]+)+/g,PREFIX:"ie7_class",TAG:/^\w+|([\s>+~])\w+/,TAGS:/^\w|[\s>+~]\w/g,MAP:{"1":"html","2":"html body","10":".ie7_html","11":"html.ie7_html","12":"html.ie7_html body","20":".ie7_html .ie7_body","21":"html.ie7_html .ie7_body","22":"html.ie7_html body.ie7_body"}}),bc=t.extend({constructor:function(f,d,c,b,a){this.negated=c.indexOf("not")===0;if(this.negated)c=c.slice(5,-1);this.attach=d||"*";this.dynamicPseudoClass=h.CSS.dynamicPseudoClasses[c];this.target=b;this.base(f,a)},recalc:function(){var d=H(this.attach),c;for(var b=0;c=d[b];b++){var a=this.target?H(this.target,c):[c];if(a.length)this.dynamicPseudoClass.apply(c,a,this)}}}),bB=D.extend({constructor:function(b,a){this.name=b;this.apply=a;this.instances={};h.CSS.dynamicPseudoClasses[b]=this},register:function(f,d){var c=f[2];if(!d&&c.negated){this.unregister(f,true)}else{f.id=c.id+f[0].uniqueID;if(!this.instances[f.id]){var b=f[1],a;for(a=0;a<b.length;a++)c.add(b[a]);this.instances[f.id]=f}}},unregister:function(f,d){var c=f[2];if(!d&&c.negated){this.register(f,true)}else{if(this.instances[f.id]){var b=f[1],a;for(a=0;a<b.length;a++)c.remove(b[a]);delete this.instances[f.id]}}}}),bp=new bB("hover",function(b){var a=arguments;h.CSS.addEventHandler(b,"onmouseenter",function(){bp.register(a)});h.CSS.addEventHandler(b,"onmouseleave",function(){bp.unregister(a)})});x(r,"onmouseup",function(){var b=bp.instances;for(var a in b)if(!b[a][0].contains(event.srcElement))bp.unregister(b[a])});var cc={"=":"%1==='%2'","~=":"(' '+%1+' ').indexOf(' %2 ')!==-1","|=":"%1==='%2'||%1.indexOf('%2-')===0","^=":"%1.indexOf('%2')===0","$=":"%1.slice(-'%2'.length)==='%2'","*=":"%1.indexOf('%2')!==-1"};cc[""]="%1!=null";var bd={"<#attr>":function(f,d,c,b){var a="IE7._0(e,'"+d+"')";b=bn(b);if(c.length>1){if(!b||c==="~="&&cK.test(b)){return"false&&"}a="("+a+"||'')"}return"("+F(cc[c],a,b)+")&&"},"<#id>":cH+"==='$1'&&","<#class>":"e.className&&(' '+e.className+' ').indexOf(' $1 ')!==-1&&",":first-child":"!"+cG+"&&",":link":"e.currentStyle['ie7-link']=='link'&&",":visited":"e.currentStyle['ie7-link']=='visited'&&"};h.HTML=new(bY.extend({fixed:{},init:bh,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var d=0;d<this.fixes.length;d++){var c=H(this.fixes[d][0]);var b=this.fixes[d][1];for(var a=0;a<c.length;a++)b(c[a])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var i=0;i<this.recalcs.length;i++){var g=H(this.recalcs[i][0]);var f=this.recalcs[i][1],d;var c=Math.pow(2,i);for(var b=0;(d=g[b]);b++){var a=d.uniqueID;if((this.fixed[a]&c)===0){d=f(d)||d;this.fixed[a]|=c}}}}}));if(s<7){r.createElement("abbr");h.HTML.addRecalc("label",function(b){if(!b.htmlFor){var a=H("input,textarea",b,true);if(a){x(b,"onclick",function(){a.click()})}}})}var be="[.\\d]";(function(){var u=h.Layout={};X+="*{boxSizing:content-box}";u.boxSizing=function(a){if(!a.currentStyle.hasLayout){a.style.height="0cm";if(a.currentStyle.verticalAlign==="auto")a.runtimeStyle.verticalAlign="top";U(a)}};function U(a){if(a!=w&&a.currentStyle.position!=="absolute"){P(a,"marginTop");P(a,"marginBottom")}};function P(f,d){if(!f.runtimeStyle[d]){var c=f.parentElement;var b=d==="marginTop";if(c&&c.currentStyle.hasLayout&&!h._1(f,b?"previous":"next"))return;var a=f[b?"firstChild":"lastChild"];if(a&&a.nodeName<"@")a=h._1(a,b?"next":"previous");if(a&&a.currentStyle.styleFloat==="none"&&a.currentStyle.hasLayout){P(a,d);margin=V(f,f.currentStyle[d]);childMargin=V(a,a.currentStyle[d]);if(margin<0||childMargin<0){f.runtimeStyle[d]=margin+childMargin}else{f.runtimeStyle[d]=Math.max(childMargin,margin)}a.runtimeStyle[d]="0px"}}};function V(b,a){return a==="auto"?0:B(b,a)};var I=/^[.\d][\w]*$/,J=/^(auto|0cm)$/,y={};u.borderBox=function(a){y.Width(a);y.Height(a)};var v=function(p){y.Width=function(a){if(!S.test(a.currentStyle.width))z(a);if(p)U(a)};function z(b,a){if(!b.runtimeStyle.fixedWidth){if(!a)a=b.currentStyle.width;b.runtimeStyle.fixedWidth=I.test(a)?Math.max(0,m(b,a))+"px":a;T(b,"width",b.runtimeStyle.fixedWidth)}};function q(b){if(!bo(b)){var a=b.offsetParent;while(a&&!a.currentStyle.hasLayout)a=a.offsetParent}return(a||w).clientWidth};function o(b,a){if(S.test(a))return parseInt(parseFloat(a)/100*q(b));return B(b,a)};var m=function(d,c){var b=d.currentStyle["ie7-box-sizing"]==="border-box",a=0;if(C&&!b)a+=n(d)+j(d,"padding");else if(!C&&b)a-=n(d)+j(d,"padding");return o(d,c)+a};function n(a){return a.offsetWidth-a.clientWidth};function j(b,a){return o(b,b.currentStyle[a+"Left"])+o(b,b.currentStyle[a+"Right"])};X+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";u.minWidth=function(a){if(a.currentStyle["min-width"]!=null){a.style.minWidth=a.currentStyle["min-width"]}if(bb(arguments.callee,a,a.currentStyle.minWidth!=="none")){u.boxSizing(a);z(a);k(a)}};eval("IE7.Layout.maxWidth="+String(u.minWidth).replace(/min/g,"max"));function k(c){if(c==r.body){var b=c.clientWidth}else{var a=c.getBoundingClientRect();b=a.right-a.left}if(c.currentStyle.minWidth!=="none"&&b<m(c,c.currentStyle.minWidth)){c.runtimeStyle.width=c.currentStyle.minWidth}else if(c.currentStyle.maxWidth!=="none"&&b>=m(c,c.currentStyle.maxWidth)){c.runtimeStyle.width=c.currentStyle.maxWidth}else{c.runtimeStyle.width=c.runtimeStyle.fixedWidth}};function l(a){if(bb(l,a,/^(fixed|absolute)$/.test(a.currentStyle.position)&&bz(a,"left")!=="auto"&&bz(a,"right")!=="auto"&&J.test(bz(a,"width")))){i(a);u.boxSizing(a)}};u.fixRight=l;function i(c){var b=o(c,c.runtimeStyle._3||c.currentStyle.left),a=q(c)-o(c,c.currentStyle.right)-b-j(c,"margin");if(parseInt(c.runtimeStyle.width)===a)return;c.runtimeStyle.width="";if(bo(c)||p||c.offsetWidth<a){if(!C)a-=n(c)+j(c,"padding");if(a<0)a=0;c.runtimeStyle.fixedWidth=a;T(c,"width",a)}};var g=0;bw(function(){if(!w)return;var f,d=(g<w.clientWidth);g=w.clientWidth;var c=u.minWidth.elements;for(f in c){var b=c[f];var a=(parseInt(b.runtimeStyle.width)===m(b,b.currentStyle.minWidth));if(d&&a)b.runtimeStyle.width="";if(d==a)k(b)}var c=u.maxWidth.elements;for(f in c){var b=c[f];var a=(parseInt(b.runtimeStyle.width)===m(b,b.currentStyle.maxWidth));if(!d&&a)b.runtimeStyle.width="";if(d!==a)k(b)}for(f in l.elements)i(l.elements[f])});if(C){h.CSS.addRecalc("width",be,y.Width)}if(s<7){h.CSS.addRecalc("max-width",be,u.maxWidth);h.CSS.addRecalc("right",be,l)}else if(s==7){if(p)h.CSS.addRecalc("height","[\\d.]+%",function(element){element.runtimeStyle.pixelHeight=parseInt(q(element)*element.currentStyle["ie7-height"].slice(0,-1)/100)})}};eval("var _7="+bU(v));v();_7(true);if(s<7){h.CSS.addRecalc("min-width",be,u.minWidth);h.CSS.addFix(/\bmin-height\s*/,"height")}})();var bC=bi("blank.gif",ck),bD="DXImageTransform.Microsoft.AlphaImageLoader",cd="progid:"+bD+"(src='%1',sizingMethod='%2')",bf,bg=[];function ce(b){if(bf.test(b.src)){var a=new Image(b.width,b.height);a.onload=function(){b.width=a.width;b.height=a.height;a=null};a.src=b.src;b.pngSrc=b.src;bq(b)}};if(s<7){h.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/,function(f,d,c,b,a){b=bn(b);return bf.test(b)?"filter:"+F(cd,b,a.indexOf("no-repeat")===-1?"scale":"crop")+";zoom:1;background"+(d||"")+":"+(c||"")+"none"+(a||""):f});h.CSS.addRecalc(/list\-style(\-image)?/,"[^};]*url",function(d){var c=d.currentStyle.listStyleImage.slice(5,-2);if(bf.test(c)){if(d.nodeName==="LI"){cf(d,c)}else if(d.nodeName==="UL"){for(var b=0,a;a=d.childNodes[b];b++){if(a.nodeName==="LI")cf(a,c)}}}});function cf(g,f){var d=g.runtimeStyle,c=g.offsetHeight,b=new Image;b.onload=function(){var a=g.currentStyle.paddingLeft;a=a==="0px"?0:B(g,a);d.paddingLeft=(a+this.width)+"px";d.marginLeft=-this.width+"px";d.listStyleType="none";d.listStyleImage="none";d.paddingTop=Math.max(c-g.offsetHeight,0)+"px";bq(g,"crop",f);g.style.zoom="100%"};b.src=f};h.HTML.addRecalc("img,input",function(a){if(a.nodeName==="INPUT"&&a.type!=="image")return;ce(a);x(a,"onpropertychange",function(){if(!bE&&event.propertyName==="src"&&a.src.indexOf(bC)===-1)ce(a)})});var bE=false;x(L,"onbeforeprint",function(){bE=true;for(var a=0;a<bg.length;a++)cO(bg[a])});x(L,"onafterprint",function(){for(var a=0;a<bg.length;a++)bq(bg[a]);bE=false})}function bq(d,c,b){var a=d.filters[bD];if(a){a.src=b||d.src;a.enabled=true}else{d.runtimeStyle.filter=F(cd,b||d.src,c||"scale");bg.push(d)}d.src=bC};function cO(a){a.src=a.pngSrc;a.filters[bD].enabled=false};(function(){if(s>=7)return;h.CSS.addRecalc("position","fixed",n,"absolute");h.CSS.addRecalc("background(-attachment)?","[^};]*fixed",o);var y=C?"body":"documentElement";function v(){if(A.currentStyle.backgroundAttachment!=="fixed"){if(A.currentStyle.backgroundImage==="none"){A.runtimeStyle.backgroundRepeat="no-repeat";A.runtimeStyle.backgroundImage="url("+bC+")"}A.runtimeStyle.backgroundAttachment="fixed"}v=bh};var p=bZ("img");function z(a){return a?bo(a)||z(a.parentElement):false};function q(c,b,a){setTimeout("document.all."+c.uniqueID+".runtimeStyle.setExpression('"+b+"','"+a+"')",0)};function o(a){if(bb(o,a,a.currentStyle.backgroundAttachment==="fixed"&&!a.contains(A))){v();i.bgLeft(a);i.bgTop(a);m(a)}};function m(b){p.src=b.currentStyle.backgroundImage.slice(5,-2);var a=b.canHaveChildren?b:b.parentElement;a.appendChild(p);i.setOffsetLeft(b);i.setOffsetTop(b);a.removeChild(p)};function n(a){if(bb(n,a,bo(a))){T(a,"position","absolute");T(a,"left",a.currentStyle.left);T(a,"top",a.currentStyle.top);v();h.Layout.fixRight(a);j(a)}};function j(c,b){r.body.getBoundingClientRect();i.positionTop(c,b);i.positionLeft(c,b,true);if(!c.runtimeStyle.autoLeft&&c.currentStyle.marginLeft==="auto"&&c.currentStyle.right!=="auto"){var a=w.clientWidth-i.getPixelWidth(c,c.currentStyle.right)-i.getPixelWidth(c,c.runtimeStyle._3)-c.clientWidth;if(c.currentStyle.marginRight==="auto")a=parseInt(a/2);if(z(c.offsetParent))c.runtimeStyle.pixelLeft+=a;else c.runtimeStyle.shiftLeft=a}if(!c.runtimeStyle.fixedWidth)i.clipWidth(c);if(!c.runtimeStyle.fixedHeight)i.clipHeight(c)};function k(){var b=o.elements;for(var a in b)m(b[a]);b=n.elements;for(a in b){j(b[a],true);j(b[a],true)}l=0};var l;bw(function(){if(!l)l=setTimeout(k,100)});var i={},g=function(f){f.bgLeft=function(a){a.style.backgroundPositionX=a.currentStyle.backgroundPositionX;if(!z(a)){q(a,"backgroundPositionX","(parseInt(runtimeStyle.offsetLeft)+document."+y+".scrollLeft)||0")}};f.setOffsetLeft=function(b){var a=z(b)?"backgroundPositionX":"offsetLeft";b.runtimeStyle[a]=f.getOffsetLeft(b,b.style.backgroundPositionX)-b.getBoundingClientRect().left-b.clientLeft+2};f.getOffsetLeft=function(b,a){switch(a){case"left":case"top":return 0;case"right":case"bottom":return w.clientWidth-p.offsetWidth;case"center":return(w.clientWidth-p.offsetWidth)/2;default:if(S.test(a)){return parseInt((w.clientWidth-p.offsetWidth)*parseFloat(a)/100)}p.style.left=a;return p.offsetLeft}};f.clipWidth=function(d){var c=d.runtimeStyle.fixWidth;d.runtimeStyle.borderRightWidth="";d.runtimeStyle.width=c?f.getPixelWidth(d,c)+"px":"";if(d.currentStyle.width!=="auto"){var b=d.getBoundingClientRect();var a=d.offsetWidth-w.clientWidth+b.left-2;if(a>=0){d.runtimeStyle.borderRightWidth="0px";a=Math.max(B(d,d.currentStyle.width)-a,0);T(d,"width",a);return a}}};f.positionLeft=function(b,a){if(!a&&S.test(b.currentStyle.width)){b.runtimeStyle.fixWidth=b.currentStyle.width}if(b.runtimeStyle.fixWidth){b.runtimeStyle.width=f.getPixelWidth(b,b.runtimeStyle.fixWidth)}b.runtimeStyle.shiftLeft=0;b.runtimeStyle._3=b.currentStyle.left;b.runtimeStyle.autoLeft=b.currentStyle.right!=="auto"&&b.currentStyle.left==="auto";b.runtimeStyle.left="";b.runtimeStyle.screenLeft=f.getScreenLeft(b);b.runtimeStyle.pixelLeft=b.runtimeStyle.screenLeft;if(!a&&!z(b.offsetParent)){q(b,"pixelLeft","runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+y+".scrollLeft")}};f.getScreenLeft=function(c){var b=c.offsetLeft,a=1;if(c.runtimeStyle.autoLeft){b=w.clientWidth-c.offsetWidth-f.getPixelWidth(c,c.currentStyle.right)}if(c.currentStyle.marginLeft!=="auto"){b-=f.getPixelWidth(c,c.currentStyle.marginLeft)}while(c=c.offsetParent){if(c.currentStyle.position!=="static")a=-1;b+=c.offsetLeft*a}return b};f.getPixelWidth=function(b,a){return S.test(a)?parseInt(parseFloat(a)/100*w.clientWidth):B(b,a)}};eval("var _8="+bU(g));g(i);_8(i)})();if(s<7){var bF={backgroundColor:"transparent",backgroundImage:"none",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",borderLeftWidth:0,borderLeftColor:"#000",borderTopColor:"#000",borderRightColor:"#000",borderBottomColor:"#000",height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};h.CSS.addRecalc("overflow","visible",function(c){if(c.currentStyle.position==="absolute")return;if(c.parentNode.ie7_wrapped)return;if(h.Layout&&c.currentStyle["max-height"]!=="auto"){h.Layout.maxHeight(c)}if(c.currentStyle.marginLeft==="auto")c.style.marginLeft=0;if(c.currentStyle.marginRight==="auto")c.style.marginRight=0;var b=r.createElement(ci);b.ie7_wrapped=c;for(var a in bF){b.style[a]=c.currentStyle[a];if(bF[a]!=null){c.runtimeStyle[a]=bF[a]}}b.style.display="block";b.style.position="relative";c.runtimeStyle.position="absolute";c.parentNode.insertBefore(b,c);b.appendChild(c)})}function cP(){var q="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var o=0;o<q.length;o++){q[q[o]]=q[o-1]||"0.67em"}h.CSS.addFix(/(font(-size)?\s*:\s*)([\w.-]+)/,function(d,c,b,a){return c+(q[a]||a)});var m=/^\-/,n=/(em|ex)$/i,j=/em$/i,k=/ex$/i;B=function(c,b){if(bX.test(b))return parseInt(b)||0;var a=m.test(b)?-1:1;if(n.test(b))a*=i(c);l.style.width=a<0?b.slice(1):b;A.appendChild(l);b=a*l.offsetWidth;l.removeNode();return parseInt(b)};var l=bZ();function i(c){var b=1;l.style.fontFamily=c.currentStyle.fontFamily;l.style.lineHeight=c.currentStyle.lineHeight;while(c!=A){var a=c.currentStyle["ie7-font-size"];if(a){if(j.test(a))b*=parseFloat(a);else if(S.test(a))b*=(parseFloat(a)/100);else if(k.test(a))b*=(parseFloat(a)/2);else{l.style.fontSize=a;return 1}}c=c.parentElement}return b};h.CSS.addFix(/cursor\s*:\s*pointer/,"cursor:hand");h.CSS.addFix(/display\s*:\s*list-item/,"display:block");function g(d){var c=d.parentElement,b=c.offsetWidth-d.offsetWidth-f(c),a=(d.currentStyle["ie7-margin"]&&d.currentStyle.marginRight==="auto")||d.currentStyle["ie7-margin-right"]==="auto";switch(c.currentStyle.textAlign){case"right":b=a?parseInt(b/2):0;d.runtimeStyle.marginRight=b+"px";break;case"center":if(a)b=0;default:if(a)b/=2;d.runtimeStyle.marginLeft=parseInt(b)+"px"}};function f(a){return B(a,a.currentStyle.paddingLeft)+B(a,a.currentStyle.paddingRight)};h.CSS.addRecalc("margin(-left|-right)?","[^};]*auto",function(a){if(bb(g,a,a.parentElement&&a.currentStyle.display==="block"&&a.currentStyle.marginLeft==="auto"&&a.currentStyle.position!=="absolute")){g(a)}});bw(function(){for(var b in g.elements){var a=g.elements[b];a.runtimeStyle.marginLeft=a.runtimeStyle.marginRight="";g(a)}})};var cQ="\\([^)]+\\)";bS.add(/::(before|after)/,":$1");if(s<8){if(h.CSS.pseudoClasses)h.CSS.pseudoClasses+="|";h.CSS.pseudoClasses+="before|after|lang"+cQ;function cN(a){return a.replace(new RegExp("([{;\\s])("+bA.join("|")+")\\s*:\\s*([^;}]+)","g"),"$1$2:$3;ie7-$2:$3")};var cR=/[\w-]+\s*:\s*inherit/g;var cS=/ie7\-|\s*:\s*inherit/g;var cT=/\-([a-z])/g;function cU(b,a){return a.toUpperCase()};h.CSS.addRecalc("[\\w-]+","inherit",function(f,d){if(f.parentElement){var c=d.match(cR);for(var b=0;b<c.length;b++){var a=c[b].replace(cS,"");if(f.currentStyle["ie7-"+a]==="inherit"){a=a.replace(cT,cU);f.runtimeStyle[a]=f.parentElement.currentStyle[a]}}}},function(a){bA.push(bO(a.slice(1).split(":")[0]));return a});var br=new bB("focus",function(b){var a=arguments;h.CSS.addEventHandler(b,"onfocus",function(){br.unregister(a);br.register(a)});h.CSS.addEventHandler(b,"onblur",function(){br.unregister(a)});if(b==r.activeElement){br.register(a)}});var bG=new bB("active",function(b){var a=arguments;h.CSS.addEventHandler(b,"onmousedown",function(){bG.register(a)})});x(r,"onmouseup",function(){var b=bG.instances;for(var a in b)bG.unregister(b[a])});var cV=/^url\s*\(\s*([^)]*)\)$/;var cW={before0:"beforeBegin",before1:"afterBegin",after0:"afterEnd",after1:"beforeEnd"};var O=h.PseudoElement=t.extend({constructor:function(i,g,f){this.position=g;var d=f.match(O.CONTENT),c,b;if(d){d=d[1];c=d.split(/\s+/);for(var a=0;(b=c[a]);a++){c[a]=/^attr/.test(b)?{attr:b.slice(5,-1)}:b.charAt(0)==="'"?bn(b):ba(b)}d=c}this.content=d;this.base(i,ba(f))},init:function(){this.match=H(this.selector);for(var b=0;b<this.match.length;b++){var a=this.match[b].runtimeStyle;if(!a[this.position])a[this.position]={cssText:""};a[this.position].cssText+=";"+this.cssText;if(this.content!=null)a[this.position].content=this.content}},create:function(m){var n=m.runtimeStyle[this.position];if(n){var j=[].concat(n.content||"");for(var k=0;k<j.length;k++){if(typeof j[k]=="object"){j[k]=m.getAttribute(j[k].attr)}}j=j.join("");var l=j.match(cV);var i="overflow:hidden;"+n.cssText.replace(/'/g,'"');var g=cW[this.position+Number(m.canHaveChildren)];var f='ie7_pseudo'+O.count++;m.insertAdjacentHTML(g,F(O.ANON,this.className,f,i,l?"":j));if(l){var d=bn(l[1]);var c=r.getElementById(f);c.src=d;bq(c,"crop");var b=m.currentStyle.styleFloat!=="none";if(c.currentStyle.display==="inline"||b){if(s<7&&b&&m.canHaveChildren){m.runtimeStyle.display="inline";m.runtimeStyle.position="relative";c.runtimeStyle.position="absolute"}c.style.display="inline-block";if(m.currentStyle.styleFloat!=="none"){c.style.pixelWidth=m.offsetWidth}var a=new Image;a.onload=function(){c.style.pixelWidth=this.width;c.style.pixelHeight=Math.max(this.height,c.offsetHeight)};a.src=d}}m.runtimeStyle[this.position]=null}},recalc:function(){if(this.content==null)return;for(var a=0;a<this.match.length;a++){this.create(this.match[a])}},toString:function(){return"."+this.className+"{display:inline}"}},{CONTENT:/content\s*:\s*([^;]*)(;|$)/,ANON:"<ie7:! class='ie7_anon %1' id=%2 style='%3'>%4</ie7:!>",MATCH:/(.*):(before|after).*/,count:0});h._getLang=function(b){var a="";while(b&&b.nodeType===1){a=b.lang||b.getAttribute("lang")||"";if(a)break;b=b.parentNode}return a};bd=Y(bd,{":lang\\(([^)]+)\\)":"((ii=IE7._getLang(e))==='$1'||ii.indexOf('$1-')===0)&&"})}var cX=/^(submit|reset|button)$/;h.HTML.addRecalc("button,input",function(b){if(b.nodeName==="BUTTON"){var a=b.outerHTML.match(/ value="([^"]*)"/i);b.runtimeStyle.value=a?a[1]:""}if(b.type==="submit"){x(b,"onclick",function(){b.runtimeStyle.clicked=true;setTimeout("document.all."+b.uniqueID+".runtimeStyle.clicked=false",1)})}});h.HTML.addRecalc("form",function(c){x(c,"onsubmit",function(){for(var b,a=0;b=c[a];a++){if(cX.test(b.type)&&!b.disabled&&!b.runtimeStyle.clicked){b.disabled=true;setTimeout("document.all."+b.uniqueID+".disabled=false",1)}else if(b.nodeName==="BUTTON"&&b.type==="submit"){setTimeout("document.all."+b.uniqueID+".value='"+b.value+"'",1);b.value=b.runtimeStyle.value}}})});h.HTML.addRecalc("img",function(a){if(a.alt&&!a.title)a.title=""});if(s<8){h.CSS.addRecalc("border-spacing",be,function(a){if(a.currentStyle.borderCollapse!=="collapse"){a.cellSpacing=B(a,a.currentStyle["ie7-border-spacing"].split(" ")[0])}});h.CSS.addRecalc("box-sizing","content-box",h.Layout.boxSizing);h.CSS.addRecalc("box-sizing","border-box",h.Layout.borderBox)}if(s<8){var cY=/^image/i;h.HTML.addRecalc("object",function(a){if(cY.test(a.type)){a.body.style.cssText="margin:0;padding:0;border:none;overflow:hidden";return a}})}var K,H=(function(){var cZ=/^[>+~]/,bs=false;function da(d,c,b){d=bP(d);if(!c)c=r;var a=c;bs=cZ.test(d);if(bs){c=c.parentNode;d="*"+d}try{return m.create(d,bs)(c,b?null:[],a)}catch(ex){return b?null:[]}};var db=/^(\\.|[' >+~#.\[\]:*(),\w-\^|$=]|[^\x00-\xa0])+$/,dp=/^(href|src)$/,cg={"class":"className","for":"htmlFor"},dq=/\sie7_\w+/g,dc=/^(action|cite|codebase|data|dynsrc|href|longdesc|lowsrc|src|usemap|url)$/i;h._0=function(d,c){if(d.getAttributeNode){var b=d.getAttributeNode(c)}c=cg[c.toLowerCase()]||c;if(!b)b=d.attributes[c];var a=b&&b.specified;if(d[c]&&typeof d[c]=="boolean")return c.toLowerCase();if((a&&dc.test(c))||(!b&&C)||c==="value"||c==="type"){return d.getAttribute(c,2)}if(c==="style")return d.style.cssText.toLowerCase()||null;return a?String(b.nodeValue):null};var ch="colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";Y(cg,cy(ch.toLowerCase().split(","),ch.split(",")));h._1=function(b,a){a+="Sibling";do{b=b[a];if(b&&b.nodeName>"@")break}while(b);return b};var dd=/(^|[, >+~])([#.:\[])/g,dr=/\)\{/g,de=/,/,ds=/^['"]/,df=/\\([\da-f]{2,2})/gi,dt=/last/i;h._9=function(d,c){var b=d.all[c]||null;if(!b||(b.nodeType&&h._0(b,"id")===c))return b;for(var a=0;a<b.length;a++){if(h._0(b[a],"id")===c)return b[a]}return null};var W=E.extend({dictionary:new cw({ident:/\-?(\\.|[_a-z]|[^\x00-\xa0])(\\.|[\w-]|[^\x00-\xa0])*/,combinator:/[\s>+~]/,operator:/[\^~|$*]?=/,nth_arg:/[+-]?\d+|[+-]?\d*n(?:\s*[+-]\s*\d+)?|even|odd/,tag:/\*|<#ident>/,id:/#(<#ident>)/,'class':/\.(<#ident>)/,pseudo:/\:([\w-]+)(?:\(([^)]+)\))?/,attr:/\[(<#ident>)(?:(<#operator>)((?:\\.|[^\[\]#.:])+))?\]/,negation:/:not\((<#tag>|<#id>|<#class>|<#attr>|<#pseudo>)\)/,sequence:/(\\.|[~*]=|\+\d|\+?\d*n\s*\+\s*\d|[^\s>+~,\*])+/,filter:/[#.:\[]<#sequence>/,selector:/[^>+~](\\.|[^,])*?/,grammar:/^(<#selector>)((,<#selector>)*)$/}),ignoreCase:true}),dg=new W({"\\\\.|[~*]\\s+=|\\+\\s+\\d":E.IGNORE,"\\[\\s+":"[","\\(\\s+":"(","\\s+\\)":")","\\s+\\]":"]","\\s*([,>+~]|<#operator>)\\s*":"$1","\\s+$":"","\\s+":" "});function dh(a){a=dg.parse(a.replace(df,"\\x$1")).replace(bv,"$1").replace(dd,"$1*$2");if(!db.test(a))bH();return a};function du(a){return a.replace(bR,di)};function di(b,a){return R[a]};var dj=/\{/g,dk=/\\{/g;function bI(a){return Array((a.replace(dk,"").match(dj)||"").length+1).join("}")};bd=new W(bd);var u=/:target/i,U=/:root/i;function P(b){var a="";if(U.test(b))a+=",R=d.documentElement";if(u.test(b))a+=",H=d.location;H=H&&H.hash.replace('#','')";if(a||b.indexOf("#")!==-1){a=",t=c.nodeType,d=t===9?c:c.ownerDocument||(c.document||c).parentWindow.document"+a}return"var ii"+a+";"};var V={" ":";while(e!=s&&(e=e.parentNode)&&e.nodeType===1){",">":".parentElement;if(e){","+":";while((e=e.previousSibling)&&!("+ca+"))continue;if(e){","~":";while((e=e.previousSibling)){"+cb},I=/\be\b/g;K=new W({"(?:(<#selector>)(<#combinator>))?(<#tag>)(<#filter>)?$":function(i,g,f,d,c){var b="";if(d!=="*"){var a=d.toUpperCase();b+="if(e.nodeName==='"+a+(a===d?"":"'||e.nodeName==='"+d)+"'){"}if(c){b+="if("+bd.parse(c).slice(0,-2)+"){"}b=b.replace(I,"e"+this.index);if(f){b+="var e=e"+(this.index++)+V[f];b=b.replace(I,"e"+this.index)}if(g){b+=this.parse(g)}return b}});var J="e0=IE7._9(d,'%1');if(e0){",y="var n=c.getElementsByTagName('%1');",v="if(r==null)return e0;r[k++]=e0;",p=1,z=new W({"^((?:<#selector>)?(?:<#combinator>))(<#tag>)(<#filter>)?$":true}),q={},o=new W({"^(<#tag>)#(<#ident>)(<#filter>)?( [^,]*)?$":function(i,g,f,d,c){var b=F(J,f),a="}";if(d){b+=K.parse(g+d);a=bI(b)}if(c){b+="s=c=e0;"+m.parse("*"+c)}else{b+=v}return b+a},"^([^#,]+)#(<#ident>)(<#filter>)?$":function(f,d,c,b){var a=F(J,c);if(d==="*"){a+=v}else{a+=K.parse(d+b)+v+"break"}return a+bI(a)},"^.*$":""}),m=new W({"<#grammar>":function(j,k,l){if(!this.groups)this.groups=[];var i=z.exec(" "+k);if(!i)bH();this.groups.push(i.slice(1));if(l){return this.parse(l.replace(de,""))}var g=this.groups,f=g[0][p];for(var b=1;i=g[b];b++){if(f!==i[p]){f="*";break}}var d="",c=v+"continue filtering;";for(var b=0;i=g[b];b++){K.index=0;if(f!=="*")i[p]="*";i=i.join("");if(i===" *"){d=c;break}else{i=K.parse(i);if(bs)i+="if(e"+K.index+"==s){";d+=i+c+bI(i)}}var a=f==="*";return(a?"var n=c.all;":F(y,f))+"filtering:while((e0=n[i++]))"+(a?cb.replace(I,"e0"):"{")+d+"}"},"^.*$":bH}),n=/\&\&(e\d+)\.nodeType===1(\)\{\s*if\(\1\.nodeName=)/g;m.create=function(c){if(!q[c]){c=dh(c);this.groups=null;K.index=0;var b=this.parse(c);this.groups=null;K.index=0;if(c.indexOf("#")!==-1){var a=o.parse(c);if(a){b="if(t===1||t===11|!c.getElementById){"+b+"}else{"+a+"}"}}b=b.replace(n,"$2");b=P(c)+ba(b);q[c]=new Function("return function(c,r,s){var i=0,k=0,e0;"+b+"return r}")()}return q[c]};return da})();function bH(){throw new SyntaxError("Invalid selector.");};h.loaded=true;(function(){try{if(!r.body)throw"continue";bt.doScroll("left")}catch(ex){setTimeout(arguments.callee,1);return}try{eval(bK.innerHTML)}catch(ex){}if(typeof IE7_PNG_SUFFIX=="object"){bf=IE7_PNG_SUFFIX}else{bf=new RegExp(bO(L.IE7_PNG_SUFFIX||"-trans.png")+"(\\?.*)?$","i")}A=r.body;w=C?A:bt;A.className+=" ie7_body";bt.className+=" ie7_html";if(C)cP();h.CSS.init();h.HTML.init();h.HTML.apply();h.CSS.apply();h.recalc()})()})(this,document);
