if(ask){ask.util={};
ask.local={};
ask.widget={};
ask.news={};
}else{var ask=function(){return{util:{},local:{},widget:{},news:{}};
}();
}var __d=window.document;
__d.get=__d.getElementById;
__d.ce=__d.createElement;
__d.ctn=__d.createTextNode;
var __u=ask.util;
var __l=ask.local;
var __w=ask.widget;
var __n=ask.news;

ask.util.ErrHandler=new function(){this.trapError=function(D,B,C){var A=new Error(D);
A.location=B+", line: "+C;
ask.util.ErrHandler.warn(A);
return true;
};
this.warn=function(A){printfire(A.message+" at "+A.location,ask.util.MsgType.Exception);
};
};
ask.util.Defaults={SP:"http://sp.ask.com/i/j/maps2/",StaticDomain:"http://sp.ask.com/"};
ask.util.Browser=new function(){this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1;
this.isIE6=navigator.userAgent.toLowerCase().indexOf("msie 6.0")!=-1;
this.isIE7=navigator.userAgent.toLowerCase().indexOf("msie 7.0")!=-1;
this.isFF1=navigator.userAgent.toLowerCase().indexOf("firefox/1.0")!=-1;
this.isSafari=navigator.userAgent.toLowerCase().indexOf("safari")!=-1;
this.isSafari3orHigher=this.isSafari&&navigator.userAgent.toLowerCase().indexOf("version/")!=-1;
this.isSafari2orLower=this.isSafari&&!this.isSafari3orHigher;
this.isOpera=navigator.userAgent.toLowerCase().indexOf("opera")!=-1;
this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;
this.version=navigator.appVersion;
this.defaultCursor=this.isIE?"auto":"";
this.trueDefaultCursor="default";
this.handCursor=this.isIE?"hand":"pointer";
this.resizeCursor=function(e,el){var xPos,yPos,offset,dir;
dir="";
xPos=e.offsetX;
yPos=e.offsetY;
offset=8;
if(yPos<offset){dir+="n";
}else{if(yPos>el.offsetHeight-offset){dir+="s";
}}if(xPos<offset){dir+="w";
}else{if(xPos>el.offsetWidth-offset){dir+="e";
}}return dir;
};
this.openHandCursor="url("+ask.util.Defaults.SP+"open_hand.cur), default";
this.closedHandCursor="url("+ask.util.Defaults.SP+"closed_hand.cur), move";
this.supportsJS5=function(){var js5=false;
if(window.XMLHttpRequest){js5=true;
}else{if(window.ActiveXObject){/*@cc_on @*//*@if (@_jscript_version >= 5)
				js5=true;
			@end @*/}}return js5;
};
this.getBounds=function(){var width=0,height=0;
if(typeof (window.innerWidth)=="number"){width=window.innerWidth;
height=window.innerHeight;
}else{if(__d.documentElement&&(__d.documentElement.clientWidth||__d.documentElement.clientHeight)){width=__d.documentElement.clientWidth;
height=__d.documentElement.clientHeight;
}else{if(__d.body&&(__d.body.clientWidth||__d.body.clientHeight)){width=__d.body.clientWidth;
height=__d.body.clientHeight;
}}}var bounds=new Object();
bounds.width=parseInt(width);
bounds.height=parseInt(height);
return bounds;
};
this.isSupported=function(){if(this.isIE&&parseInt(navigator.appVersion<=5)){return false;
}else{return true;
}};
this.getDivSizeLimit=function(){var limit=1200000000;
if(this.isSafari){limit=400000;
}else{if(this.isOpera){limit=30000;
}}return limit;
};
this.cookieCheck=null;
this.supportsCookies=function(){return(Cookie&&Cookie.isEnabled()&&!GlobalNav.Variables._isEraser);
};
this.getElementStyle=function(elId,styleName){if(typeof (elId)=="string"){elId=__d.get(elId);
}var styleVal="";
if(document.defaultView){if(this.isSafari){if("display"==styleName&&document.defaultView.getComputedStyle(elId,"")==null){styleVal="none";
}else{styleVal=document.defaultView.getComputedStyle(elId,"").getPropertyValue(styleName);
}}else{styleVal=document.defaultView.getComputedStyle(elId,"").getPropertyValue(styleName);
}}else{var styleObj=elId.currentStyle;
for(var p in styleObj){if(p==styleName){styleVal=styleObj[p];
break;
}}}return styleVal;
};
};
ask.util.Browser.supportsCookies();
ask.util.Events=new function(){this.listeners=[];
this.subscribers=[];
this.getEvent=function(A){if(!A){A=window.event;
}return A;
};
this.cancel=function(A){A=ask.util.Events.getEvent(A);
ask.util.Events.stopPropagation(A);
ask.util.Events.preventDefault(A);
ask.util.Events.returnFalse(A);
};
this.stopPropagation=function(A){A=ask.util.Events.getEvent(A);
if(A.stopPropagation){A.stopPropagation();
}else{A.cancelBubble=true;
}};
this.preventDefault=function(A){A=ask.util.Events.getEvent(A);
if(A.preventDefault){A.preventDefault();
}else{A.returnValue=false;
}};
this.returnFalse=function(A){return false;
};
this.addListener=function(C,G,F,J,B,I){if(C.length&&!(typeof (C)=="string")&&C!=window){for(var E=0;
E<C.length;
E++){var H=C[E];
if(typeof (H)=="string"){H=__d.get(H);
if(H){this.addListener(H,G,F,J,B,I);
}}}}else{if(typeof (C)=="string"){C=__d.get(C);
}if(C){J=J?J:C;
var A=(B)?J:C;
var D=function(K){return F.call(A,ask.util.Events.getEvent(K),J);
};
this.listeners.push([C,G,F,D,J,I]);
if(C.addEventListener){C.addEventListener(G,D,false);
}else{if(C.attachEvent){C.attachEvent("on"+G,D);
}else{C["on"+G]=D;
}}}}};
this.Parts={EL:0,TYPE:1,FN:2,WFN:3,SCOPE:4,KEY:5};
this.removeListener=function(F,G,E,C){var D,B;
var A=null;
if("undefined"==typeof C){C=this._getCacheIndex(F,G,E);
}if(C>=0){A=this.listeners[C];
}if(!F||!A){return false;
}if(F.removeEventListener){F.removeEventListener(G,A[this.Parts.WFN],false);
}else{if(F.detachEvent){F.detachEvent("on"+G,A[this.Parts.WFN]);
}}delete this.listeners[C][this.Parts.WFN];
delete this.listeners[C][this.Parts.FN];
this.listeners.splice(C,1);
return true;
};
this._getCacheIndex=function(E,F,D){for(var C=0,B=this.listeners.length;
C<B;
++C){var A=this.listeners[C];
if(A&&A[this.Parts.FN]==D&&A[this.Parts.EL]==E&&A[this.Parts.TYPE]==F){return C;
}}return -1;
};
this.removeListenersByKey=function(C){if(this.listeners&&this.listeners.length>0){var B=this.listeners.length;
while(B){var A=B-1;
l=this.listeners[A];
if(l&&l[this.Parts.KEY]==C){this.removeListener(l[this.Parts.EL],l[this.Parts.TYPE],l[this.Parts.FN],A);
}l=null;
B=B-1;
}}};
this.removeAllListeners=function(){if(this.listeners&&this.listeners.length>0){var B=this.listeners.length;
while(B){var A=B-1;
l=this.listeners[A];
if(l){this.removeListener(l[this.Parts.EL],l[this.Parts.TYPE],l[this.Parts.FN],A);
}l=null;
B=B-1;
}}};
this.purgeElement=function(D,E,G){var F=this.getListeners(D,G);
if(F){for(var C=0,A=F.length;
C<A;
++C){var B=F[C];
this.removeListener(D,B.type,B.fn);
}}if(E&&D&&D.childNodes){for(C=0,A=D.childNodes.length;
C<A;
++C){this.purgeElement(D.childNodes[C],E,G);
}}};
this.getListeners=function(D,F){var E=[];
if(this.listeners&&this.listeners.length>0){for(var C=0,A=this.listeners.length;
C<A;
++C){var B=this.listeners[C];
if(B&&B[this.Parts.EL]===D&&(!F||F===B[this.Parts.TYPE])){E.push({type:B[this.Parts.TYPE],fn:B[this.Parts.FN],obj:B[this.Parts.SCOPE],adjust:B[this.Parts.ADJ_SCOPE],index:C});
}}}return(E.length)?E:null;
};
this.getTarget=function(B,C){B=ask.util.Events.getEvent(B);
var A=B.target||B.srcElement;
if(C&&A&&"#text"==A.nodeName){return A.parentNode;
}else{return A;
}};
this.getPageX=function(B){B=this.getEvent(B);
var A=B.pageX;
if(!A&&0!==A){A=B.clientX||0;
if(ask.util.Browser.isIE){A+=this._getScrollLeft();
}}return A;
};
this.getPageY=function(A){A=this.getEvent(A);
var B=A.pageY;
if(!B&&0!==B){B=A.clientY||0;
if(ask.util.Browser.isIE){B+=this._getScrollTop();
}}return B;
};
this._getScrollLeft=function(){return this._getScroll()[1];
};
this._getScrollTop=function(){return this._getScroll()[0];
};
this._getScroll=function(){var A=__d.documentElement;
db=__d.body;
if(A&&A.scrollTop){return[A.scrollTop,A.scrollLeft];
}else{if(db){return[db.scrollTop,db.scrollLeft];
}else{return[0,0];
}}};
this._belowWindowBottom=function(B){var A=B-this._getScrollTop()-ask.util.Browser.getBounds().height;
return A>0?A:0;
};
this._aboveWindowTop=function(B){var A=this._getScrollTop()-B;
return A>0?A:0;
};
this._toRightOfWindow=function(A){var B=A-this._getScrollLeft()-ask.util.Browser.getBounds().width;
return B>0?B:0;
};
this._toLeftOfWindow=function(B){var A=this._getScrollLeft()-B;
return A>0?A:0;
};
this.checkMouseEnter=function(B,A){if(A.contains&&B.fromElement){return !A.contains(B.fromElement);
}else{if(B.relatedTarget){return !ask.util.Dom.contains(A,B.relatedTarget);
}}};
this.checkMouseLeave=function(B,A){if(A.contains&&B.toElement){return !A.contains(B.toElement);
}else{if(B.relatedTarget){return !ask.util.Dom.contains(A,B.relatedTarget);
}}};
};
ask.util.Events.addListener(window,"unload",function(){ask.util.Events.removeAllListeners();
if(ask.util.Browser.isSafari){if(console&&console instanceof ask.util.Console){for(var A in console){console[A]=null;
}}}});
ask.util.AbstractEvent=function(B,A){this.type=B;
this.scope=A||window;
this.subscribers=[];
};
ask.util.AbstractEvent.prototype={subscribe:function(C,D,A){var B=new ask.util.Subscriber(C,D,A);
this.subscribers.push(B);
ask.util.Events.subscribers.push(B);
},unsubscribe:function(C,E){var D=false;
for(var A=0;
A<this.subscribers.length;
++A){var B=this.subscribers[A];
if(B&&B.contains(C,E)){this._delete(A);
D=true;
}}return D;
},fire:function(){if(this.subscribers){for(var A=0;
A<this.subscribers.length;
++A){var C=this.subscribers[A];
if(C){var B=(C.override)?C.obj:this.scope;
C.fn.call(B,this.type,arguments,C.obj);
}}}},unsubscribeAll:function(){for(var A=0;
A<this.subscribers.length;
++A){this._delete(A);
}},_delete:function(A){var B=this.subscribers[A];
if(B){delete B.fn;
delete B.obj;
}delete this.subscribers[A];
}};
ask.util.Subscriber=function(B,C,A){this.fn=B;
this.obj=C||null;
this.override=(A);
};
ask.util.Subscriber.prototype.contains=function(A,B){return(this.fn==A&&this.obj==B);
};
ask.util.GeoMath=new function(){this.PI=3.1415926535;
this.MAXZOOM=20;
this.LATLONSCALE=100000;
this.METERSINDEG=111000;
this.sinh=function(A){return(Math.exp(A)-Math.exp(-A))/2;
};
this.deg2rad=function(A){return A*this.PI/180;
};
this.rad2deg=function(A){return A*180/this.PI;
};
this.scale=function(A){return(2*this.PI)/(256<<(this.MAXZOOM-A-1));
};
this.mercatorProject=function(B){var A=Math.sin(B*this.PI/180);
return Math.log((1+A)/(1-A))/2;
};
this.mercatorUnproject=function(A){return this.rad2deg(Math.atan(this.sinh(A)));
};
this.lat2pix=function(A,B){return Math.round(-this.mercatorProject(A)/this.scale(B));
};
this.long2pix=function(A,B){return Math.round(this.deg2rad(A)/this.scale(B));
};
this.pix2lat=function(B,A){return ask.util.Math.Round(this.mercatorUnproject(-B*this.scale(A)),5);
};
this.pix2long=function(A,B){return ask.util.Math.Round(this.rad2deg(A*this.scale(B)),5);
};
this.deg2m=function(A,B){return this.METERSINDEG*A*Math.cos(this.deg2rad(B));
};
this.fmt5=function(A){return Math.round(A*100000)/100000;
};
this.calculateDistance=function(J,d,I,c){var Q=0.01745329252;
var N=6378.135;
var A=1/298.257223563;
J=Q*J;
d=-Q*d;
I=Q*I;
c=-Q*c;
var Z=(J+I)/2;
var X=(J-I)/2;
var P=(d-c)/2;
var V=Math.sin(X);
var e=Math.cos(P);
var E=Math.cos(Z);
var O=Math.sin(P);
var Y=Math.sin(Z);
var B=Math.cos(X);
var K=V*V*e*e+E*E*O*O;
var b=B*B*e*e+Y*Y*O*O;
var H=Math.atan2(Math.sqrt(K),Math.sqrt(b));
var M=Math.sqrt((K*b))/H;
var U=(3*M-1)/(2*b);
var T=(3*M+1)/(2*K);
var a=2*H*N;
return(a*(1+A*U*Y*Y*B*B-A*T*E*E*V*V));
};
this.getPxDistance=function(B,A){return Math.sqrt(Math.pow(B.x-A.x,2)+Math.pow(B.y-A.y,2));
};
this.parse=function(C){var B=/\s*(-?\d+\.\d+)\s*,\s*(-?\d+\.\d+)\s*/;
var A=B.exec(C);
if(!A||A.index!=0||A.input!=A[0]){return null;
}return{lat:parseFloat(A[1]),lng:parseFloat(A[2])};
};
};
ask.util.String={trim:function(A){return A.replace(/^\s+|\s+$/,"");
},replaceChars:function(A,D,C){var F=0;
var E="";
for(var B=0;
B<A.length;
B++){j=D.indexOf(A.charAt(B));
if(j!=-1&&B>F){E=E+A.substring(F,B)+C.charAt(j);
F=B+1;
}}if(B>F){E=E+A.substring(F);
}return E;
},getIndexFromId:function(C){var B=-1;
var A=C.split("_");
if(A.length==2){B=parseInt(A[1]);
}return B;
},thousands:function(E){var D="",F=String(E),A=F.length-1,G,B;
for(B=0;
B<=A;
B++){D+=(G=F.charAt(B));
if((B<A)&&((A-B)%3==0)&&(G!="-")){D+=",";
}}return D;
},escQuote:function(A){return A.replace(/\'/g,"\\'");
},escDblQuote:function(A){return A.replace(/\"/g,'\\"');
},ellipse:function(B,A){return B.length>A?B.substring(0,A-3)+"...":B;
}};
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"");
};
String.prototype.toTitleCase=function(){return this.replace(/\b[a-z]|_[a-z]/g,function(A){return A.toUpperCase();
});
};
ask.util.Math={Round:function(B,C){var A=Math.round(B*Math.pow(10,C))/Math.pow(10,C);
return A;
},Random:function(){return Math.floor(Math.random()*100000);
},getUniqueId:function(){return this.Random();
},PnPoly:function(E,D,F,A,H){var C,B,G=0;
for(C=0,B=E-1;
C<E;
B=C++){if((((F[C]<=H)&&(H<F[B]))||((F[B]<=H)&&(H<F[C])))&&(A<(D[B]-D[C])*(H-F[C])/(F[B]-F[C])+D[C])){G=!G;
}}return G==1;
},dec2hex:function(A){return(A.toString(16));
},hex2dec:function(A){return(parseInt(A,16));
}};
ask.util.Image={alpha:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],SetPng:function(C,A,B){if(C){if(ask.util.Browser.isIE6&&A.indexOf(".png")!=-1){C.src=ask.util.Defaults.SP+"transparent.gif?v=1";
B=B?B:"none";
C.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+A+"', sizingMethod='"+B+"')";
}else{C.src=A;
}}return C;
},MakePng:function(B){var A=__d.ce("img");
this.SetPng(A,B);
A.style.position="absolute";
A.style.border="0 pt none";
A.oncontextmenu=ask.util.Events.stopPropagation;
A.unselectable="on";
A.onselectstart=ask.util.Events.returnFalse;
return A;
},MakePng:function(C,A,D){var B=__d.ce("img");
this.SetPng(B,C);
B.style.position="absolute";
B.style.left=A+"px";
B.style.top=D+"px";
B.style.zIndex=0;
return B;
},MakePng:function(C,A,F,E,D){var B=__d.ce("img");
this.SetPng(B,C,D);
B.style.position="absolute";
B.style.left=A+"px";
B.style.top=F+"px";
B.style.zIndex=E;
return B;
},MakePngW:function(D,A,E,B){var C=this.MakePng(D,A,E);
C.style.position="absolute";
this.SetPng(C,D);
C.style.left=A+"px";
C.style.top=E+"px";
C.width=B;
C.style.border="0 pt none";
return C;
},MakeGif:function(C,A,E,D){var B=__d.ce("img");
B.src=C;
B.style.position="absolute";
B.style.left=A+"px";
B.style.top=E+"px";
B.style.zIndex=D;
return B;
},load:function(B,E,D,C){var A=__d.ce("img");
A.onload=function(){if(A.width&&A.height){if(A.width>D||A.height>111){var F=D/C;
if(A.width/A.height>F){E.width=D;
E.height=Math.round(A.height*D/A.width);
}else{E.width=Math.round(A.width*C/A.height);
E.height=C;
}}}else{E.width=D;
E.height=C;
}E.src=A.src;
};
A.src=B;
}};
ask.util.MsgType=new function(){this.Debug=1;
this.Exception=2;
this.Warning=3;
this.Info=4;
};
ask.util.ConsoleLevel=new function(){this.None=0;
this.DebugOnly=1;
this.Exceptions=2;
this.WarningAndExceptions=3;
this.All=4;
};
if(!window.console){ask.util.Console=function(){var D=__d.ce("div");
D.style.width="100%";
D.style.color="white";
D.appendChild(__d.createTextNode("Maps Client Debug Output | "));
var C=__d.ce("a");
C.href="javascript:void(0);";
var B=this;
C.onclick=function(){B.clear();
};
C.innerHTML="Clear";
C.style.font="10pt monospace";
C.style.color="white";
D.appendChild(C);
D.style.font="10pt monospace";
D.style.border="1px solid black";
D.style.backgroundColor="#333300";
D.style.marginTop="5px";
D.className="noprint";
this.header=D;
var A=__d.ce("div");
A.style.width="100%";
A.style.height="200px";
A.style.font="10pt monospace";
A.style.border="1px solid gray";
A.style.backgroundColor="whitesmoke";
A.style.overflow="auto";
A.className="noprint";
this.enabled=false;
this.output=A;
this.level=ask.util.ConsoleLevel.All;
};
ask.util.Console.prototype={clear:function(A){this.output.innerHTML="";
},log:function(A){if(this.enabled){this.output.appendChild(__d.createTextNode(A));
this.output.appendChild(__d.ce("br"));
this.output.scrollTop=this.output.scrollTop+20;
}},write:function(C,B){if(this.enabled){B=B?B:ask.util.MsgType.Debug;
if(this.level>=B){var A=ask.util.MsgType;
switch(B){case A.Info:this.log("INFO: "+C);
break;
case A.Exception:this.log("EXCEPTION: "+C);
break;
case A.Debug:this.log("DEBUG: "+C);
break;
case A.Warning:this.log("WARNING: "+C);
break;
}}}}};
window.console=new ask.util.Console();
ask.util.Console={enable:function(){window.console.enabled=true;
__d.body.appendChild(window.console.header);
__d.body.appendChild(window.console.output);
}};
}else{window.console.enabled=false;
window.console.enable=function(){window.console.enabled=true;
};
window.console.level=ask.util.ConsoleLevel.All;
window.console.write=function(C,B){if(ask.util.Browser.isSafari||this.enabled){B=B?B:ask.util.MsgType.Debug;
if(this.level>=B){var A=ask.util.MsgType;
switch(B){case A.Info:this.log("INFO: "+C);
break;
case A.Exception:this.log("EXCEPTION: "+C);
break;
case A.Debug:this.log("DEBUG: "+C);
break;
case A.Warning:this.log("WARNING: "+C);
break;
}}}};
ask.util.Console={enable:function(){try{window.console.enable();
}catch(A){}}};
}function printfire(B){if(!ask.util.Browser.isSafari){try{if(console){console.write(B);
}}catch(A){}}}ask.util.QueryString=function(A){this.params=new Object();
if(A==null){A=location.search.substring(1,location.search.length);
}if(A.length==0){return ;
}A=A.replace(/\+/g," ");
var C=A.split("&");
for(var D=0;
D<C.length;
D++){var E;
var F=C[D].split("=");
var B=decodeURIComponent(F[0]);
if(F.length==2){E=decodeURIComponent(F[1]);
}else{E=B;
}this.params[B]=E;
}};
ask.util.QueryString.prototype={get:function(A,B){if(B==null){B=null;
}var C=this.params[A];
if(C==null){C=B;
}if(C&&C.replace){C=C.replace(/<.*?>/g,"");
}return C;
},contains:function(B){if("string"==typeof (B)){return(!("undefined"==typeof (this.params[B])||this.params[B]==null));
}for(var A=0;
A<B.length;
A++){if(this.get(B[A])){return true;
}}return false;
},replace:function(A,B){this.params[A]=B;
},remove:function(A){this.params[A]=null;
},toQueryString:function(){var A="";
for(var B in this.params){if("object"!=typeof this.params[B]&&"function"!=typeof this.params[B]){A+=B+"="+this.params[B]+"&";
}}return(A.length==0?"":A.substr(0,A.length-1));
}};
Object.prototype.clone=function(){var B=new Object(),A;
for(A in this){if(this[A]){if("object"==typeof this[A]){B[A]=this[A].clone();
}else{B[A]=this[A];
}}}return B;
};
ask.util.Dom={removeAllChildNodes:function(A){if(A){while(A.firstChild){A.removeChild(A.firstChild);
}}},appendStyle:function(F,B,A,C){var E;
if(__d.ce&&(E=__d.ce("style"))){E.type="text/css";
E.id=B;
if(typeof (E.media)=="string"){try{E.media=F;
}catch(D){}}else{E.media.mediaText=F;
}__d.getElementsByTagName("head").item(0).appendChild(E);
return E;
}},addRule:function(E,A,D){if(E){var F,C;
if(E["styleSheet"]){C=E.styleSheet;
}else{if(E["sheet"]){C=E.sheet;
}}var B=A+" { "+D+" } ";
if(C.insertRule){C.insertRule(B,0);
}else{if(C.addRule){C.addRule(A,D);
}}}},setRule:function(F,A,E,C){if(F){var G;
if(F["styleSheet"]){G=F.styleSheet.rules;
}else{if(F["sheet"]){G=F.sheet.cssRules;
}}var B=false;
if(G){for(var D=0;
D<G.length;
D++){if(G[D].selectorText.toUpperCase()==A.toUpperCase()){G[D].style[E]=C;
B=true;
break;
}}}if(!B){this.addRule(F,A,E+":"+C+";");
}}},getXY:function(C){if(C.parentNode===null||C.style.display=="none"){return false;
}var B=null;
var H=[];
var D;
if(C.getBoundingClientRect){D=C.getBoundingClientRect();
var E=__d.documentElement.scrollTop||__d.body.scrollTop;
var G=__d.documentElement.scrollLeft||__d.body.scrollLeft;
return[D.left+G,D.top+E];
}else{if(__d.getBoxObjectFor){D=__d.getBoxObjectFor(C);
H=[D.x,D.y];
}else{H=[C.offsetLeft,C.offsetTop];
B=C.offsetParent;
if(B!=C){while(B){H[0]+=B.offsetLeft;
H[1]+=B.offsetTop;
B=B.offsetParent;
}}var A=navigator.userAgent.toLowerCase();
if(A.indexOf("opera")!=-1||(A.indexOf("safari")!=-1&&C.style.position=="absolute")){H[1]-=__d.body.offsetTop;
}}}if(C.parentNode){B=C.parentNode;
}else{B=null;
}var F=(ask.util.Browser.isOpera&&a10&&a10.browser.version()<9.5);
while(B&&B.tagName!="BODY"&&B.tagName!="HTML"){if(!F||B.scrollLeft!=B.offsetLeft){H[0]-=B.scrollLeft;
}if(!F||B.scrollLeft!=B.offsetLeft){H[1]-=B.scrollTop;
}if(B.parentNode){B=B.parentNode;
}else{B=null;
}}return H;
},getX:function(A){return this.getXY(A)[0];
},getY:function(A){return this.getXY(A)[1];
},getElemDims:function(B){if(typeof (B)=="string"){B=__d.get(B);
}var A=[];
if(__d.defaultView){A[0]=parseInt(__d.defaultView.getComputedStyle(B,"").getPropertyValue("width"));
A[1]=parseInt(__d.defaultView.getComputedStyle(B,"").getPropertyValue("height"));
}else{A[0]=B.offsetWidth;
A[1]=B.offsetHeight;
}return A;
},convertRGBToHex:function(F){var B="00000000";
var C=/rgba?\((.+?)\)/.exec(F);
if(C&&C.length==2){B="";
var E=C[1].split(",");
for(var A=0;
A<3;
A++){var G=ask.util.Math.dec2hex(parseInt(E[A]));
B+=G.length==1?G+""+G:G;
}if(E[3]){var D=parseInt(E[3]*10);
D+=2;
B+=D+""+D;
}}return B;
},getOpacity:function(A){var B=1;
if(A){if(A.filters){try{B=A.filters.item("DXImageTransform.Microsoft.Alpha").opacity/100;
}catch(C){try{B=A.filters.item("alpha").opacity/100;
}catch(C){}}}else{B=A.style.opacity.toString().length>0?A.style.opacity:1;
}}return B;
},setOpacity:function(B,A){if(ask.util.Browser.isIE){B.style.filter=A>=100?"":"alpha(opacity="+A+")";
}else{B.style.opacity=A/100;
}},createTree:function(E,D){if(typeof E=="string"){return E?__d.ctn(E):null;
}if(E==null){return null;
}if(E.skip){return null;
}var C=__d.ce(E.tag);
if(D&&E.key){D[E.key]=C;
}if(E.attr){for(var B in E.attr){if(E.attr.hasOwnProperty(B)){if(typeof E.attr[B]=="string"){C[B]=E.attr[B];
}else{for(var A in E.attr[B]){if(E.attr[B].hasOwnProperty(A)){C[B][A]=E.attr[B][A];
}}}}}}if(E.kids){if(typeof E.kids=="object"&&E.kids instanceof Array){for(var B=0;
B<E.kids.length;
B++){var F=this.createTree(E.kids[B],D);
if(F){C.appendChild(F);
}}}else{var F=this.createTree(E.kids,D);
if(F){C.appendChild(F);
}}}return C;
},setTextEllipsed:function(E,G,B,D){if(typeof E=="string"){E=document.getElementById(E);
}if(E){D=D||true;
var F=document.createElement("span");
F.innerHTML=G;
E.appendChild(F);
var C=G.length-3;
var A=false;
while(F.offsetHeight>B&&C>4){F.innerHTML=G.substring(0,C)+"...";
C=C-3;
A=true;
}E.innerText=F.innerHTML;
if(A&&D){E.title=G;
}}},contains:function(A,C){var B=false;
do{if((B=A==C)){break;
}C=C.parentNode;
}while(C!=null);
return B;
},insertAfterSibling:function(C,A){var B=A.parentNode;
if(B.lastchild==A){B.appendChild(C);
}else{B.insertBefore(C,A.nextSibling);
}},insertBeforeSibling:function(C,A){var B=A.parentNode;
B.insertBefore(C,A.nextSibling);
}};
ask.util.Xml={serialize:function(B){var A="";
if(B){if(window.XMLSerializer){A=B.innerHTML?B.innerHTML:(new XMLSerializer()).serializeToString(B);
}else{A=B.innerHTML?B.innerHTML:B.xml;
}return A;
}},parseFromString:function(A,D){if(window.DOMParser){return(window.DOMParser.parseFromString(A,D));
}else{if(ask.util.Browser.isSafari){var B=new XMLHttpRequest();
B.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(A),false);
B.send(null);
return B.responseXML;
}else{if(ask.util.Browser.isIE){var C=new ActiveXObject("Microsoft.XMLDOM");
C.loadXML(A);
return C;
}}}}};
ask.util.Threading={waitFor:function(cond,expr,wait){wait=wait>0?wait:0;
if(eval(cond)){eval(expr);
}else{if(wait>0){setTimeout('ask.util.Threading.waitFor("'+cond+'","'+expr+'",'+(wait-250)+");",250);
}else{if(wait==0){eval(expr);
}}}}};
ask.util.Cookie={getCookie:function(D){var B=D+"=";
var F=B.length;
var A=document.cookie.length;
var E=0;
while(E<A){var C=E+F;
if(document.cookie.substring(E,C)==B){return this.getCookieVal(C);
}E=document.cookie.indexOf(" ",E)+1;
if(E==0){break;
}}return null;
},getCookieVal:function(B){var A=document.cookie.indexOf(";",B);
if(A==-1){A=document.cookie.length;
}return unescape(document.cookie.substring(B,A));
},setCookie:function(C,E){var A=this.setCookie.arguments;
var H=this.setCookie.arguments.length;
var B=(H>2)?A[2]:null;
var G=(H>3)?A[3]:null;
var D=(H>4)?A[4]:null;
var F=(H>5)?A[5]:false;
document.cookie=C+"="+escape(E)+((B==null)?"":("; expires="+B.toGMTString()))+((G==null)?"":("; path="+G))+((D==null)?"":("; domain="+D))+((F==true)?"; secure":"");
},delCookie:function(A){exp=new Date();
exp.setTime(exp.getTime()-(24*60*60*1000));
var B=this.getCookie(A);
B=(B==null)?"":B;
document.cookie=A+"="+B+"; expires="+exp.toGMTString();
}};
ask.util.Timer=function(){this.updateFunction=null;
this.startTime=null;
this.duration=null;
this.id=-1;
};
ask.util.Timer.prototype={start:function(F,C,E){this.stop();
this.startTime=(new Date()).getTime();
this.duration=C;
var B=E?E:40;
var D=this;
var A=function(){var G=Math.min(((new Date()).getTime()-D.startTime)/D.duration,1);
F(G);
D.id=G<1?window.setTimeout(arguments.callee,B):-1;
};
this.id=window.setTimeout(A,B);
this.updateFunction=A;
},update:function(){this.updateFunction();
},getTimeLeft:function(){return this.startTime+this.duration-(new Date()).getTime();
},stop:function(){if(this.id!=-1){window.clearTimeout(this.id);
this.id=-1;
}}};
ask.util.Dhtml={defaultColor:"#FFFFFF",editColor:"#FFFFFF",getEditBox:function(A,B,D,E){B=B?B:A.length*8;
var C=__d.ce("input");
C.dhtmlBox=true;
C.type="text";
C.style.border="1px solid "+ask.util.Dhtml.defaultColor;
C.style.backgroundColor=ask.util.Dhtml.defaultColor;
C.value=A;
C.style.width=B+"px";
C.style.cursor=ask.util.Browser.handCursor;
ask.util.Events.addListener(C,"mouseover",ask.util.Dhtml.editBoxOnMouseOver);
ask.util.Events.addListener(C,"click",ask.util.Dhtml.editBoxOnClick);
ask.util.Events.addListener(C,"mouseout",ask.util.Dhtml.editBoxOnMouseOut);
ask.util.Events.addListener(C,"blur",ask.util.Dhtml.editBoxOnBlur);
return C;
},editBoxOnMouseOver:function(B){var A=ask.util.Events.getTarget(B);
if(A.dhtmlBox){A.style.border="1px dotted black";
}},editBoxOnClick:function(B){var A=ask.util.Events.getTarget(B);
if(A.dhtmlBox){A.style.border="1px solid black";
A.style.backgroundColor=ask.util.Dhtml.editColor;
A.style.cursor=ask.util.Browser.defaultCursor;
}},editBoxOnMouseOut:function(B){var A=ask.util.Events.getTarget(B);
if(A.dhtmlBox){A.style.border="1px solid "+ask.util.Dhtml.defaultColor;
A.style.cursor=ask.util.Browser.handCursor;
}},editBoxOnBlur:function(B){var A=ask.util.Events.getTarget(B);
if(A.dhtmlBox){A.style.border="1px solid "+ask.util.Dhtml.defaultColor;
A.style.backgroundColor=ask.util.Dhtml.defaultColor;
A.style.cursor=ask.util.Browser.handCursor;
}},getDropDown:function(B,D){var C=__d.ce("div");
C.style.border="1px solid silver";
C.style.width="250px";
C.style.position="absolute";
if(ask.util.Browser.isIE){C.style.top="26px";
C.style.left="5px";
}C.style.display="none";
C.style.backgroundColor="#fff";
C.style.overflow="auto";
var A=__d.ce("span");
A.options=C;
A.titleText=__d.ce("span");
A.titleText.style.border="1px solid silver";
A.titleText.style.padding="1px";
A.titleText.style.cursor="default";
A.titleText.className="searchdd";
A.titleText.innerHTML=B;
A.onclick=function(){this.options.style.display=this.options.style.display=="none"?"":"none";
};
var E=__d.ce("img");
E.src=ask.local.UI.Defaults.SP+"down.png";
E.align="absmiddle";
A.appendChild(A.titleText);
A.appendChild(E);
A.appendChild(C);
return A;
}};
ask.util.Animator={fadeToTransparent:function(H,G,F,C,E){if(H){var D=0;
var B="";
for(var A=G;
A>=F;
A=A-C){B='var fo = __d.get("'+H.id+'");var curop = ask.util.Dom.getOpacity(fo)*100;';
B+="var op = Math.min(curop,"+A+");";
if(ask.util.Browser.isIE){B+='fo.style.filter="alpha(opacity="+op+")";';
}else{B+="if(curop>op) {fo.style.opacity= op/100;}";
}setTimeout(B,D);
D+=E;
}}},fadeToTransparentDefault:function(A){ask.util.Animator.fadeToTransparent(A,100,55,10,40);
},fadeToOpaque:function(H,G,F,C,E){if(H){var D=0;
var B="";
for(var A=G;
A<=F;
A=A+C){B='var fo = __d.get("'+H.id+'");var curop = ask.util.Dom.getOpacity(fo)*100;';
B+="var op = Math.max(curop,"+A+");";
if(ask.util.Browser.isIE){B+='fo.style.filter="alpha(opacity="+op+")";';
}else{B+="if(curop<op) {fo.style.opacity= op/100;}";
}setTimeout(B,D);
D+=E;
}D+=E;
if(ask.util.Browser.isIE){B+='__d.get("'+H.id+'").style.filter="";';
}else{if(ask.util.Browser.isGecko){B+='__d.get("'+H.id+'").style.opacity="";';
}else{B+='__d.get("'+H.id+'").style.opacity="";';
}}setTimeout(B,D);
}},fadeToOpaqueDefault:function(A){ask.util.Animator.fadeToOpaque(A,55,100,10,40);
},slideDown:function(H,A,D,E,G){if(H){var F=0;
var C="";
H.style.height=A+"px";
for(var B=A;
B<=D;
B=B+E){C='var fo = __d.get("'+H.id+'");var curht = fo.style.height;';
C+="if (curht != '') { var ht = Math.max(parseInt(curht),"+B+");";
C+="fo.style.height=ht + 'px';}";
setTimeout(C,F);
F+=G;
}}},slideUp:function(H,A,D,E,G){if(H){var F=0;
var C="";
H.style.height=A+"px";
for(var B=A;
B>=D;
B=B-E){C='var fo = __d.get("'+H.id+'");var curht = fo.style.height;';
C+="if (curht != '') { var ht = Math.min(parseInt(curht),"+B+");";
C+="fo.style.height=ht + 'px';}";
setTimeout(C,F);
F+=G;
}}}};
ask.util.Geometry={squeeze:function(E,B){if(!B||!B.length){return E;
}function A(H,I){var G=[];
if(ask.util.Geometry.intersectRects(H,I)){if(H.left<I.left){G.push({left:H.left,top:H.top,right:I.left,bottom:H.bottom});
}if(H.top<I.top){G.push({left:H.left,top:H.top,right:H.right,bottom:I.top});
}if(H.right>I.right){G.push({left:I.right,top:H.top,right:H.right,bottom:H.bottom});
}if(H.bottom>I.bottom){G.push({left:H.left,top:I.bottom,right:H.right,bottom:H.bottom});
}}else{G.push(H);
}return G;
}var D=A(E,B[0]);
var F={left:0,top:0,right:0,bottom:0};
for(var C=0;
C<D.length;
C++){E=ask.util.Geometry.squeeze(D[C],B.slice(1));
if(ask.util.Geometry.getRectArea(E)>ask.util.Geometry.getRectArea(F)){F=E;
}}return F;
},getRectArea:function(A){return ask.util.Geometry.isRectEmpty(A)?0:(A.right-A.left)*(A.bottom-A.top);
},isRectEmpty:function(A){return A.left>=A.right||A.top>=A.bottom;
},intersectRects:function(B,A){var C={left:Math.max(B.left,A.left),top:Math.max(B.top,A.top),right:Math.min(B.right,A.right),bottom:Math.min(B.bottom,A.bottom)};
return ask.util.Geometry.isRectEmpty(C)?null:C;
},det2:function(A){return A[0][0]*A[1][1]-A[0][1]*A[1][0];
},det3:function(A){return(A[0][0]*A[1][1]*A[2][2]+A[0][1]*A[1][2]*A[2][0]+A[0][2]*A[1][0]*A[2][1]-A[2][0]*A[1][1]*A[0][2]-A[2][1]*A[1][2]*A[0][0]-A[2][2]*A[1][0]*A[0][1]);
},ccw:function(C,B,A){return(ask.util.Geometry.det3([[1,C.x,C.y],[1,B.x,B.y],[1,A.x,A.y]]));
},sgn:function(A){return A<0?-1:A>0?1:0;
},segmentsIntersect:function(B,A,D,C){return(ask.util.Geometry.sgn(ask.util.Geometry.ccw(B,D,C))!=ask.util.Geometry.sgn(ask.util.Geometry.ccw(A,D,C))&&ask.util.Geometry.sgn(ask.util.Geometry.ccw(B,A,D))!=ask.util.Geometry.sgn(ask.util.Geometry.ccw(B,A,C)));
},isSimplePoly:function(A){for(var C=0;
C<A.length-3;
C++){for(var B=C+2;
B<A.length-1;
B++){if(ask.util.Geometry.segmentsIntersect(A[C],A[C+1],A[B],A[B+1])){return false;
}}}return true;
},polyArea:function(B){var A=0;
for(var C=0;
C<B.length-1;
C++){A+=B[C].x*B[C+1].y-B[C+1].x*B[C].y;
}return Math.abs(A/2);
}};
ask.util.General={equal:function(D,C){if(typeof D!=typeof C){return false;
}if(typeof D=="object"){if(D instanceof Array){if(!C instanceof Array){return false;
}if(D.length!=C.length){return false;
}for(var B=0;
B<D.length;
B++){if(!arguments.callee(D[B],C[B])){return false;
}}return true;
}var A=0;
for(var B in D){if(D.hasOwnProperty(B)){if(!C.hasOwnProperty(B)){return false;
}if(!arguments.callee(D[B],C[B])){return false;
}A++;
}}for(var B in C){if(C.hasOwnProperty(B)){A--;
}}return A==0;
}return D==C;
},find:function(A,D,C){if(!C){C=function(F,E){return F==E;
};
}for(var B=0;
B<A.length;
B++){if(C(A[B],D)){return B;
}}return -1;
},subclass:function(B,F,C){function A(){}A.prototype=F.prototype;
var E=new A();
E.constructor=B;
E.superClass=F;
E.superProto=F.prototype;
B.prototype=E;
if(C){for(var D in C){B.prototype[D]=C[D];
}}}};
function AjaxRequest(){var A=new Object();
A.timeout=null;
A.generateUniqueUrl=true;
A.url=window.location.href;
A.method="GET";
A.async=true;
A.username=null;
A.password=null;
A.parameters=new Object();
A.requestIndex=AjaxRequest.numAjaxRequests++;
A.responseReceived=false;
A.groupName=null;
A.queryString="";
A.responseText=null;
A.responseXML=null;
A.status=null;
A.statusText=null;
A.aborted=false;
A.xmlHttpRequest=null;
A.onTimeout=null;
A.onLoading=null;
A.onLoaded=null;
A.onInteractive=null;
A.onComplete=null;
A.onSuccess=null;
A.onError=null;
A.onGroupBegin=null;
A.onGroupEnd=null;
A.xmlHttpRequest=AjaxRequest.getXmlHttpRequest();
if(A.xmlHttpRequest==null){return null;
}A.xmlHttpRequest.onreadystatechange=function(){if(A==null||A.xmlHttpRequest==null){return ;
}if(A.xmlHttpRequest.readyState==1){A.onLoadingInternal(A);
}if(A.xmlHttpRequest.readyState==2){A.onLoadedInternal(A);
}if(A.xmlHttpRequest.readyState==3){A.onInteractiveInternal(A);
}if(A.xmlHttpRequest.readyState==4){A.onCompleteInternal(A);
}};
A.onLoadingInternalHandled=false;
A.onLoadedInternalHandled=false;
A.onInteractiveInternalHandled=false;
A.onCompleteInternalHandled=false;
A.onLoadingInternal=function(){if(A.onLoadingInternalHandled){return ;
}AjaxRequest.numActiveAjaxRequests++;
if(AjaxRequest.numActiveAjaxRequests==1&&typeof (window["AjaxRequestBegin"])=="function"){AjaxRequestBegin();
}if(A.groupName!=null){if(typeof (AjaxRequest.numActiveAjaxGroupRequests[A.groupName])=="undefined"){AjaxRequest.numActiveAjaxGroupRequests[A.groupName]=0;
}AjaxRequest.numActiveAjaxGroupRequests[A.groupName]++;
if(AjaxRequest.numActiveAjaxGroupRequests[A.groupName]==1&&typeof (A.onGroupBegin)=="function"){A.onGroupBegin(A.groupName);
}}if(typeof (A.onLoading)=="function"){A.onLoading(A);
}A.onLoadingInternalHandled=true;
};
A.onLoadedInternal=function(){if(A.onLoadedInternalHandled){return ;
}if(typeof (A.onLoaded)=="function"){A.onLoaded(A);
}A.onLoadedInternalHandled=true;
};
A.onInteractiveInternal=function(){if(A.onInteractiveInternalHandled){return ;
}if(typeof (A.onInteractive)=="function"){A.onInteractive(A);
}A.onInteractiveInternalHandled=true;
};
A.onCompleteInternal=function(){if(A.onCompleteInternalHandled||A.aborted){return ;
}A.onCompleteInternalHandled=true;
AjaxRequest.numActiveAjaxRequests--;
if(AjaxRequest.numActiveAjaxRequests==0&&typeof (window["AjaxRequestEnd"])=="function"){AjaxRequestEnd(A.groupName);
}A.responseReceived=true;
A.status=A.xmlHttpRequest.status;
A.statusText=A.xmlHttpRequest.statusText;
A.responseText=A.xmlHttpRequest.responseText;
A.responseXML=A.xmlHttpRequest.responseXML;
if(typeof (A.onComplete)=="function"){A.onComplete(A);
}if(A.xmlHttpRequest.status==200&&typeof (A.onSuccess)=="function"){A.onSuccess(A);
}else{if(typeof (A.onError)=="function"){A.onError(A);
}}if(A.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[A.groupName]--;
if(AjaxRequest.numActiveAjaxGroupRequests[A.groupName]==0&&typeof (A.onGroupEnd)=="function"){A.onGroupEnd(A.groupName);
}}delete A.xmlHttpRequest["onreadystatechange"];
A.xmlHttpRequest=null;
};
A.onTimeoutInternal=function(){if(A!=null&&A.xmlHttpRequest!=null&&!A.onCompleteInternalHandled){A.aborted=true;
A.xmlHttpRequest.abort();
AjaxRequest.numActiveAjaxRequests--;
if(AjaxRequest.numActiveAjaxRequests==0&&typeof (window["AjaxRequestEnd"])=="function"){AjaxRequestEnd(A.groupName);
}if(A.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[A.groupName]--;
if(AjaxRequest.numActiveAjaxGroupRequests[A.groupName]==0&&typeof (A.onGroupEnd)=="function"){A.onGroupEnd(A.groupName);
}}if(typeof (A.onTimeout)=="function"){A.onTimeout(A);
}delete A.xmlHttpRequest["onreadystatechange"];
A.xmlHttpRequest=null;
}};
A.process=function(){if(A.xmlHttpRequest!=null){if(ask.local.Proxy&&ask.local.Proxy.ProxyPath.length==0){if(ask.local.Defaults.CurrentHost!=ask.local.Defaults.AMX_HOST){printfire("EXCEPTION: Proxy needed to request cross-domain url: \n"+A.url);
return false;
}}if(A.generateUniqueUrl&&A.method=="GET"){A.parameters["random"]=new Date().getTime()+""+A.requestIndex;
}var C=null;
for(var B in A.parameters){if(B!="clone"&&B!="toJSONString"){if(A.queryString.length>0){A.queryString+="&";
}if(B=="fmt"){}else{A.queryString+=encodeURIComponent(B)+"="+encodeURIComponent(A.parameters[B]);
}}}if(A.method=="GET"){if(A.queryString.length>0){A.url+=((A.url.indexOf("?")>-1)?"&":"?")+A.queryString;
}}try{A.xmlHttpRequest.open(A.method,A.url,A.async);
if(A.method=="POST"){if(typeof (A.xmlHttpRequest.setRequestHeader)!="undefined"){A.xmlHttpRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
}C=A.queryString;
}if(A.timeout>0){setTimeout(A.onTimeoutInternal,A.timeout);
}A.xmlHttpRequest.send(C);
}catch(D){D=D.message?D.message:D;
printfire("EXCEPTION: Request failed for \n"+A.url+". \nReason: "+D);
}}};
A.handleArguments=function(D){for(var E in D){if(typeof (A[E])=="undefined"){A.parameters[E]=D[E];
}else{A[E]=D[E];
}}var B=new ask.util.QueryString();
var C=B.get("fmt","").replace(/\s/g,"+");
if(C.length>0){A.parameters["fmt"]=C;
}var F=B.get("ip","");
if(F.length>0){A.parameters["ip"]=F;
}};
A.getAllResponseHeaders=function(){if(A.xmlHttpRequest!=null){if(A.responseReceived){return A.xmlHttpRequest.getAllResponseHeaders();
}}};
A.getResponseHeader=function(B){if(A.xmlHttpRequest!=null){if(A.responseReceived){return A.xmlHttpRequest.getResponseHeader(B);
}}};
return A;
}AjaxRequest.getXmlHttpRequest=function(){if(window.XMLHttpRequest){return new XMLHttpRequest();
}else{if(window.ActiveXObject){try{return new ActiveXObject("Msxml2.XMLHTTP");
}catch(B){try{return new ActiveXObject("Microsoft.XMLHTTP");
}catch(A){return null;
}}}else{return null;
}}};
AjaxRequest.isActive=function(){return(AjaxRequest.numActiveAjaxRequests>0);
};
AjaxRequest.get=function(A){AjaxRequest.doRequest("GET",A);
};
AjaxRequest.post=function(A){AjaxRequest.doRequest("POST",A);
};
AjaxRequest.doRequest=function(C,A){if(typeof (A)!="undefined"&&A!=null){var B=new AjaxRequest();
B.method=C;
B.handleArguments(A);
B.process();
}};
AjaxRequest.numActiveAjaxRequests=0;
AjaxRequest.numActiveAjaxGroupRequests=new Object();
AjaxRequest.numAjaxRequests=0;

