/*
 * Nitobi Complete UI 1.0
 * Copyright(c) 2008, Nitobi
 * support@nitobi.com
 * 
 * http://www.nitobi.com/license
 */
if(typeof (nitobi)=="undefined"||typeof (nitobi.lang)=="undefined"){
alert("The Nitobi framework source could not be found. Is it included before any other Nitobi components?");
}
nitobi.lang.defineNs("nitobi.callout");
if(false){
nitobi.callout=function(){
};
}
nitobi.callout.lastStyle="";
nitobi.callout.Callout=function(_1){
this.uid=Math.random().toString().replace(".","").replace("0","");
nitobi.callout.Callout.refs[nitobi.callout.Callout.refs.length]=this;
this.attributesTimer=null;
this.ver="1.11";
this.titlehtml="";
this.stylesheet="xp";
this.allowOffScreen=true;
if(_1!=null){
this.stylesheet=_1.toLowerCase();
}
this.Is=function(){
this.opera=false;
_2=navigator.userAgent.toLowerCase();
this.major=parseInt(navigator.appVersion);
this.minor=parseFloat(navigator.appVersion);
this.firefox=false;
if(navigator.userAgent.indexOf("Firefox")!=-1){
this.firefox=true;
}
this.ns=((_2.indexOf("mozilla")!=-1)&&(_2.indexOf("spoofer")==-1)&&(_2.indexOf("compatible")==-1)&&(_2.indexOf("opera")==-1)&&(_2.indexOf("webtv")==-1)&&(_2.indexOf("hotjava")==-1));
this.ns2=(this.ns&&(this.major==2));
this.ns3=(this.ns&&(this.major==3));
this.ns4=(this.ns&&(this.major==4));
this.ns6=(this.ns&&(this.major>=5));
this.ie=((_2.indexOf("msie")!=-1)&&(_2.indexOf("opera")==-1));
this.ie3=(this.ie&&(this.major<4));
this.ie4=(this.ie&&(this.major==4)&&(_2.indexOf("msie 4")!=-1));
this.ie5=(this.ie&&(this.major==4)&&(_2.indexOf("msie 5.")!=-1)&&(_2.indexOf("msie 5.5")==-1)&&(_2.indexOf("mac")==-1));
this.ie6=(this.ie&&(this.major==4)&&(_2.indexOf("msie 6.")!=-1));
this.ie7=(this.ie&&(this.major==4)&&(_2.indexOf("msie 7.0")!=-1));
if(_2.indexOf("opera")==0){
this.opera=true;
}
};
var _2=navigator.userAgent.toLowerCase();
if(_2.indexOf("opera")==0){
this.opera=true;
}
if(_2.indexOf("Firefox")!=-1){
this.firefox=true;
}
if(_2.indexOf("msie")==0){
this.ie=true;
}
this.HaltAttributes=false;
this.ContainerNames=Array();
this.Containers=Array();
this.MasterContainer=document.createElement("div");
this.MasterContainer.innerHTML="";
this.MasterContainer.setAttribute("id","ntbCalloutMasterContainer"+this.uid);
this.MasterContainer.object=this;
this.MasterContainer.style.position="absolute";
this.MasterContainer.style.top="0px";
this.MasterContainer.style.left="0px";
this.timerObject=null;
this.expireObj=null;
this.object=this;
this.absWidth=0;
this.absHeight=0;
this.zSpot=(nitobi.callout.Callout.refs.length*10)+1000000;
this.ondestroy=null;
this.onappear=null;
this.onScreenUpdate=null;
this.timeOut=-1;
this.x=0;
this.y=0;
this.ax=0;
this.ay=0;
this.width=0;
this.height=0;
this.MasterContainer.style.visibility="hidden";
this.MasterContainer.style.zIndex=this.zSpot.toString();
document.getElementsByTagName("body").item(0).appendChild(this.MasterContainer);
for(var t=0;t<6;t++){
this.ContainerNames[t]="ntbCalloutContainer"+t+"_"+this.uid;
this.Containers[t]=document.createElement("div");
this.Containers[t].innerHTML="";
this.Containers[t].setAttribute("id",this.ContainerNames[t]);
this.Containers[t].object=this;
this.MasterContainer.appendChild(this.Containers[t]);
this.Containers[t].style.position="absolute";
this.Containers[t].style.top="0px";
this.Containers[t].style.left="0px";
this.Containers[t].style.zIndex=this.zSpot.toString();
}
this.TitleElement="ntbCalloutTitle_"+this.uid;
this.TitleElement=document.createElement("div");
this.TitleElement.innerHTML="";
this.TitleElement.setAttribute("id","title"+this.uid);
this.TitleElement.object=this;
this.MasterContainer.appendChild(this.TitleElement);
this.TitleElement.style.position="absolute";
this.TitleElement.style.zIndex=(this.zSpot+1).toString();
this.TitleElement.style.visibility="visible";
this.TitleElement.style.display="block";
this.CloseElement="ntbCalloutClose_"+this.uid;
this.CloseElement=document.createElement("div");
this.CloseElement.innerHTML="";
this.CloseElement.setAttribute("id","close"+this.uid);
this.CloseElement.object=this;
this.MasterContainer.appendChild(this.CloseElement);
this.CloseElement.style.position="absolute";
this.CloseElement.style.zIndex=(this.zSpot+5).toString();
this.CloseElement.style.visibility="visible";
this.CloseElement.style.display="block";
this.CloseElement.className="ntb"+this.stylesheet+"Callout_close_off";
this.CloseElement.onmouseover=function(){
try{
var _4=this.className.replace("_off","_on");
this.className=_4;
}
catch(e){
}
};
this.CloseElement.onmouseout=function(){
try{
var _5=this.className.replace("_on","_off");
this.className=_5;
}
catch(e){
}
};
this.CloseElement.onmousedown=function(){
try{
var _6=this.className.replace("_on","_off");
this.className=_6;
}
catch(e){
}
};
var _7=this;
this.CloseElement.onmouseup=function(){
try{
var _8=this.className.replace("_off","_on");
this.className=_8;
}
catch(e){
}
_7.destroy();
return false;
};
this.CloseElement.onclick=function(){
return false;
};
this.BodyElement="ntbCalloutBody_"+this.uid;
this.BodyElement=document.createElement("div");
this.BodyElement.innerHTML="";
this.BodyElement.setAttribute("id","body"+this.uid);
this.BodyElement.object=this;
this.MasterContainer.appendChild(this.BodyElement);
this.BodyElement.style.position="absolute";
this.BodyElement.style.zIndex=(this.zSpot+4).toString();
this.BodyElement.style.visibility="visible";
this.BodyElement.style.display="block";
nitobi.callout.lastStyle=this.stylesheet;
this.StyleSheetUrl=nitobi.callout.Callout.getStyleSheetUrl();
this.setMode("INACTIVE");
this.CalloutMinWidth=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_minimums","width");
this.CalloutMinHeight=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_minimums","height");
this.CalloutContentWidth=200;
this.CalloutContentHeight=0;
if(this.CalloutContentWidth<this.CalloutMinWidth){
this.CalloutContentWidth=this.CalloutMinWidth;
}
if(this.CalloutContentHeight<this.CalloutMinHeight){
this.CalloutContentHeight=this.CalloutMinHeight;
}
this.CalloutDirection=0;
this.setCalloutDirection(1);
if(nitobi.callout.Callout.refs.length==1){
if(window.addEventListener){
window.addEventListener("scroll",nitobi.callout.Callout.update,false);
window.addEventListener("resize",nitobi.callout.Callout.update,false);
}else{
if(window.attachEvent){
window.attachEvent("onscroll",nitobi.callout.Callout.update);
window.attachEvent("onresize",nitobi.callout.Callout.update);
}
}
}
this.setTitle("");
this.bodyHTML="";
this.useBody=false;
this.setBody("");
this.effectName="APPEAR";
this.opacity=1;
this.setEffect("FADE");
this.setOpacity(0);
};
nitobi.callout.Callout.styleArray=Array();
nitobi.callout.Callout.ruleArray=Array();
nitobi.callout.Callout.globalStylesheet;
nitobi.callout.Callout.precachedImages=Array();
nitobi.callout.Callout.refs=Array();
nitobi.callout.Callout.permHeight=0;
nitobi.callout.Callout.permWidth=0;
nitobi.callout.Callout.globalStyleSheetName="nitobi.attention.css";
nitobi.callout.Callout.rewriteId=function(_9){
try{
document.getElementById(_9).id=_9;
}
catch(e){
try{
for(var i=0;i<document.forms.length;i++){
for(var b=0;b<document.forms[i].elements.length;b++){
if(document.forms[i].elements[b].name.toUpperCase()==_9.toUpperCase()){
document.forms[i].elements[b].id=_9;
}
}
}
}
catch(e){
}
}
};
nitobi.callout.Callout.update=function(){
var t,o;
for(t=0;t<nitobi.callout.Callout.refs.length;t++){
o=nitobi.callout.Callout.refs[t];
clearTimeout(o.timerObject);
o.timerObject=setTimeout("nitobi.callout.Callout.refs["+t+"].updateCallout()",150);
}
};
nitobi.callout.destroyAll=function(){
var t,o;
for(t=0;t<nitobi.callout.Callout.refs.length;t++){
o=nitobi.callout.Callout.refs[t];
o.destroy();
}
};
nitobi.callout.destroyLast=function(){
var t,o;
for(t=0;t<nitobi.callout.Callout.refs.length;t++){
o=nitobi.callout.Callout.refs[t];
}
try{
o.destroy();
}
catch(e){
}
};
nitobi.callout.Callout.prototype.setOnScreenUpdate=function(_12){
this.onScreenUpdate=_12;
};
nitobi.callout.Callout.prototype.setOnDestroy=function(_13){
this.ondestroy=_13;
};
nitobi.callout.Callout.prototype.setOnAppear=function(_14){
this.onappear=_14;
};
nitobi.callout.Callout.prototype.setExpire=function(_15){
this.timeOut=_15;
var ds=this;
this.expireObj=setTimeout(function(){
ds.destroy();
},_15);
};
nitobi.callout.Callout.prototype.setSize=function(_17,_18){
this.absWidth=_17;
this.absHeight=_18;
this.setTitle(this.titlehtml);
};
nitobi.callout.Callout.prototype.getPosition=function(){
return {x:this.ax,y:this.ay};
};
nitobi.callout.Callout.prototype.setEffect=function(_19){
this.effectName="FADE";
};
nitobi.callout.Callout.prototype.setTitle=function(_1a){
this.titlehtml=_1a;
if(_1a.length>0){
this.useTitle=true;
}else{
this.useTitle=false;
}
if(this.useTitle){
try{
this.TitleElement.style.visibility="visible";
this.TitleElement.className="ntb"+this.stylesheet+"Callout_titlediv"+this.CalloutDirection;
this.TitleElement.innerHTML=this.titlehtml;
if(this.CalloutContentWidth<this.TitleElement.offsetWidth+30){
this.CalloutContentWidth=this.TitleElement.offsetWidth+30;
}
this.setBody(this.bodyHTML);
}
catch(e){
}
}else{
this.TitleElement.style.visibility="visible";
this.TitleElement.innerHTML="&nbsp;";
}
if(!this.HaltAttributes){
this.assignAttributes();
}
};
nitobi.callout.Callout.prototype.setBody=function(_1b){
try{
this.bodyHTML=_1b;
var _1c=_1b.replace(/(<([^>]+)>)/ig,"");
var _1d=_1c.length;
if(_1b.length>0){
this.useBody=true;
}else{
this.useBody=false;
}
if(this.useBody){
this.BodyElement.style.visibility="visible";
if(this.CalloutContentWidth<((_1d/12)*nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_extender","width"))){
this.CalloutContentWidth=(_1d/12)*nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_extender","width");
}
this.BodyElement.style.width=this.CalloutContentWidth+"px";
this.BodyElement.className="ntb"+this.stylesheet+"Callout_bodydiv"+this.CalloutDirection;
this.BodyElement.innerHTML=_1b;
if(this.useTitle==false){
this.BodyElement.style.top=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"top")+"px";
this.BodyElement.style.left=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"left")+"px";
this.BodyElement.style.marginTop="";
this.CalloutContentHeight=this.BodyElement.offsetHeight+nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"top");
this.CalloutContentHeight-=parseInt(this.TitleElement.offsetHeight);
}else{
this.BodyElement.style.top="";
this.BodyElement.style.left="";
var _1e=parseInt(nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_titleOffset","top"));
if(isNaN(_1e)){
_1e=0;
}
this.CalloutContentHeight=this.BodyElement.offsetHeight+parseInt(nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"top"))+_1e;
}
}else{
this.BodyElement.style.visibility="hidden";
}
if((this.absWidth>0)||(this.absHeight>0)){
this.CalloutContentWidth=this.absWidth+nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"left");
this.CalloutContentHeight=this.absHeight+nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"top");
}
if(!this.HaltAttributes){
this.assignAttributes();
}
}
catch(e){
}
};
nitobi.callout.Callout.prototype.setCalloutDirection=function(_1f){
var _20=this.titlehtml;
if(_1f!=this.CalloutDirection){
this.CalloutDirection=_1f;
this.setTitle(_20);
if(!this.HaltAttributes){
this.assignAttributes();
}
}
};
nitobi.callout.Callout.prototype.updateCallout=function(){
if(this.mode=="ATTACHELEMENT"){
this.attachToElement(this.lastID);
}
};
nitobi.callout.Callout.prototype.assignAttributes=function(_21){
var t,_23,_24,_25=0;
var _26,_27=0;
try{
for(t=0;t<6;t++){
this.Containers[t].style.display="none";
this.Containers[t].style.width="";
this.Containers[t].style.height="";
this.Containers[t].style.top="0px";
this.Containers[t].style.left="0px";
}
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"width");
_27=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"height");
var _28=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_closeoffset"+this.CalloutDirection,"left");
var _29=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_closeoffset"+this.CalloutDirection,"top");
this.CalloutContentWidth+=_26;
this.CalloutContentHeight+=_27;
if(this.CalloutDirection==0){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_23=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_right","width");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tl_br_plain","width");
this.width=_23+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tl_br_plain","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_bl_main";
this.Containers[0].style.top="0px";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_bl_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_bl_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=this.CalloutContentHeight+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_bl_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bottom_plain";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bottom_plain");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_tl_br_plain";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_tl_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_28)+"px";
this.CloseElement.style.top=_29+"px";
}
if(this.CalloutDirection==1){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_23=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_right","width");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_bottom","width");
this.width=_23+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_bottom","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_bl_main";
this.Containers[0].style.top="0px";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_bl_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_bl_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=this.CalloutContentHeight+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_bl_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bottom_plain";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bottom_plain");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_br_bottom";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_br_bottom");
this.CloseElement.style.left=(this.CalloutContentWidth+_28)+"px";
this.CloseElement.style.top=_29+"px";
}
if(this.CalloutDirection==2){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_23=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_right","width");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_plain","width");
this.width=_23+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_bottom","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_bl_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_bl_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_bl_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=this.CalloutContentHeight+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_bl_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bl_bottom";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bl_bottom");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_br_plain";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_28)+"px";
this.CloseElement.style.top=_29+"px";
}
if(this.CalloutDirection==3){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_23=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tl_right","width");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_plain","width");
this.width=_23+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bottom_plain","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_tl_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_tl_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_tl_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=this.CalloutContentHeight+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_tl_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bottom_plain";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bottom_plain");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_tl_br_plain";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_tl_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_28)+"px";
this.CloseElement.style.top=_29+"px";
}
if(this.CalloutDirection==4){
for(t=0;t<6;t++){
this.Containers[t].style.display="block";
}
_23=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_right","width");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_topright","width");
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_topleft","height");
this.width=_23+this.CalloutContentWidth;
this.height=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_topleft","height")+nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bottom_plain","height")+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[4].className="ntb"+this.stylesheet+"Callout_tr_topleft";
this.Containers[4].style.left="0px";
this.Containers[4].style.top="0px";
this.Containers[4].style.width=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.swapIEPNG(4,"ntb"+this.stylesheet+"Callout_tr_topleft");
this.Containers[5].className="ntb"+this.stylesheet+"Callout_tr_topright";
this.Containers[5].style.left=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[5].style.top="0px";
this.swapIEPNG(5,"ntb"+this.stylesheet+"Callout_tr_topright");
this.Containers[0].className="ntb"+this.stylesheet+"Callout_tr_mainpart";
this.Containers[0].style.top=_25+"px";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=(this.CalloutContentHeight-_25)+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_tr_mainpart");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_plain","width");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_tr_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=(this.CalloutContentHeight-_25)+"px";
this.Containers[1].style.top=_25+"px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_tr_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_bottom_plain";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[2].style.top=(this.CalloutContentHeight-_25)+_25+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_bottom_plain");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_tl_br_plain";
this.Containers[3].style.left=(this.CalloutContentWidth+parseInt(_23)-parseInt(_24))+"px";
this.Containers[3].style.top=(this.CalloutContentHeight-_25)+_25+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_tl_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_28)+"px";
this.CloseElement.style.top=_29+"px";
}
if(this.CalloutDirection==5){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_23=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lt_br","height");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lt_bottom","height");
this.width=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lt_right","width")+this.CalloutContentWidth;
this.height=_24+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_lt_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_lt_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_lt_bottom";
this.Containers[1].style.left="0px";
this.Containers[1].style.width=this.CalloutContentWidth+"px";
this.Containers[1].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_lt_bottom");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_lt_right";
this.Containers[2].style.left=this.CalloutContentWidth+"px";
this.Containers[2].style.height=(this.CalloutContentHeight+_24-_23)+"px";
this.Containers[2].style.top="0px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_lt_right");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_lt_br";
this.Containers[3].style.left=(this.CalloutContentWidth)+"px";
this.Containers[3].style.top=(this.CalloutContentHeight+_24-_23)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_lt_br");
this.CloseElement.style.left=(this.CalloutContentWidth+_28)+"px";
this.CloseElement.style.top=_29+"px";
}
if(this.CalloutDirection==6){
for(t=0;t<6;t++){
this.Containers[t].style.display="block";
}
_23=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_left","width");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_lb","height");
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_bottom","height");
this.width=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_right","width")+_23+this.CalloutContentWidth;
this.height=_25+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[4].className="ntb"+this.stylesheet+"Callout_lb_left";
this.Containers[4].style.left="0px";
this.Containers[4].style.top="0px";
this.Containers[4].style.height=(this.CalloutContentHeight+_25-_24)+"px";
this.swapIEPNG(4,"ntb"+this.stylesheet+"Callout_lb_left");
this.Containers[5].className="ntb"+this.stylesheet+"Callout_lb_lb";
this.Containers[5].style.left="0px";
this.Containers[5].style.top=(this.CalloutContentHeight+_25-_24)+"px";
this.swapIEPNG(5,"ntb"+this.stylesheet+"Callout_lb_lb");
this.Containers[0].className="ntb"+this.stylesheet+"Callout_lb_main";
this.Containers[0].style.top="0px";
this.Containers[0].style.left=_23+"px";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_lb_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_lb_bottom";
this.Containers[1].style.left=_23+"px";
this.Containers[1].style.width=this.CalloutContentWidth+"px";
this.Containers[1].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_lb_bottom");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_br","height");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_lb_right";
this.Containers[2].style.left=(_23+this.CalloutContentWidth)+"px";
this.Containers[2].style.top="0px";
this.Containers[2].style.height=(this.CalloutContentHeight+_25-_24)+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_lb_right");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_lb_br";
this.Containers[3].style.left=(_23+this.CalloutContentWidth)+"px";
this.Containers[3].style.top=(this.CalloutContentHeight+_25-_24)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_lb_br");
this.CloseElement.style.left=(this.CalloutContentWidth+_28)+"px";
this.CloseElement.style.top=_29+"px";
}
if(this.CalloutDirection==7){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_23=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_bottom","height");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rt_br","height");
this.width=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rt_right","width")+this.CalloutContentWidth;
this.height=_24+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_rb_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_rb_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_rt_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=(this.CalloutContentHeight+_23-_24)+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_rt_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_rb_bottom";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=this.CalloutContentWidth+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_rb_bottom");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_rt_br";
this.Containers[3].style.left=this.CalloutContentWidth+"px";
this.Containers[3].style.top=(this.CalloutContentHeight+_23-_24)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_rt_br");
this.CloseElement.style.left=(this.CalloutContentWidth+_28)+"px";
this.CloseElement.style.top=_29+"px";
}
if(this.CalloutDirection==8){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_23=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_bottom","height");
_24=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_rb","height");
this.width=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_right","width")+this.CalloutContentWidth;
this.height=_24+this.CalloutContentHeight;
this.MasterContainer.style.width=this.width;
this.MasterContainer.style.height=this.height;
this.Containers[0].className="ntb"+this.stylesheet+"Callout_rb_main";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=this.CalloutContentHeight+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_rb_main");
this.Containers[1].className="ntb"+this.stylesheet+"Callout_rb_right";
this.Containers[1].style.left=this.CalloutContentWidth+"px";
this.Containers[1].style.height=(this.CalloutContentHeight+_23-_24)+"px";
this.Containers[1].style.top="0px";
this.swapIEPNG(1,"ntb"+this.stylesheet+"Callout_rb_right");
this.Containers[2].className="ntb"+this.stylesheet+"Callout_rb_bottom";
this.Containers[2].style.left="0px";
this.Containers[2].style.width=this.CalloutContentWidth+"px";
this.Containers[2].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(2,"ntb"+this.stylesheet+"Callout_rb_bottom");
this.Containers[3].className="ntb"+this.stylesheet+"Callout_rb_rb";
this.Containers[3].style.left=this.CalloutContentWidth+"px";
this.Containers[3].style.top=(this.CalloutContentHeight+_23-_24)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_rb_rb");
this.CloseElement.style.left=(this.CalloutContentWidth+_28)+"px";
this.CloseElement.style.top=_29+"px";
}
this.CalloutContentWidth-=_26;
this.CalloutContentHeight-=_27;
this.moveTo(this.ax,this.ay);
}
catch(e){
}
};
nitobi.callout.Callout.prototype.swapIEPNG=function(_2a,_2b){
this.Is();
if((this.ie)&&(!this.ie7)){
this.Containers[_2a].style.backgroundImage="none";
this.Containers[_2a].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.StyleSheetUrl+nitobi.callout.Callout.readClassAttribute(_2b,"backgroundImage")+"', sizingMethod='crop');";
}else{
this.Containers[_2a].style.filter="";
}
};
nitobi.callout.Callout.prototype.setOpacity=function(_2c){
this.opacity=_2c;
var _2d=false;
if(this.ie7){
if(_2c==0){
this.BodyElement.style.opacity=0;
this.BodyElement.style.filter="alpha(opacity=0)";
this.CloseElement.style.opacity=0;
this.CloseElement.style.filter="alpha(opacity=0)";
}else{
_2d=true;
}
}
try{
if(_2c==1){
this.MasterContainer.style.filter="";
this.MasterContainer.style.opacity=_2c;
}else{
this.MasterContainer.style.opacity=this.opacity;
this.MasterContainer.style.filter="alpha(opacity="+(this.opacity*100)+")";
this.BodyElement.style.opacity=this.opacity;
this.BodyElement.style.filter="alpha(opacity="+(this.opacity*100)+")";
this.CloseElement.style.opacity=this.opacity;
this.CloseElement.style.filter="alpha(opacity="+(this.opacity*100)+")";
}
}
catch(e){
}
if(_2d){
try{
this.MasterContainer.style.filter="";
}
catch(e){
}
}
};
nitobi.callout.Callout.prototype.fadeIn=function(){
if(!this.ie7){
var _2e=this;
var _2f=this.opacity+0.1;
if(_2f>1){
_2f=1;
}
if(this.opacity<0.95){
this.setOpacity(_2f);
setTimeout(function(){
_2e.fadeIn();
},50);
}else{
this.setOpacity(1);
if(this.onappear!=null){
this.onappear.call();
}
}
}else{
this.setOpacity(0.99);
this.setOpacity(1);
if(this.onappear!=null){
this.onappear.call();
}
}
};
nitobi.callout.Callout.prototype.fadeOut=function(_30){
if(!this.ie7){
var _31=this;
var _32=this.opacity-0.1;
if(_32<0){
_32=0;
}
if(this.opacity>0.05){
this.setOpacity(_32);
setTimeout(function(){
_31.fadeOut(_30);
},50);
}else{
this.setOpacity(0);
eval(_30);
}
}else{
this.setOpacity(0);
eval(_30);
}
};
nitobi.callout.Callout.prototype.show=function(){
if(this.effectName=="APPEAR"){
this.MasterContainer.style.visibility="visible";
if(this.onappear!=null){
this.onappear.call();
}
}
if(this.effectName=="FADE"){
try{
this.MasterContainer.style.visibility="visible";
this.setOpacity(0);
this.fadeIn();
}
catch(e){
}
}
if(this.mode=="ATTACHELEMENT"){
this.attachToElement(this.lastID);
}
};
nitobi.callout.Callout.prototype.hide=function(){
if(this.effectName=="APPEAR"){
this.MasterContainer.style.visibility="hidden";
}
if(this.effectName=="FADE"){
this.fadeOut();
}
};
nitobi.callout.Callout.getStyleSheetUrl=function(){
if(nitobi.callout.Callout.globalStylesheet==null){
var _33=nitobi.html.Css.getRule("ntb"+nitobi.callout.lastStyle);
nitobi.callout.Callout.globalStylesheet=nitobi.html.Css.getPath(_33.parentStyleSheet);
return nitobi.callout.Callout.globalStylesheet;
}else{
return nitobi.callout.Callout.globalStylesheet;
}
};
nitobi.callout.Callout.prototype.setMode=function(_34){
if(this.mode!=_34){
this.mode=_34;
}
};
nitobi.callout.Callout.prototype._destroy=function(){
try{
this.MasterContainer.style.display="none";
for(var t=0;t<6;t++){
this.Containers[t].parentNode.removeChild(this.Containers[t]);
this.Containers[t]=null;
}
this.MasterContainer.parentNode.removeChild(this.MasterContainer);
this.TitleElement.parentNode.removeChild(this.TitleElement);
this.TitleElement=null;
this.CloseElement.parentNode.removeChild(this.CloseElement);
this.CloseElement=null;
this.MasterContainer=null;
}
catch(e){
}
this.setMode("INACTIVE");
var _36=false;
for(var t=0;t<nitobi.callout.Callout.refs.length;t++){
if(nitobi.callout.Callout.refs[t].uid!=null){
_36=true;
}
}
if(_36==false){
if(window.addEventListener){
window.removeEventListener("scroll",nitobi.callout.Callout.update,false);
window.removeEventListener("resize",nitobi.callout.Callout.update,false);
}else{
if(window.attachEvent){
window.detachEvent("onscroll",nitobi.callout.Callout.update);
window.detachEvent("onresize",nitobi.callout.Callout.update);
}
}
nitobi.callout.Callout.refs.length=0;
}
this.BodyElement=null;
try{
document.getElementById("body"+this.uid).parentNode.removeChild(document.getElementById("body"+this.uid));
}
catch(e){
}
this.uid=null;
if(this.ondestroy!=null){
this.ondestroy.call();
this.ondestroy=null;
}
for(var _37 in this){
this[_37]=null;
delete this[_37];
}
};
nitobi.callout.Callout.prototype.destroy=function(){
clearTimeout(this.expireObj);
if(this.effectName=="APPEAR"){
this._destroy();
}
if(this.effectName=="FADE"){
this.fadeOut("this._destroy();");
}
};
nitobi.callout.Callout.readClassAttribute=function(_38,_39){
var b,c,d,e;
e=nitobi.callout.Callout.styleArray[_38+_39];
if(typeof (e)=="undefined"){
if(typeof (nitobi.callout.Callout.ruleArray[_38])=="undefined"){
var _3e=nitobi.html.Css.getRule(_38);
nitobi.callout.Callout.ruleArray[_38]=_3e;
}else{
var _3e=nitobi.callout.Callout.ruleArray[_38];
}
if(_3e&&_3e.selectorText.toLowerCase().indexOf(_38.toLowerCase())>-1){
if(_39.toLowerCase()=="backgroundimage"){
nitobi.callout.Callout.styleArray[_38+_39]=_3e.style.backgroundImage.replace("url","").replace("(","").replace(")","");
return nitobi.callout.Callout.styleArray[_38+_39];
}
if(_39.toLowerCase()=="width"){
nitobi.callout.Callout.styleArray[_38+_39]=parseInt(_3e.style.width.replace("px",""));
return nitobi.callout.Callout.styleArray[_38+_39];
}
if(_39.toLowerCase()=="height"){
nitobi.callout.Callout.styleArray[_38+_39]=parseInt(_3e.style.height.replace("px",""));
return nitobi.callout.Callout.styleArray[_38+_39];
}
if(_39.toLowerCase()=="left"){
nitobi.callout.Callout.styleArray[_38+_39]=parseInt(_3e.style.left.replace("px",""));
return nitobi.callout.Callout.styleArray[_38+_39];
}
if(_39.toLowerCase()=="top"){
nitobi.callout.Callout.styleArray[_38+_39]=parseInt(_3e.style.top.replace("px",""));
return nitobi.callout.Callout.styleArray[_38+_39];
}
}
}else{
return nitobi.callout.Callout.styleArray[_38+_39];
}
};
nitobi.callout.Callout.getCoords=function(_3f){
var ew,eh;
if(_3f==null){
var lx,ly=0;
var cc=nitobi.callout.Callout.getScrollPosition();
lx=cc.scrollLeft+(cc.clientWidth/2);
ly=cc.scrollTop+(cc.clientHeight/2);
ew=10;
eh=10;
}else{
try{
var _45=_3f;
ew=_3f.offsetWidth;
eh=_3f.offsetHeight;
for(var lx=0,ly=0;_3f!=null;lx+=_3f.offsetLeft,ly+=_3f.offsetTop,_3f=_3f.offsetParent){
}
for(;_45!=document.body;lx-=_45.scrollLeft,ly-=_45.scrollTop,_45=_45.parentNode){
}
}
catch(e){
}
}
return {x:lx,y:ly,h:eh,w:ew};
};
nitobi.callout.Callout.getCoordsAlt=function(_46){
if(!_46&&this){
_46=this;
}
try{
var _47=_46.offsetLeft;
var _48=_46.offsetTop;
var _49=_46.offsetParent;
}
catch(e){
}
while(_49!=null){
try{
_47+=_49.offsetLeft;
_48+=_49.offsetTop;
_49=_49.offsetParent;
}
catch(e){
}
}
var myh=_46.offsetHeight;
var myw=_46.offsetWidth;
if(_46==null){
var _47,_48=0;
var cc=nitobi.callout.Callout.getScrollPosition();
_47=cc.scrollLeft+(cc.clientWidth/2);
_48=cc.scrollTop+(cc.clientHeight/2);
myh=0;
myw=0;
}
return {x:_47,y:_48,h:myh,w:myw};
};
nitobi.callout.Callout.prototype.getXY=function(){
return {x:this.ax,y:this.ay};
};
nitobi.callout.Callout.prototype.moveTo=function(x,y){
x=parseFloat(x);
y=parseFloat(y);
this.ax=x;
this.ay=y;
var _4f=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"left");
var _50=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"top");
try{
if(this.CalloutDirection==0){
this.MasterContainer.style.top=(y-this.height/2)+"px";
this.MasterContainer.style.left=(x-this.width/2)+"px";
}
if(this.CalloutDirection==1){
this.MasterContainer.style.top=(y-this.height+_50)+"px";
this.MasterContainer.style.left=(x-this.width+_4f)+"px";
}
if(this.CalloutDirection==2){
this.MasterContainer.style.top=(y-this.height+_50)+"px";
this.MasterContainer.style.left=(x+_4f)+"px";
}
if(this.CalloutDirection==3){
this.MasterContainer.style.top=(y+_50)+"px";
this.MasterContainer.style.left=(x+_4f)+"px";
}
if(this.CalloutDirection==4){
this.MasterContainer.style.top=(y+_50)+"px";
this.MasterContainer.style.left=(x-this.width+_4f)+"px";
}
if(this.CalloutDirection==5){
this.MasterContainer.style.top=(y+_50)+"px";
this.MasterContainer.style.left=(x+_4f)+"px";
}
if(this.CalloutDirection==6){
this.MasterContainer.style.top=(y-this.height+_50)+"px";
this.MasterContainer.style.left=(x+_4f)+"px";
}
if(this.CalloutDirection==7){
this.MasterContainer.style.top=(y+_50)+"px";
this.MasterContainer.style.left=(x-this.width+_4f)+"px";
}
if(this.CalloutDirection==8){
this.MasterContainer.style.top=(y-this.height+_50)+"px";
this.MasterContainer.style.left=(x-this.width+_4f)+"px";
}
}
catch(e){
}
if(this.allowOffScreen==false){
try{
if(parseInt(this.MasterContainer.style.top.replace("px",""))<0){
this.MasterContainer.style.top="0px";
}
if(parseInt(this.MasterContainer.style.left.replace("px",""))<0){
this.MasterContainer.style.left="0px";
}
}
catch(e){
}
}
};
nitobi.callout.Callout.getScrollPosition=function(){
var _51,_52,_53,_54=0;
if((this.opera==false)&&(document.documentElement.scrollTop>0)){
_51=document.documentElement.scrollTop;
_52=document.documentElement.scrollLeft;
_53=document.documentElement.clientWidth;
_54=document.documentElement.clientHeight;
}else{
_51=document.body.scrollTop;
_52=document.body.scrollLeft;
_53=document.body.clientWidth;
_54=document.body.clientHeight;
}
if((document.body.clientHeight>0)&&(document.documentElement.clientHeight>0)&&(document.body.clientHeight<document.documentElement.clientHeight)){
_53=document.body.clientWidth;
_54=document.body.clientHeight;
}
if((document.body.clientHeight>0)&&(document.documentElement.clientHeight>0)&&(document.body.clientHeight>document.documentElement.clientHeight)){
_53=document.documentElement.clientWidth;
_54=document.documentElement.clientHeight;
}
if((nitobi.callout.Callout.permHeight==0)||(nitobi.callout.Callout.permWidth==0)){
var _55=navigator.userAgent.toLowerCase();
if(_55.indexOf("opera")==0){
var _56=true;
}
var ie=false;
if(_55.indexOf("ie")>0){
ie=true;
}
var _58=document.createElement("div");
_58.innerHTML="";
_58.setAttribute("id","ntbHeightDiv");
_58.object=this;
_58.style.position="relative";
_58.style.width="100%";
_58.style.height="1px";
_58.style.visibility="visible";
document.getElementsByTagName("body").item(0).appendChild(_58);
var _59;
if(_56){
_59=nitobi.callout.Callout.getCoordsAlt(_58);
}else{
_59=nitobi.callout.Callout.getCoords(_58);
}
nitobi.callout.Callout.permHeight=parseInt(_59.y);
nitobi.callout.Callout.permWidth=parseInt(_59.w)+(parseInt(_59.x)*2);
if(nitobi.callout.Callout.permHeight<_54){
nitobi.callout.Callout.permHeight=_54;
}
if(nitobi.callout.Callout.permHeight<document.body.clientHeight){
nitobi.callout.Callout.permHeight=document.body.clientHeight;
}
if(nitobi.callout.Callout.permHeight<document.documentElement.clientHeight){
nitobi.callout.Callout.permHeight=document.documentElement.clientHeight;
}
document.getElementsByTagName("body").item(0).removeChild(_58);
_58=null;
_55=null;
_56=null;
}
if(((_51==0)&&(document.documentElement.scrollTop>0))||((_52==0)&&(document.documentElement.scrollLeft>0))){
_51=document.documentElement.scrollTop;
_52=document.documentElement.scrollLeft;
}
if((document.documentElement.scrollWidth>nitobi.callout.Callout.permWidth)||(document.documentElement.scrollHeight>nitobi.callout.Callout.permHeight)){
nitobi.callout.Callout.permWidth=document.documentElement.scrollWidth;
nitobi.callout.Callout.permHeight=document.documentElement.scrollHeight;
}
if((document.body.scrollWidth>nitobi.callout.Callout.permWidth)||(document.body.scrollHeight>nitobi.callout.Callout.permHeight)){
nitobi.callout.Callout.permWidth=document.body.scrollWidth;
nitobi.callout.Callout.permHeight=document.body.scrollHeight;
}
return {scrollLeft:_52,scrollTop:_51,clientWidth:_53,clientHeight:_54,bodyWidth:nitobi.callout.Callout.permWidth,bodyHeight:nitobi.callout.Callout.permHeight};
};
nitobi.callout.Callout.prototype.attachToElement=function(_5a){
this.assignAttributes();
if(typeof (_5a)=="function"){
try{
_5a=_5a.call();
}
catch(e){
}
}
var sP=nitobi.callout.Callout.getScrollPosition();
this.setMode("ATTACHELEMENT");
this.lastID=_5a;
var _5c;
var x;
nitobi.callout.Callout.rewriteId(_5a);
if(this.opera){
_5c=nitobi.callout.Callout.getCoordsAlt(document.getElementById(_5a));
}else{
_5c=nitobi.callout.Callout.getCoords(document.getElementById(_5a));
}
var _5e=this.CalloutDirection;
var _5f=Array(9);
for(c=1;c<9;c++){
_5f[c]=true;
}
var _60=this.height*1;
var _61=this.width*1;
var _62=(_5c.h/2);
var _63=(_5c.w/2);
if((_5c.y-_60)<sP.scrollTop){
_5f[1]=false;
_5f[2]=false;
}
if((_5c.x-_61)<sP.scrollLeft){
_5f[7]=false;
_5f[8]=false;
}
if((_5c.y+_5c.h+_60)>(sP.scrollTop+sP.clientHeight)){
_5f[3]=false;
_5f[4]=false;
}
if((_5c.x+_5c.w+_61)>(sP.scrollLeft+sP.clientWidth)){
_5f[5]=false;
_5f[6]=false;
}
if((_5c.x-_61+_63)<sP.scrollLeft){
_5f[1]=false;
_5f[4]=false;
}
if((_5c.x+_61+_63)>(sP.scrollLeft+sP.clientWidth)){
_5f[2]=false;
_5f[3]=false;
}
if((_5c.y-_60+_62)<sP.scrollTop){
_5f[6]=false;
_5f[8]=false;
}
if((_5c.y+_60+_62)>(sP.scrollTop+sP.clientHeight)){
_5f[5]=false;
_5f[7]=false;
}
for(c=1;c<9;c++){
if(_5f[c]){
_5e=c;
break;
}
}
if((_5e==1)||(_5e==2)||(_5e==3)||(_5e==4)){
_5c.x+=_63;
}
if((_5e==3)||(_5e==4)){
_5c.y+=_5c.h;
}
if((_5e==5)||(_5e==6)){
_5c.x+=_5c.w;
}
if((_5e==5)||(_5e==6)||(_5e==7)||(_5e==8)){
_5c.y+=_62;
}
var _64=false;
if(_5e!=this.CalloutDirection){
this.CalloutDirection=_5e;
if(this.firefox){
_64=true;
try{
this.MasterContainer.style.visibility="hidden";
}
catch(e){
_64=false;
}
}
try{
this.HaltAttributes=true;
var _65=this.titlehtml;
this.setTitle(_65);
var _66=this.bodyHTML;
this.setBody(_66);
this.HaltAttributes=false;
this.assignAttributes();
}
catch(e){
}
}
this.allowOffScreen=false;
this.moveTo(_5c.x,_5c.y);
if(_64){
var gfd=this;
setTimeout(function(){
gfd.MasterContainer.style.visibility="visible";
},5);
}
if(this.onScreenUpdate!=null){
this.onScreenUpdate.call();
}
};
nitobi.callout.Callout.precacheImages=function(){
var _68=false;
var _69=navigator.userAgent.toLowerCase();
if(_69.indexOf("opera")>-1){
_68=true;
}else{
var b,c,d;
var _6d=nitobi.html.Css.getStyleSheetsByName("nitobi.callout.css");
for(var i=0;i<_6d.length;i++){
nitobi.html.Css.precacheImages(_6d[i]);
}
}
};
nitobi.lang.defineNs("nitobi.callout");
nitobi.callout.Hint=function(_6f,_70,_71){
this.uid=Math.random().toString().replace(".","").replace("0","");
this.ver="0.9";
this.activeHints=Array();
this.timerObj=null;
this.timerLength=1000;
if(_6f!=null){
this.timerLength=_6f;
}
if(_70!=null){
this.expireTimeout=_70;
}
this.stylesheet="xp";
if(_71!=null){
this.stylesheet=_71;
}
};
nitobi.callout.Hint.prototype.runHint=function(_72,_73,_74){
var ff=this;
clearTimeout(this.timerObj);
if(this.activeHints[_72]!=true){
this.timerObj=setTimeout(function(){
ff.execHint(_72,_73,_74);
},this.timerLength);
}
};
nitobi.callout.Hint.prototype.execHint=function(_76,_77,_78){
var _79=0;
var _7a=this;
if(this.activeHints[_76]!=true){
this.activeHints[_76]=true;
var _7b=new nitobi.callout.Callout(this.stylesheet);
_7b.attachToElement(_76);
_7b.setTitle(_77);
_7b.setBody(_78);
if(this.expireTimeout!=null){
_79=this.expireTimeout;
}else{
_79=3000+(_78.split(" ").length*220);
}
_7b.setExpire(_79);
_7b.ondestroy=function(){
_7a.activeHints[_76]=false;
};
_7b.show();
_7b=null;
}
};
nitobi.callout.Hint.prototype.addHint=function(_7c,_7d,_7e){
var abd=this;
try{
document.getElementById(_7c).onmouseover=function(){
abd.runHint(this.id,_7d,_7e);
};
document.getElementById(_7c).onmouseout=function(){
clearTimeout(abd.timerObj);
};
document.getElementById(_7c).onmousedown=function(){
abd.execHint(this.id,_7d,_7e);
};
document.getElementById(_7c).id=_7c;
}
catch(e){
for(var i=0;i<document.forms.length;i++){
for(var b=0;b<document.forms[i].elements.length;b++){
if(document.forms[i].elements[b].name.toUpperCase()==_7c.toUpperCase()){
document.forms[i].elements[b].onmouseover=function(){
abd.runHint(this.id,_7d,_7e);
};
document.forms[i].elements[b].onmouseout=function(){
clearTimeout(abd.timerObj);
};
document.forms[i].elements[b].onmousedown=function(){
abd.execHint(this.id,_7d,_7e);
};
document.forms[i].elements[b].id=_7c;
}
}
}
}
};


