var Prototype={Version:"1.5.0_rc0",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div").__proto__&&document.createElement("div").__proto__!==document.createElement("form").__proto__},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(A){return A}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}if(Prototype.Browser.WebKit){Prototype.BrowserFeatures.XPath=false}var Class={create:function(){var E=null,D=$A(arguments);if(Object.isFunction(D[0])){E=D.shift()}function A(){this.initialize.apply(this,arguments)}Object.extend(A,Class.Methods);A.superclass=E;A.subclasses=[];if(E){var B=function(){};B.prototype=E.prototype;A.prototype=new B;E.subclasses.push(A)}for(var C=0;C<D.length;C++){A.addMethods(D[C])}if(!A.prototype.initialize){A.prototype.initialize=Prototype.emptyFunction}A.prototype.constructor=A;return A}};Class.Methods={addMethods:function(G){var C=this.superclass&&this.superclass.prototype;var B=Object.keys(G);if(!Object.keys({toString:true}).length){B.push("toString","valueOf")}for(var A=0,D=B.length;A<D;A++){var F=B[A],E=G[F];if(C&&Object.isFunction(E)&&E.argumentNames().first()=="$super"){var H=E,E=Object.extend((function(I){return function(){return C[I].apply(this,arguments)}})(F).wrap(H),{valueOf:function(){return H},toString:function(){return H.toString()}})}this.prototype[F]=E}return this}};var Abstract=new Object();Object.extend=function(A,C){for(var B in C){A[B]=C[B]}return A};Object.extend(Object,{inspect:function(A){try{if(A===undefined){return"undefined"}if(A===null){return"null"}return A.inspect?A.inspect():A.toString()}catch(B){if(B instanceof RangeError){return"..."}throw B}},toJSON:function(A){var C=typeof A;switch(C){case"undefined":case"function":case"unknown":return ;case"boolean":return A.toString()}if(A===null){return"null"}if(A.toJSON){return A.toJSON()}if(Object.isElement(A)){return }var B=[];for(var E in A){var D=Object.toJSON(A[E]);if(D!==undefined){B.push(E.toJSON()+": "+D)}}return"{"+B.join(", ")+"}"},toQueryString:function(A){return $H(A).toQueryString()},toHTML:function(A){return A&&A.toHTML?A.toHTML():String.interpret(A)},keys:function(A){var B=[];for(var C in A){B.push(C)}return B},values:function(B){var A=[];for(var C in B){A.push(B[C])}return A},clone:function(A){return Object.extend({},A)},isElement:function(A){return A&&A.nodeType==1},isArray:function(A){return A&&A.constructor===Array},isHash:function(A){return A instanceof Hash},isFunction:function(A){return typeof A=="function"},isString:function(A){return typeof A=="string"},isNumber:function(A){return typeof A=="number"},isUndefined:function(A){return typeof A=="undefined"}});Object.inspect=function(A){try{if(A==undefined){return"undefined"}if(A==null){return"null"}return A.inspect?A.inspect():A.toString()}catch(B){if(B instanceof RangeError){return"..."}throw B}};Object.extend(Function.prototype,{argumentNames:function(){var A=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return A.length==1&&!A[0]?[]:A},bind:function(){if(arguments.length<2&&arguments[0]===undefined){return this}var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}},bindAsEventListener:function(){var A=this,C=$A(arguments),B=C.shift();return function(D){return A.apply(B,[D||window.event].concat(C))}},bindAsEventListenerWithArgs:function(C){var A=this;var B=arguments;return function(D){return A.call(C,D||window.event,B)}},curry:function(){if(!arguments.length){return this}var A=this,B=$A(arguments);return function(){return A.apply(this,B.concat($A(arguments)))}},delay:function(){var A=this,B=$A(arguments),C=B.shift()*1000;return window.setTimeout(function(){return A.apply(A,B)},C)},wrap:function(B){var A=this;return function(){return B.apply(this,[A.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var A=this;return this._methodized=function(){return A.apply(null,[this].concat($A(arguments)))}}});Function.prototype.defer=Function.prototype.delay.curry(0.01);Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};Object.extend(Number.prototype,{toColorPart:function(){var A=this.toString(16);if(this<16){return"0"+A}return A},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this}});var Try={these:function(){var C;for(var B=0;B<arguments.length;B++){var A=arguments[B];try{C=A();break}catch(D){}}return C}};Object.extend(String,{interpret:function(A){return A==null?"":String(A)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(E,C){var A="",D=this,B;C=arguments.callee.prepareReplacement(C);while(D.length>0){if(B=D.match(E)){A+=D.slice(0,B.index);A+=String.interpret(C(B));D=D.slice(B.index+B[0].length)}else{A+=D,D=""}}return A},sub:function(C,A,B){A=this.gsub.prepareReplacement(A);B=B===undefined?1:B;return this.gsub(C,function(D){if(--B<0){return D[0]}return A(D)})},scan:function(B,A){this.gsub(B,A);return String(this)},truncate:function(B,A){B=B||30;A=A===undefined?"...":A;return this.length>B?this.slice(0,B-A.length)+A:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var B=new RegExp(Prototype.ScriptFragment,"img");var A=new RegExp(Prototype.ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var B=document.createElement("div");var A=document.createTextNode(this);B.appendChild(A);return B.innerHTML},unescapeHTML:function(){var A=new Element("div");A.innerHTML=this.stripTags();return A.childNodes[0]?(A.childNodes.length>1?$A(A.childNodes).inject("",function(B,C){return B+C.nodeValue}):A.childNodes[0].nodeValue):""},toQueryParams:function(B){var A=this.strip().match(/([^?#]*)(#.*)?$/);if(!A){return{}}return A[1].split(B||"&").inject({},function(E,F){if((F=F.split("="))[0]){var C=decodeURIComponent(F.shift());var D=F.length>1?F.join("="):F[0];if(D!=undefined){D=decodeURIComponent(D)}if(C in E){if(!Object.isArray(E[C])){E[C]=[E[C]]}E[C].push(D)}else{E[C]=D}}return E})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(A){return A<1?"":new Array(A+1).join(this)},camelize:function(){var D=this.split("-"),A=D.length;if(A==1){return D[0]}var C=this.charAt(0)=="-"?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var B=1;B<A;B++){C+=D[B].charAt(0).toUpperCase()+D[B].substring(1)}return C},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(B){var A=this.gsub(/[\x00-\x1f\\]/,function(C){var D=String.specialChar[C[0]];return D?D:"\\u00"+C[0].charCodeAt().toPaddedString(2,16)});if(B){return'"'+A.replace(/"/g,'\\"')+'"'}return"'"+A.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(A){return this.sub(A||Prototype.JSONFilter,"#{1}")},isJSON:function(){var A=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(A)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(json.isJSON()){if(!sanitize){return eval("("+json+")")}}else{return false}}catch(e){}return false},include:function(A){return this.indexOf(A)>-1},startsWith:function(A){return this.indexOf(A)===0},endsWith:function(A){var B=this.length-A.length;return B>=0&&this.lastIndexOf(A)===B},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(A,B){return new Template(this,B).evaluate(A)}});String.prototype.gsub.prepareReplacement=function(B){if(typeof B=="function"){return B}var A=new Template(B);return function(C){return A.evaluate(C)}};String.prototype.trim=function(){return this.replace(/[\s]+/,"")};String.prototype.parseQuery=String.prototype.toQueryParams;var Template=Class.create({initialize:function(A,B){this.template=A.toString();this.pattern=B||Template.Pattern},evaluate:function(A){if(Object.isFunction(A.toTemplateReplacements)){A=A.toTemplateReplacements()}return this.template.gsub(this.pattern,function(D){if(A==null){return""}var F=D[1]||"";if(F=="\\"){return D[2]}var B=A,G=D[3];var E=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/,D=E.exec(G);if(D==null){return F}while(D!=null){var C=D[1].startsWith("[")?D[2].gsub("\\\\]","]"):D[1];B=B[C];if(null==B||""==D[3]){break}G=G.substring("["==D[3]?D[1].length:D[0].length);D=E.exec(G)}return F+String.interpret(B)}.bind(this))}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break=new Object();var $continue=new Object();var Enumerable={each:function(B){var A=0;try{this._each(function(D){try{B(D,A++)}catch(E){if(E!=$continue){throw E}}})}catch(C){if(C!=$break){throw C}}},all:function(B){var A=true;this.each(function(D,C){A=A&&!!(B||Prototype.K)(D,C);if(!A){throw $break}});return A},any:function(B){var A=true;this.each(function(D,C){if(A=!!(B||Prototype.K)(D,C)){throw $break}});return A},collect:function(B){var A=[];this.each(function(D,C){A.push(B(D,C))});return A},detect:function(B){var A;this.each(function(D,C){if(B(D,C)){A=D;throw $break}});return A},findAll:function(B){var A=[];this.each(function(D,C){if(B(D,C)){A.push(D)}});return A},grep:function(C,B){var A=[];this.each(function(F,E){var D=F.toString();if(D.match(C)){A.push((B||Prototype.K)(F,E))}});return A},include:function(A){var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inject:function(A,B){this.each(function(D,C){A=B(A,D,C)});return A},invoke:function(B){var A=$A(arguments).slice(1);return this.collect(function(C){return C[B].apply(C,A)})},max:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(A==undefined||D>=A){A=D}});return A},min:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(A==undefined||D<A){A=D}});return A},partition:function(C){var B=[],A=[];this.each(function(E,D){((C||Prototype.K)(E,D)?B:A).push(E)});return[B,A]},pluck:function(B){var A=[];this.each(function(D,C){A.push(D[B])});return A},reject:function(B){var A=[];this.each(function(D,C){if(!B(D,C)){A.push(D)}});return A},sortBy:function(A){return this.collect(function(C,B){return{value:C,criteria:A(C,B)}}).sort(function(E,D){var C=E.criteria,B=D.criteria;return C<B?-1:C>B?1:0}).pluck("value")},toArray:function(){return this.collect(Prototype.K)},zip:function(){var B=Prototype.K,A=$A(arguments);if(typeof A.last()=="function"){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){return B(C.pluck(D))})},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});function $A(C){if(!C){return[]}if(!(Object.isFunction(C)&&C=="[object NodeList]")&&C.toArray){return C.toArray()}var B=C.length,A=new Array(B);while(B--){A[B]=C[B]}return A}Array.from=$A;Array.prototype.normalize=function(D){var A=0;var C=D/this.inject(0,function(E,F){return E+F});C=parseFloat(C);for(var B=0;B<this.length-1;B++){A+=(this[B]*=C)}this[this.length-1]=D-A};Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(B){for(var A=0;A<this.length;A++){B(this[A])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(A){return A!=undefined||A!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(A&&A.constructor==Array?A.flatten():[A])})},without:function(){var A=$A(arguments);return this.select(function(B){return !A.include(B)})},indexOf:function(A){for(var B=0;B<this.length;B++){if(this[B]==A){return B}}return -1},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});function $w(A){if(!Object.isString(A)){return[]}A=A.strip();return A?A.split(/\s+/):[]}function $H(A){return new Hash(A)}var Hash=Class.create(Enumerable,(function(){if(function(){var C=0,E=function(F){this.key=F};E.prototype.key="foo";for(var D in new E("bar")){C++}return C>1}()){function B(E){var C=[];for(var D in this._object){var F=this._object[D];if(C.include(D)){continue}C.push(D);var G=[D,F];G.key=D;G.value=F;E(G)}}}else{function B(D){for(var C in this._object){var E=this._object[C],F=[C,E];F.key=C;F.value=E;D(F)}}}function A(C,D){if(Object.isUndefined(D)){return C}return C+"="+encodeURIComponent(String.interpret(D))}return{initialize:function(C){this._object=Object.isHash(C)?C.toObject():Object.clone(C)},_each:B,set:function(C,D){return this._object[C]=D},get:function(C){return this._object[C]},unset:function(C){var D=this._object[C];delete this._object[C];return D},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(D){var C=this.detect(function(E){return E.value===D});return C&&C.key},merge:function(C){return this.clone().update(C)},update:function(C){return new Hash(C).inject(this,function(D,E){D.set(E.key,E.value);return D})},toQueryString:function(){return this.map(function(E){var D=encodeURIComponent(E.key),C=E.value;if(C&&typeof C=="object"){if(Object.isArray(C)){return C.map(A.curry(D)).join("&")}}return A(D,C)}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(C){return C.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;while(this.include(B)){A(B);B=B.succ()}},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;do{A(B);B=B.succ()}while(this.include(B))},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(C,A,B){return new ObjectRange(C,A,B)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(E[D]&&typeof E[D]=="function"){try{E[D].apply(E,[B,C,A])}catch(F){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(A){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",parameters:""};Object.extend(this.options,A||{})},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300)},responseIsFailure:function(){return !this.responseIsSuccess()}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(B,A){this.transport=Ajax.getTransport();this.setOptions(A);this.request(B)},request:function(B){var C=this.options.parameters||"";if(C.length>0){C+="&_="}try{this.url=B;if(this.options.method=="get"&&C.length>0){this.url+=(this.url.match(/\?/)?"&":"?")+C}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10)}this.setRequestHeaders();var A=this.options.postBody?this.options.postBody:C;this.transport.send(this.options.method=="post"?A:null)}catch(D){this.dispatchException(D)}},setRequestHeaders:function(){var B=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version,"Accept","text/javascript, text/html, application/xml, text/xml, */*"];if(this.options.method=="post"){B.push("Content-type",this.options.contentType);if(this.transport.overrideMimeType){B.push("Connection","close")}}if(this.options.requestHeaders){B.push.apply(B,this.options.requestHeaders)}for(var A=0;A<B.length;A+=2){this.transport.setRequestHeader(B[A],B[A+1])}},onStateChange:function(){var A=this.transport.readyState;if(A!=1){this.respondToReadyState(this.transport.readyState)}},header:function(A){try{return this.transport.getResponseHeader(A)}catch(B){}},evalJSON:function(){try{return eval("("+this.header("X-JSON")+")")}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},respondToReadyState:function(A){var C=Ajax.Request.Events[A];var E=this.transport,B=this.evalJSON();if(C=="Complete"){try{(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(E,B)}catch(D){this.dispatchException(D)}if((this.header("Content-type")||"").match(/^text\/javascript/i)){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(E,B);Ajax.Responders.dispatch("on"+C,this,E,B)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax.Responders.dispatch("onException",this,A)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(A,C,B){this.containers={success:A.success?$(A.success):$(A),failure:A.failure?$(A.failure):(A.success?null:$(A))};this.transport=Ajax.getTransport();this.setOptions(B);var D=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(F,E){this.updateContent();D(F,E)}).bind(this);this.request(C)},updateContent:function(){var B=this.responseIsSuccess()?this.containers.success:this.containers.failure;var A=this.transport.responseText;if(!this.options.evalScripts){A=A.stripScripts()}if(B){if(this.options.insertion){new this.options.insertion(B,A)}else{Element.update(B,A)}}if(this.responseIsSuccess()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(A,C,B){this.setOptions(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;A<C;A++){D.push($(arguments[A]))}return D}if(Object.isString(B)){B=document.getElementById(B)}return Element.extend(B)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(F,A){var C=[];var E=document.evaluate(F,$(A)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var B=0,D=E.snapshotLength;B<D;B++){C.push(Element.extend(E.snapshotItem(B)))}return C}}document.getElementsByClassName=function(C,A){var B=($(A)||document.body).getElementsByTagName("*");return $A(B).inject([],function(D,E){if(E.className.match(new RegExp("(^|\\s)"+C+"(\\s|$)"))){D.push(Element.extend(E))}return D})};if(!window.Element){var Element=new Object()}(function(){var A=this.Element;this.Element=function(D,C){C=C||{};D=D.toLowerCase();var B=Element.cache;if(Prototype.Browser.IE&&C.name){D="<"+D+' name="'+C.name+'">';delete C.name;return Element.writeAttribute(document.createElement(D),C)}if(!B[D]){B[D]=Element.extend(document.createElement(D))}return Element.writeAttribute(B[D].cloneNode(false),C)};Object.extend(this.Element,A||{})}).call(window);Element.cache={};Element.Methods={visible:function(A){return $(A).style.display!="none"},toggle:function(A){A=$(A);Element[Element.visible(A)?"hide":"show"](A);return A},hide:function(A){$(A).style.display="none";return A},show:function(A){$(A).style.display="";return A},remove:function(A){A=$(A);if(A.parentNode){A.parentNode.removeChild(A)}return A},update:function(A,B){$(A).innerHTML=B.stripScripts();setTimeout(function(){B.evalScripts()},10);return A},replace:function(B,C){B=$(B);if(C&&C.toElement){C=C.toElement()}else{if(!Object.isElement(C)){C=Object.toHTML(C);var A=B.ownerDocument.createRange();A.selectNode(B);C=A.createContextualFragment(C.stripScripts())}}B.parentNode.replaceChild(C,B);return B},insert:function(C,E){C=$(C);if(Object.isString(E)||Object.isNumber(E)||Object.isElement(E)||(E&&(E.toElement||E.toHTML))){E={bottom:E}}var D,B,A;for(position in E){D=E[position];position=position.toLowerCase();B=Element._insertionTranslations[position];if(D&&D.toElement){D=D.toElement()}if(Object.isElement(D)){B.insert(C,D);continue}D=Object.toHTML(D);A=C.ownerDocument.createRange();B.initializeRange(C,A);B.insert(C,A.createContextualFragment(D.stripScripts()))}return C},wrap:function(B,C,A){return C},inspect:function(B){B=$(B);var A="<"+B.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(F){var E=F.first(),C=F.last();var D=(B[E]||"").toString();if(D){A+=" "+C+"="+D.inspect(true)}});return A+">"},recursivelyCollect:function(A,C){A=$(A);var B=[];while(A=A[C]){if(A.nodeType==1){B.push(Element.extend(A))}}return B},ancestors:function(A){return $(A).recursivelyCollect("parentNode")},descendants:function(A){return $A($(A).getElementsByTagName("*")).each(Element.extend)},firstDescendant:function(A){A=$(A).firstChild;while(A&&A.nodeType!=1){A=A.nextSibling}return $(A)},immediateDescendants:function(A){if(!(A=$(A).firstChild)){return[]}while(A&&A.nodeType!=1){A=A.nextSibling}if(A){return[A].concat($(A).nextSiblings())}return[]},previousSiblings:function(A){return $(A).recursivelyCollect("previousSibling")},nextSiblings:function(A){return $(A).recursivelyCollect("nextSibling")},siblings:function(A){A=$(A);return A.previousSiblings().reverse().concat(A.nextSiblings())},match:function(B,A){if(Object.isString(A)){A=new Selector(A)}return A.match($(B))},select:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B,A)},adjacent:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B.parentNode,A).without(B)},identify:function(B){B=$(B);var C=B.readAttribute("id"),A=arguments.callee;if(C){return C}do{C="anonymous_element_"+A.counter++}while($(C));B.writeAttribute("id",C);return C},readAttribute:function(C,A){C=$(C);if(Prototype.Browser.IE){var B=Element._attributeTranslations.read;if(B.values[A]){return B.values[A](C,A)}if(B.names[A]){A=B.names[A]}if(A.include(":")){return(!C.attributes||!C.attributes[A])?null:C.attributes[A].value}}return C.getAttribute(A)},writeAttribute:function(E,C,F){E=$(E);var B={},D=Element._attributeTranslations.write;if(typeof C=="object"){B=C}else{B[C]=F===undefined?true:F}for(var A in B){var C=D.names[A]||A,F=B[A];if(D.values[A]){C=D.values[A](E,F)}if(F===false||F===null){E.removeAttribute(C)}else{if(F===true){E.setAttribute(C,C)}else{E.setAttribute(C,F)}}}return E},getHeight:function(A){return $(A).getDimensions().height},getWidth:function(A){return $(A).getDimensions().width},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }var C=A.className;return(C.length>0&&(C==B||new RegExp("(^|\\s)"+B+"(\\s|$)").test(C)))},addClassName:function(A,B){if(!(A=$(A))){return }if(!A.hasClassName(B)){A.className+=(A.className?" ":"")+B}return A},removeClassName:function(A,B){if(!(A=$(A))){return }A.className=A.className.replace(new RegExp("(^|\\s+)"+B+"(\\s+|$)")," ").strip();return A},toggleClassName:function(A,B){if(!(A=$(A))){return }return A[A.hasClassName(B)?"removeClassName":"addClassName"](B)},cleanWhitespace:function(B){B=$(B);var C=B.firstChild;while(C){var A=C.nextSibling;if(C.nodeType==3&&!/\S/.test(C.nodeValue)){B.removeChild(C)}C=A}return B},empty:function(A){return $(A).innerHTML.blank()},descendantOf:function(D,C){D=$(D),C=$(C);if(D.compareDocumentPosition){return(D.compareDocumentPosition(C)&8)===8}if(D.sourceIndex&&!Prototype.Browser.Opera){var E=D.sourceIndex,B=C.sourceIndex,A=C.nextSibling;if(!A){do{C=C.parentNode}while(!(A=C.nextSibling)&&C.parentNode)}if(A){return(E>B&&E<A.sourceIndex)}}while(D=D.parentNode){if(D==C){return true}}return false},scrollTo:function(A){A=$(A);var B=A.cumulativeOffset();window.scrollTo(B[0],B[1]);return A},getStyle:function(B,C){B=$(B);C=C=="float"?"cssFloat":C.camelize();var D=B.style[C];if(!D){if(document.defaultView&&document.defaultView.getComputedStyle){var A=document.defaultView.getComputedStyle(B,null);D=A?A.getPropertyValue(C):null}else{if(B.currentStyle){D=B.currentStyle[C.camelize()]}}}if(window.opera&&["left","top","right","bottom"].include(C)){if(Element.getStyle(B,"position")=="static"){D="auto"}}return D=="auto"?null:D},getOpacity:function(A){return $(A).getStyle("opacity")},setStyle:function(B,C){B=$(B);var E=B.style,A;if(Object.isString(C)){B.style.cssText+=";"+C}else{for(var D in C){if(D=="opacity"){B.setOpacity(C[D])}else{E[(D=="float"||D=="cssFloat")?(E.styleFloat===undefined?"cssFloat":"styleFloat"):D]=C[D]}}}return B},setValue:function(A,B){A=$(A);A.value=B;return A},setOpacity:function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;return A},getDimensions:function(C){C=$(C);var G=$(C).getStyle("display");if(G!="none"&&G!=null){return{width:C.offsetWidth,height:C.offsetHeight}}var B=C.style;var F=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";B.position="absolute";B.display="block";var H=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=F;return{width:H,height:E}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if(window.opera){A.style.top=0;A.style.left=0}}return A},undoPositioned:function(A){A=$(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}return A},makeClipping:function(A){A=$(A);if(A._overflow){return A}A._overflow=Element.getStyle(A,"overflow")||"auto";if(A._overflow!=="hidden"){A.style.overflow="hidden"}return A},undoClipping:function(A){A=$(A);if(!A._overflow){return A}A.style.overflow=A._overflow=="auto"?"":A._overflow;A._overflow=null;return A},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return Element._returnOffset(C,A)},positionedOffset:function(B){var A=0,D=0;do{A+=B.offsetTop||0;D+=B.offsetLeft||0;B=B.offsetParent;if(B){if(B.tagName=="BODY"){break}var C=Element.getStyle(B,"position");if(C=="relative"||C=="absolute"){break}}}while(B);return Element._returnOffset(D,A)},absolutize:function(B){B=$(B);if(B.getStyle("position")=="absolute"){return }var D=B.positionedOffset();var F=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=F-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=F+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px";return B},relativize:function(A){A=$(A);if(A.getStyle("position")=="relative"){return }A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth;return A},cumulativeScrollOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return Element._returnOffset(C,A)},getOffsetParent:function(A){if(A.offsetParent){return $(A.offsetParent)}if(A==document.body){return $(A)}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return $(A)}}return $(document.body)},viewportOffset:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body&&Element.getStyle(B,"position")=="absolute"){break}}while(B=B.offsetParent);B=D;do{if(!Prototype.Browser.Opera||B.tagName=="BODY"){A-=B.scrollTop||0;C-=B.scrollLeft||0}}while(B=B.parentNode);return Element._returnOffset(C,A)},clonePosition:function(B,D){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});D=$(D);var E=D.viewportOffset();B=$(B);var F=[0,0];var C=null;if(Element.getStyle(B,"position")=="absolute"){C=B.getOffsetParent();F=C.viewportOffset()}if(C==document.body){F[0]-=document.body.offsetLeft;F[1]-=document.body.offsetTop}if(A.setLeft){B.style.left=(E[0]-F[0]+A.offsetLeft)+"px"}if(A.setTop){B.style.top=(E[1]-F[1]+A.offsetTop)+"px"}if(A.setWidth){B.style.width=D.offsetWidth+"px"}if(A.setHeight){B.style.height=D.offsetHeight+"px"}return B}};Object.extend(Element,Element.Methods);Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};if(!document.createRange||Prototype.Browser.Opera){Element.Methods.insert=function(E,G){E=$(E);if(Object.isString(G)||Object.isNumber(G)||Object.isElement(G)||(G&&(G.toElement||G.toHTML))){G={bottom:G}}var D=Element._insertionTranslations,F,B,H,C;for(B in G){F=G[B];B=B.toLowerCase();H=D[B];if(F&&F.toElement){F=F.toElement()}if(Object.isElement(F)){H.insert(E,F);continue}F=Object.toHTML(F);C=((B=="before"||B=="after")?E.parentNode:E).tagName.toUpperCase();if(D.tags[C]){var A=Element._getContentFromAnonymousElement(C,F.stripScripts());if(B=="top"||B=="after"){A.reverse()}A.each(H.insert.curry(E))}else{E.insertAdjacentHTML(H.adjacency,F.stripScripts())}F.evalScripts.bind(F).defer()}return E}}if(Prototype.Browser.Opera){Element.Methods._getStyle=Element.Methods.getStyle;Element.Methods.getStyle=function(A,B){switch(B){case"left":case"top":case"right":case"bottom":if(Element._getStyle(A,"position")=="static"){return null}default:return Element._getStyle(A,B)}};Element.Methods._readAttribute=Element.Methods.readAttribute;Element.Methods.readAttribute=function(A,B){if(B=="title"){return A.title}return Element._readAttribute(A,B)}}else{if(Prototype.Browser.IE){$w("positionedOffset getOffsetParent viewportOffset").each(function(A){Element.Methods[A]=Element.Methods[A].wrap(function(D,C){C=$(C);var B=C.getStyle("position");if(B!="static"){return D(C)}C.setStyle({position:"relative"});var E=D(C);C.setStyle({position:B});return E})});Element.Methods.getStyle=function(A,B){A=$(A);B=(B=="float"||B=="cssFloat")?"styleFloat":B.camelize();var C=A.style[B];if(!C&&A.currentStyle){C=A.currentStyle[B]}if(B=="opacity"){if(C=(A.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(C[1]){return parseFloat(C[1])/100}}return 1}if(C=="auto"){if((B=="width"||B=="height")&&(A.getStyle("display")!="none")){return A["offset"+B.capitalize()]+"px"}return null}return C};Element.Methods.setOpacity=function(B,E){function F(G){return G.replace(/alpha\([^\)]*\)/gi,"")}B=$(B);var A=B.currentStyle;if((A&&!A.hasLayout)||(!A&&B.style.zoom=="normal")){B.style.zoom=1}var D=B.getStyle("filter"),C=B.style;if(E==1||E===""){(D=F(D))?C.filter=D:C.removeAttribute("filter");return B}else{if(E<0.00001){E=0}}C.filter=F(D)+"alpha(opacity="+(E*100)+")";return B};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(A,B){return A.getAttribute(B,2)},_getAttrNode:function(A,C){var B=A.getAttributeNode(C);return B?B.value:""},_getEv:function(A,B){var B=A.getAttribute(B);return B?B.toString().slice(23,-2):null},_flag:function(A,B){return $(A).hasAttribute(B)?B:null},style:function(A){return A.style.cssText.toLowerCase()},title:function(A){return A.title}}}};Element._attributeTranslations.write={names:Object.clone(Element._attributeTranslations.read.names),values:{checked:function(A,B){A.checked=!!B},style:function(A,B){A.style.cssText=B?B:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc").each(function(A){Element._attributeTranslations.write.names[A.toLowerCase()]=A;Element._attributeTranslations.has[A.toLowerCase()]=A});(function(A){Object.extend(A,{href:A._getAttr,src:A._getAttr,type:A._getAttr,action:A._getAttrNode,disabled:A._flag,checked:A._flag,readonly:A._flag,multiple:A._flag,onload:A._getEv,onunload:A._getEv,onclick:A._getEv,ondblclick:A._getEv,onmousedown:A._getEv,onmouseup:A._getEv,onmouseover:A._getEv,onmousemove:A._getEv,onmouseout:A._getEv,onfocus:A._getEv,onblur:A._getEv,onkeypress:A._getEv,onkeydown:A._getEv,onkeyup:A._getEv,onsubmit:A._getEv,onreset:A._getEv,onselect:A._getEv,onchange:A._getEv})})(Element._attributeTranslations.read.values)}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1)?0.999999:(B==="")?"":(B<0.00001)?0:B;return A}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;if(B==1){if(A.tagName=="IMG"&&A.width){A.width++;A.width--}else{try{var D=document.createTextNode(" ");A.appendChild(D);A.removeChild(D)}catch(C){}}}return A};Element.Methods.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return Element._returnOffset(C,A)}}}}}var _nativeExtensions=false;if(!HTMLElement&&/Konqueror|Safari|KHTML/.test(navigator.userAgent)){var HTMLElement={};HTMLElement.prototype=document.createElement("div").__proto__}Element.addMethods=function(C){var I=Prototype.BrowserFeatures,D=Element.Methods.ByTag;if(!C){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var B=C;C=arguments[1]}if(!B){Object.extend(Element.Methods,C||{})}else{if(Object.isArray(B)){B.each(H)}else{H(B)}}function H(F){F=F.toUpperCase();if(!Element.Methods.ByTag[F]){Element.Methods.ByTag[F]={}}Object.extend(Element.Methods.ByTag[F],C)}function A(L,K,F){F=F||false;for(var N in L){var M=L[N];if(!Object.isFunction(M)){continue}if(!F||!(N in K)){K[N]=M.methodize()}}}function E(L){var F;var K={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(K[L]){F="HTML"+K[L]+"Element"}if(window[F]){return window[F]}F="HTML"+L+"Element";if(window[F]){return window[F]}F="HTML"+L.capitalize()+"Element";if(window[F]){return window[F]}window[F]={};window[F].prototype=document.createElement(L).__proto__;return window[F]}if(I.ElementExtensions){A(Element.Methods,HTMLElement.prototype);A(Element.Methods.Simulated,HTMLElement.prototype,true)}if(I.SpecificElementExtensions){for(var J in Element.Methods.ByTag){var G=E(J);if(Object.isUndefined(G)){continue}A(D[J],G.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};Element.Methods.ByTag={};Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var A={},B=Element.Methods.ByTag;var C=Object.extend(function(F){if(!F||F._extendedByPrototype||F.nodeType!=1||F==window){return F}var D=Object.clone(A),E=F.tagName,H,G;if(B[E]){Object.extend(D,B[E])}for(H in D){G=D[H];if(Object.isFunction(G)&&!(H in F)){F[H]=G.methodize()}}F._extendedByPrototype=Prototype.emptyFunction;return F},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(A,Element.Methods);Object.extend(A,Element.Methods.Simulated)}}});C.refresh();return C})();var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(B,C){this.element=$(B);this.content=C.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(D){var A=this.element.tagName.toLowerCase();if(A=="tbody"||A=="tr"){this.insertContent(this.contentFromAnonymousTable())}else{throw D}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){C.evalScripts()},10)},contentFromAnonymousTable:function(){var A=document.createElement("div");A.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(A.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(A){A.reverse(false).each((function(B){this.element.insertBefore(B,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(A){A.each((function(B){this.element.appendChild(B)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set(this.toArray().concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set(this.select(function(B){return B!=A}).join(" "))},toString:function(){return this.toArray().join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(A){this.params={classNames:[]};this.expression=A.toString().strip();this.parseExpression();this.compileMatcher()},parseExpression:function(){function G(H){throw"Parse error in selector: "+H}if(this.expression==""){G("empty expression")}var F=this.params,E=this.expression,B,A,D,C;while(B=E.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){F.attributes=F.attributes||[];F.attributes.push({name:B[2],operator:B[3],value:B[4]||B[5]||""});E=B[1]}if(E=="*"){return this.params.wildcard=true}while(B=E.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){A=B[1],D=B[2],C=B[3];switch(A){case"#":F.id=D;break;case".":F.classNames.push(D);break;case"":case undefined:F.tagName=D.toUpperCase();break;default:G(E.inspect())}E=C}if(E.length>0){G(E.inspect())}},buildMatchExpression:function(){var D=this.params,C=[],B;if(D.wildcard){C.push("true")}if(B=D.id){C.push("element.id == "+B.inspect())}if(B=D.tagName){C.push("element.tagName.toUpperCase() == "+B.inspect())}if((B=D.classNames).length>0){for(var A=0;A<B.length;A++){C.push("Element.hasClassName(element, "+B[A].inspect()+")")}}if(B=D.attributes){B.each(function(F){var G="element.getAttribute("+F.name.inspect()+")";var E=function(H){return G+" && "+G+".split("+H.inspect()+")"};switch(F.operator){case"=":C.push(G+" == "+F.value.inspect());break;case"~=":C.push(E(" ")+".include("+F.value.inspect()+")");break;case"|=":C.push(E("-")+".first().toUpperCase() == "+F.value.toUpperCase().inspect());break;case"!=":C.push(G+" != "+F.value.inspect());break;case"":case undefined:C.push(G+" != null");break;default:throw"Unknown operator "+F.operator+" in selector"}})}return C.join(" && ")},compileMatcher:function(){this.match=new Function("element","if (!element.tagName) return false;       return "+this.buildMatchExpression())},findElements:function(D){var C;if(C=$(this.params.id)){if(this.match(C)){if(!D||Element.childOf(C,D)){return[C]}}}D=(D||document).getElementsByTagName(this.params.tagName||"*");var B=[];for(var A=0;A<D.length;A++){if(this.match(C=D[A])){B.push(Element.extend(C))}}return B},toString:function(){return this.expression}};var Selector=Class.create({initialize:function(A){this.expression=A.strip();this.compileMatcher()},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!(/(\[[\w-]*?:|:checked)/).test(this.expression)){return this.compileXPathMatcher()}var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return }this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var E=this.expression,F=Selector.patterns,B=Selector.xpath,D,A;if(Selector._cache[E]){this.xpath=Selector._cache[E];return }this.matcher=[".//*"];while(E&&D!=E&&(/\S/).test(E)){D=E;for(var C in F){if(A=E.match(F[C])){this.matcher.push(Object.isFunction(B[C])?B[C](A):new Template(B[C]).evaluate(A));E=E.replace(A[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(A){A=A||document;if(this.xpath){return document._getElementsByXPath(this.xpath,A)}return this.matcher(A)},match:function(H){this.tokens=[];var L=this.expression,A=Selector.patterns,E=Selector.assertions;var B,D,F;while(L&&B!==L&&(/\S/).test(L)){B=L;for(var I in A){D=A[I];if(F=L.match(D)){if(E[I]){this.tokens.push([I,Object.clone(F)]);L=L.replace(F[0],"")}else{return this.findElements(document).include(H)}}}}var K=true,C,J;for(var I=0,G;G=this.tokens[I];I++){C=G[0],J=G[1];if(!Selector.assertions[C](H,J)){K=false;break}}return K},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(A){if(A[1]=="*"){return""}return"[local-name()='"+A[1].toLowerCase()+"' or local-name()='"+A[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(A){A[3]=A[5]||A[6];return new Template(Selector.xpath.operators[A[2]]).evaluate(A)},pseudo:function(A){var B=Selector.xpath.pseudos[A[1]];if(!B){return""}if(Object.isFunction(B)){return B(A)}return new Template(Selector.xpath.pseudos[A[1]]).evaluate(A)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",checked:"[@checked]",disabled:"[@disabled]",enabled:"[not(@disabled)]",not:function(B){var H=B[6],G=Selector.patterns,A=Selector.xpath,E,B,C;var F=[];while(H&&E!=H&&(/\S/).test(H)){E=H;for(var D in G){if(B=H.match(G[D])){C=Object.isFunction(A[D])?A[D](B):new Template(A[D]).evaluate(B);F.push("("+C.substring(1,C.length-1)+")");H=H.replace(B[0],"");break}}}return"[not("+F.join(" and ")+")]"},"nth-child":function(A){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",A)},"nth-last-child":function(A){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",A)},"nth-of-type":function(A){return Selector.xpath.pseudos.nth("position() ",A)},"nth-last-of-type":function(A){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",A)},"first-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-of-type"](A)},"last-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](A)},"only-of-type":function(A){var B=Selector.xpath.pseudos;return B["first-of-type"](A)+B["last-of-type"](A)},nth:function(E,C){var F,G=C[6],B;if(G=="even"){G="2n+0"}if(G=="odd"){G="2n+1"}if(F=G.match(/^(\d+)$/)){return"["+E+"= "+F[1]+"]"}if(F=G.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(F[1]=="-"){F[1]=-1}var D=F[1]?Number(F[1]):1;var A=F[2]?Number(F[2]):0;B="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(B).evaluate({fragment:E,a:D,b:A})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);   c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c);        c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(A){A[3]=(A[5]||A[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(A)},pseudo:function(A){if(A[6]){A[6]=A[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(A)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(A,B){return B[1].toUpperCase()==A.tagName.toUpperCase()},className:function(A,B){return Element.hasClassName(A,B[1])},id:function(A,B){return A.id===B[1]},attrPresence:function(A,B){return Element.hasAttribute(A,B[1])},attr:function(B,C){var A=Element.readAttribute(B,C[1]);return Selector.operators[C[2]](A,C[3])}},handlers:{concat:function(B,A){for(var C=0,D;D=A[C];C++){B.push(D)}return B},mark:function(A){for(var B=0,C;C=A[B];B++){C._counted=true}return A},unmark:function(A){for(var B=0,C;C=A[B];B++){C._counted=undefined}return A},index:function(A,D,G){A._counted=true;if(D){for(var B=A.childNodes,E=B.length-1,C=1;E>=0;E--){var F=B[E];if(F.nodeType==1&&(!G||F._counted)){F.nodeIndex=C++}}}else{for(var E=0,C=1,B=A.childNodes;F=B[E];E++){if(F.nodeType==1&&(!G||F._counted)){F.nodeIndex=C++}}}},unique:function(B){if(B.length==0){return B}var D=[],E;for(var C=0,A=B.length;C<A;C++){if(!(E=B[C])._counted){E._counted=true;D.push(Element.extend(E))}}return Selector.handlers.unmark(D)},descendant:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,E.getElementsByTagName("*"))}return B},child:function(A){var F=Selector.handlers;for(var E=0,D=[],G;G=A[E];E++){for(var B=0,C=[],H;H=G.childNodes[B];B++){if(H.nodeType==1&&H.tagName!="!"){D.push(H)}}}return D},adjacent:function(A){for(var C=0,B=[],E;E=A[C];C++){var D=this.nextElementSibling(E);if(D){B.push(D)}}return B},laterSibling:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,Element.nextSiblings(E))}return B},nextElementSibling:function(A){while(A=A.nextSibling){if(A.nodeType==1){return A}}return null},previousElementSibling:function(A){while(A=A.previousSibling){if(A.nodeType==1){return A}}return null},tagName:function(B,A,E,H){E=E.toUpperCase();var D=[],F=Selector.handlers;if(B){if(H){if(H=="descendant"){for(var C=0,G;G=B[C];C++){F.concat(D,G.getElementsByTagName(E))}return D}else{B=this[H](B)}if(E=="*"){return B}}for(var C=0,G;G=B[C];C++){if(G.tagName.toUpperCase()==E){D.push(G)}}return D}else{return A.getElementsByTagName(E)}},id:function(B,A,H,F){var G=$(H),D=Selector.handlers;if(!G){return[]}if(!B&&A==document){return[G]}if(B){if(F){if(F=="child"){for(var C=0,E;E=B[C];C++){if(G.parentNode==E){return[G]}}}else{if(F=="descendant"){for(var C=0,E;E=B[C];C++){if(Element.descendantOf(G,E)){return[G]}}}else{if(F=="adjacent"){for(var C=0,E;E=B[C];C++){if(Selector.handlers.previousElementSibling(G)==E){return[G]}}}else{B=D[F](B)}}}}for(var C=0,E;E=B[C];C++){if(E==G){return[G]}}return[]}return(G&&Element.descendantOf(G,A))?[G]:[]},className:function(B,A,C,D){if(B&&D){B=this[D](B)}return Selector.handlers.byClassName(B,A,C)},byClassName:function(C,B,F){if(!C){C=Selector.handlers.descendant([B])}var H=" "+F+" ";for(var E=0,D=[],G,A;G=C[E];E++){A=G.className;if(A.length==0){continue}if(A==F||(" "+A+" ").include(H)){D.push(G)}}return D},attrPresence:function(C,B,A){if(!C){C=B.getElementsByTagName("*")}var E=[];for(var D=0,F;F=C[D];D++){if(Element.hasAttribute(F,A)){E.push(F)}}return E},attr:function(A,H,G,I,B){if(!A){A=H.getElementsByTagName("*")}var J=Selector.operators[B],D=[];for(var E=0,C;C=A[E];E++){var F=Element.readAttribute(C,G);if(F===null){continue}if(J(F,I)){D.push(C)}}return D},pseudo:function(B,C,E,A,D){if(B&&D){B=this[D](B)}if(!B){B=A.getElementsByTagName("*")}return Selector.pseudos[C](B,E,A)}},pseudos:{"first-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.previousElementSibling(E)){continue}C.push(E)}return C},"last-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.nextElementSibling(E)){continue}C.push(E)}return C},"only-child":function(B,G,A){var E=Selector.handlers;for(var D=0,C=[],F;F=B[D];D++){if(!E.previousElementSibling(F)&&!E.nextElementSibling(F)){C.push(F)}}return C},"nth-child":function(B,C,A){return Selector.pseudos.nth(B,C,A)},"nth-last-child":function(B,C,A){return Selector.pseudos.nth(B,C,A,true)},"nth-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,false,true)},"nth-last-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,true,true)},"first-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,false,true)},"last-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,true,true)},"only-of-type":function(B,D,A){var C=Selector.pseudos;return C["last-of-type"](C["first-of-type"](B,D,A),D,A)},getIndices:function(B,A,C){if(B==0){return A>0?[A]:[]}return $R(1,C).inject([],function(D,E){if(0==(E-A)%B&&(E-A)/B>=0){D.push(E)}return D})},nth:function(A,L,N,K,C){if(A.length==0){return[]}if(L=="even"){L="2n+0"}if(L=="odd"){L="2n+1"}var J=Selector.handlers,I=[],B=[],E;J.mark(A);for(var H=0,D;D=A[H];H++){if(!D.parentNode._counted){J.index(D.parentNode,K,C);B.push(D.parentNode)}}if(L.match(/^\d+$/)){L=Number(L);for(var H=0,D;D=A[H];H++){if(D.nodeIndex==L){I.push(D)}}}else{if(E=L.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(E[1]=="-"){E[1]=-1}var O=E[1]?Number(E[1]):1;var M=E[2]?Number(E[2]):0;var P=Selector.pseudos.getIndices(O,M,A.length);for(var H=0,D,F=P.length;D=A[H];H++){for(var G=0;G<F;G++){if(D.nodeIndex==P[G]){I.push(D)}}}}}J.unmark(A);J.unmark(B);return I},empty:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.tagName=="!"||(E.firstChild&&!E.innerHTML.match(/^\s*$/))){continue}C.push(E)}return C},not:function(A,D,I){var G=Selector.handlers,J,C;var H=new Selector(D).findElements(I);G.mark(H);for(var F=0,E=[],B;B=A[F];F++){if(!B._counted){E.push(B)}}G.unmark(H);return E},enabled:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(!E.disabled){C.push(E)}}return C},disabled:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.disabled){C.push(E)}}return C},checked:function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.checked){C.push(E)}}return C}},operators:{"=":function(B,A){return B==A},"!=":function(B,A){return B!=A},"^=":function(B,A){return B.startsWith(A)},"$=":function(B,A){return B.endsWith(A)},"*=":function(B,A){return B.include(A)},"~=":function(B,A){return(" "+B+" ").include(" "+A+" ")},"|=":function(B,A){return("-"+B.toUpperCase()+"-").include("-"+A.toUpperCase()+"-")}},matchElements:function(F,G){var E=new Selector(G).findElements(),D=Selector.handlers;D.mark(E);for(var C=0,B=[],A;A=F[C];C++){if(A._counted){B.push(A)}}D.unmark(E);return B},findElement:function(B,C,A){if(Object.isNumber(C)){A=C;C=false}return Selector.matchElements(B,C||"*")[A||0]},findChildElements:function(E,G){var H=G.join(","),G=[];H.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(I){G.push(I[1].strip())});var D=[],F=Selector.handlers;for(var C=0,B=G.length,A;C<B;C++){A=new Selector(G[C].strip());F.concat(D,A.findElements(E))}return(B>1)?F.unique(D):D}});function $$(){return Selector.findChildElements(document,$A(arguments))}var Field={clear:function(){for(var A=0;A<arguments.length;A++){$(arguments[A]).value=""}},focus:function(A){$(A).focus()},present:function(){for(var A=0;A<arguments.length;A++){if($(arguments[A]).value==""){return false}}return true},select:function(A){$(A).select()},activate:function(A){A=$(A);A.focus();if(A.select){A.select()}}};var Form={serialize:function(D){var E=Form.getElements($(D));var C=new Array();for(var B=0;B<E.length;B++){var A=Form.Element.serialize(E[B]);if(A){C.push(A)}}return C.join("&")},getElements:function(C){C=$(C);var D=new Array();for(var B in Form.Element.Serializers){var E=C.getElementsByTagName(B);for(var A=0;A<E.length;A++){D.push(E[A])}}return D},getInputs:function(F,C,D){F=$(F);var A=F.getElementsByTagName("input");if(!C&&!D){return A}var G=new Array();for(var E=0;E<A.length;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}G.push(B)}return G},disable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.blur();A.disabled="true"}},enable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.disabled=""}},findFirstElement:function(A){return Form.getElements(A).find(function(B){return B.type!="hidden"&&!B.disabled&&["input","select","textarea"].include(B.tagName.toLowerCase())})},focusFirstElement:function(A){Field.activate(Form.findFirstElement(A))},reset:function(A){$(A).reset()}};Form.Element={serialize:function(B){B=$(B);var D=B.tagName.toLowerCase();var C=Form.Element.Serializers[D](B);if(C){var A=encodeURIComponent(C[0]);if(A.length==0){return }if(C[1].constructor!=Array){C[1]=[C[1]]}return C[1].map(function(E){return A+"="+encodeURIComponent(E)}).join("&")}},getValue:function(A){A=$(A);var C=A.tagName.toLowerCase();var B=Form.Element.Serializers[C](A);if(B){return B[1]}}};Form.Element.Serializers={input:function(A){switch(A.type.toLowerCase()){case"submit":case"hidden":case"password":case"text":return Form.Element.Serializers.textarea(A);case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A)}return false},inputSelector:function(A){if(A.checked){return[A.name,A.value]}},textarea:function(A){return[A.name,A.value]},select:function(A){return Form.Element.Serializers[A.type=="select-one"?"selectOne":"selectMany"](A)},selectOne:function(C){var D="",B,A=C.selectedIndex;if(A>=0){B=C.options[A];D=B.value||B.text}return[C.name,D]},selectMany:function(C){var D=[];for(var B=0;B<C.length;B++){var A=C.options[B];if(A.selected){D.push(A.value||A.text)}}return[C.name,D]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(A,B,C){this.frequency=B;this.element=$(A);this.callback=C;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(A,B){this.element=$(A);this.callback=B;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){var B=Form.getElements(this.element);for(var A=0;A<B.length;A++){this.registerCallback(B[A])}},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;case"password":case"text":case"textarea":case"select-one":case"select-multiple":Event.observe(A,"change",this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(A){return A.target||A.srcElement},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},pointerX:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(A){if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},findElement:function(C,B){var A=Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},observers:false,_observeAndCache:function(D,C,B,A){if(!this.observers){this.observers=[]}if(D.addEventListener){this.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){this.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0;A<Event.observers.length;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.attachEvent)){C="keydown"}this._observeAndCache(D,C,B,A)},stopObserving:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.detachEvent)){C="keydown"}if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){D.detachEvent("on"+C,B)}}},fire:function(C,B,A){C=$(C);if(C==document&&document.createEvent&&!C.dispatchEvent){C=document.documentElement}if(document.createEvent){var D=document.createEvent("HTMLEvents");D.initEvent("dataavailable",true,true)}else{var D=document.createEventObject();D.eventType="ondataavailable"}D.eventName=B;D.memo=A||{};if(document.createEvent){C.dispatchEvent(D)}else{C.fireEvent(D.eventType,D)}return D}});if(navigator.appVersion.match(/\bMSIE\b/)){Event.observe(window,"unload",Event.unloadCache,false)}var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return[C,A]},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return[C,A]},positionedOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent;if(B){p=Element.getStyle(B,"position");if(p=="relative"||p=="absolute"){break}}}while(B);return[C,A]},offsetParent:function(A){if(A.offsetParent){return A.offsetParent}if(A==document.body){return A}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return A}}return document.body},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=this.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=this.realOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=this.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},clone:function(B,C){B=$(B);C=$(C);C.style.position="absolute";var A=this.cumulativeOffset(B);C.style.top=A[1]+"px";C.style.left=A[0]+"px";C.style.width=B.offsetWidth+"px";C.style.height=B.offsetHeight+"px"},page:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}}while(B=B.offsetParent);B=D;do{A-=B.scrollTop||0;C-=B.scrollLeft||0}while(B=B.parentNode);return[C,A]},clone:function(C,E){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});C=$(C);var D=Position.page(C);E=$(E);var F=[0,0];var B=null;if(Element.getStyle(E,"position")=="absolute"){B=Position.offsetParent(E);F=Position.page(B)}if(B==document.body){F[0]-=document.body.offsetLeft;F[1]-=document.body.offsetTop}if(A.setLeft){E.style.left=(D[0]-F[0]+A.offsetLeft)+"px"}if(A.setTop){E.style.top=(D[1]-F[1]+A.offsetTop)+"px"}if(A.setWidth){E.style.width=C.offsetWidth+"px"}if(A.setHeight){E.style.height=C.offsetHeight+"px"}},absolutize:function(B){B=$(B);if(B.style.position=="absolute"){return }Position.prepare();var D=Position.positionedOffset(B);var F=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=F-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=F+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px"},relativize:function(A){A=$(A);if(A.style.position=="relative"){return }Position.prepare();A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return[C,A]}}Element.addMethods();function $merge(){var C={};for(var B=0;B<arguments.length;B++){for(var E in arguments[B]){var A=arguments[B][E];var D=C[E];if(D&&$type(A)=="object"&&$type(D)=="object"){C[E]=$merge(D,A)}else{C[E]=A}}}return C}Class.Merge=function(C,D){if(C&&C!=D){var B=$type(D);if(B!=$type(C)){return D}switch(B){case"function":var A=function(){this.parent=arguments.callee.parent;return D.apply(this,arguments)};A.parent=C;return A;case"object":return $merge(C,D)}}return D};Object.extend(Event,{_domReady:function(){if(arguments.callee.done){return }arguments.callee.done=true;if(this._timer){clearInterval(this._timer)}this._readyCallbacks.each(function(A){A()});this._readyCallbacks=null},onDOMReady:function(f){if(!this._readyCallbacks){var domReady=this._domReady.bind(this);if(document.addEventListener){document.addEventListener("DOMContentLoaded",domReady,false);
/*@cc_on @*/
/*@if (@_win32)
            document.write("<script id=__onDOMContentLoaded defer src=javascript:void(0)><\/script>");
            $("__onDOMContentLoaded").onreadystatechange = function() {
                if (this.readyState == "complete" ||this.readyState == "loaded"){domReady()}; 
            };
        /*@end @*/
}if(/WebKit/i.test(navigator.userAgent)){this._timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){domReady()}},10)}Event.observe(window,"load",domReady);Event._readyCallbacks=[]}Event._readyCallbacks.push(f)}});addDOMLoadEvent=(function(){var e=[],t,s,n,i,o,d=document,w=window,r="readyState",c="onreadystatechange",x=function(){n=1;clearInterval(t);while(i=e.shift()){i()}if(s){s[c]=""}};return function(f){if(n){return f()}if(!e[0]){d.addEventListener&&d.addEventListener("DOMContentLoaded",x,false);
/*@cc_on@*/
/*@if(@_win32)d.write("<script id=__ie_onload defer src=//0><\/scr"+"ipt>");s=d.getElementById("__ie_onload");s[c]=function(){s[r]=="complete"&&x()};/*@end@*/
if(/WebKit/i.test(navigator.userAgent)){t=setInterval(function(){/loaded|complete/.test(d[r])&&x()},10)}o=w.onload;w.onload=function(){x();o&&o()}}e.push(f)}})();var App=new Array();var Cookie=new Object();Cookie.get=function(C){var D=document.cookie.indexOf(C+"=");var A=D+C.length+1;if((!D)&&(C!=document.cookie.substring(0,C.length))){return null}if(D==-1){return null}var B=document.cookie.indexOf(";",A);if(B==-1){B=document.cookie.length}return unescape(document.cookie.substring(A,B))};Cookie.set=function(B,C){var A=new Date();A.setTime(A.getTime());var D=new Date(A.getTime()+63072000000);document.cookie=B+"="+escape(C)+";expires="+D.toGMTString()};Cookie.remove=function(A){if(getCookie(A)){document.cookie=A+"=;expires=Thu, 01-Jan-1970 00:00:01 GMT"}};App.config=Class.create();App.config.prototype={initialize:function(file,mainObj,pVal){this.obj=mainObj;this.AFA="Your browser does not support the enhanced functionality of this website, and therefore you will have an experience that differs from the intended one.\n";if(file.indexOf("?")==-1){file+="?"}else{file+="&"}this.requestFile=file+"tkn="+Cookie.get("spuc");if(isLogin){this.requestFile+="&ucid="+isLogin.id}this.method="POST";this.URLString="";this.encodeURIString=true;this.execute=false;if(typeof (pVal)=="undefined"||pVal==""){this.postVal=""}else{this.postVal=pVal}this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.stop=function(){this.onCompletion=function(){}};this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(err){this.xmlhttp=null}}if(!this.xmlhttp&&typeof XMLHttpRequest!="undefined"){this.xmlhttp=new XMLHttpRequest()}if(!this.xmlhttp){this.failed=true}};this.setVar=function(name,value){if(this.URLString.length<3){this.URLString=name+"="+value}else{this.URLString+="&"+name+"="+value}};this.encVar=function(name,value){var varString=encodeURIComponent(name)+"="+encodeURIComponent(value);return varString};this.encodeURLString=function(string){varArray=string.split("&");for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(urlVars[0].indexOf("amp;")!=-1){urlVars[0]=urlVars[0].substring(4)}varArray[i]=this.encVar(urlVars[0],urlVars[1])}return varArray.join("&")};this.runResponse=function(){eval(this.response)};this.runAJAX=function(urlstring){this.responseStatus=new Array(2);if(this.failed&&this.AFA){alert(this.AjaxFailedAlert)}else{if(urlstring){if(this.URLString.length){this.URLString=this.URLString+"&"+urlstring}else{this.URLString=urlstring}}if(this.encodeURIString){var timeval=new Date().getTime();this.URLString=this.encodeURLString(this.URLString);this.setVar("rndval",timeval)}if(this.element){this.elementObj=document.getElementById(this.element)}if(this.xmlhttp){var self=this;if(this.method=="GET"){var totalurlstring=this.requestFile+"?"+this.URLString;this.xmlhttp.open(this.method,totalurlstring,true)}else{this.xmlhttp.open(this.method,this.requestFile,true)}if(this.method=="POST"){try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(e){alert(e)}}this.xmlhttp.send(this.URLString+this.postVal);this.xmlhttp.onreadystatechange=function(){switch(self.xmlhttp.readyState){case 1:self.onLoading();break;case 2:self.onLoaded();break;case 3:self.onInteractive();break;case 4:self.response=self.xmlhttp.responseText;self.responseXML=self.xmlhttp.responseXML;self.responseStatus[0]=self.xmlhttp.status;self.responseStatus[1]=self.xmlhttp.statusText;self.onCompletion();if(self.execute){self.runResponse()}if(self.elementObj){var elemNodeName=self.elementObj.nodeName;elemNodeName.toLowerCase();if(elemNodeName=="input"||elemNodeName=="select"||elemNodeName=="option"||elemNodeName=="textarea"){self.elementObj.value=self.response}else{self.elementObj.innerHTML=self.response}}self.URLString="";break}}}}};this.createAJAX()}};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.getDocumentWidth=function(){return(document.documentElement&&document.documentElement.scrollWidth)||document.body.scrollWidth};this.getDocumentHeight=function(){return(document.documentElement&&document.documentElement.scrollHeight)||document.body.scrollHeight};this.getClientWidth=function(){return(window.innerWidth||(document.documentElement&&document.documentElement.clientWidth)||(document.body&&document.body.clientWidth)||0)};this.getClientHeight=function(){return(window.innerHeight||(document.documentElement&&document.documentElement.clientHeight)||(document.body&&document.body.clientHeight)||0)};this.getScrollTop=function(){return(document.documentElement&&document.documentElement.scrollTop)||(document.body&&document.body.scrollTop)||0};this.getScrollLeft=function(){return(document.documentElement&&document.documentElement.scrollLeft)||(document.body&&document.body.scrollLeft)||0}},searchString:function(D){for(var A=0;A<D.length;A++){var B=D[A].string;var C=D[A].prop;this.versionSearchString=D[A].versionSearch||D[A].identity;if(B){if(B.indexOf(D[A].subString)!=-1){return D[A].identity}}else{if(C){return D[A].identity}}}},searchVersion:function(B){var A=B.indexOf(this.versionSearchString);if(A==-1){return }return parseFloat(B.substring(A+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{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"}]};BrowserDetect.init();if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}function closeIT(){$("divForRssReadUnRead").style.display="none";$("gadgetArea").style.display="block"}App.columns={"1":[{length:"0",Boxes:""}],"2":[{length:"0",Boxes:""}],"3":[{length:"0",Boxes:""}],"4":[{length:"0",Boxes:""}]};App.Column=Class.create();App.Column.prototype={initialize:function(){App.Column.maxColumn=4;this.columns=[];this.options={enableResize:true,minWidth:190};for(var A=0;A<App.Column.maxColumn;A++){this.createColumns()}},createColumns:function(){var B=this.columns.length+1;var D=new Element("div",{"class":"column"+(this.options.enableResize?" resizable":""),id:"column"+B}).setStyle({minHeight:"1px"});$("columns").appendChild(D);this.columns.push(D);if(this.options.enableResize&&B<App.Column.maxColumn){var A=this;var C=new Element("div",{id:"columnDivider"+B,"class":"columnDivider"});$("columns").appendChild(C);Element.hide(C)}}};function findPosY(A){if(!A){return 0}var B=Position.cumulativeOffset(A);return B[1]}function findPosX(A){if(!A){return 0}var B=Position.cumulativeOffset(A);return B[0]}App.tabsAgent=Class.create();App.tabsAgent.prototype={initialize:function(){this.bi=0},loadJS:function(C,B,A){this.eve=C;this.tabObj=A;if(!B){init.newScript("Javascript/tabsExtend.js","xyz")}else{this.tabObj.tabSettingsLoaded=true;this.tabObj.tabSettings1(this.eve)}},makeCall:function(){this.tabObj.tabSettingsLoaded=true;this.tabObj.tabSettings1(this.eve)}};var tabsAgentVar=new App.tabsAgent();var tab_mouse_x,tab_mouse_y,tab_el_x,tab_el_y;App.tabs=Class.create();App.tabs.prototype={initialize:function(G,I,A,D,B,K,L,F,C,H,J){this.PageOptionsText=_RESOURCES.PageOptionsText;this.ChangeNoOfColumnsText=_RESOURCES.ChangeNoOfColumnsText;1;this.ChangePageIconsText=_RESOURCES.ChangePageIconsText;this.UseExternalIconText=_RESOURCES.UseExternalIconText;this.RenamePageText=_RESOURCES.RenamePageText;this.ShareThisPageText=_RESOURCES.ShareThisPageText;this.PublishThisPageText=_RESOURCES.PublishThisPageText;this.DeletePageText=_RESOURCES.DeletePageText;this.RemoveIconText=_RESOURCES.RemoveIconText;this.applyText=_RESOURCES.applyText;this.noneText=_RESOURCES.noneText;this.iconNoteText=_RESOURCES.iconNoteText;this.OnMyBlogText=_RESOURCES.OnMyBlogText;this.htmlCodeNoteText=_RESOURCES.htmlCodeNoteText;this.ShareOnMyBlogText=_RESOURCES.ShareOnMyBlogText;this.CopyPasteNoteText=_RESOURCES.CopyPasteNoteText;this.SharePreConfiguredGadgetText=_RESOURCES.SharePreConfiguredGadgetText;this.SelectAllText=_RESOURCES.SelectAllText;this.BackText=_RESOURCES.BackText;this.ByInstantMessagingText=_RESOURCES.ByInstantMessagingText;this.ShareThisPageByIMText=_RESOURCES.ShareThisPageByIMText;this.CopyPasteToMessangerText=_RESOURCES.CopyPasteToMessangerText;this.addBox=H;this.tabSettingsLoaded=false;this.tabOptionCreated=false;this.adPushed=false;this.id=I;this.nc=D;this.ar=G;this.pi=B;this.pageName=A;this.defaultWidth=L;this.colWidth=F;this.collapseAll=init.convertBool(C);this.key=J;this.isDeletable=init.isPageDeletable(this.ar);var O=document.createElement("ul");O.setAttribute("tabID",B);O.id="tabUL"+G;var P=document.createElement("li");P.setAttribute("tabID",B);P.id="tab"+G;var N=document.createElement("span");N.id="innerTab"+I;N.className="innerTab";var R=document.createElement("img");R.className="icon";R.id="tabIcon"+I;var Q=document.createElement("span");Q.className="tabName";Q.innerHTML=A;N.appendChild(Q);this.tabIcon=R;this.titleSpan=Q;var E=document.createElement("span");E.className="unread";N.appendChild(E);this.unRead=E;var M=document.createElement("img");M.id="tabOption"+I;M.className="icon actions-tab-options";this.tabOption=M;P.appendChild(N);O.appendChild(P);Event.observe(O,"click",this.activeDiv.bindAsEventListener(this));$("tabPart").firstChild.appendChild(O);if(init.isPageMovable(this.ar)){P.isMovable=true}else{P.isMovable=false}this.tab=O.firstChild;this.ar=G;oldTab=this;this.rename=true;this.isActive=false;this.readCount=0;this.columnDivs={};this.columnSizes=[]},activeDiv:function(M){if(M){M.cancelBubble=true}if(reader&&reader.open==true){reader.close();return }if(!tabDrag){if(!this.isActive){if(currentTab){oldTab=currentTab;Element.remove(oldTab.tabOption);if(!currentTab.rename){currentTab.tabOption.style.display="inline";currentTab.unRead.style.display="inline";currentTab.unRead.className="unread";if(currentTab.readCount!=0){currentTab.unRead.innerHTML="("+curerntTab.readCount+")"}currentTab.tabIcon.style.display="inline";var D=$("txtTabTxt").value;currentTab.titleSpan.removeChild($("txtTabTxt"));currentTab.titleSpan.innerHTML=D;currentTab.pageName=D;currentTab.rename=true;var G="saveData.aspx?mainType=tab&sub=editHeader&value="+escape("name='"+currentTab.titleSpan.innerHTML+"'")+"&id="+currentTab.tab.getAttribute("tabID");currentTab.saveData(G)}}if(this.defaultWidth){var E=99;if(!currentTab){this.columnDivs=[];this.columnSizes=[];this.colWidth=",";var C=Math.floor(100/this.nc);var F=0;for(var K=1;K<=this.nc;K++){if(K==(this.nc)){C=E-F}F=F+C;this.colWidth=this.colWidth+(C-0.3)+"%,";this.columnDivs.push("column"+K);this.columnSizes.push(1)}this.colWidth=this.colWidth.substring(1)}else{if(this.nc!=oldTab.nc||oldTab.defaultWidth==false){this.columnDivs=[];this.columnSizes=[];this.colWidth=",";var C=Math.floor(100/this.nc);var F=0;for(var K=1;K<=this.nc;K++){if(K==(this.nc)){C=E-F}F=F+C;this.colWidth=this.colWidth+(C-0.3)+"%,";this.columnSizes.push(1);this.columnDivs.push("column"+K)}this.colWidth=this.colWidth.substring(1)}}}else{this.columnDivs=[];this.columnSizes=[];for(var K=1;K<=this.nc;K++){if(K==(this.nc)){C=E-F}F=F+C;var B=this.colWidth.split(",")[K-1];$("column"+K).style.width=B;this.columnDivs.push("column"+K);if(B.indexOf("%")>-1){this.columnSizes.push($("column"+K).offsetWidth)}else{this.columnSizes.push(B.replace("px",""))}}}this.resize();if(init.convertBool(t[0][16])){for(var K=0;K<tabs.length;K++){if(tabs[K].pi==this.pi&&!this.adPushed){adObject.getCurrentTab(this)}}}else{adObject.getCurrentTab(this)}if(!this.addBox){for(var H=0;H<t[this.ar+1].length;H++){dragableBox[bi]=new App.Box(this.ar+1,H,true);this.boxes=this.boxes+bi+",";bi++}for(var K=1;K<=4;K++){var J=App.columns[K][0].Boxes.substring(App.columns[K][0].Boxes.length-1);if(J!=","){App.columns[K][0].Boxes+=","}}this.addBox=true}init.closeTabOption();if(currentTab&&currentTab.rename==false){try{var D=$("txtTabTxt").value;currentTab.rename=true;var G="saveData.aspx?mainType=tab&sub=editHeader&value="+escape("name='"+D+"'")+"&id="+this.tab.getAttribute("tabID");currentTab.saveData(G);currentTab.titleSpan.innerHTML=D;this.pageName=D}catch(N){}}if(M){Cookie.set("spop",this.tab.getAttribute("tabID"));var G="saveData.aspx?mainType=tab&sub=changeIsActive&value="+this.tab.getAttribute("tabID")+"&id="+isLogin.id;this.saveData(G)}var A=$("columns").getElementsByTagName("div");for(var H=0;H<dragableBox.length;H++){if(dragableBox[H]&&dragableBox[H].GadgetDiv&&dragableBox[H].direct){dragableBox[H].GadgetDiv.style.display="none"}}if(!M){if(oldTab&&oldTab.eve){Event.stopObserving(oldTab.titleSpan,"click",oldTab.eve)}if(currentTab&&currentTab.eve){Event.stopObserving(currentTab.titleSpan,"click",currentTab.eve)}}else{Event.stopObserving(oldTab.titleSpan,"click",oldTab.eve)}currentTab=this;this.eve=this.renameTab.bindAsEventListener(this);Event.observe(this.titleSpan,"click",this.eve);if(this.collapseAll){var I=$("collapseExpand");I.innerHTML="Expand All";I.title="Expand All"}else{var I=$("collapseExpand");I.innerHTML=_RESOURCES.CollapseAllText;I.title=_RESOURCES.CollapseAllText}if(this.boxes!=""&&this.boxes!="undefined"){var L=this.boxes.split(",");for(var H=0;H<L.length;H++){if(L[H]==""||L[H]=="undefined"){continue}if(dragableBox[L[H]]!=""){if(!dragableBox[L[H]].loaded||!dragableBox[L[H]].GadgetDiv){continue}dragableBox[L[H]].GadgetDiv.style.display="block";if((dragableBox[L[H]].finalValue=="webnote"||dragableBox[L[H]].finalValue=="todolist"||dragableBox[L[H]].finalValue=="webclip"||dragableBox[L[H]].finalValue=="flash"||dragableBox[L[H]].finalValue=="html")&&BrowserDetect.browser!="Firefox"&&BrowserDetect.browser!="Opera"&&dragableBox[L[H]].gadget){dragableBox[L[H]].gadget.resize()}if(dragableBox[L[H]].collapse){dragableBox[L[H]].collpse()}}}}oldTab.isActive=false;this.isActive=true;this.rename=true;Element.removeClassName(oldTab.tab,"selected");Element.addClassName(this.tab,"selected");this.setGrip();this.resize();currentTab=this}}else{tabDrag=false}},changeHeader:function(C){if(C.type=="blur"||C.type=="lostfocus"){this.tabOption.style.display="inline";this.unRead.style.display="inline";this.unRead.className="unread";if(this.readCount!=0){this.unRead.innerHTML="("+this.readCount+")"}this.tabIcon.style.display="inline";var D=$("txtTabTxt").value;this.titleSpan.removeChild($("txtTabTxt"));this.titleSpan.innerHTML=D;this.rename=true;var A="saveData.aspx?mainType=tab&sub=editHeader&value="+escape("name='"+this.titleSpan.innerHTML+"'")+"&id="+this.tab.getAttribute("tabID");if(this.pageName!=D){this.pageName=D;this.saveData(A)}return false}if($("txtTabTxt")){var B=$("txtTabTxt").value.length;var E=B;if(window.ActiveXObject){$("txtTabTxt").style.width=((B*5)+20)}else{$("txtTabTxt").style.width=((B*5)+20)+"px"}if((C.keyCode==8||C.keyCode==46)&&E>35){txtHeaderWidth=txtHeaderWidth-10;this.titleSpan.style.width=txtHeaderWidth}else{if((C.keyCode>=65&&C.keyCode<=90)){this.titleSpan.style.width=txtHeaderWidth;txtHeaderWidth=txtHeaderWidth+10}}if(C.keyCode==13){if(this.readCount!=0){this.unRead.innerHTML="("+this.readCount+")"}this.unRead.className="unread";this.tabOption.style.display="inline";this.unRead.style.display="inline";this.unRead.className="unread";this.tabIcon.style.display="inline";var D=$("txtTabTxt").value;this.titleSpan.removeChild($("txtTabTxt"));this.titleSpan.innerHTML=D;this.pageName=D;var A="saveData.aspx?mainType=tab&sub=editHeader&value="+escape("name='"+this.titleSpan.innerHTML+"'")+"&id="+this.tab.getAttribute("tabID");this.saveData(A);this.rename=true}}},tabSettings:function(E){var D=$("tabOptions");E.cancelBubble=true;if(D.style.display=="none"){var C=findPosX(currentTab.tab);tab_el_x=getLeftPos(currentTab.tab)/1;tab_el_y=getTopPos(currentTab.tab)/1-document.documentElement.scrollTop;w=currentTab.tab.offsetWidth;h=currentTab.tab.offsetHeight;var B;var A;B=E.clientX-tab_mouse_x+tab_el_x;D.style.top=(findPosY(currentTab.tab)+h-4)+"px";var C=findPosX(currentTab.tab)-4;D.style.left=Math.min(C,(document.body.clientWidth-500))+"px";D.style.position="absolute";D.style.position="absolute";D.style.display="block";tabsAgentVar.loadJS(E,this.tabSettingsLoaded,this)}else{D.style.display="none"}},saveData:function(A){var B=new App.config(A);B.runAJAX()},renameTab:function(D){if(!tabDrag){if(this.rename){this.tabOption.style.display="none";this.unRead.style.display="none";this.unRead.className="";this.unRead.innerHTML="";this.tabIcon.style.display="none";var C=this.titleSpan.childNodes;for(var A=0;A<C.length;A++){if(C[A].tagName=="input"){this.titleSpan.removeChild(C[A])}}var E=document.createElement("input");E.type="text";E.maxlength="50";E.id="txtTabTxt";E.style.overflow="hidden";E.style.textAlign="left";E.setAttribute("maxlength",50);E.maxLength=50;E.value=this.titleSpan.innerHTML;E.left=findPosX(this.titleSpan)+"px";E.top=findPosY(this.titleSpan)+"px";var B=E.value.length;if(window.ActiveXObject){E.style.width=((B*5)+20)}else{E.style.width=((B*5)+20)+"px"}this.titleSpan.innerHTML="";E.select();this.titleSpan.appendChild(E);E.select();$("txtTabTxt").focus();Event.observe(E,"keypress",this.changeHeader.bindAsEventListener(this));Event.observe(E,"lostfocus",this.changeHeader.bindAsEventListener(this));Event.observe(E,"blur",this.changeHeader.bindAsEventListener(this));Event.observe(this.titleSpan,"blur",this.changeHeader.bindAsEventListener(this));Event.observe(this.titleSpan,"lostfocus",this.changeHeader.bindAsEventListener(this));this.rename=false;init.closeTabOption()}}else{tabDrag=false}},setGrip:function(){for(var A=1;A<=3;A++){$("columnDivider"+A).style.display="none"}for(var A=1;A<this.nc;A++){$("columnDivider"+A).style.display="block"}},resize:function(){if(this.nc<0){return }if(!this.columnSizes){this.columnSizes=[]}for(var A=0;A<4;A++){this.columnSizes[A]=parseInt(this.columnSizes[A],10);if(!this.columnSizes[A]){this.columnSizes[A]=1}if((A+1)>this.nc){this.columnSizes[A]=0}}var D=this.columnSizes.slice();if($("leftNav")&&$("leftNav").style.display!="none"){var C=$("columns").offsetWidth;if(parseInt(this.nc)==4||C<960){D.normalize(82)}else{D.normalize(82.77)}}else{D.normalize((this.nc==4||BrowserDetect.getClientWidth()<900)?(BrowserDetect.browser=="Opera")?97.5:97:(BrowserDetect.browser=="Opera")?98.9:98)}for(var A=0,B;B=this.columnDivs[A];A++){if(D[A]<=0.01){D[A]=0}$(B).setStyle({width:D[A]+"%"})}}};function editValue(D,B){var C="";switch(B){case"websearch":case"imagesearch":case"blogsearch":case"videosearch":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table align=center width="100%"><tr><td><label onClick="dragableBox['+D+'].setControlFocus(this);">Title :</label></td><td><input name="title'+D+'" id="title'+D+'" type=text /></td></tr><tr><td><label onClick="dragableBox['+D+'].setControlFocus(this);">Module Size :</label></td><td><select onChange="dragableBox['+D+'].gadget.changeSize(this.value,event)" style="z-index:0;" name="moduleSize'+D+'" id="moduleSize'+D+'"><option value="small">Small</option><option value="medium">Medium</option><option value="big">Big</option></select></td></tr><tr><td><label onClick="dragableBox['+D+'].setControlFocus(this);">No. of Tabs :</label></td><td><select style="z-index:0;" onChange="dragableBox['+D+'].gadget.changeNoTabs(this.value,event)" name="noOfTabs'+D+'" id="noOfTabs'+D+'">';for(var A=1;A<=12;A++){C+='<option value="'+A+'">'+A+"</option>"}C+='</select></td></tr><tr><td><label onClick="dragableBox['+D+'].setControlFocus(this);">Keep Last Search :</label></td><td><input type="checkbox" name="isLastSearch'+D+'" id="isLastSearch'+D+'" onClick="dragableBox['+D+'].gadget.keepLastSearch(event);"></td></tr><tr><td colspan=2><input type="button" class="buttonClean" value="'+_RESOURCES.OkText+'" name="submit'+D+'" id="submit'+D+'" onClick="dragableBox['+D+'].saveAll()"></td></tr></table></form>';break;case"rss":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table align=center width="100%"><tr><td><label onClick="dragableBox['+D+'].setControlFocus(this);">Title :</label></td><td><input name="title'+D+'" id="title'+D+'" type=text /><input type="button" style="margin-left:3px;" class="buttonClean" value="'+_RESOURCES.SaveText+'" onClick="currentGadget.changeTitle(event)"></td></tr><tr><td><label onClick="dragableBox['+D+'].setControlFocus(this);">RSS Url :</label></td><td><input name="feedURL'+D+'" id="feedURL'+D+'" type=text onkeypress="currentGadget.gadget.changeFeed(event)" /><input style="margin-left:3px;" type="button" class="buttonClean" value="'+_RESOURCES.SaveText+'" onClick="dragableBox['+D+'].gadget.changeFeed(event)"></td></tr><tr id="autoCityRow'+D+'"><td><label onClick="dragableBox['+D+'].setControlFocus(this);">Get my location automatically :</label></td><td><input name="autoCity'+D+'" id="autoCity'+D+'" type=checkbox onclick="dragableBox['+D+'].gadget.autoLocation(event);" /></td></tr><tr><td><label onClick="dragableBox['+D+'].setControlFocus(this);">No. of Items :</label></td><td><select style="z-index:0;" onChange="dragableBox['+D+'].gadget.changeNoItems(this.value,event)" name="noOfItems'+D+'" id="noOfItems'+D+'">';for(var A=1;A<=20;A++){C+='<option value="'+A+'">'+A+"</option>"}C+='</select></td></tr><tr><td><label onClick="dragableBox['+D+'].setControlFocus(this);">Display Link Details :</label></td><td><input type="checkbox" name="linkDetail'+D+'" id="linkDetail'+D+'" onClick="dragableBox['+D+'].gadget.changeDetails(event);"></td></tr><tr><td><label onClick="dragableBox['+D+'].setControlFocus(this);">Open Link in new Window:</label></td><td><input type="checkbox" name="linkOpen'+D+'" id="linkOpen'+D+'" onClick="dragableBox['+D+'].gadget.changeSelf(event)"></td></tr></table></form>';break;case"weather":C+="<form name='frm"+D+"'onsubmit=\"return false;\" id='frm"+D+'\'><table align="center" width="100%"> <tr><td>Title : </td><td><input name=\'title'+D+"' id='title"+D+"' type=text /></td></tr><tr><td>Town : </td><td><input type=text name = 'zipcode"+D+"' id='zipcode"+D+"' onkeyup=\"dragableBox["+D+"].gadget.weatherChange(event);\"></td></tr><tr><td>Get my location automatically : </td><td><input type=checkbox name = 'autoCity"+D+"' id='autoCity"+D+"' onclick=\"dragableBox["+D+"].gadget.getAutoLocation(event);\"></td></tr><tr><td colspan=2 align=left><input type='button' class=\"buttonClean\" value='"+_RESOURCES.OkText+"' name='submit"+D+"' id='submit"+D+"' onClick=\"dragableBox["+D+'].saveAll()"></td></tr></table></form>';break;case"webclip":C+="<form name='frm"+D+"' onsubmit='return false;'><table><tr><td><label onClick='currentGadget.setControlFocus(this);'>Title :</label></td><td> <input type='text' id='title"+D+"' name='title"+D+'\'><input type="button" style="margin-left:3px;" class="buttonClean" value="Save" onClick="currentGadget.changeTitle(event)"></td></tr><tr><td><label onClick=\'currentGadget.setControlFocus(this);\'>URL :</label></td><td> <input type=\'text\' id=\'url'+D+"' name='url"+D+'\'><input type="button" style="margin-left:3px;" class="buttonClean" value="Change" onClick="currentGadget.gadget.editWC(event)"></td></tr></table><input type=hidden name=\'width'+D+"' id='width"+D+"'><input type=hidden name='height"+D+"' id='height"+D+"'><input type=hidden name='x"+D+"' id='x"+D+"'><input type=hidden name='y"+D+"' id='y"+D+"'></form>";break;case"eventful":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%"><tbody id="tblBody'+D+'"><tr><td>Title:</td><td><input name="title'+D+'"  id="title'+D+'" type="text" ></td></tr><tr><td>Location:</td><td><input name="lastLocation'+D+'" id="lastLocation'+D+'" type="radio" value="false" onclick ="dragableBox['+D+'].gadget.locationStringChange(event);">My standard location <br /><div  name="loctionString'+D+'" id="divLocation'+D+'" >('+ipLocation+')</div></td></tr><tr><td></td><td><input name="lastLocation'+D+'" id="lastLocation'+D+'" type="radio" value="true" onclick ="dragableBox['+D+'].gadget.locationStringChange(event);">This location</td></tr><tr><td align="right"><img src="Images/loader.gif" class="imgInidcatorHide" id="imgLoading'+D+'"  /></td><td><input name="locationString'+D+' "  parNode="lastLocation" id="locationString'+D+'" type="text"   onkeypress="dragableBox['+D+'].gadget.fillCityState(event);"  onkeyup="dragableBox['+D+'].gadget.locationChange(event);"><br /><div   id="divMsg'+D+'"  style="display: none;color: rgb(255,0,0);">Please enter your location</div><div id="divList'+D+'" class="Location_Match" style="display: none;"></div></td></tr><tr><td>Category:</td><td></td></tr><tr><td colspan="2" align="center" ><table id="tblCategory'+D+'" border=0 cellspacing=0 cellpadding=0  ><tbody id="tbCategory'+D+'"><tr><td style="background:transparent none repeat-x scroll left top;border-top:1px none #EAEAEA;padding:3px 10px;"><select  size="10" multiple="multiple" id="objSelectCategory1'+D+'"   name="category'+D+'" isSave="true" parNodeName="categories" WIDTH="100" STYLE="width: 100px" ></select></td><td style="background:transparent none repeat-x scroll left top;border-top:1px none #EAEAEA;padding:3px 10px;"><input id="imgAdd'+D+'" style="cursor:pointer;height:24px;"  value=">>" type="button" onclick="dragableBox['+D+'].gadget.addCategoryList();"/><br/><input  style="cursor:pointer;height:24px;" value="<<" id="imgDel'+D+'" type="button" onclick="dragableBox['+D+'].gadget.removeCategoryList();"/></td><td style="background:transparent none repeat-x scroll left top;border-top:1px none #EAEAEA;padding:3px 10px;"><select  WIDTH="100" STYLE="width: 100px;" size="10" multiple="multiple" id="objSelectCategory2'+D+'" ></select></td></tr></tbody></table></td></tr><tr><td>Events Per Page:</td><td><select  name="noOfEvents'+D+'" id="noOfEvents'+D+'" onchange="dragableBox['+D+'].gadget.noOfEventsChange(event);"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option></select></td></tr><tr><td>Show Map:</td><td><input id="showMap'+D+'" name="showMap'+D+'" type="checkbox" onclick="dragableBox['+D+'].gadget.showMapChange(event);"></td></tr><tr align="left"><td align="left"><input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.OkText+'" class="buttonClean" onclick="dragableBox['+D+'].saveAll();" ></td><td></td></tr></tbody></table></form>';break;case"todolist":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%" ><tbody id="tblBody'+D+'"><tr><td>Title:</td><td ><input name="title'+D+'" size="25" id="title'+D+'" type="text" >&nbsp;&nbsp;&nbsp<input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.OkText+'" class="buttonClean" onclick="dragableBox['+D+'].changeTitle(event);" ></td></tr><tr><td>New To Do:</td><td><input name="todoAddString'+D+' " size="25"  id="todoAddString'+D+'" type="text" onkeypress="dragableBox['+D+'].gadget.addTask(event)">&nbsp;&nbsp;&nbsp;<input name="add'+D+'" id="add'+D+'" type="button" value="Add" class="buttonClean" onclick="dragableBox['+D+'].gadget.addTask(event)" ></td></tr></tbody></table></form>';break;case"webnote":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%"><tbody id="tblBody'+D+'"><tr><td>Title:</td><td><input name="title'+D+'"  id="title'+D+'" type="text" >&nbsp;&nbsp;&nbsp<input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.SaveText+'" class="buttonClean" onclick="dragableBox['+D+'].changeTitle(event);" ></td></tr><tr><td>Color :</td><td><div  id="webColorDiv '+D+' "style="display:block;" ><ul><li name="webNotecolor'+D+'" id="webNoteColor'+D+' " class="color"><a href="javascript:void(0)" class="postItcolorSelection" style="height: 16px;"><div mycolor="red" class="red" onclick="dragableBox['+D+'].gadget.changeColor(this)"></div><div mycolor="orange" class="orange" onclick="dragableBox['+D+'].gadget.changeColor(this)"></div><div mycolor="yellow" class="yellow" onclick="dragableBox['+D+'].gadget.changeColor(this)"></div><div mycolor="green" class="green" onclick="dragableBox['+D+'].gadget.changeColor(this)"></div><div mycolor="blue" class="blue" onclick="dragableBox['+D+'].gadget.changeColor(this)"></div><div mycolor="white" class="white" onclick="dragableBox['+D+'].gadget.changeColor(this)"></div></a></li></ul></div></td><tr><td>Font :</td><td><select onChange="dragableBox['+D+'].gadget.changeFont(this.value,event)" style="z-index:0;" name="font'+D+'" id="font'+D+'"><option   value="Arial Black" style="font-family: Arial Black;">Arial Black</option><option style="font-family: Century Gothic;" value="Century Gothic">Century Gothic</option><option style="font-family: Comic Sans MS;" value="Comic Sans MS">Comic Sans MS</option><option style="font-family: Courier New;" value="Courier New">Courier New</option><option selected="selected" style="font-family: cursive;" value="cursive">cursive</option><option style="font-family: Impact;" value="Impact">Impact</option><option style="font-family: monospace;" value="monospace">monospace</option><option style="font-family: Tahoma;" value="Tahoma">Tahoma</option><option style="font-family: Times New Roman;" value="Times New Roman">Times New Roman</option><option style="font-family: Trebuchet MS;" value="Trebuchet MS">Trebuchet MS</option><option style="font-family: Verdana;" value="Verdana">Verdana</option></select></td><tr><tr><td>Size :</td><td><select onChange="dragableBox['+D+'].gadget.changeFontSize(this.value,event)" style="z-index:0;" name="size'+D+'" id="size'+D+'"><option value="small">Small</option><option value="medium">Medium</option><option value="big">Big</option></select></td><tr></tbody></table></form>';break;case"bookmark":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><div id="editBookmark'+D+'" ><table id="table'+D+'"  width="100%" ><tbody id="tblBody'+D+'"><tr><td>Title:</td><td><input name="title'+D+'" size="25" id="title'+D+'" type="text" ></td></tr><tr><td width="1%" nowrap="nowrap"><span >Ask before deletion:</span></td><td align="left"><input type="checkbox" id="askDelete'+D+'"  onclick="dragableBox['+D+'].gadget.askDeleteChange(event);"/></td></tr><tr><td width="1%" nowrap="nowrap"><span >Show tags:</span></td><td align="left"><input type="checkbox" id="showTags'+D+'" onclick="dragableBox['+D+'].gadget.showTagsChange(event);"/></td></tr><tr><td width="1%" nowrap="nowrap"><span >Bookmarks per page:</span></td><td><select id="bookmarksPerPage'+D+'" onChange="dragableBox['+D+'].gadget.noOfBookmarkChange(this.value,event)"> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> </select></td></tr><tr><td width="1%" nowrap="nowrap"><span >Open links in:</span></td><td align="left"><select id="openLink'+D+'" onChange="dragableBox['+D+'].gadget.openLinkChange(this.value,event)"> <option value="new">new browser window</option> <option value="this">this browser window</option> </select></td></tr><tr><td align="left" style="padding-top:2px;text-align:middle"><input type="button" class="buttonClean" value="'+_RESOURCES.OkText+'" onClick="dragableBox['+D+'].saveAll();"> </td><td></td></tr></tbody></table></div></form><form  onsubmit="return false;" ><div id="addBookmark'+D+'" style="display:none;" class="bookmarkadd"><div><h2 id="addBookmarkTitleH2 '+D+'"></h2></div><table width="100%" cellpadding="2" cellspacing="0" style="table-layout:fixed"><tr><td width="25%" valign="top"><span>Title</span></td><td width="75%" valign="top"><input type="text" style="margin-top:4px;width:95%;border:1px solid #7f9db9;" id="linkTitle'+D+'" onKeyDown="" /><div id="AddBookmarkTitleError'+D+'" style="display:none;" class="bookmarkError"><h2>Error</h2> <ul><li>Please enter a title</li></ul></div></td></tr><tr><td width="25%" valign="top"><span>URL</span></td><td width="75%" valign="top"><input type="text" style="margin-top:4px;width:95%;border:1px solid #7f9db9;" id="linkUrl'+D+'" onKeyDown="" /><div id="addBookmarkUrlError'+D+'" style="display:none;" class="bookmarkError"><ul><li>Please enter an url</li></ul></div></td></tr><tr><td width="25%" valign="top"><div>Description</div><div style="line-height:1.2em">(optional)</div></td><td width="75%" valign="top"><textarea style="margin-top:4px;width:95%;font-size:1.1em;border:1px solid #7f9db9" rows="2" id="linkDescription'+D+'"></textarea></td></tr><tr><td width="25%" valign="top"><div>Tags</div><div style="line-height:1.2em">(optional)</div></td><td width="75%" valign="top"><input type="text" style="margin-top:4px;width:95%;border:1px solid #7f9db9" id="linkTags'+D+'" onKeyDown="" /><div style="line-height:1.2em;font-size:10px">Separate by commas.</div></td></tr><tr><td><span>&nbsp;</span></td><td valign="top"><span style="padding-right:4px;"><input id="btnAddBook'+D+'" type="button" class="buttonClean" value="'+_RESOURCES.SaveText+'" onClick="dragableBox['+D+'].gadget.addBookmark(event)" /></span> <span><input id="btnCancelbook'+D+' "type="button" class="buttonClean" value="'+_RESOURCES.CancelText+'" onClick="dragableBox['+D+'].gadget.showEditContent(event)" /></span></td></tr></table></div></form><form  onsubmit="return false;" ><div id="import'+D+'" class="bookmarkadd" style="display:none;padding:5px"><div><h2><span>Import from:</span> <select id="importSelect'+D+'" onchange="dragableBox['+D+'].gadget.changeImport(this.value,event)"> <option value="delicious">Del.icio.us</option> <option value="IE">Internet Explorer</option> <option value="FF">Mozilla Firefox</option> </select></h2></div><div id="deliciousImport'+D+'" style="display:none;"><div><h2>My Del.icio.us bookmarks</h2></div><div><table width="100%" cellpadding="2" cellspacing="0"><tr><td width="1%" nowrap="nowrap">User name:</td><td><input type="text" id="deliciousUsername'+D+'" onKeyDown="" /></td></tr><tr><td width="1%" nowrap="nowrap">Password:</td><td><input type="password" id="deliciousPassword'+D+'" onKeyDown="" /></td></tr><tr><td width="1%" nowrap="nowrap">&nbsp;</td><td><input id="delImport'+D+'" type="button" class="buttonClean"  value="Import" onclick="dragableBox['+D+'].gadget.importIEFFfile(event);" /> &nbsp;<input id ="delCancel'+D+'"type="button" class="buttonClean" value="'+_RESOURCES.CancelText+'" onClick="dragableBox['+D+'].gadget.showEditContent(event)" /></td></tr><tr><td colspan="2"><div  id="deliciousStatus'+D+'" style="padding-top:5px;padding-bottom:5px;" ></div></td></tr></table></div><div><h2>Public bookmarks of any user:</h2></div><div><table width="100%" cellpadding="2" cellspacing="0"><tr><td width="1%" nowrap="nowrap">User name:</td><td><input type="text" id="deliciousPusername'+D+'" onKeyDown="" /></td></tr><tr><td width="1%" nowrap="nowrap">&nbsp;</td><td><input type="button" id="delPImport'+D+'" class="buttonClean" onclick="dragableBox['+D+'].gadget.importDelPublic(event);" value="Import" /> &nbsp;<input id="delPCancel'+D+'" type="button" class="buttonClean"  value="'+_RESOURCES.CancelText+'" onClick="dragableBox['+D+'].gadget.showEditContent(event);" /></td></tr><tr><td colspan="2" align="center"><img src="Images/loader.gif" class="imgInidcatorHide" id="bookmarkLoadingDel'+D+'"  /></td></tr></table></div><div id="IEFFImportStatus'+D+'" style="display:none;padding-bottom:8px;"></div><div style="padding-top:5px;" id="deliciousPstatus'+D+'"></div></div><div id="browserImport'+D+'" style="display:none;"></div></form><form  id="frmIEFF'+D+'" onsubmit="dragableBox['+D+'].gadget.getIEFFResponse();" target="myIframe" method="post" enctype="multipart/form-data"><input type="hidden" name="hdn'+D+'" id="hdn'+D+'" ><table width="100%" cellpadding="2" cellspacing="0"><tr><td colspan="2"><div id="importIE'+D+'" style="display:none;font-size:11px;" ><b>1. Export your browser favourite to a file</b> <ul id="IEUL'+D+'" style="padding-left:13px;"><li>Choose "Import and Export..." from the file menu</li> <li>Click Next,choose "Export favourites" and click next </li><li>Choose which folder you want to export from (the top onewill export all of your favourites) and click Next</li> <li>Choose "Export to a File or Address", choose a location for your file (such as your desktop) and click Next</li> <li>Click Finish, then OK when it says "Successfully exported the favourites"</li></ul></div><div id="importFF'+D+'" style="display:none;font-size:11px;" ><b>1. Export your bookmarks to a file</b> <ul id="FFUL '+D+"\" style=\"padding-left:13px;\"><li>Go to 'Bookmarks' menu</li> <li>Click on 'Manage Bookmarks...'/'Organize Bookmarks...'</li> <li>'Bookmarks Manager' window opens </li><li>Go to 'File' menu </li><li>Select 'Export...' from the menu </li><li>Browse the location to export the file and click 'Save'</li></ul></div></td></tr><tr><td colspan=\"2\"><div  id =\"showbk"+D+'"style="font-size:11px;padding-bottom:5px;display:none;"  ><b>2. Import to Sitepump</b><br /> Click browse and select the exported file from step 1:</div></td></tr><tr><td colspan="2" valign="middle" ><div id="importBookDiv'+D+'" style="display:none;font-size:11px;" ><span id="fileBook'+D+'"><input type="file" style="font-size: 11px;" id="bkmrkFile'+D+'" name="bkmrkFile"/></span></div><div id="browserStatus'+D+'"></div></td></tr><tr><td colspan="2"><div id="importBookSub'+D+'" style="display:none;font-size:11px;" ><input id ="btnIEFFImport'+D+'"type="submit" align="left" class="buttonClean" value="Import"  onclick="dragableBox['+D+'].gadget.importIEFFfile(event);"/> <input id="btnIEFFCancel'+D+'" type="button" align="left" value="'+_RESOURCES.CancelText+'" class="buttonClean"  onClick="dragableBox['+D+'].gadget.showEditContent(event)" /></div></td></tr><tr><td colspan="2" align="center"><img src="Images/loader.gif" class="imgInidcatorHide" id="bookmarkLoading'+D+'"  /></td></tr></table></form>';break;case"worldclock":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'" width="100%" cellspacing="0" cellpadding="0"><tbody id="tblBody'+D+'"><tr><td>Title:</td><td colspan=2><input name="title'+D+'"  id="title'+D+'" type="text" ></td></tr><tr><td>Time Format:</td><td colspan=2><select id="timeFormat'+D+'" name="timeFormat'+D+'" onchange="dragableBox['+D+'].gadget.changeTimeFormat(this.value,event);"><option value="12">12 hours</option><option value="24">24 hours</option></select></td></tr><tr><td>Show Date:</td><td colspan=2><input type="checkbox" id="showDate'+D+'" name="showDate'+D+'" onclick="dragableBox['+D+'].gadget.changeDate(this.value,event);"></td></tr><tr><td vAlign="top">Locations:</td><td></td><tr><td></td><td><div id="locationTD"><select size="10" multiple="multiple" id="location'+D+'"   name="location'+D+'" isSave="true" parNodeName="locations" style="float:left;"></select><div style="margin-top:15px;text-align:center"><input type="button" id="cmdDelete'+D+'" onClick="dragableBox['+D+'].gadget.deleteCity();" style="background:url(images/deleteLink.gif) no-repeat center center;width:25px;"><br><input type="button" id="cmdTop'+D+'"   onClick="dragableBox['+D+'].gadget.shiftTop();" style="background:url(images/first.png) no-repeat center center;width:25px;"><br><input type="button" id="cmdNext'+D+'"  onClick="dragableBox['+D+'].gadget.shiftNext();" style="background:url(images/nextCity.png) no-repeat center center;width:25px;"><br><input type="button" id="cmdPrevious'+D+'" onClick="dragableBox['+D+'].gadget.shiftPrevious();" style="background:url(images/previousCity.png) no-repeat center center;width:25px;"><br><input type="button" id="cmdBottom'+D+'"  onClick="dragableBox['+D+'].gadget.shiftBottom();" style="background:url(images/last.png) no-repeat center center;width:25px;"><br></div></div><div id="lblNoLocation" style="display:none;color:red;">No location found</div><td></tr></tr><tr><td>Add Location:</td><td colspan=3><select id="addLocation'+D+'" name="addLocation'+D+'"></select>&nbsp<input type="button" value="Add" id="cmdAddLocation'+D+'" name="cmdAddLocation'+D+'" onclick="dragableBox['+D+'].gadget.addToList(this);"/><div id="lblWarning" style="display:none;color:red;">City already present in the list.</div><div id="lblCityAdded" style="display:none;color:red;">City Added...</div></td></tr><tr><td colspan=3 align=left><input type="button" class="buttonClean" value="'+_RESOURCES.OkText+'" name="submit'+D+'" id="submit'+D+'" onClick="dragableBox['+D+'].saveAll()"></td></tr></tbody></table></form>';break;case"html":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table align=center width="100%"><tbody><tr><td><label onClick="currentGadget.setControlFocus(this);">Title :</label></td><td><input name="title'+D+'" id="title'+D+'" type=text /></td></tr><tr><td><label onClick="currentGadget.setControlFocus(this);">Source :</label></td><td><textarea name="source'+D+'" id="source'+D+'"></textarea></td></tr><tr><td colspan=2><input type="button" class="buttonClean" value="'+_RESOURCES.OkText+'" name="submit'+D+'" id="submit'+D+'" onClick="dragableBox['+D+'].saveAll()"></td></tr></tbody></table></form>';break;case"digg":C+="<form name='frm"+D+"' id='frm"+D+'\'><table align="center" width="100%"><tr><td><label onClick="currentGadget.setControlFocus(this);">No. of Items :</label></td><td><select style="z-index:0;" onChange="dragableBox['+D+'].gadget.changeCombo(this.value,event);" name="noOfItems'+D+'" id="noOfItems'+D+'">';for(var A=1;A<=20;A++){if(A==5){C+='<option value="'+A+'" selected="selected" >'+A+"</option>"}else{C+='<option value="'+A+'">'+A+"</option>"}}C+='</select></td></tr><tr><td><label onClick="currentGadget.setControlFocus(this);">Category to display :</label></td><td><select id="catagoryToDisplay'+D+'" name="catagoryToDisplay'+D+'" onChange="dragableBox['+D+'].gadget.changeCombo(this.value,event);"><option value=All>All</option><option value=/container/technology name=technology>--technology</option><option value=/topic/apple title=apple>apple</option><option value=/topic/design title=design>design</option><option value=/topic/gadgets title=gadgets>gadgets</option><option value=/topic/hardware title=hardware>hardware</option><option value=/topic/tech_news title=tech_news>tech_news</option><option value=/topic/linux_unix title=linux_unix>linux_unix</option><option value=/topic/mods title=mods>mods</option><option value=/topic/programming name=programming>programming</option><option value=/topic/security name=security>security</option><option value=/topic/software name=software>software</option><option value=/topic/tech_deals name=tech_deals>tech_deals</option><option value=/container/science name=science>-- science</option><option value=/topic/space name=space>space</option><option value=/topic/environment name=environment>environment</option><option value=/topic/health name=health>health</option><option value=/topic/general_sciences name=general_sciences>general_sciences</option><option value=/container/world_business name=world_business>-- world_business</option><option value=/topic/business_finance name=business_finanace>business_finance</option><option value=/topic/politics>politics</option><option value=/topic/world_news>world_news</option><option value=/topic/offbeat_news>offbeat_news</option><option value=/container/videos>-- videos</option><option value=/topic/videos_animation>videos_animation</option><option value=/topic/videos_comedy>videos_comedy</option><option value=/topic/videos_educational>videos_educational</option><option value=/topic/videos_music>videos_music</option><option value=/topic/videos_people>videos_people</option><option value=/topic/videos_gaming>videos_gaming</option><option value=/container/entertainment>-- entertainment</option><option value=/topic/celebrity>celebrity</option><option value=/topic/movies>movies</option><option value=/topic/music>music</option><option value=/topic/television>television</option><option value=/container/gaming>-- gaming</option><option value=/topic/gaming_news>gaming_news</option></select></td></tr><tr><td><label onClick=currentGadget.setControlFocus(this);>Minimum number of diggs :</label></td><td><select id="minimumNoOfDigg'+D+'" name="minimumNoOfDigg'+D+'" onChange="dragableBox['+D+'].gadget.changeCombo(this.value,event);"><option selected=0 value=0>0</option><option value=100>100</option><option value=200>200</option><option value=300>300</option><option value=400>400</option><option value=500>500</option><option value=600>600</option><option value=700>700</option><option value=800>800</option><option value=900>900</option><option value=1000>1000</option></select></td></tr><tr><td>Popular or Upcoming :</td><td><input type=radio id="status'+D+'" name="status'+D+'" value=true onclick="dragableBox['+D+"].gadget.popularOrUpcoming('popular',event);\">&nbsp<label>popular</label>  <input type=radio id=\"status"+D+'" value=false name="status'+D+'" value=true onclick="currentGadget.gadget.popularOrUpcoming(\'upcoming\',event);">&nbsp<label>upcoming</label></td><tr><td>Open links in new window :</td><td><input type=checkbox name="openLinksInNewWindow'+D+'" id="openLinksInNewWindow'+D+"\"></td></tr><tr><td colspan=2 align=left><input type='button' class=\"buttonClean\" value='"+_RESOURCES.OkText+"' name='submit"+D+"' id='submit"+D+"' onClick=\"dragableBox["+D+'].saveAll()"></td></tr></table></form>';break;case"twitter":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%"><tbody id="tblBody'+D+'"><tr><td>Title:</td><td><input name="title'+D+'"  id="title'+D+'" type="text" ></td></tr><tr><td>Username:</td><td><input name="username'+D+'" id="username'+D+'" type="text"/></td></tr><tr><td>Password:</td><td><input name="password'+D+'" id="password'+D+'" type="password"/></td></tr><tr><td>Items Per Page:</td><td><select  name="noOfItems'+D+'" id="noOfItems'+D+'" ><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option></select></td></tr><tr align="left"><td align="left"><input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.OkText+'" class="buttonClean" onclick = "currentGadget.gadget.beforeSaveAll();dragableBox['+D+'].saveAll();currentGadget.gadget.afterSaveAll();" /></td><td></td></tr></tbody></table></form>';break;case"craigslist":C+='<form name="frm'+D+'"onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%"><tbody id="tblBody'+D+'"><tr><td>Title:</td><td><input name="title'+D+'"  id="title'+D+'" type="text" onkeyup = ""></td></tr><tr><td>Country:</td><td><select name="country'+D+'" id="country'+D+'" onchange="currentGadget.gadget.countryChange(event);"></select></td></tr><tr><td>City/Place:</td><td></td></tr><tr><td>Items Per Page:</td><td><select  name="noOfItems'+D+'" id="noOfItems'+D+'" onchange="currentGadget.gadget.noOfItemsChange(event);"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option></select></td></tr><tr><td>Only results with images:</td><td><input id="isOnlyImage'+D+'" name="isOnlyImage'+D+'" type="checkbox" onclick="currentGadget.gadget.isOnlyImageChange(event);"></td></tr><tr><td>Only search titles:</td><td><input id="isOnlyTitle'+D+'" name="isOnlyTitle'+D+'" type="checkbox" onclick="currentGadget.gadget.isOnlyTitleChange(event);"></td></tr><tr align="left"><td align="left"><input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.OkText+'" class="buttonClean" onclick = "dragableBox['+D+'].saveAll();" /></td><td></td></tr></tbody></table></form>';break;case"alexa":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table align=center width="100%"><tr><td><label>Title :</label></td><td><input name="title" id="title'+D+'" type=text style="width: 133px;"></td></tr><tr><td><label>Domain :</label></td><td><input style="width: 133px;color:#2020ff;"  style=color:#2020ff; name="domain'+D+'" id="domain'+D+'" type=text onkeypress=" dragableBox['+D+'].gadget.changeAlexaDomain(event);"></td></tr><tr><td><label>vs.</label></td><td><input style="padding: 0px 16px 0px 0px;color:#8c1818;" style=color:#8c1818; name="domain'+D+'" id="vs1'+D+'" type=text onkeypress="dragableBox['+D+'].gadget.changeAlexaDomain(event);" ><img alt="Clear" title="Clear" src="Images/s.gif"  id="clearSearch'+D+'" style="background-image: url(Images/actions.png); width: 16px; height: 16px; margin-top: -5px;margin-left:-21px;cursor:pointer; visibility=visible;" class="clear" onClick="currentGadget.gadget.clearValue(event);"/></td></tr><tr><td><label>vs.</label></td><td><input style="padding: 0px 16px 0px 0px;color:#9e9e3c;" style=color:#9e9e3c; name="domain'+D+'" id="vs2'+D+'" type=text onkeypress="dragableBox['+D+'].gadget.changeAlexaDomain(event);"  style="padding-right: 18px;"/><img alt="Clear" title="Clear" src="Images/s.gif"  id="clearSearch'+D+'" style="background-image: url(Images/actions.png); width: 16px; height: 16px; margin-top: -5px; margin-left:-21px;cursor:pointer;visibility=visible;" class="clear" onClick="currentGadget.gadget.clearValue(event);"/></td></tr><tr><td><label>vs.</label></td><td><input style="padding: 0px 16px 0px 0px;color:#84c2c2;" style=color:#84c2c2; name="domain'+D+'" id="vs3'+D+'" type=text onkeypress="dragableBox['+D+'].gadget.changeAlexaDomain(event);"  style="padding-right: 18px;"/><img alt="Clear" title="Clear" src="Images/s.gif"  id="clearSearch'+D+'" style="background-image: url(Images/actions.png); width: 16px; height: 16px; margin-top: -5px; margin-left:-21px;cursor:pointer;visibility=visible;" class="clear" onClick="currentGadget.gadget.clearValue(event);"/></td></tr><tr><td><label>vs.</label></td><td><input style="padding: 0px 16px 0px 0px;color:#181818;" style=color:#181818; name="domain'+D+'" id="vs4'+D+'" type=text onkeypress="dragableBox['+D+'].gadget.changeAlexaDomain(event);"  style="padding-right: 18px;"/><img alt="Clear" title="Clear" src="Images/s.gif"  id="clearSearch'+D+'" style="background-image: url(Images/actions.png); width: 16px; height: 16px; margin-top: -5px; margin-left:-21px;cursor:pointer;visibility=visible;" class="clear" onClick="currentGadget.gadget.clearValue(event);"/></td></tr><tr><td><label>Size :</label></td><td><select name="size" onChange="currentGadget.gadget.changeGraphSize(this.value,event)"  id="size'+D+'"><option value="150">150</option><option value="200" selected>200</option> <option value="250">250</option><option value="300">300</option><option value="400">400</option><option value="500">500</option><option value="600">600</option></select></td></tr><tr><td colspan=2><input type="button" class="buttonClean" value="'+_RESOURCES.OkText+'" name="submit'+D+'" id="submit'+D+'" onClick="dragableBox['+D+'].saveAll()"></td></tr></table></form>';break;case"flash":C+='<form name="frm'+D+'" onsubmit="return false" id="frm'+D+'"><table align=center width="100%"><tr><td><label onClick=currentGadget.setControlFocus(this);>Title :</label></td><td><input name="title'+D+'" id="title'+D+'" type=text style="width: 133px;"></td></tr><tr><td><label onClick=currentGadget.setControlFocus(this);>Flash URL :</label></td><td><input name="url'+D+'" id="url'+D+'" type=text style="width: 133px;"></td></tr><tr><td><label onClick=currentGadget.setControlFocus(this);>Height :</label></td><td><input name="height'+D+'" id="height'+D+'" type=text style="width: 133px;"></td></tr><tr><td><label onClick=currentGadget.setControlFocus(this);>Width :</label></td><td><input name="width'+D+'" id="width'+D+'" type=text style="width: 133px;"></td></tr><tr><td><label onClick="currentGadget.setControlFocus(this);">Flash variables :</label></td><td><textarea name="params'+D+'" id="params'+D+'"></textarea></td></tr><tr><td colspan=2><input type="button" class="buttonClean" value="'+_RESOURCES.OkText+'" name="submit'+D+'" id="submit'+D+'" onclick="dragableBox['+D+'].saveAll();"></td></tr></table></form>';break;case"flickr":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%"><tbody id="tblBody'+D+'"><tr><td>Title:</td><td><input name="title'+D+'"  id="title'+D+'" type="text" ></td></tr><tr><td>Feed or Tag:</td><td><input name="feedURL'+D+'"  id="feedURL'+D+'" type="text" onkeypress = "dragableBox['+D+'].gadget.onFeedKeyUp(event);" onkeyup = ""></td></tr><tr><td>Open picture to:</td><td><select name="openTo'+D+'" id="openTo'+D+'" onchange="dragableBox['+D+'].gadget.changeOpenTo();"><option value="0">Flickr site</option><option value="1">Full resolution</option></select></td></tr><tr><td>Layout:</td><td><select  name="layout'+D+'" id="layout'+D+'" onchange ="dragableBox['+D+'].gadget.changeLayout();"><option value="0">Slides</option><option value="1">Thumbnails</option></select></td></tr><tr align="left"><td align="left"><input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.SaveText+'" class="buttonClean" onclick = "dragableBox['+D+"].gadget.saveURL();dragableBox["+D+'].saveAll();"/></td><td></td></tr></tbody></table></form>';break;case"meebo":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%" ><tbody id="tblBody'+D+'"> <tr><td colspan="2">Login Names</td></tr><tr><td><span >ICQ/AIM ID</span></td><td><input name="icqAim'+D+'" id="icqAim'+D+'" type="text" style="width: 120px;" value=""  onkeyup="dragableBox['+D+'].gadget.loginChange(event);"/></td></tr><tr><td><span>Yahoo ID</span></td><td><input  name="yahoo'+D+'" id="yahoo'+D+'" type="text" style="width: 120px;" value="" onkeyup="dragableBox['+D+'].gadget.loginChange(event);"/></td></tr><tr><td><span>GTalk/Jabber ID</span></td><td><input  name="gtalkJabber'+D+'" id="gtalkJabber'+D+'" type="text" style="width: 120px;" value=""  onkeyup="dragableBox['+D+'].gadget.loginChange(event);" /></td></tr><tr><td><span>MSN ID</span></td><td><input name="msn'+D+'" id="msn'+D+'" type="text" style="width: 120px;" value=""  onkeyup="dragableBox['+D+'].gadget.loginChange(event);" /></td></tr><tr> <td> <span>Disable blinking:</span></td><td><input name="disableBlink'+D+'" id="disableBlink'+D+'"  type="checkbox" checked="checked" value="1" onclick="dragableBox['+D+'].gadget.blinkChange(event);"/></td></tr><tr> <td ></td><td><input type="button" class="buttonClean" value="'+_RESOURCES.OkText+'" name="submit'+D+'" id="submit'+D+'" onClick="dragableBox['+D+'].saveAll()"></td></tr></tbody></table></form>';break;case"horoscope":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%" ><tbody id="tblBody'+D+'"><tr><td>Title:</td><td ><input name="title'+D+'" size="25" id="title'+D+'" type="text" ></td></tr><tr><td>Interest:</td><td><select id="interestID'+D+'" name="interestID'+D+'" onChange="dragableBox['+D+'].gadget.changeInterest(this.options[this.selectedIndex].value,event);" width="100"><option value="0">Daily - Overview</option> <option value="1">Daily - Extended</option><option value="2">Daily - Work</option><option value="3">Daily - Home</option><option value="4">Weekly - Overview</option><option value="5">Weekly - Business</option><option value="6">Weekly - Romantic</option><option value="7">Monthly - Overview</option><option value="8">Monthly - Career</option><option value="9">Monthly - Romantic</option></select></td></tr><tr><td colspan="2"><input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.OkText+'" class="buttonClean" onclick="dragableBox['+D+'].saveAll();" ></td></tr></tbody></table></form>';break;case"quotation":C+='<form name="frm'+D+'" onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%" ><tbody id="tblBody'+D+'"><tr><td>Title:</td><td ><input name="title'+D+'" size="25" id="title'+D+'" type="text" ></td></tr><tr><td>Quotes Per Page:</td><td><select id="quotesPerPage'+D+'" name="quotesPerPage'+D+'" onChange="dragableBox['+D+'].gadget.changeQuotesPerPage(this.options[this.selectedIndex].value,event);" width="100">';for(var A=1;A<=12;A++){C+='<option value="'+A+'">'+A+"</option>"}C+='</select></td></tr><tr><td colspan="2"><input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.OkText+'" class="buttonClean" onclick="dragableBox['+D+'].saveAll();" ></td></tr></tbody></table></form>';break;case"facebook":C+='<form name="frm'+D+'"onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%"><tbody id="tblBody'+D+'"><tr><td>Title :</td><td><input name="title'+D+'"  id="title'+D+'" type="text"></td></tr><tr><td>Sort friend by :</td><td><select name="sortBy'+D+'" id="sortBy'+D+'" onChange="dragableBox['+D+'].gadget.changeSortBy(this.options[this.selectedIndex].value,event);" ><option value="0">First name(A-Z)</option><option value="1">First name(Z-A)</option><option value="2">Status update</option><option value="3">Profile update</option></select></td></tr><tr><td>Number of friends :</td><td><select name="detailView'+D+'" id="detailView'+D+'" onChange="dragableBox['+D+'].gadget.changeDetailView(this.options[this.selectedIndex].value,event);"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option></select></td></tr><tr><td>Display today\'s birthdays, if any :</td><td><input id="isBirthday'+D+'" name="isBirthday'+D+'" type="checkbox" onclick="dragableBox['+D+'].gadget.changeIsBirthday(event);"></td></tr><tr><td>Display search box :</td><td><input id="isSearchBox'+D+'" name="isSearchBox'+D+'" type="checkbox" onclick="dragableBox['+D+'].gadget.changeIsSearchBox(event);"></td></tr><tr><td>Display condense view :</td><td><input id="isCondense'+D+'" name="isCondense'+D+'" type="checkbox" onclick="dragableBox['+D+'].gadget.changeFriendView(event);"></td></tr><tr align="left"><td align="left" colspan=2><input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.OkText+'" class="buttonClean" onclick = " dragableBox['+D+'].saveAll();" /></td></tr></tbody></table></form>';break;case"email":C+='<form name="frm'+D+'"onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%"><tbody id="tblBody'+D+'"><tr><td>Title :</td><td><input name="title'+D+'"  id="title'+D+'" type="text"></td></tr><tr><td id="lblLogin'+D+'">Id :</td><td><input name="login'+D+'"  id="login'+D+'" type="text"></td></tr><tr><td id="lblPass'+D+'">Password :</td><td><input name="password'+D+'" id="password'+D+'" type="password"  value="" maxlength="150" /></td></tr><tr id="protocolRow'+D+'" style="display:none;"><td>Protocol :</td><td><select name="protocol'+D+'" id="protocol'+D+'" onChange="dragableBox['+D+'].gadget.changeProtocol(this.options[this.selectedIndex].value,event);" ><option value="0">POP3</option><option value="1">IMAP4</option></select></td></tr><tr id="secure'+D+'" style="display:none;" name="secure'+D+'"><td>Secure :</td><td><input id="isSecure'+D+'" name="isSecure'+D+'" type="checkbox" onclick="dragableBox['+D+'].gadget.changeSecure(event);"></td></tr><tr id="mailServerRow'+D+'" style="display:none;"><td>Mail server :</td><td><input name="mailServer'+D+'"  id="mailServer'+D+'" type="text"  value="" maxlength="150"></td></tr><tr id="portRow'+D+'" style="display:none;"><td>Port :</td><td><input name="port'+D+'"  id="port'+D+'" type="text"  value="" maxlength="6"></td></tr><tr><td>Webmail URL :</td><td><input name="webUrl'+D+'"  id="webUrl'+D+'" type="text"  value="" maxlength="1024"></td></tr><tr><td>No of Mails :</td><td><select name="noOfMails'+D+'" id="noOfMails'+D+'" onChange="dragableBox['+D+'].gadget.changeNoOfMails(this.options[this.selectedIndex].value,event);" >';for(var A=1;A<=25;A++){C+='<option value="'+A+'">'+A+"</option>"}C+='</select></td></tr><tr><td>Show number <br/>of e-mails <br/> in the title :</td><td><input id="showUnread'+D+'" name="showUnread'+D+'" type="checkbox" onclick="dragableBox['+D+'].gadget.changeUnread(event);"></td></tr><tr align="left" ><td align="left" colspan=2><input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.OkText+'" class="buttonClean" onclick = "dragableBox['+D+"].gadget.fillData(); dragableBox["+D+'].saveAll();" /></td><td><a href="javascript:void(0);" onclick="dragableBox['+D+'].gadget.displayConfig();">Change service</a></td></tr></tbody></table></form>';break;case"calendar":C+='<form name="frm'+D+'"onsubmit="return false;" id="frm'+D+'"><table id="table'+D+'"  width="100%"><tbody id="tblBody'+D+'"><tr><td>Title :</td><td><input name="title'+D+'"  id="title'+D+'" type="text" ></td></tr><tr><td>ical URL:</td><td><input name="url'+D+'"  id="url'+D+'" type="text" parNodeName="icalURL" rootNode ="calendar" isSave="true"  ></td></tr><tr><td>Date format :</td><td><select name="dateFormat'+D+'" id="dateFormat'+D+'" onChange="dragableBox['+D+'].gadget.changeDate(this.options[this.selectedIndex].value,event);" ><option value="0">YYYY/MM/DD</option><option value="1">YYYY.MM.DD</option><option value="2">DD/MM/YYYY</option><option value="3">DD.MM.YYYY</option><option value="4">MM/DD/YYYY</option><option value="5">MM.DD.YYYY</option></select></td></tr><tr><td>Time format :</td><td><select name="timeFormat'+D+'" id="timeFormat'+D+'" onChange="dragableBox['+D+'].gadget.changeTime(this.options[this.selectedIndex].value,event);" ><option value="0">12 H</option><option value="1">24 H</option></select></td></tr><tr><td>Max. No of Items :</td><td><select name="noOfItems'+D+'" id="noOfItems'+D+'" onChange="dragableBox['+D+'].gadget.changeNoOfItems(this.options[this.selectedIndex].value,event);" >';for(var A=1;A<=30;A++){C+='<option value="'+A+'">'+A+"</option>"}C+='</select></td></tr><tr><td>First day <br/> of week :</td><td><select name="firstDay'+D+'" id="firstDay'+D+'" onChange="dragableBox['+D+'].gadget.changeFirstDay(this.options[this.selectedIndex].value,event);" ><option selected="" value="0">Sunday</option><option value="1">Monday</option><option value="2">Saturday</option></select></td></tr><tr><td colspan="2">Timezone :</td></tr><tr><td colspan="2"><select name="timezone'+D+'" id="timezone'+D+'" STYLE="width: 100%" onChange="dragableBox['+D+'].gadget.changeTimezone(this.options[this.selectedIndex].value,event);" ><option value="-1" selected="selected">[Choose a time zone]</option><option value="0">(GMT-12:00) International Date Line West</option><option value="1">(GMT-11:00) Midway Island, Samoa</option><option value="2">(GMT-10:00) Hawaii</option><option value="3">(GMT-09:00) Alaska</option><option value="4">(GMT-08:00) Pacific Time (US & Canada), Tijuana</option><option value="5">(GMT-07:00) Arizona</option><option value="6">(GMT-07:00) Chihuahua, La Paz, Mazatlan</option><option value="7">(GMT-07:00) Mountain Time (US & Canada)</option><option value="8">(GMT-06:00) Central America</option><option value="9">(GMT-06:00) Central Time (US & Canada)</option><option value="10">(GMT-06:00) Guadalajara, Mexico City, Monterrey</option><option value="11">(GMT-06:00) Saskatchewan</option><option value="12">(GMT-05:00) Bogota, Lima, Quito</option><option value="13">(GMT-05:00) Eastern Time (US & Canada)</option><option value="14">(GMT-05:00) Indiana (East)</option><option value="15">(GMT-04:00) Atlantic Time (Canada)</option><option value="16">(GMT-04:00) Caracas, La Paz</option><option value="17">(GMT-04:00) Santiago</option><option value="18">(GMT-03:30) Newfoundland</option><option value="19">(GMT-03:00) Brasilia</option><option value="20">(GMT-03:00) Buenos Aires, Georgetown</option><option value="21">(GMT-03:00) Greenland</option><option value="22">(GMT-02:00) Mid-Atlantic</option><option value="23">(GMT-01:00) Azores</option><option value="24">(GMT-01:00) Cape Verde Is.</option><option value="25">(GMT) Casablanca, Monrovia</option><option value="26">(GMT) Greenwich Mean Time : Dublin, Edinburgh,?</option><option value="27">(GMT+01:00) Amsterdam, Berlin, Bern, Rome,?</option><option value="28">(GMT+01:00) Belgrade, Bratislava, Budapest,?</option><option value="29">(GMT+01:00) Brussels, Copenhagen, Madrid, Paris</option><option value="30">(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb</option><option value="31">(GMT+01:00) West Central Africa</option><option value="32">(GMT+02:00) Athens, Beirut, Istanbul, Minsk</option><option value="33">(GMT+02:00) Bucharest</option><option value="34">(GMT+02:00) Cairo</option><option value="35">(GMT+02:00) Harare, Pretoria</option><option value="36">(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn,?</option><option value="37">(GMT+02:00) Jerusalem</option><option value="38">(GMT+03:00) Baghdad</option><option value="39">(GMT+03:00) Kuwait, Riyadh</option><option value="40">(GMT+03:00) Moscow, St. Petersburg, Volgograd</option><option value="41">(GMT+03:00) Nairobi</option><option value="42">(GMT+03:30) Tehran</option><option value="43">(GMT+04:00) Abu Dhabi, Muscat</option><option value="44">(GMT+04:00) Baku, Tbilisi, Yerevan</option><option value="45">(GMT+04:30) Kabul</option><option value="46">(GMT+05:00) Ekaterinburg</option><option value="47">(GMT+05:00) Islamabad, Karachi, Tashkent</option><option value="48">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</option><option value="49">(GMT+05:45) Kathmandu</option><option value="50">(GMT+06:00) Almaty, Novosibirsk</option><option value="51">(GMT+06:00) Astana, Dhaka</option><option value="52">(GMT+06:00) Sri Jayawardenepura</option><option value="53">(GMT+06:30) Rangoon</option><option value="54">(GMT+07:00) Bangkok, Hanoi, Jakarta</option><option value="55">(GMT+07:00) Krasnoyarsk</option><option value="56">(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi</option><option value="57">(GMT+08:00) Irkutsk, Ulaan Bataar</option><option value="58">(GMT+08:00) Kuala Lumpur, Singapore</option><option value="59">(GMT+08:00) Perth</option><option value="60">(GMT+08:00) Taipei</option><option value="61">(GMT+09:00) Osaka, Sapporo, Tokyo</option><option value="62">(GMT+09:00) Seoul</option><option value="63">(GMT+09:00) Yakutsk</option><option value="64">(GMT+09:30) Adelaide</option><option value="65">(GMT+09:30) Darwin</option><option value="66">(GMT+10:00) Brisbane</option><option value="67">(GMT+10:00) Canberra, Melbourne, Sydney</option><option value="68">(GMT+10:00) Guam, Port Moresby</option><option value="69">(GMT+10:00) Hobart</option><option value="70">(GMT+10:00) Vladivostok</option><option value="71">(GMT+11:00) Magadan, Solomon Is., New Caledonia</option><option value="72">(GMT+12:00) Auckland, Wellington</option><option value="73">(GMT+12:00) Fiji, Kamchatka, Marshall Is.</option><option value="74">(GMT+13:00) Nuku\'alofa</option></select></td></tr><tr align="left" ><td align="left" colspan=2><input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.OkText+'" class="buttonClean" onclick = "dragableBox['+D+'].saveAll();" /></td></tr></tbody></table></form>';break;case"ebay":C+='<form name="frm'+D+'" id="frm'+D+'" onsubmit="return false;"><table align="center" width="100%"><tr><td><label onClick="currentGadget.setControlFocus(this);">User ID :</label></td><td><input name="userID'+D+'" id="userID'+D+'" type="text" >  <input name="submit'+D+'" id="submit'+D+'" type="button" value="'+_RESOURCES.SaveText+'" class="buttonClean" onclick = "dragableBox['+D+'].gadget.saveUser();" /></td></tr><tr><td><label onClick="currentGadget.setControlFocus(this);">Site :</label></td><td><select name="site'+D+'" id="site'+D+'" onchange="dragableBox['+D+'].gadget.changeSite(this.value,event);"><option value="15">eBay.com.au - Australia</option><option value="0">eBay.com.us - United States</option><option value="16">eBay.at - Austria</option><option value="123">eBay.be - Belgium (Dutch)</option><option value="23">eBay.be - Belgium (French)</option><option value="2">eBay.ca - Canada</option><option value="223">eBay.cn - China</option><option value="71">eBay.fr - France</option><option value="77">eBay.de - Germany</option><option value="201">eBay.hk - Hong Kong</option><option value="205">eBay.ie - Ireland</option><option selected="selected" value="203">eBay.in - India</option><option value="101">eBay.it - Italy</option><option value="146">eBay.nl - Netherlands</option><option value="212">eBay.pl - Poland</option><option value="216">eBay.sg - Singapore</option><option value="186">eBay.es - Spain</option><option value="193">eBay.ch - Switzerland</option><option value="196">eBay.tw - Taiwan</option><option value="3">eBay.co.uk - United Kingdom</option></select></td></tr><tr><td><label onClick="currentGadget.setControlFocus(this);">Display :</label></td><td><select class="display" name="display'+D+'" id="display'+D+'" onchange="dragableBox['+D+'].gadget.changeDisplay(this.value,event);"><option value="WatchList" selected="selected">Watching</option><option value="BidList">Bidding</option><option value="ActiveList">Selling</option><option value="MyFavorites">My Favorites</option><option value="MyMessages">My Messages</option></select></td></tr><tr><td><label onClick="currentGadget.setControlFocus(this);">No of Items :</label></td><td><select style="z-index:0;" onChange="currentGadget.gadget.changeNumber(this.value,event);" name="noOfItems'+D+'" id="noOfItems'+D+'">';for(var A=1;A<=20;A++){if(A==5){C+='<option value="'+A+'" selected="selected" >'+A+"</option>"}else{C+='<option value="'+A+'">'+A+"</option>"}}C+="</select></td></tr></table></form>";break}return C}var hashTable,userCookie,objFound,ecoName="",searchFeed=false,newPump=false,oldPump=false,step123,pre,nxt,clickCount=0,isSelected=0,tooltip;var sp_rootPath="http://localhost:1914/sitePump/",sp_imagePath="images/",appcolumns=null;function getPageScroll(){var A;if(self.pageYOffset){A=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){A=document.documentElement.scrollTop}else{if(document.body){A=document.body.scrollTop}}}arrayPageScroll=new Array("",A);return arrayPageScroll}function getPageSize(){var C,A;if(window.innerHeight&&window.scrollMaxY){C=document.body.scrollWidth;A=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){C=document.body.scrollWidth;A=document.body.scrollHeight}else{C=document.body.offsetWidth;A=document.body.offsetHeight}}var B,D;if(self.innerHeight){B=self.innerWidth;D=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){B=document.documentElement.clientWidth;D=document.documentElement.clientHeight}else{if(document.body){B=document.body.clientWidth;D=document.body.clientHeight}}}if(A<D){pageHeight=D}else{pageHeight=A}if(C<B){pageWidth=B}else{pageWidth=C}arrayPageSize=new Array(pageWidth,pageHeight,B,D);return arrayPageSize}function getLeftPos(A){if(A.getAttribute("dragLinks")){var B=A.style.left;B=B.replace(/[^0-9]/g,"")}else{var B=A.offsetLeft}while((A=A.offsetParent)!=null){if(A.tagName!="HTML"){B+=A.offsetLeft}}return B}function getTopPos(A){if(A.getAttribute("dragLinks")){var B=A.style.top;B=B.replace(/[^0-9]/g,"")}else{var B=A.offsetTop}while((A=A.offsetParent)!=null){if(A.tagName!="HTML"){B+=A.offsetTop}}return B}function loadFavicon(B,A){B.style.backgroundImage="none";return false;B.src="fetchFavicon.aspx?url="+A;B.style.backgroundImage="none"}var index=mainIndex.length;App.Login=Class.create();App.Login.prototype={initialize:function(A,B){this.isLogin=A;this.id=B}};var addContent_mouse_x,addContent_mouse_y,addContent_el_x,addContent_el_y;App.tooltip=Class.create();App.tooltip.prototype={initialize:function(){},showTooltip:function(F,E){if(E[1]!=""){var G=Math.max(document.body.clientWidth,document.documentElement.clientWidth)-20;if(!dhtmlgoodies_tooltip){dhtmlgoodies_tooltip=document.createElement("DIV");dhtmlgoodies_tooltip.id="dhtmlgoodies_tooltip";dhtmlgoodies_tooltipShadow=document.createElement("DIV");dhtmlgoodies_tooltipShadow.id="dhtmlgoodies_tooltipShadow";document.body.appendChild(dhtmlgoodies_tooltip);document.body.appendChild(dhtmlgoodies_tooltipShadow)}dhtmlgoodies_tooltip.style.display="block";dhtmlgoodies_tooltipShadow.style.display="block";var I=Math.max(document.body.scrollTop,document.documentElement.scrollTop);var B=F.clientX;var D=(typeof (E[2])=="undefined")?F.clientY+10+I:F.clientY+1+I;dhtmlgoodies_tooltip.innerHTML="";var H="htmlFrameResizer.html?width=100%&leftPos="+B+"&topPos="+D;if(typeof (E[2])!="undefined"&&(typeof (E[5])=="undefined"||E[5]=="")){var A=new Element("iframe");A.id="FrameAdGadget"+E[3];A.scrolling="no";A.frameBorder="0";A.width=dhtmlgoodies_tooltipMaxWidth+"px";A.height="33";A.src="getAd.aspx?id="+E[3]+"&url="+encodeURIComponent(H);dhtmlgoodies_tooltip.appendChild(A)}else{dhtmlgoodies_tooltip.innerHTML=E[1]}dhtmlgoodies_tooltip.style.width=null;dhtmlgoodies_tooltip.style.height=null;dhtmlgoodies_tooltip.style.cssText+=";left:"+B+"px;top:"+D+"px;";dhtmlgoodies_tooltipShadow.style.cssText+=";left:"+(B+dhtmlgoodies_shadowSize)+"px;top:"+(D+dhtmlgoodies_shadowSize)+"px;";if(dhtmlgoodies_tooltip.offsetWidth>dhtmlgoodies_tooltipMaxWidth){dhtmlgoodies_tooltip.style.width=dhtmlgoodies_tooltipMaxWidth+"px"}var C=dhtmlgoodies_tooltip.offsetWidth;if(C<dhtmlgoodies_tooltipMinWidth){C=dhtmlgoodies_tooltipMinWidth}dhtmlgoodies_tooltip.style.width=C+"px";dhtmlgoodies_tooltipShadow.style.width=dhtmlgoodies_tooltip.offsetWidth+"px";dhtmlgoodies_tooltipShadow.style.height=dhtmlgoodies_tooltip.offsetHeight+"px";if((B+C)>G){dhtmlgoodies_tooltip.style.left=(dhtmlgoodies_tooltipShadow.style.left.replace("px","")-((B+C)-G))-10+"px";dhtmlgoodies_tooltipShadow.style.left=(dhtmlgoodies_tooltipShadow.style.left.replace("px","")-((B+C)-G)+dhtmlgoodies_shadowSize)-10+"px"}if(typeof (E[2])!="undefined"){if(typeof ($("FrameAdGadget"+E[3]))!="undefined"){dhtmlgoodies_tooltip.onmouseover=function(){this.style.display="block";dhtmlgoodies_tooltipShadow.style.display="block";if($("FrameAdGadget"+E[3])){$("FrameAdGadget"+E[3]).style.display="block"}};dhtmlgoodies_tooltip.onmouseout=function(){this.style.display="none";dhtmlgoodies_tooltipShadow.style.display="none";if(t.adData.adsOnMouseHover&&$("adDiv"+E[3])){$("FrameAdGadget"+E[3]).style.display="none"}}}}}},hideTooltip:function(){if(dhtmlgoodies_tooltip){dhtmlgoodies_tooltip.style.display="none";dhtmlgoodies_tooltipShadow.style.display="none"}},getmouseposition:function(C){if(document.getElementById){var B=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;pagex=(isapple==1?0:(ie5)?B.scrollLeft:window.pageXOffset);pagey=(isapple==1?0:(ie5)?B.scrollTop:window.pageYOffset);mousex=(ie5)?event.x:(ns6)?clientX=C.clientX:false;mousey=(ie5)?event.y:(ns6)?clientY=C.clientY:false;var A=document.getElementById("dhtmlgoodies_tooltip");A.style.left=(mousex+pagex+offsetx)+"px";A.style.top=(mousey+pagey+offsety)+"px"}}};App.addPumpsAgent=Class.create();App.addPumpsAgent.prototype={initialize:function(){},showContentDIV:function(){if(!App.addPumps){init.newScript("Javascript/addPumps.js","addPumps")}else{pumps.showContentDIV()}}};App.init=Class.create();App.init.prototype={initialize:function(){dragFix=new App.FixDrag();searchSetting=new App.searchSettings();if(loadInit){Event.observe($("registration"),"click",this.loadRegistrationPanel.bindAsEventListener(this));pageSearch=false;opt=new App.gadgetOptionsAgent();pumps=new App.addPumpsAgent();signInOutLinkAgent=new App.signInOutLinkAgent()}appcolumns=new App.Column();this.first=1;this.tabShare=false;this.last=0;this.blnNxtEvent=false;this.blnPreviousEvent=false;this.listLength=5;this.tmpContent;this.width="";this.bdWidth=Math.max(document.body.clientWidth,document.documentElement.clientWidth)-20;hashTable=new Hash();tooltip=new App.tooltip();Event.observe(document,"click",this.hide.bindAsEventListener(this));if(loadInit){this.createHelpObject();if(isExternalUser){if(isFirstTime){this.show123Step()}else{dragableBox=new Array();rssArray=new Array();tabs=new Array();mainIndex[index]=new App.config(t1[1]+"&cookiesValue="+cookieValue,this);mainIndex[index].onCompletion=function(){t=this.response;if(!shareG){this.obj.getData()}else{t=init.convertToJson(t);this.obj.show123Step()}};mainIndex[index].runAJAX()}}else{cookieValue=Cookie.get("spuc");if(typeof (cookieValue)=="undefined"||cookieValue=="undefined"){cookieValue=null}userCookie=Cookie.get("spru");if(typeof (userCookie)=="undefined"||userCookie=="undefined"){userCookie=null}if(userCookie&&userCookie!="null"&&($("signInOutLink").innerHTML.trim()=="Sign In"||$("signInOutLink").innerHTML.trim()=="SignIn")){$("registration").style.display="none";$("signInOutLink").innerHTML="Sign Out";if(!shareG){mainIndex[index]=new App.config("getData.aspx?mainType=GetLoggedInCookieUser&userSessionKey="+userCookie,this);mainIndex[index].onCompletion=function(){t=this.response;if(!shareG){$("signInOutLink").innerHTML="Sign Out";$("signInOutLink").onclick=signInOutLinkAgent.loadSignInOutPanel.bindAsEventListener(signInOutLinkAgent,"signout");signInOutLinkAgent.isSignIn=true;dragableBox=new Array();rssArray=new Array();tabs=new Array();bi=0;arLen=0;init.getData()}else{t=init.convertToJson(t);this.show123Step()}};mainIndex[index].runAJAX()}else{mainIndex[index]=new App.config("getData.aspx?mainType=userDetail&cookiesValue="+userCookie+"&isRem=true",this);mainIndex[index].onCompletion=function(){$("signInOutLink").innerHTML="Sign Out";$("signInOutLink").onclick=signInOutLink.signout.bindAsEventListener(signInOutLink);signInOutLinkAgent.isSignIn=true;t=this.response.evalJSON();isSession=true;searchSetting.mainValue=t["2"];t1[3]=document.getElementById("shareValue").value;aa=this.obj.convertToJson(t1[3]);this.obj.applyUserTheme();this.obj.show123Step()};mainIndex[index].runAJAX()}}else{if(isEcoUser){$("registration").style.display="none";$("signInOutLink").innerHTML="Sign Out";mainIndex[index]=new App.config("getData.aspx?mainType=getEcoUser",this);mainIndex[index].onCompletion=function(){t=this.response;if(!shareG){$("signInOutLink").innerHTML="Sign Out";$("signInOutLink").onclick=signInOutLinkAgent.loadSignInOutPanel.bindAsEventListener(signInOutLinkAgent,"signout");signInOutLinkAgent.isSignIn=true;isSession=true;dragableBox=new Array();rssArray=new Array();tabs=new Array();bi=0;arLen=0;init.getData()}else{$("signInOutLink").innerHTML="Sign Out";$("signInOutLink").onclick=signInOutLinkAgent.loadSignInOutPanel.bindAsEventListener(signInOutLinkAgent,"signout");signInOutLinkAgent.isSignIn=true;isSession=true;t=init.convertToJson(this.response);searchSetting.mainValue=t["2"];t1[3]=document.getElementById("shareValue").value;aa=this.obj.convertToJson(t1[3]);this.obj.applyUserTheme();this.obj.show123Step()}};mainIndex[index].runAJAX()}else{if(!shareG){if(cookieValue||isSession){mainIndex[index]=new App.config(t1[1]+"&cookiesValue="+cookieValue,this);mainIndex[index].onCompletion=function(){t=this.response;this.obj.getData()};mainIndex[index].runAJAX()}else{this.show123Step()}}else{t1[3]=document.getElementById("shareValue").value;aa=this.convertToJson(t1[3]);if(cookieValue||isSession){mainIndex[index]=new App.config("getData.aspx?mainType=userDetail&cookiesValue="+cookieValue,this);mainIndex[index].onCompletion=function(){t=init.convertToJson(this.response);searchSetting.mainValue=t["2"];this.obj.applyUserTheme();this.obj.show123Step()};mainIndex[index].runAJAX()}else{if((aa.length&&aa[0]&&typeof (aa[0])=="object")||(aa["2"]=="imageSearch"||aa["2"]=="webSearch"||aa["2"]=="videoSearch"||aa["2"]=="imageSearch")){mainIndex[index]=new App.config("getData.aspx?mainType=settings",this);mainIndex[index].onCompletion=function(){searchSetting.mainValue=init.convertToJson(this.response)["0"];this.obj.addPreferredStyleSheet("stylesheet/soberBlue/styleSheet.css","Corporate");this.obj.setActiveStyleSheet("Corporate");this.obj.show123Step()};mainIndex[index].runAJAX()}else{this.addPreferredStyleSheet("stylesheet/soberBlue/styleSheet.css","Corporate");this.setActiveStyleSheet("Corporate");this.show123Step()}}}}}}if(typeof ($("passSet"))!="undefined"){if($("passSet").value!=""){this.showTransBox();this.loadResetPwdPanel()}}if(isEcoRegister){this.showTransBox();this.loadRegistrationPanel()}}else{init=this;this.column=$("column").value;var D=t1[4];D=D.split("^");this.addPreferredStyleSheet(D[1].trim(),D[0].trim());this.setActiveStyleSheet(D[0].trim());var C=Math.floor(100/init.column);var B=0;for(var A=1;A<=init.column;A++){if(A==(init.column)){C=99-B}B=B+C;$("column"+A).style.width=(C-0.3)+"%"}bi=0;t1[3]=document.getElementById("shareValue").value;aa=this.convertToJson(t1[3]);this.tabShare=aa;this.tabShare.each(function(E){aa=E;dragableBox[bi]=new App.Box(0,0,false,"undefined","1");bi++})}},show123Step:function(){show123StepRegister=false;show123StepCookie=false;if(!isEcoRegister&&$("passSet").value==""){if((isExternalUser&&isFirstTime&&!show123StepRegister)||(cookieValue==null&&!show123StepCookie)){if(isExternalUser&&shareG){t1[3]=document.getElementById("shareValue").value;aa=this.convertToJson(t1[3]);this.applyUserTheme();this.load123StepPanel()}else{App.isFirstTime=true;var A=new App.config("getData.aspx?mainType=insertCookieUser&Gadgets=&location=",this);A.onCompletion=function(){t=this.response;this.obj.getData();getClientSpecs()};A.runAJAX()}}else{if(isExternalUser&&shareG){t1[3]=document.getElementById("shareValue").value;aa=this.convertToJson(t1[3]);this.applyUserTheme()}this.load123StepPanel()}}},load123StepPanel:function(){this.showTransBox();if(!App.step123){this.newScript("javascript/123Step.js","step123")}else{step123.goStep1()}},alignThisBox:function(D){if($("transbox").style.display=="block"){var A=$(D).offsetWidth;var B=getPageSize();var C=(B[0]-A)/2;$(D).style.left=C+"px"}},hideTransBox:function(){$("transbox").style.display="none"},showTransBox:function(){var A=getPageSize();$("transbox").setStyle({width:A[0]+"px",height:A[1]+"px",display:"block"});this.setOpacity("")},changeTextColor:function(A){var B=$("upperPartLinksActions").getElementsByTagName("a");for(var C=0;C<B.length;C++){B[C].style.color=A}$$("#upperLinksContent","#pageTitle","#aNewTab","#upperPartLinksActions").invoke("setStyle",{color:A})},convertToJson:function(A){re=/\$\#\$/g;A=A.replace(re,"+");re=/\$\~\$/g;A=A.replace(re,"'");re=/\$\!\$/g;A=A.replace(re,'\\"');re=/\$\%\$/g;A=A.replace(re,"&");A=A.evalJSON();return A},getData:function(){if(!isThereCookie){t=this.convertToJson(t)}else{t=this.convertToJson(t);if(!cookieValue&&t.uc!="null"){Cookie.set("spuc",t.uc);Cookie.set("spus",t.us)}}if(!App.isLogoAdded&&isExternalUser){setCustomUserSetting()}else{getClientSpecs()}searchSetting.mainValue=t[t.length+1];if(t[0][20].trim()!=""){domainName=t[0][20];if(domainName.indexOf("http://")==-1){domainName="http://"+domainName}}if(t[0][21].trim()!=""){ecoName=t[0][21]}if(t.announcementText!="n/a"){if(t.scriptTag){var B=document.getElementsByTagName("head")[0];var A=document.createElement("script");A.setAttribute("type","text/javascript");A.setAttribute("language","javascript");B.appendChild(A)}$("annoucment").innerHTML='<div class="rounded"><div class="tr"/><div class="tl"/><div class="br"/><div class="bl"/><div id="infoBoxContents" class="pad"><img style="width:11px;height:11px;float:right;cursor:pointer;cursor:hand;" title="Close" alt="Close" id="closeME" src="images/deleteLink.gif"/><img style="vertical-align: top;" src="images/add16.png"/>'+t.announcementText+"</div></div>";var C=$("annoucment");C.style.display="block";C.style.filter="alpha(opacity=30)";C.style.opacity="0";var D=$("closeME");this.showAnnoucmentDIV(C);D.onclick=function(){init.setOpacity("annoucment")}}else{$("annoucment").style.display="none"}isLogin=new App.Login(t.l,t.cv);if(isLogin.isLogin=="1"){$("signInOutLink").innerHTML="Sign Out";$("registration").style.display="none";this.isSignIn=true;this.userEmail=t.userData["5"];$("signInOutLink").onclick=signInOutLinkAgent.loadSignInOutPanel.bindAsEventListener(signInOutLinkAgent,"signout")}else{$("signInOutLink").innerHTML="Sign In";this.isSignIn=false;$("signInOutLink").onclick=signInOutLinkAgent.loadSignInOutPanel.bindAsEventListener(signInOutLinkAgent,"signin")}this.applyUserTheme();this.applyTopBottomBGColor();this.createPage()},getScriptTag:function(){return t.scriptTag},showAnnoucmentDIV:function(A){transBoxHigher=false;function B(){if(!transBoxHigher){return }if((BrowserDetect.browser!="Explorer"&&(parseFloat(A.style.opacity)<1))||(BrowserDetect.browser=="Explorer"&&(parseInt(A.style.filter.substr(14,2))<100))){if(BrowserDetect.browser=="Explorer"){A.style.filter="alpha(opacity="+(parseInt(A.style.filter.substr(14,3))+35)+")"}else{A.style.opacity=(parseFloat(A.style.opacity)+0.35)}window.setTimeout(B,100)}}transBoxHigher=true;B()},setHomepage:function(A){A.style.behavior="url(#default#homepage)";A.setHomePage("http://www.sitepump.com")},applyTopBottomBGColor:function(){$("upperPart").style.cssText="";document.body.style.cssText="";this.changeTextColor("");$("upperPartLinks").style.marginBottom="0px";$("tabPart").style.marginTop="0px";var A=$("upperPart");if(t["0"]["3"]=="1"){userHeaderColor=false;$("upperPart").style.backgroundColor=""}else{if(t["0"]["4"]!=""&&t["0"]["4"]!="0"){userHeaderColor=true;Element.setStyle(A,{backgroundColor:t["0"]["4"],backgroundRepeat:"repeat",backgroundImage:"none"})}if(t["0"]["3"]=="3"){if(t["0"]["2"]!=""){if(t["0"]["2"]!="0"&&t["0"]["2"]!="1"){userHeaderImage=true;A.style.backgroundImage="url("+t["0"]["2"]+")"}A.style.backgroundRepeat="repeat"}if(t["0"]["8"]!=""){if(t["0"]["2"]!=""){if(t["0"]["8"]=="0"){A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat"}else{A.style.backgroundPosition="center center";A.style.backgroundRepeat="repeat"}}}if(t["0"]["9"]!=""){if(t["0"]["2"]!=""){if(t["0"]["9"]=="0"){A.style.backgroundPosition="center top"}else{if(t["0"]["9"]=="1"){A.style.backgroundPosition="center center"}else{A.style.backgroundPosition="center bottom"}}}}}}if(t["0"]["7"]!=""){if(t["0"]["7"]=="0"){userHeaderHeight=false}else{userHeaderHeight=true}$("upperPartLinks").style.marginBottom=t["0"]["7"]+"px";if(BrowserDetect.browser=="Explorer"){if(BrowserDetect.version!=7){$("tabPart").style.marginTop=t["0"]["7"]+"px"}else{if(t["0"]["7"]>="20"){$("pageTitle").style.height=t["0"]["7"]+"px";$("pageTitle").height=t["0"]["7"]}else{$("pageTitle").style.height="20px";$("pageTitle").height=20}}}else{$("upperPartLinks").style.marginBottom=t["0"]["7"]+"px";$("tabPart").style.marginTop=t["0"]["7"]+"px"}}if(t["0"]["3"]=="2"){A.style.background="transparent"}if(t["0"]["5"]!=""){if(t["0"]["5"]=="0"){userHeaderTextColor=true;init.changeTextColor(t["0"]["6"])}else{userHeaderTextColor=false;init.changeTextColor("")}}if(t["0"]["12"]=="1"){userBodyColor=false;document.body.style.backgroundColor=""}else{if(t["0"]["12"]!=""){userBodyColor=true;document.body.style.backgroundColor=t["0"]["13"];document.body.style.backgroundRepeat="repeat"}if(t["0"]["12"]=="2"){if(t["0"]["11"]!=""){userBodyBackground=true;document.body.style.backgroundImage="url("+t["0"]["11"]+")";document.body.style.backgroundRepeat="repeat"}}if(t["0"]["14"]!=""){if(t["0"]["14"]=="0"){document.body.style.backgroundPosition="center center";document.body.style.backgroundRepeat="no-repeat"}else{document.body.style.backgroundPosition="top left";document.body.style.backgroundRepeat="repeat"}}if(t["0"]["15"]!=""){if(t["0"]["15"]=="True"){document.body.style.backgroundAttachment="fixed"}else{document.body.style.backgroundAttachment="scroll"}}}},addPreferredStyleSheet:function(B,F){return ;B="stylesheet/basic_mode/styleSheet.css";F="basic_mode";if(this.getPreferredStyleSheet()==F){return }var E=false;var D=$A(document.getElementsByTagName("link")).each(function(G){if(G.getAttribute("rel").indexOf("style")!=-1&&G.getAttribute("rel").indexOf("alt")==-1&&G.getAttribute("title")){G.href=B;G.title=F;E=true}});if(E){return }var A=document.createElement("link");A.rel="stylesheet";A.type="text/css";A.href=B;A.title=F;A.disabled=true;var C=document.getElementsByTagName("head");C[0].appendChild(A)},getPreferredStyleSheet:function(){for(var A=0,B;(B=document.getElementsByTagName("link")[A]);A++){if(B.getAttribute("rel").indexOf("style")!=-1&&B.getAttribute("rel").indexOf("alt")==-1&&B.getAttribute("title")){return B.getAttribute("title")}}return null},setActiveStyleSheet:function(C){return ;C="basic_mode";for(var A=0,B;(B=document.getElementsByTagName("link")[A]);A++){if(B.getAttribute("rel").indexOf("style")!=-1&&B.getAttribute("title")){B.disabled=true;if(B.getAttribute("title")==C){B.disabled=false}}}},setOpacity:function(A){var B;if(A=="annoucment"){B=$("annoucment")}else{B=$("transbox")}if(BrowserDetect.browser!="Explorer"&&B.style.opacity==""){B.style.opacity="0.4"}else{if(BrowserDetect.browser=="Explorer"&&B.style.filter==""){B.style.filter="alpha(opacity=40)"}}transBoxLower=transBoxHigher=false;if(A=="theme"||A=="wallpaper"||A=="annoucment"){function D(){if(!transBoxLower){return }if((BrowserDetect.browser!="Explorer"&&(parseFloat(B.style.opacity)>0))||(BrowserDetect.browser=="Explorer"&&(parseInt(B.style.filter.substr(14,2))>0))){if(BrowserDetect.browser=="Explorer"){if(A=="annoucment"){B.style.filter="alpha(opacity="+(parseInt(B.style.filter.substr(14,2))-8)+")";if(B.style.filter.substr(14,2)<="0"||B.style.filter.substr(14,2)=="5)"||B.style.filter.substr(14,1)<="0"){$("annoucment").style.display="none"}}else{B.style.filter="alpha(opacity="+(parseInt(B.style.filter.substr(14,2))-2)+")"}}else{if(A=="annoucment"){B.style.opacity=(parseFloat(B.style.opacity)-0.15);if(B.style.opacity<="0"){$("annoucment").style.display="none"}}else{B.style.opacity=(parseFloat(B.style.opacity)-0.02)}}window.setTimeout(D,100)}}transBoxLower=true;D()}else{function C(){if(!transBoxHigher){return }if((BrowserDetect.browser!="Explorer"&&(parseFloat(B.style.opacity)<0.4))||(BrowserDetect.browser=="Explorer"&&(parseInt(B.style.filter.substr(14,2))<40))){if(BrowserDetect.browser=="Explorer"){B.style.filter="alpha(opacity="+(parseInt(B.style.filter.substr(14,2))+2)+")"}else{B.style.opacity=(parseFloat(B.style.opacity)+0.02)}window.setTimeout(C,100)}}transBoxHigher=true;C()}},loadControlPanel:function(A){if(!App.controlPanel){if(A=="themes"){App.themeOrWallpaper="themes"}else{if(A=="wallpaper"){App.themeOrWallpaper="wallpaper"}}this.newScript("Javascript/controlPanel.js","ccontrolPanel")}else{lnk.showOpaqueDIV();if(A=="themes"){lnk.changeTheme("theme")}else{if(A=="wallpaper"){lnk.changeBackground("wallpaper")}}}},newScript:function(path,className){document.getElementsByTagName("head")[0].appendChild(new Element("script",{type:"text/javascript",language:"javascript",src:path}));if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){var ctlPanel=setTimeout(function(){clearTimeout(ctlPanel);if(!eval("App."+className)){document.getElementsByTagName("head")[0].appendChild(new Element("script",{type:"text/javascript",language:"javascript",src:path}))}},250)}},registerFooterLinks:function(){$("footerBug").onclick=this.loadFooterPanel.bindAsEventListener(this,"Bug");$("footerFeedback").onclick=this.loadFooterPanel.bindAsEventListener(this,"Feedback");$("footerAPI").onclick=this.loadFooterPanel.bindAsEventListener(this,"API");$("footerAdvertise").onclick=this.loadFooterPanel.bindAsEventListener(this,"Advertise")},loadFooterPanel:function(A,B){this.footerLinkId=B;if(!App.footerStaticLinks){this.newScript("Javascript/footer.js","footerStaticLinks")}else{footerStaticLinks.showForm(B)}},loadFooter:function(){footerStaticLinks.showForm(this.footerLinkId)},loadRegistrationPanel:function(){if(t.regLink){window.location=t.regLink}else{if(!App.registration){this.newScript("Javascript/registration.js","registration")}else{registration.showOpaqueDIV(init)}}},loadResetPwdPanel:function(){if(!App.resetPassword){this.newScript("Javascript/resetPwd.js","resetPassword")}else{resetPassword.showOpaqueDIV(this)}},isGadgetMovable:function(D,B,A){if(!loadInit||typeof (t.staticGadgets)=="undefined"){return true}for(var C=0;C<t.staticGadgets.length;C++){if(t.staticGadgets[C].row==D&&t.staticGadgets[C].column==B&&t.staticGadgets[C].pageID==parseInt(A)&&!t.staticGadgets[C].isMovable){return false}}return true},getPageIndex:function(A){for(var B=0;B<tabs.length;B++){if(tabs[B].pi==A){return tabs[B].ar}}return 0},isGadgetDeletable:function(D,B,A){for(var C=0;C<t.staticGadgets.length;C++){if(t.staticGadgets[C].row==D&&t.staticGadgets[C].column==B&&t.staticGadgets[C].pageID==parseInt(A)&&!t.staticGadgets[C].isDeletable){return false}}return true},isPageDeletable:function(A){for(var B=0;B<t.staticPages.length;B++){if(t.staticPages[B].pageID==parseInt(A)&&!t.staticPages[B].isDeletable){return false}}return true},isPageMovable:function(A){for(var B=0;B<t.staticPages.length;B++){if(t.staticPages[B].pageID==parseInt(A)&&!t.staticPages[B].isMovable){return false}}return true},applyUserTheme:function(){var A=$("userSettings");Event.observe(A,"click",this.loadControlPanel.bindAsEventListener(this));var B="";if(t["0"]["10"]!=""){$("upperPart").style.display="block";$("upperPartLinksActions").style.display="inline";B=t[0][24];if(B=="custom"){themeUrl=t["0"]["10"]+"?color="+t["0"]["23"].trim();themeTitle="My Custom #"+t["0"]["23"].trim();this.addPreferredStyleSheet(themeUrl,themeTitle);this.setActiveStyleSheet(themeTitle)}else{this.addPreferredStyleSheet(t["0"]["10"],B);this.setActiveStyleSheet(B)}}},isNumeric:function(B){B=B.trim();var A=/^[0-9]+$/;if(B.match(A)){return true}else{return false}},cityData:function(){var A=$("StartWizard_Location0");A.value=ipLocation;userSelectedCity=ipLocation;A.onkeyup=init.fillCity.bindAsEventListener(this,$("StartWizard_Location_Match_Select_Location0"))},fillCity:function(D,E){var A=mainIndex.length,C;init.first=1;init.last=0;init.blnNxtEvent=init.blnPreviousEvent=false;init.tmpContent=null;C=D.srcElement||D.target;var B=C;var F=D.keyCode;locationAgentVar.loadJS(B,F,E)},closeTabOption:function(){$("tabOptions").style.display="none";if($("spanShareGadget")){document.body.removeChild($("spanShareGadget"))}},createPage:function(){if(loadInit){$("titleSpan").innerHTML=t["0"]["0"]!=""?t["0"]["0"]:"Click here to edit your page title";window.document.title=window.ActiveXObject?$("titleSpan").innerText:$("titleSpan").textContent;var I=t["0"]["1"];Cookie.set("spop",I);$("pageTitle").style.display=init.convertBool(t[0][22])?"block":"none";isRefresh=init.convertBool(t[0][17]);refreshMin=isRefresh?parseInt(t[0][18])*60000:"";if(BrowserDetect.browser=="Safari"){var H=getPageSize();$("tabPart").style.width=H[0]-35+"px"}var A=new Element("div");$("tabPart").appendChild(A);tabUL=new Element("ul",{id:"tabUL"}).setStyle({display:"none"});$("tabPart").firstChild.appendChild(tabUL);li=new Element("li");li.appendChild(new Element("img",{src:"Images/s.gif"}));$("tabPart").firstChild.firstChild.appendChild(li);if(!init.convertBool(t["0"]["16"])){for(var E=1;E<=t.length;E++){tabs[arLen]=new App.tabs(arLen,t[E][0],t[E][1],t[E][2],t[E][3],t[E][4],init.convertBool(t[E][5]),t[E][6],t[E][7],false,t[E][8]);tabs[arLen].boxes=",";if(!isMeebo){for(var F=0;F<t[E].length;F++){if(t[E]["box"][F][2].trim().toLowerCase()=="meebo"){isMeebo=true;break}}}arLen++}}else{for(var E=1;E<=t.length;E++){tabs[arLen]=new App.tabs(arLen,t[E][0],t[E][1],t[E][2],t[E][3],t[E][4],init.convertBool(t[E][5]),t[E][6],t[E][7],true,t[E][8]);tabs[arLen].boxes=",";for(var F=0;F<t[E].length;F++){dragableBox[dragableBox.length]=new App.Box(E,F,true);tabs[arLen].boxes=tabs[arLen].boxes+bi+",";bi++}arLen++}for(var G=1;G<=4;G++){App.columns[G][0].Boxes+=","}}var C=document.createElement("span");$("tabPart").appendChild(C);var D=new Element("a",{id:"aNewTab",align:"left",href:"javascript:void(0);"}).update("New Page");if(t["0"]["5"]!=""&&t["0"]["5"]=="0"){userHeaderTextColor=true;D.style.color=t["0"]["6"]}C.appendChild(D);Event.observe(C,"click",init.addNewTab);var F=$("tabPart").getElementsByTagName("li");var K=false;for(var G=0;G<F.length;G++){var B=F[G].getAttribute("tabID");if(B==I){B=F[G].id.replace(/[^0-9]/g,"");tabs[B].activeDiv(false);K=true;break}}if(!K){tabs[arLen-1].activeDiv(false)}}$("divWait").style.display="none";if($("showPumpInDIV")){return }var J=new Element("span",{"class":"hint",id:"showPumpInDIV",style:"display: none;"});document.body.appendChild(J);J.appendChild(new Element("span",{id:"hintArrow","class":"hint-pointer"}));var A=new Element("div",{align:"right",style:"display: inline; vertical-align: top; float: right;"});J.appendChild(A);A.appendChild(new Element("img",{src:"Images/s.gif",style:"background:transparent url('Images/addGadgetClose.png') no-repeat center center;width:13px;height:15px;cursor: pointer; cursor: hand;","class":"icon actions-window-close close",alt:"Close",title:"Close",id:"closePumps"}));var A=new Element("div",{style:"display: none; vertical-align: top; text-align: center;",id:"addToMyPage"});J.appendChild(A);A.appendChild(new Element("a",{href:"javascript:void(0);"}).setStyle({color:"#2A2A2A"}).update("<b>Add this Gadget to my page</b>"));A=new Element("div",{style:"text-align: center; vertical-align: middle; width: 100%;",id:"pumpData"});J.appendChild(A)},addNewTab:function(){var A="saveData.aspx?mainType=tab&sub=insert&id="+isLogin.id+"&len="+parseInt(arLen)+"&name=New Tab "+arLen;var B=new App.config(A);B.onCompletion=function(){var C=B.response.split(",");tabs[arLen]=new App.tabs(arLen,C[1],"New Page "+arLen,"3",C[0],"",true,"",true,true,C[2]);tabs[arLen].Boxes={};tabs[arLen].boxes=",";tabs[arLen].collapseAll=false;tabs[arLen].activeDiv();tabs[arLen].renameTab();arLen++};B.runAJAX()},updateModule:function(H){for(var B=1;B<=currentTab.nc;B++){var C=$("column"+B);var G=C.childNodes;var D=1;App.columns[B][0].Boxes=",";for(var I=0;I<G.length;I++){if(G[I].style.display=="none"||G[I]==rectangleDiv){continue}var A=G[I].id.replace(/[^0-9]/g,"");App.columns[B][0].Boxes+=A+",";if((BrowserDetect.browser=="Safari"||BrowserDetect.browser=="Explorer")&&dragableBox[A].finalValue=="todolist"||dragableBox[A].finalValue=="weather"){dragableBox[A].gadget.resize()}else{if(dragableBox[A].finalValue=="meebo"){var E=document.getElementById("iframeMeebo"+A)}else{if(dragableBox[A].finalValue=="imagesearch"){dragableBox[A].gadget.displayimageSearch("resize")}else{if(dragableBox[A].finalValue=="videosearch"){dragableBox[A].gadget.resizePlayer()}else{try{if(dragableBox[A].gadget.resize){dragableBox[A].gadget.resize()}}catch(F){}}}}}if(H==A){if(dragableBox[A].ci!=B||dragableBox[A].ri!=D||dragableBox[A].prevTab!=currentTab.pi){mainIndex[0]=new App.config("saveData.aspx?mainType=changeindex&rid="+D+"&cid="+B+"&pi="+currentTab.pi+"&mdlId="+dragableBox[A].mdlID);mainIndex[0].runAJAX()}}dragableBox[A].ci=B;dragableBox[A].ri=D;D++}}},cancelEvent:function(){return false},showStatic:function(B,A){if(dragableBox[B].finalValue=="html"||dragableBox[B].finalValue=="flash"){$("gadgetEdit"+B).style.display="block";if(A.isFlash||A.getAttribute("isFlash")){$("gadgetEdit"+B).style.display="none";$("title"+B).value=dragableBox[B].box.xd.title;$("url"+B).value=A.url;$("height"+B).value=dragableBox[B].box.xd.height;$("width"+B).value=dragableBox[B].box.xd.width;dragableBox[B].gadget.main(B)}if(A.isEmbed||A.getAttribute("isEmbed")){$("gadgetEdit"+B).style.display="none";$("title"+B).value=dragableBox[B].box.xd.title;$("source"+B).value=A.url;dragableBox[B].gadget.main(B)}}},footerLinks:function(){var D=$("footer").getElementsByTagName("a");for(var B=0;B<D.length;B++){var A=D[B].getAttribute("displayContent");var C=D[B].getAttribute("href");if(A=="static"){D[B].parentNode.onclick=this.getStaticPageData.bindAsEventListenerWithArgs(this,A,C)}}},getStaticPageData:function(D,C){var B=C[1];var A=C[2];index=mainIndex.length;mainIndex[index]=new App.config(A,this);mainIndex[index].onCompletion=function(){window.scroll(0,0);var H=document.createElement("div");H.style.marginBottom="20px";H.style.textAlign="center";var E=document.createElement("a");E.onclick=this.obj.showPage.bindAsEventListener(this);E.id="backToPage";E.href="javascript:void(0);";var F=document.createElement("h2");F.innerHTML="<-- Go back";F.style.cssText="text-align: right; padding-right: 15px;";E.appendChild(F);H.appendChild(E);$("siteInfo").appendChild(H);var G=document.createElement("div");G.id="siteInfoPanel";G.innerHTML=this.response;$("siteInfo").appendChild(G);$("applicationRoot").style.display="none";$("siteInfo").style.display="block"};mainIndex[index].runAJAX();return false},showPage:function(){$("siteInfo").update("").setStyle({display:"none"});$("applicationRoot").style.display="block"},createHelpObject:function(){rectangleDiv=document.createElement("DIV");rectangleDiv.id="rectangleDiv";rectangleDiv.style.display="none";document.body.appendChild(rectangleDiv)},convertBool:function(A){if(typeof A=="undefined"||A=="false"||A=="False"||A=="0"){return false}else{return true}},hide:function(C){if(!loadInit){return }if(currentTab){currentTab.tabDrag=false}if(C){var B=C.srcElement||C.target;if(B.tagName){try{if(B.tagName=="FONT"||B.id=="titleSpan"||B.id=="lnkTitle"||B.tagName==="tabPart"||B.tagName=="SELECT"||B.parentNode.id=="titleFormat"||B.tagName=="TEXTAREA"||B.tagName=="OPTION"||B.tagName=="option"){return }else{if(B.type=="IMG"||B.tagName=="IMG"){return }else{if(B.id=="share"||B.id=="shareGadget"||B.getAttribute("share")=="shareGadget"){return }}}}catch(A){}}else{return }if($("sp-searchSettings")&&$("sp-searchSettings").style.display!="none"){}else{if($("sp-settings")&&$("sp-settings").style.display!="none"){}else{if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){Element.select(document.body,"select").invoke("setStyle",{visibility:"visible"})}}}}if($("spanShareGadget")){document.body.removeChild($("spanShareGadget"))}$("gadgetPopupMenu").style.display="none";if($("searchTabOptions")){$("searchTabOptions").style.display="none"}},expandCollapse:function(E){init.closeTabOption();if(E.innerHTML==_RESOURCES.CollapseAllText){var D="",C=currentTab.boxes.split(",");for(var A=1;A<C.length-1;A++){if(dragableBox[C[A]]&&dragableBox[C[A]].GadgetDiv){if(dragableBox[C[A]].finalValue!="meebo"){dragableBox[C[A]].collpse();D+=",'"+dragableBox[C[A]].mdlID+"'"}}}if(D!=""){E.innerHTML="Expand All";E.title="Expand All";D="&mdlIDs="+D.substring(1);var B="saveData.aspx?mainType=edit&sub=collapseExpand&value=1&boxVal=1&id="+currentTab.pi;init.saveCollapse(B,D);currentTab.collapseAll=true}}else{if(E.innerHTML=="Expand All"){var D="",C=currentTab.boxes.split(",");for(var A=1;A<C.length-1;A++){if(dragableBox[C[A]]&&dragableBox[C[A]].GadgetDiv){if(dragableBox[C[A]].finalValue!="meebo"){dragableBox[C[A]].expand();D+=",'"+dragableBox[C[A]].mdlID+"'"}}}if(D!=""){E.innerHTML=_RESOURCES.CollapseAllText;E.title=_RESOURCES.CollapseAllText;D="&mdlIDs="+D.substring(1);var B="saveData.aspx?mainType=edit&sub=collapseExpand&value=0&boxVal=0&id="+currentTab.pi;init.saveCollapse(B,D);currentTab.collapseAll=false}}}currentTab.resize()},saveCollapse:function(A,B){index=mainIndex.length;mainIndex[index]=new App.config(A,this,B);mainIndex[index].runAJAX()}};App.locationAgent=Class.create();App.locationAgent.prototype={initialize:function(){this.bi=0},loadJS:function(B,A,C){this.obj=B;this.keyCode=A;this.val=C;if(!App.location){init.newScript("Javascript/location.js","location")}else{locationService.fillCity1(this.obj,this.keyCode,this.val)}},makeCall:function(){locationService.fillCity1(this.obj,this.keyCode,this.val)}};var locationAgentVar=new App.locationAgent();App.Box=Class.create();App.Box.prototype={initialize:function(F,B,D,H,G,C,E){if(isRefresh){this.refreshMin=refreshMin;refreshMin=refreshMin+refreshAdd}if(D&&!H){this.box=t[F]["box"][B];this.ti=t[F][3]}else{if(D&&H){this.box=H;this.ti=currentTab.pi}else{this.box=aa;if(E){this.ti=E}else{if(currentTab){this.ti=currentTab.pi}}}}this.loaded=false;this.bi=bi;if(C){this.direct=C}else{this.direct=D}this.finalValue=this.box["2"].trim().toLowerCase();this.gadgetID=this.box["7"].trim();this.ci=this.box["0"];this.ri=this.box["1"];this.which=G;this.mainIndex=[];this.isDeletable=typeof (this.box.xd.isDeletable)=="undefined"?true:parseInt(this.box.xd.isDeletable)==1;this.isMovable=typeof (this.box.xd.isMovable)=="undefined"?true:parseInt(this.box.xd.isMovable)==1;if(this.finalValue=="clientgadget"){iApi.data=this.box.xd;return }if(this.box["6"]!=""){if(this.box["6"].indexOf(",")!=-1){var A=this.box["6"].split(",");for(var B=0;B<A.length;B++){if(B==0){this.addJS(A[B],true)}else{this.addJS(A[B],false)}}}else{this.addJS(this.box["6"],true)}}else{this.createABox()}},readyState:function(E,C){if(C.readyState=="loaded"||C.readyState=="complete"){if(BrowserDetect.browser=="Explorer"){var D=false;switch(this.finalValue){case"websearch":case"imagesearch":case"videosearch":case"blogsearch":if(typeof App.search=="undefined"){D=true}break;case"weather":if(typeof App.weather=="undefined"){D=true}break;case"webclip":if(typeof App.webclip=="undefined"){D=true}break;case"html":if(typeof App.html=="undefined"){D=true}break;case"flash":if(typeof App.flash=="undefined"){D=true}break;case"rss":if(typeof App.rss=="undefined"){D=true}break;case"calendar":if(typeof App.calendar=="undefined"){D=true}break;case"externalgadget":if(typeof App.UWA=="undefined"){D=true}break;case"email":if(typeof App.email=="undefined"){D=true}break;case"facebook":if(typeof App.facebook=="undefined"){D=true}break;case"quotation":if(typeof App.quotation=="undefined"){D=true}break;case"horoscope":if(typeof App.horoscope=="undefined"){D=true}break;case"meebo":if(typeof App.meebo=="undefined"){D=true}break;case"bookmark":if(typeof App.bookmark=="undefined"){D=true}break;case"webnote":if(typeof App.webNote=="undefined"){D=true}break;case"todolist":if(typeof App.todoList=="undefined"){D=true}break;case"eventful":if(typeof App.eventful=="undefined"){D=true}break;case"digg":if(typeof App.digg=="undefined"){D=true}break;case"worldclock":if(typeof App.worldclock=="undefined"){D=true}break;case"twitter":if(typeof App.twitter=="undefined"){D=true}break;case"craigslist":if(typeof App.craigslist=="undefined"){D=true}break;case"alexa":if(typeof App.alexa=="undefined"){D=true}break;case"flickr":if(typeof App.flickr=="undefined"){D=true}break;case"ebay":if(typeof App.ebay=="undefined"){D=true}break}if(D){if(this.box["6"]!=""){if(this.box["6"].indexOf(",")!=-1){var A=this.box["6"].split(",");for(var B=0;B<A.length;B++){if(B==0){filesAdd=filesAdd.replace("["+A[B]+"]","");this.addJS(A[B],true)}}}else{filesAdd=filesAdd.replace("["+this.box["6"]+"]","");this.addJS(this.box["6"],true)}}}else{this.addBox()}}else{this.addBox()}}},addBox:function(){var C=this.box["6"];var D=C.indexOf("/")+1;var A=C.indexOf(".");C=C.substring(D,A);var E=hashTable.get(C).toString();if(E.indexOf(",")!=-1){E=E.split(",");for(var B=0;B<E.length;B++){dragableBox[E[B]].createABox()}}else{this.createABox()}hashTable.set(C,"");if(adObject.currentTabSpots==0&&this.pushedAdIds!=""){adObject.registerGadgetAdImpression()}},addJS:function(C,B){var F=this.box["6"],G=F.indexOf("/")+1,A=F.indexOf(".");F=F.substring(G,A);if(filesAdd.indexOf("["+C+"]")==-1){filesAdd+="["+C+"]";var E=document.getElementsByTagName("head")[0];var D=document.createElement("script");D.setAttribute("type","text/javascript");D.setAttribute("language","javascript");D.defer=true;D.setAttribute("src",C);if(B){hashTable.set(F,this.bi);D.setAttribute("bxID",this.bi);D.onreadystatechange=this.readyState.bindAsEventListener(this,D);D.onload=this.addBox.bindAsEventListener(this)}E.appendChild(D)}else{if(B){var H=hashTable.get(F).toString();if(H!=""){hashTable.set(F,H+","+this.bi)}else{this.createABox()}}}},refreshGadget:function(){if(isRefresh&&this.finalValue!="webnote"&&this.finalValue!="todolist"&&this.finalValue!="bookmark"&&this.finalValue!="flash"&&this.finalValue!="worldclock"&&this.finalValue!="html"){if(this.gadget){this.refresh=setTimeout("dragableBox["+this.bi+"].refreshGadget()",this.refreshMin);this.gadget.main("refresh")}}},createABox:function(){if(this.loaded){return }this.loaded=true;this.canDefaultConfigure=init.convertBool(this.box["4"]);this.isPersonal=init.convertBool(this.box["5"]);if(this.direct){this.mdlID=this.box["3"]}var A=new Element("DIV",{id:"gadget"+this.bi,"class":"gadget"});if(this.direct||this.finalValue=="externalusergadget"){var K=$("column"+this.box["0"]);var F=App.columns[this.box[0]][0].Boxes;App.columns[this.box[0]][0].length=parseInt(F.length)+1;App.columns[this.box[0]][0].Boxes=F+","+this.bi+",";if(addFeed){K.insertBefore(A,K.firstChild)}else{if(isDuplicate!="false"){K.insertBefore(A,$("gadget"+isDuplicate));isDuplicate="false"}else{var F=K.childNodes,N=new Array(),S=false;for(var O=0;O<F.length;O++){if(F[O].style.display!="none"){var M=F[O].id.replace(/[^0-9]/g,"");if(M==""||!dragableBox[M]){continue}if(parseInt(this.ri)<dragableBox[M].ri){K.insertBefore(A,F[O]);S=true;break}}}if(!S){K.appendChild(A)}}}K=null}else{if(typeof (this.which)=="undefined"){if(shareG){$("displayShareGadget").appendChild(A)}else{if($("pumpData").childNodes.length!=0){$("pumpData").removeChild($("pumpData").lastChild)}$("pumpData").appendChild(A)}}else{var K=$("column"+this.box["0"]),F=K.childNodes;for(var O=0;O<F.length;O++){if(F[O].style.display!="none"){var M=F[O].id.replace(/[^0-9]/g,"");if(M==""||!dragableBox[M]){continue}if(parseInt(this.ri)<dragableBox[M].ri){K.insertBefore(A,F[O]);S=true;break}}}if(!S){K.appendChild(A)}K=null}}A.onmouseover=this.mouseoverBoxHeader.bindAsEventListener(this);A.onmouseout=this.mouseoutBoxHeader.bindAsEventListener(this);var C=new Element("div",{id:"gadgetTop"});A.appendChild(C);var P=new Element("div",{id:"gadgetTopInner"});C.appendChild(P);if(this.direct&&currentTab&&this.ti!=currentTab.pi){A.style.display="none"}A.isMain="true";if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){A.style.overflow="hidden"}this.parObj=new Element("DIV",{id:"gadgetInner"+this.bi});A.appendChild(this.parObj);if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){Element.setStyle(this.parObj,{overflow:"hidden",zoom:"100%"})}var L=new Element("div",{id:"gadgetBottom"});A.appendChild(L);var B=new Element("div",{id:"gadgetBottomInner"});L.appendChild(B);this.GadgetDiv=A;this.addBoxHeader();this.parentObj=A.parentNode;var I=new Element("DIV",{id:"gadgetEdit"+this.bi,"class":"gadgetEdit editContent"}).setStyle({clear:"both",display:"none"}).update(editValue(this.bi,this.finalValue));this.parObj.appendChild(I);this.addBoxContentContainer();var G=this.box.xc.split(",")[1];if(G.indexOf("-")=="0"){G=G.substring(1)}G=G.split("-");this.collapse=init.convertBool(this.box.xd.isCollapse);for(var O=0;O<this.box.xc.split(",")[0];O++){var D=G[O];var Q=$(G[O]+this.bi);if(Q){var T=this.box.xd[D];if(T=="0"||T=="NULL"){continue}if(typeof (T)!="string"&&T!=null){T=this.box.xd[D].value}if(Q.type=="checkbox"||Q.type=="radio"){Q.checked=init.convertBool(T)}else{Q.value=unescape(T)}}}if(this.box.xd.moduleHeaderColor&&this.box.xd.moduleHeaderColor.isDefault!="1"){$("gadgetHeader"+this.bi).className="gadgetHeader "+this.box.xd.moduleHeaderColor.value;var E=" gadget"+this.box.xd.moduleHeaderColor.value+"Top";var H=" gadget"+this.box.xd.moduleHeaderColor.value+"TopInner";var J=" gadget"+this.box.xd.moduleHeaderColor.value+"Bottom";var R=" gadget"+this.box.xd.moduleHeaderColor.value+"BottomInner";$("gadget"+this.bi).childNodes[0].addClassName(E);$("gadget"+this.bi).childNodes[0].childNodes[0].addClassName(H);$("gadget"+this.bi).childNodes[2].addClassName(J);$("gadget"+this.bi).childNodes[2].childNodes[0].addClassName(R);this.parObj.className+=" gadgetInner "+this.box.xd.moduleHeaderColor.value+"-gadget"}else{$("gadgetHeader"+this.bi).className="gadgetHeader";this.parObj.className+=" gadgetInner"}if(this.collapse){this.collpse()}this.insertORUpdateData();if(this.direct&&isRefresh&&this.finalValue!="webnote"&&this.finalValue!="todolist"&&this.finalValue!="bookmark"&&this.finalValue!="flash"&&this.finalValue!="worldclock"&&this.finalValue!="html"){this.refresh=setTimeout("dragableBox["+this.bi+"].refreshGadget()",this.refreshMin)}if(typeof (t)!="undefined"&&typeof (t.adData)!="undefined"&&(t.adData.turnOnAllAds||t.adData.turnOffRssAds)){this.createAdContainer()}A=L=C=I=P=B=null},createAdContainer:function(){if(!init.convertBool(t[0][16])){var A=adObject.pushAdInGadget(loadInit);if(A){adObject.appendAdDivInGadget(this.bi,A,this.gadgetID)}}else{if(typeof (currentTab)!="undefined"&&this.ti==currentTab.pi){var A=adObject.pushAdInGadget(loadInit);if(A){adObject.appendAdDivInGadget(this.bi,A,this.gadgetID)}}}},collpse:function(){var B;B=this.bi;var A=$("gadgetContent"+B);A.style.display="none";this.collapse=true;$("gadgetEdit"+B).style.display="none";$("gadgetInner"+B).removeClassName("gadgetInner")},expand:function(){var B;B=this.bi;var A=$("gadgetContent"+B);A.style.display="block";Element.addClassName($("gadgetInner"+B)," gadgetInner");this.collapse=false},showHideBoxContent:function(D){D.cancelBubble=true;if(this.id){numericId=this.id.replace(/[^0-9]/g,"")}else{numericId=this.bi}currentTab.collapseAll=false;$("collapseExpand").update(_RESOURCES.CollapseAllText);var B=($("gadgetContent"+numericId).style.display=="block"||$("gadgetContent"+numericId).style.display=="")?"1":"0";if(dragableBox[numericId].finalValue!="meebo"){B="saveData.aspx?mainType=edit&sub=collapseExpand&value=0&boxVal="+B+"&id="+currentTab.pi;init.saveCollapse(B,"&mdlIds='"+dragableBox[numericId].mdlID+"'");var C=$("gadgetContent"+numericId);var A=dragableBox[numericId].downImage;$("gadgetEdit"+numericId).style.display="none";if(C.style.display=="block"||C.style.display==""){C.style.display="none";Element.removeClassName($("gadgetInner"+numericId),"gadgetInner");dragableBox[numericId].collapse=true}else{C.style.display="block";dragableBox[numericId].collapse=false;Element.addClassName($("gadgetInner"+numericId)," gadgetInner")}}},closeDragableBox:function(G){G.cancelBubble=true;var F=confirm("Are you sure that you want to delete this module");if(F){if(this.finalValue=="worldclock"){dragableBox[this.bi].gadget.clearTimeout()}$("gadgetPopupMenu").style.display="none";if(this.id){numericId=this.id.replace(/[^0-9]/g,"")}else{numericId=this.bi}var I="";for(var E=0;E<tabs.length;E++){if(tabs[E]==""&&typeof (tabs[E])=="undefined"){continue}if(dragableBox[numericId].ti==tabs[E].pi){I=E.toString();break}}if(dragableBox[numericId].finalValue=="rss"){rssArray.splice(dragableBox[numericId].gadget.rssID,1);for(var E=0;E<rssArray.length;E++){dragableBox[rssArray[E]].gadget.rssID=E}if(dragableBox[numericId].gadget.unread!=0){tabs[I].readCount-=dragableBox[numericId].gadget.unread;if(tabs[I].readCount!=0){tabs[I].unRead.innerHTML="("+tabs[I].readCount+")"}else{tabs[I].unRead.innerHTML=""}}}var D=dragableBox[numericId].GadgetDiv.parentNode.childNodes;var H=parseInt(dragableBox[numericId].ri),A="";for(var E=0;E<D.length;E++){if(D[E].style.display=="none"){continue}var B=D[E].id.replace(/[^0-9]/g,"");if(H<parseInt(dragableBox[B].ri)){A+=","+dragableBox[B].mdlID;dragableBox[B].ri=parseInt(dragableBox[B].ri)-1}}A=A.substring(1);index=mainIndex.length;if(dragableBox[numericId].finalValue=="meebo"){isMeebo=false}var C="saveData.aspx?mainType=delete&mdlId="+dragableBox[numericId].mdlID;mainIndex[index]=new App.config(C,dragableBox[numericId],"&changeIds="+A);mainIndex[index].runAJAX();dragableBox[numericId].GadgetDiv.parentNode.removeChild(dragableBox[numericId].GadgetDiv);App.columns[dragableBox[numericId].ci][0].Boxes=App.columns[dragableBox[numericId].ci][0].Boxes.replace(","+numericId+",",",");for(var E=0;E<dragableBox[numericId].mainIndex.length;E++){dragableBox[numericId].mainIndex[E].stop()}if(dragableBox[numericId].refresh){clearTimeout(dragableBox[numericId].refresh)}if(dragableBox[numericId].gadget&&dragableBox[numericId].gadget.loop){clearTimeout(dragableBox[numericId].gadget.loop)}dragableBox[numericId].mainIndex="";dragableBox[numericId]=""}init.hide();return false},editContent:function(C){var B;if(C){C.cancelBubble=true}if(this.id){B=this.id.replace(/[^0-9]/g,"")}else{B=this.bi}var A=$("gadgetEdit"+B);if(this.finalValue=="rss"){if($("feedURL"+B).value.indexOf("http://news.google.com/?output=rss&q=")!=-1){$("autoCityRow"+B).style.cssText="display:block;display:table-row;"}else{$("autoCityRow"+B).style.cssText="display:none;"}}if(A.style.display=="none"){A.setStyle({textAlign:"left",display:"block"});$("gadgetEditLink"+B).innerHTML=this.finalValue!="externalgadget"?txt_editLink_stop:"End Configure";if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){$("gadgetEdit"+B).select("select").invoke("setStyle",{visibility:"visible"})}}else{A.style.display="none";$("gadgetEditLink"+B).innerHTML=this.finalValue!="externalgadget"?txt_editLink:"Configure"}if($("editBookmark"+B)){$("editBookmark"+B).style.display="block";$("addBookmark"+B).style.display="none";$("import"+B).style.display="none";$("deliciousImport"+B).style.display="none"}setTimeout("dragDropCounter=-5",5);if(BrowserDetect.browser!="Explorer"){init.hide()}return false},closeContent:function(){var B;if(this.id){B=this.id.replace(/[^0-9]/g,"")}else{B=this.bi}var A=$("gadgetEdit"+B);A.style.display="none";$("gadgetEditLink"+B).innerHTML=txt_editLink},addBoxHeader:function(){this.parObj=$("gadgetInner"+this.bi);var A=new Element("DIV",{id:"gadgetHeader"+this.bi});if($("gadgetHeader"+this.bi)){var I=$("gadgetTitle"+this.bi).innerHTML;this.parObj.removeChild($("gadgetHeader"+this.bi));this.parObj.insertBefore(A,this.parObj.firstChild);if(this.box.xd.moduleHeaderColor&&this.box.xd.moduleHeaderColor.isDefault!="1"){A.className="gadgetHeader "+this.box.xd.moduleHeaderColor.value;var F=" gadget"+this.box.xd.moduleHeaderColor.value+"Top";var G=" gadget"+this.box.xd.moduleHeaderColor.value+"TopInner";var H=" gadget"+this.box.xd.moduleHeaderColor.value+"Bottom";var J=" gadget"+this.box.xd.moduleHeaderColor.value+"BottomInner";$("gadget"+this.bi).childNodes[0].addClassName(F);$("gadget"+this.bi).childNodes[0].childNodes[0].addClassName(G);$("gadget"+this.bi).childNodes[2].addClassName(H);$("gadget"+this.bi).childNodes[2].childNodes[0].addClassName(J);this.parObj.className+=" gadgetInner "+this.box.xd.moduleHeaderColor.value+"-gadget"}else{A.className="gadgetHeader";this.parObj.className+=" gadgetInner"}}else{I="";this.parObj.appendChild(A)}var E=new Element("div");A.appendChild(E);if(this.finalValue=="externalusergadget"){this.direct=false}else{E.className="expand";var D=new Element("IMG",{id:"gadgetExpand"+this.bi,src:"Images/s.gif"}).setStyle({display:"none",cursor:"pointer",width:"16px",height:"16px"});E.appendChild(D);D.onmousedown=this.showHideBoxContent.bindAsEventListener(this);D=new Element("IMG",{id:"gadgetFavIcon"+this.bi});E.appendChild(D);if(this.finalValue!="rss"){D.src=$("sgif").src;this.downImage=sp_imagePath+"favIcons5.png";D.style.cssText="height:16px;width:16px;";this.coords=this.getCoords(this.box[7]);D.style.backgroundPosition=this.coords}else{D.src="Images/s.gif";if(typeof (this.downImage)=="undefined"){this.downImage=sp_imagePath+"favIcons5.png"}D.style.cssText="height:16px;width:16px;"}}if(this.direct){A.style.cursor="move";var E=new Element("div",{id:"gadgetCloseLink"+this.bi,"class":"close"}).setStyle({"vertical-align":"middle",textAlign:"center",display:"none"});A.appendChild(E);var B=new Element("img",{"class":"ico actions-window-close",src:"Images/s.gif"}).setStyle({display:"inline",cursor:"pointer","vertical-align":"middle",width:"13px",height:"16px"});E.onmousedown=this.closeDragableBox.bindAsEventListener(this);E.appendChild(B);var E=new Element("div",{id:"gadgetRefreshSource"+this.bi,"class":"refresh"}).setStyle({"vertical-align":"middle",display:"none",textAlign:"center"});A.appendChild(E);var D=new Element("IMG",{"class":"ico actions-view-refresh",src:"Images/s.gif"}).setStyle({"vertical-align":"middle",width:"13px",height:"16px",cursor:"pointer"});E.onmousedown=this.refreshMe.bindAsEventListener(this);E.appendChild(D)}if(this.finalValue!="externalusergadget"){var E=new Element("div",{id:"gadgetEditLink"+this.bi,"class":"edit"}).setStyle({display:"none"});A.appendChild(E);E.onmousedown=this.editContent.bindAsEventListener(this);var C=new Element("A",{href:"javascript:void(0);"}).update(txt_editLink).setStyle({display:"inline",cursor:"pointer"});Event.observe(C,"click",init.cancelEvent);E.appendChild(C);if(this.finalValue=="externalgadget"&&!this.direct){C.innerHTML="Configure";E.style.display="block"}if(this.direct){var M=new Element("div",{id:"gadgetOption"+this.bi,"class":"options"}).setStyle({display:"none",cursor:"pointer","vertical-align":"middle",align:"center"});A.appendChild(M);var D=new Element("IMG",{id:"downImg"+this.bi,src:"Images/s.gif","class":"actions-view-options"}).setStyle({"vertical-align":"middle",width:"13px",height:"16px",cursor:"pointer"});D.onmousedown=this.gadgetOptions.bindAsEventListener(this);M.appendChild(D)}else{this.tmpIndex=new Array()}}else{var L=new Element("div",{id:"points"}).setStyle({"float":"right",display:"block"});A.appendChild(L)}if($("gadgetHeader"+this.bi)){var K=new Element("SPAN",{id:"gadgetTitle"+this.bi,"class":"title"});A.appendChild(K);K.innerHTML=I}A=null},refreshMe:function(A){A.cancelBubble=true;this.gadget.main("refresh");return false},getCoords:function(C){var B=parseInt(C-1)/5;B=parseInt(B);var E=parseInt(C-1)%5,A=(E*16),F=(B*16);A=A*(-1);F=F*(-1);var D=A+"px "+F+"px";return D},addBoxContentContainer:function(){var A=new Element("DIV",{id:"gadgetContent"+this.bi}).setStyle({display:"block"});this.parObj.appendChild(A);if(this.finalValue=="ebay"){A.className="gadgetContent ebay"}else{A.className="gadgetContent"}if(opera){A.style.clear="none"}this.mainDiv=A;if(this.hi&&this.hi/1>40){if(document.all){A.style.overflowY="auto"}else{A.style.overflow="-moz-scrollbars-vertical;"}if(opera){A.style.overflow="auto"}}},gadgetOptions:function(E){E.cancelBubble=true;var D=E.srcElement||E.target;if($("spanShareGadget")){document.body.removeChild($("spanShareGadget"))}currentGadget=this;optionDiv=$("gadgetPopupMenu");if(optionDiv.style.display=="none"){optionDiv.style.display="block";optionDiv.setAttribute("gadgetID",this.bi);el_x=findPosX(this.parObj)/1;el_y=findPosY(this.parObj)/1-document.documentElement.scrollTop;w=$("gadgetHeader"+this.bi).offsetWidth;h=$("gadgetHeader"+this.bi).offsetHeight;var C=el_x+w,B,A;B=E.clientX;B=Math.min(B,(document.body.clientWidth-300));A=E.clientY+document.documentElement.scrollTop;B=el_x+w-150;B=Math.min(B,(document.body.clientWidth-300));optionDiv.style.left=(B)+"px";optionDiv.style.top=(el_y+h+4+document.documentElement.scrollTop)+"px";optionDiv.style.position="absolute";if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){Element.select(document.body,"select").invoke("setStyle",{visibility:"hidden"})}opt.canMove(this.bi,this.ci,this.ri,this.mdlID,this.isPersonal,this.finalValue)}else{optionDiv.style.display="none";if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){Element.select(document.body,"select").invoke("setStyle",{visibility:"visible"})}}return false},insertORUpdateData:function(){var f=ipLocation;if($("main"+this.finalValue+"Div"+this.bi)){$("main"+this.finalValue+"Div"+this.bi).parentNode.removeChild($("main"+this.finalValue+"Div"+this.bi))}var l="",d=this.bi;switch(this.finalValue){case"websearch":case"imagesearch":case"videosearch":case"blogsearch":var AG=new Element("a",{id:"searchOption"+this.bi,href:"javascript:void(0);"}).setStyle({padding:"10px"}).update("Manage your Search Engine");AG.onclick=searchSetting.show.bindAsEventListener(searchSetting,AG);$("gadgetEdit"+this.bi).appendChild(AG);var R=new Element("div",{id:"main"+this.finalValue+"Div"+this.bi});if(!this.gadget){this.gadget=new App.search(this.bi,this.box["2"])}var K=new Element("div",{id:"searchDiv"+this.bi,"class":"search"});var v=new Element("form");v.onsubmit=function(){currentGadget.gadget.main(event||window.event);return false};var I=new Element("img",{id:"imgFav"+this.bi,src:"Images/s.gif"}).setStyle({height:"16px",width:"16px","vertical-align":"top",padding:"2px"});v.appendChild(I);var J=new Element("input",{id:"searchString"+this.bi,type:"text","class":"search"}).setStyle({paddingRight:"18px"});J.onfocus=this.gadget.chkFocus.bindAsEventListener(this.gadget);J.onfocusout=this.gadget.chkFocus.bindAsEventListener(this.gadget);v.appendChild(J);I=new Element("img",{id:"clearSearch"+this.bi,"class":"clear",alt:"Clear",title:"Clear",src:"Images/s.gif"}).setStyle({backgroundImage:"url(Images/clear.png)",width:"16px",height:"16px",verticalAlign:"middle",visibility:"hidden"});I.onclick=this.gadget.clearValue.bindAsEventListener(this.gadget);v.appendChild(I);J=new Element("input",{id:"submitSearch"+this.bi,"class":"buttonClean",type:"submit",value:"search"}).setStyle({marginLeft:"5px",marginRight:"5px"});J.onclick=this.gadget.main.bindAsEventListener(this.gadget);v.appendChild(J);if(this.finalValue!="videosearch"){J=new Element("input",{id:"listOrDetailed"+this.bi,type:"checkbox"});J.onclick=this.gadget.changeDetails.bindAsEventListener(this.gadget);v.appendChild(J)}K.appendChild(v);$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;R.appendChild(K);if(this.finalValue=="videosearch"){var AE=new Element("div",{id:"flashPlayer"+this.bi}).setStyle({display:"none"});R.appendChild(AE);var AH=new Element("div",{id:"flashPlayerLink"+this.bi}).setStyle({display:"none"});var s=new Element("p");var u=new Element("a",{id:"fullscreen",href:"javascript:void(0);"}).update("Full Screen | ");s.appendChild(u);var r=new Element("a",{target:"_blank"}).update("See on test | ");s.appendChild(r);var n=new Element("a",{id:"view",href:"javascript:void(0);"}).update("Hide");s.appendChild(n);AH.appendChild(s);R.appendChild(AH)}this.gadget.searchLength=this.box.xd.moduleSize;this.gadget.current="";var o=new Element("div",{id:"searchDisplay"+this.bi,"class":"sp-tabContent"}).update("No Search Entries Yet.");R.appendChild(o);currentGadget=this;this.mainDiv.appendChild(R);this.gadget.addUL();if(this.finalValue!="videosearch"){if(init.convertBool(this.box.xd.listOrDetailed)){$("listOrDetailed"+this.bi).checked=true}}if($("isLastSearch"+this.bi).checked==true){$("searchString"+this.bi).value=this.box.xd.isLastSearch.searchString}if(this.finalValue!="videosearch"){if($("listOrDetailed"+this.bi).checked==true){this.gadget.isDetaild=true}else{this.gadget.isDetaild=false}}this.gadget.main();break;case"weather":var R=new Element("div",{id:"main"+this.finalValue+"Div"+this.bi});if(!this.gadget){this.gadget=new App.weather(this.bi)}currentGadget=this;$("autoCity"+this.bi).checked=false;if(this.box.xd.autoCity=="true"&&App.isFirstTime){$("zipcode"+this.bi).value=f;$("title"+this.bi).value=f}this.gadget.main();if(this.box.xd.autoCity=="true"&&App.isFirstTime){var T="&sub=text&field=title&value="+escape(f);this.saveData(T);var T="&sub=text&field=zipcode&value="+escape(f);this.saveData(T)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;this.mainDiv.appendChild(R);break;case"webclip":var R=new Element("div",{id:"main"+this.finalValue+"Div"+this.bi});currentGadget=this;if(!this.gadget){this.gadget=new App.webclip(this.bi)}var O=$("gadgetContent"+this.bi).getDimensions().width;var A=this.box.xd.width;var B=this.box.xd.height;var m=B/A;if(O-10<A){this.box.xd.width=O-20;this.box.xd.height=parseInt(m*(O-20))}else{if(A!=""&&typeof (A)!="undefined"){this.box.xd.width=A}if(B!=""&&typeof (B)!="undefined"){this.box.xd.height=B}}var AC=new Element("div",{id:"refreshLoader"+this.bi,"class":"refreshLoader"});R.appendChild(AC);var I=new Element("img",{src:"Images/s.gif"});AC.appendChild(I);var L=new Element("iframe",{id:"boxIframe"+this.bi,name:"boxIframe"+this.bi,width:this.box.xd.width+"px",height:this.box.xd.height+"px",scrolling:"no",frameBorder:"no"}).setStyle({visibility:"hidden",overflow:"hidden","overflow-x":"hidden","overflow-y":"hidden"});R.appendChild(L);this.mainDiv.appendChild(R);this.gadget.url=this.box.xd.url;this.gadget.x=this.box.xd.x;this.gadget.y=this.box.xd.y;this.gadget.width=this.box.xd.width;this.gadget.height=this.box.xd.height;if($("title"+this.bi).value=="0"){$("title"+this.bi).value=""}if($("title"+this.bi).value!=""||$("title"+this.bi).value){$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value}this.gadget.main();break;case"html":var R=new Element("div",{id:"main"+this.finalValue+"Div"+this.bi});currentGadget=this;var AC=new Element("div",{id:"content"+this.bi,align:"center"});if(!this.gadget){this.gadget=new App.html(this.bi,this.finalValue)}if(this.box.xd.source=="0"&&this.box.xd.source==""){AC.innerHTML="Please Enter a Source code of html page";$("source"+this.bi).value=""}R.appendChild(AC);this.mainDiv.appendChild(R);this.gadget.main();break;case"flash":var R=new Element("div",{id:"main"+this.finalValue+"Div"+this.bi});currentGadget=this;if(!this.gadget){this.gadget=new App.flash(this.bi)}this.mainDiv.appendChild(R);if(this.box.xd.url!="NULL"&&this.box.xd.url!=""){this.gadget.url=this.box.xd.url;this.gadget.height=this.box.xd.height;this.gadget.width=this.box.xd.width;this.gadget.params=this.box.xd.params;this.gadget.name=R.id;this.gadget.main()}else{R.innerHTML="Please Enter a (.swf) url of flash object ans also enter any extra parameters.";$("params"+this.bi).value=""}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;break;case"rss":var R=new Element("div",{id:"main"+this.finalValue+"Div"+this.bi});currentGadget=this;if(!this.gadget){this.gadget=new App.rss(this.bi)}if(this.box.xd.hystory=="NULL"||typeof (this.box.xd.hystory)=="undefined"){this.gadget.hystory=","}else{this.gadget.hystory=","+this.box.xd.hystory+","}this.gadget.rssID=rssArray.length;rssArray.push(this.bi);currentGadget=this;var D=new Element("div",{id:"rssDisplay"+this.bi}).setStyle({padding:"6px 3px 3px"}).update("");R.appendChild(D);if($("linkDetail"+this.bi).checked==true){this.gadget.isDetaild=true}else{this.gadget.isDetaild=false}this.gadget.searchLength=$("noOfItems"+this.bi).value;if($("linkOpen"+this.bi).checked==true){this.gadget.selfDisplay=true}else{this.gadget.selfDisplay=false}if(this.box.xd.isPodCast){if(init.convertBool(this.box.xd.isPodCast)){this.gadget.isPodcast=1}else{this.gadget.isPodCast=0}}else{this.gadget.isPodCast=0}this.mainDiv.appendChild(R);var X="http://news.google.com/?output=rss&q=";$("autoCity"+this.bi).checked=false;if(this.box.xd.autoCity=="true"&&this.box.xd.feedURL.indexOf("http://news.google.com/?output=rss&q=")!=-1&&App.isFirstTime){$("feedURL"+this.bi).value="";$("feedURL"+this.bi).value=X+f;$("title"+this.bi).value="News for "+f}this.gadget.main();if(this.box.xd.autoCity=="true"&&this.box.xd.feedURL.indexOf("http://news.google.com/?output=rss&q=")!=-1&&App.isFirstTime){var T="&sub=text&field=feedURL&value="+escape($("feedURL"+this.bi).value);this.saveData(T);var T="&sub=text&field=title&value="+escape(f);this.saveData(T)}if($("title"+this.bi).value=="0"){$("title"+this.bi).value=""}if($("title"+this.bi).value!=""||$("title"+this.bi).value){$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;this.gadget.query=$("feedURL"+this.bi).value}D=null;break;case"calendar":if(!this.gadget){this.gadget=new App.calendar(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;currentGadget=this;$("dateFormat"+this.bi).value=this.box.xd.dateFormat;$("timeFormat"+this.bi).value=this.box.xd.timeFormat;$("noOfItems"+this.bi).value=this.box.xd.noOfItems;$("firstDay"+this.bi).value=this.box.xd.firstDay;$("timezone"+this.bi).value=this.box.xd.timezone;this.gadget.timezone=this.box.xd.timezone;this.gadget.timeFormat=this.box.xd.timeFormat;this.gadget.dateFormat=this.box.xd.dateFormat;this.gadget.noItems=this.box.xd.noOfItems;this.gadget.firstDay=this.box.xd.firstDay;this.gadget.lastView=this.box.xd.lastView;$("url"+this.bi).value=this.box.xd.icalURL[0].url;this.gadget.main();break;case"externalgadget":if(!this.gadget){this.gadget=new App.UWA(this)}currentGadget=this;this.gadget.main();break;case"email":if(!this.gadget){this.gadget=new App.email(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;currentGadget=this;if(this.box.xd.login=="NULL"){this.gadget.login=""}else{this.gadget.login=this.box.xd.login}$("login"+this.bi).value=this.gadget.login;if(this.box.xd.password=="NULL"){this.gadget.password=""}else{this.gadget.password=this.box.xd.password}$("password"+this.bi).value="";if(this.box.xd.protocol=="NULL"){this.gadget.protocol="0"}else{this.gadget.protocol=this.box.xd.protocol}$("protocol"+this.bi).value=this.gadget.protocol;if(this.box.xd.isSecure=="NULL"){this.gadget.isSecure="false";$("isSecure"+this.bi).checked=init.convertBool("false")}else{this.gadget.isSecure=init.convertBool(this.box.xd.isSecure);$("isSecure"+this.bi).checked=init.convertBool(this.box.xd.isSecure)}if(this.box.xd.mailServer=="NULL"){this.gadget.mailServer=""}else{this.gadget.mailServer=this.box.xd.mailServer}$("mailServer"+this.bi).value=this.gadget.mailServer;if(this.box.xd.port=="NULL"){this.gadget.port="";$("port"+this.bi).value=""}else{this.gadget.port=this.box.xd.port}$("port"+this.bi).value=this.gadget.port;if(this.box.xd.webUrl=="NULL"){this.gadget.webUrl=""}else{this.gadget.webUrl=this.box.xd.webUrl}$("webUrl"+this.bi).value=this.gadget.webUrl;if(this.box.xd.noOfMails!="NULL"&&this.box.xd.noOfMails!=""){this.gadget.noOfMails=this.box.xd.noOfMails;$("noOfMails"+this.bi).value=this.box.xd.noOfMails}else{this.gadget.noOfMails=5;$("noOfMails"+this.bi).value=5}$("showUnread"+this.bi).checked=init.convertBool(this.box.xd.showUnread);this.gadget.showUnread=init.convertBool(this.box.xd.showUnread);$("showUnread"+this.bi).checked=init.convertBool(this.box.xd.showUnread);this.gadget.main();break;case"facebook":if(!this.gadget){this.gadget=new App.facebook(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;currentGadget=this;this.gadget.sortVal=this.box.xd.sortBy;this.gadget.detailViewCount=this.box.xd.detailView;this.gadget.isBirthday=this.box.xd.isBirthday;this.gadget.isSearchBox=this.box.xd.isSearchBox;this.gadget.isCondense=this.box.xd.isCondense;if(this.box.xd.sessionKey=="NULL"){this.gadget.sessionKey=""}else{this.gadget.sessionKey=this.box.xd.sessionKey}if(this.box.xd.uid=="NULL"){this.gadget.uid=""}else{this.gadget.uid=this.box.xd.uid}$("sortBy"+this.bi).value=this.box.xd.sortBy;$("detailView"+this.bi).value=this.box.xd.detailView;$("isBirthday"+this.bi).checked=init.convertBool(this.box.xd.isBirthday);$("isSearchBox"+this.bi).checked=init.convertBool(this.box.xd.isSearchBox);$("isCondense"+this.bi).checked=init.convertBool(this.box.xd.isCondense);this.gadget.main();break;case"quotation":if(!this.gadget){this.gadget=new App.quotation(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;currentGadget=this;this.gadget.quotesPerPage=this.box.xd.quotesPerPage;$("quotesPerPage"+this.bi).value=this.box.xd.quotesPerPage;this.gadget.main();break;case"horoscope":if(!this.gadget){this.gadget=new App.horoscope(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;currentGadget=this;this.gadget.sign=this.box.xd.sign;this.gadget.interest=this.box.xd.interestID;$("interestID"+this.bi).value=this.box.xd.interestID;this.gadget.main();break;case"quotation":if(!this.gadget){this.gadget=new App.quotation(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;currentGadget=this;this.gadget.quotesPerPage=this.box.xd.quotesPerPage;$("quotesPerPage"+this.bi).value=this.box.xd.quotesPerPage;this.gadget.main();break;case"horoscope":if(!this.gadget){this.gadget=new App.horoscope(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;currentGadget=this;this.gadget.sign=this.box.xd.sign;this.gadget.interest=this.box.xd.interestID;$("interestID"+this.bi).value=this.box.xd.interestID;this.gadget.main();break;case"meebo":if(!this.gadget){this.gadget=new App.meebo(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML="Meebo";if(this.box.xd.loginNames!=""){if(this.box.xd.loginNames.icqAim=="NULL"){this.box.xd.loginNames.icqAim=""}if(this.box.xd.loginNames.yahoo=="NULL"){this.box.xd.loginNames.yahoo=""}if(this.box.xd.loginNames.gtalkJabber=="NULL"){this.box.xd.loginNames.gtalkJabber=""}if(this.box.xd.loginNames.msn=="NULL"){this.box.xd.loginNames.msn=""}$("icqAim"+this.bi).value=this.box.xd.loginNames.icqAim;$("yahoo"+this.bi).value=this.box.xd.loginNames.yahoo;$("gtalkJabber"+this.bi).value=this.box.xd.loginNames.gtalkJabber;$("msn"+this.bi).value=this.box.xd.loginNames.msn}$("disableBlink"+this.bi).checked=init.convertBool(this.box.xd.askDelete);currentGadget=this;isMeebo=true;this.gadget.main();break;case"bookmark":var R=new Element("div",{id:"main"+this.finalValue+"Div"+this.bi});this.mainDiv.appendChild(R);if(!this.gadget){this.gadget=new App.bookmark(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;if(this.box.xd.links==""){this.gadget.content[0]={linkTitle:"",url:"",description:"",tags:this.addBookmarkTags,position:""};this.gadget.content.length=0}else{this.gadget.content=this.box.xd.links}this.gadget.displayLength=this.box.xd.bookmarksPerPage;$("bookmarksPerPage"+this.bi).selectedIndex=this.box.xd.bookmarksPerPage-3;this.gadget.openLink=this.box.xd.openLink;if(this.box.xd.openLink=="new"){$("openLink"+this.bi)[0].selected=true}else{$("openLink"+this.bi)[1].selected=true}this.gadget.askDelete=init.convertBool(this.box.xd.askDelete);$("askDelete"+this.bi).checked=init.convertBool(this.box.xd.askDelete);this.gadget.showTags=init.convertBool(this.box.xd.showTags);$("showTags"+this.bi).checked=init.convertBool(this.box.xd.showTags);currentGadget=this;this.gadget.main();break;case"webnote":if(!this.gadget){this.gadget=new App.webNote(this.bi,this.mdlID)}var H=$("gadgetHeader"+this.bi).className.split(" ");$("gadgetContent"+this.bi).addClassName(" "+H[1]+"-webnote");$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;this.gadget.font=this.box.xd.font;$("font"+this.bi).value=this.box.xd.font;this.gadget.fontSize=this.box.xd.size;$("size"+this.bi).value=this.box.xd.size;this.gadget.noteData=this.box.xd.note;if(this.box.xd.moduleHeaderColor.isDefault=="0"){this.gadget.color=this.box.xd.moduleHeaderColor.value}else{this.gadget.color="green"}currentGadget=this;this.gadget.main();break;case"externalusergadget":$("gadgetTitle"+this.bi).innerHTML="Hi,"+this.box.xd.v1+"(First Name)";$("points").innerHTML=this.box.xd.v2+" :1000";var U=new Element("table",{cellSpacing:"3"});var b=new Element("tbody");for(var g=0;g<=1;g++){if(g==0){var G=0,Q=4}else{var G=5,Q=9}var AF=new Element("tr");for(var q=G;q<Q;q++){var E=new Element("td",{"class":"backColor"}).setStyle({padding:"4px"}).update(this.box.xd["v"+q]);AF.appendChild(E);b.appendChild(AF)}U.appendChild(b)}$("gadgetContent"+this.bi).appendChild(U);break;case"todolist":if(!this.gadget){this.gadget=new App.todoList(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;this.gadget.taskData=this.box.xd;currentGadget=this;this.gadget.main();break;case"eventful":if(!this.gadget){this.gadget=new App.eventful(this.bi)}currentGadget=this;if(this.box.xd.lastLocation.value=="false"&&App.isFirstTime){$("title"+this.bi).value="Events in "+f;this.box.xd.lastLocation.locationString=f;$("lastLocation"+this.bi).checked=true;this.box.xd.lastLocation.value="true";this.box.xd.lastLocation.standardLocation=userSelectedCity;var T="&sub=text&field=title&value="+escape($("title"+this.bi).value);this.saveData(T);var T="&sub=attribute&field=lastLocation&value="+escape(f);T+="&att=locationString";this.saveData(T);var T="&sub=attribute&field=lastLocation&value="+escape(userSelectedCity);T+="&att=standardLocation";this.saveData(T)}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;$("locationString"+this.bi).value=this.box.xd.lastLocation.locationString;this.locationText=this.box.xd.lastLocation.locationString;var Y=$("divLocation"+this.bi);$("table"+this.bi).childNodes[0].childNodes[1].childNodes[1].removeChild($("table"+this.bi).childNodes[0].childNodes[1].childNodes[1].childNodes[3]);var c=document.createElement("div");c.id="divLocation"+this.bi;c.name="loctionString";c.innerHTML="("+this.box.xd.lastLocation.standardLocation+")";$("table"+this.bi).childNodes[0].childNodes[1].childNodes[1].appendChild(c);if(this.box.xd.lastLocation.value=="true"){document.getElementsByName("lastLocation"+this.bi)[1].checked=init.convertBool("true")}else{document.getElementsByName("lastLocation"+this.bi)[0].checked=init.convertBool("true")}$("showMap"+this.bi).checked=init.convertBool(this.box.xd.showMap);this.showMap=init.convertBool(this.box.xd.showMap);$("noOfEvents"+this.bi).selectedIndex=this.box.xd.noOfEvents-1;this.eventLength=this.box.xd.noOfEvents;var W=document.createElement("Select");var S=document.createElement("option");S.text="All Categories";S.value="All";W.options.add(S);var S=document.createElement("option");S.value="animals";S.text="Animals";W.options.add(S);var S=document.createElement("option");S.value="art";S.text="Art";W.options.add(S);var S=document.createElement("option");S.value="books";S.text="Literature";W.options.add(S);var S=document.createElement("option");S.value="business";S.text="Finance";W.options.add(S);var S=document.createElement("option");S.text="Fundraisers";S.value="fundraisers";W.options.add(S);var S=document.createElement("option");S.text="Clubs";S.value="clubs_associations";W.options.add(S);var S=document.createElement("option");S.text="Community";S.value="community";W.options.add(S);var S=document.createElement("option");S.text="Conferences";S.value="conference";W.options.add(S);var S=document.createElement("option");S.text="Family";S.value="family_fun_kids";W.options.add(S);var S=document.createElement("option");S.text="Festivals";S.value="festivals_parades";W.options.add(S);var S=document.createElement("option");S.text="Food";S.value="food";W.options.add(S);var S=document.createElement("option");S.text="Learning";S.value="learning_education";W.options.add(S);var S=document.createElement("option");S.text="Movies";S.value="movies_film";W.options.add(S);var S=document.createElement("option");S.text="Museums,Zoos";S.value="attractions";W.options.add(S);var S=document.createElement("option");S.text="Music";S.value="music";W.options.add(S);var S=document.createElement("option");S.text="Outdoors";S.value="outdoors_recreation";W.options.add(S);var S=document.createElement("option");S.text="Performing Arts";S.value="performing_arts";W.options.add(S);var S=document.createElement("option");S.text="Politics";S.value="politics_activism";W.options.add(S);var S=document.createElement("option");S.text="Religion";S.value="religion_spirituality";W.options.add(S);var S=document.createElement("option");S.text="Sales,Retail";S.value="sales";W.options.add(S);var S=document.createElement("option");S.text="Schools";S.value="schools_alumni";W.options.add(S);var S=document.createElement("option");S.text="Science";S.value="science";W.options.add(S);var S=document.createElement("option");S.text="Social";S.value="singles_social";W.options.add(S);var S=document.createElement("option");S.text="Sports";S.value="sports";W.options.add(S);var S=document.createElement("option");S.text="Support Groups";S.value="support";W.options.add(S);var S=document.createElement("option");S.text="Technology";S.value="technology";W.options.add(S);var S=document.createElement("option");S.text="Travel";S.value="travel";W.options.add(S);var S=document.createElement("option");S.text="Other";S.value="other";W.options.add(S);var M=this.box.xd.categories.length.split(",");var k=document.getElementById("objSelectCategory1"+this.bi);var j=document.getElementById("objSelectCategory2"+this.bi);var N=false;for(var AB=0;AB<W.length;AB++){var V=document.createElement("option");V.text=W.options[AB].text;V.value=W.options[AB].value;N=false;for(var AA=0;AA<M.length-1;AA++){if(W.options[AB].value==M[AA]){k.options.add(V);N=true}}if(N==false){j.options.add(V)}}this.gadget.main();this.gadget.sortList(k);this.gadget.sortList(j);break;case"digg":var R=new Element("div",{id:"main"+this.finalValue+"Div"+this.bi});if(!this.gadget){this.gadget=new App.digg(this.bi)}currentGadget=this;var z=new Element("div",{id:"diggDisplay"+this.bi}).setStyle({padding:" 6px 3px 3px"}).update("");R.appendChild(z);this.mainDiv.appendChild(R);if(this.box.xd.status=="popular"){document.getElementsByName("status"+this.bi)[0].checked=true}else{document.getElementsByName("status"+this.bi)[1].checked=true}this.gadget.main();var Z='<a href="http://digg.com" target="_blank">Digg</a>';if(this.box.xd.status=="popular"){if($("catagoryToDisplay"+this.bi).value!="All"){Z=Z+"<em> -  "+$("catagoryToDisplay"+this.bi).options[$("catagoryToDisplay"+this.bi).selectedIndex].innerHTML+"</em>"}if($("minimumNoOfDigg"+this.bi).value!="0"){Z=Z+"<em> : "+$("minimumNoOfDigg"+this.bi).value+" diggs minimum<em>"}}else{if($("catagoryToDisplay"+this.bi).value!="All"){Z=Z+"<em> - "+$("catagoryToDisplay"+this.bi).options[$("catagoryToDisplay"+this.bi).selectedIndex].innerHTML+"</em>"}Z=Z+"<em> : Upcoming...</em>"}$("gadgetTitle"+this.bi).innerHTML=Z;var T="&sub=text&field=title&value="+escape(Z);this.saveData(T);break;case"worldclock":var F=this.box.xd.locations.length.split(",");var R=new Element("div",{id:"main"+this.finalValue+"Div"+this.bi});if(!this.gadget){if(F[0]!=""){this.gadget=new App.worldclock(this.bi,true)}else{this.gadget=new App.worldclock(this.bi,false)}}$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;currentGadget=this;this.mainDiv.appendChild(R);if(F[0]!=""){var C=$("location"+this.bi);if(C.options.length>0){C.options.length=0}for(var AB=0;AB<F.length-1;AB++){var V=document.createElement("option");V.text=F[AB];V.value=F[AB];if(BrowserDetect.browser=="Firefox"){$("location"+this.bi).add(V,null)}else{$("location"+this.bi).add(V,$("location"+this.bi).options.length)}}}this.gadget.fillCityCombo();break;case"twitter":var R=new Element("div",{id:"main"+this.finalValue+this.bi});if(!this.gadget){this.gadget=new App.twitter(this.bi)}this.gadget.username=this.box.xd.username;this.gadget.password=this.box.xd.password;$("noOfItems"+this.bi).value=this.box.xd.noOfItems;$("gadgetContent"+this.bi).innerHTML="Account not configured, use the edit button<br/>to set your login and password";if(this.gadget.username!=""&&this.gadget.username!="none"){$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value+"<em> / "+this.gadget.username+"</em>";$("username"+this.bi).value=this.box.xd.username}else{$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value;$("username"+this.bi).value="";$("password"+this.bi).value=""}currentGadget=this;this.mainDiv.appendChild(R);this.gadget.main();break;case"craigslist":var R=new Element("div",{id:"main"+this.finalValue+this.bi});if(!this.gadget){this.gadget=new App.craigslist(this.bi)}this.mainDiv.appendChild(R);currentGadget=this;$("gadgetTitle"+this.bi).innerHTML=this.box.xd.title;this.gadget.country=this.box.xd.country;this.gadget.city=this.box.xd.city;this.gadget.itemLength=parseInt(this.box.xd.noOfItems);this.gadget.category=this.box.xd.category.value;this.gadget.key=this.box.xd.category.key;if(this.box.xd.isLastSearch.value!="false"){this.gadget.query=this.box.xd.isLastSearch.searchString}else{this.gadget.query=""}if(this.box.xd.isOnlyImage=="true"){$("isOnlyImage"+this.bi).checked="true";this.gadget.isOnlyImage=true}else{$("isOnlyImage"+this.bi).checked=false;this.gadget.isOnlyImage=false}if(this.box.xd.isOnlyTitle=="true"){$("isOnlyTitle"+this.bi).checked="true";this.gadget.isOnlyTitle=true}else{$("isOnlyTitle"+this.bi).checked=false;this.gadget.isOnlyTitle=false}currentGadget.gadget.createCityCombo();currentGadget.gadget.getCountryData();currentGadget.gadget.main();break;case"alexa":if(!this.gadget){this.gadget=new App.alexa(this.bi,this.mdlID)}$("gadgetTitle"+this.bi).innerHTML="Alexa Traffic";$("title"+this.bi).value=this.box.xd.title;if(this.box.xd.title!=""){$("gadgetTitle"+this.bi).innerHTML="Alexa Traffic -<em>"+this.box.xd.title+"</em>"}var AD="";var P=this.box.xd.domains.length.substring(0,this.box.xd.domains.length.length-1).split(",");for(var AA=0;AA<P.length;AA++){if(AA==0){$("domain"+this.bi).value=P[AA]!="null"?P[AA]:""}else{var d=document.getElementsByName("domain"+this.bi)[AA];d.value=P[AA]!="null"?P[AA]:""}}var j="";if(this.box.xd.type=="Reach"){j="r"}else{if(this.box.xd.type=="Rank"){j="t"}else{j="p"}}$("size"+this.bi).value=this.box.xd.size;this.gadget.type=j;this.gadget.range=this.box.xd.range;currentGadget=this;this.gadget.main();break;case"flickr":var R=new Element("div",{id:"main"+this.finalValue+this.bi});if(!this.gadget){this.gadget=new App.flickr(this.bi)}this.mainDiv.appendChild(R);currentGadget=this;$("gadgetTitle"+this.bi).innerHTML=this.box.xd.title;currentGadget.gadget.main();break;case"ebay":if(!this.gadget){this.gadget=new App.ebay(this.bi,this.mdlID,this.box.xd.userID,this.box.xd.userToken,this.box.xd.site,this.box.xd.display)}currentGadget=this;$("gadgetTitle"+this.bi).innerHTML=this.box.xd.title;this.gadget.main();var Z="Ebay";if($("display"+this.bi).value=="WatchList"){Z="Ebay : <em> Items I'm Watching</em>"}if($("display"+this.bi).value=="bidList"){Z="Ebay : <em> Items I'm Bidding On</em>"}if($("display"+this.bi).value=="ActiveList"){Z="Ebay : <em> Items I'm Seeling </em>"}if($("display"+this.bi).value=="MyFavorites"){Z="Ebay : <em> My Favorites </em>"}if($("display"+this.bi).value=="MyMessages"){Z="Ebay : <em> My Messages </em>"}$("gadgetTitle"+this.bi).innerHTML=Z;var T="&sub=text&field=title&value="+escape(Z);break}if($("title"+this.bi)){$("title"+this.bi).onkeypress=this.changeTitle.bindAsEventListener(this)}},changeTitle:function(A){if(A&&A!="undefined"){if($("title"+this.bi).value!=""){if(A.keyCode==13&&($("gadgetEdit"+this.bi).style.display=="block"||$("gadgetEdit"+this.bi).style.display=="")){this.saveTitle(A)}else{if(A.type=="click"){this.saveTitle(A)}}}}},saveTitle:function(B){var C=$("title"+this.bi).value;$("gadgetTitle"+this.bi).innerHTML=C;switch(this.finalValue){case"websearch":case"imagesearch":case"blogsearch":case"videosearch":C+=$("searchString"+this.bi).value!=""?(" - <em>"+$("searchString"+this.bi).value+"</em>"):"";$("gadgetTitle"+this.bi).innerHTML=C;break;case"alexa":$("gadgetTitle"+this.bi).innerHTML="Alexa Traffic - <em>"+$("title"+this.bi).value+"</em>";break;case"craigslist":dragableBox[this.bi].gadget.setTitle();break;case"twitter":if(this.username!=""&&this.username!="none"){$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value+"<em> / "+$("username"+this.bi).value+"</em>"}else{$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value}break;case"flickr":$("gadgetTitle"+this.bi).innerHTML=$("title"+this.bi).value+currentGadget.gadget.title;break}this.editContent(B);var A="&sub=text&field=title&value="+escape($("title"+this.bi).value);this.saveData(A)},saveAll:function(){if(this.finalValue=="externalgadget"){var C=this.gadget.externalGadget.preferences;var U="&sub=externalgadget";var A=this.gadget.externalGadget.data;for(var M=0;M<C.length;M++){if(C[M].name=="gadgetUrl"||C[M].name=="activeTab"){continue}U+="&"+C[M].name+"="+(typeof (A[C[M].name])=="undefined"?"":A[C[M].name])}U+="&gadgetUrl="+A.gadgetUrl;U+="&activeTab="+(typeof (A.activeTab)=="undefined"?"":A.activeTab);this.saveData(U);return }if(this.direct){if(this.finalValue=="ebay"){var W="Ebay";if($("display"+this.bi).value=="WatchList"){W="Ebay : <em> Items I'm Watching</em>"}if($("display"+this.bi).value=="bidList"){W="Ebay : <em> Items I'm Bidding On</em>"}if($("display"+this.bi).value=="ActiveList"){W="Ebay : <em> Items I'm Seeling </em>"}if($("display"+this.bi).value=="MyFavorites"){W="Ebay : <em> My Favorites </em>"}if($("display"+this.bi).value=="MyMessages"){W="Ebay : <em> My Messages </em>"}}if(this.finalValue=="digg"){var W='<a href="http://digg.com" target="_blank">Digg</a>';if($("catagoryToDisplay"+this.bi).value!="All"){W='<a href="http://digg.com" target="_blank">Digg</a><em> - '+$("catagoryToDisplay"+this.bi).options[$("catagoryToDisplay"+this.bi).selectedIndex].innerHTML+"</em>"}if($("minimumNoOfDigg"+this.bi).value!="0"){W=W+"<em> : "+$("minimumNoOfDigg"+this.bi).value+" diggs minimum</em>"}}else{if(this.finalValue!="meebo"){if($("title"+this.bi)){var W=$("title"+this.bi).value}}else{var W="Meebo"}}$("gadgetTitle"+this.bi).innerHTML=W;var R=document.forms["frm"+this.bi],B="";for(var M=0;M<R.length;M++){if(R[M].name!="submit"+this.bi){var T=R[M].name.replace(/[^A-Za-z]/g,"");B="";if(T!=""){B="&sub=text&field="+T+"&value=";if(R[M].type=="checkbox"||R[M].type=="radio"){var K=document.getElementsByName(T+this.bi);if(K.length>1){for(var L=0;L<K.length;L++){if(K[L].checked==true){if(this.finalValue=="digg"){if(L==0){B="&sub=text&field="+T+"&value=popular";currentGadget.box.xd.status="popular"}else{B="&sub=text&field="+T+"&value=upcoming";currentGadget.box.xd.status="upcoming"}}else{B="&sub=text&field="+T+"&value="+escape(K[L].value)}}}}else{B+=R[M].checked}}else{if(R[M].type=="select-multiple"){var G=R[M].getAttribute("multiple");var V=R[M].getAttribute("isSave");var F=R[M].getAttribute("parNodeName");if(G!=null&&V!=null){if(R[M].childNodes.length!=0){B="&sub=deleteNode&field="+T;this.saveData(B);B="";for(var L=0;L<R[M].childNodes.length;L++){B="&sub=insertNode&parNode="+F+"&field="+T+"&value=";B+=escape(R[M].childNodes[L].value);this.saveData(B);B=""}}}}else{if(R[M].type=="textarea"&&this.finalValue=="html"){B="&sub=text&field=source";this.saveData(B,"&value="+escape(R[M].value));B=""}else{var K=document.getElementsByName(T+this.bi);if(K.length>1){var S=R[M].getAttribute("parNodeName");var Q=R[M].getAttribute("rootNode");var O=R[M].getAttribute("isSave");var D=R[M].id.replace(/[^A-Za-z]/g,"");if(R[M].id=="domain"+this.bi){var H=false;var P="saveData.aspx?mainType=edit&mdlId="+this.mdlID;B="&sub=deleteNode&field=domains";P+=B;index=this.mainIndex.length;this.mainIndex[index]=new App.config(P,this);var J=this.bi;this.mainIndex[index].onCompletion=function(){B="";var X="";var a=document.getElementsByName("domain"+J);for(var Y=0;Y<a.length;Y++){if(a[Y].value==""){X="null"}else{X=a[Y].value}B+="<domain>"+X+"</domain>"}var Z="&sub=insertNode&parNode=alexa&field=domains&value="+escape(B);this.obj.saveData(Z)};this.mainIndex[index].runAJAX();this.saveData(B)}else{if(O!=null&&S!=null&&Q!=null){var H=false;var P="saveData.aspx?mainType=edit&mdlId="+this.mdlID;B="";var I="";var E=document.getElementsByName("url"+this.bi);for(var L=0;L<E.length;L++){if(E[L].value!=""){B+="<"+D+(L+1)+">"+E[L].value+"</"+D+(L+1)+">"}}var P="&sub=updateMultipleNode&parNode="+Q+"&field="+S+"&value="+escape(B);this.saveData(P)}}}else{H=true;if(this.finalValue=="email"){if(R[M].value==""){B+=escape("NULL")}else{B+=escape(R[M].value)}}else{if(R[M].value==""){B+=escape("NULL")}else{B+=escape(R[M].value)}}}}}}if(H!=false){try{var S=R[M].getAttribute("parNode");if(S!=null){B="&sub=attribute&field="+S+"&value=";if(R[M].value==""){B+=escape("NULL")}else{B+=escape(R[M].value)}B+="&att="+T}}catch(N){}if(B!=""){this.saveData(B)}}}}}}this.closeContent();if(this.finalValue=="worldclock"){this.gadget.showLocationTimes()}else{this.gadget.main()}},saveData:function(){var A="saveData.aspx?mainType=edit&mdlId="+this.mdlID;if(this.finalValue=="externalgadget"&&BrowserDetect.browser=="Firefox"&&arguments[1]=="egSave"){A="../"+A}if(arguments.length!=0){var C=arguments[0];re=/\+/g;C=C.replace(re,"$#$");A+=C;var B="";if(typeof (arguments[1])!="undefined"){B=arguments[1];B=B.replace(re,"$#$")}}if(this.direct){index=this.mainIndex.length;this.mainIndex[index]=new App.config(A,this,B);this.mainIndex[index].runAJAX()}else{index=this.tmpIndex.length;this.tmpIndex[index]=[];this.tmpIndex[index]["0"]=A;this.tmpIndex[index]["1"]=B}},saveTmpData:function(A,B){index=this.mainIndex.length;this.mainIndex[index]=new App.config(A,this,B);this.mainIndex[index].runAJAX()},mouseoverBoxHeader:function(){if(dragDropCounter==10){return }var D;if(this.id){D=this.id.replace(/[^0-9]/g,"")}else{D=this.bi}currentGadget=this;try{if(this.direct){if($("gadgetContent"+D).style.display=="none"){$("gadgetExpand"+D).src=src_rightImage;$("gadgetExpand"+D).style.display="inline";$("gadgetFavIcon"+D).style.display="none"}else{$("gadgetExpand"+D).style.display="inline";$("gadgetExpand"+D).src=src_downImage;$("gadgetFavIcon"+D).style.display="none"}if(this.finalValue!="todolist"&&this.finalValue!="webnote"&&this.finalValue!="bookmark"){$("gadgetRefreshSource"+D).style.display="block"}else{$("gadgetRefreshSource"+D).style.display="none"}$("gadgetCloseLink"+D).style.display="block";if(!this.isDeletable){$("gadgetCloseLink"+D).style.display="none"}if($("gadgetOption"+D)){$("gadgetOption"+D).style.display="block"}}var B=$("gadgetEditLink"+D);var C="";if($("gadgetEdit"+D).style.display=="none"){C=txt_editLink;if(this.finalValue=="externalgadget"){C="Configure"}}else{C=txt_editLink_stop;if(this.finalValue=="externalgadget"){C="End Configure"}}if(B){B.setStyle({display:"block"}).update(C)}if(t.adData.turnOnAllAds&&t.adData.adsOnMouseOver){if($("adDiv"+D)){$("adDiv"+D).style.display="block"}}}catch(A){}},mouseoutBoxHeader:function(){var B;if(this.id){B=this.id.replace(/[^0-9]/g,"")}else{B=this.bi}try{if(this.direct){if(this.finalValue!="rss"){$("gadgetFavIcon"+B).style.display="inline";$("gadgetExpand"+B).style.display="none"}else{$("gadgetFavIcon"+B).style.display="inline";$("gadgetExpand"+B).style.display="none"}$("gadgetRefreshSource"+B).style.display="none";$("gadgetCloseLink"+B).style.display="none";$("gadgetOption"+B).style.display="none"}if($("gadgetEditLink"+B)){$("gadgetEditLink"+B).style.display=this.finalValue!="externalgadget"||this.direct?"none":"block"}if(t.adData.turnOnAllAds&&t.adData.adsOnMouseOver){if($("adDiv"+B)){$("adDiv"+B).style.display="none"}}}catch(A){}},setControlFocus:function(A){if(!A.parentNode.nextSibling.firstChild.disabled){A.parentNode.nextSibling.firstChild.focus()}}};App.searchSettings=Class.create();App.searchSettings.prototype={initialize:function(){},show:function(R,G){init.showTransBox();if(typeof (this.mainValue)=="undefined"){this.mainValue=t[t.length+1]}var F=this.mainValue;if(!$("sp-searchSettings")){var E=new Element("div",{id:"sp-searchSettings","class":"modalDialog sp-settings sp-searchSettings"}).setStyle({display:"block",position:"absolute",textAlign:"center",width:"650px","z-index":"9000"});var C=new Element("h2").update("Manage Search Engine");E.appendChild(C);var W=new Element("img",{"class":"actions-window-close close",src:"Images/s.gif",width:"13",height:"16",alt:"Close"});W.onclick=this.hide;E.appendChild(W);var I=new Element("ol",{id:"searchType","class":"settings"});for(var Q=0;Q<F.length;Q++){var H=new Element("li");var T=new Element("a",{id:"search-"+F[Q].Name.trim().toLowerCase(),href:"javascript:void(0);"}).update(F[Q].DisplayName);T.onclick=this.showValues;H.appendChild(T);I.appendChild(H)}E.appendChild(I);var D=new Element("div",{id:"sp-searchSettings_page","class":"page"});E.appendChild(D);var B=new Element("div",{"class":"bottom"});var V=new Element("input",{type:"button",className:"done",value:"Done"});V.onclick=this.hide;B.appendChild(V);E.appendChild(B);document.body.appendChild(E)}var L=Math.max(document.body.scrollTop,document.documentElement.scrollTop);$("sp-searchSettings").setStyle({left:(document.documentElement.scrollLeft+187)+"px",top:(L+35)+"px",display:"block"});var K=G.id.replace(/[^0-9]/g,"");this.id=K;$("searchType").getElementsBySelector("a").invoke("removeClassName","selected");$("search-"+dragableBox[K].finalValue).addClassName("selected");var M=$("search-"+dragableBox[K].finalValue).innerHTML.stripTags().trim().toLowerCase();$("sp-searchSettings_page").getElementsBySelector("div").invoke("setStyle","display:none");if(!$("sp-searchSettings-"+M)){for(var Q=0;Q<F.length;Q++){if(F[Q].Name.toLowerCase()==M){var J=new Element("div",{id:"sp-searchSettings-"+M,"class":"listVibes"});var I=new Element("ul",{"class":"vibes"});for(var O=0;O<F[Q].length;O++){var H=new Element("li");var W=new Element("img",{src:F[Q][O].ICON}).setStyle({width:"16px",height:"16px",verticalAlign:"top"});var T=new Element("a",{href:"javascript:void(0);",align:"center"}).setStyle({display:"inline"}).update(F[Q][O].Name);H.appendChild(W);H.onclick=this.chageSelectUn.bindAsEventListener(this);H.appendChild(T);I.appendChild(H)}J.appendChild(I);$("sp-searchSettings_page").appendChild(J)}}}else{$("sp-searchSettings-"+M).style.display="block";$("search-"+M.trim().toLowerCase()).addClassName("selected")}var P=$("sp-searchSettings-"+M).getElementsByTagName("a");for(var Q=0;Q<P.length;Q++){try{P[Q].alt="Click to Select";P[Q].title="Click to Select";Element.removeClassName(P[Q],"selected")}catch(R){}var S=dragableBox[K].box.xd.searchEngines.length.split(",");for(var N=0;N<S.length;N++){var A=S[N];if(S[N]==""){continue}var U=dragableBox[K].box.xd.searchEngines[N].Name.toLowerCase();if(dragableBox[K].box.xd.searchEngines[N].lang){U+=" ("+dragableBox[K].box.xd.searchEngines[N].lang.toLowerCase()+")";if(U==P[Q].innerHTML.toLowerCase()){P[Q].className="selected";P[Q].alt="Click to Unselect";P[Q].title="click to unselect";break}}else{if(U==P[Q].innerHTML.toLowerCase()){P[Q].className="selected";P[Q].alt="Click to Unselect";P[Q].title="click to unselect";break}}}}if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){Element.select(document.body,"select").invoke("setStyle",{visibility:"hidden"})}},chageSelectUn:function(I){var F="";var J=$("searchType").getElementsByTagName("li");for(var H=0;H<J.length;H++){var C=J[H].getElementsByTagName("a");if(C[0].className=="selected"){F=C[0].id;break}}if(F!="search-"+dragableBox[this.id].finalValue){return false}var G=I.srcElement||I.target;if(G.tagName!="LI"){G=G.parentNode}G=G.getElementsByTagName("a")[0];var E=true,D="saveData.aspx?mainType=websearch&mdlId="+dragableBox[this.id].mdlID;if(G.title.indexOf("unselect")==-1){D+="&sub=insertSearch&parNode=searchEngines&attributeName=enable&attributeValue=0&field=searchEngine";if(G.innerHTML.indexOf("Wikipedia")!=-1){var A=G.innerHTML;var B=A.indexOf(" (");D+="&value="+A.substring(0,B).toLowerCase();A=A.substring(B+2,A.indexOf(")"));D+="&lang="+A}else{D+="&value="+G.innerHTML.toLowerCase()}Element.addClassName(G,"selected");G.alt="Click to Unselect";G.title="click to unselect"}else{if(dragableBox[this.id].box.xd.searchEngines.length.split(",").length-1!=1){D+="&sub=deleteSearch";if(G.innerHTML.indexOf("(")!=-1){var A=G.innerHTML;var B=A.indexOf(" (");D+="&old="+A.substring(0,B).toLowerCase();A=A.substring(B+2,A.indexOf(")"));D+="&lang="+A}else{D+="&old="+G.innerHTML.toLowerCase()}G.alt="Click to Select";G.title="Click to Select";try{Element.removeClassName(G,"selected")}catch(I){str=I}}else{E=false;alert("Atleast, you must have one search Engine")}}if(E){if(dragableBox[this.id].direct){index=dragableBox[this.id].mainIndex.length;dragableBox[this.id].mainIndex[index]=new App.config(D,this);dragableBox[this.id].mainIndex[index].onCompletion=function(){var K=init.convertToJson(this.response);if(K){dragableBox[this.obj.id].box.xd=init.convertToJson(this.response);dragableBox[this.obj.id].gadget.addUL()}};dragableBox[this.id].mainIndex[index].runAJAX()}else{index=dragableBox[this.id].tmpIndex.length;dragableBox[this.id].tmpIndex[index]=new Array();dragableBox[this.id].tmpIndex[index]["0"]=D}}},hide:function(){$("sp-searchSettings").style.display="none";init.hideTransBox();if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){Element.select(document.body,"select").invoke("setStyle",{visibility:"visible"})}},showValues:function(){if(typeof (this.mainValue)=="undefined"){this.mainValue=t[t.length+1]}var H=this.innerHTML.trim().toLowerCase();$("sp-searchSettings_page").getElementsBySelector("div").invoke("setStyle",{display:"none"});$("searchType").getElementsBySelector("a").invoke("removeClassName","selected");var G=this.mainValue;if(!$("sp-searchSettings-"+H)){for(var C=0;C<G.length;C++){if(G[C].Name.toLowerCase()==H){var A=new Element("div",{id:"sp-searchSettings-"+H,"class":"listVibes"});var E=new Element("ul",{"class":"vibes"});for(var B=0;B<G[C].length;B++){var I=new Element("li");var D=new Element("img",{src:G[C][B].ICON,width:"16",height:"16"}).setStyle({width:"16px",height:"16px",verticalAlign:"top"});var F=new Element("a",{alt:"Click to select",title:"Click to select",align:"center",href:"javascript:void(0);"}).setStyle({display:"inline"}).update(G[C][B].Name);I.appendChild(D);I.onclick=searchSetting.chageSelectUn.bindAsEventListener(searchSetting);I.appendChild(F);E.appendChild(I)}A.appendChild(E);$("sp-searchSettings_page").appendChild(A)}}$("search-"+H.trim().toLowerCase()).addClassName("selected")}else{$("sp-searchSettings-"+H).style.display="block";$("search-"+H.trim().toLowerCase()).addClassName("selected")}}};App.gadgetOptionsAgent=Class.create();App.gadgetOptionsAgent.prototype={initialize:function(){this.bi=0},canMove:function(D,E,B,A,C,F){this.bi=D;this.ci=E;this.ri=B;this.mdlId=A;this.personal=C;this.defaultVal=F;if(!App.gadgetOptions){init.newScript("Javascript/gadgetOptions.js","gadgetOptions")}else{opt.canMove(D,E,B,A,C,F)}},makeCall:function(){opt=new App.gadgetOptions();opt.canMove(this.bi,this.ci,this.ri,this.mdlId,this.personal,this.defaultVal)}};App.signInOutLinkAgent=Class.create();App.signInOutLinkAgent.prototype={initialize:function(){},loadSignInOutPanel:function(B,A){this.sender=A;if(A=="signin"){if(typeof (t)=="undefined"&&clientSignInLink){window.location=clientSignInLink}else{if(typeof (t)!="undefined"&&t.signInLink){window.location=t.signInLink}else{this.loadJScript()}}}else{if(A=="signout"){this.loadJScript()}}},loadJScript:function(){if(!App.signInOutLink){init.newScript("Javascript/signInOut.js","signInOutLink")}else{signInOutLinkAgent.makeCall()}},makeCall:function(){if(this.sender=="signin"){signInOutLink.signIn(signInOutLink)}else{if(this.sender=="signout"){signInOutLink.signout(signInOutLink)}}}};window.onresize=function(){var E;if(App.Drag){return }if(appcolumns&&appcolumns.drag==true){return }if(loadInit){if($("transbox").style.display=="block"){if(init){init.showTransBox()}if($("sp-settings")){E=$("sp-settings")}else{if($("sp-signin")){E=$("sp-signin")}else{if($("sp-footerSplash")){E=$("sp-footerSplash")}else{if($("sp-registration")){E=$("sp-registration")}else{if($("StartWizard_Step1")&&$("StartWizard_Step1").style.display!="none"){E=$("StartWizard_Step1")}else{if($("StartWizard_Step2")&&$("StartWizard_Step2").style.display!="none"){E=$("StartWizard_Step2")}else{if($("StartWizard_Step3")&&$("StartWizard_Step3").style.display!="none"){E=$("StartWizard_Step3")}else{if($("StartWizard_Step4")&&$("StartWizard_Step3").style.display!="none"){E=$("StartWizard_Step4")}}}}}}}}if(E){var A=E.offsetWidth;var B=getPageSize();var D=(B[0]-A)/2;if(E.id.indexOf("StartWizard_Step")!=-1){$$("#StartWizard_Step1","#StartWizard_Step2","#StartWizard_Step3","#StartWizard_Step4").invoke("setStyle",{left:D+"px"})}else{E.style.left=D+"px"}}}}if(currentTab){currentTab.resize()}for(var C=0;C<dragableBox.length;C++){if(!dragableBox[C].gadget){return }if((dragableBox[C].finalValue=="alexa"||dragableBox[C].finalValue=="webnote"||dragableBox[C].finalValue=="todolist"||dragableBox[C].finalValue=="html"||dragableBox[C].finalValue=="flash")){dragableBox[C].gadget.resize()}else{if(dragableBox[C].finalValue=="imagesearch"){dragableBox[C].gadget.displayimageSearch("resize")}else{if(dragableBox[C].finalValue=="videosearch"){dragableBox[C].gadget.resizePlayer()}}}}};App.clearSelectData=function(){try{if(window.getSelection){if(BrowserDetect.browser=="Safari"){window.getSelection().collapse()}else{window.getSelection().removeAllRanges()}}else{if((document.selection)&&(document.selection.clear)){document.selection.clear()}}return true}catch(A){}};function $chk(A){return !!(A||A===0)}App.FixDrag=Class.create();App.FixDrag.prototype={initialize:function(){},getData:function(G){if(BrowserDetect.browser=="Explorer"){this.dragObjVal=new Array();var F=$("gadget"+G).getElementsByTagName("input");var E=0;for(var B=0;B<F.length;B++){if(F[B].type=="checkbox"){this.dragObjVal[E]=[];this.dragObjVal[E].name=F[B].id;this.dragObjVal[E].val=F[B].checked;E++}else{if(F[B].type=="radio"){var C=0;var A=0;var D=document.getElementsByName(F[B].name);if(D.length>1){for(C=0;C<D.length;C++){if(D[C].checked==true){this.dragObjVal[E]=[];this.dragObjVal[E].name=D[C].id;this.dragObjVal[E].val=D[C].checked;this.dragObjVal[E].index=C}}}else{this.dragObjVal[E]=[];this.dragObjVal[E].name=F[B].id;this.dragObjVal[E].val=F[B].checked}E++}}}}},setData:function(){if(BrowserDetect.browser=="Explorer"){var A=0;for(A=0;A<this.dragObjVal.length;A++){try{if(typeof (this.dragObjVal[A].index)=="undefined"){$(this.dragObjVal[A].name).checked=this.dragObjVal[A].val}else{document.getElementsByName(this.dragObjVal[A].name)[this.dragObjVal[A].index].checked=this.dragObjVal[A].val}}catch(B){}}}}};App.iApiAgent=Class.create();App.iApiAgent.prototype={initialize:function(){this.data={v1:"v1 data",v2:"v2 data",v3:"v3 data",v4:"v4 data",v5:"v5 data",v6:"v6 data",v7:"v7 data",v8:"v8 data",v9:"v9 data",v10:"v10 data",v11:"v11 data",v12:"v12 data",v13:"v13 data",v14:"v14 data",v15:"v15 data"}},getData:function(A){return(typeof (this.data[A])=="undefined")?null:this.data[A]}};var dragFix,searchSetting,registration,resetPassword,pageSearch,opt,pumps,signInOutLink,footerStaticLinks,validator,signInOutLinkAgent;var init,BASIC_MODE=true;var iApi=new App.iApiAgent();App.ad=Class.create();App.ad.prototype={initialize:function(){this.adTabs={};this.pushedAdIds=""},getAdSpots:function(F,D,C){this.rssObj=C;if(!loadInit||typeof t=="undefined"||!t){return""}if(typeof (t.adData)=="undefined"||t.adData.adFeeds.priorities.TotalAds==0){return""}var E="";for(var B=0;B<C.content.Data.length;B=B+D){var A=Math.floor(D*Math.random());A=A==0?1:A;A=A+B;E+=A.toString()+","}return E.trim(",")},isAdSpot:function(B){for(var A=0;A<this.rssObj.adPositions.length-1;A++){if(parseInt(this.rssObj.adPositions[A])==B){this.rssObj.adPositions.shift();return true}}return false},isGadgetAdSpot:function(){if(this.currentTabSpots<=0){return false}var A=this.getAdObject(this.currentTabSpots);return A},getCurrentTab:function(E){this.totalGadgets=dragableBox.length;for(var D=1;D<=t.length;D++){if(E){if(E.pi==t[D][3]){this.currentTab=t[D];break}}}this.currentTabGadgets=this.currentTab.box.length;this.currentTabSpots=this.getCurrentTabAdSpots(this.currentTabGadgets);if(currentTab&&init.convertBool(t[0][16])){if(E.boxes==""&&typeof (E.boxes)=="undefined"){return }var C=E.boxes.split(",");for(var B=0;B<C.length;B++){if(C[B]==""||C[B]=="undefined"){continue}if(dragableBox[C[B]]!=""){var A=adObject.pushAdInGadget(loadInit);if(A){this.appendAdDivInGadget(dragableBox[C[B]].bi,A,dragableBox[C[B]].gadgetID)}}}E.adPushed=true;this.registerGadgetAdImpression()}},isAdBlockedOnGadget:function(A){if(typeof (t.adData.blockAdOnGadgets)!="undefined"){var C=t.adData.blockAdOnGadgets.split(",");for(var B=0;B<C.length;B++){if(C[B].trim()==A.trim()){return true}}}},appendAdDivInGadget:function(F,B,A){if(this.isAdBlockedOnGadget(A)||shareG){return }var D=new Element("div",{"class":"gadgetContent"});D.style.cssText="text-align:left;margin:0px;padding:0px 0px 2px 5px;height:18px;";var E=new Element("div",{id:"adDiv"+F});E.style.cssText="text-align:left;margin:0px;padding:0px;";var G="adClick.aspx?mainType=cl&id="+B.adID+"&ucid="+isLogin.id+"&gadget="+A+"&url="+encodeURIComponent(B.URL);var C=new Element("a",{href:"javascript:void(0);"}).update("<img src="+B.Image+">");if(typeof (B.URL)!="undefined"&&B.URL!=""){C=new Element("a",{href:G,target:"_blank"}).update("<img src="+B.Image+">")}C.onmouseover=tooltip.showTooltip.bindAsEventListenerWithArgs(tooltip,"<p>"+B.Description+"</p><div style='text-align:right;'><a style='text-decoration:underline;' target='_blank' href='"+G+"'>Click this</a></div>",F,B.adID,B.Title,B.URL);C.onmouseout=tooltip.hideTooltip;if(typeof (currentTab)!="undefined"){currentTab.adPushed=true}this.pushedAdIds=this.pushedAdIds+B.adID+"~"+A+",";E.appendChild(C);D.appendChild(E);if(!$("adDivContainer"+F)){$("gadgetInner"+F).appendChild(D);this.currentTabSpots--}E.style.display=!t.adData.adsOnMouseOver?"block":"none"},getCurrentTabAdSpots:function(A){var B=(parseInt(t.adData.adsPerPagePercentage)*A)/100;return parseInt(B)},pushAdInGadget:function(A){return this.isGadgetAdSpot()},pushAd:function(C,G,E,B,D,F,H){if(!loadInit||typeof t=="undefined"||!t||!isLogin){return false}if(typeof (t.adData)=="undefined"){return false}if(G==parseInt(t.adData.adFeeds.priorities.TotalAds)){return false}if(H==F){return false}var A=false;if(this.isAdSpot(F)){A=this.getAdObject(D);if(A){if(C){C.innerHTML=A.Title;if(typeof (A.URL)!="undefined"&&A.URL!=""){C.href="adClick.aspx?mainType=cl&url="+encodeURIComponent(A.URL)+"&id="+A.adID+"&ucid="+isLogin.id+"&tkn="+cookieValue+"&gadget="+dragableBox[this.rssObj.bi].gadgetID+"&rnd="+new Date().getTime();C.target="_blank"}if(!init.convertBool(this.rssObj.isDetaild)){C.onmouseover=tooltip.showTooltip.bindAsEventListenerWithArgs(tooltip,A.Description,"feedAd",A.adID,A.Title,A.URL)}}this.rssObj.adIDs+=A.adID.toString()+","}}return A},isBlocked:function(B){if(typeof (t.blockedRssUrls)=="undefined"){return false}for(var C=0;C<t.blockedRssUrls.length;C++){if(t.blockedRssUrls[C].isString){if(B.trim()==t.blockedRssUrls[C].url.trim()){return true}}else{var A=new RegExp(t.blockedRssUrls[C].url.trim(),"gm");if(B.trim().match(A)){return true}}}return false},registerAdClick:function(A,C){var B="adClick.aspx?mainType=cl&id="+A.adID+"&gadget="+dragableBox[this.rssObj.bi].gadgetID+"&ucid="+isLogin.id;if(C){B="adClick.aspx?mainType=cl&id="+A.adID+"&gadget="+dragableBox[this.rssObj.bi].gadgetID+"&isReader=isReader&ucid="+isLogin.id}new App.config(B).runAJAX()},registerAdImpression:function(){if(typeof (this.rssObj.adIDs)=="undefined"||this.rssObj.adIDs==""){return }new App.config("adImpression.aspx?mainType=im&ids="+this.rssObj.adIDs+"&gadget="+dragableBox[this.rssObj.bi].finalValue).runAJAX()},registerGadgetAdImpression:function(){if(typeof (this.pushedAdIds)=="undefined"||this.pushedAdIds==""){return }new App.config("adImpression.aspx?mainType=im&ids="+this.pushedAdIds+"&gadget=1").runAJAX();this.pushedAdIds=""},getAdObject:function(A){return this.getRandomAd(this.getRandomPriorityAd())},getRandomPriorityAd:function(){var A=t.adData.ratio.split(":");var B=Math.floor(Math.random()*101);if(B<=parseInt(A[0])){if(t.adData.adFeeds.priorities.prio2.length==0){if(t.adData.adFeeds.priorities.prio1.length!=0){return 1}else{return 0}}return 2}else{if(B>parseInt(A[0])+parseInt(A[1])){if(t.adData.adFeeds.priorities.prio0.length==0){if(t.adData.adFeeds.priorities.prio2.length!=0){return 2}else{return 1}}return 0}else{if(t.adData.adFeeds.priorities.prio1.length==0){if(t.adData.adFeeds.priorities.prio2.length!=0){return 2}else{return 0}}return 1}}},getRandomAd:function(A){var C=0;var B={};if(A==2){C=Math.floor(Math.random()*t.adData.adFeeds.priorities.prio2.length);B=t.adData.adFeeds.priorities.prio2[C]}else{if(A==1){C=Math.floor(Math.random()*t.adData.adFeeds.priorities.prio1.length);B=t.adData.adFeeds.priorities.prio1[C]}else{C=Math.floor(Math.random()*t.adData.adFeeds.priorities.prio0.length);B=t.adData.adFeeds.priorities.prio0[C]}}return B}};var adObject=new App.ad();addDOMLoadEvent(function(){if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7){var A=setInterval(function(){if(document.readyState=="complete"){clearInterval(A);init=new App.init();_RESOURCES=init.convertToJson(_RESOURCES);txt_editLink=_RESOURCES.EditText;txt_editLink_stop=_RESOURCES.EndEditText;if(!shareG&&(cookieValue!=null||userCookie!=null||(isExternalUser&&!isFirstTime))){getClientSpecs()}}},100)}else{init=new App.init();_RESOURCES=init.convertToJson(_RESOURCES);txt_editLink=_RESOURCES.EditText;txt_editLink_stop=_RESOURCES.EndEditText;if(!shareG&&(cookieValue!=null||userCookie!=null||(isExternalUser&&!isFirstTime))){getClientSpecs()}}});function loadFooter(A){init.loadFooterPanel(init,A)}App.logoUrl=false;App.logoNavLink=false;App.signoutLink=false;App.isLogoAdded=false;App.isRegisterUser=false;App.isFirstTime=false;function getClientSpecs(){if(isFooterAdded){return }clientSpecs=new App.config("getData.aspx?mainType=clientSpecs");clientSpecs.onCompletion=function(){var A=this.response.evalJSON();if(A){if(A.leftNav&&A.leftNav!=""){$("leftNav").update(A.leftNav);$("leftNav").style.cssText="float:left;width:150px;display:block;";currentTab.resize()}if(A.footer&&A.footer!=""){$("footer").setStyle({display:"block"}).update(A.footer);init.footerLinks()}if(A.brandLogo&&A.brandLogo!=""){App.logoUrl=A.brandLogo;App.logoNavLink=A.brandLogoNavLink;clientLogo=App.logoUrl;setLogo(A.brandLogo,A.brandLogoNavLink);if(typeof (t)!="undefined"&&isExternalUser){setCustomUserSetting()}}}isFooterAdded=true};clientSpecs.runAJAX()}function setCustomUserSetting(){var C=false;var B=false;for(var A=0;A<t[1].box.length;A++){if(t[1].box[A][2].toUpperCase()=="CLIENTGADGET"){if(t[1].box[A].xd.v2&&typeof (t[1].box[A].xd.v2)!=undefined&&t[1].box[A].xd.v2!=""){C=t[1].box[A].xd.v2}if(t[1].box[A].xd.v1&&typeof (t[1].box[A].xd.v1)!=undefined&&t[1].box[A].xd.v1!=""){B=t[1].box[A].xd.v1}if(t[1].box[A].xd.v5&&typeof (t[1].box[A].xd.v5)!=undefined&&t[1].box[A].xd.v5!=""){App.signoutLink=t[1].box[A].xd.v5}break}}setLogo(B,C);App.isLogoAdded=true}function setLogo(A,B){if(!A){A=App.logoUrl}if(!B){B=App.logoNavLink==""?"#":App.logoNavLink}if(B!="#"){$("divlogo").setStyle({display:"block"}).update('<a href="'+B+'" target="_BLANK"><img src="'+A+'" /></a>')}else{$("divlogo").setStyle({display:"block"}).update('<a href="'+B+'" ><img src="'+A+'" /></a>')}if(App.logoUrl!=""){$("upperLinksContent").setStyle({display:"block",position:"absolute",top:"30px",right:"10px"})}}function loadJS(A){var C=document.getElementsByTagName("head")[0];var B=document.createElement("script");B.setAttribute("type","text/javascript");B.setAttribute("language","javascript");B.setAttribute("src",A);C.appendChild(B);return B};