﻿


//alert("inside-1");
if (document.getElementById("toptable") != null)
{

//alert("inside");
//document.getElementById("toptable").style.visibility="visible";
//alert("inside-2");
//document.getElementById("loadingDiv").style.display="none";
}
/*
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.3.0
*/

if(typeof YAHOO=="undefined"){var YAHOO={};}
YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}
return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}
var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}
if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(name){return YAHOO.env.modules[name]||null;};YAHOO.env.ua=function(){var o={ie:0,opera:0,gecko:0,webkit:0};var ua=navigator.userAgent,m;if((/KHTML/).test(ua)){o.webkit=1;}
m=ua.match(/AppleWebKit\/([^\s]*)/);if(m&&m[1]){o.webkit=parseFloat(m[1]);}
if(!o.webkit){m=ua.match(/Opera[\s\/]([^\s]*)/);if(m&&m[1]){o.opera=parseFloat(m[1]);}else{m=ua.match(/MSIE\s([^;]*)/);if(m&&m[1]){o.ie=parseFloat(m[1]);}else{m=ua.match(/Gecko\/([^\s]*)/);if(m){o.gecko=1;m=ua.match(/rv:([^\s\)]*)/);if(m&&m[1]){o.gecko=parseFloat(m[1]);}}}}}
return o;}();(function(){YAHOO.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}
if(unique){ls.push(l);}}}})();YAHOO.lang={isArray:function(o){if(o){var l=YAHOO.lang;return l.isNumber(o.length)&&l.isFunction(o.splice)&&!l.hasOwnProperty(o.length);}
return false;},isBoolean:function(o){return typeof o==='boolean';},isFunction:function(o){return typeof o==='function';},isNull:function(o){return o===null;},isNumber:function(o){return typeof o==='number'&&isFinite(o);},isObject:function(o){return(o&&(typeof o==='object'||YAHOO.lang.isFunction(o)))||false;},isString:function(o){return typeof o==='string';},isUndefined:function(o){return typeof o==='undefined';},hasOwnProperty:function(o,prop){if(Object.prototype.hasOwnProperty){return o.hasOwnProperty(prop);}
return!YAHOO.lang.isUndefined(o[prop])&&o.constructor.prototype[prop]!==o[prop];},_IEEnumFix:function(r,s){if(YAHOO.env.ua.ie){var add=["toString","valueOf"];for(i=0;i<add.length;i=i+1){var fname=add[i],f=s[fname];if(YAHOO.lang.isFunction(f)&&f!=Object.prototype[fname]){r[fname]=f;}}}},extend:function(subc,superc,overrides){if(!superc||!subc){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}
var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}
if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}
YAHOO.lang._IEEnumFix(subc.prototype,overrides);}},augmentObject:function(r,s){if(!s||!r){throw new Error("Absorb failed, verify dependencies.");}
var a=arguments,i,p,override=a[2];if(override&&override!==true){for(i=2;i<a.length;i=i+1){r[a[i]]=s[a[i]];}}else{for(p in s){if(override||!r[p]){r[p]=s[p];}}
YAHOO.lang._IEEnumFix(r,s);}},augmentProto:function(r,s){if(!s||!r){throw new Error("Augment failed, verify dependencies.");}
var a=[r.prototype,s.prototype];for(var i=2;i<arguments.length;i=i+1){a.push(arguments[i]);}
YAHOO.lang.augmentObject.apply(this,a);},dump:function(o,d){var l=YAHOO.lang,i,len,s=[],OBJ="{...}",FUN="f(){...}",COMMA=', ',ARROW=' => ';if(!l.isObject(o)||o instanceof Date||("nodeType"in o&&"tagName"in o)){return o;}else if(l.isFunction(o)){return FUN;}
d=(l.isNumber(d))?d:3;if(l.isArray(o)){s.push("[");for(i=0,len=o.length;i<len;i=i+1){if(l.isObject(o[i])){s.push((d>0)?l.dump(o[i],d-1):OBJ);}else{s.push(o[i]);}
s.push(COMMA);}
if(s.length>1){s.pop();}
s.push("]");}else{s.push("{");for(i in o){if(l.hasOwnProperty(o,i)){s.push(i+ARROW);if(l.isObject(o[i])){s.push((d>0)?l.dump(o[i],d-1):OBJ);}else{s.push(o[i]);}
s.push(COMMA);}}
if(s.length>1){s.pop();}
s.push("}");}
return s.join("");},substitute:function(s,o,f){var i,j,k,key,v,meta,l=YAHOO.lang,saved=[],token,DUMP='dump',SPACE=' ',LBRACE='{',RBRACE='}';for(;;){i=s.lastIndexOf(LBRACE);if(i<0){break;}
j=s.indexOf(RBRACE,i);if(i+1>=j){break;}
token=s.substring(i+1,j);key=token;meta=null;k=key.indexOf(SPACE);if(k>-1){meta=key.substring(k+1);key=key.substring(0,k);}
v=o[key];if(f){v=f(key,v,meta);}
if(l.isObject(v)){if(l.isArray(v)){v=l.dump(v,parseInt(meta,10));}else{meta=meta||"";var dump=meta.indexOf(DUMP);if(dump>-1){meta=meta.substring(4);}
if(v.toString===Object.prototype.toString||dump>-1){v=l.dump(v,parseInt(meta,10));}else{v=v.toString();}}}else if(!l.isString(v)&&!l.isNumber(v)){v="~-"+saved.length+"-~";saved[saved.length]=token;}
s=s.substring(0,i)+v+s.substring(j+1);}
for(i=saved.length-1;i>=0;i=i-1){s=s.replace(new RegExp("~-"+i+"-~"),"{"+saved[i]+"}","g");}
return s;},trim:function(s){try{return s.replace(/^\s+|\s+$/g,"");}catch(e){return s;}},merge:function(){var o={},a=arguments,i;for(i=0;i<a.length;i=i+1){YAHOO.lang.augmentObject(o,a[i],true);}
return o;},isValue:function(o){var l=YAHOO.lang;return(l.isObject(o)||l.isString(o)||l.isNumber(o)||l.isBoolean(o));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.3.0",build:"442"});
(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={},reClassNameCache={};var isOpera=YAHOO.env.ua.opera,isSafari=YAHOO.env.ua.webkit,isGecko=YAHOO.env.ua.gecko,isIE=YAHOO.env.ua.ie;var patterns={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}
if(propertyCache[property]){return propertyCache[property];}
var converted=property;while(patterns.HYPHEN.exec(converted)){converted=converted.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}
propertyCache[property]=converted;return converted;};var getClassRegEx=function(className){var re=reClassNameCache[className];if(!re){re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');reClassNameCache[className]=re;}
return re;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;if(property=='float'){property='cssFloat';}
var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}
return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}
return val/100;case'float':property='styleFloat';default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}
if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(YAHOO.lang.isString(el.style.filter)){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}
break;case'float':property='styleFloat';default:el.style[property]=val;}};}else{setStyle=function(el,property,val){if(property=='float'){property='cssFloat';}
el.style[property]=val;};}
var testElement=function(node,method){return node&&node.nodeType==1&&(!method||method(node));};YAHOO.util.Dom={get:function(el){if(!el||el.tagName||el.item){return el;}
if(YAHOO.lang.isString(el)){return document.getElementById(el);}
if(el.splice){var c=[];for(var i=0,len=el.length;i<len;++i){c[c.length]=Y.Dom.get(el[i]);}
return c;}
return el;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none')&&el!=document.body){return false;}
var parentNode=null;var pos=[];var box;var doc=el.ownerDocument;if(el.getBoundingClientRect){box=el.getBoundingClientRect();return[box.left+Y.Dom.getDocumentScrollLeft(el.ownerDocument),box.top+Y.Dom.getDocumentScrollTop(el.ownerDocument)];}
else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;var hasAbs=this.getStyle(el,'position')=='absolute';if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if(isSafari&&!hasAbs&&this.getStyle(parentNode,'position')=='absolute'){hasAbs=true;}
parentNode=parentNode.offsetParent;}}
if(isSafari&&hasAbs){pos[0]-=el.ownerDocument.body.offsetLeft;pos[1]-=el.ownerDocument.body.offsetTop;}}
parentNode=el.parentNode;while(parentNode.tagName&&!patterns.ROOT_TAG.test(parentNode.tagName))
{if(Y.Dom.getStyle(parentNode,'display').search(/^inline|table-row.*$/i)){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
parentNode=parentNode.parentNode;}
return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}
var pageXY=this.getXY(el);if(pageXY===false){return false;}
var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}
if(isNaN(delta[1])){delta[1]=(style_pos=='relative')?0:el.offsetTop;}
if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}
if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}
if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none')&&el!=document.body){return false;}
var region=Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root,apply){tag=tag||'*';root=(root)?Y.Dom.get(root):null||document;if(!root){return[];}
var nodes=[],elements=root.getElementsByTagName(tag),re=getClassRegEx(className);for(var i=0,len=elements.length;i<len;++i){if(re.test(elements[i].className)){nodes[nodes.length]=elements[i];if(apply){apply.call(elements[i],elements[i]);}}}
return nodes;},hasClass:function(el,className){var re=getClassRegEx(className);var f=function(el){return re.test(el.className);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return false;}
el.className=YAHOO.lang.trim([el.className,className].join(' '));return true;};return Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=getClassRegEx(className);var f=function(el){if(!this.hasClass(el,className)){return false;}
var c=el.className;el.className=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}
el.className=YAHOO.lang.trim(el.className);return true;};return Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(!newClassName||oldClassName===newClassName){return false;}
var re=getClassRegEx(oldClassName);var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return true;}
el.className=el.className.replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}
el.className=YAHOO.lang.trim(el.className);return true;};return Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';var f=function(el){if(el&&el.id){return el.id;}
var id=prefix+id_counter++;if(el){el.id=id;}
return id;};return Y.Dom.batch(el,f,Y.Dom,true)||f.apply(Y.Dom,arguments);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}
var f=function(node){if(haystack.contains&&node.nodeType&&!isSafari){return haystack.contains(node);}
else if(haystack.compareDocumentPosition&&node.nodeType){return!!(haystack.compareDocumentPosition(node)&16);}else if(node.nodeType){return!!this.getAncestorBy(node,function(el){return el==haystack;});}
return false;};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){if(isSafari){while(el=el.parentNode){if(el==document.documentElement){return true;}}
return false;}
return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root,apply){tag=tag||'*';root=(root)?Y.Dom.get(root):null||document;if(!root){return[];}
var nodes=[],elements=root.getElementsByTagName(tag);for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];if(apply){apply(elements[i]);}}}
return nodes;},batch:function(el,method,o,override){el=(el&&el.tagName)?el:Y.Dom.get(el);if(!el||!method){return false;}
var scope=(override)?o:window;if(el.tagName||(!el.item&&!el.slice)){return method.call(scope,el,o);}
var collection=[];for(var i=0,len=el.length;i<len;++i){collection[collection.length]=method.call(scope,el[i],o);}
return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!='CSS1Compat')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!='CSS1Compat')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode=='CSS1Compat')?document.documentElement.clientHeight:document.body.clientHeight;}
return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode=='CSS1Compat')?document.documentElement.clientWidth:document.body.clientWidth;}
return width;},getAncestorBy:function(node,method){while(node=node.parentNode){if(testElement(node,method)){return node;}}
return null;},getAncestorByClassName:function(node,className){node=Y.Dom.get(node);if(!node){return null;}
var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getAncestorBy(node,method);},getAncestorByTagName:function(node,tagName){node=Y.Dom.get(node);if(!node){return null;}
var method=function(el){return el.tagName&&el.tagName.toUpperCase()==tagName.toUpperCase();};return Y.Dom.getAncestorBy(node,method);},getPreviousSiblingBy:function(node,method){while(node){node=node.previousSibling;if(testElement(node,method)){return node;}}
return null;},getPreviousSibling:function(node){node=Y.Dom.get(node);if(!node){return null;}
return Y.Dom.getPreviousSiblingBy(node);},getNextSiblingBy:function(node,method){while(node){node=node.nextSibling;if(testElement(node,method)){return node;}}
return null;},getNextSibling:function(node){node=Y.Dom.get(node);if(!node){return null;}
return Y.Dom.getNextSiblingBy(node);},getFirstChildBy:function(node,method){var child=(testElement(node.firstChild,method))?node.firstChild:null;return child||Y.Dom.getNextSiblingBy(node.firstChild,method);},getFirstChild:function(node,method){node=Y.Dom.get(node);if(!node){return null;}
return Y.Dom.getFirstChildBy(node);},getLastChildBy:function(node,method){if(!node){return null;}
var child=(testElement(node.lastChild,method))?node.lastChild:null;return child||Y.Dom.getPreviousSiblingBy(node.lastChild,method);},getLastChild:function(node){node=Y.Dom.get(node);return Y.Dom.getLastChildBy(node);},getChildrenBy:function(node,method){var child=Y.Dom.getFirstChildBy(node,method);var children=child?[child]:[];Y.Dom.getNextSiblingBy(child,function(node){if(!method||method(node)){children[children.length]=node;}
return false;});return children;},getChildren:function(node){node=Y.Dom.get(node);if(!node){}
return Y.Dom.getChildrenBy(node);},getDocumentScrollLeft:function(doc){doc=doc||document;return Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);},getDocumentScrollTop:function(doc){doc=doc||document;return Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);},insertBefore:function(newNode,referenceNode){newNode=Y.Dom.get(newNode);referenceNode=Y.Dom.get(referenceNode);if(!newNode||!referenceNode||!referenceNode.parentNode){return null;}
return referenceNode.parentNode.insertBefore(newNode,referenceNode);},insertAfter:function(newNode,referenceNode){newNode=Y.Dom.get(newNode);referenceNode=Y.Dom.get(referenceNode);if(!newNode||!referenceNode||!referenceNode.parentNode){return null;}
if(referenceNode.nextSibling){return referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling);}else{return referenceNode.parentNode.appendChild(newNode);}}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(YAHOO.lang.isArray(x)){y=x[1];x=x[0];}
this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.3.0",build:"442"});
YAHOO.util.CustomEvent=function(type,oScope,silent,signature){this.type=type;this.scope=oScope||window;this.silent=silent;this.signature=signature||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}
var onsubscribeType="_YUICEOnSubscribe";if(type!==onsubscribeType){this.subscribeEvent=new YAHOO.util.CustomEvent(onsubscribeType,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,obj,override){if(!fn){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}
if(this.subscribeEvent){this.subscribeEvent.fire(fn,obj,override);}
this.subscribers.push(new YAHOO.util.Subscriber(fn,obj,override));},unsubscribe:function(fn,obj){if(!fn){return this.unsubscribeAll();}
var found=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,obj)){this._delete(i);found=true;}}
return found;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}
var args=[],ret=true,i,rebuild=false;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}
var argslength=args.length;if(!this.silent){}
for(i=0;i<len;++i){var s=this.subscribers[i];if(!s){rebuild=true;}else{if(!this.silent){}
var scope=s.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var param=null;if(args.length>0){param=args[0];}
ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);}
if(false===ret){if(!this.silent){}
return false;}}}
if(rebuild){var newlist=[],subs=this.subscribers;for(i=0,len=subs.length;i<len;++i){s=subs[i];newlist.push(subs[i]);}
this.subscribers=newlist;}
return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}
this.subscribers=[];return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}
this.subscribers[index]=null;},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=YAHOO.lang.isUndefined(obj)?null:obj;this.override=override;};YAHOO.util.Subscriber.prototype.getScope=function(defaultScope){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}
return defaultScope;};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return(this.fn==fn&&this.obj==obj);}else{return(this.fn==fn);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var loadComplete=false;var DOMReady=false;var listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var webkitKeymap={63232:38,63233:40,63234:37,63235:39};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,startInterval:function(){if(!this._interval){var self=this;var callback=function(){self._tryPreloadAttach();};this._interval=setInterval(callback,this.POLL_INTERVAL);}},onAvailable:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:false});retryCount=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(p_fn,p_obj,p_override){if(DOMReady){setTimeout(function(){var s=window;if(p_override){if(p_override===true){s=p_obj;}else{s=p_override;}}
p_fn.call(s,"DOMReady",[],p_obj);},0);}else{this.DOMReadyEvent.subscribe(p_fn,p_obj,p_override);}},onContentReady:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:true});retryCount=this.POLL_RETRYS;this.startInterval();},addListener:function(el,sType,fn,obj,override){if(!fn||!fn.call){return false;}
if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],sType,fn,obj,override)&&ok;}
return ok;}else if(YAHOO.lang.isString(el)){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){YAHOO.util.Event.on(el,sType,fn,obj,override);});return true;}}
if(!el){return false;}
if("unload"==sType&&obj!==this){unloadListeners[unloadListeners.length]=[el,sType,fn,obj,override];return true;}
var scope=el;if(override){if(override===true){scope=obj;}else{scope=override;}}
var wrappedFn=function(e){return fn.call(scope,YAHOO.util.Event.getEvent(e),obj);};var li=[el,sType,fn,wrappedFn,scope];var index=listeners.length;listeners[index]=li;if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);if(legacyIndex==-1||el!=legacyEvents[legacyIndex][0]){legacyIndex=legacyEvents.length;legacyMap[el.id+sType]=legacyIndex;legacyEvents[legacyIndex]=[el,sType,el["on"+sType]];legacyHandlers[legacyIndex]=[];el["on"+sType]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),legacyIndex);};}
legacyHandlers[legacyIndex].push(li);}else{try{this._simpleAdd(el,sType,wrappedFn,false);}catch(ex){this.lastError=ex;this.removeListener(el,sType,fn);return false;}}
return true;},fireLegacyEvent:function(e,legacyIndex){var ok=true,le,lh,li,scope,ret;lh=legacyHandlers[legacyIndex];for(var i=0,len=lh.length;i<len;++i){li=lh[i];if(li&&li[this.WFN]){scope=li[this.ADJ_SCOPE];ret=li[this.WFN].call(scope,e);ok=(ok&&ret);}}
le=legacyEvents[legacyIndex];if(le&&le[2]){le[2](e);}
return ok;},getLegacyIndex:function(el,sType){var key=this.generateId(el)+sType;if(typeof legacyMap[key]=="undefined"){return-1;}else{return legacyMap[key];}},useLegacyEvent:function(el,sType){if(this.webkit&&("click"==sType||"dblclick"==sType)){var v=parseInt(this.webkit,10);if(!isNaN(v)&&v<418){return true;}}
return false;},removeListener:function(el,sType,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],sType,fn)&&ok);}
return ok;}
if(!fn||!fn.call){return this.purgeElement(el,false,sType);}
if("unload"==sType){for(i=0,len=unloadListeners.length;i<len;i++){var li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners[i]=null;return true;}}
return false;}
var cacheItem=null;var index=arguments[3];if("undefined"==typeof index){index=this._getCacheIndex(el,sType,fn);}
if(index>=0){cacheItem=listeners[index];}
if(!el||!cacheItem){return false;}
if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i<len;++i){li=llist[i];if(li&&li[this.EL]==el&&li[this.TYPE]==sType&&li[this.FN]==fn){llist[i]=null;break;}}}}else{try{this._simpleRemove(el,sType,cacheItem[this.WFN],false);}catch(ex){this.lastError=ex;return false;}}
delete listeners[index][this.WFN];delete listeners[index][this.FN];listeners[index]=null;return true;},getTarget:function(ev,resolveTextNode){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(node){if(node&&3==node.nodeType){return node.parentNode;}else{return node;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}
return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}
return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else if(ev.type=="mouseover"){t=ev.fromElement;}}
return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}
return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}
c=c.caller;}}
return ev;},getCharCode:function(ev){var code=ev.keyCode||ev.charCode||0;if(YAHOO.env.ua.webkit&&(code in webkitKeymap)){code=webkitKeymap[code];}
return code;},_getCacheIndex:function(el,sType,fn){for(var i=0,len=listeners.length;i<len;++i){var li=listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==sType){return i;}}
return-1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+counter;++counter;el.id=id;}
return id;},_isValidCollection:function(o){try{return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");}catch(e){return false;}},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(e){if(!loadComplete){loadComplete=true;var EU=YAHOO.util.Event;EU._ready();EU._tryPreloadAttach();}},_ready:function(e){if(!DOMReady){DOMReady=true;var EU=YAHOO.util.Event;EU.DOMReadyEvent.fire();EU._simpleRemove(document,"DOMContentLoaded",EU._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}
if(this.isIE){if(!DOMReady){this.startInterval();return false;}}
this.locked=true;var tryAgain=!loadComplete;if(!tryAgain){tryAgain=(retryCount>0);}
var notAvail=[];var executeItem=function(el,item){var scope=el;if(item.override){if(item.override===true){scope=item.obj;}else{scope=item.override;}}
item.fn.call(scope,item.obj);};var i,len,item,el;for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&!item.checkReady){el=this.getEl(item.id);if(el){executeItem(el,item);onAvailStack[i]=null;}else{notAvail.push(item);}}}
for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&item.checkReady){el=this.getEl(item.id);if(el){if(loadComplete||el.nextSibling){executeItem(el,item);onAvailStack[i]=null;}}else{notAvail.push(item);}}}
retryCount=(notAvail.length===0)?0:retryCount-1;if(tryAgain){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}
this.locked=false;return true;},purgeElement:function(el,recurse,sType){var elListeners=this.getListeners(el,sType);if(elListeners){for(var i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(el,l.type,l.fn,l.index);}}
if(recurse&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],recurse,sType);}}},getListeners:function(el,sType){var results=[],searchLists;if(!sType){searchLists=[listeners,unloadListeners];}else if(sType=="unload"){searchLists=[unloadListeners];}else{searchLists=[listeners];}
for(var j=0;j<searchLists.length;++j){var searchList=searchLists[j];if(searchList&&searchList.length>0){for(var i=0,len=searchList.length;i<len;++i){var l=searchList[i];if(l&&l[this.EL]===el&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}
return(results.length)?results:null;},_unload:function(e){var EU=YAHOO.util.Event,i,j,l,len,index;for(i=0,len=unloadListeners.length;i<len;++i){l=unloadListeners[i];if(l){var scope=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){scope=l[EU.OBJ];}else{scope=l[EU.ADJ_SCOPE];}}
l[EU.FN].call(scope,EU.getEvent(e),l[EU.OBJ]);unloadListeners[i]=null;l=null;scope=null;}}
unloadListeners=null;if(listeners&&listeners.length>0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}
j=j-1;}
l=null;EU.clearCache();}
for(i=0,len=legacyEvents.length;i<len;++i){legacyEvents[i][0]=null;legacyEvents[i]=null;}
legacyEvents=null;EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(el,sType,fn,capture){el.addEventListener(sType,fn,(capture));};}else if(window.attachEvent){return function(el,sType,fn,capture){el.attachEvent("on"+sType,fn);};}else{return function(){};}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,sType,fn,capture){el.removeEventListener(sType,fn,(capture));};}else if(window.detachEvent){return function(el,sType,fn){el.detachEvent("on"+sType,fn);};}else{return function(){};}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var el,d=document,b=d.body;if(("undefined"!==typeof YAHOO_config)&&YAHOO_config.injecting){el=document.createElement("script");var p=d.getElementsByTagName("head")[0]||b;p.insertBefore(el,p.firstChild);}else{d.write('<scr'+'ipt id="_yui_eu_dr" defer="true" src="//:"><'+'/script>');el=document.getElementById("_yui_eu_dr");}
if(el){el.onreadystatechange=function(){if("complete"===this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};}else{}
el=null;}else if(EU.webkit){EU._drwatch=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._drwatch);EU._drwatch=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}
EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}
YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(p_type,p_fn,p_obj,p_override){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}else{this.__yui_subscribers=this.__yui_subscribers||{};var subs=this.__yui_subscribers;if(!subs[p_type]){subs[p_type]=[];}
subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){this.__yui_events=this.__yui_events||{};var evts=this.__yui_events;if(p_type){var ce=evts[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}}else{for(var i in evts){var ret=true;if(YAHOO.lang.hasOwnProperty(evts,i)){ret=ret&&evts[i].unsubscribe(p_fn,p_obj);}}
return ret;}
return false;},unsubscribeAll:function(p_type){return this.unsubscribe(p_type);},createEvent:function(p_type,p_config){this.__yui_events=this.__yui_events||{};var opts=p_config||{};var events=this.__yui_events;if(events[p_type]){}else{var scope=opts.scope||this;var silent=(opts.silent);var ce=new YAHOO.util.CustomEvent(p_type,scope,silent,YAHOO.util.CustomEvent.FLAT);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}
this.__yui_subscribers=this.__yui_subscribers||{};var qs=this.__yui_subscribers[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}
return events[p_type];},fireEvent:function(p_type,arg1,arg2,etc){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(!ce){return null;}
var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}
return ce.fire.apply(ce,args);},hasEvent:function(type){if(this.__yui_events){if(this.__yui_events[type]){return true;}}
return false;}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!attachTo){}else if(!keyData){}else if(!handler){}
if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
function handleKeyPress(e,obj){if(!keyData.shift){keyData.shift=false;}
if(!keyData.alt){keyData.alt=false;}
if(!keyData.ctrl){keyData.ctrl=false;}
if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){var dataItem;var keyPressed;if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){dataItem=keyData.keys[i];if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);break;}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);break;}}}else{dataItem=keyData.keys;if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);}}}}
this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+
(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.3.0",build:"442"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.3.0", build: "442"});


/*
librarydm.js javascript file copy
*/

var White = "#ffffff";
var Black = "#000000";
var BadInput = "#ffffbb";
var SelectRequiredColor = "#fff7f7";

var digits = "0123456789";
var lowerCaseLetters = "abcdefghijklmnopqrstuvwxyz";
var upperCaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var alphaChars = lowerCaseLetters + upperCaseLetters + digits + " .-_&";
var stringChars = alphaChars + ",?/<>;:'[]!@#$%&*()+=";
var whiteSpace = " \t\n\r";
var defaultHelp = "Please move mouse onto one of the options to get additional help.";

var monthNames = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
var dayNames = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

var IsIEbrowser = 0;

var ChildID = CalculateChildID();
eval("var childWindowLibraryDM_" + ChildID + ";");

/**** TEST AND VALIDATE FUNCTIONS ************************************/
// IsAmericanExpress(s)
// IsDecimal(s)
// IsDiscover(s)
// IsDate(s)
// IsEmail(s)
// IsEmpty(s)
// IsMajorCreditCard(s)
// IsMasterCard(s)
// IsUrl(s)
// IsValidCreditCard(s, clean)
// IsVisa(s)

/**** FORMATTING FUNCTIONS *******************************************/
// Caps(s, case)
// CutString (s, length, dots)
// FormatCurrency(num, dollar)
// NeatCharsInBag (s, bag, replaceChar)
// Reformat (s)
// StripCharsInBag (s, bag)
// StripCharsNotInBag (s, bag)
// ToggleImage (imageID, newSrc)
// Trim(s)

/**** USER INPUT FUNCTIONS **********************************/
// Blur(element)
// BlurForm(form)
// ValidateCreditCard(inputField, required)
// ValidateDate(inputField, required)
// ValidateEmail(inputField, required)
// ValidateForm(form)
// ValidateMonthYear(inputField, required)
// ValidateNumber(inputField, required, validChars, currency)
// ValidatePhone(inputField, required)
// ValidateRadio(inputField, required)
// ValidateSelection(inputField, required)
// ValidateSsn(inputField, required)
// ValidateString(inputField, required, validChars, case)
// ValidateText(inputField, required, list)
// ValidateTime(inputField, required)
// ValidateUrl(inputField, required)

/**** ADDITIONAL FUNCTIONS *******************************************/
// Ajax(script, seconds)
// ChildWindow(url, width, height, scrollbars, resizable)
// Property(objectName, propertyName, propertyValue, notString)
// ShowHelp(s)

