
var Prototype={Version:'1.6.0.2',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(x){return x}};if(Prototype.Browser.MobileSafari)
Prototype.BrowserFeatures.SpecificElementExtensions=false;var Class={create:function(){var parent=null,properties=$A(arguments);if(Object.isFunction(properties[0]))
parent=properties.shift();function klass(){this.initialize.apply(this,arguments);}
Object.extend(klass,Class.Methods);klass.superclass=parent;klass.subclasses=[];if(parent){var subclass=function(){};subclass.prototype=parent.prototype;klass.prototype=new subclass;parent.subclasses.push(klass);}
for(var i=0;i<properties.length;i++)
klass.addMethods(properties[i]);if(!klass.prototype.initialize)
klass.prototype.initialize=Prototype.emptyFunction;klass.prototype.constructor=klass;return klass;}};Class.Methods={addMethods:function(source){var ancestor=this.superclass&&this.superclass.prototype;var properties=Object.keys(source);if(!Object.keys({toString:true}).length)
properties.push("toString","valueOf");for(var i=0,length=properties.length;i<length;i++){var property=properties[i],value=source[property];if(ancestor&&Object.isFunction(value)&&value.argumentNames().first()=="$super"){var method=value,value=Object.extend((function(m){return function(){return ancestor[m].apply(this,arguments)};})(property).wrap(method),{valueOf:function(){return method},toString:function(){return method.toString()}});}
this.prototype[property]=value;}
return this;}};var Abstract={};Object.extend=function(destination,source){for(var property in source)
destination[property]=source[property];return destination;};Object.extend(Object,{inspect:function(object){try{if(Object.isUndefined(object))return'undefined';if(object===null)return'null';return object.inspect?object.inspect():String(object);}catch(e){if(e instanceof RangeError)return'...';throw e;}},toJSON:function(object){var type=typeof object;switch(type){case'undefined':case'function':case'unknown':return;case'boolean':return object.toString();}
if(object===null)return'null';if(object.toJSON)return object.toJSON();if(Object.isElement(object))return;var results=[];for(var property in object){var value=Object.toJSON(object[property]);if(!Object.isUndefined(value))
results.push(property.toJSON()+': '+value);}
return'{'+results.join(', ')+'}';},toQueryString:function(object){return $H(object).toQueryString();},toHTML:function(object){return object&&object.toHTML?object.toHTML():String.interpret(object);},keys:function(object){var keys=[];for(var property in object)
keys.push(property);return keys;},values:function(object){var values=[];for(var property in object)
values.push(object[property]);return values;},clone:function(object){return Object.extend({},object);},isElement:function(object){return object&&object.nodeType==1;},isArray:function(object){return object!=null&&typeof object=="object"&&'splice'in object&&'join'in object;},isHash:function(object){return object instanceof Hash;},isFunction:function(object){return typeof object=="function";},isString:function(object){return typeof object=="string";},isNumber:function(object){return typeof object=="number";},isUndefined:function(object){return typeof object=="undefined";}});Object.extend(Function.prototype,{argumentNames:function(){var names=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return names.length==1&&!names[0]?[]:names;},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)));}},bindAsEventListener:function(){var __method=this,args=$A(arguments),object=args.shift();return function(event){return __method.apply(object,[event||window.event].concat(args));}},curry:function(){if(!arguments.length)return this;var __method=this,args=$A(arguments);return function(){return __method.apply(this,args.concat($A(arguments)));}},delay:function(){var __method=this,args=$A(arguments),timeout=args.shift()*1000;return window.setTimeout(function(){return __method.apply(__method,args);},timeout);},wrap:function(wrapper){var __method=this;return function(){return wrapper.apply(this,[__method.bind(this)].concat($A(arguments)));}},methodize:function(){if(this._methodized)return this._methodized;var __method=this;return this._methodized=function(){return __method.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"';};var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i<length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
return returnValue;}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(str){return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1');};var PeriodicalExecuter=Class.create({initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback();},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},execute:function(){this.callback(this);},stop:function(){if(!this.timer)return;clearInterval(this.timer);this.timer=null;},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute();}finally{this.currentlyExecuting=false;}}}});Object.extend(String,{interpret:function(value){return value==null?'':String(value);},specialChar:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','\\':'\\\\'}});Object.extend(String.prototype,{gsub:function(pattern,replacement){var result='',source=this,match;replacement=arguments.callee.prepareReplacement(replacement);while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length);}else{result+=source,source='';}}
return result;},sub:function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=Object.isUndefined(count)?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern,iterator);return String(this);},truncate:function(length,truncation){length=length||30;truncation=Object.isUndefined(truncation)?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this);},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'');},normalize_space:function(){return this.replace(/^\s*|\s(?=\s)|\s*$/g,"");},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');},extractScripts:function(){var matchAll=new RegExp(Prototype.ScriptFragment,'img');var matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)});},escapeHTML:function(){var self=arguments.callee;self.text.data=this;return self.div.innerHTML;},unescapeHTML:function(){var div=new Element('div');div.innerHTML=this.stripTags();return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject('',function(memo,node){return memo+node.nodeValue}):div.childNodes[0].nodeValue):'';},toQueryParams:function(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var key=decodeURIComponent(pair.shift());var value=pair.length>1?pair.join('='):pair[0];if(value!=undefined)value=decodeURIComponent(value);if(key in hash){if(!Object.isArray(hash[key]))hash[key]=[hash[key]];hash[key].push(value);}
else hash[key]=value;}
return hash;});},toArray:function(){return this.split('');},succ:function(){return this.slice(0,this.length-1)+
String.fromCharCode(this.charCodeAt(this.length-1)+1);},times:function(count){return count<1?'':new Array(count+1).join(this);},camelize:function(){var parts=this.split('-'),len=parts.length;if(len==1)return parts[0];var camelized=this.charAt(0)=='-'?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i<len;i++)
camelized+=parts[i].charAt(0).toUpperCase()+parts[i].substring(1);return camelized;},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(useDoubleQuotes){var escapedString=this.gsub(/[\x00-\x1f\\]/,function(match){var character=String.specialChar[match[0]];return character?character:'\\u00'+match[0].charCodeAt().toPaddedString(2,16);});if(useDoubleQuotes)return'"'+escapedString.replace(/"/g,'\\"')+'"';return"'"+escapedString.replace(/'/g,'\\\'')+"'";},toJSON:function(){return this.inspect(true);},unfilterJSON:function(filter){return this.sub(filter||Prototype.JSONFilter,'#{1}');},isJSON:function(){var str=this;if(str.blank())return false;str=this.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,'');return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON())return eval('('+json+')');}catch(e){}
throw new SyntaxError('Badly formed JSON string: '+this.inspect());},include:function(pattern){return this.indexOf(pattern)>-1;},startsWith:function(pattern){return this.indexOf(pattern)===0;},endsWith:function(pattern){var d=this.length-pattern.length;return d>=0&&this.lastIndexOf(pattern)===d;},empty:function(){return this=='';},blank:function(){return/^\s*$/.test(this);},interpolate:function(object,pattern){return new Template(this,pattern).evaluate(object);}});if(Prototype.Browser.WebKit||Prototype.Browser.IE)Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');},unescapeHTML:function(){return this.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');}});String.prototype.gsub.prepareReplacement=function(replacement){if(Object.isFunction(replacement))return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match)};};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement('div'),text:document.createTextNode('')});with(String.prototype.escapeHTML)div.appendChild(text);var Template=Class.create({initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern;},evaluate:function(object){if(Object.isFunction(object.toTemplateReplacements))
object=object.toTemplateReplacements();return this.template.gsub(this.pattern,function(match){if(object==null)return'';var before=match[1]||'';if(before=='\\')return match[2];var ctx=object,expr=match[3];var pattern=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;match=pattern.exec(expr);if(match==null)return before;while(match!=null){var comp=match[1].startsWith('[')?match[2].gsub('\\\\]',']'):match[1];ctx=ctx[comp];if(null==ctx||''==match[3])break;expr=expr.substring('['==match[3]?match[1].length:match[0].length);match=pattern.exec(expr);}
return before+String.interpret(ctx);});}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(iterator,context){var index=0;iterator=iterator.bind(context);try{this._each(function(value){iterator(value,index++);});}catch(e){if(e!=$break)throw e;}
return this;},eachSlice:function(number,iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var index=-number,slices=[],array=this.toArray();while((index+=number)<array.length)
slices.push(array.slice(index,index+number));return slices.collect(iterator,context);},all:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var result=true;this.each(function(value,index){result=result&&!!iterator(value,index);if(!result)throw $break;});return result;},any:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var result=false;this.each(function(value,index){if(result=!!iterator(value,index))
throw $break;});return result;},collect:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var results=[];this.each(function(value,index){results.push(iterator(value,index));});return results;},detect:function(iterator,context){iterator=iterator.bind(context);var result;this.each(function(value,index){if(iterator(value,index)){result=value;throw $break;}});return result;},findAll:function(iterator,context){iterator=iterator.bind(context);var results=[];this.each(function(value,index){if(iterator(value,index))
results.push(value);});return results;},grep:function(filter,iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var results=[];if(Object.isString(filter))
filter=new RegExp(filter);this.each(function(value,index){if(filter.match(value))
results.push(iterator(value,index));});return results;},include:function(object){if(Object.isFunction(this.indexOf))
if(this.indexOf(object)!=-1)return true;var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;},inGroupsOf:function(number,fillWith){fillWith=Object.isUndefined(fillWith)?null:fillWith;return this.eachSlice(number,function(slice){while(slice.length<number)slice.push(fillWith);return slice;});},inject:function(memo,iterator,context){iterator=iterator.bind(context);this.each(function(value,index){memo=iterator(memo,value,index);});return memo;},invoke:function(method){var args=$A(arguments).slice(1);return this.map(function(value){return value[method].apply(value,args);});},max:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var result;this.each(function(value,index){value=iterator(value,index);if(result==null||value>=result)
result=value;});return result;},min:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var result;this.each(function(value,index){value=iterator(value,index);if(result==null||value<result)
result=value;});return result;},partition:function(iterator,context){iterator=iterator?iterator.bind(context):Prototype.K;var trues=[],falses=[];this.each(function(value,index){(iterator(value,index)?trues:falses).push(value);});return[trues,falses];},pluck:function(property){var results=[];this.each(function(value){results.push(value[property]);});return results;},reject:function(iterator,context){iterator=iterator.bind(context);var results=[];this.each(function(value,index){if(!iterator(value,index))
results.push(value);});return results;},sortBy:function(iterator,context){iterator=iterator.bind(context);return this.map(function(value,index){return{value:value,criteria:iterator(value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');},toArray:function(){return this.map();},zip:function(){var iterator=Prototype.K,args=$A(arguments);if(Object.isFunction(args.last()))
iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});},size:function(){return this.toArray().length;},inspect:function(){return'#<Enumerable:'+this.toArray().inspect()+'>';}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(iterable){if(!iterable)return[];if(iterable.toArray)return iterable.toArray();var length=iterable.length||0,results=new Array(length);while(length--)results[length]=iterable[length];return results;}
if(Prototype.Browser.WebKit){$A=function(iterable){if(!iterable)return[];if(!(Object.isFunction(iterable)&&iterable=='[object NodeList]')&&iterable.toArray)return iterable.toArray();var length=iterable.length||0,results=new Array(length);while(length--)results[length]=iterable[length];return results;};}
Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0,length=this.length;i<length;i++)
iterator(this[i]);},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(value){return value!=null;});},flatten:function(){return this.inject([],function(array,value){return array.concat(Object.isArray(value)?value.flatten():[value]);});},without:function(){var values=$A(arguments);return this.select(function(value){return!values.include(value);});},reverse:function(inline){return(inline!==false?this:this.toArray())._reverse();},reduce:function(){return this.length>1?this:this[0];},uniq:function(sorted){return this.inject([],function(array,value,index){if(0==index||(sorted?array.last()!=value:!array.include(value)))
array.push(value);return array;});},intersect:function(array){return this.uniq().findAll(function(item){return array.detect(function(value){return item===value});});},clone:function(){return[].concat(this);},size:function(){return this.length;},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']';},toJSON:function(){var results=[];this.each(function(object){var value=Object.toJSON(object);if(!Object.isUndefined(value))results.push(value);});return'['+results.join(', ')+']';}});if(Object.isFunction(Array.prototype.forEach))
Array.prototype._each=Array.prototype.forEach;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(item,i){i||(i=0);var length=this.length;if(i<0)i=length+i;for(;i<length;i++)
if(this[i]===item)return i;return-1;};if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(item,i){i=isNaN(i)?this.length:(i<0?this.length+i:i)+1;var n=this.slice(0,i).reverse().indexOf(item);return(n<0)?n:i-n-1;};Array.prototype.toArray=Array.prototype.clone;function $w(string){if(!Object.isString(string))return[];string=string.strip();return string?string.split(/\s+/):[];}
if(Prototype.Browser.Opera){Array.prototype.concat=function(){var array=[];for(var i=0,length=this.length;i<length;i++)array.push(this[i]);for(var i=0,length=arguments.length;i<length;i++){if(Object.isArray(arguments[i])){for(var j=0,arrayLength=arguments[i].length;j<arrayLength;j++)
array.push(arguments[i][j]);}else{array.push(arguments[i]);}}
return array;};}
Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16);},succ:function(){return this+1;},times:function(iterator){$R(0,this,true).each(iterator);return this;},toPaddedString:function(length,radix){var string=this.toString(radix||10);return'0'.times(length-string.length)+string;},toJSON:function(){return isFinite(this)?this.toString():'null';}});$w('abs round ceil floor').each(function(method){Number.prototype[method]=Math[method].methodize();});function $H(object){return new Hash(object);};var Hash=Class.create(Enumerable,(function(){function toQueryPair(key,value){if(Object.isUndefined(value))return key;return key+'='+encodeURIComponent(String.interpret(value));}
return{initialize:function(object){this._object=Object.isHash(object)?object.toObject():Object.clone(object);},_each:function(iterator){for(var key in this._object){var value=this._object[key],pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}},set:function(key,value){return this._object[key]=value;},get:function(key){return this._object[key];},unset:function(key){var value=this._object[key];delete this._object[key];return value;},toObject:function(){return Object.clone(this._object);},keys:function(){return this.pluck('key');},values:function(){return this.pluck('value');},index:function(value){var match=this.detect(function(pair){return pair.value===value;});return match&&match.key;},merge:function(object){return this.clone().update(object);},update:function(object){return new Hash(object).inject(this,function(result,pair){result.set(pair.key,pair.value);return result;});},toQueryString:function(){return this.map(function(pair){var key=encodeURIComponent(pair.key),values=pair.value;if(values&&typeof values=='object'){if(Object.isArray(values))
return values.map(toQueryPair.curry(key)).join('&');}
return toQueryPair(key,values);}).join('&');},inspect:function(){return'#<Hash:{'+this.map(function(pair){return pair.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(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;},_each:function(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ();}},include:function(value){if(value<this.start)
return false;if(this.exclusive)
return value<this.end;return value<=this.end;}});var $R=function(start,end,exclusive){return new ObjectRange(start,end,exclusive);};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(iterator){this.responders._each(iterator);},register:function(responder){if(!this.include(responder))
this.responders.push(responder);},unregister:function(responder){this.responders=this.responders.without(responder);},dispatch:function(callback,request,transport,json){this.each(function(responder){if(Object.isFunction(responder[callback])){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(options){this.options={method:'post',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:'',evalJSON:true,evalJS:true};Object.extend(this.options,options||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters))
this.options.parameters=this.options.parameters.toQueryParams();else if(Object.isHash(this.options.parameters))
this.options.parameters=this.options.parameters.toObject();}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,url,options){$super(options);this.transport=Ajax.getTransport();this.request(url);},request:function(url){this.url=url;this.method=this.options.method;var params=Object.clone(this.options.parameters);if(!['get','post'].include(this.method)){params['_method']=this.method;this.method='post';}
this.parameters=params;if(params=Object.toQueryString(params)){if(this.method=='get')
this.url+=(this.url.include('?')?'&':'?')+params;else if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
params+='&_=';}
try{var response=new Ajax.Response(this);if(this.options.onCreate)this.options.onCreate(response);Ajax.Responders.dispatch('onCreate',this,response);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous)this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=='post'?(this.options.postBody||params):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType)
this.onStateChange();}
catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete))
this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.method=='post'){headers['Content-type']=this.options.contentType+
(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)
headers['Connection']='close';}
if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(Object.isFunction(extras.push))
for(var i=0,length=extras.length;i<length;i+=2)
headers[extras[i]]=extras[i+1];else
$H(extras).each(function(pair){headers[pair.key]=pair.value});}
for(var name in headers)
this.transport.setRequestHeader(name,headers[name]);},success:function(){var status=this.getStatus();return!status||(status>=200&&status<300);},getStatus:function(){try{return this.transport.status||0;}catch(e){return 0}},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState],response=new Ajax.Response(this);if(state=='Complete'){try{this._complete=true;(this.options['on'+response.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(response,response.headerJSON);}catch(e){this.dispatchException(e);}
var contentType=response.getHeader('Content-type');if(this.options.evalJS=='force'||(this.options.evalJS&&this.isSameOrigin()&&contentType&&contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
this.evalResponse();}
try{(this.options['on'+state]||Prototype.emptyFunction)(response,response.headerJSON);Ajax.Responders.dispatch('on'+state,this,response,response.headerJSON);}catch(e){this.dispatchException(e);}
if(state=='Complete'){this.transport.onreadystatechange=Prototype.emptyFunction;}},isSameOrigin:function(){var m=this.url.match(/^\s*https?:\/\/[^\/]*/);return!m||(m[0]=='#{protocol}//#{domain}#{port}'.interpolate({protocol:location.protocol,domain:document.domain,port:location.port?':'+location.port:''}));},getHeader:function(name){try{return this.transport.getResponseHeader(name)||null;}catch(e){return null}},evalResponse:function(){try{return eval((this.transport.responseText||'').unfilterJSON());}catch(e){this.dispatchException(e);}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Response=Class.create({initialize:function(request){this.request=request;var transport=this.transport=request.transport,readyState=this.readyState=transport.readyState;if((readyState>2&&!Prototype.Browser.IE)||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(transport.responseText);this.headerJSON=this._getHeaderJSON();}
if(readyState==4){var xml=transport.responseXML;this.responseXML=Object.isUndefined(xml)?null:xml;this.responseJSON=this._getResponseJSON();}},status:0,statusText:'',getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||'';}catch(e){return''}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders();}catch(e){return null}},getResponseHeader:function(name){return this.transport.getResponseHeader(name);},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders();},_getHeaderJSON:function(){var json=this.getHeader('X-JSON');if(!json)return null;json=decodeURIComponent(escape(json));try{return json.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin());}catch(e){this.request.dispatchException(e);}},_getResponseJSON:function(){var options=this.request.options;if(!options.evalJSON||(options.evalJSON!='force'&&!(this.getHeader('Content-type')||'').include('application/json'))||this.responseText.blank())
return null;try{return this.responseText.evalJSON(options.sanitizeJSON||!this.request.isSameOrigin());}catch(e){this.request.dispatchException(e);}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))};options=Object.clone(options);var onComplete=options.onComplete;options.onComplete=(function(response,json){this.updateContent(response.responseText);if(Object.isFunction(onComplete))onComplete(response,json);}).bind(this);$super(url,options);},updateContent:function(responseText){var receiver=this.container[this.success()?'success':'failure'],options=this.options;if(!options.evalScripts)responseText=responseText.stripScripts();if(receiver=$(receiver)){if(options.insertion){if(Object.isString(options.insertion)){var insertion={};insertion[options.insertion]=responseText;receiver.insert(insertion);}
else options.insertion(receiver,responseText);}
else receiver.update(responseText);}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,container,url,options){$super(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(response){if(this.options.decay){this.decay=(response.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=response.responseText;}
this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)
elements.push($(arguments[i]));return elements;}
if(Object.isString(element))
element=document.getElementById(element);return Element.extend(element);}
if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(expression,parentElement){var results=[];var query=document.evaluate(expression,$(parentElement)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=query.snapshotLength;i<length;i++)
results.push(Element.extend(query.snapshotItem(i)));return results;};}
if(!window.Node)var Node={};if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12});}
(function(){var element=this.Element;this.Element=function(tagName,attributes){attributes=attributes||{};tagName=tagName.toLowerCase();var cache=Element.cache;if(Prototype.Browser.IE&&attributes.name){tagName='<'+tagName+' name="'+attributes.name+'">';delete attributes.name;return Element.writeAttribute(document.createElement(tagName),attributes);}
if(!cache[tagName])cache[tagName]=Element.extend(document.createElement(tagName));return Element.writeAttribute(cache[tagName].cloneNode(false),attributes);};Object.extend(this.Element,element||{});}).call(window);Element.cache={};Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){$(element).style.display='none';return element;},show:function(element){$(element).style.display='';return element;},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element;},update:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content))return element.update().insert(content);content=Object.toHTML(content);element.innerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element;},replace:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();else if(!Object.isElement(content)){content=Object.toHTML(content);var range=element.ownerDocument.createRange();range.selectNode(element);content.evalScripts.bind(content).defer();content=range.createContextualFragment(content.stripScripts());}
element.parentNode.replaceChild(content,element);return element;},insert:function(element,insertions){element=$(element);if(Object.isString(insertions)||Object.isNumber(insertions)||Object.isElement(insertions)||(insertions&&(insertions.toElement||insertions.toHTML)))
insertions={bottom:insertions};var content,insert,tagName,childNodes;for(var position in insertions){content=insertions[position];position=position.toLowerCase();insert=Element._insertionTranslations[position];if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){insert(element,content);continue;}
content=Object.toHTML(content);tagName=((position=='before'||position=='after')?element.parentNode:element).tagName.toUpperCase();childNodes=Element._getContentFromAnonymousElement(tagName,content.stripScripts());if(position=='top'||position=='after')childNodes.reverse();childNodes.each(insert.curry(element));content.evalScripts.bind(content).defer();}
return element;},wrap:function(element,wrapper,attributes){element=$(element);if(Object.isElement(wrapper))
$(wrapper).writeAttribute(attributes||{});else if(Object.isString(wrapper))wrapper=new Element(wrapper,attributes);else wrapper=new Element('div',wrapper);if(element.parentNode)
element.parentNode.replaceChild(wrapper,element);wrapper.appendChild(element);return wrapper;},inspect:function(element){element=$(element);var result='<'+element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last();var value=(element[property]||'').toString();if(value)result+=' '+attribute+'='+value.inspect(true);});return result+'>';},recursivelyCollect:function(element,property){element=$(element);var elements=[];while(element=element[property])
if(element.nodeType==1)
elements.push(Element.extend(element));return elements;},ancestors:function(element){return $(element).recursivelyCollect('parentNode');},descendants:function(element){return $(element).select("*");},firstDescendant:function(element){element=$(element).firstChild;while(element&&element.nodeType!=1)element=element.nextSibling;return $(element);},immediateDescendants:function(element){if(!(element=$(element).firstChild))return[];while(element&&element.nodeType!=1)element=element.nextSibling;if(element)return[element].concat($(element).nextSiblings());return[];},previousSiblings:function(element){return $(element).recursivelyCollect('previousSibling');},nextSiblings:function(element){return $(element).recursivelyCollect('nextSibling');},siblings:function(element){element=$(element);return element.previousSiblings().reverse().concat(element.nextSiblings());},match:function(element,selector){if(Object.isString(selector))
selector=new Selector(selector);return selector.match($(element));},up:function(element,expression,index){element=$(element);if(arguments.length==1)return $(element.parentNode);var ancestors=element.ancestors();return Object.isNumber(expression)?ancestors[expression]:Selector.findElement(ancestors,expression,index);},down:function(element,expression,index){element=$(element);if(arguments.length==1)return element.firstDescendant();return Object.isNumber(expression)?element.descendants()[expression]:element.select(expression)[index||0];},previous:function(element,expression,index){element=$(element);if(arguments.length==1)return $(Selector.handlers.previousElementSibling(element));var previousSiblings=element.previousSiblings();return Object.isNumber(expression)?previousSiblings[expression]:Selector.findElement(previousSiblings,expression,index);},next:function(element,expression,index){element=$(element);if(arguments.length==1)return $(Selector.handlers.nextElementSibling(element));var nextSiblings=element.nextSiblings();return Object.isNumber(expression)?nextSiblings[expression]:Selector.findElement(nextSiblings,expression,index);},select:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element,args);},adjacent:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element.parentNode,args).without(element);},identify:function(element){element=$(element);var id=element.readAttribute('id'),self=arguments.callee;if(id)return id;do{id='anonymous_element_'+self.counter++}while($(id));element.writeAttribute('id',id);return id;},readAttribute:function(element,name){element=$(element);if(Prototype.Browser.IE){var t=Element._attributeTranslations.read;if(t.values[name])return t.values[name](element,name);if(t.names[name])name=t.names[name];if(name.include(':')){return(!element.attributes||!element.attributes[name])?null:element.attributes[name].value;}}
return element.getAttribute(name);},writeAttribute:function(element,name,value){element=$(element);var attributes={},t=Element._attributeTranslations.write;if(typeof name=='object')attributes=name;else attributes[name]=Object.isUndefined(value)?true:value;for(var attr in attributes){name=t.names[attr]||attr;value=attributes[attr];if(t.values[attr])name=t.values[attr](element,value);if(value===false||value===null)
element.removeAttribute(name);else if(value===true)
element.setAttribute(name,name);else element.setAttribute(name,value);}
return element;},getHeight:function(element){return $(element).getDimensions().height;},getWidth:function(element){return $(element).getDimensions().width;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;return(elementClassName.length>0&&(elementClassName==className||new RegExp("(^|\\s)"+className+"(\\s|$)").test(elementClassName)));},addClassName:function(element,className){if(!(element=$(element)))return;if(!element.hasClassName(className))
element.className+=(element.className?' ':'')+className;return element;},removeClassName:function(element,className){if(!(element=$(element)))return;element.className=element.className.replace(new RegExp("(^|\\s+)"+className+"(\\s+|$)"),' ').strip();return element;},toggleClassName:function(element,className){if(!(element=$(element)))return;return element[element.hasClassName(className)?'removeClassName':'addClassName'](className);},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue))
element.removeChild(node);node=nextNode;}
return element;},empty:function(element){return $(element).innerHTML.blank();},descendantOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);var originalAncestor=ancestor;if(element.compareDocumentPosition)
return(element.compareDocumentPosition(ancestor)&8)===8;if(element.sourceIndex&&!Prototype.Browser.Opera){var e=element.sourceIndex,a=ancestor.sourceIndex,nextAncestor=ancestor.nextSibling;if(!nextAncestor){do{ancestor=ancestor.parentNode;}
while(!(nextAncestor=ancestor.nextSibling)&&ancestor.parentNode);}
if(nextAncestor&&nextAncestor.sourceIndex)
return(e>a&&e<nextAncestor.sourceIndex);}
while(element=element.parentNode)
if(element==originalAncestor)return true;return false;},scrollTo:function(element){element=$(element);var pos=element.cumulativeOffset();window.scrollTo(pos[0],pos[1]);return element;},getStyle:function(element,style){element=$(element);style=style=='float'?'cssFloat':style.camelize();var value=element.style[style];if(!value){var css=document.defaultView.getComputedStyle(element,null);value=css?css[style]:null;}
if(style=='opacity')return value?parseFloat(value):1.0;return value=='auto'?null:value;},getOpacity:function(element){return $(element).getStyle('opacity');},setStyle:function(element,styles){element=$(element);var elementStyle=element.style,match;if(Object.isString(styles)){element.style.cssText+=';'+styles;return styles.include('opacity')?element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]):element;}
for(var property in styles)
if(property=='opacity')element.setOpacity(styles[property]);else
elementStyle[(property=='float'||property=='cssFloat')?(Object.isUndefined(elementStyle.styleFloat)?'cssFloat':'styleFloat'):property]=styles[property];return element;},setOpacity:function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;return element;},getDimensions:function(element){element=$(element);var display=$(element).getStyle('display');if(display!='none'&&display!=null)
return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;var originalDisplay=els.display;els.visibility='hidden';els.position='absolute';els.display='block';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display=originalDisplay;els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(window.opera){element.style.top=0;element.style.left=0;}}
return element;},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right='';}
return element;},makeClipping:function(element){element=$(element);if(element._overflow)return element;element._overflow=Element.getStyle(element,'overflow')||'auto';if(element._overflow!=='hidden')
element.style.overflow='hidden';return element;},undoClipping:function(element){element=$(element);if(!element._overflow)return element;element.style.overflow=element._overflow=='auto'?'':element._overflow;element._overflow=null;return element;},cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return Element._returnOffset(valueL,valueT);},positionedOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){if(element.tagName=='BODY')break;var p=Element.getStyle(element,'position');if(p!=='static')break;}}while(element);return Element._returnOffset(valueL,valueT);},absolutize:function(element){element=$(element);if(element.getStyle('position')=='absolute')return;var offsets=element.positionedOffset();var top=offsets[1];var left=offsets[0];var width=element.clientWidth;var height=element.clientHeight;element._originalLeft=left-parseFloat(element.style.left||0);element._originalTop=top-parseFloat(element.style.top||0);element._originalWidth=element.style.width;element._originalHeight=element.style.height;element.style.position='absolute';element.style.top=top+'px';element.style.left=left+'px';element.style.width=width+'px';element.style.height=height+'px';return element;},relativize:function(element){element=$(element);if(element.getStyle('position')=='relative')return;element.style.position='relative';var top=parseFloat(element.style.top||0)-(element._originalTop||0);var left=parseFloat(element.style.left||0)-(element._originalLeft||0);element.style.top=top+'px';element.style.left=left+'px';element.style.height=element._originalHeight;element.style.width=element._originalWidth;return element;},cumulativeScrollOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode;}while(element);return Element._returnOffset(valueL,valueT);},getOffsetParent:function(element){if(element.offsetParent)return $(element.offsetParent);if(element==document.body)return $(element);while((element=element.parentNode)&&element!=document.body)
if(Element.getStyle(element,'position')!='static')
return $(element);return $(document.body);},viewportOffset:function(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body&&Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{if(!Prototype.Browser.Opera||element.tagName=='BODY'){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}}while(element=element.parentNode);return Element._returnOffset(valueL,valueT);},clonePosition:function(element,source){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});source=$(source);var p=source.viewportOffset();element=$(element);var delta=[0,0];var parent=null;if(Element.getStyle(element,'position')=='absolute'){parent=element.getOffsetParent();delta=parent.viewportOffset();}
if(parent==document.body){delta[0]-=document.body.offsetLeft;delta[1]-=document.body.offsetTop;}
if(options.setLeft)element.style.left=(p[0]-delta[0]+options.offsetLeft)+'px';if(options.setTop)element.style.top=(p[1]-delta[1]+options.offsetTop)+'px';if(options.setWidth)element.style.width=source.offsetWidth+'px';if(options.setHeight)element.style.height=source.offsetHeight+'px';return element;}};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(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(proceed,element,style){switch(style){case'left':case'top':case'right':case'bottom':if(proceed(element,'position')==='static')return null;case'height':case'width':if(!Element.visible(element))return null;var dim=parseInt(proceed(element,style),10);if(dim!==element['offset'+style.capitalize()])
return dim+'px';var properties;if(style==='height'){properties=['border-top-width','padding-top','padding-bottom','border-bottom-width'];}
else{properties=['border-left-width','padding-left','padding-right','border-right-width'];}
return properties.inject(dim,function(memo,property){var val=proceed(element,property);return val===null?memo:memo-parseInt(val,10);})+'px';default:return proceed(element,style);}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(proceed,element,attribute){if(attribute==='title')return element.title;return proceed(element,attribute);});}
else if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(proceed,element){element=$(element);var position=element.getStyle('position');if(position!=='static')return proceed(element);element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value;});$w('positionedOffset viewportOffset').each(function(method){Element.Methods[method]=Element.Methods[method].wrap(function(proceed,element){element=$(element);var position=element.getStyle('position');if(position!=='static')return proceed(element);var offsetParent=element.getOffsetParent();if(offsetParent&&offsetParent.getStyle('position')==='fixed')
offsetParent.setStyle({zoom:1});element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value;});});Element.Methods.getStyle=function(element,style){element=$(element);style=(style=='float'||style=='cssFloat')?'styleFloat':style.camelize();var value=element.style[style];if(!value&&element.currentStyle)value=element.currentStyle[style];if(style=='opacity'){if(value=(element.getStyle('filter')||'').match(/alpha\(opacity=(.*)\)/))
if(value[1])return parseFloat(value[1])/100;return 1.0;}
if(value=='auto'){if((style=='width'||style=='height')&&(element.getStyle('display')!='none'))
return element['offset'+style.capitalize()]+'px';return null;}
return value;};Element.Methods.setOpacity=function(element,value){function stripAlpha(filter){return filter.replace(/alpha\([^\)]*\)/gi,'');}
element=$(element);var currentStyle=element.currentStyle;if((currentStyle&&!currentStyle.hasLayout)||(!currentStyle&&element.style.zoom=='normal'))
element.style.zoom=1;var filter=element.getStyle('filter'),style=element.style;if(value==1||value===''){(filter=stripAlpha(filter))?style.filter=filter:style.removeAttribute('filter');return element;}else if(value<0.00001)value=0;style.filter=stripAlpha(filter)+'alpha(opacity='+(value*100)+')';return element;};Element._attributeTranslations={read:{names:{'class':'className','for':'htmlFor'},values:{_getAttr:function(element,attribute){return element.getAttribute(attribute,2);},_getAttrNode:function(element,attribute){var node=element.getAttributeNode(attribute);return node?node.value:"";},_getEv:function(element,attribute){attribute=element.getAttribute(attribute);return attribute?attribute.toString().slice(23,-2):null;},_flag:function(element,attribute){return $(element).hasAttribute(attribute)?attribute:null;},style:function(element){return element.style.cssText.toLowerCase();},title:function(element){return element.title;}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:'cellPadding',cellspacing:'cellSpacing'},Element._attributeTranslations.read.names),values:{checked:function(element,value){element.checked=!!value;},style:function(element,value){element.style.cssText=value?value:'';}}};Element._attributeTranslations.has={};$w('colSpan rowSpan vAlign dateTime accessKey tabIndex '+'encType maxLength readOnly longDesc').each(function(attr){Element._attributeTranslations.write.names[attr.toLowerCase()]=attr;Element._attributeTranslations.has[attr.toLowerCase()]=attr;});(function(v){Object.extend(v,{href:v._getAttr,src:v._getAttr,type:v._getAttr,action:v._getAttrNode,disabled:v._flag,checked:v._flag,readonly:v._flag,multiple:v._flag,onload:v._getEv,onunload:v._getEv,onclick:v._getEv,ondblclick:v._getEv,onmousedown:v._getEv,onmouseup:v._getEv,onmouseover:v._getEv,onmousemove:v._getEv,onmouseout:v._getEv,onfocus:v._getEv,onblur:v._getEv,onkeypress:v._getEv,onkeydown:v._getEv,onkeyup:v._getEv,onsubmit:v._getEv,onreset:v._getEv,onselect:v._getEv,onchange:v._getEv});})(Element._attributeTranslations.read.values);}
else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1)?0.999999:(value==='')?'':(value<0.00001)?0:value;return element;};}
else if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;if(value==1)
if(element.tagName=='IMG'&&element.width){element.width++;element.width--;}else try{var n=document.createTextNode(' ');element.appendChild(n);element.removeChild(n);}catch(e){}
return element;};Element.Methods.cumulativeOffset=function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)
if(Element.getStyle(element,'position')=='absolute')break;element=element.offsetParent;}while(element);return Element._returnOffset(valueL,valueT);};}
if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content))return element.update().insert(content);content=Object.toHTML(content);var tagName=element.tagName.toUpperCase();if(tagName in Element._insertionTranslations.tags){$A(element.childNodes).each(function(node){element.removeChild(node)});Element._getContentFromAnonymousElement(tagName,content.stripScripts()).each(function(node){element.appendChild(node)});}
else element.innerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element;};}
if('outerHTML'in document.createElement('div')){Element.Methods.replace=function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){element.parentNode.replaceChild(content,element);return element;}
content=Object.toHTML(content);var parent=element.parentNode,tagName=parent.tagName.toUpperCase();if(Element._insertionTranslations.tags[tagName]){var nextSibling=element.next();var fragments=Element._getContentFromAnonymousElement(tagName,content.stripScripts());parent.removeChild(element);if(nextSibling)
fragments.each(function(node){parent.insertBefore(node,nextSibling)});else
fragments.each(function(node){parent.appendChild(node)});}
else element.outerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element;};}
Element._returnOffset=function(l,t){var result=[l,t];result.left=l;result.top=t;return result;};Element._getContentFromAnonymousElement=function(tagName,html){var div=new Element('div'),t=Element._insertionTranslations.tags[tagName];if(t){div.innerHTML=t[0]+html+t[1];t[2].times(function(){div=div.firstChild});}else div.innerHTML=html;return $A(div.childNodes);};Element._insertionTranslations={before:function(element,node){element.parentNode.insertBefore(node,element);},top:function(element,node){element.insertBefore(node,element.firstChild);},bottom:function(element,node){element.appendChild(node);},after:function(element,node){element.parentNode.insertBefore(node,element.nextSibling);},tags:{TABLE:['<table>','</table>',1],TBODY:['<table><tbody>','</tbody></table>',2],TR:['<table><tbody><tr>','</tr></tbody></table>',3],TD:['<table><tbody><tr><td>','</td></tr></tbody></table>',4],SELECT:['<select>','</select>',1]}};(function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD});}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(element,attribute){attribute=Element._attributeTranslations.has[attribute]||attribute;var node=$(element).getAttributeNode(attribute);return node&&node.specified;}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement('div').__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement('div').__proto__;Prototype.BrowserFeatures.ElementExtensions=true;}
Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions)
return Prototype.K;var Methods={},ByTag=Element.Methods.ByTag;var extend=Object.extend(function(element){if(!element||element._extendedByPrototype||element.nodeType!=1||element==window)return element;var methods=Object.clone(Methods),tagName=element.tagName,property,value;if(ByTag[tagName])Object.extend(methods,ByTag[tagName]);for(property in methods){value=methods[property];if(Object.isFunction(value)&&!(property in element))
element[property]=value.methodize();}
element._extendedByPrototype=Prototype.emptyFunction;return element;},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(Methods,Element.Methods);Object.extend(Methods,Element.Methods.Simulated);}}});extend.refresh();return extend;})();Element.hasAttribute=function(element,attribute){if(element.hasAttribute)return element.hasAttribute(attribute);return Element.Methods.Simulated.hasAttribute(element,attribute);};Element.addMethods=function(methods){var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;if(!methods){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 tagName=methods;methods=arguments[1];}
if(!tagName)Object.extend(Element.Methods,methods||{});else{if(Object.isArray(tagName))tagName.each(extend);else extend(tagName);}
function extend(tagName){tagName=tagName.toUpperCase();if(!Element.Methods.ByTag[tagName])
Element.Methods.ByTag[tagName]={};Object.extend(Element.Methods.ByTag[tagName],methods);}
function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;for(var property in methods){var value=methods[property];if(!Object.isFunction(value))continue;if(!onlyIfAbsent||!(property in destination))
destination[property]=value.methodize();}}
function findDOMClass(tagName){var klass;var trans={"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(trans[tagName])klass='HTML'+trans[tagName]+'Element';if(window[klass])return window[klass];klass='HTML'+tagName+'Element';if(window[klass])return window[klass];klass='HTML'+tagName.capitalize()+'Element';if(window[klass])return window[klass];window[klass]={};window[klass].prototype=document.createElement(tagName).__proto__;return window[klass];}
if(F.ElementExtensions){copy(Element.Methods,HTMLElement.prototype);copy(Element.Methods.Simulated,HTMLElement.prototype,true);}
if(F.SpecificElementExtensions){for(var tag in Element.Methods.ByTag){var klass=findDOMClass(tag);if(Object.isUndefined(klass))continue;copy(T[tag],klass.prototype);}}
Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh)Element.extend.refresh();Element.cache={};};document.viewport={getDimensions:function(){var dimensions={};var B=Prototype.Browser;$w('width height').each(function(d){var D=d.capitalize();dimensions[d]=(B.WebKit&&!document.evaluate)?self['inner'+D]:(B.Opera)?document.body['client'+D]:document.documentElement['client'+D];});return dimensions;},getWidth:function(){return this.getDimensions().width;},getHeight:function(){return this.getDimensions().height;},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);}};var Selector=Class.create({initialize:function(expression){this.expression=expression.strip();this.compileMatcher();},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath)return false;var e=this.expression;if(Prototype.Browser.WebKit&&(e.include("-of-type")||e.include(":empty")))
return false;if((/(\[[\w-]*?:|:checked)/).test(this.expression))
return false;return true;},compileMatcher:function(){if(this.shouldUseXPath())
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,ps=Selector.patterns,x=Selector.xpath,le,m;if(Selector._cache[e]){this.xpath=Selector._cache[e];return;}
this.matcher=['.//*'];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){if(m=e.match(ps[i])){this.matcher.push(Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m));e=e.replace(m[0],'');break;}}}
this.xpath=this.matcher.join('');Selector._cache[this.expression]=this.xpath;},findElements:function(root){root=root||document;if(this.xpath)return document._getElementsByXPath(this.xpath,root);return this.matcher(root);},match:function(element){this.tokens=[];var e=this.expression,ps=Selector.patterns,as=Selector.assertions;var le,p,m;while(e&&le!==e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){if(as[i]){this.tokens.push([i,Object.clone(m)]);e=e.replace(m[0],'');}else{return this.findElements(document).include(element);}}}}
var match=true,name,matches;for(var i=0,token;token=this.tokens[i];i++){name=token[0],matches=token[1];if(!Selector.assertions[name](element,matches)){match=false;break;}}
return match;},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(m){if(m[1]=='*')return'';return"[local-name()='"+m[1].toLowerCase()+"' or local-name()='"+m[1].toUpperCase()+"']";},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(m){m[1]=m[1].toLowerCase();return new Template("[@#{1}]").evaluate(m);},attr:function(m){m[1]=m[1].toLowerCase();m[3]=m[5]||m[6];return new Template(Selector.xpath.operators[m[2]]).evaluate(m);},pseudo:function(m){var h=Selector.xpath.pseudos[m[1]];if(!h)return'';if(Object.isFunction(h))return h(m);return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);},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(m){var e=m[6],p=Selector.patterns,x=Selector.xpath,le,v;var exclusion=[];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in p){if(m=e.match(p[i])){v=Object.isFunction(x[i])?x[i](m):new Template(x[i]).evaluate(m);exclusion.push("("+v.substring(1,v.length-1)+")");e=e.replace(m[0],'');break;}}}
return"[not("+exclusion.join(" and ")+")]";},'nth-child':function(m){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",m);},'nth-last-child':function(m){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",m);},'nth-of-type':function(m){return Selector.xpath.pseudos.nth("position() ",m);},'nth-last-of-type':function(m){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",m);},'first-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-of-type'](m);},'last-of-type':function(m){m[6]="1";return Selector.xpath.pseudos['nth-last-of-type'](m);},'only-of-type':function(m){var p=Selector.xpath.pseudos;return p['first-of-type'](m)+p['last-of-type'](m);},nth:function(fragment,m){var mm,formula=m[6],predicate;if(formula=='even')formula='2n+0';if(formula=='odd')formula='2n+1';if(mm=formula.match(/^(\d+)$/))
return'['+fragment+"= "+mm[1]+']';if(mm=formula.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(mm[1]=="-")mm[1]=-1;var a=mm[1]?Number(mm[1]):1;var b=mm[2]?Number(mm[2]):0;predicate="[((#{fragment} - #{b}) mod #{a} = 0) and "+"((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(predicate).evaluate({fragment:fragment,a:a,b:b});}}}},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); c = false;',attr:function(m){m[3]=(m[5]||m[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);},pseudo:function(m){if(m[6])m[6]=m[6].replace(/"/g,'\\"');return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);},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(element,matches){return matches[1].toUpperCase()==element.tagName.toUpperCase();},className:function(element,matches){return Element.hasClassName(element,matches[1]);},id:function(element,matches){return element.id===matches[1];},attrPresence:function(element,matches){return Element.hasAttribute(element,matches[1]);},attr:function(element,matches){var nodeValue=Element.readAttribute(element,matches[1]);return nodeValue&&Selector.operators[matches[2]](nodeValue,matches[5]||matches[6]);}},handlers:{concat:function(a,b){for(var i=0,node;node=b[i];i++)
a.push(node);return a;},mark:function(nodes){var _true=Prototype.emptyFunction;for(var i=0,node;node=nodes[i];i++)
node._countedByPrototype=_true;return nodes;},unmark:function(nodes){for(var i=0,node;node=nodes[i];i++)
node._countedByPrototype=undefined;return nodes;},index:function(parentNode,reverse,ofType){parentNode._countedByPrototype=Prototype.emptyFunction;if(reverse){for(var nodes=parentNode.childNodes,i=nodes.length-1,j=1;i>=0;i--){var node=nodes[i];if(node.nodeType==1&&(!ofType||node._countedByPrototype))node.nodeIndex=j++;}}else{for(var i=0,j=1,nodes=parentNode.childNodes;node=nodes[i];i++)
if(node.nodeType==1&&(!ofType||node._countedByPrototype))node.nodeIndex=j++;}},unique:function(nodes){if(nodes.length==0)return nodes;var results=[],n;for(var i=0,l=nodes.length;i<l;i++)
if(!(n=nodes[i])._countedByPrototype){n._countedByPrototype=Prototype.emptyFunction;results.push(Element.extend(n));}
return Selector.handlers.unmark(results);},descendant:function(nodes){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++)
h.concat(results,node.getElementsByTagName('*'));return results;},child:function(nodes){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++){for(var j=0,child;child=node.childNodes[j];j++)
if(child.nodeType==1&&child.tagName!='!')results.push(child);}
return results;},adjacent:function(nodes){for(var i=0,results=[],node;node=nodes[i];i++){var next=this.nextElementSibling(node);if(next)results.push(next);}
return results;},laterSibling:function(nodes){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++)
h.concat(results,Element.nextSiblings(node));return results;},nextElementSibling:function(node){while(node=node.nextSibling)
if(node.nodeType==1)return node;return null;},previousElementSibling:function(node){while(node=node.previousSibling)
if(node.nodeType==1)return node;return null;},tagName:function(nodes,root,tagName,combinator){var uTagName=tagName.toUpperCase();var results=[],h=Selector.handlers;if(nodes){if(combinator){if(combinator=="descendant"){for(var i=0,node;node=nodes[i];i++)
h.concat(results,node.getElementsByTagName(tagName));return results;}else nodes=this[combinator](nodes);if(tagName=="*")return nodes;}
for(var i=0,node;node=nodes[i];i++)
if(node.tagName.toUpperCase()===uTagName)results.push(node);return results;}else return root.getElementsByTagName(tagName);},id:function(nodes,root,id,combinator){var targetNode=$(id),h=Selector.handlers;if(!targetNode)return[];if(!nodes&&root==document)return[targetNode];if(nodes){if(combinator){if(combinator=='child'){for(var i=0,node;node=nodes[i];i++)
if(targetNode.parentNode==node)return[targetNode];}else if(combinator=='descendant'){for(var i=0,node;node=nodes[i];i++)
if(Element.descendantOf(targetNode,node))return[targetNode];}else if(combinator=='adjacent'){for(var i=0,node;node=nodes[i];i++)
if(Selector.handlers.previousElementSibling(targetNode)==node)
return[targetNode];}else nodes=h[combinator](nodes);}
for(var i=0,node;node=nodes[i];i++)
if(node==targetNode)return[targetNode];return[];}
return(targetNode&&Element.descendantOf(targetNode,root))?[targetNode]:[];},className:function(nodes,root,className,combinator){if(nodes&&combinator)nodes=this[combinator](nodes);return Selector.handlers.byClassName(nodes,root,className);},byClassName:function(nodes,root,className){if(!nodes)nodes=Selector.handlers.descendant([root]);var needle=' '+className+' ';for(var i=0,results=[],node,nodeClassName;node=nodes[i];i++){nodeClassName=node.className;if(nodeClassName.length==0)continue;if(nodeClassName==className||(' '+nodeClassName+' ').include(needle))
results.push(node);}
return results;},attrPresence:function(nodes,root,attr,combinator){if(!nodes)nodes=root.getElementsByTagName("*");if(nodes&&combinator)nodes=this[combinator](nodes);var results=[];for(var i=0,node;node=nodes[i];i++)
if(Element.hasAttribute(node,attr))results.push(node);return results;},attr:function(nodes,root,attr,value,operator,combinator){if(!nodes)nodes=root.getElementsByTagName("*");if(nodes&&combinator)nodes=this[combinator](nodes);var handler=Selector.operators[operator],results=[];for(var i=0,node;node=nodes[i];i++){var nodeValue=Element.readAttribute(node,attr);if(nodeValue===null)continue;if(handler(nodeValue,value))results.push(node);}
return results;},pseudo:function(nodes,name,value,root,combinator){if(nodes&&combinator)nodes=this[combinator](nodes);if(!nodes)nodes=root.getElementsByTagName("*");return Selector.pseudos[name](nodes,value,root);}},pseudos:{'first-child':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++){if(Selector.handlers.previousElementSibling(node))continue;results.push(node);}
return results;},'last-child':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++){if(Selector.handlers.nextElementSibling(node))continue;results.push(node);}
return results;},'only-child':function(nodes,value,root){var h=Selector.handlers;for(var i=0,results=[],node;node=nodes[i];i++)
if(!h.previousElementSibling(node)&&!h.nextElementSibling(node))
results.push(node);return results;},'nth-child':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root);},'nth-last-child':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root,true);},'nth-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root,false,true);},'nth-last-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,formula,root,true,true);},'first-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,"1",root,false,true);},'last-of-type':function(nodes,formula,root){return Selector.pseudos.nth(nodes,"1",root,true,true);},'only-of-type':function(nodes,formula,root){var p=Selector.pseudos;return p['last-of-type'](p['first-of-type'](nodes,formula,root),formula,root);},getIndices:function(a,b,total){if(a==0)return b>0?[b]:[];return $R(1,total).inject([],function(memo,i){if(0==(i-b)%a&&(i-b)/a>=0)memo.push(i);return memo;});},nth:function(nodes,formula,root,reverse,ofType){if(nodes.length==0)return[];if(formula=='even')formula='2n+0';if(formula=='odd')formula='2n+1';var h=Selector.handlers,results=[],indexed=[],m;h.mark(nodes);for(var i=0,node;node=nodes[i];i++){if(!node.parentNode._countedByPrototype){h.index(node.parentNode,reverse,ofType);indexed.push(node.parentNode);}}
if(formula.match(/^\d+$/)){formula=Number(formula);for(var i=0,node;node=nodes[i];i++)
if(node.nodeIndex==formula)results.push(node);}else if(m=formula.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(m[1]=="-")m[1]=-1;var a=m[1]?Number(m[1]):1;var b=m[2]?Number(m[2]):0;var indices=Selector.pseudos.getIndices(a,b,nodes.length);for(var i=0,node,l=indices.length;node=nodes[i];i++){for(var j=0;j<l;j++)
if(node.nodeIndex==indices[j])results.push(node);}}
h.unmark(nodes);h.unmark(indexed);return results;},'empty':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++){if(node.tagName=='!'||(node.firstChild&&!node.innerHTML.match(/^\s*$/)))continue;results.push(node);}
return results;},'not':function(nodes,selector,root){var h=Selector.handlers,selectorType,m;var exclusions=new Selector(selector).findElements(root);h.mark(exclusions);for(var i=0,results=[],node;node=nodes[i];i++)
if(!node._countedByPrototype)results.push(node);h.unmark(exclusions);return results;},'enabled':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++)
if(!node.disabled)results.push(node);return results;},'disabled':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++)
if(node.disabled)results.push(node);return results;},'checked':function(nodes,value,root){for(var i=0,results=[],node;node=nodes[i];i++)
if(node.checked)results.push(node);return results;}},operators:{'=':function(nv,v){return nv==v;},'!=':function(nv,v){return nv!=v;},'^=':function(nv,v){return nv.startsWith(v);},'$=':function(nv,v){return nv.endsWith(v);},'*=':function(nv,v){return nv.include(v);},'~=':function(nv,v){return(' '+nv+' ').include(' '+v+' ');},'|=':function(nv,v){return('-'+nv.toUpperCase()+'-').include('-'+v.toUpperCase()+'-');}},split:function(expression){var expressions=[];expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(m){expressions.push(m[1].strip());});return expressions;},matchElements:function(elements,expression){var matches=$$(expression),h=Selector.handlers;h.mark(matches);for(var i=0,results=[],element;element=elements[i];i++)
if(element._countedByPrototype)results.push(element);h.unmark(matches);return results;},findElement:function(elements,expression,index){if(Object.isNumber(expression)){index=expression;expression=false;}
return Selector.matchElements(elements,expression||'*')[index||0];},findChildElements:function(element,expressions){expressions=Selector.split(expressions.join(','));var results=[],h=Selector.handlers;for(var i=0,l=expressions.length,selector;i<l;i++){selector=new Selector(expressions[i].strip());h.concat(results,selector.findElements(element));}
return(l>1)?h.unique(results):results;}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(a,b){for(var i=0,node;node=b[i];i++)
if(node.tagName!=="!")a.push(node);return a;},unmark:function(nodes){for(var i=0,node;node=nodes[i];i++)
node.removeAttribute('_countedByPrototype');return nodes;}});}
function $$(){return Selector.findChildElements(document,$A(arguments));}
var Form={reset:function(form){$(form).reset();return form;},serializeElements:function(elements,options){if(typeof options!='object')options={hash:!!options};else if(Object.isUndefined(options.hash))options.hash=true;var key,value,submitted=false,submit=options.submit;var data=elements.inject({},function(result,element){if(!element.disabled&&element.name){key=element.name;value=$(element).getValue();if(value!=null&&(element.type!='submit'||(!submitted&&submit!==false&&(!submit||key==submit)&&(submitted=true)))){if(key in result){if(!Object.isArray(result[key]))result[key]=[result[key]];result[key].push(value);}
else result[key]=value;}}
return result;});return options.hash?data:Object.toQueryString(data);}};Form.Methods={serialize:function(form,options){return Form.serializeElements(Form.getElements(form),options);},getElements:function(form){return $A($(form).getElementsByTagName('*')).inject([],function(elements,child){if(Form.Element.Serializers[child.tagName.toLowerCase()])
elements.push(Element.extend(child));return elements;});},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!typeName&&!name)return $A(inputs).map(Element.extend);for(var i=0,matchingInputs=[],length=inputs.length;i<length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name))
continue;matchingInputs.push(Element.extend(input));}
return matchingInputs;},disable:function(form){form=$(form);Form.getElements(form).invoke('disable');return form;},enable:function(form){form=$(form);Form.getElements(form).invoke('enable');return form;},findFirstElement:function(form){var elements=$(form).getElements().findAll(function(element){return'hidden'!=element.type&&!element.disabled;});var firstByIndex=elements.findAll(function(element){return element.hasAttribute('tabIndex')&&element.tabIndex>=0;}).sortBy(function(element){return element.tabIndex}).first();return firstByIndex?firstByIndex:elements.find(function(element){return['input','select','textarea'].include(element.tagName.toLowerCase());});},focusFirstElement:function(form){form=$(form);form.findFirstElement().activate();return form;},request:function(form,options){form=$(form),options=Object.clone(options||{});var params=options.parameters,action=form.readAttribute('action')||'';if(action.blank())action=window.location.href;options.parameters=form.serialize(true);if(params){if(Object.isString(params))params=params.toQueryParams();Object.extend(options.parameters,params);}
if(form.hasAttribute('method')&&!options.method)
options.method=form.method;return new Ajax.Request(action,options);}};Form.Element={focus:function(element){$(element).focus();return element;},select:function(element){$(element).select();return element;}};Form.Element.Methods={serialize:function(element){element=$(element);if(!element.disabled&&element.name){var value=element.getValue();if(value!=undefined){var pair={};pair[element.name]=value;return Object.toQueryString(pair);}}
return'';},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();return Form.Element.Serializers[method](element);},setValue:function(element,value){element=$(element);var method=element.tagName.toLowerCase();Form.Element.Serializers[method](element,value);return element;},clear:function(element){$(element).value='';return element;},present:function(element){return $(element).value!='';},activate:function(element){element=$(element);try{element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!['button','reset','submit'].include(element.type)))
element.select();}catch(e){}
return element;},disable:function(element){element=$(element);element.blur();element.disabled=true;return element;},enable:function(element){element=$(element);element.disabled=false;return element;}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(element,value){switch(element.type.toLowerCase()){case'checkbox':case'radio':return Form.Element.Serializers.inputSelector(element,value);default:return Form.Element.Serializers.textarea(element,value);}},inputSelector:function(element,value){if(Object.isUndefined(value))return element.checked?element.value:null;else element.checked=!!value;},textarea:function(element,value){if(Object.isUndefined(value))return element.value;else element.value=value;},select:function(element,index){if(Object.isUndefined(index))
return this[element.type=='select-one'?'selectOne':'selectMany'](element);else{var opt,value,single=!Object.isArray(index);for(var i=0,length=element.length;i<length;i++){opt=element.options[i];value=this.optionValue(opt);if(single){if(value==index){opt.selected=true;return;}}
else opt.selected=index.include(value);}}},selectOne:function(element){var index=element.selectedIndex;return index>=0?this.optionValue(element.options[index]):null;},selectMany:function(element){var values,length=element.length;if(!length)return null;for(var i=0,values=[];i<length;i++){var opt=element.options[i];if(opt.selected)values.push(this.optionValue(opt));}
return values;},optionValue:function(opt){return Element.extend(opt).hasAttribute('value')?opt.value:opt.text;}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,element,frequency,callback){$super(callback,frequency);this.element=$(element);this.lastValue=this.getValue();},execute:function(){var value=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(value)?this.lastValue!=value:String(this.lastValue)!=String(value)){this.callback(this.element,value);this.lastValue=value;}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element);}});Abstract.EventObserver=Class.create({initialize:function(element,callback){this.element=$(element);this.callback=callback;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=='form')
this.registerFormCallbacks();else
this.registerCallback(this.element);},onElementEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this);},registerCallback:function(element){if(element.type){switch(element.type.toLowerCase()){case'checkbox':case'radio':Event.observe(element,'click',this.onElementEvent.bind(this));break;default:Event.observe(element,'change',this.onElementEvent.bind(this));break;}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element);}});if(!window.Event)var Event={};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,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(event){var element;switch(event.type){case'mouseover':element=event.fromElement;break;case'mouseout':element=event.toElement;break;default:return null;}
return Element.extend(element);}});Event.Methods=(function(){var isButton;if(Prototype.Browser.IE){var buttonMap={0:1,1:4,2:2};isButton=function(event,code){return event.button==buttonMap[code];};}else if(Prototype.Browser.WebKit){isButton=function(event,code){switch(code){case 0:return event.which==1&&!event.metaKey;case 1:return event.which==1&&event.metaKey;default:return false;}};}else{isButton=function(event,code){return event.which?(event.which===code+1):(event.button===code);};}
return{isLeftClick:function(event){return isButton(event,0)},isMiddleClick:function(event){return isButton(event,1)},isRightClick:function(event){return isButton(event,2)},element:function(event){var node=Event.extend(event).target;return Element.extend(node.nodeType==Node.TEXT_NODE?node.parentNode:node);},findElement:function(event,expression){var element=Event.element(event);if(!expression)return element;var elements=[element].concat(element.ancestors());return Selector.findElement(elements,expression,0);},pointer:function(event){return{x:event.pageX||(event.clientX+
(document.documentElement.scrollLeft||document.body.scrollLeft)),y:event.pageY||(event.clientY+
(document.documentElement.scrollTop||document.body.scrollTop))};},pointerX:function(event){return Event.pointer(event).x},pointerY:function(event){return Event.pointer(event).y},stop:function(event){Event.extend(event);event.preventDefault();event.stopPropagation();event.stopped=true;}};})();Event.extend=(function(){var methods=Object.keys(Event.Methods).inject({},function(m,name){m[name]=Event.Methods[name].methodize();return m;});if(Prototype.Browser.IE){Object.extend(methods,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(event){if(!event)return false;if(event._extendedByPrototype)return event;event._extendedByPrototype=Prototype.emptyFunction;var pointer=Event.pointer(event);Object.extend(event,{target:event.srcElement,relatedTarget:Event.relatedTarget(event),pageX:pointer.x,pageY:pointer.y});return Object.extend(event,methods);};}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(Event.prototype,methods);return Prototype.K;}})();Object.extend(Event,(function(){var cache=Event.cache;function getEventID(element){if(element._prototypeEventID)return element._prototypeEventID[0];arguments.callee.id=arguments.callee.id||1;return element._prototypeEventID=[++arguments.callee.id];}
function getDOMEventName(eventName){if(eventName&&eventName.include(':'))return"dataavailable";return eventName;}
function getCacheForID(id){return cache[id]=cache[id]||{};}
function getWrappersForEventName(id,eventName){var c=getCacheForID(id);return c[eventName]=c[eventName]||[];}
function createWrapper(element,eventName,handler){var id=getEventID(element);var c=getWrappersForEventName(id,eventName);if(c.pluck("handler").include(handler))return false;var wrapper=function(event){if(!Event||!Event.extend||(event.eventName&&event.eventName!=eventName))
return false;Event.extend(event);handler.call(element,event);};wrapper.handler=handler;c.push(wrapper);return wrapper;}
function findWrapper(id,eventName,handler){var c=getWrappersForEventName(id,eventName);return c.find(function(wrapper){return wrapper.handler==handler});}
function destroyWrapper(id,eventName,handler){var c=getCacheForID(id);if(!c[eventName])return false;c[eventName]=c[eventName].without(findWrapper(id,eventName,handler));}
function destroyCache(){for(var id in cache)
for(var eventName in cache[id])
cache[id][eventName]=null;}
if(window.attachEvent){window.attachEvent("onunload",destroyCache);}
return{observe:function(element,eventName,handler){element=$(element);var name=getDOMEventName(eventName);var wrapper=createWrapper(element,eventName,handler);if(!wrapper)return element;if(element.addEventListener){element.addEventListener(name,wrapper,false);}else{element.attachEvent("on"+name,wrapper);}
return element;},stopObserving:function(element,eventName,handler){element=$(element);var id=getEventID(element),name=getDOMEventName(eventName);if(!handler&&eventName){getWrappersForEventName(id,eventName).each(function(wrapper){element.stopObserving(eventName,wrapper.handler);});return element;}else if(!eventName){Object.keys(getCacheForID(id)).each(function(eventName){element.stopObserving(eventName);});return element;}
var wrapper=findWrapper(id,eventName,handler);if(!wrapper)return element;if(element.removeEventListener){element.removeEventListener(name,wrapper,false);}else{element.detachEvent("on"+name,wrapper);}
destroyWrapper(id,eventName,handler);return element;},fire:function(element,eventName,memo){element=$(element);if(element==document&&document.createEvent&&!element.dispatchEvent)
element=document.documentElement;var event;if(document.createEvent){event=document.createEvent("HTMLEvents");event.initEvent("dataavailable",true,true);}else{event=document.createEventObject();event.eventType="ondataavailable";}
event.eventName=eventName;event.memo=memo||{};if(document.createEvent){element.dispatchEvent(event);}else{element.fireEvent(event.eventType,event);}
return Event.extend(event);}};})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var timer;function fireContentLoadedEvent(){if(document.loaded)return;if(timer)window.clearInterval(timer);document.fire("dom:loaded");document.loaded=true;}
if(document.addEventListener){if(Prototype.Browser.WebKit){timer=window.setInterval(function(){if(/loaded|complete/.test(document.readyState))
fireContentLoadedEvent();},0);Event.observe(window,"load",fireContentLoadedEvent);}else{document.addEventListener("DOMContentLoaded",fireContentLoadedEvent,false);}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;fireContentLoadedEvent();}};}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(element,content){return Element.insert(element,{before:content});},Top:function(element,content){return Element.insert(element,{top:content});},Bottom:function(element,content){return Element.insert(element,{bottom:content});},After:function(element,content){return Element.insert(element,{after:content});}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');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;},within:function(element,x,y){if(this.includeScrollOffsets)
return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=Element.cumulativeOffset(element);return(y>=this.offset[1]&&y<this.offset[1]+element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+element.offsetWidth);},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=Element.cumulativeScrollOffset(element);this.xcomp=x+offsetcache[0]-this.deltaX;this.ycomp=y+offsetcache[1]-this.deltaY;this.offset=Element.cumulativeOffset(element);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+element.offsetWidth);},overlap:function(mode,element){if(!mode)return 0;if(mode=='vertical')
return((this.offset[1]+element.offsetHeight)-this.ycomp)/element.offsetHeight;if(mode=='horizontal')
return((this.offset[0]+element.offsetWidth)-this.xcomp)/element.offsetWidth;},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(element){Position.prepare();return Element.absolutize(element);},relativize:function(element){Position.prepare();return Element.relativize(element);},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(source,target,options){options=options||{};return Element.clonePosition(target,source,options);}};if(!document.getElementsByClassName)document.getElementsByClassName=function(instanceMethods){function iter(name){return name.blank()?null:"[contains(concat(' ', @class, ' '), ' "+name+" ')]";}
instanceMethods.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(element,className){className=className.toString().strip();var cond=/\s/.test(className)?$w(className).map(iter).join(''):iter(className);return cond?document._getElementsByXPath('.//*'+cond,element):[];}:function(element,className){className=className.toString().strip();var elements=[],classNames=(/\s/.test(className)?$w(className):null);if(!classNames&&!className)return elements;var nodes=$(element).getElementsByTagName('*');className=' '+className+' ';for(var i=0,child,cn;child=nodes[i];i++){if(child.className&&(cn=' '+child.className+' ')&&(cn.include(className)||(classNames&&classNames.all(function(name){return!name.toString().blank()&&cn.include(' '+name+' ');}))))
elements.push(Element.extend(child));}
return elements;};return function(className,parentElement){return $(parentElement||document.body).getElementsByClassName(className);};}(Element.Methods);Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '));},toString:function(){return $A(this).join(' ');}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();var placeCursorToAskAns=false;var cursorPlaced=true;function setSelectionRange(input,selectionStart,selectionEnd){if(input.createTextRange){var range=input.createTextRange();range.collapse(true);range.moveEnd('character',selectionEnd);range.moveStart('character',selectionStart);range.select();}
else if(input.setSelectionRange){input.focus();input.setSelectionRange(selectionStart,selectionEnd);}}
var cursorToBox=function(){try{var main_elem=document.getElementById('main');tb_counter=0;text_boxes=[];for(var i=0;i<2;i++){if(main_elem){all_inputs=main_elem.getElementsByTagName('input');for(i=0;i<all_inputs.length;i++){input=all_inputs[i];if(input.type.toLowerCase()=="text"){text_boxes[tb_counter]=input;tb_counter++;}}
all_inputs=main_elem.getElementsByTagName('textarea');for(i=0;i<all_inputs.length;i++){input=all_inputs[i];text_boxes[tb_counter]=input;tb_counter++;}}
if(!$('ask-answer')&&tb_counter==0)
main_elem=document.getElementById('Top');else
break;}
if(($('ask-answer')&&(tb_counter==0||placeCursorToAskAns))&&((window.document.documentElement&&window.document.documentElement.scrollTop==0)||(window.document.body&&window.document.body.scrollTop==0&&!window.document.documentElement))){if(readCookie('activeTab')=="ask"){all_inputs=document.getElementById("ask-answer").getElementsByTagName("input");for(i=0;i<all_inputs.length;i++){input=all_inputs[i];if(input.type.toLowerCase()=="text"&&input.name.toLowerCase()=="title"){input.focus();setSelectionRange(input,0,0);break;}}}
else{all_inputs=document.getElementById("ask-answer").getElementsByTagName("input");for(i=0;i<all_inputs.length;i++){input=all_inputs[i];if(input.type.toLowerCase()=="text"&&input.name.toLowerCase()=="search"){input.focus();setSelectionRange(input,0,0);break;}}}}
else if((window.document.documentElement&&window.document.documentElement.scrollTop==0)||(window.document.body&&window.document.body.scrollTop==0&&!window.document.documentElement)){for(i=0;i<text_boxes.length;i++){if(text_boxes[i].tagName.toLowerCase()=="input"&&!text_boxes[i].readOnly&&!text_boxes[i].disabled){if(text_boxes[i].value!=""&&i<text_boxes.length-1&&text_boxes[i+1].value==""&&text_boxes[i].name!="wpUserEmail")continue;text_boxes[i].focus();setSelectionRange(text_boxes[i],0,0);break;}
else if(text_boxes[i].tagName.toLowerCase()=="textarea"){text_boxes[i].focus();if(text_boxes[i].id!="wysiwyg"){setSelectionRange(text_boxes[i],0,0);}
break;}}}}
catch(e){}};if((typeof checkspell=="undefined"||!checkspell)&&!(window.location.hash&&window.location.hash.match(/(#login-l|#login-r)/i)))
Event.observe(window,"load",function(){if(!(window.location.hash&&window.location.hash.match(/(#login-l|#login-r)/i)&&($("login-pod")||$("register-pod"))))cursorToBox();},false);var stopCursorToBox=function(){cursorToBox=function(){void(0);};};if(typeof checkspell=="undefined"||!checkspell){Event.observe(document,"click",stopCursorToBox,false);Event.observe(document,"keydown",stopCursorToBox,false);}
var resetStopCursorToBox=function(){Event.stopObserving(document,"click",stopCursorToBox);Event.stopObserving(document,"keydown",stopCursorToBox);};if((typeof checkspell=="undefined"||!checkspell)&&!(window.location.href.indexOf('Special:SupersForum')>0||window.location.href.indexOf('Special:CommunityForum')>0))
Event.observe(window,"load",resetStopCursorToBox,false);(function(){var lvl2=false,div=new Element('div').hide();document.documentElement.appendChild(div).observe('DOMAttrModified',function(){lvl2=true}).writeAttribute('x','1').stopObserving('DOMAttrModified').remove();var map={'attrmodified':lvl2?'DOMAttrModified':'propertychange'};var methods={};$w('observe stopObserving')._each(function(method){Event[method]=Event[method].wrap(function(){var args=Array.prototype.slice.call(arguments,0);if(args.length>2)args[2]=map[args[2]]||args[2];return args.shift().apply(null,args);});methods[method]=Event[method];});Element.addMethods(methods);})();var wgStaticFilesServer='http://site1.wikianswers.com';var MAX_USERNAME_LENGTH=22;var cur_tab='login';registerLoginManager=function(leftNavType){$('left-column').className=leftNavType;cur_tab=leftNavType;if(leftNavType=="register"){var originalValue=document.forms['loginform'].wpName.value;if(originalValue.length>MAX_USERNAME_LENGTH)
{originalValue=originalValue.substr(0,MAX_USERNAME_LENGTH);}
document.forms['registerform'].wpName.value=originalValue;document.forms['registerform'].wpPassword.value=document.forms['loginform'].wpPassword.value;}
else if(leftNavType=="login"){document.forms['loginform'].wpName.value=document.forms['registerform'].wpName.value;document.forms['loginform'].wpPassword.value=document.forms['registerform'].wpPassword.value;}};askAnswerTabManager=function(tabType){if($('ask-answer')){$('ask-answer').className='floatwrapper '+tabType;createCookie('activeTab',tabType);if(!cursorPlaced&&typeof(isNewQuestion)!="undefined"&&!isNewQuestion){if(tabType=="ask"){all_inputs=document.getElementById("ask-answer").getElementsByTagName("input");for(i=0;i<all_inputs.length;i++){input=all_inputs[i];if(input.type.toLowerCase()=="text"&&input.name.toLowerCase()=="title"){input.focus();setSelectionRange(input,0,0);break;}}}
else{all_inputs=document.getElementById("ask-answer").getElementsByTagName("input");for(i=0;i<all_inputs.length;i++){input=all_inputs[i];if(input.type.toLowerCase()=="text"&&input.name.toLowerCase()=="search"){input.focus();setSelectionRange(input,0,0);break;}}}}}
cursorPlaced=false;};setActiveTab=function(){var tab=readCookie('activeTab');if(tab!=null){askAnswerTabManager(tab);}
else{askAnswerTabManager('ask');}};fixAlt=function(){var images=document.getElementsByTagName('img');for(var i=0;i<images.length;i++){images[i].title=images[i].alt;};};fixButtons=function(){var inputs=document.getElementsByTagName('input');for(var i=0;i<inputs.length;i++){if(inputs[i].type=="submit"||inputs[i].type=="button"){if(inputs[i].disabled==false){inputs[i].style.border="#000000 1px solid";}
else{inputs[i].style.border="#BABABA 1px solid";}
inputs[i].style.cursor="pointer";}};};if(typeof checkspell=="undefined"||!checkspell){if(document.referrer.indexOf('http://www.answers.com')!=0){Event.observe(window,'load',setActiveTab,false);}
Event.observe(window,'load',fixAlt,false);Event.observe(window,'load',fixButtons,false);}
function createCookie(name,value,days,domain){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/"+((domain)?"; domain="+domain:"");};function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;};function eraseCookie(name){createCookie(name,"",-1);};google_language='en';google_encoding='utf8';String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");}
String.prototype.ltrim=function(){return this.replace(/^\s+/,"");}
String.prototype.rtrim=function(){return this.replace(/\s+$/,"");}
browserName=navigator.appName;var checkForCAPS={caps_counter:0,last_key_cap:false,prev_objid:'none',cur_objid:'none',event:null,target:null,enableBtnCheck:false,initialize:function(event){var ev=event?event:window.event;if(!ev){alert('Please upgrade your browser.');return false;}
checkForCAPS.event=ev;var targ=ev.target?ev.target:ev.srcElement;if(targ&&targ.tagName&&targ.tagName.match(/body/i))targ=targ.parentNode;checkForCAPS.cur_objid=targ.id;checkForCAPS.target=targ;return targ;},focus:function(event){if(checkForCAPS.initialize(event)){if(checkForCAPS.prev_objid!=checkForCAPS.cur_objid)
checkForCAPS.reset();else
checkForCAPS.prev_objid=checkForCAPS.cur_objid;}},reset:function(){checkForCAPS.prev_objid='none';checkForCAPS.cur_objid='none';checkForCAPS.caps_counter=0;checkForCAPS.last_key_cap=false;if($('editform')&&document.forms['editform'].isNoAnsweredQ&&document.forms['editform'].isNoAnsweredQ.value==1&&checkForCAPS.enableBtnCheck){var buttons=$('editform').select('a.btn');buttons.each(function(button,index){if(index==0||index==2)
button.enableBtn();});}
checkForCAPS.hideWarning();},generic_check:function(event){var targ=checkForCAPS.initialize(event);if(targ){if(!targ.value.match(/[A-Z]{10}/)){checkForCAPS.reset();}}},generic:function(event){checkForCAPS.prev_objid=checkForCAPS.cur_objid;var targ=checkForCAPS.initialize(event);if(targ.tagName&&targ.tagName.match(/html/i)){targ.id='to_rem_html';}
if(targ&&!targ.id.match(/to_rem/)){if(targ.value&&targ.value.length==0){checkForCAPS.reset();}
var which=-1;if(checkForCAPS.event.which){which=checkForCAPS.event.which;}else if(checkForCAPS.event.keyCode){which=checkForCAPS.event.keyCode;}
var shift_status=false;if(checkForCAPS.event.shiftKey){shift_status=checkForCAPS.event.shiftKey;}else if(checkForCAPS.event.modifiers){shift_status=!!(checkForCAPS.event.modifiers&4);}
if((which>=65&&which<=90)&&!shift_status){var txt='';if(window.getSelection)
txt=window.getSelection();else if(document.getSelection)
txt=document.getSelection();else if(document.selection)
txt=document.selection.createRange().text;else return;if(window.getSelection&&txt==''){txt=targ.value.substring(targ.selectionStart,targ.selectionEnd);}
if(txt==targ.value&&txt!=''){checkForCAPS.hideWarning(targ);checkForCAPS.last_key_cap=true;checkForCAPS.caps_counter=1;return true;}
if(checkForCAPS.last_key_cap&&checkForCAPS.caps_counter>=10)
return checkForCAPS.showStopWarning(targ,false);else if(checkForCAPS.last_key_cap&&checkForCAPS.caps_counter>=6)
checkForCAPS.showWarning(targ,false);if(checkForCAPS.last_key_cap)
checkForCAPS.caps_counter++;else
checkForCAPS.caps_counter=1;checkForCAPS.last_key_cap=true;tmp_txt=targ.value.replace(/[\s]+/g,"");if(tmp_txt.match(/[A-Z]{10}/)){return checkForCAPS.showStopWarning(targ,false);}}
else if((which>=65&&which<=90)&&shift_status){var txt='';if(window.getSelection)
txt=window.getSelection();else if(document.getSelection)
txt=document.getSelection();else if(document.selection)
txt=document.selection.createRange().text;else return;if(window.getSelection&&txt==''){txt=targ.value.substring(targ.selectionStart,targ.selectionEnd);}
if(txt==targ.value&&txt!=''){checkForCAPS.hideWarning(targ);checkForCAPS.last_key_cap=true;checkForCAPS.caps_counter=1;return true;}
if(checkForCAPS.last_key_cap&&checkForCAPS.caps_counter>=10)
return checkForCAPS.showStopWarning(targ,true);else if(checkForCAPS.last_key_cap&&checkForCAPS.caps_counter>=6)
checkForCAPS.showWarning(targ,true);if(checkForCAPS.last_key_cap)
checkForCAPS.caps_counter++;else
checkForCAPS.caps_counter=1;checkForCAPS.last_key_cap=true;tmp_txt=targ.value.replace(/[\s]+/g,"");if(tmp_txt.match(/[A-Z]{10}/)){return checkForCAPS.showStopWarning(targ,true);}}
else if(which>=97&&which<=122){checkForCAPS.hideWarning(targ);checkForCAPS.last_key_cap=false;checkForCAPS.caps_counter=0;}}
else if(targ&&targ.id.match(/to_rem/)){if(targ.innerHTML.replace(/<style(.*)\/style(>)/i,"").stripTags().trim().length==0){checkForCAPS.reset();}
var which=-1;if(checkForCAPS.event.which){which=checkForCAPS.event.which;}else if(checkForCAPS.event.keyCode){which=checkForCAPS.event.keyCode;}
var shift_status=false;if(checkForCAPS.event.shiftKey){shift_status=checkForCAPS.event.shiftKey;}else if(checkForCAPS.event.modifiers){shift_status=!!(checkForCAPS.event.modifiers&4);}
if((which>=65&&which<=90)&&!shift_status){var txt='';if($("wysiwygwysiwyg").contentWindow.getSelection)
txt=$("wysiwygwysiwyg").contentWindow.getSelection();else if($("wysiwygwysiwyg").contentWindow.document.getSelection)
txt=$("wysiwygwysiwyg").contentWindow.document.getSelection();else if($("wysiwygwysiwyg").contentWindow.document.selection)
txt=$("wysiwygwysiwyg").contentWindow.document.selection.createRange().text;else return;if(txt.toString().trim()==targ.innerHTML.replace(/<style(.*)\/style(>)/i,"").stripTags().trim()&&txt!=''){checkForCAPS.hideWarning(targ);checkForCAPS.last_key_cap=true;checkForCAPS.caps_counter=1;return true;}
if(checkForCAPS.last_key_cap&&checkForCAPS.caps_counter>=6)
checkForCAPS.showWarning(targ,false);if(checkForCAPS.last_key_cap)
checkForCAPS.caps_counter++;else
checkForCAPS.caps_counter=1;checkForCAPS.last_key_cap=true;}
else if((which>=65&&which<=90)&&shift_status){var txt='';if($("wysiwygwysiwyg").contentWindow.getSelection)
txt=$("wysiwygwysiwyg").contentWindow.getSelection();else if($("wysiwygwysiwyg").contentWindow.document.getSelection)
txt=$("wysiwygwysiwyg").contentWindow.document.getSelection();else if($("wysiwygwysiwyg").contentWindow.document.selection)
txt=$("wysiwygwysiwyg").contentWindow.document.selection.createRange().text;else return;if(txt.toString().trim()==targ.innerHTML.replace(/<style(.*)\/style(>)/gi,"").stripTags().trim()&&txt!=''){checkForCAPS.hideWarning(targ);checkForCAPS.last_key_cap=true;checkForCAPS.caps_counter=1;return true;}
if(checkForCAPS.last_key_cap&&checkForCAPS.caps_counter>=6)
checkForCAPS.showWarning(targ,true);if(checkForCAPS.last_key_cap)
checkForCAPS.caps_counter++;else
checkForCAPS.caps_counter=1;checkForCAPS.last_key_cap=true;}
else if(which>=97&&which<=122){checkForCAPS.hideWarning(targ);checkForCAPS.last_key_cap=false;checkForCAPS.caps_counter=0;}
checkForCAPS.switchButtons.defer(targ);}},generic_special:function(event){checkForCAPS.prev_objid=checkForCAPS.cur_objid;var targ=checkForCAPS.initialize(event);if(targ.tagName&&targ.tagName.match(/html/i)){targ.id='to_rem_html';}
if(targ&&!targ.id.match(/to_rem/)){if(targ.value.length==0){checkForCAPS.reset();}
var which=-1;if(checkForCAPS.event.which){which=checkForCAPS.event.which;}else if(checkForCAPS.event.keyCode){which=checkForCAPS.event.keyCode;}
var shift_status=false;if(checkForCAPS.event.shiftKey){shift_status=checkForCAPS.event.shiftKey;}else if(checkForCAPS.event.modifiers){shift_status=!!(checkForCAPS.event.modifiers&4);}
if(checkForCAPS.last_key_cap&&which==8){var txt='';if(window.getSelection)
txt=window.getSelection();else if(document.getSelection)
txt=document.getSelection();else if(document.selection)
txt=document.selection.createRange().text;else return;if(window.getSelection&&txt==''){txt=targ.value.substring(targ.selectionStart,targ.selectionEnd);}
if(txt==targ.value&&txt!=''){checkForCAPS.hideWarning(targ);checkForCAPS.last_key_cap=true;checkForCAPS.caps_counter=1;return true;}
checkForCAPS.caps_counter--;if(checkForCAPS.caps_counter==0){checkForCAPS.last_key_cap=false;checkForCAPS.hideWarning(targ);}
else if(checkForCAPS.caps_counter<=6){checkForCAPS.hideWarning(targ);}}}
else if(targ&&targ.id.match(/to_rem/)){if(targ.innerHTML.replace(/<style(.*)\/style(>)/i,"").stripTags().trim().length==0){checkForCAPS.reset();}
var which=-1;if(checkForCAPS.event.which){which=checkForCAPS.event.which;}else if(checkForCAPS.event.keyCode){which=checkForCAPS.event.keyCode;}
var shift_status=false;if(checkForCAPS.event.shiftKey){shift_status=checkForCAPS.event.shiftKey;}else if(checkForCAPS.event.modifiers){shift_status=!!(checkForCAPS.event.modifiers&4);}
if(checkForCAPS.last_key_cap&&which==8){var txt='';if($("wysiwygwysiwyg").contentWindow.getSelection)
txt=$("wysiwygwysiwyg").contentWindow.getSelection();else if($("wysiwygwysiwyg").contentWindow.document.getSelection)
txt=$("wysiwygwysiwyg").contentWindow.document.getSelection();else if($("wysiwygwysiwyg").contentWindow.document.selection)
txt=$("wysiwygwysiwyg").contentWindow.document.selection.createRange().text;else return;if(txt.toString().trim()==targ.innerHTML.replace(/<style(.*)\/style(>)/i,"").stripTags().trim()&&txt!=''){checkForCAPS.hideWarning(targ);checkForCAPS.last_key_cap=true;checkForCAPS.caps_counter=1;return true;}
checkForCAPS.caps_counter--;if(checkForCAPS.caps_counter==0){checkForCAPS.last_key_cap=false;checkForCAPS.hideWarning(targ);}
else if(checkForCAPS.caps_counter<=6){checkForCAPS.hideWarning(targ);}
checkForCAPS.switchButtons.defer(targ);}}},showWarning:function(t,isShift){if(!$('caps_msg')){sw=180;sh=40;div=document.createElement("div");div.id="tooltip_elem_caps";div.style.visibility="hidden";div.style.position="absolute";div.style.left="-500px";div.style.width=""+sw+"px";div.style.height=""+sh+"px";div.style.padding="0px";div.style.margin="0px";div.style.zIndex="51";document.getElementById('left-column').insertAdjacentElement("beforeBegin",div);document.getElementById('tooltip_elem_caps').style.visibility="visible";inner_text="<table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px; border: 0px; width: "+(sw-9)+"px;'><tr><td style='height: "+(sh-32)+"px; padding: 0px; margin: 0px; width: "+(sw-9)+"px; border: 0px; overflow: hidden; text-align: left;'><div style='color: #000000; font-size: 11px; padding: 5px; width: "+(sw-29)+"px; white-space: normal; background-color: #fafbf0; text-align: center; border: #7d7d7d 1px solid;' id='caps_msg'>";if(!isShift)
inner_text+="Turn your Caps-Lock<br>key off";else
inner_text+="Release your Shift key";inner_text+="</div><img src='"+wgStaticFilesServer+"/templates/icons/caps_arrow.gif' style='position: absolute; left: 15px; top: -9px;' border=0 width=18 height=10 /></td></tr></table>";document.getElementById('tooltip_elem_caps').innerHTML=inner_text;if(!t.id.match(/to_rem/)){$('tooltip_elem_caps').style.top=(getposOffset(t,"top")+t.offsetHeight+9)+"px";$('tooltip_elem_caps').style.left=(getposOffset(t,"left")+70)+"px";}
else{$('tooltip_elem_caps').style.top=(getposOffset($('wysiwygwysiwyg'),"top")+$('wysiwygwysiwyg').offsetHeight+11)+"px";$('tooltip_elem_caps').style.left=(getposOffset($('wysiwygwysiwyg'),"left")+70)+"px";}
browserName=navigator.appName;if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=' ttip';}}},hideWarning:function(t){if($('caps_msg')){$('tooltip_elem_caps').parentNode.removeChild($('tooltip_elem_caps'));browserName=navigator.appName;if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=' ttip';}}},showStopWarning:function(t,isShift){if(xModalDialog.instances['ajax_loader2']){$('ajax_loader2').remove();xModalDialog.instances['ajax_loader2']=null;}
if(!xModalDialog.instances['ajax_loader2']){div=document.createElement("div");div.id="ajax_loader2";div.className="clsModalDialog";div.style.width="270px";div.style.height="175px";div.style.backgroundColor="#FFFFFF";div.style.zIndex="10000";inner_text="<table cellpadding='0' cellspacing='0' style='width: 271px; height: 128px; border: #18429C 1px solid; background: #FFFFFF url("+wgStaticFilesServer+"/templates/icons/tooltip_bg.gif) repeat-x; padding: 0px; margin: 0px;'><tr><td style='text-align: center; width: 271px; height: 128px; vertical-align: middle; padding: 15px; margin: 0px; font-size: 14px; border: 0px;'><b>";var URL="<br></font><a href='mailto:wikianswers@answers.com' title=";if(isShift)
inner_text+="<font style='color: #000000;'>"+"Please check for unnecessary capitalized letters.<br><br>If you think you have received this message in error,"+URL+"\'Contact us\'>contact us"+"</a><font style='color: #000000;'>.</font><br><br>";else
inner_text+="<font style='color: #000000;'>"+"Oops! Looks like your caps lock is stuck.<br><br>If you think you have received this message in error,"+URL+"\'Contact us\'>contact us"+"</a><font style='color: #000000;'>.</font><br><br>";inner_text+="<div onclick='checkForCAPS.hideStopWarning(\""+t.id+"\", "+((isShift)?"1":"0")+");' title='"+"Close"+"' id='ajax_loader2_closelnk' ><a class='btn std' href='javascript:void(null)' onmousedown=\"ButtonMouseDown(this);\" onmouseup=\"ButtonMouseUp(this);\" onmouseout=\"ButtonMouseUp(this); \" onclick=\"if(!$(this).isDisabledBtn()) { return true; } else { xPreventDefault(); return false; }\" alt=\"Close\" title=\"Close\"><span><span><font style=\"white-space: nowrap;\"><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"><font>&nbsp;Close&nbsp;</font><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"></font></span></span></a></div></b></td></tr></table>";div.innerHTML=inner_text;document.getElementById('container').insertAdjacentElement("afterEnd",div);new xModalDialog('ajax_loader2');}
checkForCAPS.fade=new Fadomatic(xModalDialog.grey,100,0,0,30);checkForCAPS.fade.fadeIn();if(!t.id.match(/to_rem/)){checkForCAPS.hideWarning(t);}
xModalDialog.instances['ajax_loader2'].show();var newWordingInput=document.getElementById('new_wording');if(newWordingInput)
{var newTopPosition=newWordingInput.cumulativeOffset()[1]-parseInt(div.style.height);div.style.top=newTopPosition+"px";}
if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=" ttip";}
Event.stop(checkForCAPS.event);$('ajax_loader2_closelnk').focus();if(t.id.match(/to_rem/)){$('ajax_loader2').focus();$('ajax_loader2_closelnk').focus();if($('editform')&&document.forms['editform'].isNoAnsweredQ&&document.forms['editform'].isNoAnsweredQ.value==1){var buttons=$('editform').select('a.btn');buttons.each(function(button,index){if(index==0||index==2)
button.disableBtn();});checkForCAPS.enableBtnCheck=true;}}
isPostQClicked=true;return false;},hideStopWarning:function(t,isShift){if($('ajax_loader2')){checkForCAPS.fade.fadeOut();checkForCAPS.fade=null;xModalDialog.instances['ajax_loader2'].hide();xModalDialog.instances['ajax_loader2']=null;$('ajax_loader2').parentNode.removeChild($('ajax_loader2'));xModalDialog.grey.parentNode.removeChild(xModalDialog.grey);xModalDialog.grey=null;isPostQClicked=false;if(!t.match(/to_rem/)){$(t).focus();}
else{if(!Prototype.Browser.IE){$('wysiwygwysiwyg').contentDocument.designMode="off";$('wysiwygwysiwyg').contentDocument.contentEditable=false;$('wysiwygwysiwyg').contentDocument.body.contentEditable=false;$('wysiwygwysiwyg').contentDocument.designMode="on";$('wysiwygwysiwyg').contentDocument.contentEditable=true;}
$("wysiwygwysiwyg").contentWindow.focus();}
if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=" ttip";}}
checkForCAPS.switchButtons.defer(checkForCAPS.target);},switchButtons:function(targ){if(document.forms['editform']&&document.forms['editform'].isNoAnsweredQ&&document.forms['editform'].isNoAnsweredQ.value==1&&checkForCAPS.enableBtnCheck){tmp_txt=targ.innerHTML.replace(/<style(.*)\/style(>)/i,"").stripScripts().stripTags().trim().replace(/[\s]+/g,"");if(tmp_txt.match(/[a-z]+/)||tmp_txt==""){if($('editform')){var buttons=$('editform').select('a.btn');buttons.each(function(button,index){if(index==0||index==2)
button.enableBtn();});}}
else{if($('editform')){var buttons=$('editform').select('a.btn');buttons.each(function(button,index){if(index==0||index==2)
button.disableBtn();});}}}}};var nlbFade_hextable=['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'];var nlbFade_elemTable=new Array();var nlbFade_t=new Array();function NLBfadeBg(elementId,startBgColor,endBgColor,fadeTime)
{var timeBetweenSteps=Math.round(Math.max(fadeTime/300,30));var nlbFade_elemTableId=nlbFade_elemTable.indexOf(elementId);if(nlbFade_elemTableId>-1)
{for(var i=0;i<nlbFade_t[nlbFade_elemTableId].length;i++)
clearTimeout(nlbFade_t[nlbFade_elemTableId][i]);}
else
{nlbFade_elemTable.push(elementId);nlbFade_elemTableId=nlbFade_elemTable.indexOf(elementId);}
var startBgColorRGB=hexToRGB(startBgColor);var endBgColorRGB=hexToRGB(endBgColor);var diffRGB=new Array();for(var i=0;i<3;i++)
diffRGB[i]=endBgColorRGB[i]-startBgColorRGB[i];var steps=Math.ceil(fadeTime/timeBetweenSteps);var nlbFade_s=new Array();for(var i=1;i<=steps;i++)
{var changes=new Array();for(var j=0;j<diffRGB.length;j++)
changes[j]=startBgColorRGB[j]+Math.round((diffRGB[j]/steps)*i);if(i==steps)
nlbFade_s[i-1]=setTimeout('document.getElementById("'+elementId+'").style.backgroundColor = "'+endBgColor+'";',timeBetweenSteps*(i-1));else
nlbFade_s[i-1]=setTimeout('document.getElementById("'+elementId+'").style.backgroundColor = "'+RGBToHex(changes)+'";',timeBetweenSteps*(i-1));}
nlbFade_t[nlbFade_elemTableId]=nlbFade_s;}
function hexToRGB(hexVal)
{hexVal=hexVal.toUpperCase();if(hexVal.substring(0,1)=='#')
hexVal=hexVal.substring(1);var hexArray=new Array();var rgbArray=new Array();hexArray[0]=hexVal.substring(0,2);hexArray[1]=hexVal.substring(2,4);hexArray[2]=hexVal.substring(4,6);for(var k=0;k<hexArray.length;k++)
{var num=hexArray[k];var res=0;var j=0;for(var i=num.length-1;i>=0;i--)
res+=parseInt(nlbFade_hextable.indexOf(num.charAt(i)))*Math.pow(16,j++);rgbArray[k]=res;}
return rgbArray;}
function RGBToHex(rgbArray)
{var retval=new Array();for(var j=0;j<rgbArray.length;j++)
{var result=new Array();var val=rgbArray[j];var i=0;while(val>16)
{result[i++]=val%16;val=Math.floor(val/16);}
result[i++]=val%16;var out='';for(var k=result.length-1;k>=0;k--)
out+=nlbFade_hextable[result[k]];retval[j]=padLeft(out,'0',2);}
out='#';for(var i=0;i<retval.length;i++)
out+=retval[i];return out;}
if(!Array.prototype.indexOf){Array.prototype.indexOf=function(val,fromIndex){if(typeof(fromIndex)!='number')fromIndex=0;for(var index=fromIndex,len=this.length;index<len;index++)
if(this[index]==val)return index;return-1;}}
function padLeft(string,character,paddedWidth)
{if(string.length>=paddedWidth)
return string;else
{while(string.length<paddedWidth)
string=character+string;}
return string;}
function ButtonMouseDown(elem){if(!elem.className.match(/grey/)){if(elem.className.match(/smallstdfaq/)){$(elem).select('span')[0].setStyle({backgroundPosition:'0 -18px'});$(elem).select('span')[0].select('span')[0].setStyle({backgroundPosition:'0 -18px'});}
else if(elem.className.match(/greenstd|bluestd/)){$(elem).select('span')[0].setStyle({backgroundPosition:'0 -23px'});$(elem).select('span')[0].select('span')[0].setStyle({backgroundPosition:'0 -23px'});}
else if(elem.className.match(/bigstd/)){$(elem).select('span')[0].setStyle({backgroundPosition:'0 -44px'});$(elem).select('span')[0].select('span')[0].setStyle({backgroundPosition:'0 -44px'});}
else if(elem.className.match(/smallstd/)){$(elem).select('span')[0].setStyle({backgroundPosition:'0 -21px'});$(elem).select('span')[0].select('span')[0].setStyle({backgroundPosition:'0 -21px'});}
else{$(elem).select('span')[0].setStyle({backgroundPosition:'0 -25px'});$(elem).select('span')[0].select('span')[0].setStyle({backgroundPosition:'0 -25px'});}}}
function ButtonMouseUp(elem){if(!elem.className.match(/grey/)){$(elem).select('span')[0].setStyle({backgroundPosition:'0 0px'});$(elem).select('span')[0].select('span')[0].setStyle({backgroundPosition:'0 0px'});}}
function ImagePreloader(images){this.nLoaded=0;this.nProcessed=0;this.aImages=new Array;this.nImages=images.length;for(var i=0;i<images.length;i++)
this.preload(images[i]);}
ImagePreloader.prototype.preload=function(image){var oImage=new Image;this.aImages.push(oImage);oImage.onload=ImagePreloader.prototype.onload;oImage.onerror=ImagePreloader.prototype.onerror;oImage.onabort=ImagePreloader.prototype.onabort;oImage.oImagePreloader=this;oImage.bLoaded=false;oImage.src=image;}
ImagePreloader.prototype.onComplete=function(){this.nProcessed++;if(this.nProcessed==this.nImages)
{}}
ImagePreloader.prototype.onload=function(){this.bLoaded=true;this.oImagePreloader.nLoaded++;this.oImagePreloader.onComplete();}
ImagePreloader.prototype.onerror=function(){this.bError=true;this.oImagePreloader.onComplete();}
ImagePreloader.prototype.onabort=function(){this.bAbort=true;this.oImagePreloader.onComplete();}
function reduceElemSizes(){var sim_list_c=0;var data_obj;var data_len;while(data_obj=document.getElementById('sim_list'+sim_list_c)){data_len=data_obj.offsetWidth;if(data_len>1250)
data_obj.innerHTML=data_obj.innerHTML.substring(0,1245)+'... ?';sim_list_c++;}}
var horizontal_offset="0";var vertical_offset="0";var ie=document.all;var ns6=document.getElementById&&!document.all;var tooltip_text="";var tip_elem_width=0;var tip_elem_height=0;var move_arrow=0;var listpics=new Array(wgStaticFilesServer+'/templates/icons/tooltip_bg.gif',wgStaticFilesServer+'/templates/icons/shadow.png',wgStaticFilesServer+'/templates/icons/arrow_down.png',wgStaticFilesServer+'/templates/icons/arrow_up.png',wgStaticFilesServer+'/templates/icons/x.png',wgStaticFilesServer+'/templates/icons/x_on.png');imagePreload=new ImagePreloader(listpics);if(typeof HTMLElement!="undefined"&&!HTMLElement.prototype.insertAdjacentElement){HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode)
{switch(where){case'beforeBegin':this.parentNode.insertBefore(parsedNode,this)
break;case'afterBegin':this.insertBefore(parsedNode,this.firstChild);break;case'beforeEnd':this.appendChild(parsedNode);break;case'afterEnd':if(this.nextSibling)
this.parentNode.insertBefore(parsedNode,this.nextSibling);else this.parentNode.appendChild(parsedNode);break;}}
HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr)
{var r=this.ownerDocument.createRange();r.setStartBefore(this);var parsedHTML=r.createContextualFragment(htmlStr);this.insertAdjacentElement(where,parsedHTML)}
HTMLElement.prototype.insertAdjacentText=function(where,txtStr)
{var parsedText=document.createTextNode(txtStr)
this.insertAdjacentElement(where,parsedText)}};function getposOffset(what,offsettype){var totaloffset=(offsettype=="left")?what.offsetLeft:what.offsetTop;var parentEl=what.offsetParent;while(parentEl!=null){totaloffset=(offsettype=="left")?totaloffset+parentEl.offsetLeft:totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}
return totaloffset;}
function iecompattest(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}
function showtip(obj,tipwidth,tipheight){if((ie||ns6)&&$('tooltip_elem')){dropmenuobj=$('tooltip_elem');dropmenuobj.style.left=dropmenuobj.style.top=-500;if(tipwidth!=""){dropmenuobj.widthobj=dropmenuobj.style;dropmenuobj.widthobj.width=tipwidth;}
dropmenuobj.x=getposOffset(obj,"left");dropmenuobj.y=getposOffset(obj,"top");new_left=dropmenuobj.x+obj.offsetWidth/2-85;new_windowedge=ie&&!window.opera?iecompattest().scrollLeft+iecompattest().clientWidth-30:window.pageXOffset+window.innerWidth-40;is_right=false;if(new_windowedge-new_left<tipwidth){dropmenuobj.style.left=new_left+86+86-tipwidth+"px";document.getElementById('tooltip_shadow').style.left=new_left+86+86-tipwidth+17+"px";is_right=true;}
else{dropmenuobj.style.left=new_left+"px";document.getElementById('tooltip_shadow').style.left=new_left+17+"px";}
move_arrow=0;tmp_new_left=dropmenuobj.style.left;if(parseInt(tmp_new_left.replace(/px/,""))<0){dropmenuobj.style.left="5px";document.getElementById('tooltip_shadow').style.left="22px";move_arrow=0-5+parseInt(tmp_new_left.replace(/px/,""));}
tooltip_text="<table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px; border: 0px; width: "+(tipwidth-9)+"px; height: 17px;'><tr><td style='padding: 0px; margin: 0px; width: "+(tipwidth-27)+"px; height: 17px; border: 0px; overflow: hidden;'><img src='"+wgStaticFilesServer+"/images/blank.gif' style='height: 17px; width: "+(tipwidth-27)+"px; display: block;' /></td><td style='padding: 0px; margin: 0px; width: 18px; height: 17px; border: 0px; overflow: hidden;'><img src='"+wgStaticFilesServer+"/templates/icons/x.png' id='xclose' style='height: 17px; width: 18px; display: block; cursor: pointer;' onMouseOver='this.src=\""+wgStaticFilesServer+"/templates/icons/x_on.png\";' onMouseOut='this.src=\""+wgStaticFilesServer+"/templates/icons/x.png\";' onClick='hideTooltip();' /></td></tr><tr><td colspan='2' style='height: "+(tipheight-32)+"px; padding: 0px; margin: 0px; width: "+(tipwidth-9)+"px; border: 0px; overflow: hidden; text-align: left; vertical-align: top;'>"+tooltip_text+"</td></tr></table>";new_top=dropmenuobj.y+obj.offsetHeight+5;browserName=navigator.appName;if(browserName.match(/opera/i)){new_top=new_top-20;}
new_windowedgetop=ie&&!window.opera?iecompattest().scrollTop+iecompattest().clientHeight-30:window.pageYOffset+window.innerHeight-40;if(new_windowedgetop-new_top<tipheight){new_new_top=dropmenuobj.y-5-tipheight;if(browserName.match(/opera/i)){new_new_top=new_new_top-20;}
dropmenuobj.style.top=new_new_top+"px";document.getElementById('tooltip_shadow').style.top=new_new_top+17+"px";if(is_right){dropmenuobj.innerHTML="<table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px; width: "+(tipwidth-7)+"px; height: "+tipheight+"px;'><tr><td style='padding: 0px; margin: 0px; width: "+(tipwidth-9)+"px; height: "+(tipheight-15)+"px; border-left: #18429C 1px solid; border-right: #18429C 1px solid; border-top: #18429C 1px solid; background: #FFFFFF url("+wgStaticFilesServer+"/templates/icons/tooltip_bg.gif) repeat-x; overflow: hidden;'>"+tooltip_text+"</td></tr><tr><td style='padding: 0px; margin: 0px; height: 14px; width: "+(tipwidth-7)+"px; overflow: hidden;'><table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px;'><tr><td style='padding: 0px; margin: 0px; height: 14px; overflow: hidden; border-top: #18429C 1px solid; width: "+(tipwidth-73-25-7)+"px;'><img src='"+wgStaticFilesServer+"/images/blank.gif' style='height: 14px; width: "+(tipwidth-73-25-7)+"px; display: block;' /></td><td style='padding: 0px; margin: 0px; width: 25px; height: 14px; overflow: hidden;'><img src='"+wgStaticFilesServer+"/templates/icons/arrow_down.png' style='height: 14px; width: 25px; display: block;' /></td><td style='padding: 0px; margin: 0px; width: 73px; height: 14px; overflow: hidden; border-top: #18429C 1px solid;'><img src='"+wgStaticFilesServer+"/images/blank.gif' style='height: 14px; width: 73px; display: block;' /></td></tr></table></td></tr></table>";}
else{dropmenuobj.innerHTML="<table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px; width: "+(tipwidth-7)+"px; height: "+tipheight+"px;'><tr><td style='padding: 0px; margin: 0px; width: "+(tipwidth-9)+"px; height: "+(tipheight-15)+"px; border-left: #18429C 1px solid; border-right: #18429C 1px solid; border-top: #18429C 1px solid; background: #FFFFFF url("+wgStaticFilesServer+"/templates/icons/tooltip_bg.gif) repeat-x; overflow: hidden;'>"+tooltip_text+"</td></tr><tr><td style='padding: 0px; margin: 0px; height: 14px; width: "+(tipwidth-7)+"px; overflow: hidden;'><table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px;'><tr><td style='padding: 0px; margin: 0px; width: "+(73+move_arrow)+"px; height: 14px; overflow: hidden; border-top: #18429C 1px solid;'><img src='"+wgStaticFilesServer+"/images/blank.gif' style='height: 14px; width: "+(73+move_arrow)+"px; display: block;' /></td><td style='padding: 0px; margin: 0px; width: 25px; height: 14px; overflow: hidden;'><img src='"+wgStaticFilesServer+"/templates/icons/arrow_down.png' style='height: 14px; width: 25px; display: block;' /></td><td style='padding: 0px; margin: 0px; height: 14px; overflow: hidden; border-top: #18429C 1px solid; width: "+(tipwidth-73-25-7-move_arrow)+"px;'><img src='"+wgStaticFilesServer+"/images/blank.gif' style='height: 14px; width: "+(tipwidth-73-25-7-move_arrow)+"px; display: block;' /></td></tr></table></td></tr></table>";}}
else{dropmenuobj.style.top=new_top+"px";document.getElementById('tooltip_shadow').style.top=new_top+20+"px";if(is_right){dropmenuobj.innerHTML="<table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px; width: "+(tipwidth-7)+"px; height: "+tipheight+"px;'><tr><td style='padding: 0px; margin: 0px; height: 14px; width: "+(tipwidth-7)+"px; overflow: hidden;'><table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px;'><tr><td style='padding: 0px; margin: 0px; height: 14px; overflow: hidden; border-bottom: #18429C 1px solid; width: "+(tipwidth-73-25-7)+"px;'><img src='"+wgStaticFilesServer+"/images/blank.gif' style='height: 14px; width: "+(tipwidth-73-25-7)+"px; display: block;' /></td><td style='padding: 0px; margin: 0px; width: 25px; height: 14px; overflow: hidden; vertical-align: bottom;'><img src='"+wgStaticFilesServer+"/templates/icons/arrow_up.png' style='height: 14px; width: 25px; display: block;' /></td><td style='padding: 0px; margin: 0px; width: 73px; height: 14px; overflow: hidden; border-bottom: #18429C 1px solid;'><img src='"+wgStaticFilesServer+"/images/blank.gif' style='height: 14px; width: 73px; display: block;' /></td></tr></table></td></tr><tr><td style='padding: 0px; margin: 0px; width: "+(tipwidth-9)+"px; height: "+(tipheight-15)+"px; border-left: #18429C 1px solid; border-right: #18429C 1px solid; border-bottom: #18429C 1px solid; background: #FFFFFF url("+wgStaticFilesServer+"/templates/icons/tooltip_bg.gif) repeat-x; overflow: hidden;'>"+tooltip_text+"</td></tr></table>";}
else{dropmenuobj.innerHTML="<table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px; width: "+(tipwidth-7)+"px; height: "+tipheight+"px;'><tr><td style='padding: 0px; margin: 0px; height: 14px; width: "+(tipwidth-7)+"px; overflow: hidden;'><table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px;'><tr><td style='padding: 0px; margin: 0px; width: "+(73+move_arrow)+"px; height: 14px; overflow: hidden; border-bottom: #18429C 1px solid;'><img src='"+wgStaticFilesServer+"/images/blank.gif' style='height: 14px; width: "+(73+move_arrow)+"px; display: block;' /></td><td style='padding: 0px; margin: 0px; width: 25px; height: 14px; overflow: hidden; vertical-align: bottom;'><img src='"+wgStaticFilesServer+"/templates/icons/arrow_up.png' style='height: 14px; width: 25px; display: block;' /></td><td style='padding: 0px; margin: 0px; height: 14px; overflow: hidden; border-bottom: #18429C 1px solid; width: "+(tipwidth-73-25-7-move_arrow)+"px;'><img src='"+wgStaticFilesServer+"/images/blank.gif' style='height: 14px; width: "+(tipwidth-73-25-7-move_arrow)+"px; display: block;' /></td></tr></table></td></tr><tr><td style='padding: 0px; margin: 0px; width: "+(tipwidth-9)+"px; height: "+(tipheight-15)+"px; border-left: #18429C 1px solid; border-right: #18429C 1px solid; border-bottom: #18429C 1px solid; background: #FFFFFF url("+wgStaticFilesServer+"/templates/icons/tooltip_bg.gif) repeat-x; overflow: hidden;'>"+tooltip_text+"</td></tr></table>";}}
arVersion=navigator.appVersion.split("MSIE")
version=parseFloat(arVersion[1])
browserName=navigator.appName;if((browserName=="Microsoft Internet Explorer")&&(version>=5.5)&&(version<7.0)&&(document.body.filters))
{for(i=0;i<document.images.length;i++)
{img=document.images[i]
imgName=img.src.split("?");imgName=imgName[0].toUpperCase();if(imgName.substring(imgName.length-3,imgName.length)=="PNG")
{imgID=(img.id)?"id='"+img.id+"' ":""
imgClass=(img.className)?"class='"+img.className+"' ":""
imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' "
imgStyle="display:inline-block;"+img.style.cssText
if(img.align=="left")imgStyle="float:left;"+imgStyle
if(img.align=="right")imgStyle="float:right;"+imgStyle
if(img.parentElement.href)imgStyle="cursor:hand;"+imgStyle
strNewHTML="<span "+imgID+imgClass+imgTitle
+" style=\""+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"
+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+img.src+"\', sizingMethod='scale');\"";if(img.id=="xclose"){strNewHTML+=" onClick='hideTooltip();'";}
strNewHTML+="></span>";img.outerHTML=strNewHTML;if(img.id=="xclose"){document.getElementById('xclose').onmouseover=function(){document.getElementById('xclose').style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+wgStaticFilesServer+'/templates/icons/x_on.png", sizingMethod="scale")';};document.getElementById('xclose').onmouseout=function(){document.getElementById('xclose').style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+wgStaticFilesServer+'/templates/icons/x.png", sizingMethod="scale")';};}
i=i-1}}}
browserName=navigator.appName;if(browserName.match(/opera/i)){document.getElementById('xclose').onmouseover=function(){document.getElementById('xclose').src=wgStaticFilesServer+"/templates/icons/x_on.png";document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=" ttip";};document.getElementById('xclose').onmouseout=function(){document.getElementById('xclose').src=wgStaticFilesServer+"/templates/icons/x.png";document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=" ttip";};}
document.getElementById('tooltip_shadow').style.visibility="visible";dropmenuobj.style.visibility="visible";dropmenuobj.style.textAlign="left";}}
var checkTooltip=function(e){if(document.getElementById('tooltip_elem')){var posx=0;var posy=0;if(!e)var e=window.event;if(e.pageX||e.pageY){posx=e.pageX;posy=e.pageY;}
else if(e.clientX||e.clientY){posx=e.clientX+document.body.scrollLeft
+document.documentElement.scrollLeft;posy=e.clientY+document.body.scrollTop
+document.documentElement.scrollTop;}
if(posx-5<parseInt(document.getElementById('tooltip_elem').style.left.replace(/px/,""))||posx+5>parseInt(document.getElementById('tooltip_elem').style.left.replace(/px/,""))+tip_elem_width||posy-5<parseInt(document.getElementById('tooltip_elem').style.top.replace(/px/,""))||posy+5>parseInt(document.getElementById('tooltip_elem').style.top.replace(/px/,""))+tip_elem_height){hideTooltip();}}};function hideTooltip(){if($("long_menu_list")||($('tooltip_elem')&&xModalDialog&&xModalDialog.grey)){Event.stopObserving(window,"scroll",stopWindowScroll,false);if(typeof checkScroll!="undefined"){if(document.addEventListener){if(xModalDialog&&xModalDialog.grey){xModalDialog.grey.removeEventListener("mousewheel",checkScroll,false);xModalDialog.grey.removeEventListener("DOMMouseScroll",checkScroll,false);}
if($('tooltip_elem')){$('tooltip_elem').removeEventListener("mousewheel",checkScroll,false);$('tooltip_elem').removeEventListener("DOMMouseScroll",checkScroll,false);}}
else if(document.attachEvent){if(xModalDialog&&xModalDialog.grey)
xModalDialog.grey.detachEvent("onmousewheel",checkScroll);if($('tooltip_elem'))
$('tooltip_elem').detachEvent("onmousewheel",checkScroll);}}}
if(document.getElementById('tooltip_elem')){el_parent=document.getElementById('tooltip_elem').parentNode;el_parent.removeChild(document.getElementById('tooltip_elem'));}
if(document.getElementById('tooltip_shadow')){el_parent=document.getElementById('tooltip_shadow').parentNode;el_parent.removeChild(document.getElementById('tooltip_shadow'));}
browserName=navigator.appName;if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=' ttip';}
if(typeof(w)!="undefined"){clearTimeout(w);}};speed=80;sy=30;var w;function goDIE(d){if(document.getElementById(d).offsetTop-30<document.documentElement.scrollTop){window.scrollBy(0,-sy);}
if(document.documentElement.scrollTop<document.getElementById(d).offsetTop-30-20||document.documentElement.scrollTop>document.getElementById(d).offsetTop){w=setTimeout('goDIE(\''+d+'\')',speed);}
else{document.documentElement.scrollTop=document.getElementById(d).offsetTop-30;clearTimeout(w);}}
function goDFirefox(d){if(document.getElementById(d).offsetTop-30<window.pageYOffset){window.scrollBy(0,-sy);}
if(window.pageYOffset<document.getElementById(d).offsetTop-30-20||window.pageYOffset>document.getElementById(d).offsetTop){w=setTimeout('goDFirefox(\''+d+'\')',speed);}
else{clearTimeout(w);}}
function goD(d){if(ie){goDIE(d);}
else{goDFirefox(d);}}
function showTooltip(n,sw,sh){hideTooltip();tip_elem_width=sw;tip_elem_height=sh;switch(n){case 1:case 2:{div=document.createElement("div");div.id="tooltip_shadow";div.innerHTML="<img src='"+wgStaticFilesServer+"/templates/icons/shadow.png' style='width: "+sw+"px; height: "+sh+"px; display: block;' />";div.style.visibility="hidden";div.style.position="absolute";div.style.left="-500px";div.style.width=""+sw+"px";div.style.height=""+sh+"px";div.style.padding="0px";div.style.margin="0px";div.style.overflow="hidden";div.style.zIndex="104";document.getElementById('left-column').insertAdjacentElement("beforeBegin",div);div=document.createElement("div");div.id="tooltip_elem";div.style.visibility="hidden";div.style.position="absolute";div.style.left="-500px";div.style.width=""+sw+"px";div.style.height=""+sh+"px";div.style.padding="0px";div.style.margin="0px";div.style.zIndex="105";tooltip_text="<div style='color: #000000; font-size: 12px; padding-left: 10px; padding-right: 10px; width: "+(sw-29)+"px; white-space: normal;'><b>"+"Why should you join?"+"</b><br><br>"+"Signing in is free and it only takes a moment. You can still be anonymous. All you have to do is choose a username and a password."+"<br><br><ul style='padding-left: 21px;'><li>"+"Get updates about new and modified answers"+"</li><li>"+"Get updates about categories that interest you"+"</li><li>"+"Get credit for your contributions"+"</li><li>"+"Create a member bio page"+"</li><li>"+"Answer questions more easily"+"</li></ul><br><div align='right'><a href='/help/signing_in' style='color: #000000; font-weight: bold;'>"+"Not convinced? Read more."+"</a>";document.getElementById('left-column').insertAdjacentElement("beforeBegin",div);break;}
case 3:case 7:{div=document.createElement("div");div.id="tooltip_shadow";div.innerHTML="<img src='"+wgStaticFilesServer+"/templates/icons/shadow.png' style='width: "+sw+"px; height: "+sh+"px; display: block;' />";div.style.visibility="hidden";div.style.position="absolute";div.style.left="-500px";div.style.width=""+sw+"px";div.style.height=""+sh+"px";div.style.padding="0px";div.style.margin="0px";div.style.overflow="hidden";div.style.zIndex="104";document.getElementById('left-column').insertAdjacentElement("beforeBegin",div);div=document.createElement("div");div.id="tooltip_elem";div.style.visibility="hidden";div.style.position="absolute";div.style.left="-500px";div.style.width=""+sw+"px";div.style.height=""+sh+"px";div.style.padding="0px";div.style.margin="0px";div.style.zIndex="105";tooltip_text="<div style='color: #000000; font-size: 12px; padding-left: 10px; padding-right: 10px; width: "+(sw-29)+"px; white-space: normal;'><b>"+"Why do we need your email address?</b><br><br>We will use your email address to send you updates (if you request them) about questions you ask, answer or track, and to help you retrieve your password if you forget it.<br><p></p>Your email address will not be used for any other purpose without your permission."+"<br></div>";document.getElementById('left-column').insertAdjacentElement("beforeBegin",div);break;}
case 4:{div=document.createElement("div");div.id="tooltip_shadow";div.innerHTML="<img src='"+wgStaticFilesServer+"/templates/icons/shadow.png' style='width: "+sw+"px; height: "+sh+"px; display: block;' />";div.style.visibility="hidden";div.style.position="absolute";div.style.left="-500px";div.style.width=""+sw+"px";div.style.height=""+sh+"px";div.style.padding="0px";div.style.margin="0px";div.style.overflow="hidden";div.style.zIndex="104";document.getElementById('left-column').insertAdjacentElement("beforeBegin",div);div=document.createElement("div");div.id="tooltip_elem";div.style.visibility="hidden";div.style.position="absolute";div.style.left="-500px";div.style.width=""+sw+"px";div.style.height=""+sh+"px";div.style.padding="0px";div.style.margin="0px";div.style.zIndex="105";tooltip_text="<div style='color: #000000; font-size: 12px; padding-left: 20px; padding-right: 20px; width: "+(sw-49)+"px; white-space: normal;'><font style='font-size: 14px; line-height: 20px;'><b><i>"+"How many ounces are there in a pound?<br>What\'s the number of ounces per pound?<br>How many oz. in a lb.?</i></b></font><br><br><p>People ask the same question in many different ways, all looking for the same answer. WikiAnswers recognizes that people have their own styles of speaking, and our site builds on that idea. We call these different versions of the same question \"alternate wordings.\""+"</p><ul style='padding-left: 21px;'><li style='padding-bottom: 3px;'>"+"Alternate wordings are created by contributors, either by manually adding an alternate wording using the \"Edit Alternate Wordings\" tool in the left-hand menu or by saying that a question is the same as another question when they ask a new question."+"</li><li style='padding-bottom: 3px;'>"+"Keeping track of alternate wordings makes questions much easier to find and prevents people from asking and answering the same questions again and again."+"</li><li style='padding-bottom: 3px;'>"+"When someone asks a question in the form of one of these alternate wordings, they are automatically redirected to the original question."+"</li><li style='padding-bottom: 3px;'>"+"Contributors can choose whether an alternate wording is 1<sup><small>st</small></sup> tier (grammatically sound and spelled correctly) or 2<sup><small>nd</small></sup> tier (not)."+"</li></ul><br>"+"For more information about alternate wordings please see our <a href=\'/help/alternates\'>Help Center</a>."+"<br><br><div align='right'><a onClick='hideTooltip();' href='javascript:hideTooltip();' style='color: #000000; font-weight: bold;'>"+"Close"+"</a><br></div></div>";document.getElementById('left-column').insertAdjacentElement("beforeBegin",div);break;}
case 5:{div=document.createElement("div");div.id="tooltip_shadow";div.innerHTML="<img src='"+wgStaticFilesServer+"/templates/icons/shadow.png' style='width: "+sw+"px; height: "+sh+"px; display: block;' />";div.style.visibility="hidden";div.style.position="absolute";div.style.left="-500px";div.style.width=""+sw+"px";div.style.height=""+sh+"px";div.style.padding="0px";div.style.margin="0px";div.style.overflow="hidden";div.style.zIndex="104";document.getElementById('left-column').insertAdjacentElement("beforeBegin",div);div=document.createElement("div");div.id="tooltip_elem";div.style.visibility="hidden";div.style.position="absolute";div.style.left="-500px";div.style.width=""+sw+"px";div.style.height=""+sh+"px";div.style.padding="0px";div.style.margin="0px";div.style.zIndex="105";tooltip_text="<div style='color: #000000; font-size: 12px; padding-left: 10px; padding-right: 10px; width: "+(sw-29)+"px; white-space: normal;'>"+"<b>What is a cookie?</b><p></p><p>A cookie is a piece of information stored on your computer that helps a web site interact with you by storing preferences and other information."+"</p></div>";document.getElementById('left-column').insertAdjacentElement("beforeBegin",div);break;}
default:break;}
showtip($('tooltip'+n),sw,sh);if(n==4){goD('tooltip_elem');}
browserName=navigator.appName;if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=' ttip';}};Event.observe(document,'click',checkTooltip,false);function NiftyCheck(){if(!document.getElementById||!document.createElement)
return(false);var b=navigator.userAgent.toLowerCase();if(b.indexOf("msie 5")>0&&b.indexOf("opera")==-1)
return(false);return(true);}
function Rounded(selector,bk,color,size){var i;var v=getElementsBySelector(selector);var l=v.length;for(i=0;i<l;i++){AddTop(v[i],bk,color,size);AddBottom(v[i],bk,color,size);}}
function RoundedTop(selector,bk,color,size){var i;var v=getElementsBySelector(selector);for(i=0;i<v.length;i++)
AddTop(v[i],bk,color,size);}
function RoundedBottom(selector,bk,color,size){var i;var v=getElementsBySelector(selector);for(i=0;i<v.length;i++)
AddBottom(v[i],bk,color,size);}
function AddTop(el,bk,color,size){var i;var d=document.createElement("b");var cn="r";var lim=4;if(size&&size=="small"){cn="rs";lim=2}
d.className="rtop";d.style.backgroundColor=bk;for(i=1;i<=lim;i++){var x=document.createElement("b");x.className=cn+i;x.style.backgroundColor=color;d.appendChild(x);}
el.insertBefore(d,el.firstChild);}
function AddBottom(el,bk,color,size){var i;var d=document.createElement("b");var cn="r";var lim=4;if(size&&size=="small"){cn="rs";lim=2}
d.className="rbottom";d.style.backgroundColor=bk;for(i=lim;i>0;i--){var x=document.createElement("b");x.className=cn+i;x.style.backgroundColor=color;d.appendChild(x);}
el.appendChild(d,el.firstChild);}
function getElementsBySelector(selector){var i;var s=[];var selid="";var selclass="";var tag=selector;var objlist=[];if(selector.indexOf(" ")>0){s=selector.split(" ");var fs=s[0].split("#");if(fs.length==1)return(objlist);return(document.getElementById(fs[1]).getElementsByTagName(s[1]));}
if(selector.indexOf("#")>0){s=selector.split("#");tag=s[0];selid=s[1];}
if(selid!=""){objlist.push(document.getElementById(selid));return(objlist);}
if(selector.indexOf(".")>0){s=selector.split(".");tag=s[0];selclass=s[1];}
var v=document.getElementsByTagName(tag);if(selclass=="")
return(v);for(i=0;i<v.length;i++){if(v[i].className==selclass){objlist.push(v[i]);}}
return(objlist);}
var RoundStatus=function(){if(!NiftyCheck())
return;Rounded("div.status","#FFFFFF","#FFFF66");Rounded("p.status","#FFFFFF","#FFFF66");Rounded("div.STATUS","#FFFFFF","#FFFF66");Rounded("p.STATUS","#FFFFFF","#FFFF66");}
if(typeof checkspell=="undefined"||!checkspell)
Event.observe(window,'load',RoundStatus,false);var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}var hbx=_hbEvent("pv");hbx.vpc="HBX0200u";hbx.gn="a.answers.com";hbx.pn="unknown";if(location.hostname.indexOf(".answers.com")==-1){hbx.acct="DM5607254MCC";}else{hbx.acct="DM560726P4FE62EN3";}hbx.mlc="/unknown";hbx.pndef="title";hbx.ctdef="full";hbx.lt="manual";function _hbOnPrePV(_1){for(var a=0;a<_IL(document.links);a++){if(_lvid.length+_lvpos.length<_lvm){_LV(document.links[a]);}else{break;}}_ar+="&lv.id="+_lvid+"&lv.pos="+_lvpos;_lvl=-1;}function _NA(a){return new Array(a?a:0);}function _D(v){return(typeof eval("window._"+v)!=_hud)?eval("window._"+v):"";}function _DD(v){return(typeof v!=_hud)?1:0;}function _A(v,c){return escape((_D("lc")=="y"&&_DD(c))?_TL(v):v);}function _B(){return 0;}function _GP(){return(_IL(_D("protocol"))>0)?_protocol+"://":(location.protocol=="https:"?"https://":"http://");}function _IC(a,b,c){return a.charAt(b)==c?1:0;}function _II(a,b,c){return a.indexOf(b,c?c:0);}function _IL(a){return a!=_hud?a.length:0;}function _IF(a,b,c){return a.lastIndexOf(b,c?c:_IL(a));}function _IP(a,b){return a.split(b);}function _IS(a,b,c){return b>_IL(a)?"":a.substring(b,c!=null?c:_IL(a));}function _RP(a,b,c,d){d=_II(a,b);if(d>-1){a=_RP(_IS(a,0,d)+","+_IS(a,d+_IL(b),_IL(a)),b,c);}return a;}function _TL(a){return a.toLowerCase();}function _TS(a){return a.toString();}function _TV(){_hbSend();}function _SV(a,b,c){_hbSet(a,b,c);}function _VS(a,b,c,d){c=["C","P","R"];for(d=0;d<_IL(c);d++){if(_II(""+b,"_"+c[d]+"::")==0){b=eval("_R"+c[d]+"V(_IS(b,4,_IL(b)))");}}eval("_"+a+"='"+b+"'");}function _VC(a,b,c,d){b=_IP(a,",");for(c=0;c<_IL(b);c++){d=_IP(b[c],"|");_VS(d[0],(_D(d[0]))?_D(d[0]):d[1]?d[1]:"");}}function _VL(a,b){for(a=0;a<_hbEC;a++){_pv=_hbE[a];if(_pv._N=="pv"){for(b in _pv){if(_EE(b)&&typeof _pv[b]!=_huf){_VS(b,_pv[b]);}}}}_VC("pn|PUT+PAGE+NAME+HERE,mlc|CONTENT+CATEGORY,elf|n,dlf|n,dft|n,pndef|title,ctdef|full,cp|null,hcn|");}function _ER(a,b,c){if(_erf++==0){_hbi.src=_GP()+_gn+"/HG?hc="+_mn+"&hb="+_A(_acct)+"&hec=1&vjs="+_vjs+"&vpc=ERR&ec=1&err="+((typeof a=="string")?_A(a+"-"+c):"Unknown");}_XT("Error",a);}function _EE(a){return(a!="_N"&&a!="_C")?1:0;}function _hbSend(c,a,i){a="";_hec++;for(i in _hbA){if(typeof _hbA[i]!=_huf){a+="&"+i+"="+_hbA[i];}}_Q(_hbq+"&hec="+_hec+a+_hbSendEV());_hbA=_NA();}function _hbSet(a,b,c,d,e){d=_II(_hbq,"&"+a+"=");if(d>-1){e=_II(_hbq,"&",d+1);e=e>d?e:_IL(_hbq);if(a=="n"||a=="vcon"){_hbq=_IS(_hbq,0,d)+"&"+a+"="+b+_IS(_hbq,e);_hec=-1;if(a=="n"){_pn=b;}else{_mlc=b;}}else{_hbq=_IS(_hbq,0,d)+_IS(_hbq,e);}}if((a!="n")&&(a!="vcon")){_hbA[a]=(c==0)?b:_A(b);}}function _hbRedirect(a,b,c,d,e,f,g){_SV("n",a);_SV("vcon",b);if(_DD(d)&&_IL(d)>0){d=_IC(d,0,"&")?_IS(d,1,_IL(d)):d;e=_IP(d,"&");for(f=0;f<_IL(e);f++){g=_IP(e[f],"=");_SV(g[0],g[1]);}}_TV();if(c!=""){_SV("hec",0);setTimeout("location.href='"+c+"'",500);}}function _hbSendEV(a,b,c,d,e,f,x,i){a="",c="",e=_IL(_hbE);for(b=0;b<e;b++){c=_hbE[b];for(var d in c){if(_EE(d)&&c[d].match){x=c[d].match(/\[\]/g);if(x!=null&&_IL(x)>c._C){c._C=_IL(x);}}}for(d in c){if(_EE(d)&&c[d].match){x=c[d].match(/\[\]/g);x=(x==null)?0:_IL(x);for(i=x;i<c._C;i++){c[d]+="[]";}}}}for(b=0;b<e;b++){c=_hbE[b];for(f=b+1;f<e;f++){if(_hbE[f]!=null&&c._N==_hbE[f]._N){for(d in c){if(_EE(d)&&_hbE[f]!=null){c[d]+="[]"+_hbE[f][d];}_hbE[f][d]="";}}}for(d in c){if(_EE(d)&&c._N!=""&&c._N!="pv"){a+="&"+c._N+"."+d+"="+_RP(_A(c[d]),"%5B%5D",",");}}}_hbE=_NA();_hbEC=0;return a;}function _hbM(a,b,c,d){_SV("n",a);_SV("vcon",b);if(_IL(c)>0){_SV(c,d);}_TV();}function _hbPageView(p,m){_hec=-1;_hbM(p,m,"");}function _hbExitLink(n){_hbM(_pn,_mlc,"el",n);}function _hbDownload(n){_hbM(_pn,_mlc,"fn",n);}function _hbVisitorSeg(n,p,m){_SV("n",p);_SV("vcon",m);_SV("seg",n,1);_TV();}function _hbCampaign(n,p,m){_hbM(p,m,"cmp",n);}function _hbFunnel(n,p,m){_hbM(p,m,"fnl",n);}function _hbGoalPage(n,p,m){_hbM(p,m,"gp",n);}function _hbLink(a,b,c){_SV("lid",a);if(_DD(b)){_SV("lpos",b);}_XT("Link","");_TV();}function _hbForm(a,b,c,d,e,f){if(_DD(c)){_hlf=c;}_hfs=0,_fa=1,f="Complete",_hfa=0;if(a==0){f="Abandon";_hfa=1;}_XT("Form"+f,b);}function _hbCookie(a,b,c){document.cookie=a+"="+b+";path=/;"+((_DD(c)==1)?"expires="+c:"");}function _LE(a,b,c,d,e,f,g,h,i,j,k,l){b="([0-9A-Za-z\\-]*\\.)",c=location.hostname,d=a.href,h="",i="";eval("__f=/"+b+"*"+b+"/");if(_DD(__f)){__f.exec(c);j=(_DD(_elf))?_elf:"";if(j!="n"){if(_II(j,"!")>-1){h=_IS(j,0,_II(j,"!"));i=_IS(j,_II(j,"!")+1,_IL(j));}else{h=j;}}k=0;if(_DD(_elf)&&_elf!="n"){if(_IL(i)){l=_IP(i,",");for(g=0;g<_IL(l);g++){if(_II(d,l[g])>-1){return;}}}if(_IL(h)){l=_IP(h,",");for(g=0;g<_IL(h);g++){if(_II(d,l[g])>-1){k=1;}}}}if(_II(a.hostname,RegExp.$2)<0||k){e=_IL(d)-1;return _IC(d,e,"/")?_IS(d,0,e):d;}}}function _LD(a,b,c,d,e,f){b=a.pathname,d="",e="";b=_IS(b,_IF(b,"/")+1,_IL(b));c=(_DD(_dlf))?_dlf:"";if(c!="n"){if(_II(c,"!")>-1){d=","+_IS(c,0,_II(c,"!"));e=","+_IS(c,_II(c,"!")+1,_IL(c));}else{d=","+c;}}f=_II(b,"?");b=(f>-1)?_IS(b,0,f):b;if(_IF(b,".")>-1){f=_IS(b,_IF(b,"."),_IL(b));if(_II(_dl+d,f)>-1&&_II(e,f)<0){var dl=b;if(_DD(_dft)){if(_dft=="y"&&a.name){dl=a.name;}else{if(_dft=="full"){dl=a.pathname;if(!_IC(dl,0,"/")){dl="/"+dl;}}}}return dl;}}}function _LP(a,b){for(b=0;b<_IL(a);b++){if(_IL(_lvl)<_lvm){_LV(a[b]);}_EV(a[b],"mousedown",_LT);}}function _LV(a,b,c){b=_LN(a);c=b[0]+b[1];if(_IL(b[0])){_lvid+=_A(b[0])+",";_lvpos+=_A(b[1])+",";_lvl+=c;}}function _LN(a,b,c,d){b=a.href;b+=a.name?a.name:"";c=_LVP(b,_lidt);d=_LVP(b,_lpost);return[c,d];}function _LT(e){if((e.which&&e.which==1)||(e.button&&e.button==1)){var a=document.all?window.event.srcElement:this;for(var i=0;i<4;i++){if(a.tagName&&_TL(a.tagName)!="a"&&_TL(a.tagName)!="area"){a=a.parentElement;}}var b=_LN(a),c="",d="";a.lid=b[0];a.lpos=b[1];if(_D("lt")&&_lt!="manual"){if((a.tagName&&_TL(a.tagName)=="area")){if(!_IL(a.lid)){if(a.parentNode){if(a.parentNode.name){a.lid=a.parentNode.name;}else{a.lid=a.parentNode.id;}}}if(!_IL(a.lpos)){a.lpos=a.coords;}}else{if(_IL(a.lid)<1){a.lid=_LS(a.text?a.text:a.innerText?a.innerText:"");}if(!_IL(a.lid)||_II(_TL(a.lid),"<img")>-1){a.lid=_LI(a);}}}if(!_IL(a.lpos)&&_D("lt")=="auto_pos"&&a.tagName&&_TL(a.tagName)!="area"){c=document.links;for(d=0;d<_IL(c);d++){if(a==c[d]){a.lpos=d+1;break;}}}var _f=0,j="",k="",l=(a.protocol)?_TL(a.protocol):"";if(l&&l!="mailto:"&&l!="javascript:"){j=_LE(a),k=_LD(a);if(_DD(k)){a.fn=k;}else{if(_DD(j)){a.el=j;}}}if(_D("lt")&&_IC(_lt,0,"n")!=1&&_DD(a.lid)&&_IL(a.lid)>0){_SV("lid",a.lid);if(_DD(a.lpos)){_SV("lpos",a.lpos);}_f=1;}if(_DD(a.fn)){_SV("fn",a.fn);_XT("Download",a);_f=2;}else{if(_DD(a.el)){_SV("el",a.el);_XT("ExitLink",a);_f=1;}}if(_f>0){_XT("Link",a);_TV();}}}function _LVP(a,b,c,d,e){c=_II(a,"&"+b+"=");c=c<0?_II(a,"?"+b+"="):c;if(c>-1){d=_II(a,"&",c+_IL(b)+2);e=_IS(a,c+_IL(b)+2,d>-1?d:_IL(a));if(!_echbx){if(!(_II(e,"//")==0)){return e;}}else{return e;}}return"";}function _LI(a){var b=""+a.innerHTML,bu=_TL(b),i=_II(bu,"<img");if(bu&&i>-1){eval("__f=/ srcs*=s*['\"]?([^'\" ]+)['\"]?/i");__f.exec(b);if(RegExp.$1){b=RegExp.$1;}}return b;}function _LSP(a,b,c,d){d=_IP(a,b);return d.join(c);}function _LS(a,b,c,d,e,f,g){c=_D("lim")?_lim:100;b=(_IL(a)>c)?_A(_IS(a,0,c)):_A(a);b=_LSP(b,"%0A","%20");b=_LSP(b,"%0D","%20");b=_LSP(b,"%09","%20");c=_IP(b,"%20");d=_NA();e=0;for(f=0;f<_IL(c);f++){g=_RP(c[f],"%20","");if(_IL(g)>0){d[e++]=g;}}b=d.join("%20");return unescape(b);}function _EM(a,b,c,d){a=_D("fv");b=_II(a,";"),c=parseInt(a);d=3;if(_TL(a)=="n"){d=999;_fv="";}else{if(b>-1){d=_IS(a,0,b);_fv=_IS(a,b+1,_IL(a));}else{if(c>0){d=c;_fv="";}}}return d;}function _FF(e){var a=(_bnN)?this:_EVO(e);_hlf=(a.lf)?a.lf:"";}function _FU(e){if(_hfs==0&&_IL(_hlf)>0&&_fa==1){_hfs=1;if(_hfc&&!_hfa){_SV("sf","1");_XT("FormComplete",_hfc);}else{if(_IL(_hlf)>0){_SV("lf",_hlf);_XT("FormAbandon",_hlf);}}_TV();_hlf="",_hfs=0,_hfc=0;}}function _FO(e){var a=true;if(_DD(this._FS)){eval("try{a=this._FS()}catch(e){}");}if(a!=false){_hfc=1;}return a;}function _FA(a,b,c,d,e,f,g,h,i,ff,fv,s){b=a.forms;ff=new Object();f=_EM();for(c=0;c<_IL(b);c++){ff=b[c],d=0,s=0,e=ff.elements;g=ff.name?ff.name:"forms["+c+"]";for(h=0;h<_IL(e);h++){if(e[h].type&&"hiddenbuttonsubmitimagereset".indexOf(e[h].type)<0&&d++>=f){break;}}if(d>=f){_fa=1;for(h=0;h<_IL(e);h++){i=e[h];if(i.type&&"hiddenbuttonsubmitimagereset".indexOf(i.type)<0){i.lf=g+".";i.lf+=(i.name&&i.name!="")?i.name:"elements["+h+"]";_EV(i,"focus",_FF);}}ff._FS=null;ff._FS=ff.onsubmit;if(_DD(ff._FS)&&ff._FS!=null){ff.onsubmit=_FO;}else{if(!(_bnN&&_bv<5)&&_hM&&!(_bnI&&!_I5)){if((!_bnI)||(_II(navigator.userAgent,"Opera")>-1)){ff.onsubmit=_FO;}else{_EV(ff,"submit",_FO);eval("try{document.forms["+c+"]._FS=document.forms["+c+"].submit;document.forms["+c+"].submit=_FO;throw ''}catch(E){}");}}}}}}function _GR(a,b,c,d){if(!_D("hrf")){return a;}if(_II(_hrf,"http",0)>-1){return _hrf;}b=window.location.search;b=_IL(b)>1?_IS(b,1,_IL(b)):"";c=_II(b,_hrf+"=");if(c>-1){d=_II(b,"&",c+1);d=d>c?d:_IL(b);b=_IS(b,c+_IL(_hrf)+1,d);}return(b!=_hud&&_IL(b)>0)?b:a;}function _PO(a,b,c,d,e,f,g){d=location,e=d.pathname,f=_IS(e,_IF(e,"/")+1),g=document.title;if(a&&b==c){return(_pndef=="title"&&g!=""&&g!=d&&!(_bnN&&_II(g,"http")>0))?g:f?f:_pndef;}else{return b==c?(e==""||e=="/")?"/":_IS(e,(_ctdef!="full")?_IF(e,"/",_IF(e,"/")-2):_II(e,"/"),_IF(e,"/")):(b=="/")?b:((_II(b,"/")?"/":"")+(_IF(b,"/")==_IL(b)-1?_IS(b,0,_IL(b)-1):b));}}function _PP(a,b,c,d){return""+(c>-1?_PO(b,_IS(a,0,c),d)+";"+_PP(_IS(a,c+1),b,_II(_IS(a,c+1),";")):_PO(b,a,d));}function _NN(a){return _D(a)!="none";}function _E(a){var b="";var d=_IP(a,",");for(var c=0;c<_IL(d);c++){b+="&"+d[c]+"="+_A(_D(d[c]));}return b;}function _F(a,b){return(!_II(a,"?"+b+"="))?0:_II(a,"&"+b+"=");}function _G(a,b,c,d){var e=_F(a,b);if(d&&e<0&&top&&window!=top){e=_F(_tls,b);if(e>-1){a=_tls;}}return(e>-1)?_IS(a,e+2+_IL(b),(_II(a,"&",e+1)>-1)?_II(a,"&",e+1):_IL(a)):c;}function _H(a,b,c){if(!a){a=c;}if(_I5||_N6){eval("try{_vv=_G(location.search,'"+a+"','"+b+"',1)}"+__c+"{}");}else{_vv=_G(location.search,a,b,1);}return unescape(_vv);}function _I(a,b,c,d){__f=_IS(a,_II(a,"?"));if(b){if(_I5||_N6){eval("try{_hra=_G(__f,_hqsr,_hra,0)}"+__c+"{}");}else{_hra=_G(__f,_hqsr,_hra,0);}}if(c&&!_hra){if(_I5||_N6){eval("try{_hra=_G(location.search,_hqsp,_hra,1)}"+__c+"{}");}else{_hra=_G(location.search,_hqsp,_hra,1);}}if(d&&!_hra){_hra=d;}return _hra;}function _J(a,b,c,d){c=_II(a,"CP=");d=_II(a,b,c+3);return(c<0)?"null":_IS(a,c+3,(d<0)?_IL(a):d);}function _PV(){_dcmpe=_H(_D("dcmpe"),_D("dcmpe"),"DCMPE");_dcmpre=_H(_D("dcmpre"),_D("dcmpre"),"DCMPRE");_vv="";_cmp=_H(_D("cmpn"),_D("cmp"),"CMP");_gp=_H(_D("gpn"),_D("gp"),"GP");_dcmp=_H(_D("dcmpn"),_D("dcmp"),"DCMP");if(_II(_cmp,"SFS-")>-1){document.cookie="HBCMP="+_cmp+"; path=/;"+(_D("cpd")&&_D("cpd")!=""?(" domain=."+_D("cpd")+"; "):"")+_ex;}if(_bnI&&_bv>3){_ln=navigator.userLanguage;}if(_bnN){if(_bv>3){_ln=navigator.language;}if(_bv>2){for(var i=0;i<_IL(navigator.plugins);i++){_pl+=navigator.plugins[i].name+":";}}}_cp=_D("cp");if(location.search&&_TL(_cp)=="null"){_cp=_J(location.search,"&");}if(_II(document.cookie,"CP=")>-1){_ce="y";_hd=_J(document.cookie,"*");if(_TL(_hd)!="null"&&_cp=="null"){_cp=_hd;}else{document.cookie="CP="+_cp+_hck;}}else{document.cookie="CP="+_cp+_hck;_ce=(_II(document.cookie,"CP=")>-1)?"y":"n";}if(window.screen){_sv=12;_ss=screen.width+"*"+screen.height;_sc=_bnI?screen.colorDepth:screen.pixelDepth;if(_sc==_hud){_sc="na";}}_ra=_NA();if(_ra.toSource||(_bnI&&_ra.shift)){_sv=13;}if(!(_bnN&&_bv<5)&&!_bnI&&_hM){eval("try{throw _sv=14}catch(e){}");}if((new Date()).toDateString){_sv=15;}if(_hbA.every){_sv=16;}if(_I5&&_hM){if(_II(""+navigator.appMinorVersion,"Privacy")>-1){_ce="p";}if(document.body&&document.body.addBehavior){document.body.addBehavior("#default#homePage");_hp=document.body.isHomePage(location.href)?"y":"n";document.body.addBehavior("#default#clientCaps");_cy=document.body.connectionType;}}var _db=(_DD(_hcn))?_D("hcv"):"";if(!_D("gn")){_gn="ehg.hitbox.com";}if(_D("ct")&&!_D("mlc")){_mlc=_ct;}_XT("PrePVR","");_ar=_GP()+_gn+"/HG?hc="+_mn+"&hb="+_A(_acct)+"&cd=1&hv=6&n="+_A(_pn,1)+"&con=&vcon="+_A(_mlc,1)+"&tt="+_D("lt")+"&ja="+(navigator.javaEnabled()?"y":"n")+"&dt="+(new Date()).getHours()+"&zo="+(new Date()).getTimezoneOffset()+"&lm="+Date.parse(document.lastModified)+(_tp?("&pt="+_tp):"")+_E((_bnN?"bn,":"")+"ce,ss,sc,sv,cy,hp,ln,vpc,vjs,hec,pec,cmp,gp,dcmp,dcmpe,dcmpre,cp,fnl")+"&seg="+_D("seg")+"&epg="+_D("epg")+"&cv="+_A(_db)+"&gn="+_A(_D("hcn"))+"&ld="+_A(_D("hlt"))+"&la="+_A(_D("hla"))+"&c1="+_A(_D("hc1"))+"&c2="+_A(_D("hc2"))+"&c3="+_A(_D("hc3"))+"&c4="+_A(_D("hc4"))+"&customerid="+_A(_D("ci")?_ci:_D("cid"))+"&ttt="+_lidt+","+_lpost;if(_I5||_N6){eval("try{_rf=_A(top.document"+__r+")+''}"+__c+"{_rf=_A(document"+__r+")+''}");}else{if(top.document&&_IL(parent.frames)>1){_rf=_A(eval("document"+__r))+"";}else{if(top.document){_rf=_A(eval("top.document"+__r))+"";}}}if((_rf==_hud)||(_rf=="")){_rf="bookmark";}_rf=unescape(_rf);_rf=_GR(_rf);_hra=_I(_rf,_D("hqsr"),_D("hqsp"),_hrat);_ar+="&ra="+_A(_hra)+"&pu="+_A(_IS(eval("document.URL")+"",0,_pum))+_hbSendEV()+"&rf=";_ar+=(_IL(_ar)+_IL(_rf)<2048)?_A(_rf):"bookmark";if(_IL(_ar)+_IL(_pl)<2048){_ar+="&pl="+_A(_pl);}_XT("PrePV",_ar);if(_D("onlyMedia")!="y"){_hbi.src=_ar+"&hid="+Math.random();}_hbq=_IS(_ar,0,_II(_ar,"&hec"));_XT("PostPV",_ar);_hbE=_NA();}function _Q(a){a+="&hid="+Math.random();if(_hif==0){_hif=1;_hbs="";_hbs=new Image();_hbs.src=a;}else{_hif=0;_hbi="";_hbi=new Image();_hbi.src=a;}}function __X(a){if(_echbx==0){_echbx=1;a=document;if(_NN("lt")||_NN("dlf")||_NN("elf")){_LP(a.links);}if(_NN("fv")){_FA(a);}if(_NN("lt")&&_IL(_lvl)>0&&_lvl!=-1){_SV("lv.id",_lvid,1);_SV("lv.pos",_lvpos,1);_TV();}}}function _EV(a,b,c,d){if(a.addEventListener){a.addEventListener(b,c,false);}else{if(a.attachEvent){a.attachEvent(((d==1)?"":"on")+b,c);}}}function _EVO(e){return document.all?window.event.srcElement:this;}function _RCV(a,b,c,d){b=document.cookie;c=_II(b,a+"=");d="";if(c>-1){d=_II(b,";",c+1);d=(d>0)?d:_IL(b);d=(d>c)?_IS(b,c+_IL(a)+1,d):"";}return d;}function _RRV(a){return(_LVP(document.referrer,a));}function _RPV(a){return(_LVP(document.URL,a));}function _XT(a,b){if(typeof _D("hbOn"+a)==_huf){eval("_hbOn"+a+"(b)");}}String.prototype.trim=function(){a=this.replace(/^\s+/,"");return a.replace(/\s+$/,"");};function _answ_hbxInit(_eb,pn,mlc,_ee,_ef,_f0,_f1,_f2){hbx.acct=_eb;var ref;if(pn){hbx.pn=pn;}if(mlc){hbx.mlc=mlc;}if(_ee||_ef||_f0||_f1){cv=_hbEvent("cv");}if(_ee){cv.c8=_ee;ref=_ee.split("|")[0].trim();if(ref){ref=ref.replace(" ","_");}ref="http://www."+ref+".com";hbx.hrf=ref;}if(_ef){cv.c9=_ef;}if(_f0){cv.c7=_f0;}if(_f1){cv.c5=_f1;}if(_f2){cv.c12=_f2;}_vjs="HBX0201.03u";_dl=".exe,.zip,.wav,.wmv,.mp3,.mov,.mpg,.avi,.doc,.pdf,.xls,.ppt,.gz,.bin,.hqx,.dmg";_mn=_hbq="",_hbA=_NA(),_hud="undefined",_huf="function",_echbx=_if=_ll=_hec=_hfs=_hfc=_hfa=_ic=_pC=_fc=_pv=0,_hbi=_hbs=new Image(),_hbin=_NA(),_pA=_NA();_lvid=_lvpos=_lvl="";_hbE=_D("hbE")?_hbE:"";_hbEC=_D("hbEC")?_hbEC:0;_ex="expires=Wed, 1 Jan 2020 00:00:00 GMT",_lvm=300,_lidt="lid",_lpost="lpos",_pum=_erf=_hif=0;_VL();_EV(window,"error",_ER);_mlc=_PP(_mlc,0,_II(_mlc,";"),"CONTENT+CATEGORY");_pn=_PP(_pn,1,_II(_pn,";"),"PUT+PAGE+NAME+HERE");__r=".referrer",_rf=_A(eval("document"+__r)),_et=0,_oe=0,_we=0,_ar="",_hM=(!(_II(navigator.userAgent,"Mac")>-1)),_tls="";_bv=parseInt(navigator.appVersion);_bv=(_bv>99)?(_bv/100):_bv;var _f4;__f=_f4,_hrat=_D("hra"),_hra="",__c="catch(_e)",_fa=0,_hlfs=0,_hoc=0,_hlf="",_ce="",_ln="",_pl="",_bn=navigator.appName,_bn=(_II(_bn,"Microsoft")?_bn:"MSIE"),_bnN=(_bn=="Netscape"),_bnI=(_bn=="MSIE"),_hck="*; path=/; "+(_D("cpd")&&_D("cpd")!=""?(" domain=."+_D("cpd")+"; "):"")+_ex,_N6=(_bnN&&_bv>4),_I5=false,_ss="na",_sc="na",_sv=11,_cy="u",_hp="u",_tp=_D("ptc");if(_bn=="MSIE"){_nua=navigator.userAgent,_is=_II(_nua,_bn),_if=_II(_nua,".",_is);if(_if>_is){_I5=_nua.substring(_is+5,_if)>=5;}}if(_N6||_I5){eval("try{_tls=top.location.search}catch(_e){}");}_PV();_EV(window,"load",__X);_EV(window,"unload",_FU);eval("setTimeout(\"__X()\",3000)");}
var is_ns6=false;String.prototype.trim=function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');}
function getXMLHTTP(){var a=null;if(typeof XMLHttpRequest!="undefined"){a=new XMLHttpRequest();}
if(!a){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(oc){a=null}}}
return a;}
GET_DATA=new Array();function initialiseGetData(){var getDataString=new String(window.location);var questionMarkLocation=getDataString.search(/\?/);if(questionMarkLocation==-1){questionMarkLocation=getDataString.search(/\&/);}
if(questionMarkLocation!=-1){getDataString=getDataString.substr(questionMarkLocation+1);var getDataArray=getDataString.split(/&/g);for(var i=0;i<getDataArray.length;i++){var nameValuePair=getDataArray[i].split(/=/);GET_DATA[unescape(nameValuePair[0])]=unescape(nameValuePair[1]);}}}
function dologin(){var html="";var xmlHTTP=getXMLHTTP();initialiseGetData();if(xmlHTTP){var wpName=document.loginform.wpName.value;var wpPassword=document.loginform.wpPassword.value;var isBasic=(document.loginform.isBasic?document.loginform.isBasic.value:0);var isQRelated=((document.loginform.isQRelated&&document.loginform.isQRelated.value=="1")?1:0);var template=(document.loginform.template?document.loginform.template.value:'');var wgLocale=(document.loginform.wgLocale?document.loginform.wgLocale.value:'');var wgNIEnable=(document.loginform.wgNIEnable?document.loginform.wgNIEnable.value:0);var wgForums=(document.loginform.wgForums?document.loginform.wgForums.value:0);var numOfFlagedQs=(document.loginform.numOfFlagedQs?document.loginform.numOfFlagedQs.value:0);var wssStatus=(document.loginform.wssStatus?document.loginform.wssStatus.value:'');var lftPos=(document.loginform.lftPos?document.loginform.lftPos.value:'');var isTopicPageRelated=false;var wpTopic_id=0;var wpTopic_title="";if(document.loginform.isTopicPageRelated){isTopicPageRelated=document.loginform.isTopicPageRelated.value;if(document.loginform.topic_id)
wpTopic_id=document.loginform.topic_id.value;if(document.loginform.topic_title)
wpTopic_title=document.loginform.topic_title.value;}
var wpRemember;if(document.loginform.wpRemember.checked)
wpRemember=1;else
wpRemember=0;var returnto=document.loginform.returnto.value;var url=location.protocol+"//"+location.host+"/Q/Special:Userpod";var data="action=submit&"+"wpName="+wpName+"&"+"wpPassword="+wpPassword+"&"+"wpRemember="+wpRemember+"&"+"isBasic="+isBasic+"&"+"isQRelated="+isQRelated+"&"+"template="+template+"&"+"wgLocale="+wgLocale+"&"+"wgNIEnable="+wgNIEnable+"&"+"wgForums="+wgForums+"&"+"numOfFlagedQs="+numOfFlagedQs+"&"+"wssStatus="+wssStatus+"&"+"lftPos="+lftPos+"&"+"returnto="+returnto+"&"+"ac="+GET_DATA['action'];if(isTopicPageRelated)
data+="&isTopicPageRelated="+isTopicPageRelated+"&topic_id="+wpTopic_id+"&topic_title="+wpTopic_title;if(location.pathname.indexOf("Special:Changes&cv=question")!=-1){data+="&isQRelated=1";var qs=new Querystring(location.pathname);if(qs.contains("cv")){data+="&real_returnto="+qs.get("cv");}}
if(eval('(typeof(pttag) != "undefined");')){data+="&pttag="+pttag;}
if(location.pathname.indexOf("waAn=1")>0||location.pathname.indexOf("waAn=2")>0)
data+="&addToWatch=1";if(GET_DATA['wpNewq']=="1"){data+="&wpNewq=1";}
xmlHTTP.open("POST",url,false);xmlHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHTTP.send(data);var resp=xmlHTTP.responseText.trim();if(resp.indexOf('ERROR:')==0){var div=document.getElementById("login-error");div.style.color="#000000";div.style.background="#FFFF66";div.style.marginBottom="15px";div.innerHTML=resp.substr(6);div.style.display="block";AddTop(div,"#1B4698","#FFFF66");AddBottom(div,"#1B4698","#FFFF66");operaRefresh();error_mess=resp.substr(6);error_mess=error_mess.replace(/[^A-Za-z ]/i,"");cv=_hbEvent(cv);_hbSet("cv.c1","LogInNo|"+error_mess.replace(/[ ]/i,"+"));_hbLink("Errors");}else if(resp.indexOf('RELOAD:')==0){window.location.reload();}else if(resp.indexOf('GOTO:')==0){window.location.href=resp.substr(5)+"&returnto="+URLEncodeEmail(URLEncodeEmail(window.location.href));}else{var div=document.getElementById("user-pod");div.innerHTML=resp;var div2=$("on_login_rm");if(div2){div2.hide();}
if(window.location.pathname.indexOf("Special:Changes&cv=question")!=-1)
{if(typeof(search_page)!='undefined'&&search_page>0&&typeof(navGo)!='undefined')
if(typeof(getBatchRecat)!='undefined')
navGo(search_page,true,'getBatchRecat');else
navGo(search_page,true);}}}}
function dologout(callBack){var html="";var xmlHTTP=getXMLHTTP();if(!callBack)callBack="";initialiseGetData();if(xmlHTTP&&!is_ns6){var returnto=document.loginform.returnto.value;if(returnto=="")returnto="/";if(callBack.match(/new_login/))returnto="Special:Search";var url=location.protocol+"//"+location.host+"/Q/Special:Userpod";var data="returnto="+returnto+"&logout=1"+"&"+"ac="+GET_DATA['action'];if(eval('(typeof(ttag) != "undefined");')){data+="&ttag="+ttag;}
if(GET_DATA['wpNewq']=="1"){data+="&wpNewq=1";}
xmlHTTP.open("POST",url,false);xmlHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHTTP.send(data);var resp=xmlHTTP.responseText.trim();if(resp.indexOf('REDIRECT:')==0){var loc=resp.substr(9);window.location=loc;return;}else{var div=document.getElementById("user-pod");div.innerHTML=resp;var div2=$("on_login_rm");if(div2){div2.show();}
if(typeof(search_page)!='undefined'&&search_page>0&&typeof(navGo)!='undefined'){if(typeof(getBatchRecat)!='undefined'&&typeof(specialName)!='undefined'&&specialName=="Search"){if($('br_container')){$('br_container').parentNode.removeChild($('br_container'));}
if($('recategorize_desc')){$('recategorize_desc').parentNode.removeChild($('recategorize_desc'));}
if($('br_topictree')){$('br_topictree').parentNode.removeChild($('br_topictree'));}
br_returnOldNRQ();navGo(search_page,true,'getBatchRecat');}
else
navGo(search_page,true,callBack);}}
if(window.location.pathname.indexOf("Special:Changes&cv=question")==-1&&returnto!="Home_Page"&&returnto!="Special:UnifiedHP"&&(typeof(search_page)=='undefined'||!search_page))
{window.location.href="/";}}}
function updateHBXReg(){var returnto=document.loginform.returnto.value;cv=_hbEvent("cv");cv.c8="pod|"+returnto;_hbDownload("dynamic");}
function doregister(){var html="";var xmlHTTP=getXMLHTTP();initialiseGetData();if(xmlHTTP){var wpName=document.registerform.wpName.value;var wpPassword=document.registerform.wpPassword.value;var wpRetype=document.registerform.wpRetype.value;var wpEmail=document.registerform.wpEmail.value;var wpAcceptPolicy=document.registerform.wpAcceptPolicy;var wpGetNewsletter;emailErr=emailCheck(wpEmail);if(null==emailErr||""==emailErr){resetFormError();}
else{emailErr=emailErr.replace(/%ADDR%/,wpEmail.replace(/^\s+|\s+$/g,""));showFormError(emailErr);emailErr=null;return;}
if(!wpAcceptPolicy.checked){showFormError("Please check that you agree to the community guidelines, terms of use and privacy policy for this site and confirm that you are at least 13 years of age.");return;}
if(document.registerform.wpGetNewsletter.checked)
wpGetNewsletter=1;else
wpGetNewsletter=0;var returnto=document.registerform.returnto.value;var url=location.protocol+"//"+location.host+"/Q/Special:Userlogin";var data="action=submit&"+"wpName="+wpName+"&"+"wpPassword="+wpPassword+"&"+"wpRetype="+wpRetype+"&"+"wpEmail="+wpEmail+"&"+"wpRemember=0&"+"wpGetNewsletter="+wpGetNewsletter+"&"+"returnto="+URLEncodeEmail(window.location.href)+"&"+"wpCreateaccount=1&"+"error_type=pod&"+"ac="+GET_DATA['action'];if(location.pathname.indexOf("waAn=1")>0||location.pathname.indexOf("waAn=2")>0)
data+="&addToWatch=1";if(GET_DATA['wpNewq']=="1"){data+="&wpNewq=1";}
xmlHTTP.open("POST",url,false);xmlHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHTTP.send(data);var resp=xmlHTTP.responseText.trim();if(resp.indexOf('ERROR:')==0){var div=document.getElementById("login-error");div.style.color="#000000";div.style.background="#FFFF66";div.style.marginBottom="15px";div.innerHTML=resp.substr(6);div.style.display="block";AddTop(div,"#1B4698","#FFFF66");AddBottom(div,"#1B4698","#FFFF66");operaRefresh();error_mess=resp.substr(6);error_mess=error_mess.replace(/[^A-Za-z ]/i,"");cv=_hbEvent(cv);_hbSet("cv.c1","LogInNo|"+error_mess.replace(/[ ]/i,"+"));_hbLink("Errors");}else{updateHBXReg();if(resp.indexOf('OK:NOACT:')==0){if(typeof(showModalWait)=="function")
showModalWait();var redirectFunc=function(loc){window.location.href=loc;};redirectFunc.delay(0.1,resp.substr(9));}
else{window.location.href='/Q/Special:ActivateUser';}}}}
function emailCheck(emailStr){var emailPat=/^(.+)@(.+)$/;var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";var validChars="\[^\\s"+specialChars+"\]";var quotedUser="(\"[^\"]*\")";var invalidDomains="mailinator|mytrashmail|trashymail|mailexpire|spamex|a\.killmail|bugmenot";var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;var atom=validChars+'+';var word="("+atom+"|"+quotedUser+")";var userPat=new RegExp("^"+word+"(\\."+word+")*$");var domainPat=new RegExp("^"+atom+"(\\."+atom+")*$");var spamEmailPat=new RegExp(invalidDomains,i);var matchArray=emailStr.match(emailPat)
if(matchArray==null){return"Email address %ADDR% seems incorrect (check @ and .\'s).";}
var user=matchArray[1];var domain=matchArray[2];if(user.match(userPat)==null){return"The %ADDR%\'s username doesn\'t seem to be valid.";}
var spamEmail=emailStr.match(spamEmailPat);if(spamEmail!=null){return;}
var IPArray=domain.match(ipDomainPat);if(IPArray!=null){for(var i=1;i<=4;i++){if(IPArray[i]>255){return"The %ADDR%\'s destination IP address is invalid!";}}
return"";}
var domainArray=domain.match(domainPat);if(domainArray==null){return"The %ADDR%\'s domain name doesn\'t seem to be valid.";}
var atomPat=new RegExp(atom,"g");var domArr=domain.match(atomPat);var len=domArr.length;if(domArr[domArr.length-1].length<2||domArr[domArr.length-1].length>6){return"Your email must end in a valid domain.";}
if(len<2){return"The address %ADDR% is missing a hostname!";}
return"";}
function URLEncodeEmail(plaintext)
{var SAFECHARS="0123456789"+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"-_.!~*'()";var HEX="0123456789ABCDEF";var encoded="";for(var i=0;i<plaintext.length;i++){var ch=plaintext.charAt(i);if(ch==" "){encoded+="+";}else if(SAFECHARS.indexOf(ch)!=-1){encoded+=ch;}else{var charCode=ch.charCodeAt(0);if(charCode>255){encoded+="+";}else{encoded+="%";encoded+=HEX.charAt((charCode>>4)&0xF);encoded+=HEX.charAt(charCode&0xF);}}}
return encoded;}
function operaRefresh(){browserName=navigator.appName;if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=' ttip';}}
function closeINVF(){if($('invf_elem'))
$('invf_elem').remove();operaRefresh();}
function doinvf(){emails=document.invfform.emails.value;uname=document.invfform.uname.value;if(emails==""){closeINVF();return;}
emails=emails.replace(/;/g,",");emails_arr=emails.split(",");for(i=0;i<emails_arr.length;i++){email=emails_arr[i];err_text=emailCheck(email.replace(/^\s+|\s+$/g,""));if(err_text!=""){alert(err_text.replace(/%ADDR%/,email.replace(/^\s+|\s+$/g,"")));return;}}
var html="";var xmlHTTP=getXMLHTTP();initialiseGetData();if(xmlHTTP&&!is_ns6){var returnto=document.loginform.returnto.value;var url="/Q/Special:InviteFriend";var data="returnto="+returnto+"&"+"emails="+URLEncodeEmail(emails)+"&"+"uname="+URLEncodeEmail(uname)+"";xmlHTTP.open("POST",url,false);xmlHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHTTP.send(data);var resp=xmlHTTP.responseText.trim();if(resp.indexOf('OK')==0){document.getElementById('invf_int_text').innerHTML=resp.substr(3);operaRefresh();_hbLink('InviteFriendPopup','Lgd');}
else{closeINVF();}}}
function showFormError(err){var div=document.getElementById("login-error");div.style.color="#000000";div.style.background="#FFFF66";div.style.marginBottom="15px";div.innerHTML=err;div.style.display="block";AddTop(div,"#1B4698","#FFFF66");AddBottom(div,"#1B4698","#FFFF66");operaRefresh();}
function resetFormError(){var div=document.getElementById("login-error");div.style.display="none";}
function fixIE6oddWidth(id){var divobj=document.getElementById(id);if(divobj!=null){var widthtofdiv=divobj.clientWidth;if(!isEven(widthtofdiv))
widthtofdiv+=1;divobj.style.width=widthtofdiv+"px";divobj.style.padding="0px";}}
function fixHeight(id){var divobj=document.getElementById(id);var heightofdiv=divobj.offsetHeight;if(!isEven(heightofdiv))
heightofdiv+=1;divobj.style.height=heightofdiv+"px";}
function getObjXY(obj){var curleft=0;var curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}}
return[curleft,curtop];}
function getScroll(){var Tscroll=0;var Lscroll=0;if(document.compatMode&&document.compatMode!="BackCompat"){Tscroll=document.documentElement.scrollTop;Lscroll=document.documentElement.scrollLeft;}
else if(document.body){Tscroll=document.body.scrollTop;Lscroll=document.body.scrollLeft;}
return[Lscroll,Tscroll];}
function getCenteredDivTL(width,height){var left=0;var top=0;var arr_scrl=getScroll();if(self.innerWidth)
{frameWidth=self.innerWidth;frameHeight=self.innerHeight;}
else if(document.documentElement&&document.documentElement.clientWidth)
{frameWidth=document.documentElement.clientWidth;frameHeight=document.documentElement.clientHeight;}
else if(document.body)
{frameWidth=document.body.clientWidth;frameHeight=document.body.clientHeight;}
if(frameHeight/2>height/2)
top=frameHeight/2-height/2;else
top=frameHeight/2;if(frameWidth/2>width/2)
left=frameWidth/2-width/2;else
left=frameWidth/2;return[left+arr_scrl[0],top+arr_scrl[1]];}
function AjaxToFunc(url,func,method,params)
{AjaxMJ(url,func,true,method,params);}
function AjaxToDiv(url,func,method,params)
{AjaxMJ(url,func,false,method,params);}
function AjaxMJ(url,func_div,isByFunc,method,params)
{var xmlHttp=GetAjaxRequest();if(xmlHttp==null)
{return;}
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4)
{try
{if(xmlHttp.status==200)
{var str=xmlHttp.responseText.trim();if(isByFunc){eval(func_div+'(str)');}
else{var divObj=document.getElementById(func_div);if(divObj!=null)
divObj.innerHTML=str;}}}
catch(e){}}}
xmlHttp.open(method,url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(params);}
function GetAjaxRequest()
{var AjaxRequest=null;if(typeof XMLHttpRequest!="undefined"){AjaxRequest=new XMLHttpRequest();}
if(!AjaxRequest){try{AjaxRequest=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{AjaxRequest=new ActiveXObject("Microsoft.XMLHTTP")}catch(oc){AjaxRequest=null}}}
return AjaxRequest;}
function getParams(formid){var params="";var obj=document.getElementById(formid);if(obj!=null){for(i=0;i<obj.elements.length;i++)
{if(obj.elements[i].type=="checkbox"){if(obj.elements[i].checked==true)
params+=obj.elements[i].id+"="+encodeURI(obj.elements[i].value)+"&";}
else{value="";if(obj.elements[i].value)
value=encodeURI(obj.elements[i].value)
params+=obj.elements[i].name+"="+value+"&";}}}
return params;}
var Current={Browser:{IE6:!!(window.attachEvent&&!window.opera)&&parseFloat(navigator.appVersion.split("MSIE")[1])<7,IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,FireFox:navigator.userAgent.indexOf("Firefox")>-1,WebKit:navigator.userAgent.indexOf('AppleWebKit/')>-1,Gecko:navigator.userAgent.indexOf('Gecko')>-1&&navigator.userAgent.indexOf('KHTML')==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)}};if(typeof Array.prototype.concat==='undefined'){Array.prototype.concat=function(a){for(var i=0,b=this.copy();i<a.length;i++){b[b.length]=a[i];}
return b;};}
if(typeof Array.prototype.copy==='undefined'){Array.prototype.copy=function(){var a=[],i=this.length;while(i--){a[i]=typeof this[i].copy!=='undefined'?this[i].copy():this[i];}
return a;};}
Array.prototype.remove=function(element)
{for(var i=0;i<this.length;i++)
{if(this[i]==element)
{var temp=this[this.length-1];this[this.length-1]=this[i];this[i]=temp;this.pop();return true;}}
return false;};if(typeof Array.prototype.pop==='undefined'){Array.prototype.pop=function(){var b=this[this.length-1];this.length--;return b;};}
if(typeof Array.prototype.push==='undefined'){Array.prototype.push=function(){for(var i=0,b=this.length,a=arguments,l=a.length;i<l;i++){this[b+i]=a[i];}
return this.length;};}
if(typeof Array.prototype.shift==='undefined'){Array.prototype.shift=function(){for(var i=0,b=this[0],l=this.length-1;i<l;i++){this[i]=this[i+1];}
this.length--;return b;};}
if(typeof Array.prototype.slice==='undefined'){Array.prototype.slice=function(a,c){var i,l=this.length,r=[];if(!c){c=l;}
if(c<0){c=l+c;}
if(a<0){a=l-a;}
if(c<a){i=a;a=c;c=i;}
for(i=0;i<c-a;i++){r[i]=this[a+i];}
return r;};}
if(typeof Array.prototype.splice==='undefined'){Array.prototype.splice=function(a,c){var i=0,e=arguments,d=this.copy(),f=a,l=this.length;if(!c){c=l-a;}
for(i;i<e.length-2;i++){this[a+i]=e[i+2];}
for(a;a<l-c;a++){this[a+e.length-2]=d[a-c];}
this.length-=c-e.length+2;return d.slice(f,f+c);};}
if(typeof Array.prototype.unshift==='undefined'){Array.prototype.unshift=function(){this.reverse();var a=arguments,i=a.length;while(i--){this.push(a[i]);}
this.reverse();return this.length;};}
Array.prototype.forEach=function(f){var i=this.length,j,l=this.length;for(i=0;i<l;i++){if((j=this[i])){f(j);}}};Array.prototype.indexOf=function(v,b,s){for(var i=+b||0,l=this.length;i<l;i++){if(this[i]===v||s&&this[i]==v){return i;}}
return-1;};Array.prototype.insert=function(i,v){if(i>=0){var a=this.slice(),b=a.splice(i);a[i]=v;return a.concat(b);}};Array.prototype.lastIndexOf=function(v,b,s){b=+b||0;var i=this.length;while(i-->b){if(this[i]===v||s&&this[i]==v){return i;}}
return-1;};Array.prototype.random=function(r){var i=0,l=this.length;if(!r){r=this.length;}
else if(r>0){r=r%l;}
else{i=r;r=l+r%l;}
return this[Math.floor(r*Math.random()-i)];};Array.prototype.shuffle=function(b){var i=this.length,j,t;while(i){j=Math.floor((i--)*Math.random());t=b&&typeof this[i].shuffle!=='undefined'?this[i].shuffle():this[i];this[i]=this[j];this[j]=t;}
return this;};Array.prototype.unique=function(b){var a=[],i,l=this.length;for(i=0;i<l;i++){if(a.indexOf(this[i],0,b)<0){a.push(this[i]);}}
return a;};Array.prototype.walk=function(f){var a=[],i=this.length;while(i--){a.push(f(this[i]));}
return a.reverse();};Array.prototype.toString=function(){var str="";for(var i=0;i<this.length;i++){str+=this[i]+" ";}
return str;};Array.prototype.toTable=function(){var str="<table border=\"1\">";for(var i=0;i<this.length;i++){str+="<tr><td>"+this[i]+"</td></tr>";}
str+="</table>";return str;};function id(element){var el=document.getElementById(element);if(el!=null)
return el;var els=getThisElements(element);if(els[0]!=null)
return els[0];else
null;}
function setCss(styles){var pairs=new Array();pairs=getPairMatches(/(.*?)\{(.*?)\}/gi,styles,1,2);for(var i1=0;i1<pairs.length;i1++){var sameStyle=pairs[i1].getFirst().split(",");for(var i2=0;i2<sameStyle.length;i2++){attachStyles(getTags(sameStyle[i2]),getStyles(pairs[i1].getSecond()));}}}
function getThisElements(styles){var parts=styles.toLowerCase().split(",");var elemnts=new Array();for(var i=0;i<parts.length;i++){elemnts=elemnts.concat(putInArray(getTags(parts[i])));}
return elemnts;}
function pair(lastName,firstName){this.first=lastName;this.second=firstName;this.getFirst=function(){return this.first;}
this.getSecond=function(){return this.second;}}
function ToJsCss(style){var parts=style.split('-'),len=parts.length;if(len==1)return parts[0];var JsCss=style.charAt(0)=='-'?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i<len;i++)
JsCss+=parts[i].charAt(0).toUpperCase()+parts[i].substring(1);return JsCss;}
function getTags(str,styles){var pairs=new Array();pairs=getCssMatch(/(\s+|#|\.|\b)([a-zA-Z0-9_\-]+)/gi,str);var PageElements=new Array();for(var i=0;i<pairs.length;i++){if(i==0)
PageElements=putInArray(getEls(document.getElementsByTagName('*'),pairs[i].getFirst(),pairs[i].getSecond()));else
PageElements=getEls2(PageElements,pairs[i].getFirst(),pairs[i].getSecond(),pairs[i-1].getFirst());}
return PageElements;}
function attachStyles(PageElements,styles){for(var i=0;i<PageElements.length;i++){setVals(PageElements[i],styles);}}
function getStyles(str){var pairs=new Array();pairs=getPairMatches(/(.*?):(.*?)(;|$)/gi,str,1,2);return pairs;}
function setVals(elemnt,styles){for(var i=0;i<styles.length;i++){setVal(elemnt,ToJsCss(styles[i].getFirst()),styles[i].getSecond());}}
function setVal(elemnt,property,value){var expr="elemnt.style."+property+"=\""+value+"\"";eval(expr);}
function putInArray(elements){var temparr=new Array();for(var i=0;i<elements.length;i++)
{temparr.push(elements[i]);}
return temparr;}
function getEls2(elements,type,value,current){value=value.toLowerCase();var allClassElements=new Array();for(var i=0;i<elements.length;i++)
{if(isParent(elements[i],type,value,current))
allClassElements.push(elements[i]);}
return allClassElements;}
function getEls(FromElements,type,value){value=value.toLowerCase();var allClassElements=new Array();for(var i=0;i<FromElements.length;i++)
{var expr="isMatching(FromElements["+i+"]."+type+".toLowerCase(),\""+value+"\")";if(eval(expr))
allClassElements.push(FromElements[i]);}
return allClassElements;}
function isParent(element,type,value,current){if(current=="tagName")
element=element.parentNode;while(element!=null&&typeof element.tagName!="undefined"){var expr="isMatching(element."+type+".toLowerCase(),\""+value+"\")";if(eval(expr))
return true;element=element.parentNode;}
return false;}
function getCssMatch(regex,text){var re=regex;var arrMatch=null;var pairs=new Array();var eltype=null;while(arrMatch=re.exec(text)){switch(arrMatch[1].trim())
{case'':eltype="tagName";break;case'.':eltype="className";break;case'#':eltype="id";break;}
var p=new pair(eltype,arrMatch[2].trim());pairs.unshift(p);}
return pairs;}
function getPairMatches(regex,text,p1,p2){var re=regex;var arrMatch=null;var pairs=new Array();while((arrMatch=re.exec(text))!=null){var p=new pair(arrMatch[p1].trim(),arrMatch[p2].trim());pairs.push(p);}
return pairs;}
Object.addFuncs=function(destination,source){for(var property in source)
destination[property]=source[property];return destination;};Object.addFuncs(String.prototype,{trim:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},like:function(str){var arr=str.split(" ");for(var i=0;i<arr.length;i++){if(this.indexOf(arr[i])==-1)
return false;}
return true;},times:function(count){return count<1?'':new Array(count+1).join(this);},include:function(pattern){return this.indexOf(pattern)>-1;},unique:function(){var str="";for(var i=0;i<this.length;i++){str+=(str.indexOf(this[i])==-1)?this[i]:"";}
return str;},replaceAll:function(s,t){text=this;if(text!==null){while(text.indexOf(s)!==-1){text=text.replace(s,t);}}
return text;},startsWith:function(pattern){return this.indexOf(pattern)===0;},endsWith:function(pattern){var d=this.length-pattern.length;return d>=0&&this.lastIndexOf(pattern)===d;},empty:function(){return this=='';},blank:function(){return/^\s*$/.test(this);},interpolate:function(object,pattern){return new Template(this,pattern).evaluate(object);}});if(Current.Browser.WebKit||Current.Browser.IE)
Object.addFuncs(String.prototype,{escapeHTML:function(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');},unescapeHTML:function(){return this.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');}});function isIE6(){arVersion=navigator.appVersion.split("MSIE");version=parseFloat(arVersion[1]);browserName=navigator.appName;if((browserName=="Microsoft Internet Explorer")&&(version>=5.5)&&(version<7.0))
return true;return false;}
function fixIE6PNG(img){img=$(img);img_src=img.src;img_h=img.getHeight();img_w=img.getWidth();img.onload=function(){void(0);};img.src=wgStaticFilesServer+'/templates/images/blank.gif';img.setStyle({height:img_h,width:img_w,filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img_src+"')"});}
function URLEncode(url_to_encode)
{var NONSAFECHARS="'\"&,!#$%^*:|\\/><~;";var plaintext=url_to_encode;var encoded="";for(var i=0;i<plaintext.length;i++){var ch=plaintext.charAt(i);if(ch==" "){encoded+="+";}else if(NONSAFECHARS.indexOf(ch)==-1){encoded+=ch;}}
return encoded;};function sendAjax(url,data,el){var html="";var xmlHTTP=getXMLHTTP();initialiseGetData();if(xmlHTTP&&!is_ns6){xmlHTTP.open("POST",url,false);xmlHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHTTP.send(data);return xmlHTTP.responseText;}
else{return el;}}
function closePopup(pid){if(document.getElementById(pid)){el_parent=document.getElementById(pid).parentNode;el_parent.removeChild(document.getElementById(pid));}
operaRefresh();}
function textCounter(field,countfield,maxlimit,trim){var trim=(trim==null)?1:trim;if((field.value.length>maxlimit)&&trim){field.value=field.value.substring(0,maxlimit);}
if(countfield)
countfield.innerHTML=maxlimit-field.value.length;}
function minTextMessage(field,msgField,mesg,minLimit){if(field.value.length<=minLimit)
msgField.innerHTML=mesg;else
msgField.innerHTML="";}
function doRSS(tid){var url="/Q/Special:RSS";var data="jsonly=1&tid="+tid;eval(sendAjax(url,data,"window.location.href = \"/Q/Special:RSS&tid="+tid+"\";"));if(document.rssform!=null)_hbLink('TopicRSS'+document.rssform.tname.value);}
function doUserRSS(uname){var url="/Q/Special:RSS";var data="jsonly=3&uname="+uname;eval(sendAjax(url,data,"window.location.href = \"/Q/Special:RSS&user="+uname+"\";"));if(document.rssform!=null)_hbLink('UserRSS'+document.rssform.uname.value,($('on_login_rm').style.display=='none')?'NotLgd_':'Lgd_'+'HmPg');}
var popupRSSCursorCheck=null;var hideRSS=null;var getCursorPosition=function(e){e=e||window.event;var cursor={x:0,y:0};if(e.pageX||e.pageY){cursor.x=e.pageX;cursor.y=e.pageY;}
else{var de=document.documentElement;var b=document.body;cursor.x=e.clientX+
(de.scrollLeft||b.scrollLeft)-(de.clientLeft||0);cursor.y=e.clientY+
(de.scrollTop||b.scrollTop)-(de.clientTop||0);}
return cursor;};function getRSS(uname){var type;if(document.rssform.rsstype[0].checked==true){type='asked';}
else if(document.rssform.rsstype[1].checked==true){type='ans';}
else{type='all';}
var url="/Q/Special:RSS";var data;if((""+uname).search(/^[0-9]+$/)==0)
data="jsonly=2&type="+type+"&tid="+uname;else
data="jsonly=4&type="+type+"&uname="+uname;var resp=sendAjax(url,data,"");if(resp.indexOf('OK')==0){eval(resp.substr(3));}
else if(resp.indexOf('OK')==1){eval(resp.substr(4));}
else{if(xModalDialog&&xModalDialog.grey&&$('rss_elem'))
globalHideModal();else
closePopup('rss_elem');}}
function isEven(value){if(value%2==0)
return true;else
return false;}
var clicked=0
function checkClick(){if(clicked==0){clicked=1;return true;}else{alert("Please only click the submit button once.");return false;}}
function setWss(pn,mlc,mycv8,mycv9,mycv7,mycv5,istest){var pn=URLEncode(pn);if(location.hostname.indexOf(".answers.com")==-1)
acct="DM5607254MCC";else
acct="DM570305I4NC";_answ_hbxInit(acct,pn,mlc,mycv8,mycv9,mycv7,mycv5);hbx.lt="manual";if(istest=="true")
document.write("<br><font class='highlight'><b>The parameters for WSS are: pn='"+pn+"' and mlc='"+mlc+"'</b></font><br>");}
function checkAll(field)
{for(i=0;i<field.length;i++)
field[i].checked=true;}
function uncheckAll(field)
{for(i=0;i<field.length;i++)
field[i].checked=false;}
function checkAllUpdates(){if(document.preferences.wpOpAllupdates.checked==false){document.preferences.wpOpAllupdates.checked=false;document.preferences.wpOpemailwatchlist.checked=false;document.preferences.wpOpboardNotifications.checked=false;document.preferences.wpGetNewsletter.checked=false;}else{document.preferences.wpOpAllupdates.checked=true;document.preferences.wpOpemailwatchlist.checked=true;document.preferences.wpOpboardNotifications.checked=true;document.preferences.wpGetNewsletter.checked=true;}
return;}
function freeAllUpdates(){if(document.preferences.wpOpemailwatchlist.checked==true&&document.preferences.wpOpboardNotifications.checked==true&&document.preferences.wpGetNewsletter.checked==true){document.preferences.wpOpAllupdates.checked=true;}
else{document.preferences.wpOpAllupdates.checked=false;}}
function isMatching(el,val){return(el.match(eval("/\\b"+val+"\\b/gi"))!=null)}
function attachEventToFunction(object,event,func){if(window.addEventListener){object.addEventListener(event,func,false);}else{object.attachEvent('on'+event,func);}}
function detachEventToFunction(object,event,func){if(window.removeEventListener){object.removeEventListener(event,func,false);}else{object.detachEvent('on'+event,func);}}
function getBrowserName(){var lBrowserName="unknown";var lUserAgent=navigator.userAgent;if(lUserAgent.match(/Firefox/i)){lBrowserName="Firefox";}
if(lUserAgent.match(/Firefox\/2/i)){lBrowserName="Firefox Firefox2";}
if(lUserAgent.match(/Firefox\/3/i)){lBrowserName="Firefox Firefox3";}
if(lUserAgent.match(/Safari/i)){lBrowserName="Safari";if(lUserAgent.match(/AppleWebKit/i))
lBrowserName="SafariOrWebKit";}
else if(lUserAgent.match(/opera/i)){lBrowserName="Opera";}
else if(lUserAgent.match(/MSIE/i)){lBrowserName="IE";if(lUserAgent.match(/MSIE [4-6]/i))
lBrowserName+=" IEold IEPre8";else if(lUserAgent.match(/MSIE [7-9]/i))
lBrowserName+=" IEnew";if(lUserAgent.match(/MSIE 7/i))
lBrowserName+=" IE7 IEPre8";else if(lUserAgent.match(/MSIE 8/i))
lBrowserName+=" IE8";}
else if(lBrowserName=="unknown"&&lUserAgent.match(/mozilla/i)&&!lUserAgent.match(/rv:[0-9]\.[0-9]\.[0-9]/i)){lBrowserName="Netscape";}
return lBrowserName;}
function setHtmlClassByBrowserType(){var htmlElements=document.getElementsByTagName('html');if(htmlElements.length>0)
htmlElements[0].className=getBrowserName();}
setHtmlClassByBrowserType();function setGADebug(con,ga_clientID,ga_channelID,ga_hint,ga_safe){var container=$(con);var s="";if(container){s="<strong>Client</strong>: "+ga_clientID+"<br /><strong>Channel</strong>: "+ga_channelID+"<br /><strong>Hint</strong>: "+ga_hint+"<br /><strong>Safe</strong>: "+ga_safe;container.innerHTML=s;container.style.display="block";container.style.clear="both";}}
function Querystring(qs){this.params={};if(qs==null)qs=location.search.substring(1,location.search.length);if(qs.length==0)return;qs=qs.gsub("%"+"26","&");qs=qs.replace(/\+/g,' ');var args=qs.split('&');for(var i=0;i<args.length;i++){var pair=args[i].split('=');var name=decodeURIComponent(pair[0]);var value=(pair.length==2)?decodeURIComponent(pair[1]):name;this.params[name]=value;}}
Querystring.prototype.get=function(key,default_){var value=this.params[key];return(value!=null)?value:default_;}
Querystring.prototype.contains=function(key){var value=this.params[key];return(value!=null&&value!="UNDEFINED");}
function getReferrerName(referrer){var referrer=referrer?referrer:document.referrer;var matches=referrer.match(/^(http:\/\/)?([^\/]+)/i);if(matches&&matches.length>1){var hostName=matches[2].toLowerCase();if(hostName.include("google"))
return"Google";else if(hostName.include("yahoo"))
return"Yahoo";else if(hostName.include("aol"))
return"Aol";else if(hostName.include("msn"))
return"Msn";else if(hostName.include("ask"))
return"Ask";else if(hostName.include("www.answers.com"))
return"Answers";else if(hostName.include("reference.com"))
return"Dictionary";else if(hostName.include("wiki.answers.com"))
return"WikiAnswers";else if(hostName.include("bing"))
return"Bing";else if(hostName.include("stumbleupon"))
return"StumbleUpon";else if(hostName.include("dogpile"))
return"Dogpile";else if(hostName.include("myspace"))
return"MySpace";else if(hostName.include("facebook"))
return"Facebook";else if(hostName.include("twitter"))
return"Twitter";else
return"other";}
else{return"none";}}
function setActiveRadio(){var radio=readCookie('activeRadio');if(!radio&&typeof allDefault!="undefined"&&allDefault){radio="all";}
if(radio){var el=document.getElementById("radio_"+radio);if(el){el.checked=true;updateTitle(radio);}}}
function updateTitle(val){var t=document.getElementById("headerTitleId");if(location.hostname.match("answers.com")){var domain='answers.com';}
createCookie('activeRadio',val,0,domain);if(t!=null){var text="";resultCache=new Object();switch(val){case'wa':text="Enter a question here...";break;case'ra':text="Enter word or phrase...";break;case'all':text="Enter question or phrase...";break;}
t.innerHTML=text;}}
var checkSubmit=function(obj){var head_ask=$('head_ask');if(head_ask!=null&&head_ask.value.trim()=="")
return false;var val=getSelectedRadio('lookup1','searchType');var wssStatus=(document.lookup1.wssStatus?document.lookup1.wssStatus.value:'');var submit;switch(val){case'wa':document.lookup1.gov.value="0";_hbLink('Search_QA',wssStatus);submit=true;break;case'ra':document.lookup1.gov.value="0";_hbLink('Search_Ref',wssStatus);obj.s.value=obj.title.value;obj.method="GET";submit=submitHandler(obj,null,"www.answers.com");break;case'all':document.lookup1.gov.value="1";_hbLink('Search_All',wssStatus);submit=true;break;}
return submit;};function getSelectedRadio(formName,radioName){var radioGroup=eval("document."+formName+"."+radioName);if(typeof radioGroup!="undefined"){var len=radioGroup.length;for(var i=0;i<len;i++){if(radioGroup[i].checked){return radioGroup[i].value;}}}
return"";}
function submitHandler(f_el,target,ts,p){var val=f_el.s?f_el.s.value:f_el.value;var form=f_el.form?f_el.form:f_el;if(val&&val.search(/\S/)!=-1){if(location.pathname.indexOf("/answers/")==0||val.search(/\+/)>=0){if(typeof returnFalse!="undefined"&&form.onsubmit&&form.onsubmit==returnFalse){form.onsubmit=returnTrue;}return true};if(val=="robots.txt"||val=="favicon.ico")val='"'+val+'"';var func=typeof(encodeURIComponent)!="undefined"?encodeURIComponent:escape;if(location.search.indexOf("gwp=13")>-1||location.search.indexOf("ff=1")>-1){if(p)p+="&ff=1";else p="ff=1";}
var host=location.host;if(host.indexOf("ir.answers")>=0)
host="www.answers.com";var url=location.protocol+"//"+(ts?ts:host)+"/"+func(val)+(p?"?"+p:"");if(target){window.open(url,target);}
else
location.href=url;}
return false;}
function descriptionSuggest(){var catsWindow=document.createElement('div');catsWindow.id="catsWindow2";var bodyNode=document.body;var tarnsBg=document.createElement('div');catsWindow.innerHTML="<div id='ajaxLoaderImg'></div>";tarnsBg.id="tarnsBg";var baseHeight=0;if(bodyNode!=null&&catsWindow!=null)
{if(tarnsBg!=null)bodyNode.appendChild(tarnsBg);bodyNode.appendChild(catsWindow);if(typeof(window.innerHeight)=='number'){var visibleAreaHeight=window.innerHeight;var visibleAreaWidth=window.innerWidth;}else{var visibleAreaHeight=document.documentElement.clientHeight;var visibleAreaWidth=document.documentElement.clientWidth;}
if(isIE6()){var hiddenIframe=document.createElement('iframe');hiddenIframe.id="hiddenIframe";bodyNode.appendChild(hiddenIframe);tarnsBg.style.position='absolute';tarnsBg.style.display='block';tarnsBg.style.height=document.body.clientHeight+20+"px";tarnsBg.style.width=document.body.clientWidth+"px";window.onresize=function(){if($('tarnsBg')!=null)
$('tarnsBg').style.width=document.body.clientWidth+"px";};}
if(getBrowserName()=="Firefox Firefox2"){tarnsBg.style.position='fixed';catsWindow.style.position="fixed";tarnsBg.style.display='block';}
var leftalign=(visibleAreaWidth-505)/2;var topalign=(visibleAreaHeight-210)/2;catsWindow.style.height=210+"px";catsWindow.style.top=topalign+"px";catsWindow.style.left=leftalign+"px";catsWindow.style.width=505+"px";if($('hiddenIframe')!=null){$('hiddenIframe').style.height=210+"px";$('hiddenIframe').style.top=topalign+"px";$('hiddenIframe').style.left=leftalign+"px";$('hiddenIframe').style.width=505+"px";}
scroll(0,0);catsWindow.innerHTML='<img id="closeimg"'+'src="'+wgStaticFilesServer+'/templates/icons/x.gif"'+'onclick="closeSuggest();" style="display:block;position:absolute;top:3px;right:3px;" name="&amp;lid=FAYT_Cancel_or_X"><br>'+'<table><tr><td valign="top" style="padding:5px 10px 5px 5px;">'+'<img style="display: block; padding-right: 5px; top: -7px;" src="http://site1.wikianswers.com/templates/icons/pencil.gif?v=35693"/>'+'</td>'+'<td valign="top">'+'Please write 2-3 sentences describing this topic and the types of questions it should include.'+'</td>'+'</tr>'+'</table><br>'+'<textarea onkeyup="checkIfEmpty(this)" id="catDescription" rows="5" cols="60" scrolling="0" style="width:482px;overflow: hidden;margin-left:10px">'+'</textarea>'+'<br><br><center><div id="savebtn" style="clear:both;"><a class=\'btn std grey\' href=\'javascript:void(0);\' onmousedown="ButtonMouseDown(this);" onmouseup="ButtonMouseUp(this);" onmouseout="ButtonMouseUp(this); " onclick="_hbLink(\'FAYT_Save\', \'\'); if(!$(this).isDisabledBtn()) { emailDescription();return false; } else { xPreventDefault(); return false; }" alt="Save" title="Save"><span><span><font style="white-space: nowrap;"><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"><font>&nbsp;Save&nbsp;</font><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"></font></span></span></a>&nbsp;&nbsp;<a class=\'btn std\' href=\'javascript:void(0);\' onmousedown="ButtonMouseDown(this);" onmouseup="ButtonMouseUp(this);" onmouseout="ButtonMouseUp(this); " onclick="_hbLink(\'FAYT_Cancel_or_X\', \'\'); if(!$(this).isDisabledBtn()) { closeSuggest();return false; } else { xPreventDefault(); return false; }" alt="Cancel" title="Cancel"><span><span><font style="white-space: nowrap;"><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"><font>&nbsp;Cancel&nbsp;</font><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"></font></span></span></a></div></center>';}
var catDescription=$('catDescription');if(catDescription!=null)
catDescription.focus();}
function closeSuggest()
{var catsWindow=$('catsWindow2');var tarnsBg=$('tarnsBg');var hiddenIframe=$('hiddenIframe');var bodyNode=document.body;if(bodyNode!=null)
{if(catsWindow!=null)bodyNode.removeChild(catsWindow);if(hiddenIframe!=null)bodyNode.removeChild(hiddenIframe);if(tarnsBg!=null)bodyNode.removeChild(tarnsBg);bodyNode.style.overflow="";}
if(typeof ANSW!="undefined")
ANSW.AnswerTipEnabled=true;}
function emailDescription()
{var savebtn=$('savebtn').select("a.btn")[0];if(savebtn==null||(savebtn!=null&&savebtn.isDisabledBtn()))
return false;var catDescription=$('catDescription');if(catDescription!=null&&catDescription.value.trim()!=""){var category_name=$('category_name').innerHTML;var category_path=$('category_path').innerHTML;var user_name=getUserName();AjaxToFunc("/Q/Special:Servlet&op=sde","checkResponse","POST","description="+catDescription.value+"&user_name="+user_name+"&category_name="+category_name+"&category_path="+escape(category_path));}
closeSuggest();}
function checkResponse(str){var suggestMessage=$('radLinks');if(suggestMessage!=null){suggestMessage.innerHTML="<center><div id='suggestMessage' style='background-color:#FFFF66;display: block;padding:5px 0px;margin-bottom:5px;line-height:12px;width:100%;'>"+"Thanks! Your suggestion has been submitted for review."+"</div></center>";suggestMessage.style.display='block';}}
function getUserName(){var user_name=$('user_name');if(user_name!=null){return user_name.innerHTML;}
return"Not logged in";}
function checkIfEmpty(obj){var savebtn=$('savebtn').select("a.btn")[0];if(savebtn!=null){if(obj.value.trim()==""){savebtn.disableBtn();}else{savebtn.enableBtn();}}}
var openedDropDown=null;function dropDown(id){if(openedDropDown!=id&&openedDropDown!=null){document.getElementById(openedDropDown).style.display='none';openedDropDown=null;}
if(openedDropDown==null&&id!=null){document.getElementById(id).style.display='block';openedDropDown=id;if(document.addEventListener){document.body.addEventListener("click",closeDropDown,false);}
else if(document.attachEvent){document.body.attachEvent("onclick",closeDropDown);}}
else if(openedDropDown!=null){document.getElementById(id).style.display='none';openedDropDown=null;}}
function disableLink(linkElement){if(linkElement.getAttribute('isAlreadyClicked')!=null&&linkElement.getAttribute('isAlreadyClicked')!='undefined'&&linkElement.getAttribute('isAlreadyClicked')!='0'){return false;}else{linkElement.setAttribute('isAlreadyClicked','1');linkElement.style.cursor='default';return true;}}
function disableButtons(formobj){var buttons=formobj.getElementsByTagName('*');var max=buttons.length;for(var i=0;i<max;i++){if(buttons[i].tagName=='button'||buttons[i].type=='submit'||buttons[i].type=='image'){if(typeof buttons[i].src!='undefined')
buttons[i].src=buttons[i].src.replace(/enable/gi,'dissable');buttons[i].disabled=true;buttons[i].style.cursor='default';}}
if(formobj.getAttribute('isAlreadyClicked')!=null&&formobj.getAttribute('isAlreadyClicked')!='undefined'&&formobj.getAttribute('isAlreadyClicked')!='1'){return false;}else{formobj.setAttribute('isAlreadyClicked','1');return true;}}
closeDropDown=function(e){var targ;if(!e)var e=window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType&&targ.nodeType==3)
targ=targ.parentNode;if(targ.id=='RAli'||targ.id=='WAli'||targ.id=='LLli'||targ.className=='curLang')
return;if(openedDropDown!=null)
dropDown(openedDropDown);};sfHover=function(){var nav=document.getElementById("nav");if(nav){var sfEls=nav.getElementsByTagName("LI");for(var i=0;i<sfEls.length;i++){sfEls[i].onmouseover=function(){this.className+=" sfhover";}
sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"");}}}}
if(window.attachEvent)window.attachEvent("onload",sfHover);sfHover2=function(){if(document.getElementById("unified-footer")){var sfEls=document.getElementById("unified-footer").getElementsByTagName("DIV");for(var i=0;i<sfEls.length;i++){sfEls[i].onmouseover=function(){this.className+=" sfhover";}
sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"");}}}}
if(window.attachEvent)window.attachEvent("onload",sfHover2);function statusMessageShow(message){if(document.getElementById("status")){div=document.getElementById("status");}
else{div=document.createElement("div");div.id="status";div.className="STATUS SMALLSTATUS";}
if(document.getElementById("std_status")){document.getElementById("std_status").style.display="none";}
statusMessageHide();div.innerHTML=message;document.getElementById("contents").insertAdjacentElement("afterBegin",div);goD('status');operaRefresh();}
function statusMessageHide(){if(document.getElementById("abovearticlestatus")){document.getElementById("abovearticlestatus").style.display="none";}}
function getUpdates(remove){var un;if(remove)
un="un";else
un='';if(jwgData.articleData.isQRelated==1){var url="/Q/"+encodeURIComponent(jwgData.articleData.real_returnto)+"&action="+un+"watch&ajaxonly=1";}
if(jwgData.articleData.isTopicPageRelated==1){var url="/Q/FAQ/"+jwgData.articleData.topic_id+"&action="+un+"watch&ajaxonly=1";}
new Ajax.Request(url,{encoding:"utf-8",parameters:"",onSuccess:function(transport){var res=transport.responseText;if(res.include('OK')){if(!remove){getUpdatesAdd();}
else{getUpdatesRemove();}}
else{statusMessageShow("Oops... we were unable to process your request. Try again.");}},onException:function(requester,except){statusMessageShow("Your browser is not supported.\n\nPlease upgrade in order to use this function.");}});}
function getUpdatesAdd(){var EDITLINK="[<a href='/Q/Special:preferences'>";var EDITUPDATE="</a> | <a href='/Q/Special:watchlist&magic=yes'>";wssStatus=(document.loginform.wssStatus?document.loginform.wssStatus.value:'');var cancelUpdatesText="cancel updates";var CancelUpdatesText="Cancel updates";if(typeof PageDef!="undefined"){var pageDiv=$('getUpdates');if((PageDef=='noAns'||PageDef=='newQ')&&pageDiv){var temp='<div id="cancelUpdates" style="margin-left:15px;" '+'onclick="_hbLink(\'WatchQ'+needans_num+'\', \''+wssStatus+'_UnAnsQPg_WTC\');getUpdates(1);return false;" title="Click here to cancel updates for this question." >'+'<img src="'+wgStaticFilesServer+'/templates/icons/cancelupdates-btn2.gif" />'+'<span style="text-decoration: underline; margin-top: -21px; display: block; position: relative; top: 16px; width: 77px;">'+cancelUpdatesText+'</span></div>';pageDiv.replace(temp);}
else if(PageDef=='Ans'&&pageDiv){if(pageDiv.match('a')){var temp='<a id="cancelUpdates" onclick="getUpdates(1);return false;" rel="nofollow"'+'name="&amp;lid=WatchQ&amp;lpos='+wssStatus+'_AnsQPg_Btn"'+'href="'+jwgData.articleData.real_returnto+'&amp;action=unwatch&amp;returnto='+
jwgData.articleData.real_returnto+'&amp;isQRelated=1">'+'<img alt="Click here to cancel updates for this question." title="Click here to cancel updates for this question."'+'src="'+wgStaticFilesServer+'/templates/icons/blue-cancelupdates-quest.gif" /></a>'
pageDiv.replace(temp);}else{var linkFront='<a href="javascript:void(0);" onclick="getUpdates(1);" name="&lid=WatchQ&lpos='+wssStatus+'_AnsQPg_Btn" title="Click here to cancel updates for this question." >';var temp='<span id="cancelUpdates" >'+
linkFront+'<img src="'+wgStaticFilesServer+'/templates/icons/cancelupdates-envelope.png" style="margin-bottom:-5px;"></a> '+
linkFront+CancelUpdatesText+'</a></span>';pageDiv.replace(temp);}}
else if(PageDef=='catPage'&&pageDiv){$('strikebtndiv').show();pageDiv.select("a.btn")[0].replaceTextBtn("&nbsp;<img src='"+wgStaticFilesServer+"/templates/images/envelope_faq.gif' width='18' height='11' style='width: 18px; height: 11px;' />&nbsp;&nbsp;"+CancelUpdatesText+"&nbsp;");pageDiv.select("a.btn")[0].replaceActionBtn("getUpdates(1);return false;");pageDiv.select("a.btn")[0].replaceAltBtn("Click here to cancel updates for this question.");pageDiv.id="cancelUpdates";}}
if(jwgData.articleData.isQRelated==1){statusMessageShow("You will now receive updates when this question is answered. "+" "+EDITLINK+"Edit your email settings"+EDITUPDATE+"Edit your updates list</a>]");var text='<a rel="nofollow" title="Click here to cancel updates for this question."'+'name="&amp;lid=WatchQ&amp;lpos=UnAnsQpg_leftR" '+'onclick="getUpdates(1);return false;" href="/Q/'+jwgData.articleData.real_returnto+'&amp;action=unwatch&amp;returnto='+jwgData.articleData.real_returnto+'&amp;isQRelated=1">'+CancelUpdatesText+'</a>';if($('getUpdatesLM')){$('getUpdatesLM').innerHTML=text;}}
if(jwgData.articleData.isTopicPageRelated==1){statusMessageShow("You will now receive updates when there are new questions in this category. "+" "+EDITLINK+"Edit your email settings"+EDITUPDATE+"Edit your updates list</a>]");var text='<a rel="nofollow" title="Click here to cancel updates about new questions in this category."'+'name="&amp;lid=WatchCat&amp;lpos=Catpg_leftR" '+'onclick="getUpdates(1);return false;" href="/Q/FAQ/'+jwgData.articleData.topic_id+'&amp;action=unwatch">'+CancelUpdatesText+'</a>';if($('getUpdatesLM')){$('getUpdatesLM').innerHTML=text;}}}
function getUpdatesRemove(){var EDITLINK="[<a href='/Q/Special:preferences'>";var EDITUPDATE="</a> | <a href='/Q/Special:watchlist&magic=yes'>";var wssStatus=(document.loginform.wssStatus?document.loginform.wssStatus.value:'');var getUpdatesText="get updates";var GetUpdatesText="Get updates";if(typeof PageDef!="undefined"){var pageDiv=$('cancelUpdates');if((PageDef=='noAns'||PageDef=='newQ')&&pageDiv){var temp='<div id="getUpdates" style="margin-left: 15px;" '+'onclick="_hbLink(\'WatchQ'+needans_num+'\', \''+wssStatus+'_UnAnsQPg_WTC\');getUpdates();return false;" title="Click here to get updates for this question." >'+'<img src="'+wgStaticFilesServer+'/templates/icons/getupdates-btn2.gif" />\n'+'<span style="text-decoration: underline; margin-top: -5px; display: block;">'+getUpdatesText+'</span></div>';pageDiv.replace(temp);}
else if(PageDef=='Ans'&&pageDiv){if(pageDiv.match('a')){var temp='<a  id="getUpdates" onclick="getUpdates();return false;" rel="nofollow"'+'name="&amp;lid=WatchQ&amp;lpos='+wssStatus+'_AnsQPg_Btn"'+'href="'+jwgData.articleData.real_returnto+'&amp;action=watch&amp;returnto='+
jwgData.articleData.real_returnto+'&amp;isQRelated=1">'+'<img alt="Click here to get updates for this question." title="Click here to get updates for this question."'+'src="'+wgStaticFilesServer+'/templates/icons/blue-getupdates-quest.gif" /></a>'
pageDiv.replace(temp);}else{var linkFront='<a href="javascript:void(0);" onclick="getUpdates();" name="&lid=WatchQ&lpos='+wssStatus+'_AnsQPg_Btn" title="Click here to get updates for this question." >';var temp='<span id="getUpdates" >'+
linkFront+'<img src="'+wgStaticFilesServer+'/templates/icons/updates-envelope.png" style="margin-bottom:-3px;"></a> '+
linkFront+GetUpdatesText+'</a></span>';pageDiv.replace(temp);}}
else if(PageDef=='catPage'&&pageDiv){$('strikebtndiv').hide();pageDiv.select("a.btn")[0].replaceTextBtn("&nbsp;<img src='"+wgStaticFilesServer+"/templates/images/envelope_faq.gif' width='18' height='11' style='width: 18px; height: 11px;' />&nbsp;&nbsp;"+GetUpdatesText+"&nbsp;");pageDiv.select("a.btn")[0].replaceActionBtn("getUpdates();return false;");pageDiv.select("a.btn")[0].replaceAltBtn("Click here to get updates for this question.");pageDiv.id="getUpdates";}}
if(jwgData.articleData.isQRelated==1){var text='<a rel="nofollow" title="Click here to get updates for this question." name="&amp;lid=WatchQ&amp;lpos=UnAnsQpg_leftR" '+'onclick="getUpdates(0);return false;" href="/Q/'+jwgData.articleData.real_returnto+'&amp;action=watch&amp;returnto='+jwgData.articleData.real_returnto+'&amp;isQRelated=1">'+GetUpdatesText+'</a>';if($('getUpdatesLM')){$('getUpdatesLM').innerHTML=text;}
statusMessageShow("You have canceled updates for this question. "+" "+EDITLINK+"Edit your email settings"+EDITUPDATE+"Edit your updates list</a>]");}
if(jwgData.articleData.isTopicPageRelated==1){var text='<a rel="nofollow" title="Click here to get updates about new questions in this category."'+'name="&amp;lid=WatchCat&amp;lpos=Catpg_leftR" '+'onclick="getUpdates(0);return false;" href="/Q/FAQ/'+jwgData.articleData.topic_id+'&amp;action=watch">'+GetUpdatesText+'</a>';if($('getUpdatesLM')){$('getUpdatesLM').innerHTML=text;}
statusMessageShow("You have canceled updates for this category. "+" "+EDITLINK+"Edit your email settings"+EDITUPDATE+"Edit your updates list</a>]");}}
window.onload=function(){Shadower.shadowWithClass('shadowed');};var Shadower={shadow:function(element)
{element=$(element);var options=Object.extend({distance:4,angle:130,opacity:0.7,nestedShadows:4,color:'#000000'},arguments[1]||{});var positionStyle=Element.getStyle(element,'position');var parent=element.parentNode;if(!element.shadowZIndex)
{if(positionStyle!='absolute'&&positionStyle!='fixed')
{var placeHolder=this.idSafeClone(element);placeHolder.id=null;parent.insertBefore(placeHolder,element);Position.absolutize(element);Position.clone(placeHolder,element);element.style.margin='0';placeHolder.style.visibility='hidden';positionStyle='absolute';}
element.shadowZIndex=new Number(Element.getStyle(element,'zIndex')?Element.getStyle(element,'zIndex'):1);element.style.zIndex=element.shadowZIndex+options.nestedShadows;}
if(arguments[2])
this.deshadow(element);if(!element.shadows)
{element.shadows=new Array(options.nestedShadows);for(var i=0;i<options.nestedShadows;i++)
{var shadow=document.createElement('div');Element.hide(shadow);shadow.appendChild(document.createTextNode(' '));if(parent)
parent.appendChild(shadow);shadow.style.position=positionStyle;shadow.style.backgroundColor=options.color;Element.setOpacity(shadow,options.opacity/options.nestedShadows);shadow.style.zIndex=element.shadowZIndex+i;element.shadows[i]=shadow;}}
var legendHeight=this.getLegendHeight(element);Position.prepare();var offsets=Position.positionedOffset(element);var topOffset=-Math.cos(-options.angle*Math.PI/180)*options.distance;var leftOffset=-Math.sin(-options.angle*Math.PI/180)*options.distance;element.shadows.each(function(shadow,i)
{shadow.style.top=Math.ceil(offsets[1]+topOffset+i+(legendHeight/2))+'px';shadow.style.left=(offsets[0]+leftOffset+i)+'px';shadow.style.width=(element.offsetWidth-(2*i))+'px';shadow.style.height=(element.offsetHeight-(2*i)-(legendHeight/2))+'px';Element.show(shadow);});},idSafeClone:function(node)
{var clone=node.cloneNode(false);if(clone.hasAttribute&&clone.hasAttribute('id'))
clone.removeAttribute('id');var clonedChildren=$A(node.childNodes).collect(this.idSafeClone.bind(this));clonedChildren.each(function(child)
{clone.appendChild(child);});return clone;},getLegendHeight:function(element)
{if(element.nodeName.toLowerCase()=='fieldset')
{var legend;$A(element.childNodes).each(function(child)
{if(child.nodeName.toLowerCase()=='legend')
{legend=child;throw $break;}});if(legend)
return Element.getDimensions(legend).height;}
return 0;},deshadow:function(element)
{element=$(element);if(element.shadows)
{element.shadows.each(Element.remove);element.shadows=null;}},shadowWithClass:function(cssClass,options)
{$$('.'+cssClass).each(function(element)
{this.shadow(element,options);}.bind(this));},deshadowWithClass:function(cssClass)
{$$('.'+cssClass).each(function(element)
{this.deshadow(element);}.bind(this));}}
if((typeof Prototype=='undefined')||(typeof Element=='undefined')||(typeof Element.Methods=='undefined')||parseFloat(Prototype.Version.split(".")[0]+"."+
Prototype.Version.split(".")[1])<1.5)
throw("Shadower requires the Prototype JavaScript framework >= 1.5.0");Element.getOpacity=function(element)
{var opacity;if(opacity=Element.getStyle(element,'opacity'))
return parseFloat(opacity);if(opacity=(Element.getStyle(element,'filter')||'').match(/alpha\(opacity=(.*)\)/))
if(opacity[1])return parseFloat(opacity[1])/100;return 1.0;}
Element.setOpacity=function(element,value)
{element=$(element);if(value==1)
{Element.setStyle(element,{opacity:(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:null});if(/MSIE/.test(navigator.userAgent))
Element.setStyle(element,{filter:Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')});}
else
{if(value<0.00001)value=0;Element.setStyle(element,{opacity:value});if(/MSIE/.test(navigator.userAgent))
Element.setStyle(element,{filter:Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')+'alpha(opacity='+value*100+')'});}}
function alertBrowserError(){alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");}
var CaptchaInitException=Class.create({initialize:function(message){this.message=message;}});var CaptchaPopup=Class.create({initialize:function(content,init_size,images){if(content.substr(0,6)!='POPUP:'){throw new CaptchaInitException('Invalid content');}
this.init_size=(init_size?init_size:{x:0,y:0});this.content=content.substr(6);this.images=images;},loadImages:function(){if(this.images){this.imagePreload=new ImagePreloader(this.images);}},show:function(){this.loadImages();selectionPopupMenu('cap_elem',this.init_size,this.content);},hide:function(){},submit:function(){}});var editQCaptchaPopup=null;var EditQCaptchaPopup=Class.create(CaptchaPopup,{initialize:function($super,content){return $super(content,null,null);},submit:function(){return submitAjaxMovePage(2);},hide:function(){popupMenuHide();closeAjaxMovePage();}});var editAnsCaptchaPopup=null;var EditAnsCaptchaPopup=Class.create(CaptchaPopup,{initialize:function($super,content){return $super(content,null,null);},submit:function(){docap();},hide:function(){popupMenuHide();enableNewButtons($('editform'));}});function capErrorPopup(mes){var div=$("cap_error");div.show();div.innerHTML=mes;AddTop(div,"#FFFFFF","#FFFF66");AddBottom(div,"#FFFFFF","#FFFF66");operaRefresh();document.forms['capform'].wpSecurityCode.focus();}
var WA_ACTION_WATCH_QUESTION=1;var WA_ACTION_WATCH_QUESTION_NOT_CATCHALL=1;var WA_ACTION_PROTECT_QUESTION=1<<1;var WA_ACTION_UNPROTECT_QUESTION=1<<2;var WA_ACTION_PRESERVE_QUESTION=1<<3;var WA_ACTION_UNPRESERVE_QUESTION=1<<4;var WA_ACTION_FLAG_QUESTION=1<<5;var WA_ACTION_DELETE_QUESTION=1<<6;var WA_ACTION_ROLLBACK_QUESTION=1<<7;var WA_ACTION_EDIT_QUESTION_TOPICS=1<<8;var WA_ACTION_TRASH_QUESTION=1<<9;var WA_ACTION_UNTRASH_QUESTION=1<<10;var WA_ACTION_EDIT_RELATED_QUESTIONS=1<<11;var WA_ACTION_EDIT_RELATED_LINKS=1<<12;var WA_ACTION_EDIT_ALTERNATES=1<<13;var WA_ACTION_DELETE_ALTERNATE=1<<14;var WA_ACTION_SPLIT_ALTERNATE=1<<15;var WA_ACTION_REVERT_QUESTION=1<<16;var WA_ACTION_FEATURE_QUESTION=1<<17;var WA_ACTION_UNFEATURE_QUESTION=1<<18;var WA_ACTION_MARK_IMPROVE_QUESTION=1<<19;var WA_ACTION_UNMARK_IMPROVE_QUESTION=1<<20;var WA_ACTION_SPLIT_QUESTION=1<<21;var WA_ACTION_EDIT_QUESTION=1<<22;var WA_ACTION_EDIT_ANSWER=1<<23;var WA_ACTION_MERGE_PRIMARY_QUESTION=1<<24;var WA_ACTION_MERGE_SECONDARY_QUESTION=1<<25;var WA_ACTION_MERGE_SECONDARY_QUESTION_NEW=1<<25;var WA_ACTION_DISCUSS_QUESTION=1<<26;var WA_ACTION_EDIT_DISCUSSION=1<<27;var WA_ACTION_SHARE_QUESTION=1<<28;var WA_ACTION_ASK_NEW_QUESTION=1<<29;var WA_ACTION_CHANGE_QUESTION_CATEGORY=1<<30;var WA_ACTION_RECAT_QUESTION_TO_CATCHALL=1<<31;function setDirty(){isPostQClicked=false;}
function fixDivsHP(){var col2Div=$('col2');var col1Div=$('col1');var margin=20;if(Current.Browser.IE)margin=20;if(col2Div!=null&&col1Div!=null){col1Div.style.marginTop=margin+col2Div.offsetHeight+"px";}
var askedQlist=$('askedQlist');var answeredQlist=$('answeredQlist');if(askedQlist!=null&&answeredQlist!=null){if(askedQlist.offsetHeight>answeredQlist.offsetHeight){answeredQlist.style.height=askedQlist.offsetHeight-20+"px";askedQlist.style.height=askedQlist.offsetHeight-20+"px";}
else{askedQlist.style.height=answeredQlist.offsetHeight-20+"px";answeredQlist.style.height=answeredQlist.offsetHeight-20+"px";}}}
function validateTxtElm(txtElm,checkWordCount){if($(txtElm)){txtElmVal=$(txtElm).value;}
else{txtElmVal=$F($(txtElm));}
valid=txtElmVal.trim().length>0?true:false;if(checkWordCount){valid&=txtElmVal.replace(/[\*\*\*|\?]/g,'').trim().split(/[\s]+/).length>=3?true:false;}
return valid;}
ie6_running_fnc=false;function makeSubmitActive(btnElm,txtElm,checkWordCount){if(isIE6()){if(ie6_running_fnc)return;tmp_rest_fnc=function(){ie6_running_fnc=false;};tmp_rest_fnc.delay(1);ie6_running_fnc=true;}
var enable=true;if(Object.isArray(txtElm)&&txtElm.length>0){for(i=0;i<txtElm.length;i++){enable&=validateTxtElm(txtElm[i],checkWordCount);}}
else if(Object.isString(txtElm)){enable&=validateTxtElm(txtElm,checkWordCount);}
if(enable){$(btnElm).select("a.btn")[0].enableBtn();}
else{$(btnElm).select("a.btn")[0].disableBtn();}}
function blankAnswer(clickedLink,aid,revert_id,alink,lpos,wpEdittime){if(!clickedLink||!aid||!revert_id||!wpEdittime){return false;}
var url=location.protocol+"//"+location.host+"/Q/Special:Changes&ajax=1&action=blankAnswer&aid="+aid+"&revert_id="+revert_id+"&wpEdittime="+wpEdittime+"&lpos="+lpos;new Ajax.Request(url,{onSuccess:function(transport){var responseInteger=parseInt(transport.responseText);if(!isNaN(responseInteger)&&responseInteger>0){real_undo_revert_id=responseInteger;}else if(transport.responseText=="READ ONLY MODE"){alert("Alert: WikiAnswers is currently experiencing some technical difficulties. We hope to restore the site to full operation shortly. Thank you for your patience.");return;}else{showErrorMessage(transport.responseText,"blank_pop_ok",lpos);return;}
var containingNode=$(clickedLink.parentNode);var snippetText=containingNode.innerHTML.gsub(/\n/," ").gsub(/<a.*\/a>/i,"").trim();if(containingNode.className=="answersnippet"){$(clickedLink).remove();containingNode.innerHTML="Answer deleted"+" <a class=\"trashFirstAnswer\" href=\"javascript:void(null)\" name=\"&lid=DelAnsUndo&lpos="+lpos+"\" onclick=\"undoDelete(this, "+aid+", '"+escape(alink)+"', "+real_undo_revert_id+", '"+escape(snippetText)+"')\"><img src=\""+wgStaticFilesServer+"/templates/icons/icon-undo.png?v=57140\" alt="+"Undo Delete"+" title="+"Undo Delete"+"/></a>";}},onFailure:function(transport){alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");},onException:function(requester,except){alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");}});return true;}
function undoDelete(clickedLink,aid,alink,undo_revert_id,snippetText){if(!clickedLink||!aid||!undo_revert_id){return false;}
if(snippetText==null)
{snippetText="";}
var url=location.protocol+"//"+location.host+"/Q/"+unescape(alink)+"&ajax=1&action=revert&makeSurePrimary=1&confirm=1&revertid="+undo_revert_id;new Ajax.Request(url,{onSuccess:function(transport){var checkForReadOnly=transport.responseText.indexOf("static/readonly.html");if(checkForReadOnly!=-1){alert("Alert: WikiAnswers is currently experiencing some technical difficulties. We hope to restore the site to full operation shortly. Thank you for your patience.");return false;}
var containingNode=$(clickedLink.parentNode);if(containingNode.className=="answersnippet"){containingNode.innerHTML=unescape(snippetText);}
return true;},onFailure:function(transport){alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");},onException:function(requester,except){alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");}});}
function assignParam(name,value,expInc,domain){var newCookie=name+"="+value+";path=/;";if(expInc==null){expInc=10000;}
else if(!expInc&&expInc!=0){document.cookie=newCookie;return;}
var futdate=new Date()
var expdate=futdate.getTime()+expInc;futdate.setTime(expdate);newCookie+=" expires="+futdate.toGMTString();if(domain!=null&&domain)
newCookie+="; domain="+domain;document.cookie=newCookie;}
function getLinkTextForCookie(f_el){var href=f_el.href;if(href.indexOf("?")>0)
href+="&";else
href+="?";var re=new RegExp("<[^>]*>","g");result=(f_el.innerHTML).replace(re,"");if(result)return"|linktext|"+encodeURIComponent(result);else return"";}
function showErrorMessage(msg,okLid,lpos){var okOnClickFunction=null;if(okLid){okOnClickFunction=function(obj){_hbLink(okLid,lpos);obj.close();};}
domAlert=new DOMAlert({title:'',text:msg,skin:'yn',width:400,height:25,ok:{onclick:okOnClickFunction}});domAlert.show();}
function removeLink(aid,link_title){if(!aid||!link_title){return false;}
domAlert=new DOMAlert({title:'',text:'Are you sure you want to delete this link?',skin:'yn',ok:{value:true,text:'',onclick:function(obj){confirmRemoveLink(obj,aid,link_title);}},cancel:{value:true,text:'',onclick:function(obj){obj.close();}},width:400,height:25});domAlert.show();return true;}
function confirmRemoveLink(DOMalertObject,aid,link_title){DOMalertObject.close();if(!aid||!link_title){return false;}
var url="/Q/Special:Changes&ajax=1&action=removeLink&aid="+aid+"&link_title="+link_title;new Ajax.Request(url,{onSuccess:function(transport){clickedLink=$('removeLink'+aid+link_title);if(!clickedLink){return false;}
var parentSpan=$(clickedLink.parentNode);result=parseInt(transport.responseText);switch(result){case 1:parentSpan.innerHTML="| Link was removed";break;case 2:$(clickedLink).remove();parentSpan.innerHTML="";showErrorMessage("No Related Link specified to remove.");break;case 3:$(clickedLink).remove();parentSpan.innerHTML="";showErrorMessage("That Link is not in the Related-Links list.");break;case 4:var successfullyLoggedInWas=successfullyLoggedIn;successfullyLoggedIn=successfullyLoggedIn.wrap(function(proceed,resp){proceed(resp);removeLink.defer(aid,link_title);successfullyLoggedIn=successfullyLoggedInWas;});dologout("globalHideModal(); new_login",true);break;case 5:$(clickedLink).remove();parentSpan.innerHTML="";showErrorMessage("Your account has limited access, therefore you can’t remove this link.");break;default:showErrorMessage("Link could not be removed");break;}},onException:function(requester,except){alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");}});return true;}
function errorPopup(mes,pname,ph){var div=document.getElementById(pname+"_elem");temp_top=div.style.top;div.style.height=ph+"px";div.style.top=temp_top;div=document.getElementById(pname+"_int_text");div.style.height=(ph-17)+"px";div=document.getElementById(pname+"_error");div.style.color="#000000";div.style.visibility="visible";div.style.background="#FFFF66";div.style.padding="0px";div.innerHTML=mes;RoundStatus();operaRefresh();}
function positionCategoriesDiv(){var communityDiv=$('community');var raCategoriesDiv=$('raCategories');if(communityDiv!=null&&raCategoriesDiv!=null){var h=230+$('community').offsetHeight;communityDiv.style.height=h+"px";setTimeout("repaintPage2('raCategories')",1);}}
function repaintPage2(id){if($(id)!=null){$(id).style.display="none";$(id).style.display="block";}}
link_redirect=false;function loginNavGo(url){action=url;new_login();}
function isSuper(){if($('superforum'))
return true;return false;}
function ConstractToolTip(id,btn,isCentered,width,height,returnto_nons,niFlag){DestroyTooltip(id);var createdDiv=document.createElement("div");createdDiv.className="toolTipClass";createdDiv.id=id;document.body.appendChild(createdDiv);var mainBoxHTML='';var leftPosition,topPosition;if(typeof(returnto_nons)=='undefined')
returnto_nons="";var ecsapedRN=returnto_nons.replace(/\'/g,"\\'");mainBoxHTML='<form action="" method="post" id="userloginID" name="userlogin" onsubmit="UpdateToolTip(\'userloginID\',\'/Q/Special:MailPassword\',\''+ecsapedRN+'\',\'repaintToolTip\');return false;">'+'<table>'+'<input type="hidden" value="" name="returnto"/>'+'<input type="hidden" value="" name="returnto_query"/>'+'<input type="hidden" value="" name="wpSendUsername"/>'+'<input type="hidden" value="" name="wpSendEmail"/>'+'<tbody>'+'<tr><td align="left"><h3>'+'Forgot your password?'+'</h3></td></tr>'+'<tr><td align="left">'+'Type the username or email address you used when you signed up on WikiAnswers.'+'</td></tr>'+'<tr><td align="center" style="padding-top:10px;"> <input id="mptinput" type="text" name="emailORusername" size="45"/></td></tr>'+'<tr><td align="center"><div style="margin-top: 15px;"><a class=\'btn std\' href=\'javascript:void(0);\' onmousedown="ButtonMouseDown(this);" onmouseup="ButtonMouseUp(this);" onmouseout="ButtonMouseUp(this); " onclick="if(!$(this).isDisabledBtn()) { UpdateToolTip(\'userloginID\',\'/Q/Special:MailPassword\',\''+ecsapedRN+'\',\'repaintToolTip\');return false; } else { xPreventDefault(); return false; }" alt="Email new password" title="Email new password"><span><span><font style="white-space: nowrap;"><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"><font>&nbsp;Email new password&nbsp;</font><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"></font></span></span></a></div></td></tr>'+'</tbody>'+'</table>'+'</form';var arr_xy=getObjXY(btn);var arr_scroll=getScroll();var curleft=arr_xy[0]-arr_scroll[0];var curtop=arr_xy[1]-arr_scroll[1];var centerArrow=createdDiv.offsetHeight/2;var leftPosition=(curleft>0)?arr_xy[0]-centerArrow:arr_xy[0];var rightPosition=leftPosition+createdDiv.offsetWidth;var outofwindow=rightPosition-document.body.clientWidth;leftPosition=(rightPosition>document.body.offsetWidth)?(leftPosition-outofwindow-5):leftPosition;leftPosition=leftPosition>0?leftPosition:5;var arroleft=arr_xy[0]-leftPosition+btn.offsetWidth/2-10;if(curtop>(createdDiv.offsetHeight+20)){var arrowdir="down";var topPosition=arr_xy[1]-createdDiv.offsetHeight-15;}
else{var arrowdir="up";var topPosition=arr_xy[1]+30;}
createdDiv.innerHTML+='<div id="arrow_'+arrowdir+'" style="left:'+arroleft+'px;"/></div>';createdDiv.innerHTML+='<div onclick="DestroyTooltip(\''+createdDiv.id+'\');" class="closeTop">&nbsp;X&nbsp;</div><div id="TollTipText">'+mainBoxHTML+'</div>';if(Current.Browser.Opera){createdDiv.style.display="none";topPosition-=15;}
createdDiv.style.visibility="visible";createdDiv.style.left=leftPosition+"px";createdDiv.style.top=topPosition+"px";if(Current.Browser.Opera){setTimeout("repaintOpera('"+createdDiv.id+"')",50);}}
function repaintOpera(id){var obj=document.getElementById(id);document.body.style.display="none";if(obj!=null){obj.style.display="none";obj.style.display="block";}
document.body.style.display="block";}
function repaintToolTip(str){var obj=document.getElementById("TollTipText");if(obj!=null){obj.innerHTML=str;}
repaintOpera("TollTipText");}
var UpdateToolTipOld=null;var UpdateToolTip=UpdateToolTipOld=function(formId,dest,rt,destFun){if(formId=="userloginID")setUserNameAndEmail(formId);var params=getParams(formId);repaintToolTip("<div style=\"font-size:20px;margin-top:70px\">"+"Please wait..."+"</div>");var rt_param=(rt&&rt!="")?"&rt="+rt:"";dest=location.protocol+"//"+location.host+dest;AjaxToFunc(dest,destFun,"POST",params+rt_param);}
function DestroyTooltip(id){var obj=document.getElementById(id);if(obj!=null){var ObjParent=obj.parentNode;ObjParent.removeChild(obj);}}
function emailValidate(email){var reg=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;var address=email;if(reg.test(address)==false){return false;}else{return true;}}
function setUserNameAndEmail(formid){var obj=document.getElementById(formid);var inputText=obj.emailORusername.value;if(emailValidate(inputText)){obj.wpSendEmail.value=inputText;obj.wpSendUsername.value="";}else{obj.wpSendUsername.value=inputText;obj.wpSendEmail.value="";}}
var isIE=navigator.userAgent.toLowerCase().indexOf("msie")>-1;var isMoz=document.implementation&&document.implementation.createDocument;var isSafari=((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false;function curvyCorners()
{if(typeof(arguments[0])!="object")throw newCurvyError("First parameter of curvyCorners() must be an object.");if(typeof(arguments[1])!="object"&&typeof(arguments[1])!="string")throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name.");if(typeof(arguments[1])=="string")
{var startIndex=0;var boxCol=getElementsByClass(arguments[1]);}
else
{var startIndex=1;var boxCol=arguments;}
var curvyCornersCol=new Array();if(arguments[0].validTags)
var validElements=arguments[0].validTags;else
var validElements=["div"];for(var i=startIndex,j=boxCol.length;i<j;i++)
{var currentTag=boxCol[i].tagName.toLowerCase();if(inArray(validElements,currentTag)!==false)
{curvyCornersCol[curvyCornersCol.length]=new curvyObject(arguments[0],boxCol[i]);}}
this.objects=curvyCornersCol;this.applyCornersToAll=function()
{for(var x=0,k=this.objects.length;x<k;x++)
{this.objects[x].applyCorners();}}}
function curvyObject()
{this.box=arguments[1];this.settings=arguments[0];this.topContainer=null;this.bottomContainer=null;this.masterCorners=new Array();this.contentDIV=null;var boxHeight=get_style(this.box,"height","height");var boxWidth=get_style(this.box,"width","width");var borderWidth=get_style(this.box,"borderTopWidth","border-top-width");var borderColour=get_style(this.box,"borderTopColor","border-top-color");var boxColour=get_style(this.box,"backgroundColor","background-color");var backgroundImage=get_style(this.box,"backgroundImage","background-image");var boxPosition=get_style(this.box,"position","position");var boxPadding=get_style(this.box,"paddingTop","padding-top");this.boxHeight=parseInt(((boxHeight!=""&&boxHeight!="auto"&&boxHeight.indexOf("%")==-1)?boxHeight.substring(0,boxHeight.indexOf("px")):this.box.scrollHeight));this.boxWidth=parseInt(((boxWidth!=""&&boxWidth!="auto"&&boxWidth.indexOf("%")==-1)?boxWidth.substring(0,boxWidth.indexOf("px")):this.box.scrollWidth));this.borderWidth=parseInt(((borderWidth!=""&&borderWidth.indexOf("px")!==-1)?borderWidth.slice(0,borderWidth.indexOf("px")):0));this.boxColour=format_colour(boxColour);this.boxPadding=parseInt(((boxPadding!=""&&boxPadding.indexOf("px")!==-1)?boxPadding.slice(0,boxPadding.indexOf("px")):0));this.borderColour=format_colour(borderColour);this.borderString=this.borderWidth+"px"+" solid "+this.borderColour;this.backgroundImage=((backgroundImage!="none")?backgroundImage:"");this.boxContent=this.box.innerHTML;if(boxPosition!="absolute")this.box.style.position="relative";this.box.style.padding="0px";if(isIE&&boxWidth=="auto"&&boxHeight=="auto")this.box.style.width="100%";if(this.settings.autoPad==true&&this.boxPadding>0)
this.box.innerHTML="";this.applyCorners=function()
{for(var t=0;t<2;t++)
{switch(t)
{case 0:if(this.settings.tl||this.settings.tr)
{var newMainContainer=document.createElement("DIV");newMainContainer.style.width="100%";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidth+"px";newMainContainer.style.paddingRight=this.borderWidth+"px";var topMaxRadius=Math.max(this.settings.tl?this.settings.tl.radius:0,this.settings.tr?this.settings.tr.radius:0);newMainContainer.style.height=topMaxRadius+"px";newMainContainer.style.top=0-topMaxRadius+"px";newMainContainer.style.left=0-this.borderWidth+"px";this.topContainer=this.box.appendChild(newMainContainer);}
break;case 1:if(this.settings.bl||this.settings.br)
{var newMainContainer=document.createElement("DIV");newMainContainer.style.width="100%";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidth+"px";newMainContainer.style.paddingRight=this.borderWidth+"px";var botMaxRadius=Math.max(this.settings.bl?this.settings.bl.radius:0,this.settings.br?this.settings.br.radius:0);newMainContainer.style.height=botMaxRadius+"px";newMainContainer.style.bottom=0-botMaxRadius+"px";newMainContainer.style.left=0-this.borderWidth+"px";this.bottomContainer=this.box.appendChild(newMainContainer);}
break;}}
if(this.topContainer)this.box.style.borderTopWidth="0px";if(this.bottomContainer)this.box.style.borderBottomWidth="0px";var corners=["tr","tl","br","bl"];for(var i in corners)
{if(i>-1<4)
{var cc=corners[i];if(!this.settings[cc])
{if(((cc=="tr"||cc=="tl")&&this.topContainer!=null)||((cc=="br"||cc=="bl")&&this.bottomContainer!=null))
{var newCorner=document.createElement("DIV");newCorner.style.position="relative";newCorner.style.fontSize="1px";newCorner.style.overflow="hidden";if(this.backgroundImage=="")
newCorner.style.backgroundColor=this.boxColour;else
newCorner.style.backgroundImage=this.backgroundImage;switch(cc)
{case"tl":newCorner.style.height=topMaxRadius-this.borderWidth+"px";newCorner.style.marginRight=this.settings.tr.radius-(this.borderWidth*2)+"px";newCorner.style.borderLeft=this.borderString;newCorner.style.borderTop=this.borderString;newCorner.style.left=-this.borderWidth+"px";break;case"tr":newCorner.style.height=topMaxRadius-this.borderWidth+"px";newCorner.style.marginLeft=this.settings.tl.radius-(this.borderWidth*2)+"px";newCorner.style.borderRight=this.borderString;newCorner.style.borderTop=this.borderString;newCorner.style.backgroundPosition="-"+(topMaxRadius+this.borderWidth)+"px 0px";newCorner.style.left=this.borderWidth+"px";break;case"bl":newCorner.style.height=botMaxRadius-this.borderWidth+"px";newCorner.style.marginRight=this.settings.br.radius-(this.borderWidth*2)+"px";newCorner.style.borderLeft=this.borderString;newCorner.style.borderBottom=this.borderString;newCorner.style.left=-this.borderWidth+"px";newCorner.style.backgroundPosition="-"+(this.borderWidth)+"px -"+(this.boxHeight+(botMaxRadius+this.borderWidth))+"px";break;case"br":newCorner.style.height=botMaxRadius-this.borderWidth+"px";newCorner.style.marginLeft=this.settings.bl.radius-(this.borderWidth*2)+"px";newCorner.style.borderRight=this.borderString;newCorner.style.borderBottom=this.borderString;newCorner.style.left=this.borderWidth+"px"
newCorner.style.backgroundPosition="-"+(botMaxRadius+this.borderWidth)+"px -"+(this.boxHeight+(botMaxRadius+this.borderWidth))+"px";break;}}}
else
{if(this.masterCorners[this.settings[cc].radius])
{var newCorner=this.masterCorners[this.settings[cc].radius].cloneNode(true);}
else
{var newCorner=document.createElement("DIV");newCorner.style.height=this.settings[cc].radius+"px";newCorner.style.width=this.settings[cc].radius+"px";newCorner.style.position="absolute";newCorner.style.fontSize="1px";newCorner.style.overflow="hidden";var borderRadius=parseInt(this.settings[cc].radius-this.borderWidth);for(var intx=0,j=this.settings[cc].radius;intx<j;intx++)
{if((intx+1)>=borderRadius)
var y1=-1;else
var y1=(Math.floor(Math.sqrt(Math.pow(borderRadius,2)-Math.pow((intx+1),2)))-1);if(borderRadius!=j)
{if((intx)>=borderRadius)
var y2=-1;else
var y2=Math.ceil(Math.sqrt(Math.pow(borderRadius,2)-Math.pow(intx,2)));if((intx+1)>=j)
var y3=-1;else
var y3=(Math.floor(Math.sqrt(Math.pow(j,2)-Math.pow((intx+1),2)))-1);}
if((intx)>=j)
var y4=-1;else
var y4=Math.ceil(Math.sqrt(Math.pow(j,2)-Math.pow(intx,2)));if(y1>-1)this.drawPixel(intx,0,this.boxColour,100,(y1+1),newCorner,-1,this.settings[cc].radius);if(borderRadius!=j)
{for(var inty=(y1+1);inty<y2;inty++)
{if(this.settings.antiAlias)
{if(this.backgroundImage!="")
{var borderFract=(pixelFraction(intx,inty,borderRadius)*100);if(borderFract<30)
{this.drawPixel(intx,inty,this.borderColour,100,1,newCorner,0,this.settings[cc].radius);}
else
{this.drawPixel(intx,inty,this.borderColour,100,1,newCorner,-1,this.settings[cc].radius);}}
else
{var pixelcolour=BlendColour(this.boxColour,this.borderColour,pixelFraction(intx,inty,borderRadius));this.drawPixel(intx,inty,pixelcolour,100,1,newCorner,0,this.settings[cc].radius,cc);}}}
if(this.settings.antiAlias)
{if(y3>=y2)
{if(y2==-1)y2=0;this.drawPixel(intx,y2,this.borderColour,100,(y3-y2+1),newCorner,0,0);}}
else
{if(y3>=y1)
{this.drawPixel(intx,(y1+1),this.borderColour,100,(y3-y1),newCorner,0,0);}}
var outsideColour=this.borderColour;}
else
{var outsideColour=this.boxColour;var y3=y1;}
if(this.settings.antiAlias)
{for(var inty=(y3+1);inty<y4;inty++)
{this.drawPixel(intx,inty,outsideColour,(pixelFraction(intx,inty,j)*100),1,newCorner,((this.borderWidth>0)?0:-1),this.settings[cc].radius);}}}
this.masterCorners[this.settings[cc].radius]=newCorner.cloneNode(true);}
if(cc!="br")
{for(var t=0,k=newCorner.childNodes.length;t<k;t++)
{var pixelBar=newCorner.childNodes[t];var pixelBarTop=parseInt(pixelBar.style.top.substring(0,pixelBar.style.top.indexOf("px")));var pixelBarLeft=parseInt(pixelBar.style.left.substring(0,pixelBar.style.left.indexOf("px")));var pixelBarHeight=parseInt(pixelBar.style.height.substring(0,pixelBar.style.height.indexOf("px")));if(cc=="tl"||cc=="bl"){pixelBar.style.left=this.settings[cc].radius-pixelBarLeft-1+"px";}
if(cc=="tr"||cc=="tl"){pixelBar.style.top=this.settings[cc].radius-pixelBarHeight-pixelBarTop+"px";}
switch(cc)
{case"tr":pixelBar.style.backgroundPosition="-"+Math.abs((this.boxWidth-this.settings[cc].radius+this.borderWidth)+pixelBarLeft)+"px -"+Math.abs(this.settings[cc].radius-pixelBarHeight-pixelBarTop-this.borderWidth)+"px";break;case"tl":pixelBar.style.backgroundPosition="-"+Math.abs((this.settings[cc].radius-pixelBarLeft-1)-this.borderWidth)+"px -"+Math.abs(this.settings[cc].radius-pixelBarHeight-pixelBarTop-this.borderWidth)+"px";break;case"bl":pixelBar.style.backgroundPosition="-"+Math.abs((this.settings[cc].radius-pixelBarLeft-1)-this.borderWidth)+"px -"+Math.abs((this.boxHeight+this.settings[cc].radius+pixelBarTop)-this.borderWidth)+"px";break;}}}}
if(newCorner)
{switch(cc)
{case"tl":if(newCorner.style.position=="absolute")newCorner.style.top="0px";if(newCorner.style.position=="absolute")newCorner.style.left="0px";if(this.topContainer)this.topContainer.appendChild(newCorner);break;case"tr":if(newCorner.style.position=="absolute")newCorner.style.top="0px";if(newCorner.style.position=="absolute")newCorner.style.right="0px";if(this.topContainer)this.topContainer.appendChild(newCorner);break;case"bl":if(newCorner.style.position=="absolute")newCorner.style.bottom="0px";if(newCorner.style.position=="absolute")newCorner.style.left="0px";if(this.bottomContainer)this.bottomContainer.appendChild(newCorner);break;case"br":if(newCorner.style.position=="absolute")newCorner.style.bottom="0px";if(newCorner.style.position=="absolute")newCorner.style.right="0px";if(this.bottomContainer)this.bottomContainer.appendChild(newCorner);break;}}}}
var radiusDiff=new Array();radiusDiff["t"]=Math.abs(this.settings.tl.radius-this.settings.tr.radius)
radiusDiff["b"]=Math.abs(this.settings.bl.radius-this.settings.br.radius);for(z in radiusDiff)
{if(z=="t"||z=="b")
{if(radiusDiff[z])
{var smallerCornerType=((this.settings[z+"l"].radius<this.settings[z+"r"].radius)?z+"l":z+"r");var newFiller=document.createElement("DIV");newFiller.style.height=radiusDiff[z]+"px";newFiller.style.width=this.settings[smallerCornerType].radius+"px"
newFiller.style.position="absolute";newFiller.style.fontSize="1px";newFiller.style.overflow="hidden";newFiller.style.backgroundColor=this.boxColour;switch(smallerCornerType)
{case"tl":newFiller.style.bottom="0px";newFiller.style.left="0px";newFiller.style.borderLeft=this.borderString;this.topContainer.appendChild(newFiller);break;case"tr":newFiller.style.bottom="0px";newFiller.style.right="0px";newFiller.style.borderRight=this.borderString;this.topContainer.appendChild(newFiller);break;case"bl":newFiller.style.top="0px";newFiller.style.left="0px";newFiller.style.borderLeft=this.borderString;this.bottomContainer.appendChild(newFiller);break;case"br":newFiller.style.top="0px";newFiller.style.right="0px";newFiller.style.borderRight=this.borderString;this.bottomContainer.appendChild(newFiller);break;}}
var newFillerBar=document.createElement("DIV");newFillerBar.style.position="relative";newFillerBar.style.fontSize="1px";newFillerBar.style.overflow="hidden";newFillerBar.style.backgroundColor=this.boxColour;newFillerBar.style.backgroundImage=this.backgroundImage;switch(z)
{case"t":if(this.topContainer)
{if(this.settings.tl.radius&&this.settings.tr.radius)
{newFillerBar.style.height=topMaxRadius-this.borderWidth+"px";newFillerBar.style.marginLeft=this.settings.tl.radius-this.borderWidth+"px";newFillerBar.style.marginRight=this.settings.tr.radius-this.borderWidth+"px";newFillerBar.style.borderTop=this.borderString;if(this.backgroundImage!="")
newFillerBar.style.backgroundPosition="-"+(topMaxRadius+this.borderWidth)+"px 0px";this.topContainer.appendChild(newFillerBar);}
this.box.style.backgroundPosition="0px -"+(topMaxRadius-this.borderWidth)+"px";}
break;case"b":if(this.bottomContainer)
{if(this.settings.bl.radius&&this.settings.br.radius)
{newFillerBar.style.height=botMaxRadius-this.borderWidth+"px";newFillerBar.style.marginLeft=this.settings.bl.radius-this.borderWidth+"px";newFillerBar.style.marginRight=this.settings.br.radius-this.borderWidth+"px";newFillerBar.style.borderBottom=this.borderString;if(this.backgroundImage!="")
newFillerBar.style.backgroundPosition="-"+(botMaxRadius+this.borderWidth)+"px -"+(this.boxHeight+(topMaxRadius+this.borderWidth))+"px";this.bottomContainer.appendChild(newFillerBar);}}
break;}}}
if(this.settings.autoPad==true&&this.boxPadding>0)
{var contentContainer=document.createElement("DIV");contentContainer.style.position="relative";contentContainer.innerHTML=this.boxContent;contentContainer.className="autoPadDiv";var topPadding=Math.abs(topMaxRadius-this.boxPadding);var botPadding=Math.abs(botMaxRadius-this.boxPadding);if(topMaxRadius<this.boxPadding)
contentContainer.style.paddingTop=topPadding+"px";if(botMaxRadius<this.boxPadding)
contentContainer.style.paddingBottom=botMaxRadius+"px";contentContainer.style.paddingLeft=this.boxPadding+"px";contentContainer.style.paddingRight=this.boxPadding+"px";this.contentDIV=this.box.appendChild(contentContainer);}}
this.drawPixel=function(intx,inty,colour,transAmount,height,newCorner,image,cornerRadius)
{var pixel=document.createElement("DIV");pixel.style.height=height+"px";pixel.style.width="1px";pixel.style.position="absolute";pixel.style.fontSize="1px";pixel.style.overflow="hidden";var topMaxRadius=Math.max(this.settings["tr"].radius,this.settings["tl"].radius);if(image==-1&&this.backgroundImage!="")
{pixel.style.backgroundImage=this.backgroundImage;pixel.style.backgroundPosition="-"+(this.boxWidth-(cornerRadius-intx)+this.borderWidth)+"px -"+((this.boxHeight+topMaxRadius+inty)-this.borderWidth)+"px";}
else
{pixel.style.backgroundColor=colour;}
if(transAmount!=100)
setOpacity(pixel,transAmount);pixel.style.top=inty+"px";pixel.style.left=intx+"px";newCorner.appendChild(pixel);}}
function insertAfter(parent,node,referenceNode)
{parent.insertBefore(node,referenceNode.nextSibling);}
function BlendColour(Col1,Col2,Col1Fraction)
{var red1=parseInt(Col1.substr(1,2),16);var green1=parseInt(Col1.substr(3,2),16);var blue1=parseInt(Col1.substr(5,2),16);var red2=parseInt(Col2.substr(1,2),16);var green2=parseInt(Col2.substr(3,2),16);var blue2=parseInt(Col2.substr(5,2),16);if(Col1Fraction>1||Col1Fraction<0)Col1Fraction=1;var endRed=Math.round((red1*Col1Fraction)+(red2*(1-Col1Fraction)));if(endRed>255)endRed=255;if(endRed<0)endRed=0;var endGreen=Math.round((green1*Col1Fraction)+(green2*(1-Col1Fraction)));if(endGreen>255)endGreen=255;if(endGreen<0)endGreen=0;var endBlue=Math.round((blue1*Col1Fraction)+(blue2*(1-Col1Fraction)));if(endBlue>255)endBlue=255;if(endBlue<0)endBlue=0;return"#"+IntToHex(endRed)+IntToHex(endGreen)+IntToHex(endBlue);}
function IntToHex(strNum)
{base=strNum/16;rem=strNum%16;base=base-(rem/16);baseS=MakeHex(base);remS=MakeHex(rem);return baseS+''+remS;}
function MakeHex(x)
{if((x>=0)&&(x<=9))
{return x;}
else
{switch(x)
{case 10:return"A";case 11:return"B";case 12:return"C";case 13:return"D";case 14:return"E";case 15:return"F";}}}
function pixelFraction(x,y,r)
{var pixelfraction=0;var xvalues=new Array(1);var yvalues=new Array(1);var point=0;var whatsides="";var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(x,2)));if((intersect>=y)&&(intersect<(y+1)))
{whatsides="Left";xvalues[point]=0;yvalues[point]=intersect-y;point=point+1;}
var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(y+1,2)));if((intersect>=x)&&(intersect<(x+1)))
{whatsides=whatsides+"Top";xvalues[point]=intersect-x;yvalues[point]=1;point=point+1;}
var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(x+1,2)));if((intersect>=y)&&(intersect<(y+1)))
{whatsides=whatsides+"Right";xvalues[point]=1;yvalues[point]=intersect-y;point=point+1;}
var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(y,2)));if((intersect>=x)&&(intersect<(x+1)))
{whatsides=whatsides+"Bottom";xvalues[point]=intersect-x;yvalues[point]=0;}
switch(whatsides)
{case"LeftRight":pixelfraction=Math.min(yvalues[0],yvalues[1])+((Math.max(yvalues[0],yvalues[1])-Math.min(yvalues[0],yvalues[1]))/2);break;case"TopRight":pixelfraction=1-(((1-xvalues[0])*(1-yvalues[1]))/2);break;case"TopBottom":pixelfraction=Math.min(xvalues[0],xvalues[1])+((Math.max(xvalues[0],xvalues[1])-Math.min(xvalues[0],xvalues[1]))/2);break;case"LeftBottom":pixelfraction=(yvalues[0]*xvalues[1])/2;break;default:pixelfraction=1;}
return pixelfraction;}
function rgb2Hex(rgbColour)
{try{var rgbArray=rgb2Array(rgbColour);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);var hexColour="#"+IntToHex(red)+IntToHex(green)+IntToHex(blue);}
catch(e){alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");}
return hexColour;}
function rgb2Array(rgbColour)
{var rgbValues=rgbColour.substring(4,rgbColour.indexOf(")"));var rgbArray=rgbValues.split(", ");return rgbArray;}
function setOpacity(obj,opacity)
{opacity=(opacity==100)?99.999:opacity;if(isSafari&&obj.tagName!="IFRAME")
{var rgbArray=rgb2Array(obj.style.backgroundColor);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);obj.style.backgroundColor="rgba("+red+", "+green+", "+blue+", "+opacity/100+")";}
else if(typeof(obj.style.opacity)!="undefined")
{obj.style.opacity=opacity/100;}
else if(typeof(obj.style.MozOpacity)!="undefined")
{obj.style.MozOpacity=opacity/100;}
else if(typeof(obj.style.filter)!="undefined")
{obj.style.filter="alpha(opacity:"+opacity+")";}
else if(typeof(obj.style.KHTMLOpacity)!="undefined")
{obj.style.KHTMLOpacity=opacity/100;}}
function inArray(array,value)
{for(var i=0;i<array.length;i++){if(array[i]===value)return i;}
return false;}
function inArrayKey(array,value)
{for(key in array){if(key===value)return true;}
return false;}
function addEvent(elm,evType,fn,useCapture){if(elm.addEventListener){elm.addEventListener(evType,fn,useCapture);return true;}
else if(elm.attachEvent){var r=elm.attachEvent('on'+evType,fn);return r;}
else{elm['on'+evType]=fn;}}
function removeEvent(obj,evType,fn,useCapture){if(obj.removeEventListener){obj.removeEventListener(evType,fn,useCapture);return true;}else if(obj.detachEvent){var r=obj.detachEvent("on"+evType,fn);return r;}else{alert("Handler could not be removed");}}
function format_colour(colour)
{var returnColour="#ffffff";if(colour!=""&&colour!="transparent")
{if(colour.substr(0,3)=="rgb")
{returnColour=rgb2Hex(colour);}
else if(colour.length==4)
{returnColour="#"+colour.substring(1,2)+colour.substring(1,2)+colour.substring(2,3)+colour.substring(2,3)+colour.substring(3,4)+colour.substring(3,4);}
else
{returnColour=colour;}}
return returnColour;}
function get_style(obj,property,propertyNS)
{try
{if(obj.currentStyle)
{var returnVal=eval("obj.currentStyle."+property);}
else
{if(isSafari&&obj.style.display=="none")
{obj.style.display="";var wasHidden=true;}
var returnVal=document.defaultView.getComputedStyle(obj,'').getPropertyValue(propertyNS);if(isSafari&&wasHidden)
{obj.style.display="none";}}}
catch(e)
{}
return returnVal;}
function getElementsByClass(searchClass,node,tag)
{var classElements=new Array();if(node==null)
node=document;if(tag==null)
tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\s)"+searchClass+"(\s|$)");for(i=0,j=0;i<elsLen;i++)
{if(pattern.test(els[i].className))
{classElements[j]=els[i];j++;}}
return classElements;}
function newCurvyError(errorMessage)
{return new Error("curvyCorners Error:\n"+errorMessage)}
var capitalOne_round8={tl:{radius:8},tr:{radius:8},bl:{radius:8},br:{radius:8},antiAlias:true,autoPad:false};function capitalOneround(id){if(document.getElementById(id)){cornersObj=new curvyCorners(capitalOne_round8,document.getElementById(id));cornersObj.applyCornersToAll();}}
function roundCorners(){capitalOneround('capitalOne');capitalOneround('question_title');capitalOneround('question_tools');Event.stopObserving(window,"load",cursorToBox);}
function getElementsByClassName(classname){var elements=document.getElementsByTagName('*');classname=classname.toLowerCase();var allClassElements=new Array();for(var i=0;i<elements.length;i++)
{if(isMatching(elements[i].className.toLowerCase(),classname)){allClassElements.push(elements[i]);}}
return allClassElements;}
function isMatching(el,val){return el!=null&&el==val;}
function roundTopCorners(tab){var roundTop={tl:{radius:8},tr:{radius:8},bl:{radius:0},br:{radius:0},antiAlias:true,autoPad:false};var tabDiv=$(tab+"Tab");if(tabDiv){cornersObj=new curvyCorners(roundTop,tabDiv);cornersObj.applyCornersToAll();}}
var listpics_login=new Array(wgStaticFilesServer+'/templates/icons/x_on.png',wgStaticFilesServer+'/templates/icons/x.png');imagePreload_login=new ImagePreloader(listpics_login);menu="";old_dologin=null;old_doregister=null;old_registerLoginManager=null;old_showTooltip=null;login_help_popup=false;dom_ready=false;run_login=false;real_dom_ready=false;if(window.location.hash&&window.location.hash.match(/(#login-l|#login-r)/i))
run_login=true;Event.observe(window,"load",function(){real_dom_ready=true;});new PeriodicalExecuter(function(pe){if($('footer')&&real_dom_ready){dom_ready=true;pe.stop();if(run_login)
new_login();if(window.location.hash&&window.location.hash.match(/(#login-l|#login-r)/i)){if(window.location.hash.match(/#login-l/i)&&$('login-pod'))
registerLoginManager.defer('login');else if(window.location.hash.match(/#login-r/i)&&$('register-pod'))
registerLoginManager.defer('register');hash_params=window.location.hash.split("-");if(hash_params.length>2){navGo=function(){window.location.href=window.location.href.replace(/#login-.*$/,"")+"&"+hash_params[2];};}}}},0.5);var inDoLogin=false;function new_login(){if(!dom_ready){run_login=true;return;}
var cookie_name="giving_wikiUserID";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(cookie_name)==0){if(checkLogin()){successfullyLoggedIn("");return;}}}
if(xModalDialog.grey&&xModalDialog.grey.article_id)
xModalDialog.grey.onclick();if(!xModalDialog.instances['new_login_dlg']){div=xCreateDiv({width:"250px",height:"20px",textAlign:"left",backgroundColor:"transparent"},"clsModalDialog","new_login_dlg");div.innerHTML="<div style='padding: 0px; margin: 0px; position: relative; top: -142px; left: 165px; z-index: 103; visibility: hidden;'><img src='"+wgStaticFilesServer+"/templates/icons/x.png' id='new_login_dlg_close' style='height: 17px; width: 18px; display: block; cursor: pointer;' onMouseOver='this.src=\""+wgStaticFilesServer+"/templates/icons/x_on.png\";' onMouseOut='this.src=\""+wgStaticFilesServer+"/templates/icons/x.png\";' title='"+"Close"+"' alt='"+"Close"+"' /></div><div id=\"new_login-pod\" style='text-align: center; font-size: 12px; color: #FFFFFF; font-weight: bold;'></div>";$('container').insertAdjacentElement("afterEnd",div);arVersion=navigator.appVersion.split("MSIE");version=parseFloat(arVersion[1]);browserName=navigator.appName;if((browserName=="Microsoft Internet Explorer")&&(version>=5.5)&&(version<7.0)&&(document.body.filters)){img=$('new_login_dlg_close');imgName=img.src.split("?");imgName=imgName[0].toUpperCase();if(imgName.substring(imgName.length-3,imgName.length)=="PNG"){imgID='id=\"new_login_dlg_close\" ';imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' ";imgStyle="display:inline-block;"+img.style.cssText;if(img.align=="left")imgStyle="float:left;"+imgStyle;if(img.align=="right")imgStyle="float:right;"+imgStyle;if(img.parentElement.href)imgStyle="cursor:hand;"+imgStyle;strNewHTML="<span "+imgID+imgTitle
+" style=\""+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"
+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+img.src+"\', sizingMethod='scale');\"";strNewHTML+="></span>";img.outerHTML=strNewHTML;Event.observe($('new_login_dlg_close'),"mouseover",function(){$('new_login_dlg_close').style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/templates/icons/x_on.png", sizingMethod="scale")';},false);Event.observe($('new_login_dlg_close'),"mouseout",function(){$('new_login_dlg_close').style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/templates/icons/x.png", sizingMethod="scale")';},false);}}
new xModalDialog('new_login_dlg');Event.observe($('new_login_dlg_close'),"click",function(){new_login_close();},false);xModalDialog.instances['new_login_dlg'].show();}
else{xModalDialog.instances['new_login_dlg'].show();}
var fade=new Fadomatic(xModalDialog.grey,100,0,0,30);fade.fadeIn();browserName=navigator.appName;if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=" ttip";}
login_pod=$("user-pod");login_pod_inputs_values={};login_pod_inputs=$("user-pod").select("div#login-pod input");login_pod_inputs.each(function(login_pod_input){login_pod_inputs_values[login_pod_input.name]=login_pod_input.value;});register_pod_inputs_values={};register_pod_inputs=$("user-pod").select("div#register-pod input");register_pod_inputs.each(function(register_pod_input){register_pod_inputs_values[register_pod_input.name]=register_pod_input.value;});$("user-pod").remove();li_div=xCreateDiv({padding:"0px",margin:"0px",textAlign:"center"},null,'logging_in');li_div.innerHTML="<br>"+"signing in...";$("left-pod-top").insertAdjacentElement("afterEnd",li_div);$("left-pod-bottom").style.marginTop="0px";$('new_login-pod').style.position="absolute";$('new_login-pod').style.left=(getposOffset($("left-pod-top"),"left")+1-getposOffset($("new_login_dlg"),"left"))+"px";$('new_login-pod').style.top=(getposOffset($("left-pod-top"),"top")+1-getposOffset($("new_login_dlg"),"top"))+"px";cont_div=xCreateDiv({display:"block",fontFamily:"Verdana,sans-serif",fontSize:"12px",width:"165px",padding:"0px",margin:"0px"},null,"container");cont_div.innerHTML="<div id='contents'><div id='left-column' class='login' style='overflow: visible;'><div id='left-pod' style='background: none; margin: 0px; padding: 0px; overflow: visible;'><div id='user-pod'>"+login_pod.innerHTML+"</div></div></div></div>";$("new_login-pod").insertAdjacentElement("beforeEnd",cont_div);$("user-pod").setStyle({width:"165px",marginTop:"17px",marginBottom:"-11px",marginLeft:"-3px",border:"#FFFFFF 2px solid",backgroundColor:"#003399",zIndex:"102",padding:"0px"});settings_new_login={tl:{radius:19},tr:false,bl:{radius:19},br:{radius:19},antiAlias:true,autoPad:false};var cornersObj=new curvyCorners(settings_new_login,$("user-pod"));cornersObj.applyCornersToAll();$(document.forms['loginform']).select("p")[0].style.marginTop="0px";$(document.forms['registerform']).select("p")[0].style.marginTop="0px";$("user-pod").style.paddingTop="6px";$(document.forms['loginform']).select("div")[0].style.paddingBottom="10px";xFirstChild(document.forms['registerform'],"div").style.paddingBottom="10px";$('register-pod').style.paddingTop="5px";$('login-error').style.marginBottom="10px";$("login-error").style.marginLeft="0px";$("user-pod").select("div")[$("user-pod").select("div").length-1].style.width="131px";$("user-pod").childNodes[$("user-pod").childNodes.length-1].style.width="165px";$('new_login_dlg').style.zIndex="103";login_pod_inputs=$("user-pod").select("div#login-pod input");login_pod_inputs.each(function(login_pod_input){login_pod_input.value=login_pod_inputs_values[login_pod_input.name];});register_pod_inputs=$("user-pod").select("div#register-pod input");register_pod_inputs.each(function(register_pod_input){register_pod_input.value=register_pod_inputs_values[register_pod_input.name];});cur_scroll_y=xScrollTop();cur_scroll_x=xScrollLeft();if(document.addEventListener){xModalDialog.grey.addEventListener("mousewheel",stopScroll,false);xModalDialog.grey.addEventListener("DOMMouseScroll",stopScroll,false);$('new_login_dlg').addEventListener("mousewheel",stopScroll,false);$('new_login_dlg').addEventListener("DOMMouseScroll",stopScroll,false);}
else if(document.attachEvent){xModalDialog.grey.attachEvent("onmousewheel",stopScroll);$('new_login_dlg').attachEvent("onmousewheel",stopScroll);}
Event.observe(window,"scroll",stopWindowScroll,false);xAniLine($("new_login-pod"),20,10-153,800,2,function(){});setTimeout("$('new_login_dlg_close').parentNode.style.visibility = 'visible'; try { document.forms['loginform'].username.focus(); } catch(e) { document.forms['registerform'].username.focus(); }",800);hideTooltip();if($('mailPassword'))
DestroyTooltip('mailPassword');old_registerLoginManager=registerLoginManager;registerLoginManager=function(leftNavType){resetFormError();xFirstChild(xFirstChild(xFirstChild($("new_login-pod"),"div"),"div"),"div").className=leftNavType;podMarginTop=Math.abs($('user-pod').style.marginTop.replace(/px/,''));podMarginBottom=Math.abs($('user-pod').style.marginBottom.replace(/px/,''));podHeight=$('user-pod').getHeight()+podMarginTop+podMarginBottom;podInnerOffsetHeight=Math.abs($('new_login-pod').style.top.replace(/px/,''));podOffsetHeight=$('new_login_dlg').style.top.replace(/px/,'')-podInnerOffsetHeight;windowViewport=document.documentElement.clientHeight;windowScrollTop=document.documentElement.scrollTop;if((podOffsetHeight+podHeight)>(windowViewport+windowScrollTop)){$('new_login_dlg').style.top=((windowViewport-podHeight)/2)+windowScrollTop+podInnerOffsetHeight+'px';}
cur_tab=leftNavType;if(leftNavType=="register"){var originalValue=document.forms['loginform'].wpName.value;if(originalValue.length>MAX_USERNAME_LENGTH)
{originalValue=originalValue.substr(0,MAX_USERNAME_LENGTH);}
document.forms['registerform'].wpName.value=originalValue;document.forms['registerform'].wpPassword.value=document.forms['loginform'].wpPassword.value;}
else if(leftNavType=="login"){document.forms['loginform'].wpName.value=document.forms['registerform'].wpName.value;document.forms['loginform'].wpPassword.value=document.forms['registerform'].wpPassword.value;}
document.forms[leftNavType+'form'].username.focus();};old_dologin=dologin;dologin=function(){if(inDoLogin)
{return;}
inDoLogin=true;var html="";var xmlHTTP=getXMLHTTP();initialiseGetData();if(xmlHTTP){var wpName=document.loginform.wpName.value;var wpPassword=document.loginform.wpPassword.value;if(document.loginform.isTopicPageRelated)
var isTopicPageRelated=document.loginform.isTopicPageRelated.value;var wpRemember;if(document.loginform.wpRemember.checked)
wpRemember=1;else
wpRemember=0;var isTopicPageRelated=false;var returnto=document.loginform.returnto.value;var wpTopic_id=0;var wpTopic_title="";if(document.loginform.isTopicPageRelated){isTopicPageRelated=document.loginform.isTopicPageRelated.value;wpTopic_id=0;wpTopic_title="";if(document.loginform.topic_id)
wpTopic_id=document.loginform.topic_id.value;if(document.loginform.topic_title)
wpTopic_title=document.loginform.topic_title.value;}
var url=location.protocol+"//"+location.host+"/Q/Special:Userpod";var data="action=submit&"+"wpName="+wpName+"&"+"wpPassword="+wpPassword+"&"+"wpRemember="+wpRemember+"&"+"returnto="+returnto+"&"+"ac="+GET_DATA['action'];if(isTopicPageRelated)
data+="&isTopicPageRelated="+isTopicPageRelated+"&topic_id="+wpTopic_id+"&topic_title="+wpTopic_title;if(eval('(typeof(pttag) != "undefined");')){data+="&pttag="+pttag;}
if(location.pathname.indexOf("waAn=1")>0||location.pathname.indexOf("waAn=2")>0)
data+="&addToWatch=1";if(GET_DATA['wpNewq']=="1"){data+="&wpNewq=1";}
xmlHTTP.open("POST",url,false);xmlHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHTTP.send(data);var resp=xmlHTTP.responseText.trim();if(resp.indexOf('ERROR:')==0){var div=document.getElementById("login-error");$('new_login_dlg').style.top=xTop($('new_login_dlg'))+xHeight(div)+"px";div.style.color="#000000";div.style.background="#FFFF66";div.style.marginBottom="10px";div.innerHTML=resp.substr(6);div.style.display="block";AddTop(div,"#003399","#FFFF66");AddBottom(div,"#003399","#FFFF66");xFirstChild(xFirstChild(xFirstChild(xGetElementById("new_login-pod"),"div"),"div"),"div").className=cur_tab;$('new_login_dlg').style.top=xTop($('new_login_dlg'))-xHeight(div)+"px";operaRefresh();error_mess=resp.substr(6);error_mess=error_mess.replace(/[^A-Za-z ]/i,"");cv=_hbEvent(cv);_hbSet("cv.c1","LogInNo|"+error_mess.replace(/[ ]/i,"+"));_hbLink("Errors");}else if(resp.indexOf('RELOAD:')==0){window.location.reload();}else if(resp.indexOf('GOTO:')==0){window.location.href=resp.substr(5)+"&returnto="+URLEncodeEmail(URLEncodeEmail(window.location.href));}else{successfullyLoggedIn(resp);var div2=document.getElementById("on_login_rm");if(div2){div2.innerHTML="";}}}
setTimeout("inDoLogin = false;",1);};old_doregister=doregister;doregister=function(){var html="";var xmlHTTP=getXMLHTTP();initialiseGetData();if(xmlHTTP){var wpName=document.registerform.wpName.value;var wpPassword=document.registerform.wpPassword.value;var wpRetype=document.registerform.wpRetype.value;var wpEmail=document.registerform.wpEmail.value;var wpGetNewsletter;var wpAcceptPolicy=document.registerform.wpAcceptPolicy;if(!wpAcceptPolicy.checked){var div=document.getElementById("login-error");$('new_login_dlg').style.top=xTop($('new_login_dlg'))+xHeight(div)+"px";div.style.color="#000000";div.style.background="#FFFF66";div.style.marginBottom="10px";div.innerHTML="Please check that you agree to the community guidelines, terms of use and privacy policy for this site and confirm that you are at least 13 years of age.";div.style.display="block";AddTop(div,"#003399","#FFFF66");AddBottom(div,"#003399","#FFFF66");xFirstChild(xFirstChild(xFirstChild(xGetElementById("new_login-pod"),"div"),"div"),"div").className=cur_tab;$('new_login_dlg').style.top=xTop($('new_login_dlg'))-xHeight(div)+"px";operaRefresh();return;}
if(document.registerform.wpGetNewsletter.checked)
wpGetNewsletter=1;else
wpGetNewsletter=0;var returnto=document.registerform.returnto.value;var url=location.protocol+"//"+location.host+"/Q/Special:Userlogin";var data="action=submit&"+"wpName="+wpName+"&"+"wpPassword="+wpPassword+"&"+"wpRetype="+wpRetype+"&"+"wpEmail="+wpEmail+"&"+"wpRemember=0&"+"wpGetNewsletter="+wpGetNewsletter+"&"+"returnto="+URLEncodeEmail(window.location.href)+"&"+"wpCreateaccount=1&"+"error_type=pod&"+"ac="+GET_DATA['action'];if(location.pathname.indexOf("waAn=1")>0||location.pathname.indexOf("waAn=2")>0||(typeof action!="undefined"&&(action.indexOf("action=watch")>-1||action=="javascript:getUpdates(isWatched);")))
data+="&addToWatch=1";if(GET_DATA['wpNewq']=="1"){data+="&wpNewq=1";}
xmlHTTP.open("POST",url,false);xmlHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHTTP.send(data);var resp=xmlHTTP.responseText.trim();if(resp.indexOf('ERROR:')==0){var div=document.getElementById("login-error");$('new_login_dlg').style.top=xTop($('new_login_dlg'))+xHeight(div)+"px";div.style.color="#000000";div.style.background="#FFFF66";div.style.marginBottom="10px";div.innerHTML=resp.substr(6);div.style.display="block";AddTop(div,"#003399","#FFFF66");AddBottom(div,"#003399","#FFFF66");xFirstChild(xFirstChild(xFirstChild(xGetElementById("new_login-pod"),"div"),"div"),"div").className=cur_tab;$('new_login_dlg').style.top=xTop($('new_login_dlg'))-xHeight(div)+"px";operaRefresh();error_mess=resp.substr(6);error_mess=error_mess.replace(/[^A-Za-z ]/i,"");cv=_hbEvent(cv);_hbSet("cv.c1","LogInNo|"+error_mess.replace(/[ ]/i,"+"));_hbLink("Errors");}else{updateHBXReg();if(resp.indexOf('OK:NOACT:')==0){window.location.href=resp.substr(9);}
else{window.location.href='/Q/Special:ActivateUser';}}}};old_showTooltip=showTooltip;}
function new_login_close(){Event.stopObserving(window,"scroll",stopWindowScroll,false);if(document.addEventListener){xModalDialog.grey.removeEventListener("mousewheel",stopScroll,false);xModalDialog.grey.removeEventListener("DOMMouseScroll",stopScroll,false);$('new_login_dlg').removeEventListener("mousewheel",stopScroll,false);$('new_login_dlg').removeEventListener("DOMMouseScroll",stopScroll,false);}
else if(document.attachEvent){xModalDialog.grey.detachEvent("onmousewheel",stopScroll);$('new_login_dlg').detachEvent("onmousewheel",stopScroll);}
xGetElementById('new_login_dlg_close').parentNode.style.visibility='hidden';xAniLine(xGetElementById("new_login-pod"),(getposOffset(xGetElementById("left-pod-top"),"left")+1-getposOffset(xGetElementById("new_login_dlg"),"left")),(getposOffset(xGetElementById("left-pod-top"),"top")+1-getposOffset(xGetElementById("new_login_dlg"),"top")),800,2,function(){});setTimeout("new_login_close_act();",800);}
function new_login_close_act(){xGetElementById('logging_in').style.textAlign="left";xGetElementById('register-pod').style.paddingTop="0px";xFirstChild(document.forms['loginform'],"div").style.paddingBottom="0px";xFirstChild(document.forms['registerform'],"div").style.paddingBottom="0px";xGetElementById("user-pod").style.paddingTop="5px";if(xFirstChild(document.forms['registerform'],"img"))
xFirstChild(document.forms['registerform'],"img").style.zIndex="-1";xGetElementById("login-error").style.marginBottom="13px";xGetElementById("login-error").style.marginLeft="2px";var children=xGetElementById("user-pod").childNodes;for(var i=children.length-1;i>=0;i--){if(children[i]&&children[i].tagName&&children[i].tagName.toLowerCase()=="div"&&children[i].id!="login-pod"&&children[i].id!="register-pod")
xGetElementById("user-pod").removeChild(children[i]);}
xGetElementById("user-pod").style.width="";xGetElementById("user-pod").style.marginTop="";xGetElementById("user-pod").style.marginBottom="";xGetElementById("user-pod").style.marginLeft="";xGetElementById("user-pod").style.border="";xGetElementById("user-pod").style.backgroundColor="";xGetElementById("user-pod").style.zIndex="";xGetElementById("user-pod").style.padding="0px";login_pod=xGetElementById("user-pod");xGetElementById("new_login-pod").removeChild(xFirstChild(xGetElementById("new_login-pod"),"div"));xGetElementById("logging_in").parentNode.removeChild(xGetElementById("logging_in"));xGetElementById("left-pod-bottom").style.marginTop="";xGetElementById("left-pod-top").insertAdjacentElement("afterEnd",login_pod);browserName=navigator.appName;if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=" ttip";}
if(xModalDialog.instances['new_login_dlg'])
xModalDialog.instances['new_login_dlg'].hide();registerLoginManager=old_registerLoginManager;dologin=old_dologin;doregister=old_doregister;showTooltip=old_showTooltip;link_redirect=false;resetFormError();}
function successfullyLoggedIn(resp){if(link_redirect==true){if(action.charAt(0)=='/'){base=document.getElementsByTagName('base');if(base&&base[0]&&base[0].href.length>0){baseref=base[0].href;if(baseref.indexOf('http')==0){baseHost=baseref.substr(0,baseref.indexOf('/',7));action=baseHost+action;}}}
setTimeout("window.location='"+action+"'",1);return;}
if(resp!="")
new_login_close();menu=resp;setTimeout("if(menu != \"\") { var div = document.getElementById(\"user-pod\"); div.innerHTML = menu; } if(typeof(navGo) != 'undefined') navGo(((typeof search_page != 'undefined') ? search_page : 0), true, 'getBatchRecat');",1000);}
function checkLogin(){var url=location.protocol+'//'+location.host+'/Q/Special:CheckLogin';var xmlHTTP=getXMLHTTP();initialiseGetData();if(xmlHTTP){xmlHTTP.open("POST",url,false);xmlHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHTTP.send("");var resp=xmlHTTP.responseText.trim();if(resp.indexOf('OK:')==0){if(resp.substr(3)=="1"){return true;}
else{return false;}}
else{return false;}}
else{alert("Your browser is not supported.\n\nPlease upgrade in order to use this function.");return false;}}
var stopScroll=function(event){event=event?event:window.event;if(event.stopPropagation)
event.stopPropagation();if(event.preventDefault)
event.preventDefault();event.cancelBubble=true;event.cancel=true;event.returnValue=false;return false;};var stopWindowScroll=function(event){if(window.document.documentElement&&xDef(window.document.documentElement.scrollTop)&&(!navigator.vendor||!navigator.vendor.match(/apple/i))){window.document.documentElement.scrollTop=cur_scroll_y;window.document.documentElement.scrollLeft=cur_scroll_x;}
else if((window.document.body&&xDef(window.document.body.scrollTop))||(navigator.vendor&&navigator.vendor.match(/apple/i))){window.document.body.scrollTop=cur_scroll_y;window.document.body.scrollLeft=cur_scroll_x;}
stopScroll(event);};function resetFormError(){var div=document.getElementById("login-error");div.style.display="none";}
Fadomatic.INTERVAL_MILLIS=50;function Fadomatic(element,rate,initialOpacity,minOpacity,maxOpacity){this._element=element;this._intervalId=null;this._rate=rate;this._isFadeOut=true;this._minOpacity=0;this._maxOpacity=99;this._opacity=99;if(typeof minOpacity!='undefined'){if(minOpacity<0){this._minOpacity=0;}else if(minOpacity>99){this._minOpacity=99;}else{this._minOpacity=minOpacity;}}
if(typeof maxOpacity!='undefined'){if(maxOpacity<0){this._maxOpacity=0;}else if(maxOpacity>99){this._maxOpacity=99;}else{this._maxOpacity=maxOpacity;}
if(this._maxOpacity<this._minOpacity){this._maxOpacity=this._minOpacity;}}
if(typeof initialOpacity!='undefined'){if(initialOpacity>this._maxOpacity){this._opacity=this._maxOpacity;}else if(initialOpacity<this._minOpacity){this._opacity=this._minOpacity;}else{this._opacity=initialOpacity;}}
if(element&&typeof element.style.opacity!='undefined'){this._updateOpacity=this._updateOpacityW3c;}else if(element&&typeof element.style.filter!='undefined'){if(element.style.filter.indexOf("alpha")==-1){var existingFilters="";if(element.style.filter){existingFilters=element.style.filter+" ";}
element.style.filter=existingFilters+"alpha(opacity="+this._opacity+")";}
this._updateOpacity=this._updateOpacityMSIE;}else{this._updateOpacity=this._updateVisibility;}
this._updateOpacity();}
Fadomatic.prototype.fadeOut=function(){this._isFadeOut=true;this._beginFade();}
Fadomatic.prototype.fadeIn=function(){this._isFadeOut=false;this._beginFade();}
Fadomatic.prototype.show=function(){this.haltFade();this._opacity=this._maxOpacity;this._updateOpacity();}
Fadomatic.prototype.hide=function(){this.haltFade();this._opacity=0;this._updateOpacity();}
Fadomatic.prototype.haltFade=function(){clearInterval(this._intervalId);}
Fadomatic.prototype.resumeFade=function(){this._beginFade();}
Fadomatic.prototype._beginFade=function(){this.haltFade();var objref=this;this._intervalId=setInterval(function(){objref._tickFade();},Fadomatic.INTERVAL_MILLIS);}
Fadomatic.prototype._tickFade=function(){if(this._isFadeOut){this._opacity-=this._rate;if(this._opacity<this._minOpacity){this._opacity=this._minOpacity;this.haltFade();}}else{this._opacity+=this._rate;if(this._opacity>this._maxOpacity){this._opacity=this._maxOpacity;this.haltFade();}}
this._updateOpacity();}
Fadomatic.prototype._updateVisibility=function(){if(this._opacity>0){this._element.style.visibility='visible';}else{this._element.style.visibility='hidden';}}
Fadomatic.prototype._updateOpacityW3c=function(){this._element.style.opacity=this._opacity/100;this._updateVisibility();}
Fadomatic.prototype._updateOpacityMSIE=function(){this._element.filters.alpha.opacity=this._opacity;this._updateVisibility();}
Fadomatic.prototype._updateOpacity=null;function xGetElementById(e)
{if(typeof(e)=='string'){if(document.getElementById)e=document.getElementById(e);else if(document.all)e=document.all[e];else e=null;}
return e;}
function xMoveTo(e,x,y)
{xLeft(e,x);xTop(e,y);}
function xResizeTo(e,w,h)
{xWidth(e,w);xHeight(e,h);}
function xScrollLeft(e,bWin)
{var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollLeft)offset=w.document.documentElement.scrollLeft;else if(w.document.body&&xDef(w.document.body.scrollLeft))offset=w.document.body.scrollLeft;}
else{e=xGetElementById(e);if(e&&xNum(e.scrollLeft))offset=e.scrollLeft;}
return offset;}
function xScrollTop(e,bWin)
{var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollTop)offset=w.document.documentElement.scrollTop;else if(w.document.body&&xDef(w.document.body.scrollTop))offset=w.document.body.scrollTop;}
else{e=xGetElementById(e);if(e&&xNum(e.scrollTop))offset=e.scrollTop;}
return offset;}
function xClientWidth()
{var v=0,d=document,w=window;if((!d.compatMode||d.compatMode=='CSS1Compat')&&!w.opera&&d.documentElement&&d.documentElement.clientWidth)
{v=d.documentElement.clientWidth;}
else if(d.body&&d.body.clientWidth)
{v=d.body.clientWidth;}
else if(xDef(w.innerWidth,w.innerHeight,d.height)){v=w.innerWidth;if(d.height>w.innerHeight)v-=16;}
return v;}
function xClientHeight()
{var v=0,d=document,w=window;if((!d.compatMode||d.compatMode=='CSS1Compat')&&!w.opera&&d.documentElement&&d.documentElement.clientHeight)
{v=d.documentElement.clientHeight;}
else if(d.body&&d.body.clientHeight)
{v=d.body.clientHeight;}
else if(xDef(w.innerWidth,w.innerHeight,d.width)){v=w.innerHeight;if(d.width>w.innerWidth)v-=16;}
return v;}
function xNum()
{for(var i=0;i<arguments.length;++i){if(isNaN(arguments[i])||typeof(arguments[i])!='number')return false;}
return true;}
function xDef()
{for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}
return true;}
function xWidth(e,w)
{if(!(e=xGetElementById(e)))return 0;if(xNum(w)){if(w<0)w=0;else w=Math.round(w);}
else w=-1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){w=xClientWidth();}
else if(css&&xDef(e.offsetWidth)&&xStr(e.style.width)){if(w>=0){var pl=0,pr=0,bl=0,br=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pl=gcs(e,'padding-left',1);if(pl!==null){pr=gcs(e,'padding-right',1);bl=gcs(e,'border-left-width',1);br=gcs(e,'border-right-width',1);}
else if(xDef(e.offsetWidth,e.style.width)){e.style.width=w+'px';pl=e.offsetWidth-w;}}
w-=(pl+pr+bl+br);if(isNaN(w)||w<0)return;else e.style.width=w+'px';}
w=e.offsetWidth;}
else if(css&&xDef(e.style.pixelWidth)){if(w>=0)e.style.pixelWidth=w;w=e.style.pixelWidth;}
return w;}
function xHeight(e,h)
{if(!(e=xGetElementById(e)))return 0;if(xNum(h)){if(h<0)h=0;else h=Math.round(h);}
else h=-1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){h=xClientHeight();}
else if(css&&xDef(e.offsetHeight)&&xStr(e.style.height)){if(h>=0){var pt=0,pb=0,bt=0,bb=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pt=gcs(e,'padding-top',1);if(pt!==null){pb=gcs(e,'padding-bottom',1);bt=gcs(e,'border-top-width',1);bb=gcs(e,'border-bottom-width',1);}
else if(xDef(e.offsetHeight,e.style.height)){e.style.height=h+'px';pt=e.offsetHeight-h;}}
h-=(pt+pb+bt+bb);if(isNaN(h)||h<0)return;else e.style.height=h+'px';}
h=e.offsetHeight;}
else if(css&&xDef(e.style.pixelHeight)){if(h>=0)e.style.pixelHeight=h;h=e.style.pixelHeight;}
return h;}
function xTop(e,iY)
{if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.top)){if(xNum(iY))e.style.top=iY+'px';else{iY=parseInt(e.style.top);if(isNaN(iY))iY=xGetComputedStyle(e,'top',1);if(isNaN(iY))iY=0;}}
else if(css&&xDef(e.style.pixelTop)){if(xNum(iY))e.style.pixelTop=iY;else iY=e.style.pixelTop;}
return iY;}
function xLeft(e,iX)
{if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.left)){if(xNum(iX))e.style.left=iX+'px';else{iX=parseInt(e.style.left);if(isNaN(iX))iX=xGetComputedStyle(e,'left',1);if(isNaN(iX))iX=0;}}
else if(css&&xDef(e.style.pixelLeft)){if(xNum(iX))e.style.pixelLeft=iX;else iX=e.style.pixelLeft;}
return iX;}
function xStr(s)
{for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='string')return false;}
return true;}
function xGetComputedStyle(e,p,i)
{if(!(e=xGetElementById(e)))return null;var s,v='undefined',dv=document.defaultView;if(dv&&dv.getComputedStyle){s=dv.getComputedStyle(e,'');if(s)v=s.getPropertyValue(p);}
else if(e.currentStyle){v=e.currentStyle[xCamelize(p)];}
else return null;return i?(parseInt(v)||0):v;}
function xCamelize(cssPropStr)
{var i,c,a=cssPropStr.split('-');var s=a[0];for(i=1;i<a.length;++i){c=a[i].charAt(0);s+=a[i].replace(c,c.toUpperCase());}
return s;}
function xDocSize()
{var b=document.body,e=document.documentElement;var esw=0,eow=0,bsw=0,bow=0,esh=0,eoh=0,bsh=0,boh=0;if(e){esw=e.scrollWidth;eow=e.offsetWidth;esh=e.scrollHeight;eoh=e.offsetHeight;}
if(b){bsw=b.scrollWidth;bow=b.offsetWidth;bsh=b.scrollHeight;boh=b.offsetHeight;}
return{w:Math.max(esw,eow,bsw,bow),h:Math.max(esh,eoh,bsh,boh)};}
function getScrollBarWidth(){var inner=document.createElement("p");inner.style.width="100%";inner.style.height="200px";var outer=document.createElement("div");outer.style.position="absolute";outer.style.top="0px";outer.style.left="0px";outer.style.visibility="hidden";outer.style.width="200px";outer.style.height="150px";outer.style.overflow="hidden";outer.appendChild(inner);document.body.appendChild(outer);var w1=inner.offsetWidth;outer.style.overflow="scroll";var w2=inner.offsetWidth;if(w1==w2)w2=outer.clientWidth;document.body.removeChild(outer);return(w1-w2);};function xModalDialog(sDialogId)
{this.dialog=xGetElementById(sDialogId);xModalDialog.instances[sDialogId]=this;var e=xModalDialog.grey;if(!e){e=document.createElement('div');e.id='xModalDialogGreyElement';e.className='xModalDialogGreyElement';xModalDialog.grey=document.body.appendChild(e);}}
function fixModalGrey(){var ds,e=xModalDialog.grey;if(e){ds=xDocSize();xMoveTo(e,0,-20+xScrollTop());xResizeTo(e,ds.w+50,xClientHeight()+50);}}
xModalDialog.prototype.show=function()
{var ds,e=xModalDialog.grey;if(e){if(!(navigator.userAgent.match(/Firefox\/[12]{1}\./i)))
$('container').style.paddingRight=""+getScrollBarWidth()+"px";if(navigator.userAgent.match(/Firefox\/[2]{1}\./i)){document.body.style.overflowX='hidden';}
else{document.body.style.overflow="hidden";}
if(xDef(document.documentElement)&&!(navigator.userAgent.match(/Firefox\/[12]{1}\./i))){document.documentElement.style.overflow="hidden";}
document.body.style.width="auto";this.dialog.greyZIndex=xGetComputedStyle(e,'z-index',1);e.style.zIndex=xGetComputedStyle(this.dialog,'z-index',1)-1;ds=xDocSize();xMoveTo(e,0,-20+xScrollTop());xResizeTo(e,xClientWidth()+50,xClientHeight()+50);if(this.dialog){xMoveTo(this.dialog,xScrollLeft()+(xClientWidth()-this.dialog.offsetWidth)/2,xScrollTop()+(xClientHeight()-this.dialog.offsetHeight)/2);}
Event.observe(window,'resize',fixModalGrey,false);if($("container")){if(document.viewport.getHeight()>$("container").getHeight()){$("container").setStyle({height:(document.viewport.getHeight()-32)+"px"});}}}};xModalDialog.prototype.hide=function(dialogOnly)
{var e=xModalDialog.grey;if(e){var cur_br_tt_scroll_top=0;if($('br_tt'))
cur_br_tt_scroll_top=parseInt(xScrollTop($('br_tt')));$('container').style.paddingRight="0px";if(!xDef(document.documentElement)||!(navigator.userAgent.match(/Firefox\/[123]{1}\./i))){document.body.style.overflow="visible";}
if(xDef(document.documentElement)){document.documentElement.style.overflow="auto";}
document.body.style.width=xClientWidth()+"px";if($('br_tt'))
$('br_tt').scrollTop=cur_br_tt_scroll_top;var agt=navigator.userAgent.toLowerCase();if(agt.indexOf("safari")!=-1)
document.body.style.width=(xClientWidth()-getScrollBarWidth())+"px";if(!dialogOnly){xResizeTo(e,10,10);xMoveTo(e,-10,-10);}
if(this&&this.dialog){e.style.zIndex=this.dialog.greyZIndex;xMoveTo(this.dialog,-this.dialog.offsetWidth,0);}
Event.stopObserving(window,'resize',fixModalGrey);if($("container")){$("container").setStyle({height:"auto"});}}};xModalDialog.grey=null;xModalDialog.instances={};function xFirstChild(e,t)
{e=xGetElementById(e);var c=e?e.firstChild:null;while(c){if(c.nodeType==1&&(!t||c.nodeName.toLowerCase()==t.toLowerCase())){break;}
c=c.nextSibling;}
return c;}
function xAniLine(e,x,y,t,a,oe)
{if(!(e=xGetElementById(e)))return;var x0=xLeft(e),y0=xTop(e);x=Math.round(x);y=Math.round(y);var dx=x-x0,dy=y-y0;var fq=1/t;if(a)fq*=(Math.PI/2);var t0=new Date().getTime();var tmr=setInterval(function(){var et=new Date().getTime()-t0;if(et<t){var f=et*fq;if(a==1)f=Math.sin(f);else if(a==2)f=1-Math.cos(f);f=Math.abs(f);e.style.left=Math.round(f*dx+x0)+'px';e.style.top=Math.round(f*dy+y0)+'px';}
else{clearInterval(tmr);e.style.left=x+'px';e.style.top=y+'px';if(typeof oe=='function')oe();else if(typeof oe=='string')eval(oe);}},10);}
function xCreateDiv(s,c,id)
{var div=document.createElement("div");if(xDef(id)&&id)
div.id=id;if(xDef(c)&&c)
div.className=c;if(xDef(s)&&s)
$(div).setStyle(s);return div;}
function xPreventDefault(e)
{if(e&&e.preventDefault)e.preventDefault();else if(window.event)window.event.returnValue=false;}
function xEvent(evt)
{var e=evt||window.event;if(!e)return;this.type=e.type;this.target=e.target||e.srcElement;this.relatedTarget=e.relatedTarget;if(xDef(e.pageX)){this.pageX=e.pageX;this.pageY=e.pageY;}
else if(xDef(e.clientX)){this.pageX=e.clientX+xScrollLeft();this.pageY=e.clientY+xScrollTop();}
if(xDef(e.offsetX)){this.offsetX=e.offsetX;this.offsetY=e.offsetY;}
else if(xDef(e.layerX)){this.offsetX=e.layerX;this.offsetY=e.layerY;}
else{this.offsetX=this.pageX-xPageX(this.target);this.offsetY=this.pageY-xPageY(this.target);}
this.keyCode=e.keyCode||e.which||0;this.shiftKey=e.shiftKey;this.ctrlKey=e.ctrlKey;this.altKey=e.altKey;if(typeof e.type=='string'){if(e.type.indexOf('click')!=-1){this.button=0;}
else if(e.type.indexOf('mouse')!=-1){this.button=e.button;}}}
function xPageX(e)
{var x=0;e=xGetElementById(e);while(e){if(xDef(e.offsetLeft))x+=e.offsetLeft;e=xDef(e.offsetParent)?e.offsetParent:null;}
return x;}
function xPageY(e)
{var y=0;e=xGetElementById(e);while(e){if(xDef(e.offsetTop))y+=e.offsetTop;e=xDef(e.offsetParent)?e.offsetParent:null;}
return y;}
function xRemoveEventListener(e,eT,eL,cap)
{if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if(e.removeEventListener)e.removeEventListener(eT,eL,cap||false);else if(e.detachEvent)e.detachEvent('on'+eT,eL);else e['on'+eT]=null;}
function xAddEventListener(e,eT,eL,cap)
{if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if(e.addEventListener)e.addEventListener(eT,eL,cap||false);else if(e.attachEvent)e.attachEvent('on'+eT,eL);else{var o=e['on'+eT];e['on'+eT]=typeof o=='function'?function(v){o(v);eL(v);}:eL;}}
function xEnableDrag(id,fS,fD,fE)
{var mx=0,my=0,el=xGetElementById(id);if(el){el.xDragEnabled=true;xAddEventListener(el,'mousedown',dragStart,false);}
function dragStart(e)
{if(el.xDragEnabled){var ev=new xEvent(e);xPreventDefault(e);mx=ev.pageX;my=ev.pageY;xAddEventListener(document,'mousemove',drag,false);xAddEventListener(document,'mouseup',dragEnd,false);if(fS){fS(el,ev.pageX,ev.pageY,ev);}}}
function drag(e)
{var ev,dx,dy;xPreventDefault(e);ev=new xEvent(e);dx=ev.pageX-mx;dy=ev.pageY-my;mx=ev.pageX;my=ev.pageY;if(fD){fD(el,dx,dy,ev);}
else{xMoveTo(el,xLeft(el)+dx,xTop(el)+dy);}}
function dragEnd(e)
{var ev=new xEvent(e);xPreventDefault(e);xRemoveEventListener(document,'mouseup',dragEnd,false);xRemoveEventListener(document,'mousemove',drag,false);if(fE){fE(el,ev.pageX,ev.pageY,ev);}
if(xEnableDrag.drop){xEnableDrag.drop(el,ev);}}}
xEnableDrag.drops=[];function disableScrollerOnModal(modal){cur_scroll_y=xScrollTop();cur_scroll_x=xScrollLeft();var e1=(xModalDialog&&xModalDialog.grey)?xModalDialog.grey:null;var e2=(modal&&modal.up())?modal.up():null;if(document.addEventListener&&e1){e1.addEventListener("mousewheel",checkScroll,false);e1.addEventListener("DOMMouseScroll",checkScroll,false);if(e2){e2.addEventListener("mousewheel",checkScroll,false);e2.addEventListener("DOMMouseScroll",checkScroll,false);}}
else if(document.attachEvent&&e1){e1.attachEvent("onmousewheel",checkScroll);if(e2)
e2.attachEvent("onmousewheel",checkScroll);}
Event.observe(window,"scroll",stopWindowScroll,false);}
function enableScrollerAfterModal(){Event.stopObserving(window,"scroll",stopWindowScroll,false);var e1=(xModalDialog&&xModalDialog.grey)?xModalDialog.grey:null;if(document.addEventListener&&e1){e1.removeEventListener("mousewheel",checkScroll,false);e1.removeEventListener("DOMMouseScroll",checkScroll,false);}
else if(document.attachEvent&&e1){e1.detachEvent("onmousewheel",checkScroll);}
if(e1)
xModalDialog.prototype.hide();}
function resizeButtonsGroup(pdiv){var btns=pdiv.select("a.btn");if(btns.length>1){biggest_btn_width=0;btns.each(function(btn){var cur_btn_width=btn.down().down().down().getWidth();if(cur_btn_width>biggest_btn_width)
biggest_btn_width=cur_btn_width;});btns.each(function(btn){var cur_btn_width=btn.down().down().down().getWidth();if(cur_btn_width<biggest_btn_width){var diff=((biggest_btn_width-cur_btn_width)/2).round();var imgs=btn.down().down().down().select("input");imgs[0].setStyle({width:(1+diff)+"px"});imgs[1].setStyle({width:(1+diff)+"px"});}});}}
Element.addMethods('A',{enableBtn:function(element){element=$(element);element.removeClassName('grey');},disableBtn:function(element){element=$(element);element.addClassName('grey');},submitBtn:function(element){element=$(element);element.ancestors().each(function(p){if($(p).match('form')){if($(p).onsubmit&&typeof($(p).onsubmit)=='function'){$(p).originalonsubmit=$(p).onsubmit;$(p).onsubmit=null;$(p).originalsubmit=$(p).submit;$(p).submit=function(){if(this.originalonsubmit())
this.originalsubmit();this.onsubmit=this.originalonsubmit;this.originalonsubmit=null;};}
$(p).submit();if($(p).originalsubmit&&(typeof($(p).originalsubmit)=='function'||typeof($(p).originalsubmit)=='object')){$(p).submit=$(p).originalsubmit;$(p).originalsubmit=null;}
throw $break;}});},isDisabledBtn:function(element){element=$(element);if(element.className.match(/grey/))
return true;else
return false;},replaceTextBtn:function(element,text){element=$(element);element.select("font font")[0].innerHTML=text;},replaceImgBtn:function(element,img){element=$(element);if(element.select("img").count>0)
element.select("img")[0].src=img;},replaceLinkBtn:function(element,url){element=$(element);element.href=url;},replaceActionBtn:function(element,func){element=$(element);element.onclick=new Function("if(!$(this).isDisabledBtn()) { "+func+" } else { xPreventDefault(); return false; }");},replaceAltBtn:function(element,alt){element=$(element);element.alt=alt;element.setAttribute("alt",alt);element.title=alt;element.setAttribute("title",alt);},fixDownBtn:function(element){element=$(element);ButtonMouseDown(element);element.oldonmouseout=element.onmouseout;element.oldonmouseup=element.onmouseup;element.onmouseout=element.onmouseup=function(){void(0);};},releaseDownBtn:function(element){element=$(element);ButtonMouseUp(element);if(element.oldonmouseout&&Object.isFunction(element.oldonmouseout))
element.onmouseout=element.oldonmouseout;if(element.oldonmouseup&&Object.isFunction(element.oldonmouseup))
element.onmouseup=element.oldonmouseup;},getBtnWidth:function(element){element=$(element);return element.getDimensions().width;},getBtnHeight:function(element){element=$(element);return element.getDimensions().height;}});function disableNewButtons(formobj){var buttons=$(formobj).select('a.btn');buttons.each(function(button){button.disableBtn();});if(formobj.getAttribute('isAlreadyClicked')!=null&&formobj.getAttribute('isAlreadyClicked')!='undefined'&&formobj.getAttribute('isAlreadyClicked')!='1'){return false;}
else{formobj.setAttribute('isAlreadyClicked','1');return true;}}
function enableNewButtons(formobj){var buttons=$(formobj).select('a.btn');buttons.each(function(button){button.enableBtn();});if(formobj.getAttribute('isAlreadyClicked')!=null&&formobj.getAttribute('isAlreadyClicked')!='undefined'&&formobj.getAttribute('isAlreadyClicked')!='1'){formobj.setAttribute('isAlreadyClicked','1');return true;}
else{return false;}}
captcha_finished=false;function JwgData(){this.articleData=new ArticleData();this.config=new ConfigData();}
function ArticleData(){}
function ConfigData(){}
VANDAL_PATROL_HOST="/help/vandal_patrol";var verifyErase=false;placeCursorToAskAns=true;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};function goAnswersCom(f_el){var query=f_el.srchans?f_el.srchans.value:f_el.value;if(!query||query.trim()=='')
return false;window.open("http://www.answers.com/"+query,"mywindow","menubar=1,resizable=1,width=600px,height=600px,scrollbars=yes,location=1");}
function URLEncode(url_to_encode)
{var NONSAFECHARS="'\"&,!#$%^*:|\\/><~;";var plaintext=url_to_encode;var encoded="";for(var i=0;i<plaintext.length;i++){var ch=plaintext.charAt(i);if(ch==" "){encoded+="+";}else if(NONSAFECHARS.indexOf(ch)==-1){encoded+=ch;}}
return encoded;};function sendToFriend(pod,userid,plpos,isAnswered,returnto,needsans_num,failedURL){if(pod){_hbLink('SendQ',plpos);}
else if(isAnswered){_hbLink('SendQ',((userid==null||userid==0)?"NotLgd_":"Lgd_")+"UnAnsQPg_WTC");}
var url="/Q/Special:SendToFriend";var data="action=submit&"+"jsonly=1&"+"tq="+returnto+"&"+"tn="+needsans_num;eval(sendAjax(url,data,failedURL+"&action=sendToFriend&ansq=0"));}
function URLEncodeEmail(plaintext)
{var SAFECHARS="0123456789"+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"-_.!~*'()";var HEX="0123456789ABCDEF";var encoded="";for(var i=0;i<plaintext.length;i++){var ch=plaintext.charAt(i);if(ch==" "){encoded+="+";}else if(SAFECHARS.indexOf(ch)!=-1){encoded+=ch;}else{var charCode=ch.charCodeAt(0);if(charCode>255){encoded+="+";}else{encoded+="%";encoded+=HEX.charAt((charCode>>4)&0xF);encoded+=HEX.charAt(charCode&0xF);}}}
return encoded;}
var linkFormHasFocus=false;var curDomain=0;var curRating=0;var ratingString='';var ratings=new Array();var links=new Array();function setDomainVariables(_ratings,_links,_ratingString){ratings=_ratings;links=_links;ratingString=_ratingString;setCurSelection('0');}
function getRatings(){return ratings;}
function setCurSelection(val){if(val!=null)
curDomain=val;else
curDomain=$('urlSelect').selectedIndex;curRating=ratings[curDomain];$('selectForm').wpRating[curRating].checked=true;}
function setRating(val){var cnt=ratings.length;curDomain=$('urlSelect').selectedIndex;ratings[curDomain]=val;$('wpRatings').value=ratings.toString();}
function addLinkFormListener(){var browserName=navigator.appName;if(browserName=="Microsoft Internet Explorer"){document.body.attachEvent('onclick',inactivateLinkForm);}
else{document.body.addEventListener('click',inactivateLinkForm,false);}}
function removeLinkFormListener(){var browserName=navigator.appName;if(browserName=="Microsoft Internet Explorer")
document.body.detachEvent('onclick',inactivateLinkForm);else
document.body.removeEventListener('click',inactivateLinkForm,false);}
function inactivateLinkForm(){if($('url_form_popup')&&!linkFormHasFocus){domainFormReset();}}
function editDomain(elm,urldomain){var div=document.getElementById(elm);var returnto=document.loginform.returnto.value;addLinkFormListener();if($('url_form_popup'))return;if(!div)return;pnode=document.createElement("div");pnode.id="url_form_popup";pnode.style.clear="both";pnode.style.position="fixed";snode=document.createElement("div");var url="/Q/Special:EditDomain";var data="url="+URLEncodeEmail(urldomain)+"&returnto="+returnto+"&action=rate";var resp=sendAjax(url,data,"");if(resp.length>0){snode.innerHTML=resp;snode.style.background="#ffffff";snode.style.zIndex="111";snode.style.margin="0px 0px 0px 0px";if(!isIE6())
snode.style.position="relative";pnode.style.visibility="visible";pnode.style.left="40%";pnode.style.top="30%";pnode.style.padding="0px";if(isIE6()){window.onload=fixFloatElement;window.onresize=fixFloatElement;window.onscroll=fixFloatElement;}
pnode.appendChild(snode);div.appendChild(pnode);RoundStatus();operaRefresh();ratings=$('wpRatings').value.toArray();ratingString=$('ratingString').value;links=new Array($('wpLinks').value);}}
function sendDomainData(){removeLinkFormListener();var returnto=document.loginform.returnto.value;var wpRatings=ratings.toString();var wpLinks=$('wpLinks').value;var url="/Q/Special:EditDomain";var data="wpRatings="+URLEncodeEmail(wpRatings)+"&wpLinks="+URLEncodeEmail(wpLinks)+"&returnto="+URLEncodeEmail(returnto)+"&action=submit";var resp=sendAjax(url,data,"");}
function domainFormReset(){removeLinkFormListener();var tobj=$('question_tools');if(tobj!=null)tobj.style.visibility="visible";tobj=$('preFooter');if(tobj!=null)tobj.style.margin="0 0 0 0";$('url_form_popup').style.visibility='hidden';tar=$('url_form_popup');tar.parentNode.removeChild($('url_form_popup'));}
function getClientHeight(){return typeof(window.innerHeight)!=="undefined"?window.innerHeight:document.documentElement.clientHeight;}
function fixFloatElement(){var offset=getClientHeight();if(document.getElementById('url_form_popup')){var footer=document.getElementById('url_form_popup');var main=document.getElementById('container');footer.style.position='absolute';footer.style.top=(document.documentElement.scrollTop+offset-footer.offsetHeight)+'px';main.style.marginBottom=footer.offsetHeight+'px';footer.style.display='block';}}
function getMoreQuestions(aid,tid){var url="/Q/Special:UnAnsweredQ"+"&action=canAnsThese&"+"ajax=1&"+"aid="+aid+"&"+"tid="+tid;new Ajax.Request(url,{parameters:"",onSuccess:function(transport){$('moreQsList').innerHTML=transport.responseText;},onException:function(requester,except){alertBrowserError();}});}
var niCurrentStateArray=null;listpics2=new Array(''+wgStaticFilesServer+'/templates/icons/x.gif');imagePreload2=new ImagePreloader(listpics2);function buildNIPopup(returnto_nons,userWSSStatus){var init_size={x:400,y:''};popup_elem.buildModal("ni_popup",init_size.x,init_size.y);var ecsapedRN=returnto_nons.replace(/\'/g,"\\'");var niformtext=''+'<form name="needsImprovement" id="needsImprovementID" style="margin:0px;"><div style="clear:both;text-align:left;">'+'<input id="ni_1" type="checkbox"  name="ni[]" value="1">&nbsp;needs spelling/grammar cleanup<br>'+'<input id="ni_2" type="checkbox"  name="ni[]" value="1">&nbsp;needs more detail<br>'+'<input id="ni_3" type="checkbox"  name="ni[]" value="1">&nbsp;is repetitive or poorly structured<br>'+'<input id="ni_5" type="checkbox"  name="ni[]" value="1">&nbsp;is one-sided<br>'+'<input id="ni_6" type="checkbox"  name="ni[]" value="1">&nbsp;is inflammatory/offensive or contains bad language<br>'+'<input id="ni_7" type="checkbox"  name="ni[]" value="1">&nbsp;contains phone number or web address<br>'+'<div id="comments">Comments:</div>'+'<textarea style="margin-left:5px;color:grey;height:50px;" id="ni_other" name="ni_other" cols="40" onKeyDown="textCounter1(this,document.getElementById(\'counter\'),80);" onKeyUp="textCounter1(this,document.getElementById(\'counter\'),80);" wrap="hard"  onmouseover=\'$("ni_popup").xDragEnabled = false;\' onmousemove=\'$("ni_popup").xDragEnabled = false;\' onmouseout=\'$("ni_popup").xDragEnabled = true;\'></textarea></br>'+'<div style="float:left;width:100%;height:65px"><div id="counter" style="height:15px;font-size:11px;margin-left:4px;"></div><div style="margin-left:4px;text-align:left;" id="msgID"></div></div>'+'<div style="text-align:center;"><a class=\'btn std\' href=\'javascript:void(0);\' onmousedown="ButtonMouseDown(this);" onmouseup="ButtonMouseUp(this);" onmouseout="ButtonMouseUp(this); $(\'ni_popup\').xDragEnabled = true;" onclick="if(!$(this).isDisabledBtn()) { _hbLink(\'NI_Popup_Submit\', \''+userWSSStatus+'\'); submitNI(\'needsImprovementID\', \'/Q/Special:NeedsImprovement\', \''+ecsapedRN+'\', \'updateNIData\'); return false; } else { xPreventDefault(); return false; }" alt="Save" title="Save" onmouseover="$(\'ni_popup\').xDragEnabled = false;" onmousemove="$(\'ni_popup\').xDragEnabled = false;"><span><span><font style="white-space: nowrap;"><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"><font>&nbsp;Save&nbsp;</font><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"></font></span></span></a>'+'&nbsp;&nbsp;&nbsp;<a class=\'btn std\' href=\'javascript:void(0);\' onmousedown="ButtonMouseDown(this);" onmouseup="ButtonMouseUp(this);" onmouseout="ButtonMouseUp(this); $(\'ni_popup\').xDragEnabled = true;" onclick="if(!$(this).isDisabledBtn()) { _hbLink(\'NI_Popup_Cancel\', \''+userWSSStatus+'\'); globalHideModal(); } else { xPreventDefault(); return false; }" alt="Cancel" title="Cancel" onmouseover="$(\'ni_popup\').xDragEnabled = false;" onmousemove="$(\'ni_popup\').xDragEnabled = false;"><span><span><font style="white-space: nowrap;"><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"><font>&nbsp;Cancel&nbsp;</font><input type="image" value="" src="http://site1.wikianswers.com/templates/images/blank.gif" style="display: inline; width: 1px; height: 1px;" tabindex="-1"></font></span></span></a>'+'</div></div></form></div>';popup_elem.fill("<div id='ni_popup_DIV' style='position: absolute; left: -10000px; top: -10000px;'><table cellpadding='0' cellspacing='0' style='background: #FFFFFF; width: "+init_size.x+"px; height: "+(init_size.y-4)+"px; border: #8E8E8E 2px solid; padding: 0px; margin: 0px;'><tr><td style='text-align: center; width: "+init_size.x+"px; height: "+(init_size.y-4)+"px; vertical-align: top; padding: 0px; margin: 0px; font-size: 16px; border: 0px;'><div id='close_ni_popup_DIV' align='right' style='height: 18px;'><img src='"+wgStaticFilesServer+"/templates/icons/x.gif' style='cursor: pointer;' title='Close' alt='Close' onclick='globalHideModal();' /></div><div id='header_ni_popup_DIV' style='background-color: #EFF6D5; padding: 0px; text-align: left; width: "+(init_size.x-24)+"px; margin: 5px 10px 10px 10px;'><font style='font-size: 16px; font-weight: bold; color: #000000;'>&nbsp;This answer... </font><font style='font-size:12px;'>(select all that apply)</font></div><div id='selection_ni_popup_DIV' style='color: #000000; font-size: 13px; padding: 7px 12px 12px 12px; text-align: left;'>"+niformtext+"</div></td></tr></table></div>");var cornersObj=new curvyCorners({tl:{radius:5},tr:{radius:5},bl:{radius:5},br:{radius:5},antiAlias:true,autoPad:false},$('header_ni_popup_DIV'));cornersObj.applyCornersToAll();init_size.y=$('ni_popup_DIV').offsetHeight;init_size.x=$('ni_popup_DIV').offsetWidth;$('ni_popup').setStyle({width:init_size.x+"px",height:init_size.y+"px"});popup_elem.pw=init_size.x;popup_elem.ph=init_size.y;$('ni_popup_DIV').style.position="static";popup_elem.centralize();cur_scroll_y=xScrollTop();cur_scroll_x=xScrollLeft();if(document.addEventListener){xModalDialog.grey.addEventListener("mousewheel",checkScroll,false);xModalDialog.grey.addEventListener("DOMMouseScroll",checkScroll,false);}
else if(document.attachEvent){xModalDialog.grey.attachEvent("onmousewheel",checkScroll);}
Event.observe(window,"scroll",stopWindowScroll,false);if(!$('ni_popup').xDragEnabled)
xEnableDrag($('ni_popup'),function(ele,mouseX,mouseY,xEventObj){var targ;if(!xEventObj)var xEventObj=window.event;if(xEventObj.target)targ=xEventObj.target;else if(xEventObj.srcElement)targ=xEventObj.srcElement;if(targ.nodeType&&targ.nodeType==3)
targ=targ.parentNode;if(targ.tagName.match(/textarea|input/i))return;Event.stopObserving($('ni_popup'),"mouseover",popupCursorCheck);Event.stopObserving($('ni_popup'),"mouseout",popupCursorCheck);Event.stopObserving($('ni_popup'),"mousemove",popupCursorCheck);$('ni_popup').style.cursor="move";},function(ele,mouseDX,mouseDY,xEventObj){var targ;if(!xEventObj)var xEventObj=window.event;if(xEventObj.target)targ=xEventObj.target;else if(xEventObj.srcElement)targ=xEventObj.srcElement;if(targ.nodeType&&targ.nodeType==3)
targ=targ.parentNode;if(targ.tagName.match(/textarea|input/i))return;var x=xLeft($('ni_popup'))+mouseDX;var y=xTop($('ni_popup'))+mouseDY;$('ni_popup').style.cursor="move";xMoveTo($('ni_popup'),x,y);},function(ele,mouseX,mouseY,xEventObj){var targ;if(!xEventObj)var xEventObj=window.event;if(xEventObj.target)targ=xEventObj.target;else if(xEventObj.srcElement)targ=xEventObj.srcElement;if(targ.nodeType&&targ.nodeType==3)
targ=targ.parentNode;if(targ.tagName.match(/textarea|input/i))return;$('ni_popup').style.cursor="auto";Event.observe($('ni_popup'),"mouseover",popupCursorCheck);Event.observe($('ni_popup'),"mouseout",popupCursorCheck);Event.observe($('ni_popup'),"mousemove",popupCursorCheck);});Event.observe($('ni_popup'),"mouseover",popupCursorCheck);Event.observe($('ni_popup'),"mouseout",popupCursorCheck);Event.observe($('ni_popup'),"mousemove",popupCursorCheck);fillNIPopup();}
var popupCursorCheck=function(event){if(!event)var event=window.event;var cursor=getCursorPosition(event);var left=xLeft($('ni_popup'));var top=xTop($('ni_popup'));var height=xHeight($('ni_popup'));var width=xWidth($('ni_popup'));if(left<cursor.x&&top<cursor.y&&left+width>cursor.x&&top+height>cursor.y&&!(left+15<cursor.x&&top+15<cursor.y&&left+width-15>cursor.x&&top+height-15>cursor.y)){$('ni_popup').setStyle({cursor:"move"});}
else{$('ni_popup').setStyle({cursor:"auto"});}};var getCursorPosition=function(e){e=e||window.event;var cursor={x:0,y:0};if(e.pageX||e.pageY){cursor.x=e.pageX;cursor.y=e.pageY;}
else{var de=document.documentElement;var b=document.body;cursor.x=e.clientX+
(de.scrollLeft||b.scrollLeft)-(de.clientLeft||0);cursor.y=e.clientY+
(de.scrollTop||b.scrollTop)-(de.clientTop||0);}
return cursor;};function updateNIData(str){var niBanner=document.getElementById("niBannerID");if(niBanner!=null){niBanner.innerHTML=str;if(str.trim().length>0){niBanner.style.display="block";document.getElementById("q_answer").style.marginTop=(niBanner.offsetHeight+30)+"px";}
else{niBanner.style.display="none";document.getElementById("q_answer").style.marginTop="10px";}}}
function fillNIPopup(){var FLAG_ONE_SIDED=1;var FLAG_PHONE_WEBADRESS=2;var FLAG_GRAMMAR_SPELLCHECK=4;var FLAG_MORE_DETAIL=8;var FLAG_POORLY_STRUCTURED=16;var FLAG_INFLAMMATORY=64;var FLAG_COMMENTS=128;niCurrentStateArray=new Array();niCurrentStateArray["ni_other"]="";for(var ii=1;ii<8;ii++)
niCurrentStateArray["ni_"+ii]=false;var obj=document.getElementById("niFlags");if(obj!=null){var flags=obj.innerHTML*1;if(flags&FLAG_GRAMMAR_SPELLCHECK){var ni_1=document.getElementById("ni_1");if(ni_1)niCurrentStateArray["ni_1"]=ni_1.checked=true;}
if(flags&FLAG_MORE_DETAIL){var ni_2=document.getElementById("ni_2");if(ni_2)niCurrentStateArray["ni_2"]=ni_2.checked=true;}
if(flags&FLAG_POORLY_STRUCTURED){var ni_3=document.getElementById("ni_3");if(ni_3)niCurrentStateArray["ni_3"]=ni_3.checked=true;}
if(flags&FLAG_PHONE_WEBADRESS){var ni_4=document.getElementById("ni_4");if(ni_4)niCurrentStateArray["ni_4"]=ni_4.checked=true;}
if(flags&FLAG_ONE_SIDED){var ni_5=document.getElementById("ni_5");if(ni_5)niCurrentStateArray["ni_5"]=ni_5.checked=true;}
if(flags&FLAG_INFLAMMATORY){var ni_6=document.getElementById("ni_6");if(ni_6)niCurrentStateArray["ni_6"]=ni_6.checked=true;}
if(flags&FLAG_PHONE_WEBADRESS){var ni_7=document.getElementById("ni_7");if(ni_7)niCurrentStateArray["ni_7"]=ni_7.checked=true;}
var comment=document.getElementById("cText");if(comment){var ni_other=document.getElementById("ni_other");if(ni_other){niCurrentStateArray["ni_other"]=comment.innerHTML;ni_other.value=comment.innerHTML;ni_other.focus();}}}}
function submitNI(formId,dest,rt,destFun){var msgDiv=document.getElementById("msgID");if(msgDiv){var changeMade=false;var hasChecked=false;for(var ii=1;ii<8;ii++){var ni=document.getElementById("ni_"+ii);hasChecked|=ni&&ni.checked;if(ni&&ni.checked!=niCurrentStateArray["ni_"+ii]){changeMade=true;break;}}
if(!changeMade){var ni_other=document.getElementById("ni_other");if(ni_other&&niCurrentStateArray["ni_other"]!=ni_other.value){changeMade=true;}}
if(changeMade)
return UpdateToolTip(formId,dest,rt,destFun);else if(!hasChecked)
msgDiv.innerHTML="Choose a flag or click Cancel to close this window.";else
globalHideModal();return false;}}
function UpdateToolTip(formId,dest,rt,destFun){if(formId=="userloginID"){setUserNameAndEmail(formId);UpdateToolTipOld(formId,dest,rt,destFun);return;}
var params=getParams(formId);var rt_param=(rt&&rt!="")?"rt="+rt:"";var url="/Q/Special:NeedsImprovement&"+params+rt_param;try{globalHideModal();repaintToolTip("<div style=\"font-size:20px;margin-top:70px\">Please wait...</div>");}
catch(e){UpdateToolTipOld(formId,dest,rt,destFun);return;}
showModalWait();new Ajax.Request(url,{parameters:"",onSuccess:function(transport){updateNIData(transport.responseText);},onException:function(requester,except){alertBrowserError();}});globalHideModal();}
function removeOneNIFlag(rt,flag){var rt_param=(rt&&rt!="")?"&rt="+rt:"";AjaxToFunc('/Q/Special:NeedsImprovement','updateNIData',"POST","flag="+flag+rt_param);}
function checkLength(txtAreaOBJ){if(txtAreaOBJ!=null&&txtAreaOBJ.value.length>60){alert("Text too long. Must be 20 characters or less");return false;}
return true;}
function showNIComment(){var comment=document.getElementById("commentTXT");var commentLNK=document.getElementById("commentLNK");if(comment){if(comment.style.display!="block"){comment.style.display='block';commentLNK.innerHTML="Hide details";_hbLink('NI_ViewDetails');}
else{comment.style.display="none";commentLNK.innerHTML="View details";_hbLink('NI_HideDetails');}}}
function textCounter1(field,countfield,maxlimit,trim){var trim=(trim==null)?1:trim;if((field.value.length>maxlimit)&&trim){field.value=field.value.substring(0,maxlimit);}
if(field.value.length==0)
countfield.innerHTML="";else{var numCharsLeft=maxlimit-field.value.length;countfield.innerHTML=numCharsLeft+((numCharsLeft==1)?" character left":" characters left");}}
reportAbuseListPics=new Array(wgStaticFilesServer+'/templates/icons/x.gif',wgStaticFilesServer+'/templates/icons/pencil.gif');reportAbuseImagePreload=new ImagePreloader(reportAbuseListPics);function reportAbusePopupMenu(){_hbLink("abuse_Qlink",jwgData.wssStatus);reportAbuseEnableBtn=function(){if($('submitReportAbuseDIV').select("a.btn")[0].isDisabledBtn()){$('submitReportAbuseDIV').select("a.btn")[0].enableBtn();}}
var content="<div id='outerReportAbuseDIV'>"+"<table cellpadding='0' cellspacing='0' style='background: #FFFFFF; width: 100%; height:100%; "+"border: #8E8E8E 2px solid; padding: 0px; margin: 0px;'><tr><td style='text-align: center; width: 100%; "+"height: 100%; vertical-align: top; padding: 0px; margin: 0px; font-size: 16px; border: 0px;'>"+"<div id='closeReportAbuseDIV' align='right'><img src='"+wgStaticFilesServer+"/templates/icons/x.gif' style='cursor: pointer;'"+"title='Close' alt='Close' onclick='javascript:reportAbusePopupMenuHide();' /></div>"+"<div id='headerReportAbuseDIV' style='background-color: #EFF6D5; padding: 0px; text-align: left; width: auto; "+"margin: 5px 10px 10px 10px;'>"+"<table><tr><td><img src='"+wgStaticFilesServer+"/templates/icons/pencil.gif' style='display: block;padding-right: 5px;top:-7px;'></td>"+"<td><font style='font-size: 12px;'> Please tell us why you think this content should be removed:</font></td></tr></table></div>"+"<form style='padding: 0px; margin: 0px;' action='javascript:reportAbuseSubmitSelection();' method='post' id='selectionReportAbuseFORM' enctype='application/x-www-form-urlencoded'>"+"<div id='selectionReportAbuseDIV' style='color: #000000; font-size: 13px; padding: 7px 12px 12px 12px; text-align: left;'>"+"<table style='margin: 0px; padding: 0px;' celpadding=5 cellspacing=0 border=0>"+"<tr><td style='vertical-align: top;'><input class='selectionReportAbuse' name='selectionReportAbuse' value='ra1&abuse_sel_spamvand' type='radio' id='ra1' onclick='javascript:return reportAbuseEnableBtn();' style='margin-bottom: 8px;' /></td><td style='vertical-align: top; padding: 1px 0px 0px 5px;'><label for='ra1' style='cursor: pointer;'> Spam/vandalism (e.g. unrelated or commercial information) </label></td></tr>"+"<tr><td style='vertical-align: top;'><input class='selectionReportAbuse' name='selectionReportAbuse' value='ra2&abuse_sel_inap'  type='radio' id='ra2' onclick='javascript:return reportAbuseEnableBtn();' style='margin-bottom: 8px;' /></td><td style='vertical-align: top; padding: 1px 0px 0px 5px;'><label for='ra2' style='cursor: pointer;'> Inappropriate content (e.g., violence or profanity) </label></td></tr>"+"<tr><td style='vertical-align: top;'><input class='selectionReportAbuse' name='selectionReportAbuse' value='ra3&abuse_sel_plagcopy' type='radio' id='ra3' onclick='javascript:return reportAbuseEnableBtn();' style='margin-bottom: 8px;' /></td><td style='vertical-align: top; padding: 1px 0px 0px 5px;'><label for='ra3' style='cursor: pointer;'> Plagiarism/copyright infringement </label></td></tr>"+"<tr><td style='vertical-align: top;'><input class='selectionReportAbuse' name='selectionReportAbuse' value='ra4&abuse_sel_other'  type='radio' id='ra4' onclick='javascript:return reportAbuseEnableBtn();' style='margin-bottom: 8px;' /></td><td style='vertical-align: top; padding: 1px 0px 0px 5px;'><label for='ra4' style='cursor: pointer;'> Other </label></td></tr>"+"</table>"+"</div><div id='submitReportAbuseDIV' style='border-top: #DCDCDC 1px dashed; padding: 7px 5px; text-align: center;'>"+"<a class='btn std grey' href='javascript:void(0);' onmousedown=\"ButtonMouseDown(this);\" onmouseup=\"ButtonMouseUp(this);\" onmouseout=\"ButtonMouseUp(this); \" onclick=\"if(!$(this).isDisabledBtn()) { if($(this).match('form a')) { bt_submit_fnc = function(tbtn) { $(tbtn).submitBtn(); }; bt_submit_fnc.defer(this); } } else { xPreventDefault(); return false; }\" alt=\"Send Report\" title=\"Send Report\"><span><span><font style=\"white-space: nowrap;\"><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"><font>&nbsp;Send Report&nbsp;</font><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"></font></span></span></a>&nbsp;&nbsp;&nbsp;<a class='btn std' href='javascript:void(0);' onmousedown=\"ButtonMouseDown(this);\" onmouseup=\"ButtonMouseUp(this);\" onmouseout=\"ButtonMouseUp(this); \" onclick=\"if(!$(this).isDisabledBtn()) { reportAbusePopupMenuHide(); } else { xPreventDefault(); return false; }\" alt=\"Cancel\" title=\"Cancel\"><span><span><font style=\"white-space: nowrap;\"><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"><font>&nbsp;Cancel&nbsp;</font><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"></font></span></span></a>"+"</div></form></td></tr></table></div>";init_size={x:0,y:0};selectionPopupMenu("outerReportAbuseDIV",init_size,content);}
function reportAbusePopupMenuHide(){_hbLink("abuse_cancelrpt",jwgData.wssStatus);popupMenuHide();}
function reportAbuseSubmitSelection(){_hbLink("abuse_sendrpt",jwgData.wssStatus);var selection='';var lid='';var selections=$$('.selectionReportAbuse');for(var c=0;c<selections.length;c++){if(selections[c].checked){var vals=selections[c].value.split('&');selection=vals[0];lid=vals[1];break;}}
if(selection!=''){_hbLink(lid,jwgData.wssStatus);$('headerReportAbuseDIV').innerHTML='';$('selectionReportAbuseDIV').innerHTML='';$('submitReportAbuseDIV').innerHTML='';$('outerReportAbuseDIV').parentNode.style.cursor="wait";$('selectionReportAbuseDIV').innerHTML="<div style='font-size: 12px; width: 100%; height: "+(popup_elem.ph-54)+"px'><div style='padding-top: 60px; text-align: center;'><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader3.gif' border=0 alt='Please wait...' /><br><font style='font-size: 12px; color: #A9A9A9;'> Please wait... </font></div></div>";var url='/Q/'+jwgData.articleData.real_returnto;var params={action:'reportabuse',sel:selection,ajaxonly:'1'};new Ajax.Request(url,{parameters:params,onSuccess:function(transport){$('outerReportAbuseDIV').parentNode.style.cursor="default";popupMenuHide();statusMessageShow("Our <a href="+VANDAL_PATROL_HOST+">Vandal Patrol</a> team is hot on the heels of the perpetrator. "+"Thanks for reporting this page - your sharp eyes help make WikiAnswers great!");$('ReportAbuse').innerHTML="Reported";$('ReportAbuse').style.fontSize='11px';$('ReportAbuse').style.color='red';},onException:function(requester,except){popupMenuHide();alertBrowserError();}});}
else return;}
var TrashMerge=Class.create({hide:function(){_hbLink('trash_cancel',this.lpos);popupMenuHide();},getPopupMenuHTML:function(){var url='/Q/Special:MergeQuestions';var params={action:'getmenu',ajaxonly:'1',hasAnswer:this.hasAnswer,alternate_count:this.alternate_count,qTitle:this.title,isHarmful:this.isHarmful};new Ajax.Request(url,{parameters:params,onSuccess:function(transport){var content=transport.responseText;trashMergeInstance.displayPopupMenu(content);fireForTrashCompletely();},onException:function(requester,except){alertBrowserError();return;}});},displayPopupMenu:function(content){var init_size={x:0,y:0};selectionPopupMenu("outerTrashMergeDIV",init_size,content);if(this.hasAnswer&&this.alternate_count==0){this.changeMergeInputsDisabledState('disabled');}},submit:function(){_hbLink('trash_continue',this.lpos);if($('mergeradiobutton')&&$('mergeradiobutton').checked){var removeAnswer=($('removeanswercheckbox')&&$('removeanswercheckbox').checked);this.submitMerge(removeAnswer);}else if($('trashradiobutton')&&$('trashradiobutton').checked){this.submitTrash();}},submitTrash:function(){window.location=this.getTrashURL();},showWaitMessage:function(){$('headerTrashMergeDIV').innerHTML='';$('selectionTrashMergeDIV').innerHTML='';$('submitTrashMergeDIV').innerHTML='';$('outerTrashMergeDIV').parentNode.style.cursor="wait";$('selectionTrashMergeDIV').innerHTML="<div style='font-size: 12px; width: 100%; height: "+(popup_elem.ph-54)+"px'><div style='padding-top: 60px; text-align: center;'><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader3.gif' border=0 alt='Please wait...' /><br><font style='font-size: 12px; color: #A9A9A9;'> Please wait... </font></div></div>";},submitMerge:function(removeAnswer){var selections=$$('.catchallselection');var selection='';for(var c=0;c<selections.length;c++){if(selections[c].checked){selection=selections[c].value;break;}}
if(selection==''){return;}
this.showWaitMessage();if(removeAnswer){this.removeAnswerAndMerge(selection);}else{this.mergeQuestion(selection);}},onMergeSuccess:function(catchAllQuestion){window.location='/Q/'+catchAllQuestion;},mergeQuestion:function(catchAllQuestion){var url='/Q/Special:MergeQuestions';var params={action:'submit',wpPrimary:decodeURIComponent(catchAllQuestion),wpSecondary:this.title,ajaxonly:'1',wpTier:'1',wpMergeIgnoreRelatedLinks:'1',wpMergeIgnoreRelatedQs:'1'};new Ajax.Request(url,{parameters:params,onSuccess:function(transport){var errorMsg=transport.responseText;if(errorMsg!=''){popupMenuHide();statusMessageShow(errorMsg);return;}
trashMergeInstance.onMergeSuccess(catchAllQuestion);},onException:function(requester,except){popupMenuHide();alertBrowserError();}});},getTrashURL:function(){var url='/Q/'+encodeURIComponent(this.title)+'&action=movefaq&topic_id=2380&wpSave=1&new_list=2380&wpTopicID=2380';return url;},removeAnswerAndMerge:function(catchAllQuestion){var url='/Q/'+this.title;var params={action:'deleteanswer',ajaxonly:'1'};new Ajax.Request(url,{parameters:params,onSuccess:function(transport){var response=transport.responseText.evalJSON();if(response.rc==true){trashMergeInstance.mergeQuestion(catchAllQuestion);}else{popupMenuHide();statusMessageShow("Sorry, can\'t remove the answer, please delete manually and try to merge again.");}},onException:function(requester,except){popupMenuHide();alertBrowserError();}});},changeMergeInputsDisabledState:function(disabled){var selections=$$('.catchallselection');for(var c=0;c<selections.length;c++){selections[c].disabled=disabled;if(!selections[c].disabled&&selections[c].checked){this.changeMergeBtnState('');}}
var labels=$$('.catchalllabel');for(var c=0;c<labels.length;c++){labels[c].style.cursor=(disabled==''?'pointer':'default');}
if($('mergeradiobutton')){$('mergeradiobutton').disabled=disabled;}},initialize:function(title,alternate_count,hasAnswer,isHarmful,lpos){this.title=(title==null?'':title);this.hasAnswer=hasAnswer;this.alternate_count=alternate_count;this.isHarmful=isHarmful;this.lpos=lpos;if(!jwgData.config.trashMergeFeatureEnabled){this.submitTrash();return;}
this.getPopupMenuHTML();},changeMergeBtnState:function(disabled){btnElm=$('submitTrashMergeDIV').select("a.btn")[0];if(btnElm.isDisabledBtn()&&!disabled){btnElm.enableBtn();}else if(!btnElm.isDisabledBtn()&&disabled){btnElm.disableBtn();}},removeAnswerChanged:function(){var checkbox=document.forms['trashMergeForm'].removeanswer;if(checkbox.checked){this.changeMergeInputsDisabledState('');}else{this.changeMergeInputsDisabledState('disabled');if(!$('trashradiobutton')||!$('trashradiobutton').checked){this.changeMergeBtnState('disabled');}}},changeMergeInputsCheckedState:function(checked){var selections=$$('.catchallselection');for(var c=0;c<selections.length;c++){selections[c].checked=checked;}
if($('mergeradiobutton')){$('mergeradiobutton').checked=checked;}},catchAllInputChanged:function(){$('mergeradiobutton').checked='checked';if($('trashradiobutton')){$('trashradiobutton').checked='';}
this.changeMergeBtnState('');},mergeInputChanged:function(){this.changeMergeBtnState('disabled');},trashInputChanged:function(){this.changeMergeInputsCheckedState('');this.changeMergeBtnState('');}});var trashMergeInstance=null;Object.extend(TrashMerge,{start:function(){qTitle=jwgData.articleData.real_returnto;alternate_count=(!Object.isUndefined(jwgData.articleData.alternate_count)?jwgData.articleData.alternate_count:0);hasAnswer=((!Object.isUndefined(jwgData.articleData.hasAnswer)&&jwgData.articleData.hasAnswer)?1:0);trashMergeInstance=new TrashMerge(qTitle,alternate_count,hasAnswer,0,'Qpage');}});var TrashMergeFromSERP=Class.create(TrashMerge,{onMergeSuccess:function(catchAllQuestion){popupMenuHide();navGo(search_page,true);},submitTrash:function(){var url=this.getTrashURL();new Ajax.Request(url,{parameters:"",onSuccess:function(transport){popupMenuHide();navGo(search_page,true);},onException:function(requester,except){alertBrowserError();}});}});Object.extend(TrashMergeFromSERP,{start:function(qTitle,alternate_count,hasAnswer){qTitle=decodeURIComponent(qTitle);trashMergeInstance=new TrashMergeFromSERP(qTitle,alternate_count,hasAnswer,0,'SERPmenu');}});var TrashMergeHarmful=Class.create(TrashMerge,{});Object.extend(TrashMergeHarmful,{start:function(){qTitle=jwgData.articleData.real_returnto;alternate_count=(!Object.isUndefined(jwgData.articleData.alternate_count)?jwgData.articleData.alternate_count:0);hasAnswer=((!Object.isUndefined(jwgData.articleData.hasAnswer)&&jwgData.articleData.hasAnswer)?1:0);trashMergeInstance=new TrashMergeHarmful(qTitle,alternate_count,hasAnswer,1,'Qpage');}});var TrashMergeAlternates=Class.create(TrashMerge,{mergeQuestion:function(catchAllQuestion){var CATCHALLQUESTION=catchAllQuestion;var url="/Q/Special:SplitMerge";var params="action=submit&"+"action_type=eq&"+"tq="+returnto_question+"&"+"mainq="+catchAllQuestion+"&"+"tier=1&"+qsplits_values;if(xDef("mergeto")&&mergeto)
params+="&mergeto="+mergeto;new Ajax.Request(url,{parameters:params,onSuccess:function(transport){var resp=transport.responseText;if(resp.indexOf('ERROR')==0){statusMessageShow("Merge failed. Check if <a href=\'/Q/"+CATCHALLQUESTION+"\'>catch-all question</a> "+"is a redirect, or has too many alternates.");}else{handleSplitMergeResponse(resp);}
popupMenuHide();},onException:function(requester,except){popupMenuHide();alertBrowserError();}});},submitTrash:function(){popupMenuHide();submitForm('Trash','batchform');}});Object.extend(TrashMergeAlternates,{start:function(){var qTitle=(singleTrashedAlt!=null?singleTrashedAlt:null);trashMergeInstance=new TrashMergeAlternates(qTitle,0,0,0,'EditAlternates');}});function unlockQuestion(){var url=encodeURI('/Q/'+jwgData.articleData.real_returnto);var params={action:'getunpreservemenu',ajaxonly:'1'};new Ajax.Request(url,{parameters:params,onSuccess:function(transport){var content=transport.responseText;selectionPopupMenu("outerUnlockQuestionDIV",{x:0,y:0},content);},onException:function(requester,except){alertBrowserError();return;}});}
var prev_title='';function ajaxMovePage(page,isLoggedIn){var title=$('question_title').select('h1')[0];var parent=null;if(title){parent=title.parentNode;}
else{if($('new_wording'))
$('new_wording').focus();return;}
parent.removeChild(title);if($('question_in_categories')!=null)$('question_in_categories').style.display="none";if($('improveQLink')!=null)$('improveQLink').style.display="none";var div=xCreateDiv({padding:"0px",margin:"0px"},null,"editable_wording");prev_title=title.innerHTML;if(prev_title.match(/\.\.\./)){var origstr=prev_title.split(/[^0-9A-Za-z\.]/);var newstr=page.split(/[^0-9A-Za-z\.]/);origstr.each(function(s,index){if(s.match(/\.\.\./)){title.innerHTML=title.innerHTML.replace(s,newstr[index]);prev_title=title.innerHTML;}});}
div.innerHTML="<form style='margin: 0px; padding: 0px;' name='movepageform' action='javascript:doSubmitAjaxMovePage("+isLoggedIn+");' method='post'>"+'<input id="new_wording" type="text" value="'+title.innerHTML+'" name="new_wording" size="200" maxlength="200" style="font-size: 20px; font-weight: bold; margin-left: 8px; width: 700px; font-family: Verdana,sans-serif;" />'+"</form><div style='padding-left: 10px; padding-top: 4px;'><small><a href='javascript:document.forms.movepageform.submit();' title='Save'><b>SAVE</b></a>  or  <a href='javascript:closeAjaxMovePage();' title='Cancel'><b>CANCEL</b></a></small></div>";parent.insertAdjacentElement("afterBegin",div);$('new_wording').focus();$('question_title').setStyle({height:"30px"});$('question_title').setStyle({height:"auto"});if(typeof(checkForCAPS)!='undefined'){if(document.addEventListener){$('new_wording').addEventListener("keypress",checkForCAPS.generic,false);}
else if(document.attachEvent){$('new_wording').attachEvent('onkeypress',checkForCAPS.generic);}
Event.observe($('new_wording'),"keypress",checkForCAPS.generic_special);Event.observe($('new_wording'),"change",checkForCAPS.generic_check);Event.observe($('new_wording'),"focus",checkForCAPS.focus);if(typeof checkErase=="undefined"||checkErase){Event.observe($('new_wording'),"keyup",handleErasedQuestionCheck);}}}
function loadAjaxMovePage(){if($("improveQLink")){eval(decodeURIComponent($("improveQLink").select("a")[0].href.replace(/^javascript:/,"")));return true;}
return false;}
var gCallCount=0;if(window.location.hash&&window.location.hash.match(/#editQ$/i)){new PeriodicalExecuter(function(pe){if(loadAjaxMovePage()||++gCallCount>100)
pe.stop();},0.1);}
function handleErasedQuestionCheck(){if(!verifyErase&&prev_title.match(/.*[a-z]{2}/g)){questionHTML=$F('new_wording').replace(/ /g,'');if(questionHTML.length==0){erasedQuestionPopup();$('new_wording').blur();verifyErase=true;}}}
erasedQuestionModal=null;function erasedQuestionPopup(){erasedQuestionModal=popup_elem;erasedQuestionModal.buildModal("erasedQuestion",490,0);erasedQuestionModal.fill("<div class=\"clsModalDialog\" id=\"modal_elem\" greyZIndex=\"100\" xDragEnabled=\"true\"><div id=\"outerModalDIV\"><table style=\"border: 2px solid #8e8e8e;\" cellSpacing=\"0\" cellPadding=\"0\"><tr><td><div id=\"closeModalDIV\" align=\"right\"><img title=\"Close\" style=\"cursor: pointer\" onclick=\"_hbLink('DontReplace', this.lpos); resetQuestion();\" alt=\"Close\" src=\"http://ward-jy/templates/icons/x.gif\"></div><div id=\"modal_int_text\" style=\"padding: 0 15px;\"><div id=\"bda_int_text\" style=\"padding: 0 15px 15px 15px; font-size: 12px; color: #000000;\">You are about to entirely replace the wording of this question. For new questions, please use the search bar at the top of the page.<br /><br /><a class='btn std' href='javascript:void(0);' onmousedown=\"ButtonMouseDown(this);\" onmouseup=\"ButtonMouseUp(this);\" onmouseout=\"ButtonMouseUp(this); \" onclick=\"if(!$(this).isDisabledBtn()) { _hbLink('DontReplace', this.lpos); resetQuestion(); return false; } else { xPreventDefault(); return false; }\" alt=\"Don't replace\" title=\"Don't replace\"><span><span><font style=\"white-space: nowrap;\"><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"><font>&nbsp;Don't replace&nbsp;</font><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"></font></span></span></a>&nbsp;&nbsp;&nbsp;<a class='btn std' href='javascript:void(0);' onmousedown=\"ButtonMouseDown(this);\" onmouseup=\"ButtonMouseUp(this);\" onmouseout=\"ButtonMouseUp(this); \" onclick=\"if(!$(this).isDisabledBtn()) { _hbLink('Replace', this.lpos); hideErasedQuestionModal(); return false; } else { xPreventDefault(); return false; }\" alt=\"Replace\" title=\"Replace\"><span><span><font style=\"white-space: nowrap;\"><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"><font>&nbsp;Replace&nbsp;</font><input type=\"image\" value=\"\" src=\"http://site1.wikianswers.com/templates/images/blank.gif\" style=\"display: inline; width: 1px; height: 1px;\" tabindex=\"-1\"></font></span></span></a><br /></div></div></td></tr></table></div></div>");$('erasedQuestion').childElements('modal_elem')[0].style.position="static";erasedQuestionModal.centralize();_hbLink('QblankWarning',this.lid);}
function hideErasedQuestionModal(){erasedQuestionModal.hideModal();$('new_wording').focus();}
function resetQuestion(){$('new_wording').value=prev_title;if($('wysiwygwysiwyg')&&$('wysiwygwysiwyg').contentDocument&&!Prototype.Browser.IE){$('wysiwygwysiwyg').contentDocument.designMode="off";$('wysiwygwysiwyg').contentDocument.contentEditable=false;$('wysiwygwysiwyg').contentDocument.body.contentEditable=false;$('wysiwygwysiwyg').contentDocument.designMode="on";$('wysiwygwysiwyg').contentDocument.contentEditable=true;}
hideErasedQuestionModal();}
function closeAjaxMovePage(){var title=$('new_wording').value;var parent=$('editable_wording').parentNode;if($('movepageerror'))$('movepageerror').parentNode.removeChild($('movepageerror'));if(typeof(checkForCAPS)!='undefined'){if(document.addEventListener){$('new_wording').removeEventListener("keypress",checkForCAPS.generic,false);}
else if(document.attachEvent){$('new_wording').detachEvent('onkeypress',checkForCAPS.generic);}
Event.stopObserving($('new_wording'),"keypress",checkForCAPS.generic_special);Event.stopObserving($('new_wording'),"change",checkForCAPS.generic_check);Event.stopObserving($('new_wording'),"focus",checkForCAPS.focus);checkForCAPS.reset();}
parent.removeChild($('editable_wording'));var h1=document.createElement("h1");$(h1).setStyle({margin:"0pt",padding:"1px 10px"});prev_title=prev_title.gsub(/[A-Za-z]{40,}/,function(match){return match[0].truncate(40);});h1.innerHTML=prev_title;prev_title='';parent.insertAdjacentElement("afterBegin",h1);$('question_in_categories').style.display="block";$('improveQLink').style.display="block";$('question_title').setStyle({height:"30px"});$('question_title').setStyle({height:"auto"});isPostQClicked=false;}
var old_sm="";function submitAjaxMovePage(jsonly,additional_prms){var title=$('new_wording').value;if(jsonly==2){var recaptcha_on=false;if(Prototype.Browser.IE&&window.frames['recaptcha_frame']){var docObj=window.frames['recaptcha_frame'].document;recaptcha_on=true;}
else if($('recaptcha_frame')){var docObj=$('recaptcha_frame').contentDocument;recaptcha_on=true;}
if(recaptcha_on&&docObj.getElementById('recaptcha_challenge_field')&&docObj.getElementById('recaptcha_response_field')){var captcha_challenge=docObj.getElementById('recaptcha_challenge_field').value;var captcha_response=docObj.getElementById('recaptcha_response_field').value;}
else if(recaptcha_on){globalHideModal();alert("Error: There's no captcha loaded");return;}
if(recaptcha_on){$('modal_int_text').innerHTML="<div style='font-size: 12px;'><div style='padding-top: 118px; text-align: center;'><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader3.gif' border=0 alt='Please wait...' /></div></div>";}}
if($('movepageerror'))$('movepageerror').parentNode.removeChild($('movepageerror'));if(title!=''&&title!=prev_title){var sm=$('editable_wording').select('small')[0];old_sm=sm.innerHTML;sm.innerHTML="Saving...";var pere=new PeriodicalExecuter(function(pe){if(sm.innerHTML=="Saving..."){sm.innerHTML="Saving.";}
else{sm.innerHTML+='.';}},1);$('new_wording').disabled=true;var url='/Q/Special:Movepage';params={ajax:1,action:'submit',wpNewTitle:title,wpMove:"Save",wpOldTitle:prev_title,jsonly:jsonly,redirect:"none"};if(recaptcha_on){Object.extend(params,{captcha:captcha_challenge,cresponse:captcha_response});}
if(additional_prms){Object.extend(params,additional_prms);}
new Ajax.Request(url,{parameters:params,onSuccess:function(transport){pere.stop();var resp=transport.responseText;resp=resp.trim();if(jsonly==0){eval(resp);}
else if(jsonly==1){if(resp.indexOf('POPUP:')==0){eval(resp.substr(6));getCaptchaAPI.defer();}}
else if(jsonly==2){if(resp.indexOf('POPUP:')==0){eval(resp.substr(6));getCaptchaAPI.defer();}
if(resp=='OK'){if($('modal_int_text')){globalHideModal();showModalWait();}
submitAjaxMovePage(3,{captcha:params.captcha,cresponse:params.cresponse});}}
else if(jsonly==3){globalHideModal();eval(resp);if(xModalDialog){xModalDialog.grey=null;xModalDialog.instances={};if($('xModalDialogGreyElement'))
$('xModalDialogGreyElement').remove();if($('wysiwygwysiwyg')){globalHideModal();}}}},onException:function(requester,except){alertBrowserError();}});}
else closeAjaxMovePage();}
function doSubmitAjaxMovePage(isLoggedIn){if(isLoggedIn){return submitAjaxMovePage(0);}else{return submitAjaxMovePage(1);}}
function showHideResearch(){var researchBox=$('researchBox');if(!researchBox.visible())
researchBox.show();else
researchBox.hide();if(Prototype.Browser.IE&&$$(".IEold #researchBox a.btn")&&$$(".IEold #researchBox a.btn")[0]){window.setTimeout(function(){$$(".IEold #researchBox a.btn")[0].style.zoom="1";$$(".IEold #researchBox a.btn")[0].style.zoom="0";$$(".IEold #researchBox a.btn")[0].style.position="static";},100);}
Event.stopObserving(window,"scroll");}
function editQ(){action='javascript:ajaxMovePage("'+real_returnto+'", 1);';new_login();}
function editA(){action="/Q/"+real_returnto+"&action=edit";new_login();}
function editRelatedQ(){action="/Q/"+real_returnto+"&action=editrelatedq";new_login();}
function editRelatedL(){action="/Q/"+real_returnto+"&action=editrelatedlink";new_login();}
function watchQ(){action='javascript:getUpdates(isWatched);';new_login();}
function reloadQ(){action="/Q/"+quote_returnto;new_login();}
function join(){action="/Q/"+quote_returnto;new_login();registerLoginManager('register');}
function addAlternate(new_title,sameQ){params="new_title="+new_title+"&wpSave=1&similarQuestion=1&fromSuggest=1&title="+sameQ;AjaxToFunc("/wiki.phtml?action=editalternates","showThankYouMsg","POST",params);}
function showThankYouMsg(str){var msgText=$('msgText');if(msgText!=null){msgText.innerHTML="<b>Thank you</b> for helping to keep the Q&As in order!";}}
function sendCustomMetrics(dim1,dim2){var cv=_hbEvent("cv");_hbSet("cv.c16",dim1+"|"+dim2);_hbLink("SimilarQuestions");}
navGo=function(a,b,c){if(action.match(/^javascript:/)){eval(action.replace(/^javascript:/,""));}
else{window.location=action;}}
function fireForTrashCompletely(){if($('TrashCompletely')){oldPE=null;Event.observe($('TrashCompletely'),"mouseover",function(event){oldPE=Object.clone(popup_elem);text="Trash bad questions completely if they are so unusual that they will not be asked again.  This includes questions containing personal information such as e-mail addresses, social security numbers, home addresses, or the full name of non-celebrities.  <br style='margin:0 0 10px;'/>If there is a good chance a problem question will be asked again on the site it should be trashed into one of the categories listed in order to prevent it from being created again as a separate question.";popup_elem.build($('TrashCompletely').up().up(),250,30);popup_elem.makeTooltip(text);popup_elem.moveFromElemX(150);popup_elem.moveFromElemY(-195);$('tooltip_elem').style.zIndex=999;$('tooltip_elem').down('div').style.textAlign='left';$('tooltip_elem').down('div').style.padding='10px';});Event.observe($('TrashCompletely'),"mouseout",function(event){if(popup_elem.isTooltip)hideTooltip();popup_elem=oldPE;});}}
function selectionPopupMenu(containingDivId,windowSize,content){var popupWindowId="popupMenu";popup_elem.buildModal(popupWindowId,windowSize.x,windowSize.y);var popupWindow=$(popupWindowId);popup_elem.fill(content);var containingDiv=$(containingDivId);if(windowSize.y!=0){windowSize.y=containingDiv.offsetHeight;popupWindow.setStyle({height:windowSize.y+"px"});popup_elem.ph=windowSize.y;}
if(windowSize.x!=0){windowSize.x=containingDiv.offsetWidth;popupWindow.setStyle({width:windowSize.x+"px"});popup_elem.pw=windowSize.x;}
containingDiv.style.position="static";popup_elem.centralize({x:containingDiv.offsetWidth,y:containingDiv.offsetHeight});cur_scroll_y=xScrollTop();cur_scroll_x=xScrollLeft();if(document.addEventListener){xModalDialog.grey.addEventListener("mousewheel",checkScroll,false);xModalDialog.grey.addEventListener("DOMMouseScroll",checkScroll,false);}
else if(document.attachEvent){xModalDialog.grey.attachEvent("onmousewheel",checkScroll);}
Event.observe(containingDiv,"scroll",stopWindowScroll,false);if(!popupWindow.xDragEnabled){xEnableDrag(popupWindow,function(ele,mouseX,mouseY,xEventObj){popupWindow.style.cursor="move";},function(ele,mouseDX,mouseDY,xEventObj){var x=xLeft(popupWindow)+mouseDX;var y=xTop(popupWindow)+mouseDY;xMoveTo(popupWindow,x,y);},function(ele,mouseX,mouseY,xEventObj){popupWindow.style.cursor="auto";});}}
function popupMenuHide(){Event.stopObserving(window,"scroll",stopWindowScroll,false);if(document.addEventListener){xModalDialog.grey.removeEventListener("mousewheel",checkScroll,false);xModalDialog.grey.removeEventListener("DOMMouseScroll",checkScroll,false);}
else if(document.attachEvent){xModalDialog.grey.detachEvent("onmousewheel",checkScroll);}
popup_elem.closeModal();}
var popup_elem={pw:0,ph:0,elem:null,innerHTML:'',menuItems:[],isTooltip:false,isModal:false,initialize:function(elem,pw,ph){popup_elem.pw=pw;popup_elem.ph=ph;popup_elem.elem=elem;popup_elem.clearMenu();popup_elem.innerHTML="";popup_elem.isTooltip=false;popup_elem.isModal=false;},buildModal:function(id,pw,ph){popup_elem.initialize(document,pw,ph);setTimeout("hideTooltip();",50);if(!xModalDialog.instances[id]){div=document.createElement("div");div.id=id;div.className="clsModalDialog";div.innerHTML="";Element.setStyle(div,{backgroundColor:"#FFFFFF",visibility:"hidden",position:"absolute",left:"-500px",top:"-500px",width:(this.pw?this.pw+"px":"auto"),height:(this.ph?this.ph+"px":"auto"),padding:"0px",margin:"0px",overflow:"hidden",zIndex:"52"});$('container').insertAdjacentElement("afterEnd",div);new xModalDialog(id);}
popup_elem.elem=$(id);popup_elem.isModal=true;},makeModal:function(close_on_click){if(!xModalDialog.instances["temp_modal"]){div=document.createElement("div");div.id="temp_modal";div.className="clsModalDialog";div.innerHTML="";Element.setStyle(div,{position:"absolute",left:"-500px",top:"-500px",width:"0px",height:"0px",padding:"0px",margin:"0px",zIndex:"49"});$('container').insertAdjacentElement("afterEnd",div);new xModalDialog("temp_modal");}
var need_hide_float=false;if($('br_container')&&(!$('br_container').style.display||$('br_container').style.display!="none")){need_hide_float=true;br_hide_float_container();}
xModalDialog.instances["temp_modal"].show();popup_elem.operaRefresh();if(need_hide_float){br_show_float_container();}
if(typeof(close_on_click)!='undefined'&&close_on_click)
Event.observe(xModalDialog.grey,"click",popup_elem.removeModal);},removeModal:function(){if(xModalDialog.instances["temp_modal"]){xModalDialog.instances["temp_modal"].hide();popup_elem.operaRefresh();Event.stopObserving(xModalDialog.grey,"click",popup_elem.removeModal);}},destroyModal:function(){popup_elem.elem.parentNode.removeChild(popup_elem.elem);popup_elem.operaRefresh();},hideModal:function(){if(popup_elem.elem&&popup_elem.elem.id&&xModalDialog&&xModalDialog.instances&&xModalDialog.instances[popup_elem.elem.id]){xModalDialog.instances[popup_elem.elem.id].hide();popup_elem.operaRefresh();}},closeModal:function(){popup_elem.hideModal();if(xModalDialog.instances[popup_elem.elem.id]){$(popup_elem.elem.id).remove();xModalDialog.instances[popup_elem.elem.id]=null;$('xModalDialogGreyElement').remove();xModalDialog.grey=null;popup_elem.operaRefresh();}},centralize:function(dims){var div=null;if(popup_elem.isModal)
div=popup_elem.elem;else
div=$('tooltip_elem');var ie=document.all;if(dims==null){dims={x:popup_elem.pw,y:popup_elem.ph};}
new_left=ie&&!window.opera?iecompattest().scrollLeft+parseInt(iecompattest().clientWidth/2):window.pageXOffset+parseInt(window.innerWidth/2);new_left=parseInt(new_left-(dims.x/2));new_top=ie&&!window.opera?iecompattest().scrollTop+parseInt(iecompattest().clientHeight/2):window.pageYOffset+parseInt(window.innerHeight/2);new_top=parseInt(new_top-(dims.y/2));browserName=navigator.appName;if(browserName.match(/opera/i)){new_top=new_top-20;}
popup_elem.moveX(new_left);popup_elem.moveY(new_top);div.style.visibility="visible";},build:function(elem,pw,ph,shadow){popup_elem.initialize(elem,pw,ph);hideTooltip();div=document.createElement("div");div.id="tooltip_shadow";div.innerHTML="";Element.setStyle(div,{visibility:"hidden",position:"absolute",left:"-500px",padding:"0px",margin:"0px",overflow:"hidden",zIndex:"50",width:((popup_elem.pw!=0)?""+popup_elem.pw+"px":"auto"),height:((popup_elem.ph!=0)?""+popup_elem.ph+"px":"auto")});$('left-column').insertAdjacentElement("beforeBegin",div);div=document.createElement("div");div.id="tooltip_elem";Element.setStyle(div,{visibility:"hidden",position:"absolute",left:"-500px",padding:"0px",margin:"0px",zIndex:"51",width:((popup_elem.pw!=0)?""+popup_elem.pw+"px":"auto"),height:((popup_elem.ph!=0)?""+popup_elem.ph+"px":"auto")});$('left-column').insertAdjacentElement("beforeBegin",div);if(typeof(shadow)!='undefined'&&shadow){arVersion=navigator.appVersion.split("MSIE");version=parseFloat(arVersion[1]);browserName=navigator.appName;if((browserName=="Microsoft Internet Explorer")&&(version>=5.5)&&(version<7.0)&&(document.body.filters)){div.style.background="url("+wgStaticFilesServer+"/templates/icons/shadow_small.gif) repeat bottom right";}
else{div.style.background="url("+wgStaticFilesServer+"/templates/icons/shadowAlpha.png) repeat bottom right";}}},operaRefresh:function(){browserName=navigator.appName;if(browserName.match(/opera/i)){document.body.className=document.body.className.replace(/ttip/i,"");document.body.className+=' ttip';}},fill:function(html){if(!popup_elem.isModal){$('tooltip_elem').innerHTML=html;}
else{popup_elem.elem.innerHTML=html;popup_elem.elem.style.visibility="visible";if(xModalDialog.instances[popup_elem.elem.id]){var need_hide_float=false;var cur_br_tt_scroll_top=0;if($('br_tt'))
cur_br_tt_scroll_top=parseInt(xScrollTop($('br_tt')));if($('br_container')&&(!$('br_container').style.display||$('br_container').style.display!="none")){need_hide_float=true;br_hide_float_container();}
xModalDialog.instances[popup_elem.elem.id].show();var fade=new Fadomatic(xModalDialog.grey,100,30,30,30);fade.fadeIn();if(need_hide_float){br_show_float_container();}
if($('br_tt'))
$('br_tt').scrollTop=cur_br_tt_scroll_top;}}
popup_elem.operaRefresh();},makeTooltip:function(text){popup_elem.fill("<table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px; border: 0px; width: "+(popup_elem.pw-9)+"px;'><tr><td style='height: "+(popup_elem.ph-32)+"px; padding: 0px; margin: 0px; width: "+(popup_elem.pw-9)+"px; border: 0px; overflow: hidden; text-align: left;'><div style='color: #000000; font-size: 11px; padding: 5px; width: "+(popup_elem.pw-29)+"px; white-space: normal; background-color: #FFFF8F; text-align: center; border: #DCDCDC 1px solid;'>"+text+"</div></td></tr></table>");popup_elem.isTooltip=true;},menuStart:function(id){if(typeof(id)=='undefined')
id='';popup_elem.innerHTML="<table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px; border: 0px; width: "+popup_elem.pw+"px;'><tr><td style='height: "+popup_elem.ph+"px; padding: 0px; margin: 0px; width: "+popup_elem.pw+"px; border: 0px; text-align: left;'><div style='color: #000000; font-size: 11px; padding: 5px; width: "+(popup_elem.pw-13)+"px; white-space: normal; background-color: #FFFFFF; text-align: center; border: #DCDCDC 1px solid; position: relative; left: -5px; top: -5px; height: "+(popup_elem.ph-13)+"px;' onmouseover='' id='"+id+"'>";},menuLongStart:function(){popup_elem.innerHTML="<table cellpadding='0' cellspacing='0' style='padding: 0px; margin: 0px; border: 0px;'><tr><td style='height: 250px; padding: 0px; margin: 0px; border: 0px; text-align: left;'><div style='color: #000000; font-size: 11px; padding: 5px; white-space: normal; background-color: #FFFFFF; text-align: center; border: #DCDCDC 1px solid; position: relative; left: -5px; top: -5px;' onmouseover=''><div style='height: 237px; margin: 0px; padding: 0px; overflow-y: auto; overflow-x: hidden; margin-bottom: 5px; padding-right: 5px;' id='long_menu_list'>";},menuEnd:function(){popup_elem.innerHTML+="</div></td></tr></table>";},menuLongEnd1:function(){popup_elem.innerHTML+="</div>";},makeMenu:function(id){if(typeof(id)=='undefined')
id='';popup_elem.menuStart(id);for(i=0;i<popup_elem.menuItems.length;i++){popup_elem.innerHTML+=popup_elem.menuItems[i];}
popup_elem.menuEnd();popup_elem.fill(popup_elem.innerHTML);popup_elem.isTooltip=false;popup_elem.isModal=false;},makeLongMenu:function(){popup_elem.menuLongStart();for(i=0;i<popup_elem.menuItems.length;i++){popup_elem.innerHTML+=popup_elem.menuItems[i];}
popup_elem.menuLongEnd1();popup_elem.fill(popup_elem.innerHTML+"</div></td></tr></table>");popup_elem.isTooltip=false;popup_elem.isModal=false;},clearMenu:function(){popup_elem.menuItems=[];},addCustomMenuItem:function(text,align){var code="<p style='white-space: nowrap; ";if(align&&align!='')
code=code+"text-align: "+align+";";code=code+"color: #A0A0A0; cursor: default; margin: 0px; padding: 0px;'>"+text+"";popup_elem.menuItems[popup_elem.menuItems.length]=code;},addMenuItem:function(text,ds,action,align){var code="<p style='white-space: nowrap; ";if(align&&align!='')
code=code+"text-align: "+align+";";if(ds){code+="color: #A0A0A0; cursor: default; margin: 0px; padding: 4px;";}
else{code+="color: #000000; cursor: pointer; padding: 4px; margin: 0px;' onmouseover='this.style.padding=\"3px\"; this.style.backgroundColor=\"#E0FEC0\"; this.style.border=\"#CEECAE 1px solid\";' onmouseout='this.style.padding=\"4px\"; this.style.backgroundColor=\"#FFFFFF\"; this.style.border=\"0px\";' onclick='";if(action&&action!=""){code+=action;}}
code=code+"'>"+text+"</p>";popup_elem.menuItems[popup_elem.menuItems.length]=code;},addLinkMenuItem:function(text,ds,url,align,nw,bold){var p="<p style='white-space: nowrap; ";var a="";if(align&&align!='')
p=p+"text-align: "+align+";";if(ds){p+="color: #A0A0A0; cursor: default; margin: 0px; padding: 4px;'>";}
else{p+="color: #003399; cursor: pointer; padding: 4px; margin: 0px;' onmouseover='this.style.padding=\"3px\"; this.style.backgroundColor=\"#E0FEC0\"; this.style.border=\"#CEECAE 1px solid\"; this.style.textDecoration = \"underline\";' onmouseout='this.style.padding=\"4px\"; this.style.backgroundColor=\"#FFFFFF\"; this.style.border=\"0px\"; this.style.textDecoration = \"none\";'>";if(url&&url!=""){a="<a href=\"";if(url.match(/^javascript:/i))
a=a+"javascript:void(0);\"";else
a=a+url+"\"";if(url.match(/^javascript:/i)){a=a+" onclick='if(xDef(event)) Event.stop(event); "+url.replace(/^javascript:/i,"")+"'";}
if(nw){a=a+" target='_blank' onclick='popup_elem.removeModal();'";}
if(bold){a=a+" style='font-weight: bold;'";}
a+=">";}}
a=a+p+text;a+="</p>";if(!ds&&url&&url!="")
a+="</a>";popup_elem.menuItems[popup_elem.menuItems.length]=a;},moveX:function(pos){if(!popup_elem.isModal)
$('tooltip_elem').style.left=pos+"px";else
popup_elem.elem.style.left=pos+"px";popup_elem.operaRefresh();},moveY:function(pos){if(!popup_elem.isModal)
$('tooltip_elem').style.top=pos+"px";else
popup_elem.elem.style.top=pos+"px";popup_elem.operaRefresh();},moveFromElemX:function(mx){popup_elem.moveX(getposOffset(popup_elem.elem,"left")+mx);},moveFromElemY:function(my){popup_elem.moveY(getposOffset(popup_elem.elem,"top")+my);$('tooltip_elem').style.visibility="visible";},addMenuLine:function(){var code="<div style='color: #A0A0A0; cursor: default; margin: 0px; padding-top: 5px; padding-bottom: 5px;'><div style='padding: 0px; margin: 0px; height: 1px; background-color: #CBCBCB; overflow: hidden;'></div></div>";popup_elem.menuItems[popup_elem.menuItems.length]=code;},addMenuButton:function(text,ds,action){var code="<p style='white-space: nowrap; text-align: left; color: #A0A0A0; cursor: default; margin: 0px; padding: 0px;'><table cellpadding=0 cellspacing=0 border=0><tr><td style='padding: 0px; margin: 0px;'><div style='color: #000000; cursor: pointer; padding: 0px; margin: 0px; width: 20px; height: 16px; background-color: #DCDCDC; vertical-align: middle; text-align: center; border: #A0A0A0 1px solid;' onmouseover='this.style.backgroundColor=\"#E0FEC0\";' onmouseout='this.style.backgroundColor=\"#DCDCDC\";' onclick='";if(action&&action!=""){code+=action;}
code=code+"'>+</div></td><td style='white-space: nowrap; color: #000000; padding: 0px; margin: 0px; vertical-align: middle; text-align: left; padding-left: 10px;'>"+text+"</td></tr></table></p>";popup_elem.menuItems[popup_elem.menuItems.length]=code;},realignBySize:function(){var height=$('tooltip_elem').offsetHeight;var width=$('tooltip_elem').offsetWidth;var html=popup_elem.innerHTML;popup_elem.build(popup_elem.elem,width,height,true);popup_elem.innerHTML=html;popup_elem.fill(popup_elem.innerHTML);}};function showModalWait(msg,height){var cur_msg=msg?msg:(typeof(msg_wait)!="undefined"?msg_wait:"Please wait...");var cur_height=height?height:(typeof(winHeight_wait)!="undefined"?winHeight_wait:72);popup_elem.buildModal("ajax_loader2",222,cur_height);popup_elem.fill("<table cellpadding='0' cellspacing='0' style='background: #FFFFFF; width: 222px; height: "+(cur_height-4)+"px; border: #99CB04 2px dotted; padding: 0px; margin: 0px;'><tr><td style='text-align: center; width: 222px; height: "+(cur_height-4)+"px; vertical-align: middle; padding: 0px; margin: 0px; font-size: 16px; border: 0px;'><b>"+cur_msg+"</b><br><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader2.gif' style='height: 32px; width: 32px; margin-top: 5px;' /></td></tr></table>");$('container').style.cursor="wait";cur_scroll_y=xScrollTop();cur_scroll_x=xScrollLeft();if(document.addEventListener){xModalDialog.grey.addEventListener("mousewheel",checkScroll,false);xModalDialog.grey.addEventListener("DOMMouseScroll",checkScroll,false);}
else if(document.attachEvent){xModalDialog.grey.attachEvent("onmousewheel",checkScroll);}
Event.observe(window,"scroll",stopWindowScroll,false);}
globalHideModal=function(){enableScrollerAfterModal();popup_elem.hideModal();if($('container'))$('container').style.cursor="default";if($('new_wording')&&!$('new_wording').isDisabled)$('new_wording').focus();if($('ni_popup')){popupCursorCheck=(typeof popupCursorCheck!='undefined')?popupCursorCheck:function(){};Event.stopObserving($('ni_popup'),"mouseover",popupCursorCheck);Event.stopObserving($('ni_popup'),"mouseout",popupCursorCheck);Event.stopObserving($('ni_popup'),"mousemove",popupCursorCheck);}
if($('warn_user')){popupCursorCheck=(typeof popupCursorCheck!='undefined')?popupCursorCheck:function(){};Event.stopObserving($('warn_user'),"mouseover",popupCursorCheck);Event.stopObserving($('warn_user'),"mouseout",popupCursorCheck);Event.stopObserving($('warn_user'),"mousemove",popupCursorCheck);}
if($('rss_elem')){popupRSSCursorCheck=(typeof popupRSSCursorCheck!='undefined')?popupRSSCursorCheck:function(){};Event.stopObserving($('rss_elem'),"mouseover",popupRSSCursorCheck);Event.stopObserving($('rss_elem'),"mouseout",popupRSSCursorCheck);Event.stopObserving($('rss_elem'),"mousemove",popupRSSCursorCheck);}
if($('modal_elem')){popupModalCursorCheck=(typeof popupModalCursorCheck!='undefined')?popupModalCursorCheck:function(){};Event.stopObserving($('modal_elem'),"mouseover",popupModalCursorCheck);Event.stopObserving($('modal_elem'),"mouseout",popupModalCursorCheck);Event.stopObserving($('modal_elem'),"mousemove",popupModalCursorCheck);if($('wysiwygwysiwyg')&&$('wysiwygwysiwyg').contentDocument&&!Prototype.Browser.IE){$('wysiwygwysiwyg').contentDocument.designMode="off";$('wysiwygwysiwyg').contentDocument.contentEditable=false;$('wysiwygwysiwyg').contentDocument.body.contentEditable=false;$('wysiwygwysiwyg').contentDocument.designMode="on";$('wysiwygwysiwyg').contentDocument.contentEditable=true;}}}
function showPWsmall(){var need_hide_float=false;var cur_br_tt_scroll_top=0;if($('br_tt'))
cur_br_tt_scroll_top=parseInt(xScrollTop($('br_tt')));if($('br_container')&&(!$('br_container').style.display||$('br_container').style.display!="none")){need_hide_float=true;br_hide_float_container();}
setTimeout("hideTooltip();",50);$('container').style.cursor="wait";var buttons=$("catsform").select("a.btn");buttons.each(function(button,index){if(index==0||index==2){button.disableBtn();}});popup_elem.operaRefresh();div=document.createElement("div");div.id="please_wait_grey";div.className="clsModalDialog";Element.setStyle(div,{padding:"0px",margin:"87px 5px",overflow:"hidden",backgroundColor:"#000000",width:"481px",height:"305px",visibility:"visible",position:"absolute",left:"0px",top:"0px",zIndex:"53"});div.innerHTML="&nbsp;";$("tt").insertAdjacentElement("beforeEnd",div);var fade=new Fadomatic($("please_wait_grey"),100,30,30,30);fade.fadeIn();if(!xModalDialog.instances["please_wait"]){div=document.createElement("div");div.id="please_wait";div.className="clsModalDialog";div.innerHTML="<table cellpadding='0' cellspacing='0' style='background: #FFFFFF; width: 222px; height: 68px; border: #99CB04 2px dotted; padding: 0px; margin: 0px;'><tr><td style='text-align: center; width: 222px; height: 68px; vertical-align: middle; padding: 0px; margin: 0px; font-size: 16px; border: 0px;'><b>"+"Please wait..."+"</b><br><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader2.gif' style='height: 32px; width: 32px; margin-top: 5px;' /></td></tr></table>";Element.setStyle(div,{backgroundColor:"#FFFFFF",visibility:"hidden",position:"absolute",left:"-500px",top:"-500px",width:"222px",height:"72px",padding:"0px",margin:"0px",overflow:"hidden",zIndex:"52"});$("select_topics").insertAdjacentElement("afterEnd",div);new xModalDialog("please_wait");}
$('please_wait').setStyle({visibility:"visible",display:"block"});if(xModalDialog.instances["please_wait"]){xModalDialog.instances["please_wait"].show();$("please_wait").style.left=(parseInt($("please_wait").style.left.replace("px",""))-15)+"px";}
if(need_hide_float){br_show_float_container();}
if($('br_tt'))
$('br_tt').scrollTop=cur_br_tt_scroll_top;popup_elem.operaRefresh();}
function hidePWsmall(){$('container').style.cursor="default";if(!Object.isUndefined(trunks)&&!Object.isUndefined(trunks.t0)&&(trunks.t0.all==1||(trunks.t0.all==0&&Object.keys(trunks.t0.subs).length>0))){var buttons=$("catsform").select("a.btn");buttons.each(function(button,index){if(index==0||index==2){button.enableBtn();}});}
popup_elem.operaRefresh();if(xModalDialog.instances["please_wait"]){$('please_wait').style.display="none";$('please_wait_grey').parentNode.removeChild($('please_wait_grey'));popup_elem.operaRefresh();}}
function appearSlow(e,w,h,tw,th,onfinish){Element.setStyle(e,{width:tw-(w*w)+"px",height:th-(h*h)+"px"});Element.setStyle(xFirstChild(e,"div"),{width:tw-(w*w)+"px",height:th-(h*h)+"px"});popup_elem.pw=tw-(w*w);popup_elem.ph=th-(h*h);xMoveTo(e,xLeft(e)-w+0.5,xTop(e)-h+0.5);if((w*w)>0&&(h*h)>0)
setTimeout("appearSlow($('"+e.id+"'), "+(w-1)+", "+(h-1)+", "+tw+", "+th+", '"+onfinish+"');",0);else
eval(""+onfinish+"();");}
function goSelectCat(){popup_elem.buildModal("select_topics",0,0);popup_elem.fill("<div style='margin: 0px; padding: 0px; font-size: 16px; vertical-align: top; width: 0px; height: 0px; text-align: left; border: #8E8E8E 2px solid; background: #FFFFFF;'><div id='categories_popup' style='margin: 0px; padding: 0px;'>&nbsp;</div></div>");$("select_topics").setStyle({overflow:'visible',backgroundColor:'transparent'});var cornersObj=new curvyCorners({tl:{radius:10},tr:{radius:10},bl:{radius:10},br:{radius:10},antiAlias:true,autoPad:false},$('categories_popup').parentNode);cornersObj.applyCornersToAll();appearSlow($("select_topics"),21,21,491,441,"fillCategoriesDialog");}
function showPW2(label){if(typeof label!="undefined"&&label=='ok'){updateTopicsJSON();search_trunks=URLEncodeEmail($("searchform").trunks.value);try{$("catsform").submit();}
catch(err){void(0);}
popup_elem.destroyModal();xModalDialog.instances["select_topics"]=null;enableScrollerAfterModal();if(typeof(navGo)=='function')
if(typeof search_total!="undefined"&&search_total==0&&typeof search_page!="undefined"&&search_page!=1)
$("searchform").submit();else
navGo(1,false,"updateFilterCats");}
else{$("searchform").trunks.value=unescape(search_trunks);popup_elem.destroyModal();xModalDialog.instances["select_topics"]=null;globalHideModal();}}
function showPW1(elem){if(elem.value=='ok'){updateTopicsJSON();search_trunks=URLEncodeEmail($("searchform").trunks.value);try{$("catsform").submit();}
catch(err){void(0);}
popup_elem.destroyModal();xModalDialog.instances["select_topics"]=null;Event.stopObserving(window,"scroll",stopWindowScroll,false);if(document.addEventListener){xModalDialog.grey.removeEventListener("mousewheel",checkScroll,false);xModalDialog.grey.removeEventListener("DOMMouseScroll",checkScroll,false);}
else if(document.attachEvent){xModalDialog.grey.detachEvent("onmousewheel",checkScroll);}
if(typeof(navGo)=='function')
navGo(1,false,"updateFilterCats");}
else{$("searchform").trunks.value=unescape(search_trunks);popup_elem.destroyModal();globalHideModal();xModalDialog.instances["select_topics"]=null;}}
resizeButtonsGroups=function(g1,g2){resizeButtonsGroup($(g1));resizeButtonsGroup($(g2));};function fillCategoriesDialog(){$('categories_popup').parentNode.style.cursor="wait";$('categories_popup').innerHTML="<div style='font-size: 12px; padding-left: 13px;'>"+"Please wait..."+"<div style='padding-top: 180px; text-align: center; margin-left: -13px;'><img src='"+wgStaticFilesServer+"/templates/icons/ajax-loader3.gif' border=0 alt='"+"Please wait..."+"' /></div></div>";var url='/Q/Special:Search&ajax=1&act=selcats';new Ajax.Request(url,{parameters:"",onSuccess:function(transport){$('categories_popup').parentNode.style.cursor="default";cur_scroll_y=xScrollTop();cur_scroll_x=xScrollLeft();if(document.addEventListener){xModalDialog.grey.addEventListener("mousewheel",checkScroll,false);xModalDialog.grey.addEventListener("DOMMouseScroll",checkScroll,false);$('categories_popup').parentNode.addEventListener("mousewheel",checkScroll,false);$('categories_popup').parentNode.addEventListener("DOMMouseScroll",checkScroll,false);}
else if(document.attachEvent){xModalDialog.grey.attachEvent("onmousewheel",checkScroll);$('categories_popup').parentNode.attachEvent("onmousewheel",checkScroll);}
Event.observe(window,"scroll",stopWindowScroll,false);$('categories_popup').style.fontSize="12px";$('categories_popup').innerHTML=""+transport.responseText+"";trunks=eval('('+document.forms['searchform'].trunks.value+')');selectTopicsFromJSON(trunks,true);},onException:function(requester,except){alertBrowserError();popup_elem.destroyModal();globalHideModal();xModalDialog.instances["select_topics"]=null;Event.stopObserving(window,"scroll",stopWindowScroll,false);if(document.addEventListener){xModalDialog.grey.removeEventListener("mousewheel",checkScroll,false);xModalDialog.grey.removeEventListener("DOMMouseScroll",checkScroll,false);}
else if(document.attachEvent){xModalDialog.grey.detachEvent("onmousewheel",checkScroll);}}});}
var cur_scroll_x=0;var cur_scroll_y=0;var stopScroll=function(event){event=event?event:window.event;if(event.stopPropagation)
event.stopPropagation();if(event.preventDefault)
event.preventDefault();event.cancelBubble=true;event.cancel=true;event.returnValue=false;return false;};var checkScroll=function(e){var targ;if(!e)var e=window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType&&targ.nodeType==3)
targ=targ.parentNode;var wheelData=e.detail?e.detail*-1:e.wheelDelta/40;if(targ&&targ.name&&targ.name=="wpNote")targ=document.forms['stfform'].wpNote;while(targ&&targ.id!='container'){targ=((targ.id&&targ.id=='long_menu_list')||(targ.name&&targ.name=="wpNote"))?targ:targ.parentNode;if(targ&&((targ.id&&(targ.id=='categories_popup'||targ.id=='recat_help_popup'||targ.id=='long_menu_list'))||(targ.name&&targ.name=="wpNote"))){var tmp_div=($("tt"))?$("tt"):(($("help_text"))?$("help_text"):targ);if(wheelData<0){if(tmp_div.scrollTop<tmp_div.scrollHeight){if(tmp_div.scrollTop+20<=tmp_div.scrollHeight){tmp_div.scrollTop=tmp_div.scrollTop+20;}
else{tmp_div.scrollTop=tmp_div.scrollHeight-tmp_div.scrollTop;}}}
else{if(tmp_div.scrollTop>0){if(tmp_div.scrollTop-20>=0){tmp_div.scrollTop=tmp_div.scrollTop-20;}
else{tmp_div.scrollTop=0;}}}
break;}}
stopScroll(e);};var stopWindowScroll=function(event){if(window.document.documentElement&&xDef(window.document.documentElement.scrollTop)&&(!navigator.vendor||!navigator.vendor.match(/apple/i))){window.document.documentElement.scrollTop=cur_scroll_y;window.document.documentElement.scrollLeft=cur_scroll_x;}
else if((window.document.body&&xDef(window.document.body.scrollTop))||(navigator.vendor&&navigator.vendor.match(/apple/i))){window.document.body.scrollTop=cur_scroll_y;window.document.body.scrollLeft=cur_scroll_x;}
stopScroll(event);};var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=Base64._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}
output=output+this._keyStr.charAt(enc1)
+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)
+this._keyStr.charAt(enc4);}
return output;},decode:function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2);}
if(enc4!=64){output=output+String.fromCharCode(chr3);}}
output=Base64._utf8_decode(output);return output;},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;},_utf8_decode:function(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return string;}}
function startOnClick(str,lid,lpos){if(lid!=null&&lpos!=null)
_hbLink(lid,lpos);if(str!=null){var u=Base64.decode(str);if(u.trim().indexOf("http")==0)
location.href=u;else
location.href="http://www.answers.com";}}
var checkSubmitUnified=function(obj){var head_ask=$('head_ask');if(head_ask!=null&&head_ask.value.trim()=="")
return false;var val=getSelectedRadioUnified('lookup1','searchType');var wssStatus=(document.lookup1.wssStatus?document.lookup1.wssStatus.value:'');var submit;switch(val){case'wa':obj.action=obj.waaction.value;document.lookup1.gov.value="0";obj.method="POST";obj.s.value=obj.title.value;_hbLink('Search_QA',wssStatus);submit=true;break;case'ra':obj.action=obj.raaction.value;document.lookup1.gov.value="0";obj.s.value=obj.title.value;_hbLink('Search_Ref',wssStatus);obj.method="GET";submit=submitHandlerUnified(obj,null,"www.answers.com");break;case'all':obj.action=obj.waaction.value;obj.method="POST";document.lookup1.gov.value="1";obj.s.value=obj.title.value;_hbLink('Search_All',wssStatus);submit=true;break;}
return submit;};function getSelectedRadioUnified(formName,radioName){var radioGroup=eval("document."+formName+"."+radioName);if(typeof radioGroup!="undefined"){var len=radioGroup.length;for(var i=0;i<len;i++){if(radioGroup[i].checked){return radioGroup[i].value;}}}
return"";}
function submitHandlerUnified(f_el,target,ts,p){var val=f_el.s?f_el.s.value:f_el.value;var form=f_el.form?f_el.form:f_el;if(val&&val.search(/\S/)!=-1){if(location.pathname.indexOf("/answers/")==0||val.search(/\+/)>=0){if(typeof returnFalse!="undefined"&&form.onsubmit&&form.onsubmit==returnFalse){form.onsubmit=returnTrue;}return true};if(val=="robots.txt"||val=="favicon.ico")val='"'+val+'"';var func=typeof(encodeURIComponent)!="undefined"?encodeURIComponent:escape;if(location.search.indexOf("gwp=13")>-1||location.search.indexOf("ff=1")>-1){if(p)p+="&ff=1";else p="ff=1";}
var host=location.host;if(host.indexOf("ir.answers")>=0)
host="www.answers.com";var url=location.protocol+"//"+(ts?ts:host)+"/"+func(val)+(p?"?"+p:"");if(target){window.open(url,target);}
else
location.href=url;}
return false;}
function printPage(){window.print();}
function printPageTopic(){location.href=location.href+"?&print=true";}
function preloadToolsIcons(){var homeIcon=new Image();printIcon=new Image(),settingsIcon=new Image(),helpIcon=new Image(),searchIcon=new Image();homeIcon.src=wgStaticFilesServer+'/templates/icons/icon-home-hover.gif';searchIcon.src=wgStaticFilesServer+'/templates/icons/icon-search-hover.gif';printIcon.src=wgStaticFilesServer+'/templates/icons/icon-print-hover.gif';settingsIcon.src=wgStaticFilesServer+'/templates/icons/icon-settings-hover.gif';helpIcon.src=wgStaticFilesServer+'/templates/icons/icon-help-hover.gif';}