ask.util.SimpleBubble=function(D,C){if(!C){C={};
}var B=this.superConstants.BORDER_WIDTH;
D.style.position="absolute";
D.style.top=B+"px";
D.style.left=B+"px";
D.style.backgroundColor="#FFF";
var F=this.superConstants.SPRITE_HEIGHT-2*B;
this.maxHeight=(ask.util.Browser.isSafari2orLower?0:C.maxHeight)||F;
if(this.maxHeight>F){this.maxHeight=F;
}this.maxWidth=this.superConstants.SPRITE_WIDTH-2*B;
this.contentWidth=parseInt(D.style.width||0)||D.offsetWidth;
if(this.contentWidth>this.maxWidth){this.content.style.width=this.maxWidth+"px";
this.contentWidth=this.maxWidth;
}var A=this.container=__d.ce("div");
A.id="SimpleBubble"+ask.util.SimpleBubble.numInstances++;
A.style.position="absolute";
A.style.display="none";
A.style.zIndex=500;
__d.body.appendChild(A);
if(ask.util.Browser.isSafari){this.container.style.width=this.contentWidth+6+"px";
}D.id=D.id||(A.id+"Content");
this.preferredDirection=this.direction=C.preferredDirection||"";
A.appendChild(D);
this.superClass(A,D,this.contentWidth+B,this.maxHeight,"down",C.closable||false,C.onclose||null,B,0);
this.addBubbleConnUp();
this.connectorAlign=C.connectorAlign||"";
if(C.connectee){this.setConnectee(C.connectee);
}this.visibleOnHover=C.visibleOnHover;
if(this.visibleOnHover){this.keepVisibleOnHover(A);
}var E=function(G){ask.util.Events.stopPropagation(G);
};
ask.util.Events.addListener(__d,"mousedown",this.handleMouseDown,this,true);
this.noHideElements=[];
ask.util.Events.addListener(__d,"mousewheel",this.lower,this,true);
ask.util.Events.addListener(__d,"DOMMouseScroll",this.lower,this,true);
ask.util.Events.addListener(A,"mousewheel",E);
ask.util.Events.addListener(A,"DOMMouseScroll",E);
ask.util.Events.addListener(__d,"keyup",this.lower,this,true);
};
ask.util.SimpleBubble.numInstances=0;
ask.util.SimpleBubble.prototypeAdditions={superConstants:a10.bubble,constants:{connectorHorizOffset:42},setConnectee:function(A){if(this.connectee==A){return ;
}this.connectee=A;
this.connecteeWidth=this.connectee.offsetWidth;
this.connecteeHeight=this.connectee.offsetHeight;
this.anchorBubble(this.maxHeight);
if(this.visibleOnHover){this.keepVisibleOnHover(A);
}var B=function(C){ask.util.Events.stopPropagation(C);
};
ask.util.Events.addListener(A,"keyup",B);
},anchorBubble:function(I){this.connecteeXY=ask.util.Dom.getXY(this.connectee);
var A=this.superConstants.BORDER_WIDTH;
var G=this.contentWidth+2*A;
var C=this.connecteeXY[0]-A;
if(ask.util.Events._toLeftOfWindow(C)){C=0;
}else{var E=ask.util.Events._toRightOfWindow(C+G);
if(E){C-=E;
}}this.containerLeft=C;
var K=this.connecteeXY[0]-C;
if(this.connectorAlign=="right"){var J=parseInt(this.bubbleConn.style.width);
K+=this.connecteeWidth-J-this.constants.connectorHorizOffset+A;
}else{K+=this.constants.connectorHorizOffset-A;
}this.bubbleConn.style.left=K+"px";
this.bubbleConn2.style.left=K+"px";
var B=this.connecteeXY[1];
this.upBubbleYPos=B+this.connecteeHeight;
var H=ask.util.Events._belowWindowBottom(this.upBubbleYPos+this.bubbleHeight(I));
var D=ask.util.Events._aboveWindowTop(this.downBubbleYPos(I));
var F=this.preferredDirection;
if(this.preferredDirection=="up"){if(H&&!D){F="down";
}}else{if(this.preferredDirection=="down"){if(!D&&!H){F="up";
}}}this.direction=F;
},downBubbleYPos:function(B){var A=this.bubbleHeight(B);
var C=this.connecteeXY[1];
return C-A;
},bubbleHeight:function(B){var A=this.superConstants.BORDER_WIDTH;
return B+2*A;
},_raise:function(){if(this.container.style.display=="none"){this.container.style.display="";
this.anchorBubble(this.maxHeight);
}var E=0;
for(var B=0;
B<this.content.childNodes.length;
B++){var D=this.content.childNodes[B];
var C=ask.util.Browser.getElementStyle(D,"height");
if(isNaN(C)){C=D.offsetHeight;
if(!C&&D.clip&&D.clip.height){C=D.clip.height;
}}E+=parseInt(C||0);
}if(E>=this.maxHeight){this.content.style.overflowY="scroll";
E=this.maxHeight;
}else{this.content.style.overflowY="hidden";
E++;
}this.content.style.height=E+"px";
this.contentHeight=E;
var F;
if(this.direction=="up"){F=this.upBubbleYPos;
this.bubbleConn2.style.display="";
this.bubbleConn.style.display="none";
}else{if(this.direction=="down"){F=this.downBubbleYPos(E);
var A=this.superConstants.BORDER_WIDTH;
this.bubbleConn.style.top=(E+A+14)+"px";
this.bubbleConn.style.display="";
this.bubbleConn2.style.display="none";
}}this.container.style.top=F+"px";
this.container.style.left=this.containerLeft+"px";
this.superProto.redraw.call(this);
},handleMouseDown:function(C){if(this.container.style.display=="none"){return ;
}if(C){var B=ask.util.Events.getTarget(C);
if(B==this.content){return ;
}for(var A=0;
A<this.noHideElements.length;
A++){if(B==this.noHideElements[A]){return ;
}}}this.lower();
},noHideOnMousedown:function(A){this.noHideElements.push(A);
},keepVisibleOnHover:function(A){ask.util.Events.addListener(A,"mouseover",this.cancelLower,this,true);
ask.util.Events.addListener(A,"mouseout",function(){this.lower(200);
},this,true);
},raise:function(A){this.cancelLower();
this.cancelRaise();
if(!A){this._raise();
}else{var B=this;
this._raiseTmr=setTimeout(function(){B._raise();
},A);
}},lower:function(A){if(!A){this._lower();
}else{var B=this;
this._hideTmr=setTimeout(function(){B._lower();
},A);
}},_lower:function(){this.cancelRaise();
this.cancelLower();
this.container.style.display="none";
},cancelRaise:function(){this.cancelEvent("_raiseTmr");
},cancelLower:function(){this.cancelEvent("_hideTmr");
},cancelEvent:function(A){if(this[A]){clearTimeout(this[A]);
this[A]=null;
}},addBubbleConnUp:function(){this.bubbleConn2=document.createElement("div");
this.bubbleConn2.style.backgroundImage="url("+a10.bubble.SPRITE_URL+")";
this.bubbleConn2.style.backgroundPosition="-50px -328px";
this.bubbleConn2.style.top="-7px";
var A=34;
this.bubbleConn2.style.left=A+"px";
this.bubbleConn2.style.height="22px";
this.bubbleConn2.style.width="23px";
this.bubbleConn2.style.position="absolute";
this.container.appendChild(this.bubbleConn2);
a10.util.ie6PNGSpriteHack(this.bubbleConn2);
}};
ask.util.General.subclass(ask.util.SimpleBubble,a10.Bubble,ask.util.SimpleBubble.prototypeAdditions);