/*********************************************************************/
/**** TEST AND VALIDATE FUNCTIONS ************************************/
/*********************************************************************/
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsAmericanExpress(s) {
  s = StripCharsNotInBag(s, digits);

  firstdig = s.substring(0, 1);
  seconddig = s.substring(1, 2);
  if (s.length == 15 && firstdig == 3 && (seconddig == 4 || seconddig == 7)) return IsValidCreditCard(s, 1);
  return false;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsDate(inputDate){
	return !isNaN(new Date(inputDate));
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsDiscover(s) {
  s = StripCharsNotInBag(s, digits);

  first4digs = s.substring(0, 4);

  if (s.length == 16 && first4digs == "6011") return IsValidCreditCard(s, 1);
  return false;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsEmail(s) {
  if (IsEmpty(s)) return false;
  return s.match(/^[A-Za-z0-9_]+([_\-\.]\w+)*\@[A-Za-z0-9_]+([_\-\.]\w+)*\.[A-Za-z0-9]+$/) ? true : false;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsEmpty(s) {
  return ((s == null) || (s.length == 0));
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsMajorCreditCard(s) {
  if (IsVisa(s) == 1) ccType = "Visa";
  else if (IsMasterCard(s)) ccType = "MasterCard";
  else if (IsAmericanExpress(s)) ccType = "American Express";
  else if (IsDiscover(s)) ccType = "Discover";
  else ccType = "";

  return ccType
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsMasterCard(s) {
  s = StripCharsNotInBag(s, digits);

  firstdig = s.substring(0, 1);
  seconddig = s.substring(1, 2);

  if (s.length == 16 && firstdig == 5 && (seconddig >= 1 && seconddig <= 5)) return IsValidCreditCard(s, 1);
  return false;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsUrl(s) {
  if (IsEmpty(s)) return false;

  return s.match(/^(https:\/\/)?[A-Za-z0-9]+([\-\.\?\^\|\+\/~#&=,;]\w+)*(:[0-9]+)?$/) ? true : false;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsValidCreditCard(s, clean) {
  if (!clean) s = StripCharsNotInBag(s, digits);
  if (s.length > 16 || s.length < 13) return (false);

  sum = 0; mul = 1; l = s.length;
  for (var i = 0; i < l; i++) {
    digit = s.substring(l - i - 1, l - i);
    tproduct = parseInt(digit, 10) * mul;

    if (tproduct >= 10) sum += (tproduct % 10) + 1;
    else sum += tproduct;

    if (mul == 1) mul++;
    else mul--;
  }

  if ((sum % 10) == 0) return true;
  else return false;
} 

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function IsVisa(s) {
  s = StripCharsNotInBag(s, digits);
  if ((s.length == 16 || s.length == 13) && s.substring(0, 1) == 4) return IsValidCreditCard(s, 1);
  return false;
}

/*********************************************************************/
/**** FORMATTING FUNCTIONS *******************************************/
/*********************************************************************/
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function Caps(s, textCase) {
  if (IsEmpty(s)) return "";
  if (s) {
  	s = NeatCharsInBag(s, whiteSpace);
    if (textCase == "upper") s = s.toUpperCase();
    else if (textCase == "lower") s = s.toLowerCase();
    else if(textCase != "none") {
      splitStr = s.split(" ");
      for(var i = 0; i < splitStr.length; i++) splitStr[i] = splitStr[i].substring(0, 1).toUpperCase() + splitStr[i].substring(1);
      s = splitStr.join(" ");
    }
	}
	return s;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function CutString (s, length, dots) {
  if (length == null) length = 0

  if (s.length > length) return s.substr(0, length) + dots;
  else return s;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function FormatCurrency(num, dollar) {
  if (num == null || (num == "" && num != 0)) return "";
  
  num = num.toString().replace(/\$|\,/g, '');
  if (isNaN(num)) num = "0";
  sign = (num == (num = Math.abs(num)));
  num = Math.floor(num * 100 + 0.50000000001);
  cents = num % 100;
  num = Math.floor(num / 100).toString();
  if (cents < 10) cents = "0" + cents;
  for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)
    num = num.substring(0, num.length - (4 * i + 3)) + ',' + num.substring(num.length - (4 * i + 3));
  return (((sign) ? '' : '-') + (dollar ? dollar : '') + num + '.' + cents);
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function NeatCharsInBag (s, bag, replaceChar) {
var i, j;
var returnString = "";

  if (IsEmpty(s)) return "";
  if (IsEmpty(bag)) bag = " ";
  if (IsEmpty(replaceChar)) replaceChar = " ";
  for (i = 0; i < s.length; i++) {
    if (bag.indexOf(s.charAt(i)) == -1) break;
  }
  for (j = i; j < s.length; j++) {   
    if (bag.indexOf(s.charAt(j)) == -1) returnString += s.charAt(j);
	  else if (j > 0 && bag.indexOf(s.charAt(j - 1)) == -1) returnString += replaceChar;
  }

  return returnString;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function Reformat (s) {
var arg;
var sPos = 0;
var resultString = "";

  if (IsEmpty(s)) return "";
  for (var i = 1; i < Reformat.arguments.length; i++) {
    arg = Reformat.arguments[i];
    if (i % 2 == 1) resultString += arg;
    else {
      resultString += s.substring(sPos, sPos + arg);
      sPos += arg;
    }
  }
  return resultString + s.substring(sPos);
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function StripCharsInBag (s, bag) {
var returnString = "";

  if (IsEmpty(s)) return "";
  if (IsEmpty(bag)) bag = "";
 
  for (var i = 0; i < s.length; i++) {   
    var c = s.charAt(i);
    if (bag.indexOf(c) == -1) returnString += c;
  }

  return returnString;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function StripCharsNotInBag (s, bag) {
var returnString = "";
var c;

  if (IsEmpty(s)) return "";
  if (IsEmpty(bag)) bag = "";
  for (var i = 0; i < s.length; i++) {   
    c = s.charAt(i);
    if (bag.indexOf(c) != -1) returnString += c;
  }
 
  return returnString;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ToggleImage (imageID, newSrc) {
var image = document.getElementById(imageID);

  if (image && newSrc) image.src = newSrc;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function Trim(s) { 
  if (IsEmpty(s)) return "";
  while (s.substring(0, 1) == ' ' || s.substring(0, 1) == '\t' || s.substring(0, 1) == '\n' || s.substring(0, 1) == '\r') 
    s = s.substring(1, s.length);
  while (s.substring(s.length - 1, s.length) == ' ' || s.substring(s.length - 1, s.length) == '\t' || 
         s.substring(s.length - 1, s.length) == '\n' || s.substring(s.length - 1, s.length) == '\r') 
    s = s.substring(0, s.length - 1);
  return s;
} 

/*********************************************************************/
/**** USER INPUT FUNCTIONS *******************************************/
/*********************************************************************/
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function Blur(element) {
var required = 0, kind, returnValue = false;

  if (!element) return true;
  kind = "" + element.getAttribute("kind");
  if (kind != null) {
    if (element.className && element.className.match(/required/i)) required = 1;
    switch (kind) {
      case "alpha": returnValue = ValidateString(element, required, alphaChars, element.getAttribute("case")); break;
      case "amount": returnValue = ValidateNumber(element, required, digits + '.-', 1); break;
      case "credit": returnValue = ValidateCreditCard(element, required); break;
      case "date": returnValue = ValidateDate(element, required); break;
      case "decimal": returnValue = ValidateNumber(element, required, digits + '.-'); break;
      case "email": returnValue = ValidateEmail(element, required); break;
      case "monthyear": returnValue = ValidateMonthYear(element, required); break;
      case "number": returnValue = ValidateNumber(element, required, digits + '-'); break;
      case "password": returnValue = ValidateString(element, required, stringChars, "none"); break;
      case "phone": returnValue = ValidatePhone(element, required); break;
      case "ukphone": returnValue = ValidateUKPhone(element, required); break;
      case "ukmobile": returnValue = ValidateUKMobile(element, required); break;
      case "radio": returnValue = ValidateRadio(element, required); break;
      case "select": returnValue = ValidateSelection(element, required); break;
      case "ssn": returnValue = ValidateSsn(element, required); break;
      case "string": returnValue = ValidateString(element, required, stringChars, element.getAttribute("case")); break;
      case "text": returnValue = ValidateText(element, required); break;
      case "textlist": returnValue = ValidateText(element, required, 1); break;
      case "time": returnValue = ValidateTime(element, required); break;
      case "username": returnValue = ValidateString(element, required, upperCaseLetters + digits + '.-_', "none"); break;
      case "url": returnValue = ValidateUrl(element, required); break;
      case "zip": returnValue = ValidateString(element, required, digits + ' -', "upper"); break;
      case "postcode": returnValue = ValidatePostCode(element, required, lowerCaseLetters + upperCaseLetters + digits + whiteSpace, "upper"); break;
      case "height": returnValue = ValidateHeight(element, required, digits + "',m,.","none"); break;
      default: returnValue = true;
    }
  }
  eval("if (window." + element.name.replace(/:/g, "_") + "Blur) " + element.name.replace(/:/g, "_") + "Blur()");
  return returnValue;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function BlurForm(form) {
  for (i = 0; i < form.elements.length; i++) {
    if (form.elements[i].type == "text" && form.elements[i].value)
      Blur (form.elements[i]);
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
var oldSearchType1 = "", oldSearchType2 = "";
PopupCalendar("Initiate");
var oldSearchType1 = "", oldSearchType2 = "";
function ListSearch(searchForm, same) {
  var alphaSearchOperators = Array("=", "=", "Not = ", "<>", "Exact = ", "==", "Starts", "~", "Between", "BETWEEN")
  //var alphaSearchOperators = Array("=", "=")
  var numberSearchOperators = Array("=", "=", ">=", ">=", "<=", "<=", "Between", "BETWEEN")
  var searchBy = searchForm.searchBy;
  var searchOperator = searchForm.searchOperator;
  var searchOperatorValue = searchOperator.value ? searchOperator.value : "=";

  splitValue = searchBy.value.split(/\^/);
  if (splitValue.length == 2) {
	if (same) {
	  if ((splitValue[1] == "alpha" || splitValue[1] == "email") && (searchOperator.options.length < 2 || (searchOperator.options.length >= 2 && searchOperator.options[2].value != "=="))) {
	for (i = searchOperator.options.length - 1; i >= 0 ; i--) searchOperator.options[i] = null;
	for (i = 0; i < alphaSearchOperators.length; i += 2)
	  searchOperator.options[i / 2] = new Option(alphaSearchOperators[i], alphaSearchOperators[i + 1], false, false);
	  }
	  else if ((splitValue[1] != "alpha" || splitValue[1] != "email")  && (searchOperator.options.length < 2 || (searchOperator.options.length >= 2 && searchOperator.options[2].value != ">="))) {
	for (i = searchOperator.options.length - 1; i >= 0 ; i--) searchOperator.options[i] = null;
	for (i = 0; i < numberSearchOperators.length; i += 2)
	  searchOperator.options[i / 2] = new Option(numberSearchOperators[i], numberSearchOperators[i + 1], false, false);
	  }
	}
	searchOperator.value = searchOperatorValue;
	newInnerHTML2 = ""
	if (splitValue[1] == "date") {
	  newInnerHTML1 = "<input kind='date' id='dbSearchValue1' class='small requiredNone' name=dbSearchValue1 type=text size=10 maxlength=64 onblur='Blur(this);' accesskey='S'>&nbsp;<a href=\"javascript:PopupCalendar('dbSearchValue1', GetX('icondbSearchValue1'), GetY('icondbSearchValue1') + 17);\"><img id='icondbSearchValue1' src='image/icon_calendar.gif' align=absmiddle width=20 height=16 title='Click here to select a Date'></a>";
	  if (searchOperator.value == "BETWEEN") {
	newInnerHTML2 = "&nbsp;and&nbsp;<input kind='date' id='dbSearchValue2' class='small requiredNone' name=dbSearchValue2 type=text size=10 maxlength=64 onblur='Blur(this);' accesskey='S'>&nbsp;<a href=\"javascript:PopupCalendar('dbSearchValue2', GetX('icondbSearchValue2'), GetY('icondbSearchValue2') + 17);\"><img id='icondbSearchValue2' src='image/icon_calendar.gif' align=absmiddle width=20 height=16 title='Click here to select a Date'></a>";
	  }
	  else oldSearchType2 = "";
	}
	else{
	newInnerHTML1 = "<input kind='" + splitValue[1] + "' id='dbSearchValue1' class='small requiredNone' name=dbSearchValue1 type=text size=12 maxlength=32 onblur='Blur(this);' accesskey='S'>";
	if (searchOperator.value == "BETWEEN") {
	  newInnerHTML2 = "&nbsp;and&nbsp;<input kind='" + splitValue[1] + "' id='dbSearchValue2' class='small requiredNone' name=dbSearchValue2 type=text size=12 maxlength=32 onblur='Blur(this);' accesskey='S'>";
	}
	else oldSearchType2 = "";
	}
	if (splitValue[1] != oldSearchType1) {
	  document.getElementById("tdSearchValue1").innerHTML = newInnerHTML1;
	  oldSearchType1 = splitValue[1];
	}
	if (splitValue[1] != oldSearchType2) {
	  document.getElementById("tdSearchValue2").innerHTML = newInnerHTML2;
	  oldSearchType2 = (newInnerHTML2 != "") ? splitValue[1] : "";
	}
  }
}
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateCreditCard(inputField, required) {
  if (!inputField) return false;

  ValidateString(inputField, required, digits, "none");
  newValue = inputField.value;
  if (newValue == "") return (required ? false : true);

  ccTypeValue = IsMajorCreditCard(newValue);
  if (ccTypeValue == "") inputField.style.background = BadInput, returnValue = false;
  else inputField.style.background = White, returnValue = true;

  ccTypeLabelName = inputField.getAttribute("label");
  if (ccTypeLabelName) {
    if (ccTypeLabelName.match(/label/gi))
      document.getElementById(ccTypeLabelName).innerHTML = ccTypeValue;
    else 
      document.getElementByName(ccTypeLabelName).value = ccTypeValue;
  }

  if (newValue.length == 15)
    inputField.value = Reformat(newValue, "", 4, "-", 6, "-", 5);
  else if (newValue.length > 12)
    inputField.value = Reformat(newValue, "", 4, "-", 4, "-", 4, "-", 4);
  else if (newValue.length > 8)
    inputField.value = Reformat(newValue, "", 4, "-", 4, "-", 4);
  else if (newValue.length > 4)
    inputField.value = Reformat(newValue, "", 4, "-", 4);

  return returnValue;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateDate(inputField, required) {
var daysInMonth = Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var month, day, year;
var goodInput = false;

  if (!inputField) return false;

  inputField.value = StripCharsNotInBag(inputField.value, digits + " /-");
  if (!required && inputField.value == "") {
    inputField.style.background = White;
    return true;
  }

  inputText = inputField.value.replace(/[- ]/g, "/");
  splitInput = inputText.split("/");
  if (splitInput.length == 1 && (inputText.length == 8 || inputText.length == 6)) {
    inputText = inputText.substring(0, 2) + "/" + inputText.substring(2, 4) + "/" + inputText.substring(4, inputText.length);
    splitInput = inputText.split("/");
  }
  if(splitInput.length == 3) {
    month = parseInt(splitInput[1], 10);
    day = parseInt(splitInput[0], 10);
    year = parseInt(splitInput[2], 10);
    if (!isNaN(month) && !isNaN(day) && !isNaN(year)) {
      year = (year > 25 && year < 100) ? 1900 + year : (year > 0 && year <= 25) ? 2000 + year : year;
      goodInput = (month >= 1 && month <= 12) & (day >= 1 && day <= daysInMonth[month - 1]) &&
                  (month == 2 && day <= ((!(year % 100) && (year % 400)) || (year % 4)) ? 28 : 29);
    }
  }
  if (!goodInput) {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    inputField.value = splitInput[0] + "/" + splitInput[1] + "/" + year;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateEmail(inputField, required) {
  if (!inputField) return false;

  ValidateString(inputField, required, lowerCaseLetters + upperCaseLetters + digits + '.-_@', "none");
  newValue = inputField.value;
  if (newValue == "") return (required ? false : true);

  if (!IsEmail(newValue)) {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateForm(form) {
  if (form.elements.length == null) return false;
  //if (form.submitButton) form.submitButton.disabled = true;
  var invalidinputs = '' ; 
  var curID = '';
  var FocusID;
  for (var i = 0, n = 0, validInputs = 0; i < form.elements.length; i++) 
  {
    if (form.elements[i].type.search(/text|password|textarea|select-one|select-multiple|radio/) > -1)
     {
        validInputs += Blur(form.elements[i]), n++; 
        if(!Blur(form.elements[i]))
        {
            curID = form.elements[i].id;
            if(document.getElementById(curID + 'Label') != null)
            {
                invalidinputs += document.getElementById(curID + 'Label').innerHTML  ;
                invalidinputs = invalidinputs.replace(':',', ');
             }
             getParent(curID, 'div')
        }
     }              
  }
  
  //alert(invalidinputs);
  //alert(validInputs)
  //alert(n)
  
  if (validInputs != n) 
  {
    invalidinputs = invalidinputs.substring(0,invalidinputs.length-2);
   // alert(FocusID)
   //alert(getParent(FocusID,'div'));
    
    //alert('All fields marked in yellow are invalid.\nPlease check and retry.\n\nAlso please make sure all the required fields are filled.');
    //if (form.submitButton) form.submitButton.disabled = false;
    alert( 'Below fields are invalid.\n'+ invalidinputs +'.\n\nPlease check and retry. Also please make sure all the required fields are filled.')
    return false;
  }
  
  if (window.AdditionalValidation && !AdditionalValidation(form)) {//alert(3);
    //if (form.submitButton) form.submitButton.disabled = false;
    return false;
  }
  //alert(2);
  return true;
}

function ValidateForm1(form) {
  if (form.elements.length == null) return false;
  //if (form.submitButton) form.submitButton.disabled = true;
  var invalidinputs = '' ;
  var curID = '';
  var FocusID;
  for (var i = 0, n = 0, validInputs = 0; i < form.elements.length; i++) 
  {
    if (form.elements[i].type.search(/text|password|textarea|select-one|select-multiple|radio/) > -1)
     {
        validInputs += Blur(form.elements[i]), n++; 
        if(!Blur(form.elements[i]))
        {
            curID = form.elements[i].id;
            if(curID == 'dbpassword')
            {
                invalidinputs = invalidinputs + 'Password, ';
            }
            else
            {
                if(document.getElementById(curID + 'Label') != null)
                {
                    invalidinputs += document.getElementById(curID + 'Label').innerHTML  ;
                    invalidinputs = invalidinputs + ', ';
                }
             }
        }
     }              
  }
  if (validInputs != n) 
  {
    invalidinputs = invalidinputs.substring(0,invalidinputs.length-2);
   // alert(FocusID)
   //alert(getParent(FocusID,'div'));
    
    //alert('All fields marked in yellow are invalid.\nPlease check and retry.\n\nAlso please make sure all the required fields are filled.');
    //if (form.submitButton) form.submitButton.disabled = false;
    alert( 'Below fields are invalid.\n'+ invalidinputs +'.\n\nPlease check and retry. Also please make sure all the required fields are filled.')
    return false;
  }
  
  if (window.AdditionalValidation && !AdditionalValidation(form)) {//alert(3);
    //if (form.submitButton) form.submitButton.disabled = false;
    return false;
  }
  //alert(2);
  return true;
}

function getParent(element, parent){
if(typeof element=="string"){element=document.getElementById(element);};
if(!element){return null;};
var elements=[];

if(typeof parent!="string"){/*no parent: gets all parents till #document*/
	while(element.parentNode)
	{
	    element=element.parentNode;
	    elements.unshift(element);
		if(element==parent){return elements;};
	}
}
else{/*string, presumes you want to locate the first parent node that is such TAG*/
parent=parent.toUpperCase();
	while(element.parentNode)
	{
	element=element.parentNode;
	if(!element){return null;};
	if(element.parentNode.id != '')
	{
	    //alert(element.parentNode.id);
	   if(!element.parentNode.id){return null;};
	    if(document.getElementById(element.parentNode.id + '1') != null)
	        {
	            document.getElementById(element.parentNode.id + '1').className = 'select'; 
	        }
	     else
	        {
	            document.getElementById(element.parentNode.id + '1').className = ''; 
	        } 
	}
	elements.unshift(element);
		if(element.nodeName && element.nodeName.toUpperCase()==parent){return elements;};
	}
};
//return elements;
//alert(elements)
/* keep this comment to reuse freely:
http://www.fullposter.com/?1 */}
//}
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateMonthYear(inputField, required) {
var goodInput = false;
var today = new Date();
var curMonth = today.getMonth() + 1;
var curYear  = today.getFullYear();

  if (!inputField) return false;

  inputField.value = StripCharsNotInBag(inputField.value, digits + "/-");
  if (!required && inputField.value == "") return true;

  inputText = inputField.value.replace(/-/g, "/");
  inputText = inputText.replace(/ /g, "/");
  splitInput = inputText.split("/");
  if (splitInput.length == 1) {
    if (inputText.length == 6) {
      inputText = inputText.substring(0, 2) + "/" + inputText.substring(2, 6);
      splitInput = inputText.split("/");
    }
    else if (inputText.length == 4) {
      inputText = inputText.substring(0, 2) + "/" + (2000 + parseInt(inputText.substring(2, 4), 10));
      splitInput = inputText.split("/");
    }
  }
  if(splitInput.length == 2) {
    month = parseInt(splitInput[0], 10);
    year = parseInt(splitInput[1], 10);
    year = (year >= 0 && year <= 99) ? 2000 + year : year;
    goodInput = !isNaN(month) && !isNaN(year) && ((year == curYear && month > curMonth && month <= 12) || (month > 0 && month <= 12 && year > curYear && year <= curYear + 25));
    if (!isNaN(month) && !isNaN(year) && month >= 1 && month <= 12)
      inputField.value = (month < 10 ? "0" + month : month) + "/" + year;
  }
  if (!goodInput) {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateNumber(inputField, required, validChars, currency) {
var minimum = '', maximum = '';
var isDecimal;

  if (!inputField) return false;
  if (!validChars) validChars = "";

  ValidateString(inputField, required, validChars, "none");
  newValue = inputField.value;
  if (newValue == "") return (required ? false : true);

  isDecimal = (validChars.search(/\./g) > 0);
  newValue = (newValue.substring(0, 1) == "-") ? "-" + StripCharsInBag(newValue.substring(1), "-") : StripCharsInBag(newValue, "-");

  if (isDecimal) {
    newValue = parseFloat(newValue);
    minimum = parseFloat(inputField.getAttribute('minimum'));
    maximum = parseFloat(inputField.getAttribute('maximum'));
    if (!isNaN(minimum) && newValue < minimum) newValue = minimum;
    if (!isNaN(maximum) && newValue > maximum) newValue = maximum;
  }
  else {
    newValue = parseInt(newValue, 10);
    minimum = parseInt(inputField.getAttribute('minimum'), 10);
    maximum = parseInt(inputField.getAttribute('maximum'), 10);
    if (!isNaN(minimum) && newValue < minimum) newValue = minimum;
    if (!isNaN(maximum) && newValue > maximum) newValue = maximum;
  }
  inputField.style.background = White;
  inputField.value = currency ? FormatCurrency(newValue) : newValue;
  return true;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidatePhone(inputField, required) {
  if (!inputField) return false;

  ValidateString(inputField, required, digits, "none");
  newValue = inputField.value;
  if (newValue == "") return (required ? false : true);

  if (newValue.length == 11 && newValue.substring(0, 1) == "1") newValue = newValue.substring(1);

  if (newValue.length > 5)
    inputField.value = (newValue.length <= 7) ? Reformat(newValue, "", 3, "-", 4) : Reformat(newValue, "", 3, "-", 3, "-", 4);

  if (newValue.length != 7 && newValue.length != 10) {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateUKPhone(inputField, required) {
  if (!inputField) return false;

  ValidateString(inputField, required, digits, "none");
  newValue = inputField.value;
  if (newValue == "") return (required ? false : true);

   if (newValue.length = 11)
    inputField.value =  Reformat(newValue, "", 3, "", 4, "", 4);

  if (newValue.length != 11) {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateUKMobile(inputField, required) {
  if (!inputField) return false;

  ValidateString(inputField, required, digits, "none");
  newValue = inputField.value;
  if (newValue == "") return (required ? false : true);

   if (newValue.length = 11)
    inputField.value =  Reformat(newValue, "", 5, "", 6);

  if (newValue.length != 11) {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////

function ValidateRadio(inputField, required) {
var i, radioArray;

  radioArray = (eval("inputField.form." + inputField.name));
  if (required) {
    for (i = 0; i < radioArray.length; i++)
      if (radioArray[i].checked) break;
    if (i == radioArray.length) {
      for (i = 0; i < radioArray.length; i++)
        radioArray[i].className = 'bgBadInput required';
      return false;
    }
    else {
      for (i = 0; i < radioArray.length; i++)
        radioArray[i].className = 'bgRequired';
      return true;
    }
  }
  else
    return true;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateSelection(inputField, required) {
  if (!required) {
    inputField.style.background = White;
    return true;
  }
  else if (inputField.value == "" || inputField.value == "0") {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = SelectRequiredColor;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateSsn(inputField, required) {
  if (!inputField) return false;

  ValidateString(inputField, required, digits, "none");
  newValue = inputField.value;
  if (newValue == "") return (required ? false : true);

  inputField.value = Reformat(newValue, "", 3, "-", 2, "-", 4);
  if (newValue.length != 9) {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateString(inputField, required, validChars, textCase) {
  if (!inputField) return false;
  if (!validChars) validChars = "";

  newValue = Trim(inputField.value);
  inputField.value = (newValue) ? Caps(StripCharsNotInBag(NeatCharsInBag(newValue, whiteSpace), validChars), textCase) : "";
  
  if (required && inputField.value == "") {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateHeight(inputField, required, validChars, textCase) {
  if (!inputField) return false;
  if (!validChars) validChars = "";

  newValue = Trim(inputField.value);
  inputField.value = (newValue) ? Caps(StripCharsNotInBag(NeatCharsInBag(newValue, whiteSpace), validChars), textCase) : "";
  if (inputField.value.indexOf("m") != -1)
  {
    if(inputField.value.indexOf("m") != inputField.value.length-1)
    {
        inputField.style.background = BadInput;
        return false;
    }
  }
  
  if (inputField.value.indexOf("'") != -1)
  {
    if(inputField.value.indexOf("'") != inputField.value.length - 1)
    {
            if(inputField.value.indexOf("'") == 0)
            {
                inputField.style.background = BadInput;
                return false;
            }
            if (inputField.value.indexOf("''") != -1)
            {
                 if(inputField.value.indexOf("''") != inputField.value.length - 2)
                    {
                         inputField.style.background = BadInput;
                         return false;
                    }
            }
            else
            {
                inputField.style.background = BadInput;
                return false;
            }
     }     
  }
  if (required && inputField.value == "") {  
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidatePostCode(inputField, required, validChars, textCase) {
  if (!inputField) return false;
  if (!validChars) validChars = "";

  newValue = Trim(inputField.value);
  inputField.value = (newValue) ? Caps(StripCharsNotInBag(NeatCharsInBag(newValue, whiteSpace), validChars), textCase) : "";
  if (required && inputField.value == "") {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////

function ValidateText(inputField, required, list) {
  if (!inputField) return false;
  validChars = stringChars + "\n";

  newValue = Trim(inputField.value);
  if (list) newValue = NeatCharsInBag(NeatCharsInBag(newValue, " \t"), "\n\r", "\n");
  inputField.value = (newValue) ? StripCharsNotInBag(newValue, validChars) : "";
  if (required && inputField.value == "") {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateTime(inputField, required) {
var hours = -1, mins = 0, amPm;

  if (!inputField) return false;
  
   
  inputField.value = StripCharsNotInBag(inputField.value.toUpperCase(), digits + "APM-:");
  
  if (!required && inputField.value == "") return true;
  inputText = inputField.value;
   
  
  if (inputText.substr(inputText.length - 2, 2) == "AM" || inputText.substr(inputText.length - 2, 2) == "PM") {
    amPm = inputText.substr(inputText.length - 2, 2);
    inputText = inputText.substr(0, inputText.length - 2);
  }
  
  else if (inputText.substr(inputText.length - 1, 1) == "A" || inputText.substr(inputText.length - 1, 1) == "P") {
    amPm = inputText.substr(inputText.length - 1, 1) + "M";
    inputText = inputText.substr(0, inputText.length - 1);
  }
 
  inputText = inputText.replace(/[- ]/g, ":");
  splitInput = inputText.split(":");
  if (splitInput.length == 2) {
    hours = parseInt(splitInput[0], 10);
    mins = parseInt(splitInput[1], 10);
  }
  else {
    if (inputText.length <= 2) hours = parseInt(inputText, 10);
    else if (inputText.length <= 4) {
      hours = parseInt(inputText.substr(0, inputText.length - 2), 10);
      mins = parseInt(inputText.substr(inputText.length - 2, 2), 10);
    }
  }
 
  if (hours > 0 && hours < 24 && mins < 60) {
    if (hours < 12) inputText = hours + ":" + (mins < 10 ? "0" + mins : mins);
    else inputText = (hours) + ":" + (mins < 10 ? "0" + mins : mins);

    inputField.style.background = White;
    inputField.value = inputText;
    return true;
  }
  else {
    inputField.style.background = BadInput;
    return false;
  }
  alert("6" + inputField.value);
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ValidateUrl(inputField, required) {
  if (!inputField) return false;

  newValue = inputField.value;
  if (newValue.substr(0, 7) == "http://") newValue = newValue.substr(7);
  else if (newValue.substr(0, 6) == "http:/") newValue = newValue.substr(6);
  else if (newValue.substr(0, 5) == "http:") newValue = newValue.substr(5);
  inputField.value = newValue;

  ValidateString(inputField, required, lowerCaseLetters + upperCaseLetters + digits + '.,;-_~/#^?&=+|:', "none");
  newValue = inputField.value;
  if (newValue == "") return (required ? false : true);

  if (!IsUrl(newValue)) {
    inputField.style.background = BadInput;
    return false;
  }
  else {
    inputField.style.background = White;
    return true;
  }
}

/*********************************************************************/
/**** ADDITIONAL FUNCTIONS *******************************************/
/*********************************************************************/
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
var ajaxHttp;
function Ajax(script, seconds) {
  if (!window.AjaxProcess) return;
  try { ajaxHttp = new ActiveXObject("Msxml2.XMLHTTP"); }
  catch(e) {
    try{ ajaxHttp = new ActiveXObject("Microsoft.XMLHTTP");}
    catch(oc){ ajaxHttp = null;}
  }
  if(!ajaxHttp && typeof XMLHttpRequest != "undefined") ajaxHttp = new XMLHttpRequest();

  if(ajaxHttp != null) {
    ajaxHttp.onreadystatechange = AjaxResponse;
    ajaxHttp.open("GET", script + (script.indexOf("?") > 0 ? "&" : "?") + "ms=" + new Date().getTime(), true);
    ajaxHttp.send(null);
  }

  if (seconds && parseInt(seconds, 10) > 0) setTimeout("Ajax()", parseInt(seconds, 10) * 1000)
}

function AjaxResponse() {
  if (ajaxHttp && (ajaxHttp.readyState == 4 && ajaxHttp.responseText) && (ajaxHttp.status > 100 && ajaxHttp.status < 500)) eval(ajaxHttp.responseText);
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function CalculateChildID() {
  var url, subIndex;
  var returnInt;
  
  url = location.host + location.pathname;
  subIndex = url.indexOf('/');
  if (url.indexOf('/', subIndex + 1) > -1) subIndex = url.indexOf('/', subIndex + 1);
  url = url.substring(0, subIndex);
  for (i = 0, returnInt = 0; i < url.length; i++ ) returnInt += url.charCodeAt(i);
  return '' + returnInt + url.charCodeAt(url.length - 2) + url.charCodeAt(url.length - 1);
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ChildWindow(url, width, height, scrollbars, resizable) {
  var childWindow;

  if (width < 200) width = 200;
  if (height < 180) height = 180;
  wLeft = parseInt(screen.width / 2 - width / 2, 10);
  wTop = parseInt(screen.height / 2 - height / 2, 10);
  scrollbars = (!scrollbars || scrollbars != '1') ? 0 : 1;
  resizable = (!resizable || resizable != '1') ? 0 : 1;
  eval("childWindow = childWindowLibraryDM_" + ChildID);
  if (childWindow && childWindow.open) childWindow.close();
  eval("childWindowLibraryDM_" + ChildID + " = window.open(url, 'childWindowLibraryDM_" + ChildID + "', 'location=0,toolbar=0,menubar=0,resizable=" + resizable + ",status=0,scrollbars=" + scrollbars + ",width=" + width + ",height=" + height + ",left=" + wLeft + ",top=" + wTop + "')");
  eval("childWindowLibraryDM_" + ChildID + ".focus()");
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function CloseChildWindow() {
var childWindowObject;

  eval("childWindowObject = childWindowLibraryDM_" + ChildID);
  if (childWindowObject && childWindowObject.open) childWindowObject.close();
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function CloseHelpBar() {
  if (document.getElementById('helpBar')) document.getElementById('helpBar').style.visibility = 'hidden';
  location.href = location.href;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function DateAdd(interval, number, inputDate){
	if(!IsDate(inputDate)) return "";
	if(isNaN(number)) return "";

	number = new Number(number);
	var dt = new Date(inputDate);
	
  switch(interval.toLowerCase()) {
		case "yyyy":
			dt.setFullYear(dt.getFullYear() + number);
			break;
		case "q":
			dt.setMonth(dt.getMonth() + (number * 3));
			break;
		case "m":
			dt.setMonth(dt.getMonth() + number);
			break;
		case "y":
		case "d":
		case "w":
			dt.setDate(dt.getDate() + number);
			break;
		case "ww":
			dt.setDate(dt.getDate() + (number * 7));
			break;
		case "h":
			dt.setHours(dt.getHours() + number);
			break;
		case "n":
			dt.setMinutes(dt.getMinutes() + number);
			break;
		case "s":
			dt.setSeconds(dt.getSeconds() + number);
			break;
		case "ms":
			dt.setMilliseconds(dt.getMilliseconds() + number);
			break;
		default:
			return "";
  }
	return dt;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function DateDiff(interval, inputDate1, inputDate2, firstDayOfWeek, firstWeekOfYear){
	if(!IsDate(inputDate1)) return -1;
	if(!IsDate(inputDate2)) return -1;
	var dt1 = new Date(inputDate1);
	var dt2 = new Date(inputDate2);

	var iDiffMS = dt2.valueOf() - dt1.valueOf();
	var dtDiff = new Date(iDiffMS);

	var nYears  = dt2.getUTCFullYear() - dt1.getUTCFullYear();
	var nMonths = dt2.getUTCMonth() - dt1.getUTCMonth() + (nYears != 0 ? nYears * 12 : 0);
	var nQuarters = parseInt(nMonths / 3);
	
	var nMilliseconds = iDiffMS;
	var nSeconds = parseInt(iDiffMS / 1000);
	var nMinutes = parseInt(nSeconds / 60);
	var nHours = parseInt(nMinutes / 60);
	var nDays  = parseInt(nHours / 24);
	var nWeeks = parseInt(nDays / 7);

	var iDiff = 0;		
	switch(interval.toLowerCase()){
		case "yyyy": return nYears;
		case "q": return nQuarters;
		case "m": return nMonths;
		case "y": 
		case "d": return nDays;
		case "w": return nDays;
		case "ww":return nWeeks;
		case "h": return nHours;
		case "n": return nMinutes;
		case "s": return nSeconds;
		case "ms":return nMilliseconds;
		default: return -1;
	}
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function LeadingZero (x) { return (x < 0 || x > 9 ? "" : "0") + x; }

function FormatDateTime (inputDate, format) {
  var formatTokens = new Array('yyyy', 'yy', 'y', 'hh', 'h', 'HH', 'H', 'mm', 'm', 'ss', 's', 'tt', 't', 'TT', 'T', 'XXXX', 'XXX', 'XX', 'X', 'zzzz', 'zzz', 'zz', 'z');

  if(!IsDate(inputDate)) return "";
  var dt = new Date(inputDate);

	var y = dt.getFullYear();
  var M = dt.getMonth() + 1;
	var d = dt.getDate();
	var w = dt.getDay();
	var H = dt.getHours();
	var m = dt.getMinutes();
	var s = dt.getSeconds();
  var token;

	var value = new Object();
	if (y.length < 4) y = "" + (y - 0 + 1900);

  value["yyyy"] = y;
	value["yy"] = LeadingZero(y % 100);
	value["y"] = y % 100;
	value["h"] = (H == 0 ? 12 : (H > 12 ? H - 12 : H));
	value["hh"] = LeadingZero(value["h"]);
	value["HH"] = LeadingZero(H);
	value["H"] = H;
	value["mm"] = LeadingZero(m);
	value["m"] = m;
	value["ss"] = LeadingZero(s);
	value["s"] = s;
	value["t"] = (H > 11 ? "P" : "A");
  value["tt"] = value["t"] + "M";
  value["TT"] = value["tt"].toLowerCase();
  value["T"] = value["t"].toLowerCase();
	value["XXXX"] = monthNames[M - 1];
	value["XXX"] = monthNames[M - 1].substring(0, 3);
	value["XX"] = LeadingZero(M);
	value["X"] = M;
	value["zzzz"] = dayNames[w];
	value["zzz"] = dayNames[w].substring(0, 3);
	value["zz"] = LeadingZero(d);
	value["z"] = d;
 
  format = format.replace(/M/g, "X");
  format = format.replace(/d/g, "z");
	for (token in formatTokens) format = format.replace(new RegExp(formatTokens[token], 'g'), value[formatTokens[token]]);
  
  return format;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function Property(objectName, propertyName, propertyValue, notString) {
var object;

  if (IsEmpty(objectName) || IsEmpty(propertyName)) return null;

  object = document.getElementById(objectName);
  if (!object) return null;
  if (propertyValue != null) eval("object." + propertyName + (notString ? " = " + propertyValue : " = \"" + propertyValue + "\""));
  
  return eval("object." + propertyName);
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function ShowHelp(element, focus) {
var kind, helpObject, finalHelp;
var elementHelp = "", elementDefaultHelp = "", requiredHelp = "";

  helpObject = document.getElementById('dmHelpPane');
  if (!helpObject) return false;

  if (element) {
    elementHelp = element.getAttribute("help");
    if (elementHelp == null) elementHelp = "";
    if (element.className && element.className.match(/required/i)) requiredHelp = "<p class='red bold bottomSpace'>Required Field.<br></p>";
    kind = "" + element.getAttribute("kind");
    switch (kind) {
      case "alpha": elementDefaultHelp = ""; break;
      case "amount": elementDefaultHelp = ""; break;
      case "credit": elementDefaultHelp = ""; break;
      case "date": elementDefaultHelp = ""; break;
      case "decimal": elementDefaultHelp = ""; break;
      case "email": elementDefaultHelp = ""; break;
      case "monthyear": elementDefaultHelp = ""; break;
      case "number": elementDefaultHelp = ""; break;
      case "password": elementDefaultHelp = ""; break;
      case "phone": elementDefaultHelp = ""; break;
      case "radio": elementDefaultHelp = ""; break;
      case "select": elementDefaultHelp = ""; break;
      case "ssn": elementDefaultHelp = ""; break;
      case "string": elementDefaultHelp = ""; break;
      case "text": elementDefaultHelp = ""; break;
      case "textlist": elementDefaultHelp = ""; break;
      case "time": elementDefaultHelp = ""; break;
      case "url": elementDefaultHelp = ""; break;
      case "username": elementDefaultHelp = ""; break;
      case "zip": elementDefaultHelp = ""; break;
      default: break;
    }
  }
  elementDefaultHelp = "";
  if (!focus) finalHelp = defaultHelp;
  else {
    if (elementHelp) finalHelp = requiredHelp + elementHelp + (elementDefaultHelp ? '<br><br>' + elementDefaultHelp : "");
    else {
      if (elementDefaultHelp) finalHelp = requiredHelp + elementDefaultHelp;
      else finalHelp = requiredHelp;
    }
  }
  finalHelp = finalHelp.replace(/<BR>/g, "<p class='topSpace'></p>");
  finalHelp = finalHelp.replace(/<HR>/g, "<p class='borderTop borderDark bottomSpace'><img src='LibraryDM/empty.gif' width=100% height=1></p>");
  helpObject.innerHTML = finalHelp;
}


/*********************************************************************/
/**** CALENDAR FUNCTIONS *********************************************/
/*********************************************************************/
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
var closePopupCalendar;

function PopupCalendar(formElementName, x, y, parameter, cMonth, cYear) {
var showType, tagName;
//alert(x);
//alert(y);
  if (formElementName == "Initiate") {
    if (IsIEbrowser) document.write ("<iframe id='calendarBackLayer' frameborder=0 scrolling=no style='visibility:hidden; position:absolute; z-index:100'></iframe>");
    document.write ("<div id='calendarLayer' kind='calendarLayer' style='visiblity:hidden; position:absolute; top:0px; left:0px; z-index=101;'></div>");
    return;
  }
  if (!document.getElementById('calendarLayer')) return;
  if (y < 0) y = 0;
  showType = (parameter == "noDay") ? "Year" : "Month";
  tagName = document.getElementById(formElementName).tagName;
  if (tagName == "SELECT") {
    prefix = formElementName.substring(0, formElementName.search(/Month/g));
    if (prefix != "") {
      cMonth = document.getElementById(prefix + "Month").value;
      cYear = document.getElementById(prefix + "Year").value;
      PopupCalendarShow(formElementName, showType, cMonth, cYear, x, y, parameter);
    }
  }
  else if (tagName == "INPUT") {
    inputField = document.getElementById(formElementName);
    ValidateDate(inputField);
    if (inputField && !IsEmpty(inputField.value) && inputField.style.background != BadInput) {
      splitInput = inputField.value.split("/");
      PopupCalendarShow(formElementName, showType, splitInput[1], splitInput[2], x, y, parameter);
    }
    else PopupCalendarShow(formElementName, showType, (new Date().getMonth()) + 1, new Date().getFullYear(), x, y, parameter);
  }
  else if (tagName == "A") {
    if (cMonth && cYear)
      PopupCalendarShow(formElementName, showType, cMonth, cYear, x, y, parameter);
    else
      PopupCalendarShow(formElementName, showType, (new Date().getMonth()) + 1, new Date().getFullYear(), x, y, parameter);
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function PopupCalendarHide() {
  cObj = document.getElementById('calendarLayer');
  cbObj = document.getElementById('calendarBackLayer');
  if (cObj && cObj.style.visibility == "visible") {
    if (!closePopupCalendar) { closePopupCalendar = true; return; }
    cObj.style.left = 0;
    cObj.style.top = 0;
    cObj.style.visibility = 'hidden';
    if (cbObj) {
      cbObj.style.left = 0;
      cbObj.style.top = 0;
      cbObj.style.visibility = 'hidden';
    }
    cObj.innerHTML = "";
    document.onmousedown = null;
  }
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function PopupCalendarReturn(formElementName, cMonth, cDay, cYear) {
var tagName;

  tagName = document.getElementById(formElementName).tagName;
  if (tagName == "SELECT") {
    prefix = formElementName.substring(0, formElementName.search(/Month/g));
    if (prefix != "") {
      if (document.getElementById(prefix + "Month")) document.getElementById(prefix + "Month").value = cMonth;
      if (document.getElementById(prefix + "Day")) document.getElementById(prefix + "Day").value = cDay;
      if (document.getElementById(prefix + "Year")) document.getElementById(prefix + "Year").value = cYear;
    }
  }
  else if (tagName == "INPUT") {
    inputField = document.getElementById(formElementName);
    if (inputField) inputField.value = cDay + "/" + cMonth  + "/" + cYear;
    inputField.focus();
    Blur(inputField);
  }
  else if (tagName == "A") {
    anchorElement = document.getElementById(formElementName);
    if (anchorElement && anchorElement.getAttribute('url')) {
      url = anchorElement.getAttribute('url');
      document.location.href = url + ((url.search(/\?/g) > -1) ? "&" : "?") + "date=" + cDay  + "/" + cMonth + "/" + cYear;
    }
  }
  closePopupCalendar = true;
  PopupCalendarHide();
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function PopupCalendarShow(formElementName, type, cMonth, cYear, x, y, parameter) {
  var daysOfMonth = [31,28,31,30,31,30,31,31,30,31,30,31];
  var monthName = ["January","February","March","April","May","June","July","August","September","October","November","December"];
  var weekDay = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
  var minYear = 1920;
  var maxYear = 2125;

  cMonth = parseInt(cMonth, 10) - 1;
  cYear = parseInt(cYear);
  if (cYear == "") cYear = minYear;
  if (cYear < minYear || cYear > maxYear) return;
  if (type != "Year" && type != "Years") type = "Month";
  parameterStr = (parameter) ? ", '" + parameter + "'" : "";

  function GetHTML(cMonth, cYear, type) {
    var today = new Date();

    if (type == "Month") {
      var vDate = new Date();
      vDate.setDate(1);
      vDate.setMonth(cMonth);
      vDate.setFullYear(cYear);
      var vFirstDay = vDate.getDay();
      var vDay = 1;
      var vLastDay = LastDay(cMonth, cYear);

      if (cMonth == 0) var pLastDay = 31;
      else var pLastDay = LastDay(cMonth - 1, cYear);

      var vOnLastDay = 0;
      var pDays = pLastDay - vFirstDay;
      var vCode = "";

      for (i = 0; i < vFirstDay; i++, pDays++) vCode += (vCode ? "|" : "") + pDays;
      for (i = vFirstDay; i < 7; i++, vDay++) vCode += (vCode ? "|" : "") + vDay;
      vCode += "\n";
      for (i = 2; i < 7; i++) {
        for (j = 0; j < 7; j++) {
          vCode += (j != 0 ? "|" : "") + vDay;
          vDay ++;
          if (vDay > vLastDay) { vOnLastDay = 1; break; }
        }
        if (j == 7) vCode = vCode + "\n";
        if (vOnLastDay == 1) break;
      }
      for (i = 1; i < (7 - j); i++) vCode += "|" + i;

      pMonth = (cMonth + 11) % 12;
      pYear = (pMonth == 11) ? cYear - 1 : cYear;
      nMonth = (cMonth + 1) % 12;
      nYear = (nMonth == 0) ? (cYear + 1) : cYear;
    }
    else if (type == "Years") {
      cYear = minYear + parseInt((cYear - minYear) / 9) * 9;
    }

    code  = "<table class='border borderDark bgWhite' width=172 onMouseDown='javascript:closePopupCalendar=false;' style='position:absolute;z-index:1000;'>";
    code += "<tr>";
    code += "  <td align=center>";
    code += "    <table align=center width=152>";
    code += "    <tr height=25>";
    code += "      <td class=bold width=136>";
    if (type == "Month") {
      code += "        <a href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Month', " + (pMonth + 1) + ", " + pYear + ", " + x + ", " + y + parameterStr + ");\" title='Previous Month'><img src='image/arrows_left.gif'></a>&nbsp;&nbsp;&nbsp;";
      code += "<a class=under href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Year', 0, " + cYear + ", " + x + ", " + y + parameterStr + ");\" title='Show Full Year'>" + monthName[cMonth].substr(0, 3) + " " + cYear + "</a>&nbsp;&nbsp;&nbsp;";
      code += "<a href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Month', " + (nMonth + 1) + ", " + nYear + ", " + x + ", " + y + parameterStr + ");\" title='Next Month'><img src='image/arrows_right.gif'></a>";
    }
    else if (type == "Year") {
      code += "        <a href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Year', 0, " + (cYear - 1) + ", " + x + ", " + y + parameterStr + ");\" title='Previous Year'><img src='image/arrows_left.gif'></a>&nbsp;&nbsp;&nbsp;";
      code += "<a class=under href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Years', 0, " + cYear + ", " + x + ", " + y + parameterStr + ");\" title='Show All Years'>Year " + cYear + "</a>&nbsp;&nbsp;&nbsp;";
      code += "<a href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Year', 0, " + (cYear + 1) + ", " + x + ", " + y + parameterStr + ");\" title='Next Year');\"><img src='image/arrows_right.gif'></a>";
    }
    else if (type == "Years") {
      code += "        <a href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Years', 0, " + (cYear - 9) + ", " + x + ", " + y + parameterStr + ");\" title='Previous 9 years'><img src='image/arrows_left.gif'></a>&nbsp;&nbsp;";
      code += cYear + " - " + (cYear + 8) + "&nbsp;&nbsp;";
      code += "<a href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Years', 0, " + (cYear + 9) + ", " + x + ", " + y + parameterStr + ");\" title='Next 9 years'><img src='image/arrows_right.gif'></a>";
    }
    code += "      </td>";
    code += "      <td align=right><a href='javascript:closePopupCalendar=true; PopupCalendarHide();' title='Click here to close'><img src='image/icon_close.gif' width=14 height=13></a><img src='image/empty.gif' width=1 height=1></td>";
    code += "    </tr>";
    code += "    <tr>";
    code += "      <td colspan=3 align=center class=box>";
    code += "        <table class='border borderMedium bgWhite' width=152>";
                      if (type == "Month") {
                        code += "        <tr>";
                        code += "          <td class=pad width=15% align=center>S</td>";
                        code += "          <td class=pad width=14% align=center>M</td>";
                        code += "          <td class=pad width=14% align=center>T</td>";
                        code += "          <td class=pad width=14% align=center>W</td>";
                        code += "          <td class=pad width=14% align=center>T</td>";
                        code += "          <td class=pad width=14% align=center>F</td>";
                        code += "          <td class=pad width=15% align=center>S</td>";
                        code += "        </tr>";
                        code += "        <tr height=1>";
                        code += "          <td style='padding:0px 2px 0px 2px;' colspan=7><img src='image/dot_medium.gif' width=100% height=1></td>";
                        code += "        </tr>";
                        weeks = vCode.split("\n");
                        for (i = 0; i < weeks.length; i++) {
                          days = weeks[i].split("|");
                          code += "        <tr>";
                          for (j = 0; j < days.length; j++) {
                            var iDay = parseInt(days[j], 10)
                            if ((i == 0 && iDay > 7) || (i == weeks.length - 1 && iDay < 7)) {
                              code += "          <td class='border borderLight pad medium small' align=center>" + iDay + "</td>";
                            }
                            else {
                              if (cMonth == today.getMonth() && iDay == today.getDate() && cYear == today.getFullYear())
                                code += "          <td class='border borderLight small' align=center bgcolor=#fffae0>";
                              else
                                code += "          <td class='border borderLight pad small' align=center>";
                              code += "            <a href=\"javascript:PopupCalendarReturn('" + formElementName + "', " + (cMonth + 1) + ", " + iDay + ", " + cYear + ");\">" + iDay + "</a>";
                              code += "          </td>";
                            }
                          }
                          code += "        </tr>";
                        }
                      }
                      else if (type == "Year") {
                        for (i = 0; i < 4; i++) {
                          code += "        <tr>";
                          for (j = 0; j < 3; j++) {
                            code += "          <td class='pad small border borderLight' align=center height=27>";
                            if (parameter == "noDay")
                              code += "            <a href=\"javascript:PopupCalendarReturn('" + formElementName + "', " + (i * 3 + j + 1) + ", 1, " + cYear + ");\">" + monthName[i * 3 + j].substr(0, 3) + "</a>"
                            else
                              code += "            <a href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Month', " + (i * 3 + j + 1) + ", " + cYear + ", " + x + ", " + y + parameterStr + ");\">" + monthName[i * 3 + j].substr(0, 3) + "</a>";
                            code += "          </td>";
                          }
                          code += "        </tr>";
                        }
                      }
                      else if (type == "Years") {
                        for (i = 0; i < 3; i++) {
                          code += "        <tr>";
                          for (j = 0; j < 3; j++) {
                            if ((cYear + i * 3 + j) > maxYear) {
                              code += "          <td class='pad medium small' align=center>" + (cYear + i * 3 + j) + "</td>";
                            }
                            else {
                              code += "          <td class='pad small border borderLight' align=center height=36>";
                              code += "            <a href=\"javascript:PopupCalendarShow('" + formElementName + "', 'Year', 0, " + (cYear + i * 3 + j) + ", " + x + ", " + y + parameterStr + ");\">" + (cYear + i * 3 + j) + "</a>";
                              code += "          </td>";
                            }
                          }
                          code += "        </tr>";
                        }
                      }
    code += "        </table>";
    code += "      </td>";
    code += "    </tr>";
    code += "    <tr><td class=pad colspan=3 align=center>Today:<a class=under href=\"javascript:PopupCalendarReturn('" + formElementName + "', " + (today.getMonth() + 1) + ", " + today.getDate() + ", " + today.getFullYear() + ");\">" + weekDay[today.getDay()] + ", " + monthName[today.getMonth()].substr(0, 3) + " " + today.getDate() + "</a></td></tr>";
    code += "    </table>";
    code += "    <img src='image/empty.gif' width=1 height=2><br>";
    code += "  </td>";
    code += "</tr>";
    code += "</table>";
    return code;
  }

  function LastDay(cMonth, cYear) {
    if (cMonth == 1 && !(cYear % 4) && ((cYear % 100) || !(cYear % 400))) return daysOfMonth[cMonth] + 1;
    return daysOfMonth[cMonth];
  }

  var code = GetHTML (cMonth, cYear, type);
  var cObj = document.getElementById('calendarLayer');
  var cbObj = document.getElementById('calendarBackLayer');
  cObj.style.left = x;
  cObj.style.top = y;
  cObj.style.width = 172;
  cObj.style.visibility = 'visible';
  if (cbObj) {
    cbObj.style.left = x;
    cbObj.style.top = y;
    cbObj.style.width = 172;
    cbObj.style.height = 74 + (weeks.length * 21);
    cbObj.style.visibility = 'visible';
  }

  cObj.innerHTML = code;
  document.onmousedown = PopupCalendarHide;
  closePopupCalendar = true;
}

//////////////////// 
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function GetX(objName) {
var object = typeof objName == "object" ? objName : document.getElementById(objName);

	for (var sumLeft = 0; object != document.body; sumLeft += object.offsetLeft, object = object.offsetParent);
	return sumLeft;
}

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
function GetY(objName) {
var object = typeof objName == "object" ? objName : document.getElementById(objName);
  for (var sumTop = 0; object != document.body; sumTop += object.offsetTop, object = object.offsetParent);
	return sumTop;
}

//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
 function allownumbers(e)
   {
    var key = window.event ? e.keyCode : e.which;
    var keychar = String.fromCharCode(key);
    var reg = new RegExp("[0-9?.]")
    var reg1 = new RegExp("[0-9]")
   
    if (key == 8)
    {
     keychar = String.fromCharCode(key);
    }
    if (key == 13)
    {
     key=8;
     keychar = String.fromCharCode(key);     
    }
    if( this.value.indexOf(".") == -1)
    {
    return reg.test(keychar);
    }
    else
    {
    return reg1.test(keychar);
    }
   } 
   
function CheckCheckAll(fmobj) {
  for (var i=0;i<fmobj.elements.length;i++) {
    var e = fmobj.elements[i];
    if ( (e.name != 'allbox') && (e.type=='checkbox') && (!e.disabled) ) {
      e.checked = fmobj.allbox.checked;
    }
  }
}



//////////////////////////////////////////////////////////////////////////////////
//Ajax core functions/
//////////////////////////////////////////////////////////////////////////////////

function InvokeAjax(url) 
{
	//alert(url);
	http = GetHttpObject();
	if(http != null)
	{ 
		http.onreadystatechange = Process;
		http.open("GET", url, true);
		http.send(null);
	}
}
	

////////**************************************************//////////
var http;
function GetHttpObject() 
{
	var localHttp;
	try { localHttp = new ActiveXObject("Msxml2.XMLHTTP"); }
	catch(e) {
		try{ localHttp = new ActiveXObject("Microsoft.XMLHTTP");}
		catch(oc){ localHttp = null;}
		}
		if(!localHttp && typeof XMLHttpRequest != "undefined") localHttp = new XMLHttpRequest();
		return localHttp;
}

function SendQuery(str, status) 
{
	http = GetHttpObject();
	if(http != null){ 
		http.onreadystatechange = Process;
		//alert("listOrdersInGrid.aspx?type="+ status +"&IDs=" + str + "&ms=" + new Date().getTime())
		http.open("GET", str + "&ms=" + new Date().getTime(), true);
		http.send(null);
	}
}

function Process() 
{ 
	if (http && (http.readyState == 4 && http.responseText) && (http.status > 100 && http.status < 500)){
	    //alert(http.responseText);
		eval(http.responseText);
	}	
}

function LoadPage (url, q) 
{
    //alert("load" + url);
    parent.document.getElementById('loadingDiv').style.visibility= "visible";
    if (url.indexOf("javascript:") == 0) eval(url.substring(11).replace(/#/g, "'"));
    parent.document.getElementById('frameContent').src = url + (q ? '?' + q + '&' : '?') + 'ms=' + new Date().getTime();
 }
 
 function LoadPage1 (url, q) 
{
    //alert("load" + url);
    parent.document.getElementById('loadingDiv').style.visibility= "visible";
    if (url.indexOf("javascript:") == 0) eval(url.substring(11).replace(/#/g, "'"));
    parent.document.getElementById('frameContent').src = url;
 }

 function LoadUserPage (url, q) 
{
    //alert("load" + url);
    parent.document.getElementById('loadingDiv').style.visibility= "visible";
    if (url.indexOf("javascript:") == 0) eval(url.substring(11).replace(/#/g, "'"));
    parent.document.getElementById('frameContent').src = url + (q ? '?' + q + '&' : '?') + 'ms=' + new Date().getTime();
 }
 
 
 /* ----------- Reminder Functions ----------------------*/  
 
 function CollectSelection(form, Typerow, Numbersub)
{
  if (form == null) return false;
    var retStr
    var isFirst = true
    for (var i = 0, n = 0, validInputs = 0; i < form.elements.length; i++){
      if (form.elements[i].name.substring(0, Numbersub) == Typerow ){
              if(form.elements[i].checked){
			    if (isFirst){
				    retStr = form.elements[i].name.substring(Numbersub);
					isFirst = false;					
				}
			    else{
				    retStr = retStr + "," + form.elements[i].name.substring(Numbersub);				    
			    }
		    }
	    }
    }
 
     if (!retStr){
       return false;      
    }    
    return retStr;
 }
 
 function HandleSelectAll(form)
{
 //alert(document.AdminForm1.dbSelect1Flag.value);
    if (form == null) return false;
  if (AdminForm1.dbSelect1Flag.value == "false"){ chkVal = true; AdminForm1.dbSelect1Flag.value = "true";}
  else {chkVal = false; AdminForm1.dbSelect1Flag.value = "false";}

  for (var i = 0, n = 0, validInputs = 0; i < form.elements.length; i++) 
	if (form.elements[i].name.substring(0, 5) == "Event" || form.elements[i].name.substring(0, 4) == "Task") form.elements[i].checked = chkVal
}

var EventData = "";
var taskData = "";
var userid;
function callAjaxReminders(str)
{
    var isvalid = IsValidReminders(str);
    if (isvalid)
    {
        var ajaxUrl="listReminders.aspx?UserId=" + userid + "&Taskids=" + taskData + "&EventIds=" + EventData + "";
        if(str == "snooze")
        {
            ajaxUrl = ajaxUrl + "&Type=Snooze" + "&Time=" + Form1.dbSnoozeTime.value;
        }
        if(str == "dismiss")
        { 
            ajaxUrl = ajaxUrl + "&Type=Dismiss" ;
        }
        if(str == "dismissAll")
        {
            ajaxUrl = ajaxUrl + "&Type=DismissAll";
        }
        
       // InvokeAjax(ajaxUrl);
    }
    else
    {
        return false;
    }
}
function IsValidReminders(type)
{
    if(type == "snooze")
    {
        if (Form1.dbSnoozeTime.value == "") {alert("Snooze time cannot be empty"); return false;}
    }
    GetIDs();
    if(EventData == false && taskData == false)
   {
        alert("You need to select atleast one to proceed further.");
        return false;
   }
    userid=AdminForm1.Userid.value;
    return true;
}
function GetIDs()
{
EventData = CollectSelection(AdminForm1, "Event", 5);
taskData = CollectSelection(AdminForm1, "Task" , 4);
//alert("eve: " + EventData + "taskdata: " + taskData);
}

// user written functions//


function CollectSelection(form)
{
    if (form == null) return false;
    var retStr
    var isFirst = true
   //alert(form.elements.length);
    for (var i = 0, n = 0, validInputs = 0; i < form.elements.length; i++){
	    if (form.elements[i].id.substring(0, 6) == "dbRow_"){
		    if(form.elements[i].checked){
			    if (isFirst){
				    retStr = form.elements[i].id.substring(6);
					isFirst = false;
					//alert(retStr);
				}
			    else{
				    retStr = retStr + "," + form.elements[i].id.substring(6);
				    //alert("els" + retStr);
			    }
		    }
	    }
    }
    
//    if (!retStr){
//        //alert("You need to select atleast one applicant to proceed further.");
//        return false;
//    }
    form.dbCollection.value = retStr;
    return true;
}

function HandleSelect(obj)
{
var form =  document.getElementById("f1");
 for (var i = 0; i < form.elements.length; i++) 
	if (form.elements[i].id.substring(0, 6) == "dbRow_") form.elements[i].checked = obj.checked;
	CollectSelection(form);
}



/*

TopFrameJScript.js files data

*/



 function Loadpage()
  {
    var AppPath = document.getElementById("top_MorEveImage").value;
    location.href = AppPath+"/london-estate-agents/"; //Home.aspx
  }
function callLeftMenuLoad()
{
    IntializeIframe();
    var frame = document.getElementById("frameContent");
    var frame1 = document.getElementById("Iframe1");
    url = frame.src;
    var count = 0;
    var pos1 = url.indexOf("^");
    while ( pos1 != -1 ) {
            count++;            
            pos1 = url.indexOf("^",pos1+1);
          }
    var pos=url.indexOf("cProperty");
    if (count == 7)
    {
        if(url.indexOf("listAdvancedSearch") != -1 || url.indexOf("cMap") != -1 || url.indexOf("ListBuyschools") != -1 || url.indexOf("cMapAreas") != -1)
        {
            leftMenuItems.style.display = "none";
            leftMenuID.style.width = "932";
             frame.style.width="932";
        } 
        else
        {
            leftMenuID.style.width = "733";
            frame.style.width="733"
            leftMenuItems.style.display = "";
            var indexco = url.indexOf("?");
            var str= url.substring(parseInt(indexco)+1);
            frame1.src = "LeftMenuSearch.aspx?" + str;  
        }
    }
    else
    {
        if(url.indexOf("listAdvancedSearch") != -1 || url.indexOf("cMap") != -1 || url.indexOf("ListBuyschools") != -1 || url.indexOf("cMapAreas") != -1)
        {
            leftMenuItems.style.display = "none";
            leftMenuID.style.width = "932";
             frame.style.width="932"
        } 
        else
        {
            leftMenuID.style.width = "733";
            frame.style.width="733"
            leftMenuItems.style.display = "";
        }
         frame1.src = "LeftMenuUser.aspx";  
     }
}

/*

slider_home.js file data

*/


YAHOO.util.Event.addListener(window, "load", function()
{

	var mySlideA = new Slider($('slider_minmax_gutter_m'), $('slider_minmax_minKnobA'),$('slider_bkg_img'), {
		start: 0,
		end: 4,
		offset:4,
		snap:true,
		onChange: function(pos){$('slider_minmax_min').setHTML(FromatValues_top(pos.minpos,1));$('slider_minmax_max').setHTML(FromatValues_top(pos.maxpos,2));}
	}, $('slider_minmax_maxKnobA')).setMin(1).setMax(3);
	
	var mySlideX = new Slider($('slider_minmax_gutter_m_sec'), $('slider_minmax_minKnobA_sec'),$('slider_bkg_img_sec'), {
		start: 150,
		end: 800,
		offset:10,
		snap:true,
		onChange: function(pos){$('slider_minmax_min_sec').setHTML(FromatValues(pos.minpos,1));$('slider_minmax_max_sec').setHTML(FromatValues(pos.maxpos,2));}
	}, $('slider_minmax_maxKnobA_sec')).setMin(300).setMax(600);

//alert(getSelectedRadioValue(document.FrmquickSearch.RentRadio));

function FromatValues(minpos, x)
{

if(x==1)
{
    if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
    {
    minpos = minpos - 150;
        document.getElementById("priceMin").innerHTML="£" + minpos + "K&nbsp;&amp; ";
        return minpos + "000";
        }
        else
        {
        document.getElementById("priceMin").innerHTML="£" + minpos + "&nbsp;&amp; ";
        return minpos;
        }
    }
 else
    {
      if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
        {
        minpos = minpos - 150;
        document.getElementById("priceMax").innerHTML="&nbsp;£" + minpos + "K";
        return minpos + "000";
        }
        else
        {
        document.getElementById("priceMax").innerHTML="&nbsp;£" + minpos;
        return minpos;
     }
}

//if(x==1)
//{
//if(minpos=="0" ||minpos=="1" )
//{

//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMin").innerHTML="£0 &amp; ";
//return "";
//}
//else
//{
//document.getElementById("priceMin").innerHTML=" £150 &amp; ";
//return "";
//}
//}


//if(minpos=="2" || minpos=="3")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMin").innerHTML="£50K &amp; ";
//return "50000";
//}
//else
//{
//document.getElementById("priceMin").innerHTML="£250 &amp; ";
//return "250";
//}
//}

//if(minpos=="4" || minpos=="5")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMin").innerHTML="£100K &amp; ";
//return "100000";
//}
//else
//{
//document.getElementById("priceMin").innerHTML="£350 &amp; ";
//return "350"; 
//}
//}

//if(minpos=="6")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMin").innerHTML="£200K &amp; ";
//return "200000";
//}
//else
//{
//document.getElementById("priceMin").innerHTML="£500 &amp; ";
//return "500"; 
//}
//}

//if(minpos=="7")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMin").innerHTML="£300K &amp; ";
//return "300000";
//}
//else
//{
//document.getElementById("priceMin").innerHTML="£600 &amp; ";
//return "600"; 
//}
//}

//if(minpos=="8")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMin").innerHTML="£400K &amp; ";
//return "400000";
//}
//else
//{
//document.getElementById("priceMin").innerHTML="£700 &amp; ";
//return "700"; 
//}
//}

//if(minpos=="9")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMin").innerHTML="£500K &amp; ";
//return "";
//}
//else
//{
//document.getElementById("priceMin").innerHTML="£800 &amp; ";
//return ""; 
//}
//}

//}
//else
//{

//if(minpos=="0" ||minpos=="1" )
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£0";
//return "";
//}
//else
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£150";
//return "";
//}
//}


//if(minpos=="2" || minpos=="3")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£50K";
//return "50000";
//}
//else
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£250";
//return "250";
//}
//}


//if(minpos=="4" || minpos=="5")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£100K";
//return "100000";
//}
//else
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£350";
//return "350"; 
//}
//}


//if(minpos=="6")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£200K";
//return "200000";
//}
//else
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£500";
//return "500"; 
//}
//}

//if(minpos=="7")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£300K";
//return "300000";
//}
//else
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£600";
//return "600"; 
//}
//}

//if(minpos=="8")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£400K";
//return "400000";
//}
//else
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£700";
//return "700"; 
//}
//}

//if(minpos=="9")
//{
//if(getSelectedRadioValue(document.FrmquickSearch.RentRadio)=="Buy")
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£500K";
//return "";
//}
//else
//{
//document.getElementById("priceMax").innerHTML="&nbsp;£800 +";
//return ""; 
//}
//}

//}

 }


function FromatValues_top(minpos, x)
{
if(x==1)
{
if(minpos=="0")
{
document.getElementById("roomMin").innerHTML="0-";
return "";
}
if(minpos=="1")
{
document.getElementById("roomMin").innerHTML="1-";
return "1";
}

if(minpos=="2")
{
document.getElementById("roomMin").innerHTML="2-";
return "2";
}

if(minpos=="3")
{
document.getElementById("roomMin").innerHTML="3-";
return "3";
}

if(minpos=="4")
{
document.getElementById("roomMin").innerHTML="4-";
return ""; 
}
}
else
{

if(minpos=="0")
{
document.getElementById("roomMax").innerHTML="0";
return "";
}
if(minpos=="1")
{
document.getElementById("roomMax").innerHTML="1";
return "1";
}

if(minpos=="2")
{
document.getElementById("roomMax").innerHTML="2";
return "2";
}

if(minpos=="3")
{
document.getElementById("roomMax").innerHTML="3";
return "3";
}

if(minpos=="4")
{
document.getElementById("roomMax").innerHTML="4+ ";
return ""; 
}
}
}


});




/*

mootools12_all_p.js

*/

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('C g2={\'3x\':\'1.eZ\',\'57\':\'1.gs\'};C 1B=o(F){F=F||{};C 6N=F.6N||o(){};C 6O=F.6O;6O=(6O!==M);C 5J=F.5J;C 1v=F.1v;C 7V=F.7V;C 14=F.14;C 1c=1v||5J;1c.9m=1B;1c.$3u={14:\'fL\'};if(5J&&1v)1c.2j=5J.2j;1c.2j.9m=1c;if(14){C 3u=14.4r();1c.2j.$3u={14:3u};1B.a7(1c,3u)}C 5g=o(15,14,2s,9O){if(!7V||9O||!15.2j[14])15.2j[14]=2s;if(6O)1B.ae(15,14,7V);6N.1L(15,14,2s);B 15};1c.1l=o(a1,a2,a3){if(3q a1==\'1T\')B 5g(c,a1,a2,a3);R(C p in a1)5g(c,p,a1[p],a2);B c};1c.5h=o(7C,U,9O){7C=c.2j[7C];if(7C)5g(c,U,7C,9O);B c};B 1c};1B.1l=o(5a,1k){R(C i=0,l=5a.W;i<l;i++)5a[i].1l(1k)};1B.ae=o(1c,U,2c){if((!2c||!1c[U])&&3q 1c.2j[U]==\'o\')1c[U]=o(){C 1D=1t.2j.2W.1L(O);B 1c.2j[U].3E(1D.9h(),1D)}};1B.a7=o(1c,3u){if(!1c.J)1c.J=o(1H){B($J(1H)===3u)}};(o(5a){R(C 14 in 5a)1B.a7(5a[14],14.4r())})({\'cO\':cO,\'1B\':1B,\'62\':62});(o(5a){R(C 14 in 5a)K 1B({14:14,1v:5a[14],7V:T})})({\'2T\':2T,\'bK\':bK,\'4V\':4V,\'1t\':1t,\'9c\':9c,\'7M\':7M});(o(1c,4e){R(C i=0,l=4e.W;i<l;i++)1B.ae(1c,4e[i],T);B O.2h})(1t,[\'dT\',\'1K\',\'fJ\',\'9h\',\'g7\',\'96\',\'gt\',\'4S\',\'5F\',\'2W\',\'9J\',\'dB\',\'4m\',\'dA\'])(2T,[\'6a\',\'ar\',\'4S\',\'4m\',\'dA\',\'17\',\'2Z\',\'8W\',\'2W\',\'5w\',\'7u\',\'cV\',\'4r\',\'8f\',\'dB\']);o $3B(15){B!!(15||15===0)};o $77(2F){f8(2F);f5(2F);B Y};o $3D(15){B(15!=ev)};o $1Y(){};o $O(i){B o(){B O[i]}};o $7c(I){B(3q I==\'o\')?I:o(){B I}};o $1z(b8,7Q){R(C L in(7Q||{}))b8[L]=7Q[L];B b8};o $6U(1c){C 73=Y;1W($J(1c)){Q\'1c\':73={};R(C p in 1c)73[p]=$6U(1c[p]);1e;Q\'23\':73=[];R(C i=0,l=1c.W;i<l;i++)73[i]=$6U(1c[i]);1e;3T:B 1c}B 73};o $3G(){C 7R={};R(C i=0,l=O.W;i<l;i++){C 1c=O[i];if($J(1c)!=\'1c\')4U;R(C L in 1c){C 9b=1c[L],9f=7R[L];7R[L]=(9f&&$J(9b)==\'1c\'&&$J(9f)==\'1c\')?$3G(9f,9b):$6U(9b)}}B 7R};o $5G(){R(C i=0,l=O.W;i<l;i++){if($3D(O[i]))B O[i]}B Y};o $bM(4l,1R){B 1m.8F(1m.bM()*(1R-4l+1)+4l)};o $4s(15){C J=$J(15);B(J)?((J!=\'23\'&&J!=\'O\')?[15]:15):[]};C $3H=7M.1d||o(){B K 7M().c0()};o $4b(fn,V,1D){4b{B fn.3E(V,$4s(1D))}dN(e){B M}};o $J(15){if(15==ev)B M;if(15.$3u)B(15.$3u.14==\'5L\'&&!fl(15))?M:15.$3u.14;if(15.cI){1W(15.3R){Q 1:B\'G\';Q 3:B(/\\S/).3k(15.cH)?\'eq\':\'df\'}}1i if(3q 15.W==\'5L\'){if(15.2h)B\'O\';1i if(15.1H)B\'7d\'}B 3q 15};C 1o=K 1B({14:\'1o\',1v:o(1c){if($J(1c)==\'5T\')1c=$6U(1c.eI());R(C L in 1c){if(!c[L])c[L]=1c[L]}B c}});1o.1l({f6:o(){C W=0;R(C L in c){if(c.4K(L))W++}B W},8O:o(fn,V){R(C L in c){if(c.4K(L))fn.1L(V,c[L],L,c)}},eI:o(){C 6h={};R(C L in c){if(c.4K(L))6h[L]=c[L]}B 6h}});1o.5h(\'8O\',\'1b\');o $H(1c){B K 1o(1c)};1t.1l({8O:o(fn,V){R(C i=0,l=c.W;i<l;i++)fn.1L(V,c[i],i,c)}});1t.5h(\'8O\',\'1b\');o $A(5K){if($J(5K)==\'7d\'){C 23=[];R(C i=0,l=5K.W;i<l;i++)23[i]=5K[i];B 23}B 1t.2j.2W.1L(5K)};o $1b(5K,fn,V){C J=$J(5K);((J==\'O\'||J==\'7d\'||J==\'23\')?1t:1o).1b(5K,fn,V)};C 1p=K 1o({1x:{14:\'f9\',3x:\'\'},bj:{14:(82.fp.17(/fb|2k|fe|f3/i)||[\'f7\'])[0].4r()},8K:{36:!!(1X.8J),2r:!!(1n.cS),ff:!!(1X.fg)}});if(1X.fq)1p.1x.14=\'aR\';1i if(1X.8u)1p.1x={14:\'3h\',3x:(1p.8K.36)?5:4};1i if(!82.f1)1p.1x={14:\'6I\',3x:(1p.8K.2r)?fr:fs};1i if(1n.ft!=Y)1p.1x.14=\'aE\';1p.1x[1p.1x.14]=1p.1x[1p.1x.14+1p.1x.3x]=T;1p.bj[1p.bj.14]=T;o $9q(1r){if(!1r)B 1r;if(1X.dW){1X.dW(1r)}1i{C 2l=1n.bY(\'2l\');2l.cL(\'J\',\'1r/58\');2l.1r=1r;1n.78.7E(2l);1n.78.eE(2l)}B 1r};1B.5i=0;C 3Q=K 1B({14:\'3Q\',5J:1X.3Q,1v:o(2k){if(!2k.N){2k.N=$1Y;if(1p.1x.6I)2k.1n.bY("3a");2k.N.2j=(1p.1x.6I)?1X["[[eW.2j]]"]:{}}2k.29=1B.5i++;B $1z(2k,3Q.4v)},6N:o(U,I){1X[U]=3Q.4v[U]=I}});3Q.4v={$3u:{14:\'1X\'}};K 3Q(1X);C 3t=K 1B({14:\'3t\',5J:1X.3t,1v:o(21){21.78=21.5r(\'78\')[0];21.22=21.5r(\'22\')[0];21.1X=21.ef||21.eo;if(1p.1x.f0)$4b(o(){21.eX("eS",M,T)});21.29=1B.5i++;B $1z(21,3t.4v)},6N:o(U,I){1n[U]=3t.4v[U]=I}});3t.4v={$3u:{14:\'1n\'}};K 3t(1n);1t.1l({7J:o(fn,V){R(C i=0,l=c.W;i<l;i++){if(!fn.1L(V,c[i],i,c))B M}B T},1N:o(fn,V){C 45=[];R(C i=0,l=c.W;i<l;i++){if(fn.1L(V,c[i],i,c))45.1K(c[i])}B 45},6h:o(){B c.1N($O(0))},4m:o(1H,1j){C 2B=c.W;R(C i=(1j<0)?1m.1R(0,2B+1j):1j||0;i<2B;i++){if(c[i]===1H)B i}B-1},33:o(fn,V){C 45=[];R(C i=0,l=c.W;i<l;i++)45[i]=fn.1L(V,c[i],i,c);B 45},dP:o(fn,V){R(C i=0,l=c.W;i<l;i++){if(fn.1L(V,c[i],i,c))B T}B M},9B:o(3v){C 15={},W=1m.4l(c.W,3v.W);R(C i=0;i<W;i++)15[3v[i]]=c[i];B 15},2m:o(1c){C 1C={};R(C i=0,l=c.W;i<l;i++){R(C L in 1c){if(1c[L](c[i])){1C[L]=c[i];3r 1c[L];1e}}}B 1C},2e:o(1H,1j){B c.4m(1H,1j)!=-1},1z:o(23){R(C i=0,j=23.W;i<j;i++)c.1K(23[i]);B c},7P:o(){B(c.W)?c[c.W-1]:Y},eY:o(){B(c.W)?c[$bM(0,c.W-1)]:Y},34:o(1H){if(!c.2e(1H))c.1K(1H);B c},3G:o(23){R(C i=0,l=23.W;i<l;i++)c.34(23[i]);B c},4d:o(1H){R(C i=c.W;i--;i){if(c[i]===1H)c.96(i,1)}B c},1Y:o(){c.W=0;B c},4E:o(){C 23=[];R(C i=0,l=c.W;i<l;i++){C J=$J(c[i]);if(!J)4U;23=23.4S((J==\'23\'||J==\'7d\'||J==\'O\')?1t.4E(c[i]):c[i])}B 23},5V:o(23){if(c.W!=3)B Y;C 1P=c.33(o(I){if(I.W==1)I+=I;B I.3W(16)});B(23)?1P:\'1P(\'+1P+\')\'},5S:o(23){if(c.W<3)B Y;if(c.W==4&&c[3]==0&&!23)B\'9U\';C 4n=[];R(C i=0;i<3;i++){C 4k=(c[i]-0).9J(16);4n.1K((4k.W==1)?\'0\'+4k:4k)}B(23)?4n:\'#\'+4n.5F(\'\')}});bK.1l({1z:o(1k){R(C U in 1k)c[U]=1k[U];B c},4Q:o(F){C 2U=c;F=F||{};B o(P){C 1D=F.O;1D=$3D(1D)?$4s(1D):1t.2W(O,(F.P)?1:0);if(F.P)1D=[P||1X.P].1z(1D);C 5P=o(){B 2U.3E(F.V||Y,1D)};if(F.2S)B go(5P,F.2S);if(F.68)B gq(5P,F.68);if(F.8N)B $4b(5P);B 5P()}},4g:o(1D,V){B c.4Q({\'O\':1D,\'V\':V})},8N:o(1D,V){B c.4Q({\'O\':1D,\'V\':V,\'8N\':T})()},V:o(V,1D){B c.4Q({\'V\':V,\'O\':1D})},av:o(V,1D){B c.4Q({\'V\':V,\'P\':T,\'O\':1D})},2S:o(2S,V,1D){B c.4Q({\'2S\':2S,\'V\':V,\'O\':1D})()},68:o(dC,V,1D){B c.4Q({\'68\':dC,\'V\':V,\'O\':1D})()},e2:o(1D,V){B c.3E(V,$4s(1D))}});4V.1l({2g:o(4l,1R){B 1m.4l(1R,1m.1R(4l,c))},3l:o(7q){7q=1m.4J(10,7q||0);B 1m.3l(c*7q)/7q},7y:o(fn,V){R(C i=0;i<c;i++)fn.1L(V,i,c)},dU:o(){B 8b(c)},3W:o(3i){B 5Q(c,3i||10)}});4V.5h(\'7y\',\'1b\');(o(dM){C 4e={};dM.1b(o(14){if(!4V[14])4e[14]=o(){B 1m[14].3E(Y,[c].4S($A(O)))}});4V.1l(4e)})([\'gp\',\'dQ\',\'gj\',\'gb\',\'g9\',\'gd\',\'bv\',\'gg\',\'8F\',\'gf\',\'1R\',\'4l\',\'4J\',\'bl\',\'eD\',\'ge\']);2T.1l({3k:o(8G,12){B((3q 8G==\'1T\')?K 9c(8G,12):8G).3k(c)},2e:o(1T,4C){B(4C)?(4C+c+4C).4m(4C+1T+4C)>-1:c.4m(1T)>-1},6i:o(){B c.2Z(/^\\s+|\\s+$/g,\'\')},6h:o(){B c.2Z(/\\s+/g,\' \').6i()},9z:o(){B c.2Z(/-\\D/g,o(17){B 17.6a(1).8f()})},c8:o(){B c.2Z(/[A-Z]/g,o(17){B(\'-\'+17.6a(0).4r())})},5j:o(){B c.2Z(/\\b[a-z]/g,o(17){B 17.8f()})},c4:o(){B c.2Z(/([-.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')},3W:o(3i){B 5Q(c,3i||10)},dU:o(){B 8b(c)},5V:o(23){C 4n=c.17(/^#?(\\w{1,2})(\\w{1,2})(\\w{1,2})$/);B(4n)?4n.2W(1).5V(23):Y},5S:o(23){C 1P=c.17(/\\d{1,3}/g);B(1P)?1P.5S(23):Y},aU:o(3V){C 8E=\'\';C 1r=c.2Z(/<2l[^>]*>([\\s\\S]*?)<\\/2l>/gi,o(){8E+=O[1]+\'\\n\';B\'\'});if(3V===T)$9q(8E);1i if($J(3V)==\'o\')3V(8E,1r);B 1r}});1o.1l({gF:62.2j.4K,8e:o(I){R(C L in c){if(c.4K(L)&&c[L]===I)B L}B Y},7N:o(I){B(1o.8e(c,I)!==Y)},1z:o(1k){1o.1b(1k,o(I,L){1o.1g(c,L,I)},c);B c},3G:o(1k){1o.1b(1k,o(I,L){1o.34(c,L,I)},c);B c},4d:o(L){if(c.4K(L))3r c[L];B c},1f:o(L){B(c.4K(L))?c[L]:Y},1g:o(L,I){if(!c[L]||c.4K(L))c[L]=I;B c},1Y:o(){1o.1b(c,o(I,L){3r c[L]},c);B c},34:o(L,I){C k=c[L];if(!$3D(k))c[L]=I;B c},33:o(fn,V){C 45=K 1o;1o.1b(c,o(I,L){45.1g(L,fn.1L(V,I,L,c))},c);B 45},1N:o(fn,V){C 45=K 1o;1o.1b(c,o(I,L){if(fn.1L(V,I,L,c))45.1g(L,I)},c);B 45},7J:o(fn,V){R(C L in c){if(c.4K(L)&&!fn.1L(V,c[L],L))B M}B T},dP:o(fn,V){R(C L in c){if(c.4K(L)&&fn.1L(V,c[L],L))B T}B M},gI:o(){C 3v=[];1o.1b(c,o(I,L){3v.1K(L)});B 3v},gK:o(){C 1V=[];1o.1b(c,o(I){1V.1K(I)});B 1V},7K:o(){C 6J=[];1o.1b(c,o(I,L){$4s(I).1b(o(3U){6J.1K(L+\'=\'+aB(3U))})});B 6J.5F(\'&\')}});1o.5h(\'8e\',\'4m\').5h(\'7N\',\'2e\').5h(\'4d\',\'5I\');C 6u=K 1B({14:\'6u\',1v:o(P,2k){2k=2k||1X;P=P||2k.P;if(P.$7Q)B P;c.$7Q=T;C J=P.J;C 5y=P.5y||P.gD;3N(5y&&5y.3R==3)5y=5y.3b;if(J.17(/aL|6X/)){C 9X=(P.dR)?P.dR/gv:-(P.gu||0)/ 3} 1i if (J.3k(/L/)){C 6H=P.ds||P.gx;C L=6u.eA.8e(6H);if(J==\'cq\'){C 8z=6H-gy;if(8z>0&&8z<13)L=\'f\'+8z}L=L||2T.gA(6H).4r()}1i if(J.17(/(9D|4T|gz)/i)){C 2X={x:P.bE||P.dg+2k.1n.7f.8q,y:P.bF||P.di+2k.1n.7f.8t};C 9t={x:P.bE?P.bE-2k.cb:P.dg,y:P.bF?P.bF-2k.cc:P.di};C 9V=(P.ds==3)||(P.fK==2);C 3I=Y;if(J.17(/7b|90/)){1W(J){Q\'aK\':3I=P.9K||P.fM;1e;Q\'aH\':3I=P.9K||P.bA}if((o(){3N(3I&&3I.3R==3)3I=3I.3b}).4Q({8N:1p.1x.aE})()===M)3I=M}}B $1z(c,{P:P,J:J,2X:2X,9t:9t,9V:9V,9X:9X,9K:3I,5y:5y,6H:6H,L:L,9h:P.fG,fz:P.fy,fw:P.fA,fB:P.fE})}});6u.eA=K 1o({\'fD\':13,\'fC\':38,\'fO\':40,\'2n\':37,\'3Y\':39,\'fP\':27,\'g1\':32,\'g0\':8,\'g3\':9,\'3r\':46});6u.1l({4q:o(){B c.9r().9L()},9r:o(){if(c.P.9r)c.P.9r();1i c.P.g4=T;B c},9L:o(){if(c.P.9L)c.P.9L();1i c.P.g6=M;B c}});C 1E=K 1B({14:\'1E\',1v:o(1k){1k=1k||{};C 3z=o(){R(C U in c)c[U]=$6U(c[U]);c.1Q=Y;[\'4M\',\'3F\'].1b(o(7j){if(!c[7j])B;1E[7j](c,c[7j]);3r c[7j]},c);c.9m=3z;C 2U=(O[0]!==$1Y&&c.1v)?c.1v.3E(c,O):c;if(c.F&&c.F.1v)c.F.1v.1L(c);B 2U};$1z(3z,c);3z.9m=1E;3z.2j=1k;B 3z}});1E.1l({1l:o(){1E.4M(c.2j,1t.2W(O));B c}});1E.4M=o(2U,d5){$4s(d5).1b(o(3z){$1z(2U,($J(3z)==\'76\')?K 3z($1Y):3z)})};1E.3F=o(2U,3z){3z=K 3z($1Y);R(C U in 3z){C eb=3z[U];C ec=2U[U];2U[U]=(o(4Z,4D){if($3D(4D)&&4Z!=4D){C J=$J(4D);if(J!=$J(4Z))B 4D;1W(J){Q\'o\':B o(){4D.1Q=2U.1Q=4Z.V(c);C I=4D.3E(c,O);2U.1Q=4D.1Q;B I};Q\'1c\':B $3G(4Z,4D);3T:B 4D}}B 4Z})(eb,ec)}};1E.2j.1z=o(1k){1k.3F=c;B K 1E(1k)};C bH=K 1E({3S:o(){c.$3S=(c.$3S||[]).1z(O);B c},bV:o(){if(c.$3S&&c.$3S.W)c.$3S.9h().3E(c,O);B c},eG:o(){if(c.$3S)c.$3S.1Y();B c}});C 3m=K 1E({1M:o(J,fn,9i){if(fn!=$1Y){c.$1a=c.$1a||{};c.$1a[J]=c.$1a[J]||[];c.$1a[J].34(fn);if(9i)fn.9i=T}B c},79:o(1a){R(C J in 1a)c.1M(J,1a[J]);B c},1u:o(J,1D,2S){if(!c.$1a||!c.$1a[J])B c;c.$1a[J].1b(o(fn){fn.4Q({\'V\':c,\'2S\':2S,\'O\':1D})()},c);B c},3j:o(J,fn){if(!c.$1a||!c.$1a[J])B c;if(!fn.9i)c.$1a[J].4d(fn);B c},9e:o(J){R(C e in c.$1a){if(J&&J!=e)4U;C ad=c.$1a[e];R(C i=ad.W;i--;i)c.3j(e,ad[i])}B c}});C 5l=K 1E({5m:o(){c.F=$3G.e2([c.F].1z(O));if(!c.1M)B c;R(C 3V in c.F){if($J(c.F[3V])!=\'o\'||!(/^94[A-Z]/).3k(3V))4U;c.1M(3V,c.F[3V]);3r c.F[3V]}B c}});3t.1l({ep:o(1I,2A){if(1p.1x.3h&&2A){[\'14\',\'J\',\'8c\'].1b(o(2v){if(!2A[2v])B;1I+=\' \'+2v+\'="\'+2A[2v]+\'"\';if(2v!=\'8c\')3r 2A[2v]});1I=\'<\'+1I+\'>\'}B $.G(c.bY(1I)).1g(2A)},eP:o(1r){B c.g5(1r)},3A:o(){B c},3X:o(){B c.ef||c.eo}});C N=K 1B({14:\'N\',5J:1X.N,1v:o(1I,2A){C ab=N.eh.1f(1I);if(ab)B ab(2A);if(3q 1I==\'1T\')B 1n.ep(1I,2A);B $(1I).1g(2A)},6N:o(L,I){if(!1t[L])2E.1l(L,2E.ei(L));N.4v[L]=I}});N.4v={$3u:{14:\'G\'}};N.eh=K 1o;C eg=K 1B({14:\'eg\',6O:M,1v:o(){1B.5i++;C 12=1t.2m(O,{1k:62.J,3a:$3D});C 2A=12.1k||{};C 3a=$(12.3a)||M;C 4A=2A.4A||$1Y;3r 2A.4A;2A.id=2A.14=$5G(2A.id,2A.14,3a.id,3a.14,\'fS\'+1B.5i);((3a=3a||K N(\'3a\'))).1g(2A);C 9T=o(){C 7X=$4b(o(){B 3a.ap.5C.7X});if(7X&&7X==1X.5C.7X){3a.1X=3a.ap;C 2k=K 3Q(3a.1X);C 21=K 3t(3a.1X.1n);$1z(2k.N.2j,N.4v)}4A.1L(3a.ap)};(!1X.fR[2A.id])?3a.6x(\'2w\',9T):9T();B 3a}});C 2E=K 1B({1v:o(19,F){F=$1z({4c:T,6c:T},F);19=19||[];if(F.4c||F.6c){C 6p={};C 5R=[];R(C i=0,l=19.W;i<l;i++){C el=$.G(19[i],!F.6c);if(F.4c){if(6p[el.29])4U;6p[el.29]=T}5R.1K(el)}19=5R}B(F.6c)?$1z(19,c):19}});2E.1l({dy:o(1N){if(!1N)B c;B K 2E(c.1N((3q 1N==\'1T\')?o(1H){B 1H.17(1N)}:1N))}});2E.ei=o(U){B o(){C 2G=[];C 19=T;R(C i=0,j=c.W;i<j;i++){C 5P=c[i][U].3E(c[i],O);2G.1K(5P);if(19)19=($J(5P)==\'G\')}B(19)?K 2E(2G):2G}};3Q.1l({$:o(el,5O){if(el&&el.$1S)B el;C J=$J(el);B($[J])?$[J](el,5O,c.1n):Y},$$:o(2H){if(O.W==1&&3q 2H==\'1T\')B c.1n.5W(2H);C 19=[];C 1D=1t.4E(O);R(C i=0,l=1D.W;i<l;i++){C 1H=1D[i];1W($J(1H)){Q\'G\':1H=[1H];1e;Q\'1T\':1H=c.1n.5W(1H,T);1e;3T:1H=M}if(1H)19.1z(1H)}B K 2E(19)},3A:o(){B c.1n},3X:o(){B c}});$.1T=o(id,5O,21){id=21.9l(id);B(id)?$.G(id,5O):Y};$.G=o(el,5O){el.29=el.29||[1B.5i++];if(!5O&&43.cw(el)&&!el.$3u)$1z(el,N.4v);B el};$.eq=$.1X=$.1n=$O(0);$.5L=o(29){B 43.2E[29]||Y};1B.1l([N,3t],{9s:o(2H,5O){B $(c.5W(2H,T)[0]||Y,5O)},5W:o(87,2a){87=87.5w(\',\');C 19=[];C 4c=(87.W>1);87.1b(o(1I){C 6o=c.5r(1I.6i());(4c)?19.1z(6o):19=6o},c);B K 2E(19,{4c:4c,6c:!2a})}});N.8v={1f:o(29){B(c[29]=c[29]||{})}};N.5v=K 1o({aG:o(2J,G){if(G.3b)G.3b.bm(2J,G)},aC:o(2J,G){if(!G.3b)B;C 6b=G.5f;(6b)?G.3b.bm(2J,6b):G.3b.7E(2J)},31:o(2J,G){G.7E(2J)},2i:o(2J,G){C 7w=G.97;(7w)?G.bm(2J,7w):G.7E(2J)}});N.5v.db=N.5v.31;N.5v.1b(o(I,L){C bp=L.5j();N.1l(\'3c\'+bp,o(el){N.5v[L](c,$(el,T));B c});N.1l(\'7B\'+bp,o(el){N.5v[L]($(el,T),c);B c})});N.1l({3A:o(){B c.9y},3X:o(){B c.9y.3X()},9l:o(id,2a){C el=c.9y.9l(id);if(!el)B Y;R(C 1Q=el.3b;1Q!=c;1Q=1Q.3b){if(!1Q)B Y}B $.G(el,2a)},1g:o(2P,I){1W($J(2P)){Q\'1c\':R(C p in 2P)c.1g(p,2P[p]);1e;Q\'1T\':C U=N.3n.1f(2P);(U&&U.1g)?U.1g.3E(c,1t.2W(O,1)):c.ag(2P,I)}B c},1f:o(2P){C U=N.3n.1f(2P);B(U&&U.1f)?U.1f.3E(c,1t.2W(O,1)):c.8P(2P)},5I:o(2P){C U=N.3n.1f(2P);(U&&U.5I)?U.5I.3E(c,1t.2W(O,1)):c.7T(2P);B c},17:o(1I){B(!1I||N.1f(c,\'1I\')==1I)},3c:o(el,49){N.5v.1f(49||\'31\')(c,$(el,T));B c},dv:o(el,49){el=$(el,T);B c.eC(el).7B(el)},7B:o(el,49){N.5v.1f(49||\'31\')($(el,T),c);B c},fU:o(1r,49){B c.7B(c.3A().eP(1r),49)},dh:o(){1t.4E(O).1b(o(G){c.7E($(G,T))},c);B c},7p:o(){B c.3b.eE(c)},3L:o(ey){C 2d=K N(\'5n\').7B(c.fW(ey!==M));1t.1b(2d.5r(\'*\'),o(G){if(G.id)G.cE(\'id\')});B K N(\'5n\').1g(\'22\',2d.bL).d3()},eC:o(el){el=$(el,T);el.3b.fV(c,el);B c},aV:o(2o){B c.2o.2e(2o,\' \')},c3:o(2o){if(!c.aV(2o))c.2o=(c.2o+\' \'+2o).6h();B c},c7:o(2o){c.2o=c.2o.2Z(K 9c(\'(^|\\\\s)\'+2o+\'(?:\\\\s|$)\'),\'$1\').6h();B c},fX:o(2o){B c.aV(2o)?c.c7(2o):c.c3(2o)},6D:o(U){C 1C=Y;if(c.9p){1C=c.9p[U.9z()]}1i{C 69=c.3X().6D(c,Y);if(69)1C=69.fT([U.c8()])}B 1C},1Y:o(){C 19=$A(c.5r(\'*\'));19.1b(o(G){$4b(N.2j.7p,G)});43.cr(19);$4b(N.2j.1g,c,[\'22\',\'\']);B c},e6:o(){43.8Y(c.1Y().7p());B Y},7K:o(){C 6J=[];c.5W(\'ca, bc, fQ\',T).1b(o(el){C 14=el.14,J=el.J,I=N.1f(el,\'I\');if(I===M||!14||el.8l)B;$4s(I).1b(o(3U){6J.1K(14+\'=\'+aB(3U))})});B 6J.5F(\'&\')},8P:o(2v){C 3w=N.7t,L=3w.7s[2v];C I=(L)?c[L]:c.fY(2v);B(3w.6B[2v])?!!I:I},fZ:o(){C 1D=$A(O);B 1D.33(o(c9){B c.8P(c9)},c).9B(1D)},ag:o(2v,I){C 3w=N.7t,L=3w.7s[2v],7N=$3D(I);if(L&&3w.6B[2v])I=(I||!7N)?T:M;1i if(!7N)B c.7T(2v);(L)?c[L]=I:c.cL(2v,I);B c},b3:o(1S){R(C 2v in 1S)c.ag(2v,1S[2v]);B c},7T:o(2v){C 3w=N.7t,L=3w.7s[2v],cN=(L&&3w.6B[2v]);(L)?c[L]=(cN)?M:\'\':c.cE(2v);B c},fF:o(){1t.1b(O,c.7T,c);B c}});(o(){C 41=o(G,41,18,17,56,2a){C el=G[18||41];C 19=[];3N(el){if(el.3R==1&&N.17(el,17)){19.1K(el);if(!56)1e}el=el[41]}B(56)?K 2E(19,{4c:M,6c:!2a}):$(19[0],2a)};N.1l({fN:o(17,2a){B 41(c,\'7L\',Y,17,M,2a)},d8:o(17,2a){B 41(c,\'7L\',Y,17,T,2a)},fH:o(17,2a){B 41(c,\'5f\',Y,17,M,2a)},fI:o(17,2a){B 41(c,\'5f\',Y,17,T,2a)},d3:o(17,2a){B 41(c,\'5f\',\'97\',17,M,2a)},7P:o(17,2a){B 41(c,\'7L\',\'g8\',17,M,2a)},8n:o(17,2a){B 41(c,\'3b\',Y,17,M,2a)},cX:o(17,2a){B 41(c,\'3b\',Y,17,T,2a)},84:o(17,2a){B 41(c,\'5f\',\'97\',17,T,2a)},cB:o(el){if(!(el=$(el,T)))B M;B N.cX(el,c.1f(\'1I\'),T).2e(c)}})})();N.5h(\'7p\',\'4d\').5h(\'7P\',\'gB\');N.3n=K 1o;N.3n.1F={1g:o(1F){c.1F.bo=1F},1f:o(){B c.1F.bo},5I:o(){c.1F.bo=\'\'}};N.3n.I={1f:o(){1W(N.1f(c,\'1I\')){Q\'bc\':C 1V=[];1t.1b(c.F,o(3V){if(3V.cf)1V.1K(3V.I)});B(c.cg)?1V:1V[0];Q\'ca\':if([\'gw\',\'gC\'].2e(c.J)&&!c.8c)B M;3T:B $5G(c.I,M)}}};N.3n.1I={1f:o(){B c.8V.4r()}};N.3n.22={1g:o(){B c.bL=1t.4E(O).5F(\'\')}};N.1l({gJ:o(){B c.1f(\'1r\')},gH:o(1r){B c.1g(\'1r\',1r)},gE:o(){B c.1g(\'22\',O)},fv:o(){B c.1f(\'22\')},gG:o(){B c.1f(\'1I\')}});1B.1l([N,3Q,3t],{6x:o(J,fn){if(c.cm)c.cm(J,fn,M);1i c.gc(\'94\'+J,fn);B c},ct:o(J,fn){if(c.cn)c.cn(J,fn,M);1i c.ga(\'94\'+J,fn);B c},1U:o(U,bW){C 6g=N.8v.1f(c.29);C 2P=6g[U];if($3D(bW)&&!$3D(2P))2P=6g[U]=bW;B $5G(2P)},5u:o(U,I){C 6g=N.8v.1f(c.29);6g[U]=I;B c},gh:o(U){C 6g=N.8v.1f(c.29);3r 6g[U];B c}});N.7t=K 1o({7s:{\'22\':\'bL\',\'76\':\'2o\',\'R\':\'gn\',\'1r\':(1p.1x.3h)?\'cR\':\'cQ\'},6B:[\'gk\',\'gl\',\'gm\',\'gL\',\'f4\',\'8c\',\'8l\',\'eV\',\'cg\',\'cf\',\'eU\',\'cM\'],aI:[\'I\',\'eQ\',\'eT\',\'eR\',\'fu\',\'fk\',\'fj\',\'fh\',\'fi\',\'fm\',\'fo\']});(o(3w){C 7g=3w.6B,aT=3w.aI;3w.6B=7g=7g.9B(7g);1o.1z(1o.3G(3w.7s,7g),aT.9B(aT.33(o(v){B v.4r()})));3w.4d(\'aI\')})(N.7t);C 43={2E:{},cv:{1c:1,fd:1,fc:1,fa:1},cw:o(el){if(el.$1S)B T;if(43.cv[el.8V])B M;43.2E[el.29]=el;el.$1S={};B T},cr:o(19){R(C i=19.W,el;i--;i)43.8Y(19[i])},8Y:o(el){if(!el||!el.$1S)B;3r 43.2E[el.29];if(el.1U(\'1a\'))el.9e();R(C p in el.$1S)el.$1S[p]=Y;if(1p.1x.3h){R(C d in N.4v)el[d]=Y}el.$1S=el.29=Y},1Y:o(){R(C 29 in 43.2E)43.8Y(43.2E[29])}};1X.6x(\'a0\',o(){1X.6x(\'9F\',43.1Y);if(1p.1x.3h)1X.6x(\'9F\',f2)});N.3n.1a={1g:o(1a){c.79(1a)}};1B.1l([N,3Q,3t],{1M:o(J,fn){C 1a=c.1U(\'1a\',{});1a[J]=1a[J]||{\'3v\':[],\'1V\':[]};if(1a[J].3v.2e(fn))B c;1a[J].3v.1K(fn);C 7O=J,47=N.3m.1f(J),3o=fn,2U=c;if(47){if(47.a4)47.a4.1L(c,fn);if(47.3o){3o=o(P){if(47.3o.1L(c,P))B fn.1L(c,P);B M}}7O=47.3i||7O}C 95=o(){B fn.1L(2U)};C 9Q=N.bf[7O]||0;if(9Q){if(9Q==2){95=o(P){P=K 6u(P,2U.3X());if(3o.1L(2U,P)===M)P.4q()}}c.6x(7O,95)}1a[J].1V.1K(95);B c},3j:o(J,fn){C 1a=c.1U(\'1a\');if(!1a||!1a[J])B c;C 1q=1a[J].3v.4m(fn);if(1q==-1)B c;C L=1a[J].3v.96(1q,1)[0];C I=1a[J].1V.96(1q,1)[0];C 47=N.3m.1f(J);if(47){if(47.cu)47.cu.1L(c,fn);J=47.3i||J}B(N.bf[J])?c.ct(J,I):c},79:o(1a){R(C P in 1a)c.1M(P,1a[P]);B c},9e:o(J){C 1a=c.1U(\'1a\');if(!1a)B c;if(!J){R(C 8Q in 1a)c.9e(8Q);1a=Y}1i if(1a[J]){3N(1a[J].3v[0])c.3j(J,1a[J].3v[0]);1a[J]=Y}B c},1u:o(J,1D,2S){C 1a=c.1U(\'1a\');if(!1a||!1a[J])B c;1a[J].3v.1b(o(fn){fn.4Q({\'V\':c,\'2S\':2S,\'O\':1D})()},c);B c},cs:o(1j,J){1j=$(1j);C 80=1j.1U(\'1a\');if(!80)B c;if(!J){R(C 8Q in 80)c.cs(1j,8Q)}1i if(80[J]){80[J].3v.1b(o(fn){c.1M(J,fn)},c)}B c}});N.bf={\'9D\':2,\'hu\':2,\'83\':2,\'5U\':2,\'jc\':2,\'6X\':2,\'aL\':2,\'aK\':2,\'aH\':2,\'5D\':2,\'dp\':2,\'jb\':2,\'cq\':2,\'jd\':2,\'je\':2,\'jf\':2,\'ja\':2,\'5N\':2,\'7e\':2,\'bc\':2,\'j9\':2,\'2w\':1,\'9F\':1,\'a0\':1,\'j4\':1,\'j3\':1,\'d4\':1,\'ba\':1,\'eu\':1,\'aZ\':1,\'3M\':1};(o(){C aD=o(P){C 3I=P.9K;if(!3I)B T;B($J(c)!=\'1n\'&&3I!=c&&3I.bx!=\'j5\'&&!c.cB(3I))};N.3m=K 1o({cj:{3i:\'aK\',3o:aD},cd:{3i:\'aH\',3o:aD},6X:{3i:(1p.1x.aE)?\'aL\':\'6X\'}})})();N.3n.5E={1g:o(5E){c.65(5E)}};N.3n.1Z={1g:o(1Z,cA){if(!cA){if(1Z==0){if(c.1F.59!=\'5B\')c.1F.59=\'5B\'}1i{if(c.1F.59!=\'aa\')c.1F.59=\'aa\'}}if(!c.9p||!c.9p.j6)c.1F.co=1;if(1p.1x.3h)c.1F.1N=(1Z==1)?\'\':\'8R(1Z=\'+1Z*4w+\')\';c.1F.1Z=1Z;c.5u(\'1Z\',1Z)},1f:o(){B c.1U(\'1Z\',1)}};N.1l({j8:o(I){B c.1g(\'1Z\',I,T)},j7:o(){B c.1f(\'1Z\')},2y:o(U,I){1W(U){Q\'1Z\':B c.1g(\'1Z\',8b(I));Q\'cz\':U=(1p.1x.3h)?\'cx\':\'cy\'}U=U.9z();if($J(I)!=\'1T\'){C 33=(N.8y.1f(U)||\'@\').5w(\' \');I=$4s(I).33(o(3U,i){if(!33[i])B\'\';B($J(3U)==\'5L\')?33[i].2Z(\'@\',1m.3l(3U)):3U}).5F(\' \')}1i if(I==2T(4V(I))){I=1m.3l(I)}c.1F[U]=I;B c},3K:o(U){1W(U){Q\'1Z\':B c.1f(\'1Z\');Q\'cz\':U=(1p.1x.3h)?\'cx\':\'cy\'}U=U.9z();C 1C=c.1F[U];if(!$3B(1C)){1C=[];R(C 1F in N.7m){if(U!=1F)4U;R(C s in N.7m[1F])1C.1K(c.3K(s));B 1C.5F(\' \')}1C=c.6D(U)}if(1C){1C=2T(1C);C 1G=1C.17(/jg?\\([\\d\\s,]+\\)/);if(1G)1C=1C.2Z(1G[0],1G[0].5S())}if(1p.1x.aR||(1p.1x.3h&&!$3B(5Q(1C)))){if(U.3k(/^(2C|2p)$/)){C 1V=(U==\'2p\')?[\'2n\',\'3Y\']:[\'2i\',\'31\'],3e=0;1V.1b(o(I){3e+=c.3K(\'51-\'+I+\'-2p\').3W()+c.3K(\'4X-\'+I).3W()},c);B c[\'2b\'+U.5j()]-3e+\'1w\'}if(1p.1x.aR&&2T(1C).3k(\'1w\'))B 1C;if(U.3k(/(51(.+)ce|2Q|4X)/))B\'dD\'}B 1C},65:o(5E){R(C 1F in 5E)c.2y(1F,5E[1F]);B c},ax:o(){C 1C={};1t.1b(O,o(L){1C[L]=c.3K(L)},c);B 1C}});N.8y=K 1o({2p:\'@1w\',2C:\'@1w\',2n:\'@1w\',2i:\'@1w\',31:\'@1w\',3Y:\'@1w\',jh:\'@1w\',jq:\'@1w\',jp:\'1P(@, @, @)\',jr:\'@1w @1w\',1G:\'1P(@, @, @)\',js:\'@1w\',jt:\'@1w\',jo:\'@1w\',jn:\'jj(@1w @1w @1w @1w)\',2Q:\'@1w @1w @1w @1w\',4X:\'@1w @1w @1w @1w\',51:\'@1w @ 1P(@, @, @) @1w @ 1P(@, @, @) @1w @ 1P(@, @, @)\',bP:\'@1w @1w @1w @1w\',bQ:\'@ @ @ @\',bN:\'1P(@, @, @) 1P(@, @, @) 1P(@, @, @) 1P(@, @, @)\',ji:\'@\',\'co\':\'@\',jk:\'@\',jl:\'@1w\',1Z:\'@\'});N.7m={\'2Q\':{},\'4X\':{},\'51\':{},\'bP\':{},\'bQ\':{},\'bN\':{}};[\'jm\',\'j2\',\'j1\',\'iI\'].1b(o(bO){C 4P=N.7m;C 6z=N.8y;[\'2Q\',\'4X\'].1b(o(1F){C bt=1F+bO;4P[1F][bt]=6z[bt]=\'@1w\'});C bd=\'51\'+bO;4P.51[bd]=6z[bd]=\'@1w @ 1P(@, @, @)\';C 8d=bd+\'ce\',8i=bd+\'iH\',8B=bd+\'44\';4P[bd]={};4P.bP[8d]=4P[bd][8d]=6z[8d]=\'@1w\';4P.bQ[8i]=4P[bd][8i]=6z[8i]=\'@\';4P.bN[8B]=4P[bd][8B]=6z[8B]=\'1P(@, @, @)\'});(o(){o $2u(el){B el.8V.4r()==\'2u\'};N.1l({9G:o(){if($2u(c))B T;B(N.6D(c,\'1J\')!=\'iJ\')},bi:o(){if($2u(c))B Y;if(!1p.1x.3h)B $(c.au);C el=c;3N((el=el.3b)){if(N.9G(el))B $(el)}B Y},52:o(){if($2u(c))B c.3X().52();B{x:c.6M,y:c.6L}},6Y:o(){if($2u(c))B c.3X().6Y();B{x:c.8w,y:c.7k}},5M:o(){if($2u(c))B c.3X().5M();B{x:c.8q,y:c.8t}},9M:o(x,y){if($2u(c))B c.3X().9M(x,y);c.8q=x;c.8t=y;B c},4t:o(7r){if($2u(c))B{x:0,y:0};C el=c,1J={x:0,y:0};3N(el){1J.x+=el.iK;1J.y+=el.iL;el=el.au}C bJ=(7r)?$(7r).4t():{x:0,y:0};B{x:1J.x-bJ.x,y:1J.y-bJ.y}},8a:o(G){if($2u(c))B c.3X().8a();C 1J=c.4t(G),3e=c.52();C 15={\'2i\':1J.y,\'2n\':1J.x,\'2p\':3e.x,\'2C\':3e.y};15.3Y=15.2n+15.2p;15.31=15.2i+15.2C;B 15},bT:o(){B c.4t(c.bi())},aw:o(15){B{2n:15.x-(c.6D(\'2Q-2n\').3W()||0),2i:15.y-(c.6D(\'2Q-2i\').3W()||0)}},1J:o(15){B c.65(c.aw(15))}})})();1B.1l([3Q,3t],{52:o(){C 2u=c.3A().2u,22=c.3A().7f;if(1p.1x.8g)B{x:c.iG,y:c.iF};B{x:22.ch,y:22.ci}},5M:o(){C 22=c.3A().7f;B{x:$5G(c.cb,22.8q),y:$5G(c.cc,22.8t)}},6Y:o(){C 22=c.3A().7f,2u=c.3A().2u;if(1p.1x.3h)B{x:1m.1R(22.ch,22.8w),y:1m.1R(22.ci,22.7k)};if(1p.1x.6I)B{x:2u.8w,y:2u.7k};B{x:22.8w,y:22.7k}},4t:o(){B{x:0,y:0}},8a:o(){C 3e=c.52();B{2i:0,2n:0,2C:3e.y,2p:3e.x,31:3e.y,3Y:3e.x}}});1B.1l([3Q,3t,N],{iA:o(){B c.52().y},iz:o(){B c.52().x},iB:o(){B c.5M().y},iC:o(){B c.5M().x},iE:o(){B c.6Y().y},iD:o(){B c.6Y().x},iM:o(){B c.4t().y},iN:o(){B c.4t().x}});1B.1l([N,3t],{5W:o(88,2a){C 26={};88=88.5w(\',\');C 19=[],j=88.W;C 4c=(j>1);R(C i=0;i<j;i++){C 2H=88[i],2G=[],bZ=[];2H=2H.6i().2Z(1A.cC,o(17){if(17.6a(2))17=17.6i();bZ.1K(17.6a(0));B\':)\'+17.6a(1)}).5w(\':)\');R(C k=0,l=2H.W;k<l;k++){C bR=1A.4R(2H[k]);if(!bR)B[];C 2d=1A.9R.bD(2G,bZ[k-1]||M,c,bR,26);if(!2d)1e;2G=2d}C 6o=1A.9R.bz(2G,c);19=(4c)?19.4S(6o):6o}B K 2E(19,{4c:4c,6c:!2a})}});3Q.1l({$E:o(2H){B c.1n.9s(2H)}});C 1A={cD:(/:([^-:(]+)[^:(]*(?:\\((["\']?)(.*?)\\2\\))?|\\[(\\w+)(?:([!*^$~|]?=)(["\']?)(.*?)\\6)?\\]|\\.[\\w-]+|#[\\w-]+|\\w+|\\*/g),cC:(/\\s*([+>~\\s])[a-jv-Z#.*\\s]/g)};1A.4R=o(2H){C 12={1I:\'*\',id:Y,6n:[],1S:[],6f:[]};2H=2H.2Z(1A.cD,o(4k){1W(4k.6a(0)){Q\'.\':12.6n.1K(4k.2W(1));1e;Q\'#\':12.id=4k.2W(1);1e;Q\'[\':12.1S.1K([O[4],O[5],O[7]]);1e;Q\':\':C 7S=1A.2Y.1f(O[1]);if(!7S){12.1S.1K([O[1],O[3]?\'=\':\'\',O[3]]);1e}C 4B={\'14\':O[1],\'2q\':7S,\'1h\':(7S.2q)?7S.2q(O[3]):O[3]};12.6f.1K(4B);1e;3T:12.1I=4k}B\'\'});B 12};1A.2Y=K 1o;1A.9W={bD:o(2G,4C,2J,12){C 2d=\'\';1W(4C){Q\' \':2d+=\'//\';1e;Q\'>\':2d+=\'/\';1e;Q\'+\':2d+=\'/8A-6k::*[1]/2U::\';1e;Q\'~\':2d+=\'/8A-6k::\';1e}2d+=(2J.iW)?\'bG:\'+12.1I:12.1I;C i;R(i=12.6f.W;i--;i){C 4B=12.6f[i];if(4B.2q&&4B.2q.2r)2d+=4B.2q.2r(4B.1h);1i 2d+=($3B(4B.1h))?\'[@\'+4B.14+\'="\'+4B.1h+\'"]\':\'[@\'+4B.14+\']\'}if(12.id)2d+=\'[@id="\'+12.id+\'"]\';R(i=12.6n.W;i--;i)2d+=\'[2e(4S(" ", @76, " "), " \'+12.6n[i]+\' ")]\';R(i=12.1S.W;i--;i){C 1O=12.1S[i];1W(1O[1]){Q\'=\':2d+=\'[@\'+1O[0]+\'="\'+1O[2]+\'"]\';1e;Q\'*=\':2d+=\'[2e(@\'+1O[0]+\', "\'+1O[2]+\'")]\';1e;Q\'^=\':2d+=\'[iY-iZ(@\'+1O[0]+\', "\'+1O[2]+\'")]\';1e;Q\'$=\':2d+=\'[cV(@\'+1O[0]+\', 1T-W(@\'+1O[0]+\') - \'+1O[2].W+\' + 1) = "\'+1O[2]+\'"]\';1e;Q\'!=\':2d+=\'[@\'+1O[0]+\'!="\'+1O[2]+\'"]\';1e;Q\'~=\':2d+=\'[2e(4S(" ", @\'+1O[0]+\', " "), " \'+1O[2]+\' ")]\';1e;Q\'|=\':2d+=\'[2e(4S("-", @\'+1O[0]+\', "-"), "-\'+1O[2]+\'-")]\';1e;3T:2d+=\'[@\'+1O[0]+\']\'}}2G.1K(2d);B 2G},bz:o(2G,2J){C 19=[];C 21=2J.3A();C 2r=21.cS(\'.//\'+2G.5F(\'\'),2J,1A.9W.cT,j0.iV,Y);R(C i=0,j=2r.iU;i<j;i++)19[i]=2r.iP(i);B 19},cT:o(bx){B(bx==\'bG\')?\'cY://dK.iO.iQ/iR/bG\':M}};1A.6j={bD:o(2G,4C,2J,12,26){C 4H=[];C 1I=12.1I;if(4C){C 6p={},2R,4j,1H,k,l;C 5g=o(2R){2R.29=2R.29||[1B.5i++];if(!6p[2R.29]&&1A.6j.17(2R,12,26)){6p[2R.29]=T;4H.1K(2R);B T}B M};R(C i=0,j=2G.W;i<j;i++){1H=2G[i];1W(4C){Q\' \':4j=1H.5r(1I);12.1I=M;R(k=0,l=4j.W;k<l;k++)5g(4j[k]);1e;Q\'>\':4j=1H.6t;R(k=0,l=4j.W;k<l;k++){if(4j[k].3R==1)5g(4j[k])}1e;Q\'+\':3N((1H=1H.5f)){if(1H.3R==1){5g(1H);1e}}1e;Q\'~\':3N((1H=1H.5f)){if(1H.3R==1&&5g(1H))1e}1e}}B 4H}if(12.id){el=2J.9l(12.id,T);12.id=M;B(el&&1A.6j.17(el,12,26))?[el]:M}1i{2G=2J.5r(1I);12.1I=M;R(C m=0,n=2G.W;m<n;m++){if(1A.6j.17(2G[m],12,26))4H.1K(2G[m])}}B 4H},bz:$O(0)};1A.6j.17=o(el,12,26){26=26||{};if(12.id&&12.id!=el.id)B M;if(12.1I&&12.1I!=\'*\'&&12.1I!=el.8V.4r())B M;C i;R(i=12.6n.W;i--;i){if(!el.2o||!el.2o.2e(12.6n[i],\' \'))B M}R(i=12.1S.W;i--;i){C 1O=12.1S[i];C 1C=N.2j.8P.1L(el,1O[0]);if(!1C)B M;if(!1O[1])4U;C 3o;1W(1O[1]){Q\'=\':3o=(1C==1O[2]);1e;Q\'*=\':3o=(1C.2e(1O[2]));1e;Q\'^=\':3o=(1C.7u(0,1O[2].W)==1O[2]);1e;Q\'$=\':3o=(1C.7u(1C.W-1O[2].W)==1O[2]);1e;Q\'!=\':3o=(1C!=1O[2]);1e;Q\'~=\':3o=1C.2e(1O[2],\' \');1e;Q\'|=\':3o=1C.2e(1O[2],\'-\')}if(!3o)B M}R(i=12.6f.W;i--;i){if(!12.6f[i].2q.1N.1L(el,12.6f[i].1h,26))B M}B T};1A.9R=(1p.8K.2r)?1A.9W:1A.6j;N.1l({17:o(2H){B(!2H||1A.6j.17(c,1A.4R(2H)))}});1A.2Y.ju={2r:o(){B\'[an(@8l)]\'},1N:o(){B!(c.8l)}};1A.2Y.1Y={2r:o(){B\'[an(8L())]\'},1N:o(){B!(c.cR||c.cQ||\'\').W}};1A.2Y.2e={2r:o(1h){B\'[2e(1r(), "\'+1h+\'")]\'},1N:o(1h){R(C i=c.6t.W;i--;i){C 2R=c.6t[i];if(2R.cI&&2R.3R==3&&2R.cH.2e(1h))B T}B M}};1A.2Y.4G={2q:o(1h){1h=(1h)?1h.17(/^([+-]?\\d*)?([jz]+)?([+-]?\\d*)?$/):[Y,1,\'n\',0];if(!1h)B M;C al=5Q(1h[1]);C a=($3B(al))?al:1;C 2D=1h[2]||M;C b=5Q(1h[3])||0;b=b-1;3N(b<1)b+=a;3N(b>=a)b-=a;1W(2D){Q\'n\':B{\'a\':a,\'b\':b,\'2D\':\'n\'};Q\'cJ\':B{\'a\':2,\'b\':0,\'2D\':\'n\'};Q\'cF\':B{\'a\':2,\'b\':1,\'2D\':\'n\'};Q\'7w\':B{\'a\':0,\'2D\':\'2I\'};Q\'6S\':B{\'2D\':\'6S\'};Q\'6Z\':B{\'2D\':\'6Z\'};3T:B{\'a\':(a-1),\'2D\':\'2I\'}}},2r:o(1h){1W(1h.2D){Q\'n\':B\'[61(ay-6k::*) 5A \'+1h.a+\' = \'+1h.b+\']\';Q\'6S\':B\'[61(8A-6k::*) = 0]\';Q\'6Z\':B\'[an(ay-6k::* 7W 8A-6k::*)]\';3T:B\'[61(ay-6k::*) = \'+1h.a+\']\'}},1N:o(1h,26){C 61=0,el=c;1W(1h.2D){Q\'n\':26.7l=26.7l||{};if(!26.7l[c.29]){C 4j=c.3b.6t;R(C i=0,l=4j.W;i<l;i++){C 2R=4j[i];if(2R.3R!=1)4U;2R.29=2R.29||[1B.5i++];26.7l[2R.29]=61++}}B(26.7l[c.29]%1h.a==1h.b);Q\'6S\':3N((el=el.5f)){if(el.3R==1)B M}B T;Q\'6Z\':C 9x=el;3N((9x=9x.7L)){if(9x.3R==1)B M}C 6b=el;3N((6b=6b.5f)){if(6b.3R==1)B M}B T;Q\'2I\':3N((el=el.7L)){if(el.3R==1&&++61>1h.a)B M}B T}B M}};1A.2Y.1z({\'cF\':{2q:o(){B{\'a\':2,\'b\':1,\'2D\':\'n\'}},2r:1A.2Y.4G.2r,1N:1A.2Y.4G.1N},\'cJ\':{2q:o(){B{\'a\':2,\'b\':0,\'2D\':\'n\'}},2r:1A.2Y.4G.2r,1N:1A.2Y.4G.1N},\'7w\':{2q:o(){B{\'a\':0,\'2D\':\'2I\'}},2r:1A.2Y.4G.2r,1N:1A.2Y.4G.1N},\'6S\':{2q:o(){B{\'2D\':\'6S\'}},2r:1A.2Y.4G.2r,1N:1A.2Y.4G.1N},\'6Z\':{2q:o(){B{\'2D\':\'6Z\'}},2r:1A.2Y.4G.2r,1N:1A.2Y.4G.1N}});N.3m.6G={a4:o(fn){if(1p.af)B fn.1L(c);C 2U=c,2k=c.3X(),21=c.3A();C 6G=o(){if(!O.2h.cK){O.2h.cK=T;fn.1L(2U)};B T};C cP=(1p.1x.6I)?[\'af\',\'6s\']:\'6s\';C 2c=o(2J){if(cP.2e(2J.7Y))B 6G();B M};if(21.7Y&&1p.1x.6I){(o(){if(!2c(21))O.2h.2S(50)})()}1i if(21.7Y&&1p.1x.3h){C 2l=$(\'ac\');if(!2l){C 6v=(2k.5C.jQ==\'jR:\')?\'//:\':\'58:jS(0)\';21.85(\'<2l id="ac" cM 6v="\'+6v+\'"></2l>\');2l=$(\'ac\')}if(!2c(2l))2l.1M(\'ba\',2c.4g(2l))}1i{2k.1M(\'2w\',6G);21.1M(\'d4\',6G)}B Y}};1X.1M(\'6G\',o(){1p.af=T});C 4f=K 1o({6w:o(15){1W($J(15)){Q\'1T\':B\'"\'+15.2Z(/[\\jO-\\jB\\\\"]/g,4f.$c5)+\'"\';Q\'23\':B\'[\'+2T(15.33(4f.6w).1N($3D))+\']\';Q\'1c\':Q\'5T\':C 1T=[];1o.1b(15,o(I,L){C 6q=4f.6w(I);if(6q)1T.1K(4f.6w(L)+\':\'+6q)});B\'{\'+2T(1T)+\'}\';Q\'5L\':Q\'jC\':B 2T(15);Q M:B\'Y\'}B Y},$c2:{\'\\b\':\'\\\\b\',\'\\t\':\'\\\\t\',\'\\n\':\'\\\\n\',\'\\f\':\'\\\\f\',\'\\r\':\'\\\\r\',\'"\':\'\\\\"\',\'\\\\\':\'\\\\\\\\\'},$c5:o(8I){B 4f.$c2[8I]||\'\\\\jD\'+1m.8F(8I.ar()/16).9J(16)+(8I.ar()%16).9J(16)},b4:o(1T,67){if($J(1T)!=\'1T\'||!1T.W)B Y;if(67&&!(/^[,:{}\\[\\]0-9.\\-+jA-u \\n\\r\\t]*$/).3k(1T.2Z(/\\\\./g,\'@\').2Z(/"[^"\\\\\\n\\r]*"/g,\'\')))B Y;B e8(\'(\'+1T+\')\')}});1B.1l([1o,1t,2T,4V],{jP:o(){B 4f.6w(c)}});C 4F=K 1E({4M:5l,F:{6l:M,8x:M,4p:M,67:M,1n:1n},1v:o(L,F){c.L=L;c.5m(F)},85:o(I){I=aB(I);if(c.F.8x)I+=\'; 8x=\'+c.F.8x;if(c.F.6l)I+=\'; 6l=\'+c.F.6l;if(c.F.4p){C 9o=K 7M();9o.jw(9o.c0()+c.F.4p*24*60*60*a8);I+=\'; jx=\'+9o.jy()}if(c.F.67)I+=\'; 67\';c.F.1n.c6=c.L+\'=\'+I;B c},b5:o(){C I=c.F.1n.c6.17(\'(?:^|;)\\\\s*\'+c.L.c4()+\'=([^;]*)\');B I?jE(I[1]):Y},5I:o(){K 4F(c.L,$3G(c.F,{4p:-1})).85(\'\');B c}});4F.1g=o(L,I,F){B K 4F(L,F).85(I)};4F.1f=o(L){B K 4F(L).b5()};4F.4d=o(L,F){B K 4F(L,F).5I()};C 44=K 1B({1v:o(1G,J){if(O.W>=3){J="1P";1G=1t.2W(O,0,3)}1i if(3q 1G==\'1T\'){if(1G.17(/1P/))1G=1G.5S().5V(T);1i if(1G.17(/2L/))1G=1G.7v();1i 1G=1G.5V(T)}J=J||\'1P\';1W(J){Q\'2L\':C 5x=1G;1G=1G.7v();1G.2L=5x;1e;Q\'4n\':1G=1G.5V(T);1e}1G.1P=1G.2W(0,3);1G.2L=1G.2L||1G.8j();1G.4n=1G.5S();B $1z(1G,c)}});44.1l({7R:o(){C 9j=1t.2W(O);C 8R=($J(9j.7P())==\'5L\')?9j.dT():50;C 1P=c.2W();9j.1b(o(1G){1G=K 44(1G);R(C i=0;i<3;i++)1P[i]=1m.3l((1P[i]/ 4w * (4w - 8R)) + (1G[i] /4w*8R))});B K 44(1P,\'1P\')},jF:o(){B K 44(c.33(o(I){B 6K-I}))},jL:o(I){B K 44([I,c.2L[1],c.2L[2]],\'2L\')},gM:o(9H){B K 44([c.2L[0],9H,c.2L[2]],\'2L\')},jM:o(9H){B K 44([c.2L[0],c.2L[1],9H],\'2L\')}});o $jN(r,g,b){B K 44([r,g,b],\'1P\')};o $jK(h,s,b){B K 44([h,s,b],\'2L\')};o $jJ(4n){B K 44(4n,\'4n\')};1t.1l({8j:o(){C 7z=c[0],7x=c[1],8m=c[2];C 4h,8p,bU;C 1R=1m.1R(7z,7x,8m),4l=1m.4l(7z,7x,8m);C 2f=1R-4l;bU=1R/6K;8p=(1R!=0)?2f/1R:0;if(8p==0){4h=0}1i{C bX=(1R-7z)/2f;C gr=(1R-7x)/2f;C br=(1R-8m)/2f;if(7z==1R)4h=br-gr;1i if(7x==1R)4h=2+bX-br;1i 4h=4+gr-bX;4h/=6;if(4h<0)4h++}B[1m.3l(4h*e3),1m.3l(8p*4w),1m.3l(bU*4w)]},7v:o(){C br=1m.3l(c[2]/4w*6K);if(c[1]==0){B[br,br,br]}1i{C 4h=c[0]%e3;C f=4h%60;C p=1m.3l((c[2]*(4w-c[1]))/jG*6K);C q=1m.3l((c[2]*(e4-c[1]*f))/e5*6K);C t=1m.3l((c[2]*(e4-c[1]*(60-f)))/e5*6K);1W(1m.8F(4h/60)){Q 0:B[br,t,p];Q 1:B[q,br,p];Q 2:B[p,br,t];Q 3:B[p,q,br];Q 4:B[t,p,br];Q 5:B[br,p,q]}}B M}});2T.1l({8j:o(){C 1P=c.17(/\\d{1,3}/g);B(1P)?2L.8j():Y},7v:o(){C 2L=c.17(/\\d{1,3}/g);B(2L)?2L.7v():Y}});C 4x=o(6l,F){if(!4x.7n)4x.ew();C 4O=\'jH\'+1B.5i++;F=$3G({id:4O,2C:1,2p:1,3J:Y,1k:{},12:{jI:\'iX\',ix:\'hm\',hl:\'9U\',hn:T},1a:{},7A:{}},F);C 12=F.12,7A=F.7A,id=F.id;C 1k=$1z({2C:F.2C,2p:F.2p},F.1k);4x.3m[4O]={};R(C P in F.1a){4x.3m[4O][P]=o(){F.1a[P].1L($(F.id))};7A[P]=\'4x.3m.\'+4O+\'.\'+P}12.ho=1o.7K(7A);if(1p.1x.3h){1k.hp=\'hk:hj-hf-he-hg-hh\';12.hi=6l}1i{1k.J=\'9E/x-hq-hr\';1k.2t=6l}C 57=\'<1c id="\'+F.id+\'"\';R(C U in 1k)57+=\' \'+U+\'="\'+1k[U]+\'"\';57+=\'>\';R(C 98 in 12)57+=\'<98 14="\'+98+\'" I="\'+12[98]+\'" />\';57+=\'</1c>\';B($(F.3J)||K N(\'5n\')).1g(\'22\',57).97};4x.1z({3m:{},hz:o(15,fn){C ed=15.hA(\'<e7 14="\'+fn+\'" hB="58">\'+hC(O,2)+\'</e7>\');B e8(ed)},hy:o(){if(!$3D(4x.a5)){C 3x;if(82.et&&82.hx.W){3x=82.et["ht hs"];if(3x&&3x.ea)3x=3x.ea}1i if(1p.1x.3h){3x=$4b(o(){B K 8u("es.es").iy("$3x")})}4x.a5=(3q 3x==\'1T\')?5Q(3x.17(/\\d+/)[0]):0}B 4x.a5},ew:o(){4x.7n=T;1X.1M(\'a0\',o(){hv=hw=$1Y});if(!1p.1x.3h)B;1X.1M(\'9F\',o(){1t.1b(1n.5r(\'1c\'),o(15){15.1F.5d=\'7H\';R(C p in 15){if(3q 15[p]==\'o\')15[p]=$1Y}})})}});C hd=K 1E({1v:o(){c.9C=1t.4E(O);c.1a={};c.5z={}},1M:o(J,fn){c.5z[J]=c.5z[J]||{};c.1a[J]=c.1a[J]||[];if(c.1a[J].2e(fn))B M;1i c.1a[J].1K(fn);c.9C.1b(o(4O,i){4O.1M(J,c.2c.V(c,[J,4O,i]))},c);B c},2c:o(J,4O,i){c.5z[J][i]=T;C 7J=c.9C.7J(o(4D,j){B c.5z[J][j]||M},c);if(!7J)B;c.5z[J]={};c.1a[J].1b(o(P){P.1L(c,c.9C,4O)},c)}});C 1s=K 1E({4M:[bH,3m,5l],F:{eM:50,55:M,4p:eF,2m:\'dY\',3C:o(p){B-(1m.bv(1m.bu*p)-1)/2}},1v:o(F){c.4g=c.4g||c;c.5m(F);c.F.4p=1s.eN[c.F.4p]||c.F.4p.3W();C 6Q=c.F.6Q;if(6Q===M)c.F.2m=\'28\'},2z:o(){C 3H=$3H();if(3H<c.3H+c.F.4p){C 2f=c.F.3C((3H-c.3H)/c.F.4p);c.1g(c.2V(c.1j,c.1y,2f))}1i{c.1g(c.2V(c.1j,c.1y,1));c.6s()}},1g:o(1d){B 1d},2V:o(1j,1y,2f){B 1s.2V(1j,1y,2f)},2c:o(){if(!c.2F)B T;1W(c.F.2m){Q\'28\':c.28();B T;Q\'3S\':c.3S(c.18.V(c,O));B M}B M},18:o(1j,1y){if(!c.2c(1j,1y))B c;c.1j=1j;c.1y=1y;c.3H=0;c.a9();c.5e();B c},6s:o(){B(!c.9v())?c:c.2O()},28:o(){B(!c.9v())?c:c.72()},5e:o(){B c.1u(\'5e\',c.4g)},2O:o(){B c.1u(\'2O\',c.4g).bV()},72:o(){B c.1u(\'72\',c.4g).eG()},hc:o(){c.9v();B c},gV:o(){c.a9();B c},9v:o(){if(!c.2F)B M;c.3H=$3H()-c.3H;c.2F=$77(c.2F);B T},a9:o(){if(c.2F)B M;c.3H=$3H()-c.3H;c.2F=c.2z.68(1m.3l(a8/c.F.eM),c);B T}});1s.2V=o(1j,1y,2f){B(1y-1j)*2f+1j};1s.eN={\'gU\':do,\'gW\':eF,\'gX\':a8};1s.5Y=K 1E({3F:1s,8M:o(G,U,1V){1V=$4s(1V);C ez=1V[1];if(!$3B(ez)){1V[1]=1V[0];1V[0]=G.3K(U)}C 3y=1V.33(c.4R);B{1j:3y[0],1y:3y[1]}},4R:o(I){I=$7c(I)();I=(3q I==\'1T\')?I.5w(\' \'):$4s(I);B I.33(o(3U){3U=2T(3U);C 4H=M;1s.5Y.ao.1b(o(2q,L){if(4H)B;C 3y=2q.4R(3U);if($3B(3y))4H={\'I\':3y,\'2q\':2q}});4H=4H||{I:3U,2q:1s.5Y.ao.2T};B 4H})},2V:o(1j,1y,2f){C 69=[];(1m.4l(1j.W,1y.W)).7y(o(i){69.1K({\'I\':1j[i].2q.2V(1j[i].I,1y[i].I,2f),\'2q\':1j[i].2q})});69.$3u={14:\'fx:9A:I\'};B 69},6F:o(I,55){if($J(I)!=\'fx:9A:I\')I=c.4R(I);C 5R=[];I.1b(o(4k){5R=5R.4S(4k.2q.6F(4k.I,55))});B 5R},8S:o(G,U,I){G.2y(U,c.6F(I,c.F.55))},8W:o(2H){C 1y={};1t.1b(1n.gY,o(at,j){C as=at.as||at.gT;1t.1b(as,o(71,i){if(!71.1F||!71.e0||!71.e0.3k(\'^\'+2H+\'$\'))B;N.8y.1b(o(I,1F){if(!71.1F[1F]||N.7m[1F])B;I=71.1F[1F];1y[1F]=(I.3k(/^1P/))?I.5S():I})})});B 1y}});1s.5Y.ao=K 1o({44:{4R:o(I){if(I.17(/^#[0-9a-f]{3,6}$/i))B I.5V(T);B((I=I.17(/(\\d+),\\s*(\\d+),\\s*(\\d+)/)))?[I[1],I[2],I[3]]:M},2V:o(1j,1y,2f){B 1j.33(o(I,i){B 1m.3l(1s.2V(1j[i],1y[i],2f))})},6F:o(I){B I.33(4V)}},4V:{4R:o(I){B 8b(I)},2V:o(1j,1y,2f){B 1s.2V(1j,1y,2f)},6F:o(I,55){B(55)?I+55:I}},2T:{4R:$7c(M),2V:$O(1),6F:$O(0)}});1s.9P=K 1E({3F:1s.5Y,1v:o(G,U,F){c.G=c.4g=$(G);c.U=U;O.2h.1Q(F)},1g:o(1d){c.8S(c.G,c.U,1d);B c},18:o(){C aA=1t.2W(O);if(!c.2c(aA))B c;C 3y=c.8M(c.G,c.U,aA);B O.2h.1Q(3y.1j,3y.1y)}});N.3n.2K={1g:o(F){C 2K=c.1U(\'2K\');if(2K)2K.28();B c.5u(\'2K\',K 1s.9P(c,Y,$1z({2m:\'28\'},F)))},1f:o(U,F){if(F||!c.1U(\'2K\'))c.1g(\'2K\',F);C 2K=c.1U(\'2K\');2K.U=U;B 2K}};N.1l({2K:o(U){C 2K=c.1f(\'2K\',U);2K.18.3E(2K,1t.2W(O,1));B c},5o:o(4o){C 5o=c.1f(\'2K\',\'1Z\');4o=$5G(4o,\'6P\');1W(4o){Q\'in\':5o.18(1);1e;Q\'90\':5o.18(0);1e;Q\'4z\':5o.1g(1);1e;Q\'4W\':5o.1g(0);1e;Q\'6P\':5o.18((o(){B(c.3K(\'59\')==\'5B\')?1:0}).V(c));1e;3T:5o.18.3E(5o,O)}B c},gS:o(18,2x){if(!2x){C 1F=c.3K(\'dq-1G\');2x=(1F==\'9U\')?\'#gO\':1F}c.1f(\'2K\',\'dq-1G\').18(18||\'#gN\',2x);B c},7F:o(U,F){B K 1s.9P(c,U,F)}});1s.8Z=K 1E({3F:1s.5Y,1v:o(G,F){c.G=c.4g=$(G);O.2h.1Q(F)},1g:o(1d){if(3q 1d==\'1T\')1d=c.8W(1d);R(C p in 1d)c.8S(c.G,p,1d[p]);B c},2V:o(1j,1y,2f){C 1d={};R(C p in 1j)1d[p]=O.2h.1Q(1j[p],1y[p],2f);B 1d},18:o(1k){if(!c.2c(1k))B c;if(3q 1k==\'1T\')1k=c.8W(1k);C 1j={},1y={};R(C p in 1k){C 3y=c.8M(c.G,p,1k[p]);1j[p]=3y.1j;1y[p]=3y.1y}B O.2h.1Q(1j,1y)}});N.3n.4u={1g:o(F){C 4u=c.1U(\'4u\');if(4u)4u.28();B c.5u(\'4u\',K 1s.8Z(c,$1z({2m:\'28\'},F)))},1f:o(F){if(F||!c.1U(\'4u\'))c.1g(\'4u\',F);B c.1U(\'4u\')}};N.1l({4u:o(2A){c.1f(\'4u\').18(2A);B c},5k:o(F){B K 1s.8Z(c,F)}});1s.dt=K 1E({3F:1s,F:{2M:\'aj\'},1v:o(G,F){c.1M(\'2O\',o(){c.6T=(c.3g[\'2b\'+c.4N.5j()]!=0);if(c.6T){c.3g.2y(c.4N,\'gQ\');if(1p.1x.8g)c.G.7p().3c(c.3g)}},T);c.G=c.4g=$(G);O.2h.1Q(F);C 3g=c.G.1U(\'3g\');c.3g=3g||K N(\'5n\',{5E:$1z(c.G.ax(\'2Q\',\'1J\'),{\'de\':\'5B\'})}).dv(c.G);c.G.5u(\'3g\',c.3g).2y(\'2Q\',0);c.1d=[];c.6T=T},aj:o(){c.2Q=\'2Q-2i\';c.4N=\'2C\';c.2b=c.G.6L},ak:o(){c.2Q=\'2Q-2n\';c.4N=\'2p\';c.2b=c.G.6M},1g:o(1d){c.G.2y(c.2Q,1d[0]);c.3g.2y(c.4N,1d[1]);B c},2V:o(1j,1y,2f){C 1d=[];(2).7y(o(i){1d[i]=1s.2V(1j[i],1y[i],2f)});B 1d},18:o(4o,2M){if(!c.2c(4o,2M))B c;c[2M||c.F.2M]();C 2Q=c.G.3K(c.2Q).3W();C 4N=c.3g.3K(c.4N).3W();C aP=[[2Q,4N],[0,c.2b]];C bB=[[2Q,4N],[-c.2b,0]];C 18;1W(4o){Q\'in\':18=aP;1e;Q\'90\':18=bB;1e;Q\'6P\':18=(c.3g[\'2b\'+c.4N.5j()]==0)?aP:bB}B O.2h.1Q(18[0],18[1])},gR:o(2M){B c.18(\'in\',2M)},gZ:o(2M){B c.18(\'90\',2M)},4W:o(2M){c[2M||c.F.2M]();c.6T=M;B c.1g([-c.2b,0])},4z:o(2M){c[2M||c.F.2M]();c.6T=T;B c.1g([0,c.2b])},6P:o(2M){B c.18(\'6P\',2M)}});N.3n.3s={1g:o(F){C 3s=c.1U(\'3s\');if(3s)3s.28();B c.5u(\'3s\',K 1s.dt(c,$1z({2m:\'28\'},F)))},1f:o(F){if(F||!c.1U(\'3s\'))c.1g(\'3s\',F);B c.1U(\'3s\')}};N.1l({3s:o(4o){4o=4o||\'6P\';C 3s=c.1f(\'3s\');1W(4o){Q\'4W\':3s.4W();1e;Q\'4z\':3s.4z();1e;3T:3s.18(4o)}B c}});1s.dL=K 1E({3F:1s,F:{2b:{\'x\':0,\'y\':0},d9:T},1v:o(G,F){c.G=c.4g=$(G);O.2h.1Q(F);C 28=c.28.V(c,M);if($J(c.G)!=\'G\')c.G=$(c.G.3A().2u);C by=c.G;if(c.F.d9){c.1M(\'5e\',o(){by.1M(\'6X\',28)},T);c.1M(\'2O\',o(){by.3j(\'6X\',28)},T)}},1g:o(){C 1d=1t.4E(O);c.G.9M(1d[0],1d[1])},2V:o(1j,1y,2f){C 1d=[];(2).7y(o(i){1d.1K(1s.2V(1j[i],1y[i],2f))});B 1d},18:o(x,y){if(!c.2c(x,y))B c;C dc=c.G.52(),d7=c.G.6Y(),3M=c.G.5M(),1V={\'x\':x,\'y\':y};R(C z in 1V){C 1R=d7[z]-dc[z];if($3B(1V[z]))1V[z]=($J(1V[z])==\'5L\')?1V[z].2g(0,1R):1R;1i 1V[z]=3M[z];1V[z]+=c.F.2b[z]}B O.2h.1Q([3M.x,3M.y],[1V.x,1V.y])},h0:o(){B c.18(M,0)},h8:o(){B c.18(0,M)},h9:o(){B c.18(\'3Y\',M)},ha:o(){B c.18(M,\'31\')},bA:o(el){C 1J=$(el).4t(c.G);B c.18(1J.x,1J.y)}});(o(){C 5x=1s.2j.1v;1s.2j.1v=o(F){5x.1L(c,F);C 4L=c.F.3C;if(3q 4L==\'1T\'&&(4L=4L.5w(\':\'))){C 3i=1s.6W;3i=3i[4L[0]]||3i[4L[0].5j()];if(4L[1])3i=3i[\'hb\'+4L[1].5j()+(4L[2]?4L[2].5j():\'\')];c.F.3C=3i}}})();1s.bs=o(3C,12){12=$4s(12);B $1z(3C,{h7:o(1q){B 3C(1q,12)},h6:o(1q){B 1-3C(1-1q,12)},h2:o(1q){B(1q<=0.5)?3C(2*1q,12)/2:(2-3C(2*(1-1q),12))/2}})};1s.6W=K 1o({h1:$O(0)});1s.6W.1z=o(bn){R(C 3C in bn)1s.6W[3C]=K 1s.bs(bn[3C])};1s.6W.1z({h3:o(p,x){B 1m.4J(p,x[0]||6)},h4:o(p){B 1m.4J(2,8*(p-1))},h5:o(p){B 1-1m.bl(1m.dQ(p))},hD:o(p){B 1-1m.bl((1-p)*1m.bu/2)},hE:o(p,x){x=x[0]||1.ie;B 1m.4J(p,2)*((x+1)*p-x)},ig:o(p){C I;R(C a=0,b=1;1;a+=b,b/=2){if(p>=(7-4*a)/11){I=-1m.4J((11-6*a-11*p)/4,2)+b*b;1e}}B I},ih:o(p,x){B 1m.4J(2,10*--p)*1m.bv(20*p*1m.bu*(x[0]||1)/3)}});[\'ii\',\'ic\',\'ib\',\'i7\'].1b(o(3C,i){1s.6W[3C]=K 1s.bs(o(p){B 1m.4J(p,[i+2])})});C 54=K 1E({4M:[bH,3m,5l],F:{3p:\'\',2t:\'\',66:{},aQ:T,2s:\'7i\',2m:\'dY\',6V:Y,dH:T,dI:T,7D:\'i6-8\',9n:M,dE:M},aN:o(){B(1X.8J)?K 8J():((1X.8u)?K 8u(\'i8.i9\'):M)},1v:o(F){if(!(c.36=c.aN()))B;c.5m(F);c.F.6V=c.F.6V||c.6V;c.66=K 1o(c.F.66).1z({\'X-ia-ij\':\'8J\',\'e1\':\'1r/58, 1r/22, 9E/64, 1r/64, */*\'})},bk:o(){if(c.36.7Y!=4||!c.6E)B;c.6E=M;c.6R=0;$4b(o(){c.6R=c.36.6R},c);if(c.F.6V.1L(c,c.6R)){c.63={1r:c.36.ik,64:c.36.it};c.9I(c.63.1r,c.63.64)}1i{c.63={1r:Y,64:Y};c.dF()}c.36.aO=$1Y},6V:o(){B((c.6R>=iu)&&(c.6R<iv))},dz:o(1r){if(c.F.dE||(/(iw|is)2l/).3k(c.dG(\'dJ-J\')))B $9q(1r);B 1r.aU(c.F.9n)},9I:o(1r,64){c.7h(c.dz(1r),64)},7h:o(){c.1u(\'2O\',O).1u(\'7h\',O).bV()},dF:o(){c.bS()},bS:o(){c.1u(\'2O\').1u(\'bS\',c.36)},ir:o(14,I){c.66.1g(14,I);B c},dG:o(14){B $4b(o(){B c.im(14)},c.36)||Y},2c:o(){if(!c.6E)B T;1W(c.F.2m){Q\'28\':c.28();B T;Q\'3S\':c.3S(c.35.V(c,O));B M}B M},35:o(F){if(!c.2c(F))B c;c.6E=T;C J=$J(F);if(J==\'1T\'||J==\'G\')F={2t:F};C 5x=c.F;F=$1z({2t:5x.2t,3p:5x.3p,2s:5x.2s},F);C 2t=F.2t,3p=F.3p,2s=F.2s;1W($J(2t)){Q\'G\':2t=$(2t).7K();1e;Q\'1c\':Q\'5T\':2t=1o.7K(2t)}if(c.F.dH&&[\'il\',\'3r\'].2e(2s)){C 8D=\'8D=\'+2s;2t=(2t)?8D+\'&\'+2t:8D;2s=\'7i\'}if(c.F.dI&&2s==\'7i\'){C 7D=(c.F.7D)?\'; io=\'+c.F.7D:\'\';c.66.1g(\'dJ-J\',\'9E/x-dK-ip-iq\'+7D)}if(2t&&2s==\'1f\'){3p=3p+(3p.2e(\'?\')?\'&\':\'?\')+2t;2t=Y}c.36.6T(2s.8f(),3p,c.F.aQ);c.36.aO=c.bk.V(c);c.66.1b(o(I,L){4b{c.36.i5(L,I)}dN(e){c.1u(\'i4\',[e,L,I])}},c);c.1u(\'hN\');c.36.35(2t);if(!c.F.aQ)c.bk();B c},28:o(){if(!c.6E)B c;c.6E=M;c.36.aZ();c.36.aO=$1Y;c.36=c.aN();c.1u(\'72\');B c}});(o(){C 4e={};[\'1f\',\'7i\',\'hM\',\'hO\',\'hP\',\'hQ\'].1b(o(2s){4e[2s]=o(){C 12=1t.2m(O,{3p:2T.J,2t:$3D});B c.35($1z(12,{2s:2s.4r()}))}});54.1l(4e)})();N.3n.35={1f:o(F){if(F||!c.1U(\'35\'))c.1g(\'35\',F);B c.1U(\'35\')},1g:o(F){C 35=c.1U(\'35\');if(35)35.28();B c.5u(\'35\',K 54($1z({2t:c,2m:\'28\',2s:c.1f(\'2s\')||\'7i\',3p:c.1f(\'hL\')},F)))}};N.1l({35:o(3p){C aS=c.1f(\'35\');aS.35({2t:c,3p:3p||aS.F.3p});B c}});54.da=K 1E({3F:54,F:{9N:M,9n:T,1N:M},dS:o(1r){C 17=1r.17(/<2u[^>]*>([\\s\\S]*?)<\\/2u>/i);B(17)?17[1]:1r},9I:o(1r){C 70=c.F,3Z=c.63;3Z.22=c.dS(1r).aU(o(2l){3Z.58=2l});C 8L=K N(\'5n\',{22:3Z.22});3Z.19=8L.5W(\'*\');3Z.aF=(70.1N)?3Z.19.dy(70.1N):$A(8L.6t).1N(o(el){B($J(el)!=\'df\')});if(70.9N)$(70.9N).1Y().dh(3Z.aF);if(70.9n)$9q(3Z.58);c.7h(3Z.aF,3Z.19,3Z.22,3Z.58)}});N.3n.2w={1f:o(F){if(F||!c.1U(\'2w\'))c.1g(\'2w\',F);B c.1U(\'2w\')},1g:o(F){C 2w=c.1U(\'2w\');if(2w)2w.28();B c.5u(\'2w\',K 54.da($1z({2m:\'28\',9N:c,2s:\'1f\'},F)))}};N.1l({2w:o(){c.1f(\'2w\').35(1t.2m(O,{2t:62.J,3p:2T.J}));B c}});54.4f=K 1E({3F:54,F:{67:T},1v:o(F){O.2h.1Q(F);c.66.1z({\'e1\':\'9E/6q\',\'X-54\':\'4f\'})},9I:o(1r){c.63.6q=4f.b4(1r,c.F.67);c.7h(c.63.6q,1r)}});C 6m=K 1E({4M:[3m,5l],F:{6e:6,55:\'1w\',5X:M,2g:M,5b:M,4Y:{x:\'2n\',y:\'2i\'}},1v:o(){C 12=1t.2m(O,{\'F\':62.J,\'G\':$3D});c.G=$(12.G);c.1n=c.G.3A();c.5m(12.F||{});C bb=$J(c.F.5b);c.b9=(bb==\'23\'||bb==\'7d\')?$$(c.F.5b):$(c.F.5b)||c.G;c.4T={\'1d\':{},\'1q\':{}};c.I={\'18\':{},\'1d\':{}};c.8U=(1p.1x.3h)?\'dp\':\'5U\';c.3P={18:c.18.V(c),2c:c.2c.V(c),4a:c.4a.V(c),4q:c.4q.V(c),28:c.28.V(c),8T:$7c(M)};c.aW()},aW:o(){c.b9.1M(\'5U\',c.3P.18);B c},am:o(){c.b9.3j(\'5U\',c.3P.18);B c},18:o(P){c.1u(\'hK\',c.G);c.4T.18=P.2X;C 2g=c.F.2g;c.2g={\'x\':[],\'y\':[]};R(C z in c.F.4Y){if(!c.F.4Y[z])4U;c.I.1d[z]=c.G.3K(c.F.4Y[z]).3W();c.4T.1q[z]=P.2X[z]-c.I.1d[z];if(2g&&2g[z]){R(C i=2;i--;i){if($3B(2g[z][i]))c.2g[z][i]=$7c(2g[z][i])()}}}if($J(c.F.5X)==\'5L\')c.F.5X={\'x\':c.F.5X,\'y\':c.F.5X};c.1n.79({5D:c.3P.2c,83:c.3P.28});c.1n.1M(c.8U,c.3P.8T)},2c:o(P){C ex=1m.3l(1m.eD(1m.4J(P.2X.x-c.4T.18.x,2)+1m.4J(P.2X.y-c.4T.18.y,2)));if(ex>c.F.6e){c.28();c.1n.79({5D:c.3P.4a,83:c.3P.4q});c.1u(\'5e\',c.G).1u(\'hF\',c.G)}},4a:o(P){c.4T.1d=P.2X;R(C z in c.F.4Y){if(!c.F.4Y[z])4U;c.I.1d[z]=c.4T.1d[z]-c.4T.1q[z];if(c.F.2g&&c.2g[z]){if($3B(c.2g[z][1])&&(c.I.1d[z]>c.2g[z][1])){c.I.1d[z]=c.2g[z][1]}1i if($3B(c.2g[z][0])&&(c.I.1d[z]<c.2g[z][0])){c.I.1d[z]=c.2g[z][0]}}if(c.F.5X[z])c.I.1d[z]-=(c.I.1d[z]%c.F.5X[z]);c.G.2y(c.F.4Y[z],c.I.1d[z]+c.F.55)}c.1u(\'9Z\',c.G)},28:o(P){c.1n.3j(\'5D\',c.3P.2c);c.1n.3j(\'83\',c.3P.28);if(P){c.1n.3j(c.8U,c.3P.8T);c.1u(\'72\',c.G)}},4q:o(P){c.1n.3j(c.8U,c.3P.8T);c.1n.3j(\'5D\',c.3P.4a);c.1n.3j(\'83\',c.3P.4q);if(P)c.1u(\'2O\',c.G)}});N.1l({hH:o(F){B K 6m(c,$3G({4Y:{\'x\':\'2p\',\'y\':\'2C\'}},F))}});6m.en=K 1E({3F:6m,F:{4I:[],3J:M},1v:o(G,F){O.2h.1Q(G,F);c.4I=$$(c.F.4I);c.3J=$(c.F.3J);C 1J=(c.G.9G())?c.G.3K(\'1J\'):\'az\';c.G.1J(c.G.bT()).2y(\'1J\',1J)},18:o(P){if(c.42){c.42.1u(\'eH\',[c.G,c]);c.42=Y}if(c.3J){C el=c.G,bh=c.3J,89=bh.8a(el.bi()),6A={},6r={};[\'2i\',\'3Y\',\'31\',\'2n\'].1b(o(86){6A[86]=bh.3K(\'4X-\'+86).3W();6r[86]=el.3K(\'2Q-\'+86).3W()},c);C 2p=el.6M+6r.2n+6r.3Y,2C=el.6L+6r.2i+6r.31;C x=[89.2n+6A.2n,89.3Y-6A.3Y-2p];C y=[89.2i+6A.2i,89.31-6A.31-2C];c.F.2g={x:x,y:y}}O.2h.1Q(P)},eL:o(el){el=el.8a();C 1d=c.4T.1d;B(1d.x>el.2n&&1d.x<el.3Y&&1d.y<el.31&&1d.y>el.2i)},b7:o(){C 42=c.4I.1N(c.eL,c).7P();if(c.42!=42){if(c.42)c.42.1u(\'eH\',[c.G,c]);c.42=42?42.1u(\'7b\',[c.G,c]):Y}},4a:o(P){O.2h.1Q(P);if(c.4I.W)c.b7()},4q:o(P){c.b7();if(c.42)c.42.1u(\'hI\',[c.G,c]);1i c.G.1u(\'hJ\',c);B O.2h.1Q(P)}});N.1l({dm:o(F){B K 6m.en(c,F)}});1A.2Y.4j={2q:o(1h){1h=(1h)?1h.17(/^([-+]?\\d*)?([\\-+:])?([-+]?\\d*)?$/):[Y,0,M,0];if(!1h)B M;1h[1]=5Q(1h[1])||0;C aY=5Q(1h[3]);1h[3]=($3B(aY))?aY:0;1W(1h[2]){Q\'-\':Q\'+\':Q\':\':B{\'a\':1h[1],\'b\':1h[3],\'2D\':1h[2]};3T:B{\'a\':1h[1],\'b\':0,\'2D\':\'2I\'}}},2r:o(1h){C 34=\'\';C 2B=\'61(../2R::*)\';C a=1h.a+\' + \'+((1h.a<0)?2B:0);C b=1h.b+\' + \'+((1h.b<0)?2B:0);C 1q=\'1J()\';1W(1h.2D){Q\'-\':b=\'((\'+a+\' - \'+b+\') 5A (\'+2B+\'))\';a+=\' + 1\';b+=\' + 1\';34=\'(\'+b+\' < 1 9d (\'+1q+\' <= \'+a+\' 7W \'+1q+\' >= (\'+b+\' + \'+2B+\')\'+\')) 7W (\'+1q+\' <= \'+a+\' 9d \'+1q+\' >= \'+b+\')\';1e;Q\'+\':b=\'((\'+a+\' + \'+b+\') 5A ( \'+2B+\'))\';Q\':\':a+=\' + 1\';b+=\' + 1\';34=\'(\'+b+\' < \'+a+\' 9d (\'+1q+\' >= \'+a+\' 7W \'+1q+\' <= \'+b+\')) 7W (\'+1q+\' >= \'+a+\' 9d \'+1q+\' <= \'+b+\')\';1e;3T:34=(a+\' + 1\')}B\'[\'+34+\']\'},1N:o(1h,26){26.i=26.i||0;26.56=26.56||c.3b.6t;26.2B=26.2B||26.56.W;C i=26.i;C 2B=26.2B;C 56=26.56;C 34=M;C a=1h.a+((1h.a<0)?2B:0);C b=1h.b+((1h.b<0)?2B:0);1W(1h.2D){Q\'-\':b=(a-b)%2B;34=(b<0)?(i<=a||i>=(b+2B)):(i<=a&&i>=b);1e;Q\'+\':b=(b+a)%2B;Q\':\':34=(b<a)?(i>=a||i<=b):(i>=a&&i<=b);1e;3T:34=(56[a]==c)}26.i++;B 34}};1o.4F=K 1E({3F:4F,F:{ee:T},1v:o(14,F){c.1Q(14,F);c.2w()},ek:o(){C I=4f.6w(c.5T);if(I.W>hR)B M;if(I.W==2)c.5I();1i c.85(I);B T},2w:o(){c.5T=K 1o(4f.b4(c.b5(),T));B c}});(o(){C 4e={};1o.1b(1o.2j,o(2s,14){4e[14]=o(){C I=2s.3E(c.5T,O);if(c.F.ee)c.ek();B I}});1o.4F.1l(4e)})();C i0=K 1E({4M:[3m,5l],F:{6e:4,5b:M,aX:M,9S:M,dl:0.7,dn:0.3},1v:o(3f,F){c.5m(F);c.19=[];c.3f=[];c.9w=T;c.aJ($$($(3f)||3f));if(c.F.aX)c.7F=K 1s.8Z(Y,$3G({4p:do,2m:\'28\'},c.F.aX))},aW:o(){c.aJ(c.3f);B c},am:o(){c.3f=c.d6(c.3f);B c},dj:o(){1t.4E(O).1b(o(G){c.19.1K(G);C 18=G.1U(\'7a:18\',c.18.av(c,G));C 4y=G.1U(\'7a:4y\',c.4y.V(c,G));(c.F.5b?G.9s(c.F.5b)||G:G).1M(\'5U\',18);G.1M(\'7b\',4y)},c);B c},aJ:o(){1t.4E(O).1b(o(2N){c.3f.1K(2N);c.dj(2N.84());2N.1M(\'7b\',2N.1U(\'7a:4y\',c.4y.V(c,[2N,\'db\'])))},c);B c},dX:o(){C 19=[];1t.4E(O).1b(o(G){19.1K(G);c.19.4d(G);C 18=G.1U(\'7a:18\');C 4y=G.1U(\'7a:4y\');(c.F.5b?G.9s(c.F.5b)||G:G).3j(\'5U\',18);G.3j(\'7b\',4y)},c);B 19},d6:o(){C 3f=[];1t.4E(O).1b(o(2N){3f.1K(2N);c.3f.4d(2N);c.dX(2N.84());2N.3j(\'7b\',2N.1U(\'7a:4y\'))},c);B 3f},dk:o(G){B G.3L(T).65({\'2Q\':\'dD\',\'1J\':\'az\',\'59\':\'5B\'}).3c(c.2N).1J(G.bT())},aq:o(){C 4I=c.2N.84();if(!c.F.9S)4I=c.3f.4S(4I).4d(c.2N);B 4I.4d(c.3L).4d(c.G)},4y:o(G,49){if(49){c.2N=G;c.4a.4I=c.aq()}49=49||(c.G.d8().2e(G)?\'aG\':\'aC\');c.G.3c(G,49);c.1u(\'hZ\',[c.G,c.3L])},18:o(P,G){if(!c.9w)B;c.9w=M;c.G=G;c.1Z=G.1f(\'1Z\');c.2N=G.8n();c.3L=c.dk(G);c.4a=c.3L.dm({6e:c.F.6e,3J:c.F.9S&&c.3L.8n(),4I:c.aq(),5e:o(){P.4q();c.3L.1g(\'1Z\',c.F.dl);c.G.1g(\'1Z\',c.F.dn);c.1u(\'5e\',[c.G,c.3L])}.V(c),72:c.7e.V(c),2O:c.2x.V(c)});c.4a.18(P)},2x:o(){c.G.1g(\'1Z\',c.1Z);c.4a.am();if(c.7F){C a6=c.G.ax(\'2p\',\'2C\');C 1q=c.3L.aw(c.G.4t(c.3L.au),c.3L.8n().9G());c.7F.G=c.3L;c.7F.18({\'2i\':1q.2i,\'2n\':1q.2n,\'2p\':a6.2p,\'2C\':a6.2C,\'1Z\':0.25}).3S(c.7e.V(c))}1i{c.7e()}},7e:o(){c.9w=T;c.3L.e6();c.1u(\'2O\',c.G)},hY:o(2I,c1){C ai=c.3f.33(o(2N){B 2N.84().33(c1||o(G,2I){B G.1f(\'id\')},c)},c);if(c.3f.W==1)2I=0;B $3B(2I)&&2I>=0&&2I<c.3f.W?ai[2I]:ai}});C hU=K 1E({4M:[3m,5l],F:{eO:o(5q){5q.2y(\'59\',\'aa\')},dw:o(5q){5q.2y(\'59\',\'5B\')},bI:30,d1:4w,d0:4w,2o:\'hT\',7G:{\'x\':16,\'y\':16},7n:M},1v:o(19,F){c.5m(F);19=$$(19);c.1n=(19.W)?19[0].9y:1n;c.5t=K N(\'5n\',{\'76\':c.F.2o+\'-5q\',\'5E\':{\'1J\':\'az\',\'2i\':\'0\',\'2n\':\'0\',\'59\':\'5B\'}},c.1n).3c(c.1n.2u);c.3g=K N(\'5n\').3c(c.5t);19.1b(c.57,c)},57:o(el){el.$1S.5H=(el.75&&el.1f(\'1I\')==\'a\')?el.75.2Z(\'cY://\',\'\'):(el.dd||M);if(el.74){C 9u=el.74.5w(\'::\');if(9u.W>1){el.$1S.5H=9u[0].6i();el.$1S.7o=9u[1].6i()}1i{el.$1S.7o=el.74}el.7T(\'74\')}1i{el.$1S.7o=M}if(el.$1S.5H&&el.$1S.5H.W>c.F.bI)el.$1S.5H=el.$1S.5H.7u(0,c.F.bI-1)+"&hV;";el.1M(\'cj\',o(P){c.18(el);if(!c.F.7n)c.9Y(P);1i c.1J(el)}.V(c));if(!c.F.7n)el.1M(\'5D\',c.9Y.V(c));C 2x=c.2x.V(c);el.1M(\'cd\',2x)},18:o(el){c.3g.1Y();if(el.$1S.5H){c.74=K N(\'cp\').3c(K N(\'5n\',{\'76\':c.F.2o+\'-74\'}).3c(c.3g)).1g(\'22\',el.$1S.5H)}if(el.$1S.7o){c.1r=K N(\'cp\').3c(K N(\'5n\',{\'76\':c.F.2o+\'-1r\'}).3c(c.3g)).1g(\'22\',el.$1S.7o)}$77(c.2F);c.2F=c.4z.2S(c.F.d1,c)},2x:o(P){$77(c.2F);c.2F=c.4W.2S(c.F.d0,c)},1J:o(G){C 1q=G.4t();c.5t.65({\'2n\':1q.x+c.F.7G.x,\'2i\':1q.y+c.F.7G.y})},9Y:o(P){C 21=c.1n.52();C 3M=c.1n.5M();C 5q={\'x\':c.5t.6M,\'y\':c.5t.6L};C 2P={\'x\':\'2n\',\'y\':\'2i\'};R(C z in 2P){C 1q=P.2X[z]+c.F.7G[z];if((1q+5q[z]-3M[z])>21[z])1q=P.2X[z]-c.F.7G[z]-5q[z];c.5t.2y(2P[z],1q)}},4z:o(){if(c.F.ej)c.2F=c.4W.2S(c.F.ej,c);c.1u(\'eO\',[c.5t])},4W:o(){c.1u(\'dw\',[c.5t])}});C hW=K 1E({3F:1s.dL,1v:o(F,G){G=$(G);C 21=G.3A(),2k=G.3X();O.2h.1Q(21,F);c.7U=(c.F.7U)?$$(c.F.7U):$$(21.7U);C 5C=2k.5C.75.17(/^[^#]*/)[0]+\'#\';c.7U.1b(o(2m){if(2m.75.4m(5C)!=0)B;C 5p=2m.75.7u(5C.W);if(5p&&$(5p))c.eJ(2m,5p)},c);if(!1p.1x.8g)c.1M(\'2O\',o(){2k.5C.5T=c.5p},T)},eJ:o(2m,5p){2m.1M(\'9D\',o(P){c.5p=5p;c.bA(5p);P.4q()}.V(c))}});C hX=K 1E({4M:[3m,5l],F:{7I:20,b6:1,6C:o(x,y){c.G.9M(x,y)}},1v:o(G,F){c.5m(F);c.G=$(G);c.8h=($J(c.G)!=\'G\')?$(c.G.3A().2u):c.G;c.2F=Y},18:o(){c.bw=c.cG.V(c);c.8h.1M(\'5D\',c.bw)},4q:o(){c.8h.3j(\'5D\',c.bw);c.2F=$77(c.2F)},cG:o(P){c.2X=(c.8h.1f(\'1I\')==\'2u\')?P.9t:P.2X;if(!c.2F)c.2F=c.3M.68(50,c)},3M:o(){C 3e=c.G.52(),3M=c.G.5M(),1q=c.G.4t(),5N={\'x\':0,\'y\':0};R(C z in c.2X){if(c.2X[z]<(c.F.7I+1q[z])&&3M[z]!=0)5N[z]=(c.2X[z]-c.F.7I-1q[z])*c.F.b6;1i if(c.2X[z]+c.F.7I>(3e[z]+1q[z])&&3e[z]+3e[z]!=3M[z])5N[z]=(c.2X[z]-3e[z]+c.F.7I-1q[z])*c.F.b6}if(5N.y||5N.x)c.1u(\'6C\',[3M.x+5N.x,3M.y+5N.y])}});C eK=K 1o({58:o(5c,1k){1k=$1z({4A:$1Y,1n:1n,2c:$7c(T)},1k);C 2l=K N(\'2l\',{\'6v\':5c,\'J\':\'1r/58\'});C 2w=1k.4A.V(2l),2c=1k.2c,21=1k.1n;3r 1k.4A;3r 1k.2c;3r 1k.1n;2l.79({2w:2w,ba:o(){if(c.7Y==\'6s\')2w()}}).b3(1k);if(1p.1x.8g)C 5z=(o(){if(!$4b(2c))B;$77(5z);2w()}).68(50);B 2l.3c(21.78)},9A:o(5c,1k){B K N(\'2m\',$3G({\'dd\':\'i3\',\'i2\':\'i1\',\'J\':\'1r/9A\',\'75\':5c},1k)).3c(1n.78)},3d:o(5c,1k){1k=$3G({\'4A\':$1Y,\'eB\':$1Y,\'e9\':$1Y},1k);C 3d=K hS();C G=$(3d)||K N(\'b0\');[\'2w\',\'aZ\',\'eu\'].1b(o(14){C J=\'94\'+14;C P=1k[J];3r 1k[J];3d[J]=o(){if(!3d)B;if(!G.3b){G.2p=3d.2p;G.2C=3d.2C}3d=3d.4A=3d.eB=3d.e9=Y;P.2S(1,G,G);G.1u(14,G,1)}});3d.6v=G.6v=5c;if(3d&&3d.6s)3d.4A.2S(1);B G.b3(1k)},9g:o(5Z,F){F=$3G({2O:$1Y,er:$1Y},F);if(!5Z.1K)5Z=[5Z];C 9g=[];C 9k=0;5Z.1b(o(5c){C b0=K eK.3d(5c,{\'4A\':o(){F.er.1L(c,9k,5Z.4m(5c));9k++;if(9k==5Z.W)F.2O()}});9g.1K(b0)});B K 2E(9g)}});1s.2E=K 1E({3F:1s.5Y,1v:o(19,F){c.19=c.4g=$$(19);O.2h.1Q(F)},2V:o(1j,1y,2f){C 1d={};R(C i in 1j){C 81=1j[i],91=1y[i],7Z=1d[i]={};R(C p in 81)7Z[p]=O.2h.1Q(81[p],91[p],2f)}B 1d},1g:o(1d){R(C i in 1d){C 7Z=1d[i];R(C p in 7Z)c.8S(c.19[i],p,7Z[p])}B c},18:o(15){if(!c.2c(15))B c;C 1j={},1y={};R(C i in 15){C bg=15[i],81=1j[i]={},91=1y[i]={};R(C p in bg){C 3y=c.8M(c.19[i],p,bg[p]);81[p]=3y.1j;91[p]=3y.1y}}B O.2h.1Q(1j,1y)}});C hG=K 1E({3F:1s.2E,F:{5d:0,4z:M,2C:T,2p:M,1Z:T,8s:M,8r:M,6Q:M,93:M},1v:o(){C 12=1t.2m(O,{\'3J\':N.J,\'F\':62.J,\'4i\':$3D,\'19\':$3D});O.2h.1Q(12.19,12.F);c.4i=$$(12.4i);c.3J=$(12.3J);c.4Z=-1;if(c.F.93)c.F.6Q=T;if($3B(c.F.4z)){c.F.5d=M;c.4Z=c.F.4z}if(c.F.18){c.F.5d=M;c.F.4z=M}c.5k={};if(c.F.1Z)c.5k.1Z=\'dV\';if(c.F.2p)c.5k.2p=c.F.8r?\'dZ\':\'6M\';if(c.F.2C)c.5k.2C=c.F.8s?\'dx\':\'7k\';R(C i=0,l=c.4i.W;i<l;i++)c.du(c.4i[i],c.19[i]);c.19.1b(o(el,i){if(c.F.4z===i){c.1u(\'dr\',[c.4i[i],el])}1i{R(C fx in c.5k)el.2y(fx,0)}},c);if($3B(c.F.5d))c.5d(c.F.5d)},du:o(53,G,1q){53=$(53);G=$(G);C 3k=c.4i.2e(53);C 2B=c.4i.W;c.4i.34(53);c.19.34(G);if(2B&&(!3k||1q)){1q=$5G(1q,2B-1);53.3c(c.4i[1q],\'aG\');G.3c(53,\'aC\')}1i if(c.3J&&!3k){53.3c(c.3J);G.3c(c.3J)}C dO=c.4i.4m(53);53.1M(\'9D\',c.5d.V(c,dO));if(c.F.2C)G.65({\'4X-2i\':0,\'51-2i\':\'7H\',\'4X-31\':0,\'51-31\':\'7H\'});if(c.F.2p)G.65({\'4X-2n\':0,\'51-2n\':\'7H\',\'4X-3Y\':0,\'51-3Y\':\'7H\'});G.dV=1;if(c.F.8r)G.dZ=c.F.8r;if(c.F.8s)G.dx=c.F.8s;G.2y(\'de\',\'5B\');if(!3k){R(C fx in c.5k)G.2y(fx,0)}B c},5d:o(2I){2I=($J(2I)==\'G\')?c.19.4m(2I):2I;if((c.2F&&c.F.6Q)||(2I===c.4Z&&!c.F.93))B c;c.4Z=2I;C 15={};c.19.1b(o(el,i){15[i]={};C 4W=(i!=2I)||(c.F.93&&(el.6L>0));c.1u(4W?\'gP\':\'dr\',[c.4i[i],el]);R(C fx in c.5k)15[i][fx]=4W?0:el[c.5k[fx]]},c);B c.18(15)}});C bq=K 1E({F:{6C:1E.1Y,2O:1E.1Y,8o:o(1q){c.bC.2y(c.p,1q)},18:0,2x:4w,2b:0,em:20,2M:\'ak\'},1v:o(el,5s,F,48){c.G=$(el);c.5s=$(5s);c.5m(F);c.b1=-1;c.be=-1;c.2z=-1;c.F.8k=c.F.2x-c.F.18;if(48!=Y)c.48=$(48);1i c.G.1M(\'5U\',c.cU.av(c));C 5A,2b;1W(c.F.2M){Q\'ak\':c.z=\'x\';c.p=\'2n\';5A={\'x\':\'2n\',\'y\':M};2b=\'6M\';1e;Q\'aj\':c.z=\'y\';c.p=\'2i\';5A={\'x\':M,\'y\':\'2i\'};2b=\'6L\'}c.1R=c.G[2b]-c.5s[2b]+(c.F.2b*2);c.ck=c.5s[2b]/2;c.cW=c.G[\'1f\'+c.p.5j()].V(c.G);c.5s.2y(\'1J\',\'7r\').2y(c.p,-c.F.2b);if(48!=Y){c.b2=-1;c.aM=-1;c.3O=c.F.2x;c.48.2y(\'1J\',\'7r\').2y(c.p,+c.1R-c.F.2b).2y(\'31\',c.F.em)}C 8X={};8X[c.z]=[-c.F.2b,c.1R-c.F.2b];c.4a=K 6m(c.5s,{2g:8X,4Y:5A,6e:0,5e:o(){c.6d()}.V(c),9Z:o(){c.6d()}.V(c),2O:o(){c.6d();c.2x()}.V(c)});if(48!=Y){c.cl=K 6m(c.48,{2g:8X,4Y:5A,6e:0,5e:o(){c.6d(1)}.V(c),9Z:o(){c.6d(1)}.V(c),2O:o(){c.6d(1);c.2x()}.V(c)})}if(c.F.1v)c.F.1v.1L(c)},iS:o(cZ){c.2z=cZ.2g(c.F.18,c.F.2x);c.6y();c.2x();c.bC=c.5s;c.1u(\'8o\',c.ah(c.2z));B c},iT:o(d2){c.3O=d2.2g(c.F.18,c.F.2x);c.6y(1);c.2x();c.bC=c.48;c.1u(\'8o\',c.ah(c.3O));B c},cU:o(P){C 1J=P.2X[c.z]-c.cW()-c.ck;1J=1J.2g(-c.F.2b,c.1R-c.F.2b);c.2z=c.99(1J);c.6y();c.2x();c.1u(\'8o\',1J)},6d:o(92){if(92==Y){c.2z=c.99(c.4a.I.1d[c.z]);c.6y()}1i{c.3O=c.99(c.cl.I.1d[c.z]);c.6y(1)}},6y:o(92){if(92==Y){if(c.b1!=c.2z){c.b1=c.2z}}1i{if(c.b2!=c.3O){c.b2=c.3O}}if(c.48!=Y){if(c.2z<c.3O)c.1u(\'6C\',{8C:c.2z,8H:c.3O});1i c.1u(\'6C\',{8C:c.3O,8H:c.2z})}1i{c.1u(\'6C\',c.2z)}},2x:o(){if(c.be!==c.2z||(c.48!=Y&&c.aM!=c.3O)){c.be=c.2z;if(c.48!=Y){c.aM=c.3O;if(c.2z<c.3O)c.1u(\'2O\',{8C:c.2z+\'\',8H:c.3O+\'\'});1i c.1u(\'2O\',{8C:c.3O+\'\',8H:c.2z+\'\'})}1i{c.1u(\'2O\',c.2z+\'\')}}},99:o(1J){B 1m.3l((1J+c.F.2b)/c.1R*c.F.8k)+c.F.18},ah:o(2z){B(c.1R*2z/c.F.8k)-(c.1R*c.F.18/c.F.8k)-c.F.2b}});bq.1l(K 3m);bq.1l(K 5l);',62,1233,'||||||||||||this||||||||||||function|||||||||||||return|var|||options|element||value|type|new|key|false|Element|arguments|event|case|for||true|property|bind|length||null||||params||name|obj||match|start|elements|events|each|object|now|break|get|set|argument|else|from|properties|implement|Math|document|Hash|Browser|pos|text|Fx|Array|fireEvent|initialize|px|Engine|to|extend|Selectors|Native|result|args|Class|style|color|item|tag|position|push|call|addEvent|filter|bits|rgb|parent|max|attributes|string|retrieve|values|switch|window|empty|opacity||doc|html|array|||Local||cancel|uid|nocash|offset|check|temp|contains|delta|limit|callee|top|prototype|win|script|link|left|className|width|parser|xpath|method|data|body|attribute|load|end|setStyle|step|props|len|height|special|Elements|timer|items|selector|index|context|tween|hsb|mode|list|onComplete|prop|margin|child|delay|String|self|compute|slice|page|Pseudo|replace||bottom||map|include|send|xhr||||iframe|parentNode|inject|image|size|lists|wrapper|trident|base|removeEvent|test|round|Events|Properties|condition|url|typeof|delete|slide|Document|family|keys|EA|version|parsed|klass|getDocument|chk|transition|defined|apply|Extends|merge|time|related|container|getStyle|clone|scroll|while|maxstep|bound|Window|nodeType|chain|default|val|option|toInt|getWindow|right|res||walk|overed|Garbage|Color|results||custom|maxknob|where|drag|try|ddup|remove|methods|JSON|pass|hue|togglers|children|bit|min|indexOf|hex|how|duration|stop|toLowerCase|splat|getPosition|morph|Prototype|100|Swiff|insert|show|onload|pseudo|separator|current|flatten|Cookie|nth|found|droppables|pow|hasOwnProperty|trans|Implements|layout|instance|Short|create|parse|concat|mouse|continue|Number|hide|padding|modifiers|previous||border|getSize|toggler|Request|unit|all|build|javascript|visibility|objects|handle|source|display|onStart|nextSibling|add|alias|UID|capitalize|effects|Options|setOptions|div|fade|anchor|tip|getElementsByTagName|knob|toolTip|store|Inserters|split|old|target|checker|mod|hidden|location|mousemove|styles|join|pick|myTitle|erase|legacy|iterable|number|getScroll|change|notrash|returns|parseInt|returned|rgbToHex|hash|mousedown|hexToRgb|getElements|grid|CSS|sources||count|Object|response|xml|setStyles|headers|secure|periodical|computed|charAt|next|cash|draggedKnob|snap|pseudos|storage|clean|trim|Filter|sibling|path|Drag|classes|partial|uniques|json|ems|complete|childNodes|Event|src|encode|addListener|checkStep|All|cps|Bools|onChange|getComputedStyle|running|serve|domready|code|webkit|queryString|255|offsetHeight|offsetWidth|afterImplement|generics|toggle|wait|status|last|open|unlink|isSuccess|Transitions|mousewheel|getScrollSize|only|opts|rule|onCancel|unlinked|title|href|class|clear|head|addEvents|sortables|over|lambda|collection|reset|documentElement|EAB|onSuccess|post|Property|scrollHeight|Positions|ShortStyles|fixed|myText|dispose|precision|relative|Props|Attributes|substr|hsbToRgb|first|green|times|red|vars|grab|existing|encoding|appendChild|effect|offsets|none|area|every|toQueryString|previousSibling|Date|hasValue|realType|getLast|extended|mix|xparser|removeProperty|links|protect|or|host|readyState|iNow|fevents|iFrom|navigator|mouseup|getChildren|write|pad|tags|selectors|ccoo|getCoordinates|parseFloat|checked|bdw|keyOf|toUpperCase|webkit419|listener|bds|rgbToHsb|steps|disabled|blue|getParent|onTick|saturation|scrollLeft|fixedWidth|fixedHeight|scrollTop|ActiveXObject|Storage|scrollWidth|domain|Styles|fKey|following|bdc|minpos|_method|scripts|floor|regex|maxpos|chr|XMLHttpRequest|Features|node|prepare|attempt|forEach|getProperty|evType|alpha|render|eventStop|selection|tagName|search|lim|kill|Morph|out|iTo|mx|alwaysHide|on|defn|splice|firstChild|param|toStep||op|RegExp|and|removeEvents|mp|images|shift|internal|colors|counter|getElementById|constructor|evalScripts|date|currentStyle|exec|stopPropagation|getElement|client|dual|stopTimer|idle|prev|ownerDocument|camelCase|css|associate|instances|click|application|unload|positioned|percent|success|toString|relatedTarget|preventDefault|scrollTo|update|force|Tween|nativeEvent|Method|constrain|onFrameLoad|transparent|rightClick|XPath|wheel|locate|onDrag|beforeunload||||onAdd|pluginVersion|dim|typize|1000|startTimer|visible|konstructor|ie_domready|fns|genericize|loaded|setProperty|toPosition|serial|vertical|horizontal|inta|detach|not|Parsers|contentWindow|getDroppables|charCodeAt|rules|sheet|offsetParent|bindWithEvent|computePosition|getStyles|preceding|absolute|fromto|encodeURIComponent|after|checkRelatedTarget|gecko|tree|before|mouseout|Camels|addLists|mouseover|DOMMouseScroll|maxPreviousEnd|getXHR|onreadystatechange|caseIn|async|presto|sender|EAC|stripScripts|hasClass|attach|revert|int1|abort|img|previousChange|maxPreviousChange|setProperties|decode|read|velocity|checkDroppables|original|handles|readystatechange|htype|select||previousEnd|NativeEvents|iProps|cont|getOffsetParent|Platform|onStateChange|sin|insertBefore|transitions|cssText|Key|Slider||Transition|sd|PI|cos|coord|prefix|stopper|getItems|toElement|caseOut|moveKnob|getParam|pageX|pageY|xhtml|Chain|maxTitleChars|rpos|Function|innerHTML|random|borderColor|direction|borderWidth|borderStyle|sel|onFailure|getRelativePosition|brightness|callChain|dflt|rr|createElement|separators|getTime|modifier|specialChars|addClass|escapeRegExp|replaceChars|cookie|removeClass|hyphenate|attr|input|pageXOffset|pageYOffset|mouseleave|Width|selected|multiple|clientWidth|clientHeight|mouseenter|half|maxdrag|addEventListener|removeEventListener|zoom|span|keydown|trash|cloneEvents|removeListener|onRemove|ignored|collect|styleFloat|cssFloat|float|novisibility|hasChild|sRegExp|regExp|removeAttribute|even|getCoords|nodeValue|nodeName|odd|done|setAttribute|defer|isBool|Boolean|states|textContent|innerText|evaluate|resolver|clickedElement|substring|getPos|getParents|http|stepMin|hideDelay|showDelay|stepMax|getFirst|DOMContentLoaded|klasses|removeLists|scrollSize|getAllPrevious|wheelStops|HTML|inside|offsetSize|rel|overflow|whitespace|clientX|adopt|clientY|addItems|getClone|cloneOpacity|makeDraggable|elementOpacity|250|selectstart|background|onActive|which|Slide|addSection|wraps|onHide|fullHeight|filterBy|processScripts|lastIndexOf|valueOf|interval|0px|evalResponse|failure|getHeader|emulation|urlEncoded|Content|www|Scroll|math|catch|idx|some|acos|wheelDelta|processHTML|pop|toFloat|fullOpacity|execScript|removeItems|ignore|fullWidth|selectorText|Accept|run|360|6000|600000|destroy|invoke|eval|onerror|description|kp|sp|rs|autoSave|defaultView|IFrame|Constructors|multi|timeout|save||knobheight|Move|parentWindow|newElement|textnode|onProgress|ShockwaveFlash|plugins|error|undefined|fix|distance|contents|values1|Keys|onabort|replaces|sqrt|removeChild|500|clearChain|leave|getClean|useLink|Asset|checkAgainst|fps|Durations|onShow|newTextNode|accessKey|cellSpacing|BackgroundImageCache|cellPadding|noresize|readonly|DOMElement|execCommand|getRandom|2dev|trident4|taintEnabled|CollectGarbage|nix|noshade|clearInterval|getLength|other|clearTimeout|unknown|EMBED|mac|OBJECT|embed|linux|air|runtime|readOnly|rowSpan|maxLength|frameBorder|isFinite|tabIndex||useMap|platform|opera|420|419|getBoxObjectFor|colSpan|getHTML|alt||ctrlKey|control|altKey|meta|up|enter|metaKey|removeProperties|shiftKey|getNext|getAllNext|reverse|button|native|fromElement|getPrevious|down|esc|textarea|frames|IFrame_|getPropertyValue|appendText|replaceChild|cloneNode|toggleClass|getAttribute|getProperties|backspace|space|MooTools|tab|cancelBubble|createTextNode|returnValue|sort|lastChild|atan2|detachEvent|atan|attachEvent|ceil|tan|log|exp|eliminate||asin|compact|nowrap|ismap|htmlFor|setTimeout|abs|setInterval||2b2|unshift|detail|120|checkbox|keyCode|111|menu|fromCharCode|getLastChild|radio|srcElement|setHTML|has|getTag|setText|getKeys|getText|getValues|declare|setSaturation|ffff88|ffffff|onBackground|auto|slideIn|highlight|cssRules|short|resume|normal|long|styleSheets|slideOut|toTop|linear|easeInOut|Pow|Expo|Circ|easeOut|easeIn|toLeft|toRight|toBottom|ease|pause|Group|11cf|AE6D|96B8|444553540000|movie|D27CDB6E|clsid|wMode|always|swLiveConnect|flashVars|classid|shockwave|flash|Flash|Shockwave|dblclick|__flash_unloadHandler|__flash_savedUnloadHandler|mimeTypes|getVersion|remote|CallFunction|returntype|__flash__argumentsToXML|Sine|Back|onSnap|Accordion|makeResizable|drop|emptydrop|onBeforeStart|action|GET|onRequest|POST|PUT|DELETE|4096|Image|tool|Tips|hellip|SmoothScroll|Scroller|serialize|onSort|Sortables|screen|media|stylesheet|onException|setRequestHeader|utf|Quint|Microsoft|XMLHTTP|Requested|Quart|Cubic||618||Bounce|Elastic|Quad|With|responseText|put|getResponseHeader||charset|form|urlencoded|setHeader|java|responseXML|200|300|ecma|allowScriptAccess|GetVariable|getWidth|getHeight|getScrollTop|getScrollLeft|getScrollWidth|getScrollHeight|innerHeight|innerWidth|Style|Left|static|offsetLeft|offsetTop|getTop|getLeft|w3|snapshotItem|org|1999|setMin|setMax|snapshotLength|UNORDERED_NODE_SNAPSHOT_TYPE|namespaceURI|high|starts|with|XPathResult|Bottom|Right|move|resize|xul|hasLayout|getOpacity|setOpacity|submit|blur|selectend|contextmenu|keypress|keyup|focus|rgba|maxWidth|zIndex|rect|fontWeight|textIndent|Top|clip|lineHeight|backgroundColor|maxHeight|backgroundPosition|fontSize|letterSpacing|enabled|zA|setTime|expires|toGMTString|devon|Eaeflnr|x1f|boolean|u00|decodeURIComponent|invert|10000|Swiff_|quality|HEX|HSB|setHue|setBrightness|RGB|x00|toJSON|protocol|https|void'.split('|'),0,{}))



/*

AC_RunActiveContent.js

*/

//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

/*

HomeJSript.js file data

*/

YAHOO.util.Event.addListener(window, "load", function()
{
scr1 = document.getElementById("top_MorEveImage").value;
showlogo();
});

 function calltop()
 {
 alert("HOme frame java script called");
 }
function setClearHistory()
{
   InvokeAjax("Home_new.aspx?Type=clearcookies" + "&ms=" + new Date().getTime());
//   document.FrmquickSearch.action = AppPath + "/london-estate-agents/clearcookies";
//   document.FrmquickSearch.submit();
}

function setClear()
{
InvokeAjax("Home_new.aspx?Type=searches" + "&ms=" + new Date().getTime());
//      document.FrmquickSearch.action = AppPath + "/london-estate-agents/clearsearches";
//      document.FrmquickSearch.submit();
}

function UpdateHome(str)
{
  if(str == "ClearCookies")
  {
    document.getElementById("recentvisit").style.visibility = "hidden";
    document.getElementById("recentvisit").style.display = "none";
    document.getElementById("HomeSearchvalue").value=1;
  }
  if(str == "ClearSearch")
  {
    document.getElementById("recentsearch").style.visibility = "hidden";
    document.getElementById("recentsearch").style.display = "none";
//    document.getElementById("divRecent").style.visibility = "hidden";
//    document.getElementById("divRecent").style.display = "none";
    document.getElementById("HomeSearchHistory").value=1;
  }
  if(document.getElementById("HomeSearchvalue").value==1 && document.getElementById("HomeSearchHistory").value==1 || document.getElementById("HomeSearchvalue").value==1 && document.getElementById("HomeSearchHistory").value==0 || document.getElementById("HomeSearchvalue").value==0 && document.getElementById("HomeSearchHistory").value==1)
  {
   document.getElementById("tableContent").style.visibility = "visible";
   document.getElementById("tableContent").style.display = "block";
  }
}




function allownumbers(e)
   {
    //alert(1);
    var key = window.event ? e.keyCode : e.which;
    var keychar = String.fromCharCode(key);
    var reg1 = new RegExp("[0-9]")
    if (key == 8)
    {
     keychar = String.fromCharCode(key);
    }
    if (key == 13)
    {
     key=8;
     keychar = String.fromCharCode(key);   
     CallByReference()
     return;
       
    }
    if(!reg1.test(keychar))
    {
        return false;   
    }
    return true;
   } 
   
   //-------End Of functions for Advaced Search------
var Custom = {
	init: function() {
		var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active;
		for(a = 0; a < inputs.length; a++) {
			if((inputs[a].type == "checkbox" || inputs[a].type == "radio") && inputs[a].className == "styled") {
				span[a] = document.createElement("span");
				span[a].className = inputs[a].type;

				if(inputs[a].checked == true) {
					if(inputs[a].type == "checkbox") {
						position = "0 -" + (checkboxHeight*2) + "px";
						span[a].style.backgroundPosition = position;
					} else {
						position = "0 -" + (radioHeight*2) + "px";
						span[a].style.backgroundPosition = position;
					}
				}
				inputs[a].parentNode.insertBefore(span[a], inputs[a]);
				span[a].onmousedown = Custom.pushed;
				span[a].onmouseup = Custom.check;
				//document.onmouseup = Custom.clear;
			}
		}
	},
	pushed: function() {
		element = this.nextSibling;
		if(element.checked == true && element.type == "checkbox") {
			this.style.backgroundPosition = "0 -" + checkboxHeight*3 + "px";
		} else if(element.checked == true && element.type == "radio") {
			this.style.backgroundPosition = "0 -" + radioHeight*3 + "px";
		} else if(element.checked != true && element.type == "checkbox") {
			this.style.backgroundPosition = "0 -" + checkboxHeight + "px";
		} else {
			this.style.backgroundPosition = "0 -" + radioHeight + "px";
		}
	},
	check: function() {
		device = this.nextSibling;
		if(device.checked == true && device.type == "checkbox") {
			this.style.backgroundPosition = "0 0";
			device.checked = false;
		} else {
			if(device.type == "checkbox") {
				this.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
			} else {
				this.style.backgroundPosition = "0 -" + radioHeight*2 + "px";
				group = this.nextSibling.name;
				inputs = document.getElementsByTagName("input");
				for(a = 0; a < inputs.length; a++) {
					if(inputs[a].name == group && inputs[a] != this.nextSibling) {
						inputs[a].previousSibling.style.backgroundPosition = "0 0";
					}
				}
			}
			device.checked = true;
		}
	},
	clear: function() {
		var clear = document.getElementsByTagName("input");
		for(var b = 0; b < clear.length; b++) {
			if(clear[b].type == "checkbox" && clear[b].checked == true) {
				clear[b].previousSibling.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
			} else if(clear[b].type == "checkbox") {
				clear[b].previousSibling.style.backgroundPosition = "0 0";
			} else if(clear[b].type == "radio" && clear[b].checked == true) {
				clear[b].previousSibling.style.backgroundPosition = "0 -" + radioHeight*2 + "px";
			} else if(clear[b].type == "radio") {
				clear[b].previousSibling.style.backgroundPosition = "0 0";
			}
		}
	}
}

function ClearValue(field, strCheck)
	{
		if(field.value == strCheck)
			field.value = "";				
	}
function Repopulate(field, strCheck)
	{
		if(field.value=="")
		field.value = strCheck;
	}	
	

var scr1=""
function showlogo()
{
var date = new Date();
var hours = date.getHours();

if ( (hours < 12) )
    document.getElementById("bglogo").src=scr1+'/image/user/gm.GIF';
else if ((hours < 17))
    document.getElementById("bglogo").src=scr1+'/image/user/ga.GIF';
else
 document.getElementById("bglogo").src=scr1+'/image/user/ge.GIF';
}

function showmenu()
{
    var ele = document.getElementById("divmenu");
    if(ele.className == "hide") 
    {
        ele.className = ""
    } 
    else
    {
        ele.className = "hide"
    }
}  


var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
		
} else{
//	document.getElementById("tdFlash").innerHTML="<img src='<%=DM.AppPath%>/image/user/homewindow_noflash.jpg' >";
}


/*

LeftJscript.js data files

*/

YAHOO.util.Event.addListener(window, "load", function()
{

AppPath = document.getElementById("top_MorEveImage").value;
states = document.getElementById("HidCityValue").value;
getvalue1 = states.split("^");

Setvalue();
//defaultPriceValue();
//checkCondition();
});
//function calltop()
//{
//alert("Left frame java script called");
//}

var checkboxHeight = "25";
var radioHeight = "25";

// Function to Search for Property by Reference Number. --- Advanced Search
var AppPath="";
function CallByReference()
{
    var refID  = YAHOO.util.Dom.get("dbRef")
    if(refID.value == "")
    {
        alert("Please enter reference number to search.")
        return;
    }
    else
    {
      if(!isNaN(refID.value))
      {
    document.FrmquickSearch.action = AppPath + "/Ref=" + refID.value;  
   // -- london-estate-agents/properties-for-rent/ID=768/Overview
    //document.FrmquickSearch.action=AppPath+"/london-estate-agents/properties-for-rent/RID="+refID.value+"/Overview";
        document.FrmquickSearch.submit();
        return;
      }
      else
      {
        alert("Please enter a valid reference number.")
        return;
      }
      
    }
}
YAHOO.util.Event.addListener(YAHOO.util.Dom.get("dbRef"),"keypress",allownumbers)
YAHOO.util.Event.addListener(YAHOO.util.Dom.get("txtLoc"),"keypress",allowenter)
function allownumbers(e)
{
    var key = (window.event) ? e.keyCode : e.which;
    var keychar = String.fromCharCode(key);
    var reg1 = new RegExp("[a-z0-9A-Z]")
    if (key == 8)
    {
        keychar = String.fromCharCode(key);
    }
    //alert(key);
    if (key == 13)
    {
        key=8;
        keychar = String.fromCharCode(key);   
        CallByReference()
        return;
    }
        if(!reg1.test(keychar))
        {
            return false;          
        }
        else
        {
             return true; 
        }
} 
   
function allowenter(e)
{
    var key = window.event ? e.keyCode : e.which;
    var keychar = String.fromCharCode(key);
    if (key == 8)
    {
        keychar = String.fromCharCode(key);
    }
    if (key == 13)
    {
        key=8;
        keychar = String.fromCharCode(key);   
        CallSearch()
        return;
    }
    
} 
 

//-------End Of functions for Advaced Search------
var Custom = {
	init: function() {
		var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active;
		for(a = 0; a < inputs.length; a++) {
			if((inputs[a].type == "checkbox" || inputs[a].type == "radio") && inputs[a].className == "styled") {
				span[a] = document.createElement("span");
				span[a].className = inputs[a].type;

				if(inputs[a].checked == true) {
					if(inputs[a].type == "checkbox") {
						position = "0 -" + (checkboxHeight*2) + "px";
						span[a].style.backgroundPosition = position;
					} else {
						position = "0 -" + (radioHeight*2) + "px";
						span[a].style.backgroundPosition = position;
					}
				}
				inputs[a].parentNode.insertBefore(span[a], inputs[a]);
				span[a].onmousedown = Custom.pushed;
				span[a].onmouseup = Custom.check;
				//document.onmouseup = Custom.clear;
			}
		}
	},
	pushed: function() {
		element = this.nextSibling;
		if(element.checked == true && element.type == "checkbox") {
			this.style.backgroundPosition = "0 -" + checkboxHeight*3 + "px";
		} else if(element.checked == true && element.type == "radio") {
			this.style.backgroundPosition = "0 -" + radioHeight*3 + "px";
		} else if(element.checked != true && element.type == "checkbox") {
			this.style.backgroundPosition = "0 -" + checkboxHeight + "px";
		} else {
			this.style.backgroundPosition = "0 -" + radioHeight + "px";
		}
	},
	check: function() {
		device = this.nextSibling;
		if(device.checked == true && device.type == "checkbox") {
			this.style.backgroundPosition = "0 0";
			device.checked = false;
		} else {
			if(device.type == "checkbox") {
				this.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
			} else {
				this.style.backgroundPosition = "0 -" + radioHeight*2 + "px";
				group = this.nextSibling.name;
				inputs = document.getElementsByTagName("input");
				for(a = 0; a < inputs.length; a++) {
					if(inputs[a].name == group && inputs[a] != this.nextSibling) {
						inputs[a].previousSibling.style.backgroundPosition = "0 0";
					}
				}
			}
			device.checked = true;
		}
	},
	clear: function() {
		var clear = document.getElementsByTagName("input");
		for(var b = 0; b < clear.length; b++) {
			if(clear[b].type == "checkbox" && clear[b].checked == true) {
				clear[b].previousSibling.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
			} else if(clear[b].type == "checkbox") {
				clear[b].previousSibling.style.backgroundPosition = "0 0";
			} else if(clear[b].type == "radio" && clear[b].checked == true) {
				clear[b].previousSibling.style.backgroundPosition = "0 -" + radioHeight*2 + "px";
			} else if(clear[b].type == "radio") {
				clear[b].previousSibling.style.backgroundPosition = "0 0";
			}
		}
	}
}

//new functions
function getSelectedRadio(buttonGroup) {
   // returns the array number of the selected radio button or -1 if no button is selected
   if (buttonGroup[0]) { // if the button group is an array (one button is not an array)
      for (var i=0; i<buttonGroup.length; i++) {
         if (buttonGroup[i].checked) {
            return i
         }
      }
   } else {
      if (buttonGroup.checked) { return 0; } // if the one button is checked, return zero
   }
   // if we get to this point, no radio button is selected
   return -1;
} // Ends the "getSelectedRadio" function

function getSelectedRadioValue(buttonGroup) {
   // returns the value of the selected radio button or "" if no button is selected
   var i = getSelectedRadio(buttonGroup);
   if (i == -1) {
      return "";
   } else {
      if (buttonGroup[i]) { // Make sure the button group is an array (not just one button)
         return buttonGroup[i].value;
      } else { // The button group is just the one button, and it is checked
         return buttonGroup.value;
      }
   }
} 

//end new function


function CallSearch()
{

//alert(document.getElementById("slider_minmax_min").innerHTML);
//alert(document.getElementById("slider_minmax_max").innerHTML);
//alert(document.getElementById("slider_minmax_min_sec").innerHTML);
//alert(document.getElementById("slider_minmax_max_sec").innerHTML);
    var flat="";
    var House="";
    var location = "";
    var area="";document.getElementById

    var selectedRadio=getSelectedRadioValue(document.FrmquickSearch.RentRadio);

    ClearValue(document.FrmquickSearch.txtLoc,"Area or Postcode")
    if(document.FrmquickSearch.dbLoc.value != "")
    {
        location = "'" + document.FrmquickSearch.dbLoc.value + "'" + ","
    }
    if(document.FrmquickSearch.txtLoc.value != "")
    {
        area = document.FrmquickSearch.txtLoc.value ;
    }
     if (selectedRadio == "Longlet")
     {      
        document.FrmquickSearch.action = AppPath+"/london-estate-agents/properties-for-rent?minPrice=" +document.getElementById("slider_minmax_min_sec").innerHTML + "&maxPrice=" + document.getElementById("slider_minmax_max_sec").innerHTML + "&minBedroom=" + document.getElementById("slider_minmax_min").innerHTML + "&maxBedroom=" + document.getElementById("slider_minmax_max").innerHTML + "&areaCodes=" + location + "&areaName=" + area + "&Flat=" + flat + "&House=" + House + "&Parking=&Furnished=&latitude=&longitude=&proximity=&lettype=longlet&Listview";
     }
     else if (selectedRadio == "Shortlet")
     {
        document.FrmquickSearch.action = AppPath+"/london-estate-agents/properties-for-rent?minPrice=" +document.getElementById("slider_minmax_min_sec").innerHTML + "&maxPrice=" + document.getElementById("slider_minmax_max_sec").innerHTML + "&minBedroom=" + document.getElementById("slider_minmax_min").innerHTML + "&maxBedroom=" + document.getElementById("slider_minmax_max").innerHTML + "&areaCodes=" + location + "&areaName=" + area + "&Flat=" + flat + "&House=" + House + "&Parking=&Furnished=&latitude=&longitude=&proximity=&lettype=shortlet&Listview"; 
          //FrmquickSearch.action = AppPath+"/london-estate-agents/propertis-for-rent?minPrice=&maxPrice=" + FrmquickSearch.dbmaxPrice.value + "&minBedroom=" + FrmquickSearch.dbMaxBR.value + "&maxBedroom=" + FrmquickSearch.dbMaxBR.value + "&areaCodes=" + location + "&areaName=" + area + "&Flat=" + flat + "&House=" + House + "&latitude=&longitude=&proximity=&shortlet=shortlet";
          //FrmquickSearch.action = AppPath+"/london-estate-agents/propertis-for-buy?minPrice=&maxPrice=" + FrmquickSearch.dbmaxPrice.value + "&minBedroom=" + FrmquickSearch.dbMaxBR.value + "&maxBedroom=" + FrmquickSearch.dbMaxBR.value + "&areaCodes=" + location + "&areaName=" + area + "&Flat=" + flat + "&House=" + House + "&latitude=&longitude=&proximity=&shortlet=shortlet";
	}
	else
	{
	    document.FrmquickSearch.action = AppPath+"/london-estate-agents/properties-for-buy?minPrice=" +document.getElementById("slider_minmax_min_sec").innerHTML + "&maxPrice=" + document.getElementById("slider_minmax_max_sec").innerHTML + "&minBedroom=" + document.getElementById("slider_minmax_min").innerHTML + "&maxBedroom=" + document.getElementById("slider_minmax_max").innerHTML + "&areaCodes=" + location + "&areaName=" + area + "&Flat=" + flat + "&House=" + House + "&Parking=&Furnished=&latitude=&longitude=&proximity=&lettype=&Listview"; 
	}
    //FrmquickSearch.action = 'listSearchProperties1.aspx?q=^' + FrmquickSearch.dbmaxPrice.value + '^' + FrmquickSearch.dbMaxBR.value + '^' + FrmquickSearch.dbMaxBR.value + '^' + location + '^' + flat + '^' + House + '^' + FrmquickSearch.RentRadio.value + '^' + area + "^^^" ;
    document.FrmquickSearch.submit();
 }
 
// function checkCondition()
// {
//    var url = document.URL;
//    var count = 0;
//    var pos1 = url.indexOf("^");
//    while ( pos1 != -1 ) {
//            count++;            
//            pos1 = url.indexOf("^",pos1+1);
//          }
//    if (count == 11)
//    {
//        document.getElementById("lblID").innerHTML = "Amend your "
//        SetValues();
//    }
//    else
//    {
//          document.getElementById("lblID").innerHTML = "Quick "
//    }
// }
 
 
   
  function SetValues()
  { 
    var strurl = document.URL;
    var mytool_array=strurl.split("^");
    document.getElementById("dbmaxPrice").value = mytool_array[1];
    document.getElementById("dbMaxBR").value = mytool_array[3];
    var loca1 = mytool_array[4] ;
    var loca=loca1.replace(/'/gi, "")
    if(loca.indexOf(",") != -1)
    {
        var loc = loca.split(",");
        document.getElementById("dbLoc").value = loc[0];
      
         
    }
    else
    {
        document.getElementById("dbLoc").value = mytool_array[4];
    }
     document.getElementById("txtLoc").value = mytool_array[8];
     var rent=mytool_array[7]
    if(rent.indexOf("&") != -1)
    {
        var sec = rent.split("&");
        document.getElementById("RentRadio").value = sec[0];
    }
    else
    {
        var sec = rent.split("?");
        document.getElementById("RentRadio").value = sec[0];
    }
    
}

function ClearValue(field, strCheck)
{
    if(field.value == strCheck)
	    field.value = "";				
}
function Repopulate(field, strCheck)
	{
		if(field.value=="")
		field.value = strCheck;
	}	
	

var states = "";
var getvalue1 = "";
var tota;
var PrevRegion = "";
function Setvalue()
{

    document.FrmquickSearch.dbLoc.options.length=0
    for(var i=0; i<(getvalue1.length-1);++i)
    {
            tota = getvalue1[i].split(",");
        if(tota[1] == 'D')
           {
             tota[1] = 'Southwark'
           }
           else if(tota[1] == 'E')
           {
             tota[1] = 'Newham'
           }
        if(PrevRegion != tota[1])
        {
            if(tota[1] == 'City')
            {
                 addDisOption(document.FrmquickSearch.dbLoc, 'City & Docklands', tota[1]);
            }
            else
            {
                addDisOption(document.FrmquickSearch.dbLoc, tota[1], tota[1]);
            }
        }
        if(tota[2] == "Select")
        {
            addOption(document.FrmquickSearch.dbLoc, tota[2], tota[0]);
        }
        else
        {
            addOption(document.FrmquickSearch.dbLoc, "  " + tota[2], tota[0]);
        }
        PrevRegion = tota[1];
        tota = "";
    }
}

function addOption(selectbox,text,value )
{
    var optn = document.createElement("OPTION");
    optn.text = text;
    optn.value = value;
   // selectbox.onchange = function(){ restore(this); }
    selectbox.options.add(optn);
}
function addDisOption(selectbox,text,value )
{
    var newoption = new Option(text, value, false, false);    
    newoption.style.color = 'black'
    selectbox.options.add(newoption);
}

function restore(e) 
{
    if (e.options[e.selectedIndex].disabled) 
    {
        e.selectedIndex = 0;
    }
}

var buyvalue = "Up to^175000^250000^350000^500000^700000^"
var buyText = "Up to^175,000^250,000^350,000^500,000^700,000^1 Million +"

var rentvalue = "Up to^175^250^350^500^750^1000^"
var bedrooms = "^0^1^2^3^4^5"
function enterPriceValue(ptype)
{
    var priceval;
    var priceText;
    if(ptype == "Rent")
    {
        priceval = rentvalue ;
        if(document.getElementById("PropertyID") != null && document.getElementById('PropertyType') != null)
        {
            document.getElementById("PropertyID").src = "<%=DM.AppPath%>/image/bluebox_tolet.jpg"
            document.getElementById('PropertyType').href = "<%=DM.AppPath%>/london-estate-agents/Property-to-sell";
        }
    }
    else
    {
       priceval = buyvalue ;
       priceText = buyText ;
       var totValues1Text = priceText.split("^");
       if(document.getElementById("PropertyID") != null && document.getElementById('PropertyType') != null)
       {
           document.getElementById("PropertyID").src = "<%=DM.AppPath%>/image/bluesell.jpg"
           document.getElementById('PropertyType').href="<%=DM.AppPath%>/london-estate-agents/Property-to-sell";
       }
    }
    
    var totValues1 = priceval.split("^");
   
    var total = ['dbmaxPrice']
    document.getElementById('dbmaxPrice').options.length = 0;
    for(j=0; j < total.length; j++)
    {
        for(i=0; i < totValues1.length; i++)
        {
          if(total[j] == 'dbmaxPrice' && totValues1[i] == "" && totValues1[i] != "Up to")
          {
                if(ptype == "Rent")
                {
                    addOptions(total[j],"£1000 +",totValues1[i])
                }
                else
                {
                    addOptions(total[j],"£1 Million +",totValues1[i])
                }
          }
          else if(totValues1[i] == "Up to")
          {
                addOptions(total[j],"Up to","")
          }
          else
          {
              if(ptype == "Rent")
                {
                    addOptions(total[j],"£" + totValues1[i] + " per week",totValues1[i])
                }
              else
                {
                    addOptions(total[j],"£" + totValues1Text[i],totValues1[i])
             }
          }
        }
     }
     document.getElementById("hType").value = ptype
}

//defaultPriceValue()

//function defaultPriceValue()         
//{
//   var ptype = document.getElementById("hType").value;
//   var priceval;
//    var priceText;
//    if(ptype == "Rent")
//    {
//        priceval = rentvalue ;
//    }
//    else
//    {
//       priceval = buyvalue ;
//       priceText = buyText ;
//        var totValues1Text = priceText.split("^");
//    }
//    var totValues1 = priceval.split("^");
//    var total = ['dbmaxPrice']
//    document.getElementById('dbmaxPrice').options.length = 0;
//    for(j=0; j < total.length; j++)
//    {
//        for(i=0; i < totValues1.length; i++)
//        {
//          if(total[j] == 'dbmaxPrice' && totValues1[i] == "" && totValues1[i] != "Up to")
//          {
//            if(ptype == "Rent")
//            {
//                addOptions(total[j],"£1000 +",totValues1[i])
//            }
//            else
//            {
//                addOptions(total[j],"£1 Million +",totValues1[i])
//            }
//          }
//          else if(totValues1[i] == "Up to")
//          {
//                addOptions(total[j],"Up to","")
//          }
//          else
//          {
//            if(ptype == "Rent")
//            {
//                addOptions(total[j],"£" + totValues1[i] + " per week",totValues1[i])
//             }
//             else
//             {
//                addOptions(total[j],"£" + totValues1Text[i],totValues1[i])
//             }
//          }   
//        }
//     }
//}

function addOptions(pID, text, value)
{
    var optn = document.createElement("OPTION");
    optn.text = text;
    optn.value = value;
    document.getElementById(pID).options.add(optn);
}
 
//checkCondition()


/*

BottomJScript.js data files

*/

YAHOO.util.Event.addListener(window, "load", function()
{
scr1 = document.getElementById("top_MorEveImage").value;
//alert("good");
//if (document.getElementById("toptable") != null)
//{
//alert("inside");
//document.getElementById("toptable").style.visibility="visible";
//document.getElementById("loadingDiv").style.display="none";
//}
//alert("passed");loadingDiv
showlogo();
});

//alert("first");
//document.getElementById("toptable").className = "hide";
//alert("first-next");
var scr1=""
function showlogo()
{
var date = new Date();
var hours = date.getHours();

//if ( (hours < 12) )
    //document.getElementById("bglogo").src=scr1+'/image/user/gm.GIF';
//else if ((hours < 17))
    //document.getElementById("bglogo").src=scr1+'/image/user/ga.GIF';
//else
 //document.getElementById("bglogo").src=scr1+'/image/user/ge.GIF';
}
function showmenu()
{
    var ele = document.getElementById("divmenu");
    if(ele.className == "hide") 
    {
        ele.className = ""
    } 
    else
    {
        ele.className = "hide"
    }
}  

//var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
//document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));


//var pageTracker = _gat._getTracker("UA-4266241-1");
//pageTracker._initData();
//pageTracker._trackPageview();

//var lpPosY = 100;


/*

slider.js data file

*/

/*
Class: Slider
        Creates a slider with two elements: a knob and a container. Returns the values.
Note:
        The Slider requires an XHTML doctype.
Arguments:
        element - the knob container
        knob - the handle
        options - see Options below
        maxknob - an optional maximum slider handle
Options:
		start - the minimum value for your slider.
		end - the maximum value for your slider.
        mode - either 'horizontal' or 'vertical'. defaults to horizontal.
        offset - relative offset for knob position. default to 0.
        knobheight - positions the max slider knob
		snap - whether the slider will slide in steps 
		numsteps - number of slide steps 
Events:
        onChange - a function to fire when the value changes.
        onComplete - a function to fire when you're done dragging.
        onTick - optionally, you can alter the onTick behavior, for example displaying an effect of the knob moving to the desired position.
                Passes as parameter the new position.
*/

var Slider = new Class({
	options: {
		onChange: Class.empty,
		onComplete: Class.empty,
		onTick: function(pos){
			this.moveKnob.setStyle(this.p, pos);			
		},
		start: 0,
		end: 100,
		offset: 0,
		knobheight: 20,
		knobwidth: 14,
		mode: 'horizontal',
		clip_w:0, 
		clip_l:0,
		isinit:true,
		snap: false,
		range: false,
		numsteps:null
	},
    initialize: function(el, knob,bkg, options, maxknob) {
		this.setOptions(options);
		this.element = $(el);
		this.knob = $(knob);
		this.previousChange = this.previousEnd = this.step = -1;
		this.bkg = $(bkg);
		if(this.options.steps==null){
			this.options.steps = this.options.end - this.options.start;
		}
		if(maxknob!=null)
			this.maxknob = $(maxknob);
		//else
		//	this.element.addEvent('mousedown', this.clickedElement.bindWithEvent(this));
		var mod, offset;
		switch(this.options.mode){
			case 'horizontal':
				this.z = 'x';
				this.p = 'left';
				mod = {'x': 'left', 'y': false};
				offset = 'offsetWidth';
				break;
			case 'vertical':
				this.z = 'y';
				this.p = 'top';
				mod = {'x': false, 'y': 'top'};
				offset = 'offsetHeight';
		}
		this.max = this.element[offset] - this.knob[offset] + (this.options.offset * 2);
		this.half = this.knob[offset]/2;
		this.full = this.element[offset] - this.knob[offset] + (this.options.offset * 2);
		this.min = $chk(this.options.range[0]) ? this.options.range[0] : 0;
		this.getPos = this.element['get' + this.p.capitalize()].bind(this.element);
		this.knob.setStyle('position', 'relative').setStyle(this.p, - this.options.offset);

		this.range = this.max - this.min;
		this.steps = this.options.steps || this.full;
		this.stepSize = Math.abs(this.range) / this.steps;
		this.stepWidth = this.stepSize * this.full / Math.abs(this.range) ;
		

		if(maxknob != null) {
			this.maxPreviousChange = -1;
			this.maxPreviousEnd = -1;
			this.maxstep = this.options.end;
			this.maxknob.setStyle('position', 'relative').setStyle(this.p, + this.max - this.options.offset).setStyle('bottom', this.options.knobheight);
		}
		var lim = {};
		//status = this.z
		lim[this.z] = [- this.options.offset, this.max - this.options.offset];
		//lim[this.z] = [100, this.max - this.options.offset];

		this.drag = new Drag(this.knob, {
			limit: lim,
			modifiers: mod,
			snap: 0,
			onStart: function(){
					this.draggedKnob();
			}.bind(this),
			onDrag: function(){
					this.draggedKnob();
			}.bind(this),
			onComplete: function(){
					this.draggedKnob();
					this.end();
			}.bind(this)
		});
		if(maxknob != null) {  
			this.maxdrag = new Drag(this.maxknob, {
				limit: lim,
				modifiers: mod,
				snap: 0, 
				onStart: function(){
					this.draggedKnob(1);
				}.bind(this),
				onDrag: function(){
					this.draggedKnob(1);
				}.bind(this),
				onComplete: function(){
					this.draggedKnob(1);
					this.end();
				}.bind(this)
			});		
		}

		if (this.options.snap) {
			//this.drag.options.grid = Math.ceil(this.stepWidth);
			this.drag.options.grid = (this.full)/this.options.numsteps ;
			this.drag.options.limit[this.z][1] = this.full;
			//this.drag.options.grid = this.drag.options.grid - (this.knob[offset]/this.options.numsteps);
			status = "GRID - " + this.drag.options.grid  + "  , full = " + this.full// DEBUG

		}
		if (this.options.initialize) this.options.initialize.call(this);
    },
	setMin: function(stepMin){
		this.step = stepMin.limit(this.options.start, this.options.end);
		this.checkStep();
		this.end();
		this.moveKnob = this.knob;
		this.bkg.style.clip = "rect(0px "+  (parseInt(this.toPosition(this.step)) +3) + "px 12px 0px)";
		status =this.bkg.style.clip + "  vl= " + parseInt(this.toPosition(this.step)) ; //Debug
		this.fireEvent('onTick', this.toPosition(this.step));
		return this;
	},
	setMax: function(stepMax){
		this.maxstep = stepMax.limit(this.options.start, this.options.end);
		this.checkStep(1);
		this.end();
		this.moveKnob = this.maxknob;
		var w= Math.abs(this.toPosition(this.step)- this.toPosition(this.maxstep)) + 3 ;
		var r = parseInt(this.clip_l + w); 
		this.bkg.style.clip = "rect(0px "+  r + "px 12px "+ this.clip_l + "px)";

		this.fireEvent('onTick', this.toPosition(this.maxstep));
		// For Init Only 
		if(this.options.isinit){
			var lim = {}; var mi,mx;
			mi = - this.options.offset; 
			mx= parseInt(this.maxknob.getStyle('left')) - this.options.offset-4 ;
			lim[this.z] = [mi, mx];
			this.drag.options.limit = lim;
			this.options.isinit = false;
		}
		return this; 
	},
	clickedElement: function(event){
		var position = event.page[this.z] - this.getPos() - this.half;
		position = position.limit(-this.options.offset, this.max -this.options.offset);

		this.step = this.toStep(position);

		//this.moveKnob = this.knob;
		this.bkg.style.clip = "rect(0px "+  (parseInt(this.toPosition(this.step)) +3) + "px 12px 0px)"  
		//status =this.bkg.style.clip; //Debug
		this.checkStep();
		this.end();
		this.fireEvent('onTick', position);
	},

	draggedKnob: function(mx){
		var lim = {}; var mi,mx;
		if(mx==null) {
			this.step = this.toStep(this.drag.value.now[this.z]);	 
			this.checkStep();
		}else {
			this.maxstep = this.toStep(this.maxdrag.value.now[this.z]); 
			this.checkStep(1);
		}
	},
	checkStep: function(mx){
		var lim = {}; var mi,mx;
		var limm = {};
		if(mx==null) {if (this.previousChange != this.step){this.previousChange = this.step;}}
		else {if (this.maxPreviousChange != this.maxstep){this.maxPreviousChange = this.maxstep;}}

		if(this.maxknob!=null) {

			mi = - this.options.offset; 
			mx= parseInt(this.maxknob.getStyle('left')) - this.options.offset-4 ;
			//mx= parseInt(this.maxknob.getStyle('left')) - this.options.offset ;
			lim[this.z] = [mi, mx];
			this.drag.options.limit = lim;
		

			mi = parseInt(this.knob.getStyle('left'))-this.options.offset+22; 
			//mi = parseInt(this.knob.getStyle('left'))-this.options.offset; 
			
			mx= this.max - this.options.offset;
			limm[this.z] = [mi, mx];
			this.maxdrag.options.limit = limm; 

			if(this.step < this.maxstep){
				this.fireEvent('onChange', { minpos: this.step, maxpos: this.maxstep });
				//this.clip_l = parseInt(this.knob.getStyle('left'));
			}
			else{
				this.fireEvent('onChange', { minpos: this.maxstep, maxpos: this.step });
				//this.clip_l = (parseInt(this.maxknob.getStyle('left')) + 10) ;
			}	
			this.clip_l = parseInt(this.knob.getStyle('left')) + 10;
			//var w = Math.abs(parseInt(this.knob.getStyle('left')) - parseInt(this.maxknob.getStyle('left'))) + 3;	
			var w = Math.abs(parseInt(this.knob.getStyle('left')) - parseInt(this.maxknob.getStyle('left')));
			//if(w > 3) w = w+3;
			
			var r = parseInt(this.clip_l + w); 
			this.bkg.style.clip = "rect(0px "+  r + "px 12px "+ this.clip_l + "px)"  
			//status =this.bkg.style.clip  + " w= " + w //Debug

		}else {  
			this.fireEvent('onChange', this.step);
			this.bkg.style.clip = "rect(0px "+  (parseInt(this.drag.value.now[this.z]) +3)  + "px 12px 0px)"  

		}
	},
	end: function(){
		if (this.previousEnd !== this.step || (this.maxknob != null && this.maxPreviousEnd != this.maxstep)) {
			this.previousEnd = this.step;
			if(this.maxknob != null) {
				this.maxPreviousEnd = this.maxstep;
				if(this.step < this.maxstep)
					this.fireEvent('onComplete', { minpos: this.step + '', maxpos: this.maxstep + '' });
				else    
					this.fireEvent('onComplete', { minpos: this.maxstep + '', maxpos: this.step + '' });
			}else{  
				this.fireEvent('onComplete', this.step + '');
			}
		}
	},
	
	toStep: function(position){
		return Math.round((position + this.options.offset) / this.max * this.options.steps) + this.options.start;
	},

	toPosition: function(step){
		return (this.max * step / this.options.steps) - (this.max * this.options.start / this.options.steps) - this.options.offset;
	}

});

Slider.implement(new Events);
Slider.implement(new Options);



YAHOO.util.Event.addListener(window, "load", function()
{

var selectedRadio=getSelectedRadioValue(document.FrmquickSearch.RentRadio);
//alert(selectedRadio)
if (selectedRadio=='Buy')
{
//alert(selectedRadio)
//document.getElementById("leftImg").style.backgroundPosition = '-604px -314px';
document.getElementById("priceBuy").style.display = 'block';
document.getElementById("priceRent").style.display = 'none';
}
else
{
document.getElementById("priceBuy").style.display = 'none';
document.getElementById("priceRent").style.display = 'block';
}

document.getElementById("bedRoomDiv").style.visibility="visible";
document.getElementById("priceDiv").style.visibility="visible"; 
document.getElementById("advSrchImg").style.visibility="visible";

//document.getElementById("imgSpace").style.height = '43px';
detectBrow() ;

for(counterInc=1; counterInc <= 9; counterInc++)
 {
 var imgIdVal = "imgTop" + counterInc; 
 document.getElementById(imgIdVal).style.visibility="visible";
 }


});

var scrwidth= screen.availWidth;




if(scrwidth >=  2200 && scrwidth >= 2300)
{
    var background=document.getElementById("screenimage");
    if (background)
    {
      background.style.backgroundImage = 'url(image/bgrepeat_home2300.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}



else if(scrwidth >=  2000 && scrwidth <=2200)
{
   var background=document.getElementById("screenimage");
   if (background)
   
    {
      background.style.backgroundImage = 'url(image/bgrepeat_home2048.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}



else if(scrwidth >=  1900 && scrwidth <=2000)
{
   var background=document.getElementById("screenimage");
   if (background)
   
    {
      background.style.backgroundImage = 'url(image/bgrepeat_home1900.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}


else if(scrwidth >=  1750 && scrwidth <=1900)
{
   var background=document.getElementById("screenimage");
   if (background)
   
    {
      background.style.backgroundImage = 'url(image/bgrepeat_home1800.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}

else if(scrwidth >=  1600 && scrwidth <=1700)
{
   var background=document.getElementById("screenimage");
   if (background)
    {
      background.style.backgroundImage = 'url(image/bgrepeat_home1600.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}

else if(scrwidth >= 1300 && scrwidth <=1400)
{
    var background=document.getElementById("screenimage");
    if (background)
    {
      background.style.backgroundImage = 'url(image/bgrepeat_home1300.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}


else if(scrwidth >= 1200 && scrwidth <=1300)
{
    var background=document.getElementById("screenimage");
    if (background)
    {
      background.style.backgroundImage = 'url(image/bgrepeat_home1280.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}


else if(scrwidth >= 1100 && scrwidth <=1200)
{
    var background=document.getElementById("screenimage");
    if (background)
    {
      background.style.backgroundImage = 'url(image/bgrepeat_home1152.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}







else if(scrwidth >= 1000 && scrwidth <=1100)
{
    var background=document.getElementById("screenimage");
    if (background)
    {
      background.style.backgroundImage = 'url(image/bgrepeat_home1024.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}


else if(scrwidth <=800)
{
    var background=document.getElementById("screenimage");
    if (background)
    {    
      background.style.backgroundImage = 'url(image/bgrepeat_home800.jpg)';
      background.style.backgroundRepeat = 'no-repeat';
    }
}


function chgBkgrd(fld){

if (fld.value=='Buy')
{
//document.getElementById("leftImg").style.backgroundPosition = '-604px -314px';
document.getElementById("priceBuy").style.display = 'block';
document.getElementById("priceRent").style.display = 'none';

}
else
{
document.getElementById("priceBuy").style.display = 'none';
document.getElementById("priceRent").style.display = 'block';

}

}


function detectBrow() 
{

	try 
	{
	 localHttp = new ActiveXObject("Msxml2.XMLHTTP"); 
	  {
	  //document.getElementById("imgSpace").style.height = '43px';
	  //alert("IE");
	  }
	// document.getElementById("leftImg").style.backgroundPosition = '0px -250px';
	 }
	catch(e) 
	{
		try
		{ 
		localHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
		}
		catch(oc)
		{ 
		localHttp = null;
		}
		
		if(!localHttp && typeof XMLHttpRequest != "undefined") 
		{
			  //document.getElementById("imgSpace").style.height = '49px';
			//  alert("moz");
		//document.getElementById("leftImg").style.backgroundPosition = '0px -245px';
		}		
	}
	
}