if(!ask){var ask={};
}if(!ask.ui){ask.ui={};
}ask.ui.DialogBase=function(E,C,B,A){this.id=E;
this.title=C;
this.width=B;
this.options=A||{};
this.cover=null;
var D=this;
this.closeButtonHandler=this.options.closeButtonHandler||function(){D.hide();
};
this.windowResizedHandler=function(){D.windowResized();
};
this.windowScrolledHandler=function(){D.windowScrolled();
};
};
a10.util.extend(ask.ui.DialogBase,{JSP_PREFIX:"http://"+GlobalNav.Constants.askDomain+"/",SCRIPT_PREFIX:"inc/js/a11/dialogs/",RELATIVE:typeof GlobalNav.Constants.relative!="undefined"?GlobalNav.Constants.relative:true});
a10.util.extend(ask.ui.DialogBase.prototype,{show:function(){var A=this;
if(ask.closeAllPopUps){ask.closeAllPopUps();
}$("dialogTitle").innerHTML=this.title;
a10.event.addListener($("dialogCloseButton"),"click",this.closeButtonHandler);
a10.event.addListener(window,"resize",this.windowResizedHandler);
a10.event.addListener(window,"scroll",this.windowScrolledHandler);
$("dialogContent").style.padding=this.options.noDefaultPadding?"0":"";
},afterSwap:function(){if(a10.browser.isIE6()&&this.cover){this.cover.hide();
}if(a10.browser.isIE6()&&this.width){$("dialog").style.width=this.width+"px";
}this.centerDialog(true);
this.updateLightBoxCoverSize();
a10.element.show("lightboxCover");
a10.element.show("lightbox");
if(a10.browser.isIE6()){if(!this.cover){this.cover=new a10.IFrameCover("dialog");
}this.cover.show();
}if(this.options.focusOn){var A=a10.form.getElements(this.options.focusOn)[0];
try{A.focus();
}catch(B){}}if(this.options["onDisplay"]){this.options.onDisplay();
}},hide:function(){try{a10.event.removeListener($("dialogCloseButton"),"click",this.closeButtonHandler);
a10.event.removeListener(window,"resize",this.windowResizedHandler);
a10.event.removeListener(window,"scroll",this.windowScrolledHandler);
}catch(A){}$("dialogContent").style.padding="";
$("dialog").style.width="";
if(a10.browser.isIE6()&&this.cover){this.cover.hide();
}a10.element.hide("lightboxCover");
a10.element.hide("lightbox");
if(this.options&&this.options.onAfterClose){this.options.onAfterClose();
}},centerDialog:function(A){var D=a10.browser.innerDimension();
var C=$("lightbox");
if(C&&(C.style.display!="none"||A)){C.style.left=((D[0]/2)-(a10.element.getWidth(C)/2))+"px";
var B=(D[1]/2)-(a10.element.getHeight(C)/2);
if(a10.browser.isIE6()){B+=a10.util.scrollTop();
}if(B<0){B=0;
}C.style.top=B+"px";
if(a10.browser.isIE6()){if(this.cover){this.cover.reposition();
}}}},updateLightBoxCoverSize:function(){if(!a10.browser.isIE6()){return ;
}var I=$("lightboxCover");
var F=$("leftRail");
var E=$("midRail");
var A=$("rightRail");
var B;
if(F){var H=F.offsetTop+F.offsetHeight;
var D=E.offsetTop+E.offsetHeight;
var G=A.offsetTop+A.offsetHeight;
B=H;
if(D>B){B=D;
}if(G>B){B=G;
}if(a10.browser.isIE6()){B+=($("ask_header")?$("ask_header").offsetHeight*2:0);
}}else{if(E){var D=E.offsetTop+E.offsetHeight;
var G=A.offsetTop+A.offsetHeight;
B=Math.max(D,G)+(a10.browser.isIE6()&&$("top_search")?$("top_search").offsetHeight:0);
if(a10.browser.isIE6()){B+=($("ask_header")?$("ask_header").offsetHeight*2:0);
B+=($("navbar_search")?$("navbar_search").offsetHeight*2:0);
}}else{B=document.body.offsetHeight;
var C=document.documentElement.clientHeight;
if(C&&C>B){B=C;
}}}I.style.height=B+"px";
},windowResized:function(){this.updateLightBoxCoverSize();
this.centerDialog();
},windowScrolled:function(){if(a10.browser.isIE6()){this.centerDialog();
}}});
ask.ui.AjaxDialog=function(D,C,B,A){ask.ui.AjaxDialog.baseConstructor.call(this,D,C,B,A);
};
a10.util.subclass(ask.ui.AjaxDialog,ask.ui.DialogBase);
a10.util.extend(ask.ui.AjaxDialog.prototype,{show:function(){var D=this;
ask.ui.AjaxDialog.superClass.show.call(this);
var B=this.options.disableCache?"?cacheBuster="+new Date().getTime():"";
a10.ajax.get(ask.ui.DialogBase.JSP_PREFIX+this.id+B,C,A);
function C(E){$("dialogContent").innerHTML=E.responseText;
if(!D.options.nojs){if(!ask.ui.DialogBase.RELATIVE){a10.util.insertScript(ask.ui.DialogBase.JSP_PREFIX+ask.ui.DialogBase.SCRIPT_PREFIX+D.id+".js","modalDialogScript");
}else{a10.util.insertScript(ask.ui.DialogBase.SCRIPT_PREFIX+D.id+".js","modalDialogScript");
}if(D.options.js){for(var F=0;
F<D.options.js.length;
F++){a10.util.insertScript(D.options.js[F],"modalDialogScript");
}}}D.afterSwap();
}function A(E){alert("Failed to retrieve dialog contant: "+E.statusText);
}},hide:function(){if(this.options&&this.options.onClose&&!this.options.onClose()){return ;
}a10.util.removeElementsWithClass("modalDialogScript");
ask.ui.AjaxDialog.superClass.hide.call(this);
}});
ask.ui.Dialog=function(D,C,B,A){ask.ui.Dialog.baseConstructor.call(this,D,C,B,A);
};
a10.util.subclass(ask.ui.Dialog,ask.ui.DialogBase);
a10.util.extend(ask.ui.Dialog.prototype,{show:function(){ask.ui.Dialog.superClass.show.call(this);
$("dialogContent").innerHTML="";
$("dialogContent").appendChild($(this.id));
a10.element.show(this.id);
this.afterSwap();
},hide:function(){if(this.options&&this.options.onClose&&!this.options.onClose()){return ;
}var A=$("dialogContent").firstChild;
if(null!=A){a10.element.hide(A);
document.body.appendChild(A);
}if($("videoUI_rollover")&&$("videoUI_rollover").innerHTML&&($("videoUI_rollover").innerHTML.indexOf("embed")>-1)){$("videoUI_rollover").innerHTML='<embed wmode="window"'+$("videoUI_rollover").innerHTML.substring($("videoUI_rollover").innerHTML.indexOf("embed")+5);
}ask.ui.Dialog.superClass.hide.call(this);
}});
ask.ui.VideoDialog=function(E,C,B,A){this.id=E;
this.title=C;
this.width=B;
this.options=A||{};
this.cover=null;
var D=this;
this.closeButtonHandler=this.options.closeButtonHandler||function(){D.hide();
};
this.windowResizedHandler=function(){D.windowResized();
};
this.windowScrolledHandler=function(){D.windowScrolled();
};
this.clickHandler=function(G){if($("dialog").offsetHeight>0){D.signClicked=false;
}var F=G.clientX;
var H=G.clientY;
if(!a10.element.containsPoint($("videoUI_container"),F,H,false)&&D.wasClicked&&D.signClicked){D.hide();
}D.wasClicked=true;
if($("dialog").offsetHeight==0){D.signClicked=true;
}};
};
a10.util.extend(ask.ui.VideoDialog,{JSP_PREFIX:"http://"+GlobalNav.Constants.askDomain+"/",SCRIPT_PREFIX:"inc/js/a10f/dialogs/"});
a10.util.extend(ask.ui.VideoDialog.prototype,{show:function(A,K,E,J,C,I,D,P,H,O,M,G){var F=this;
this.wasClicked=false;
this.signClicked=true;
if(ask.closeAllPopUps){ask.closeAllPopUps();
}$("videoUI_dialog").innerHTML="";
$("videoUI_dialog").appendChild($(this.id));
$("videoUI_rollover").innerHTML="";
if(I){$("videoUI_channel").innerHTML=I;
$("videoUI_dash").innerHTML="-";
}else{$("videoUI_info").style.display="none";
$("videoUI_channel").style.display="none";
$("videoUI_dash").style.display="none";
}if(C){$("videoUI_date").innerHTML=M;
}else{$("videoUI_date").style.display="none";
}if(H){$("videoUI_duration").innerHTML=" - Duration:"+Math.floor(parseInt(H)/1000/60)+"'"+Math.floor(parseInt(H)/1000%60);
}else{$("videoUI_duration").style.display="none";
}if(O){$("videoUI_format").innerHTML=" - File Format:"+O;
}else{$("videoUI_format").style.display="none";
}if(G){if(navigator.userAgent.toLowerCase().indexOf("mac")&&a10.browser.isFirefox()){$("videoUI_rollover").innerHTML='<embed wmode="window"'+G.substring(G.indexOf("embed")+5);
}else{$("videoUI_rollover").innerHTML="<"+G;
}}if(J){$("videoUI_summary").innerHTML=J;
}else{$("videoUI_summary").style.display="none";
}var N="";
if(J){N=$("videoUI_emaildes").innerHTML+"<"+J+">\n"+$("videoUI_emailurl").innerHTML+"<"+E+">\n\n"+$("videoUI_emailend").innerHTML+"\n"+$("videoUI_emailcom").innerHTML;
}else{N=$("videoUI_emailurl").innerHTML+"<"+E+">\n\n"+$("videoUI_emailend").innerHTML+"\n"+$("videoUI_emailcom").innerHTML;
}$("videoUI_email").href="mailto:?subject="+encodeURIComponent($("videoUI_emailsubject").innerHTML+"<"+K+">")+"&body="+encodeURIComponent(N);
$("videoUI_embedText").value="<"+G;
$("videoUI_urlText").value=E;
$("videoUI_embed").style.display="none";
$("videoUI_url").style.display="none";
$("videoUI_dialogTitle").href=E;
if($("videoUI_save")&&$("videoUI_"+A)){$("videoUI_nosave").style.display="inline";
$("videoUI_save").onclick=function(){if($("videoUI_"+A)){$("videoUI_"+A).onclick();
$("videoUI_rollover").innerHTML='<embed wmode="transparent"'+G.substring(G.indexOf("embed")+5);
}sct(44071,$("videoUI_save"));
return false;
};
}else{$("videoUI_nosave").style.display="none";
}a10.event.addListener($("videoUI_dialogCloseButton"),"click",this.closeButtonHandler);
a10.event.addListener(window,"resize",this.windowResizedHandler);
a10.event.addListener(window,"scroll",this.windowScrolledHandler);
a10.event.addListener(document,"click",this.clickHandler);
a10.element.show(this.id);
this.afterSwap();
var B=Math.floor(($("videoUI_rollover").offsetWidth-28)/13);
var L=(K.length>B)?K.substring(0,B)+"...":K;
$("videoUI_dialogTitle").innerHTML=L;
},afterSwap:function(){if(a10.browser.isIE6()&&this.cover){this.cover.hide();
}if(a10.browser.isIE6()&&this.width){$("videoUI_dialog").style.width=this.width+"px";
}this.centerDialog(true);
this.updateLightBoxCoverSize();
a10.element.show("videoUI_lightboxCover");
a10.element.show("videoUI_lightbox");
$("videoUI_lightboxCover").style.zIndex=4000;
$("videoUI_lightbox").style.zIndex=4001;
$("videoUI_lightboxCover").style.position="fixed";
$("videoUI_lightbox").style.position="fixed";
if(a10.browser.isIE6()){$("videoUI_lightbox").style.position="absolute";
$("videoUI_lightboxCover").style.position="absolute";
if(!this.cover){this.cover=new a10.IFrameCover("videoUI_dialog");
}this.cover.show();
}if(this.options.focusOn){var A=a10.form.getElements(this.options.focusOn)[0];
try{A.focus();
}catch(B){}}},hide:function(){if(this.options&&this.options.onClose&&!this.options.onClose()){return ;
}var A=$("videoUI_dialog").firstChild;
a10.element.hide(A);
if(A){document.body.appendChild(A);
}a10.event.removeListener($("videoUI_dialogCloseButton"),"click",this.closeButtonHandler);
a10.event.removeListener(window,"resize",this.windowResizedHandler);
a10.event.removeListener(window,"scroll",this.windowScrolledHandler);
a10.event.removeListener(document,"click",this.clickHandler);
$("videoUI_dialog").style.width="";
if(a10.browser.isIE6()){this.cover.hide();
}a10.element.hide("videoUI_lightboxCover");
a10.element.hide("videoUI_lightbox");
if(this.options&&this.options.onAfterClose){this.options.onAfterClose();
}},centerDialog:function(A){var D=a10.browser.innerDimension();
var C=$("videoUI_lightbox");
if(C&&(C.style.display!="none"||A)){C.style.left=((D[0]/2)-(a10.element.getWidth(C)/2))+"px";
var B=(D[1]/2)-(a10.element.getHeight(C)/2);
if(a10.browser.isIE6()){B+=a10.util.scrollTop();
}if(B<0){B=0;
}C.style.top=B+"px";
if(a10.browser.isIE6()){if(this.cover){this.cover.reposition();
}}}},updateLightBoxCoverSize:function(){if(!a10.browser.isIE6()){return ;
}var H=$("videoUI_lightboxCover");
var G=$("leftRail");
var F=$("midRail");
var A=$("rightRail");
var E;
if(G){var B=G.offsetTop+G.offsetHeight;
var D=F.offsetTop+F.offsetHeight;
var C=A.offsetTop+A.offsetHeight;
E=B;
if(D>E){E=D;
}if(C>E){E=C;
}}else{E=document.body.scrollHeight;
}H.style.height=E+"px";
},windowResized:function(){this.updateLightBoxCoverSize();
this.centerDialog();
},windowScrolled:function(){if(a10.browser.isIE6()){this.updateLightBoxCoverSize();
this.centerDialog();
}}});
if(typeof dialogLoaded!="undefined"){dialogLoaded();
}function getURLParameter(C,B){C=C.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");
var A="[\\?&]"+C+"=([^&#]*)";
var E=new RegExp(A);
var D=E.exec(B);
if(D==null){return"";
}else{return D[1];
}}function showSkinDialog(){var A="";
if(getURLParameter("sas",window.location.href)=="true"){if(_isEraser=="true"){askerasersuppressDialog.show();
return false;
}else{A=Cookie.getCookie("sender_skin");
if(A!=null&&A!=""){if(A.indexOf("showapplysharedskinpopup")>0){skinfriendDialog.show();
}}}}}showSkinDialog();

