/*
 * 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,_2,_3){
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;
_4=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=((_4.indexOf("mozilla")!=-1)&&(_4.indexOf("spoofer")==-1)&&(_4.indexOf("compatible")==-1)&&(_4.indexOf("opera")==-1)&&(_4.indexOf("webtv")==-1)&&(_4.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=((_4.indexOf("msie")!=-1)&&(_4.indexOf("opera")==-1));
this.ie3=(this.ie&&(this.major<4));
this.ie4=(this.ie&&(this.major==4)&&(_4.indexOf("msie 4")!=-1));
this.ie5=(this.ie&&(this.major==4)&&(_4.indexOf("msie 5.")!=-1)&&(_4.indexOf("msie 5.5")==-1)&&(_4.indexOf("mac")==-1));
this.ie6=(this.ie&&(this.major==4)&&(_4.indexOf("msie 6.")!=-1));
this.ie7=(this.ie&&(this.major==4)&&(_4.indexOf("msie 7.0")!=-1));
if(_4.indexOf("opera")==0){
this.opera=true;
}
};
var _4=navigator.userAgent.toLowerCase();
if(_4.indexOf("opera")==0){
this.opera=true;
}
if(_4.indexOf("Firefox")!=-1){
this.firefox=true;
}
if(_4.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 _6=this.className.replace("_off","_on");
this.className=_6;
}
catch(e){
}
};
this.CloseElement.onmouseout=function(){
try{
var _7=this.className.replace("_on","_off");
this.className=_7;
}
catch(e){
}
};
this.CloseElement.onmousedown=function(){
try{
var _8=this.className.replace("_on","_off");
this.className=_8;
}
catch(e){
}
};
var _9=this;
this.CloseElement.onmouseup=function(){
try{
var _a=this.className.replace("_off","_on");
this.className=_a;
}
catch(e){
}
_9.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("");
if(_2!=null){
this.setTitle(_2);
}
if(_3!=null){
this.setBody(_3);
}
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(_b){
try{
document.getElementById(_b).id=_b;
}
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()==_b.toUpperCase()){
document.forms[i].elements[b].id=_b;
}
}
}
}
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(_14){
this.onScreenUpdate=_14;
};
nitobi.callout.Callout.prototype.setOnDestroy=function(_15){
this.ondestroy=_15;
};
nitobi.callout.Callout.prototype.setOnAppear=function(_16){
this.onappear=_16;
};
nitobi.callout.Callout.prototype.setExpire=function(_17){
this.timeOut=_17;
var ds=this;
this.expireObj=setTimeout(function(){
ds.destroy();
},_17);
};
nitobi.callout.Callout.prototype.setSize=function(_19,_1a){
this.absWidth=_19;
this.absHeight=_1a;
this.setTitle(this.titlehtml);
};
nitobi.callout.Callout.prototype.getPosition=function(){
return {x:this.ax,y:this.ay};
};
nitobi.callout.Callout.prototype.setEffect=function(_1b){
this.effectName="FADE";
};
nitobi.callout.Callout.prototype.setTitle=function(_1c){
this.titlehtml=_1c;
if(_1c.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(_1d){
try{
this.bodyHTML=_1d;
var _1e=_1d.replace(/(<([^>]+)>)/ig,"");
var _1f=_1e.length;
if(_1d.length>0){
this.useBody=true;
}else{
this.useBody=false;
}
if(this.useBody){
this.BodyElement.style.visibility="visible";
if(this.CalloutContentWidth<((_1f/12)*nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_extender","width"))){
this.CalloutContentWidth=(_1f/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=_1d;
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 _20=parseInt(nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_titleOffset","top"));
if(isNaN(_20)){
_20=0;
}
this.CalloutContentHeight=this.BodyElement.offsetHeight+parseInt(nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bodytitlediv"+this.CalloutDirection,"top"))+_20;
}
}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(_21){
var _22=this.titlehtml;
if(_21!=this.CalloutDirection){
this.CalloutDirection=_21;
this.setTitle(_22);
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(_23){
var t,_25,_26,_27=0;
var _28,_29=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";
}
_28=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"width");
_29=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"height");
var _2a=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_closeoffset"+this.CalloutDirection,"left");
var _2b=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_closeoffset"+this.CalloutDirection,"top");
this.CalloutContentWidth+=_28;
this.CalloutContentHeight+=_29;
if(this.CalloutDirection==0){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tl_br_plain","width");
this.width=_25+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(_25)-parseInt(_26))+"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(_25)-parseInt(_26))+"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+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==1){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_bottom","width");
this.width=_25+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(_25)-parseInt(_26))+"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(_25)-parseInt(_26))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_br_bottom");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==2){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_bl_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_plain","width");
this.width=_25+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(_25)-parseInt(_26))+"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(_25)-parseInt(_26))+"px";
this.Containers[3].style.top=this.CalloutContentHeight+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==3){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tl_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_br_plain","width");
this.width=_25+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(_25)-parseInt(_26))+"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(_25)-parseInt(_26))+"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+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==4){
for(t=0;t<6;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_right","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_topright","width");
_27=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_tr_topleft","height");
this.width=_25+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(_25)-parseInt(_26))+"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(_25)-parseInt(_26))+"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=_27+"px";
this.Containers[0].style.width=this.CalloutContentWidth+"px";
this.Containers[0].style.height=(this.CalloutContentHeight-_27)+"px";
this.swapIEPNG(0,"ntb"+this.stylesheet+"Callout_tr_mainpart");
_26=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-_27)+"px";
this.Containers[1].style.top=_27+"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(_25)-parseInt(_26))+"px";
this.Containers[2].style.top=(this.CalloutContentHeight-_27)+_27+"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(_25)-parseInt(_26))+"px";
this.Containers[3].style.top=(this.CalloutContentHeight-_27)+_27+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_tl_br_plain");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==5){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lt_br","height");
_26=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=_26+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+_26-_25)+"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+_26-_25)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_lt_br");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==6){
for(t=0;t<6;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_left","width");
_26=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_lb","height");
_27=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_bottom","height");
this.width=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_lb_right","width")+_25+this.CalloutContentWidth;
this.height=_27+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+_27-_26)+"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+_27-_26)+"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=_25+"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=_25+"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");
_26=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=(_25+this.CalloutContentWidth)+"px";
this.Containers[2].style.top="0px";
this.Containers[2].style.height=(this.CalloutContentHeight+_27-_26)+"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=(_25+this.CalloutContentWidth)+"px";
this.Containers[3].style.top=(this.CalloutContentHeight+_27-_26)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_lb_br");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==7){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_bottom","height");
_26=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=_26+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+_25-_26)+"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+_25-_26)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_rt_br");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
if(this.CalloutDirection==8){
for(t=0;t<4;t++){
this.Containers[t].style.display="block";
}
_25=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_rb_bottom","height");
_26=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=_26+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+_25-_26)+"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+_25-_26)+"px";
this.swapIEPNG(3,"ntb"+this.stylesheet+"Callout_rb_rb");
this.CloseElement.style.left=(this.CalloutContentWidth+_2a)+"px";
this.CloseElement.style.top=_2b+"px";
}
this.CalloutContentWidth-=_28;
this.CalloutContentHeight-=_29;
this.moveTo(this.ax,this.ay);
}
catch(e){
}
};
nitobi.callout.Callout.prototype.swapIEPNG=function(_2c,_2d){
this.Is();
if((this.ie)&&(!this.ie7)){
this.Containers[_2c].style.backgroundImage="none";
this.Containers[_2c].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.StyleSheetUrl+nitobi.callout.Callout.readClassAttribute(_2d,"backgroundImage")+"', sizingMethod='crop');";
}else{
this.Containers[_2c].style.filter="";
}
};
nitobi.callout.Callout.prototype.setOpacity=function(_2e){
this.opacity=_2e;
var _2f=false;
if(this.ie7){
if(_2e==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{
_2f=true;
}
}
try{
if(_2e==1){
this.MasterContainer.style.filter="";
this.MasterContainer.style.opacity=_2e;
}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(_2f){
try{
this.MasterContainer.style.filter="";
}
catch(e){
}
}
};
nitobi.callout.Callout.prototype.fadeIn=function(){
if(!this.ie7){
var _30=this;
var _31=this.opacity+0.1;
if(_31>1){
_31=1;
}
if(this.opacity<0.95){
this.setOpacity(_31);
setTimeout(function(){
_30.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(_32){
if(!this.ie7){
var _33=this;
var _34=this.opacity-0.1;
if(_34<0){
_34=0;
}
if(this.opacity>0.05){
this.setOpacity(_34);
setTimeout(function(){
_33.fadeOut(_32);
},50);
}else{
this.setOpacity(0);
eval(_32);
}
}else{
this.setOpacity(0);
eval(_32);
}
};
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 _35=nitobi.html.Css.getRule("ntb"+nitobi.callout.lastStyle);
nitobi.callout.Callout.globalStylesheet=nitobi.html.Css.getPath(_35.parentStyleSheet);
return nitobi.callout.Callout.globalStylesheet;
}else{
return nitobi.callout.Callout.globalStylesheet;
}
};
nitobi.callout.Callout.prototype.setMode=function(_36){
if(this.mode!=_36){
this.mode=_36;
}
};
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 _38=false;
for(var t=0;t<nitobi.callout.Callout.refs.length;t++){
if(nitobi.callout.Callout.refs[t].uid!=null){
_38=true;
}
}
if(_38==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 _39 in this){
this[_39]=null;
delete this[_39];
}
};
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(_3a,_3b){
var b,c,d,e;
e=nitobi.callout.Callout.styleArray[_3a+_3b];
if(typeof (e)=="undefined"){
if(typeof (nitobi.callout.Callout.ruleArray[_3a])=="undefined"){
var _40=nitobi.html.Css.getRule(_3a);
nitobi.callout.Callout.ruleArray[_3a]=_40;
}else{
var _40=nitobi.callout.Callout.ruleArray[_3a];
}
if(_40&&_40.selectorText.toLowerCase().indexOf(_3a.toLowerCase())>-1){
if(_3b.toLowerCase()=="backgroundimage"){
nitobi.callout.Callout.styleArray[_3a+_3b]=_40.style.backgroundImage.replace("url","").replace("(","").replace(")","");
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
if(_3b.toLowerCase()=="width"){
nitobi.callout.Callout.styleArray[_3a+_3b]=parseInt(_40.style.width.replace("px",""));
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
if(_3b.toLowerCase()=="height"){
nitobi.callout.Callout.styleArray[_3a+_3b]=parseInt(_40.style.height.replace("px",""));
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
if(_3b.toLowerCase()=="left"){
nitobi.callout.Callout.styleArray[_3a+_3b]=parseInt(_40.style.left.replace("px",""));
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
if(_3b.toLowerCase()=="top"){
nitobi.callout.Callout.styleArray[_3a+_3b]=parseInt(_40.style.top.replace("px",""));
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
}
}else{
return nitobi.callout.Callout.styleArray[_3a+_3b];
}
};
nitobi.callout.Callout.getCoords=function(_41){
var ew,eh;
if(_41==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 _47=_41;
ew=_41.offsetWidth;
eh=_41.offsetHeight;
for(var lx=0,ly=0;_41!=null;lx+=_41.offsetLeft,ly+=_41.offsetTop,_41=_41.offsetParent){
}
for(;_47!=document.body;lx-=_47.scrollLeft,ly-=_47.scrollTop,_47=_47.parentNode){
}
}
catch(e){
}
}
return {x:lx,y:ly,h:eh,w:ew};
};
nitobi.callout.Callout.getCoordsAlt=function(_48){
if(!_48&&this){
_48=this;
}
try{
var _49=_48.offsetLeft;
var _4a=_48.offsetTop;
var _4b=_48.offsetParent;
}
catch(e){
}
while(_4b!=null){
try{
_49+=_4b.offsetLeft;
_4a+=_4b.offsetTop;
_4b=_4b.offsetParent;
}
catch(e){
}
}
var myh=_48.offsetHeight;
var myw=_48.offsetWidth;
if(_48==null){
var _49,_4a=0;
var cc=nitobi.callout.Callout.getScrollPosition();
_49=cc.scrollLeft+(cc.clientWidth/2);
_4a=cc.scrollTop+(cc.clientHeight/2);
myh=0;
myw=0;
}
return {x:_49,y:_4a,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 _51=nitobi.callout.Callout.readClassAttribute("ntb"+this.stylesheet+"Callout_offset"+this.CalloutDirection,"left");
var _52=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+_52)+"px";
this.MasterContainer.style.left=(x-this.width+_51)+"px";
}
if(this.CalloutDirection==2){
this.MasterContainer.style.top=(y-this.height+_52)+"px";
this.MasterContainer.style.left=(x+_51)+"px";
}
if(this.CalloutDirection==3){
this.MasterContainer.style.top=(y+_52)+"px";
this.MasterContainer.style.left=(x+_51)+"px";
}
if(this.CalloutDirection==4){
this.MasterContainer.style.top=(y+_52)+"px";
this.MasterContainer.style.left=(x-this.width+_51)+"px";
}
if(this.CalloutDirection==5){
this.MasterContainer.style.top=(y+_52)+"px";
this.MasterContainer.style.left=(x+_51)+"px";
}
if(this.CalloutDirection==6){
this.MasterContainer.style.top=(y-this.height+_52)+"px";
this.MasterContainer.style.left=(x+_51)+"px";
}
if(this.CalloutDirection==7){
this.MasterContainer.style.top=(y+_52)+"px";
this.MasterContainer.style.left=(x-this.width+_51)+"px";
}
if(this.CalloutDirection==8){
this.MasterContainer.style.top=(y-this.height+_52)+"px";
this.MasterContainer.style.left=(x-this.width+_51)+"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 _53,_54,_55,_56=0;
if((this.opera==false)&&(document.documentElement.scrollTop>0)){
_53=document.documentElement.scrollTop;
_54=document.documentElement.scrollLeft;
_55=document.documentElement.clientWidth;
_56=document.documentElement.clientHeight;
}else{
_53=document.body.scrollTop;
_54=document.body.scrollLeft;
_55=document.body.clientWidth;
_56=document.body.clientHeight;
}
if((document.body.clientHeight>0)&&(document.documentElement.clientHeight>0)&&(document.body.clientHeight<document.documentElement.clientHeight)){
_55=document.body.clientWidth;
_56=document.body.clientHeight;
}
if((document.body.clientHeight>0)&&(document.documentElement.clientHeight>0)&&(document.body.clientHeight>document.documentElement.clientHeight)){
_55=document.documentElement.clientWidth;
_56=document.documentElement.clientHeight;
}
if((nitobi.callout.Callout.permHeight==0)||(nitobi.callout.Callout.permWidth==0)){
var _57=navigator.userAgent.toLowerCase();
if(_57.indexOf("opera")==0){
var _58=true;
}
var ie=false;
if(_57.indexOf("ie")>0){
ie=true;
}
var _5a=document.createElement("div");
_5a.innerHTML="";
_5a.setAttribute("id","ntbHeightDiv");
_5a.object=this;
_5a.style.position="relative";
_5a.style.width="100%";
_5a.style.height="1px";
_5a.style.visibility="visible";
document.getElementsByTagName("body").item(0).appendChild(_5a);
var _5b;
if(_58){
_5b=nitobi.callout.Callout.getCoordsAlt(_5a);
}else{
_5b=nitobi.callout.Callout.getCoords(_5a);
}
nitobi.callout.Callout.permHeight=parseInt(_5b.y);
nitobi.callout.Callout.permWidth=parseInt(_5b.w)+(parseInt(_5b.x)*2);
if(nitobi.callout.Callout.permHeight<_56){
nitobi.callout.Callout.permHeight=_56;
}
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(_5a);
_5a=null;
_57=null;
_58=null;
}
if(((_53==0)&&(document.documentElement.scrollTop>0))||((_54==0)&&(document.documentElement.scrollLeft>0))){
_53=document.documentElement.scrollTop;
_54=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:_54,scrollTop:_53,clientWidth:_55,clientHeight:_56,bodyWidth:nitobi.callout.Callout.permWidth,bodyHeight:nitobi.callout.Callout.permHeight};
};
nitobi.callout.Callout.prototype.attachToElement=function(_5c){
this.assignAttributes();
if(typeof (_5c)=="function"){
try{
_5c=_5c.call();
}
catch(e){
}
}
var sP=nitobi.callout.Callout.getScrollPosition();
this.setMode("ATTACHELEMENT");
this.lastID=_5c;
var _5e;
var x;
nitobi.callout.Callout.rewriteId(_5c);
if(this.opera){
_5e=nitobi.callout.Callout.getCoordsAlt(document.getElementById(_5c));
}else{
_5e=nitobi.callout.Callout.getCoords(document.getElementById(_5c));
}
var _60=this.CalloutDirection;
var _61=Array(9);
for(c=1;c<9;c++){
_61[c]=true;
}
var _62=this.height*1;
var _63=this.width*1;
var _64=(_5e.h/2);
var _65=(_5e.w/2);
if((_5e.y-_62)<sP.scrollTop){
_61[1]=false;
_61[2]=false;
}
if((_5e.x-_63)<sP.scrollLeft){
_61[7]=false;
_61[8]=false;
}
if((_5e.y+_5e.h+_62)>(sP.scrollTop+sP.clientHeight)){
_61[3]=false;
_61[4]=false;
}
if((_5e.x+_5e.w+_63)>(sP.scrollLeft+sP.clientWidth)){
_61[5]=false;
_61[6]=false;
}
if((_5e.x-_63+_65)<sP.scrollLeft){
_61[1]=false;
_61[4]=false;
}
if((_5e.x+_63+_65)>(sP.scrollLeft+sP.clientWidth)){
_61[2]=false;
_61[3]=false;
}
if((_5e.y-_62+_64)<sP.scrollTop){
_61[6]=false;
_61[8]=false;
}
if((_5e.y+_62+_64)>(sP.scrollTop+sP.clientHeight)){
_61[5]=false;
_61[7]=false;
}
for(c=1;c<9;c++){
if(_61[c]){
_60=c;
break;
}
}
if((_60==1)||(_60==2)||(_60==3)||(_60==4)){
_5e.x+=_65;
}
if((_60==3)||(_60==4)){
_5e.y+=_5e.h;
}
if((_60==5)||(_60==6)){
_5e.x+=_5e.w;
}
if((_60==5)||(_60==6)||(_60==7)||(_60==8)){
_5e.y+=_64;
}
var _66=false;
if(_60!=this.CalloutDirection){
this.CalloutDirection=_60;
if(this.firefox){
_66=true;
try{
this.MasterContainer.style.visibility="hidden";
}
catch(e){
_66=false;
}
}
try{
this.HaltAttributes=true;
var _67=this.titlehtml;
this.setTitle(_67);
var _68=this.bodyHTML;
this.setBody(_68);
this.HaltAttributes=false;
this.assignAttributes();
}
catch(e){
}
}
this.allowOffScreen=false;
this.moveTo(_5e.x,_5e.y);
if(_66){
var gfd=this;
setTimeout(function(){
gfd.MasterContainer.style.visibility="visible";
},5);
}
if(this.onScreenUpdate!=null){
this.onScreenUpdate.call();
}
};
nitobi.callout.Callout.precacheImages=function(){
var _6a=false;
var _6b=navigator.userAgent.toLowerCase();
if(_6b.indexOf("opera")>-1){
_6a=true;
}else{
var b,c,d;
var _6f=nitobi.html.Css.getStyleSheetsByName("nitobi.callout.css");
for(var i=0;i<_6f.length;i++){
nitobi.html.Css.precacheImages(_6f[i]);
}
}
};
nitobi.lang.defineNs("nitobi.callout");
nitobi.callout.Hint=function(_71,_72,_73,_74){
this.uid=Math.random().toString().replace(".","").replace("0","");
this.ver="0.9";
this.activeHints=Array();
this.timerObj=null;
this.timerLength=1000;
if(_71!=null){
this.timerLength=_71;
}
this.showOnMouseDown=_74!=false;
if(_72!=null){
this.expireTimeout=_72;
}
this.stylesheet="xp";
if(_73!=null){
this.stylesheet=_73;
}
};
nitobi.callout.Hint.prototype.runHint=function(_75,_76,_77){
var ff=this;
clearTimeout(this.timerObj);
if(this.activeHints[_75]!=true){
this.timerObj=setTimeout(function(){
ff.execHint(_75,_76,_77);
},this.timerLength);
}
};
nitobi.callout.Hint.prototype.execHint=function(_79,_7a,_7b){
var _7c=0;
var _7d=this;
if(this.activeHints[_79]!=true){
this.activeHints[_79]=true;
var _7e=new nitobi.callout.Callout(this.stylesheet);
_7e.attachToElement(_79);
_7e.setTitle(_7a);
_7e.setBody(_7b);
if(this.expireTimeout!=null){
_7c=this.expireTimeout;
}else{
_7c=3000+(_7b.split(" ").length*220);
}
_7e.setExpire(_7c);
_7e.ondestroy=function(){
_7d.activeHints[_79]=false;
};
_7e.show();
_7e=null;
}
};
nitobi.callout.Hint.prototype.addHint=function(_7f,_80,_81){
var abd=this;
try{
document.getElementById(_7f).onmouseover=function(){
abd.runHint(this.id,_80,_81);
};
document.getElementById(_7f).onmouseout=function(){
clearTimeout(abd.timerObj);
};
if(this.showOnMouseDown){
document.getElementById(_7f).onmousedown=function(){
abd.execHint(this.id,_80,_81);
};
}
document.getElementById(_7f).id=_7f;
}
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()==_7f.toUpperCase()){
document.forms[i].elements[b].onmouseover=function(){
abd.runHint(this.id,_80,_81);
};
document.forms[i].elements[b].onmouseout=function(){
clearTimeout(abd.timerObj);
};
if(this.showOnMouseDown){
document.forms[i].elements[b].onmousedown=function(){
abd.execHint(this.id,_80,_81);
};
}
document.forms[i].elements[b].id=_7f;
}
}
}
}
};
nitobi.lang.defineNs("nitobi.spotlight");
if(false){
nitobi.spotlight=function(){
};
}
nitobi.spotlight.Spotlight=function(_85,_86,_87,_88){
if(_87==null){
this.useLens=false;
}else{
this.useLens=false;
if(_87!="none"){
this.useLens=true;
this.lensType=_87;
}
}
if(_85==null){
_85="NONE";
}
if(_88==null){
this.lensOversize=0.2;
}else{
this.lensOversize=_88;
}
this.uid=Math.random().toString().replace(".","").replace("0","");
this.ver="1.0";
this.masterOpacity=0.3;
this.lensType;
if(_85=="NONE"){
_85="GREYSWIPE";
this.masterOpacity=0.001;
this.lensType="NONE";
}
this.stylesheet="xp";
this.oS=nitobi.callout.Callout.getScrollPosition();
if(_86!=null){
this.stylesheet=_86.toLowerCase();
}
this.bodyScroll=document.body.style.overflowX;
this.allowScrolling=true;
this.stepArray=Array();
this.currentStep=-1;
this.effectMode="GREYSWIPE";
if(_85!=null){
this.effectMode=_85.toUpperCase();
}
this.lastID="";
this.Containers=Array();
this.ContainerCoords=Array();
this.ContainerTempCoords=Array();
this.swipeStart=0;
this.swipeEnd=0;
this.swipePos=0;
this.textIterator=0;
this.coords;
var o;
this.ie=false;
this.ie7=false;
this.firefox=false;
this.opera=false;
this.useMouse=false;
var _8a=nitobi.html.Css.getRule("ntbSpot");
this.StyleSheetUrl=nitobi.html.Css.getPath(_8a.parentStyleSheet);
var _8b=navigator.userAgent.toLowerCase();
if(_8b.indexOf("opera")!=-1){
this.opera=true;
}
if(_8b.indexOf("firefox")!=-1){
this.firefox=true;
}
if(_8b.indexOf("msie")!=-1){
this.ie=true;
}
if(_8b.indexOf("msie 7.0")!=-1){
this.ie7=true;
}
this.MouseIcon=document.createElement("div");
this.MouseIcon.innerHTML="";
this.MouseIcon.setAttribute("id","ntbMouseIcon_"+this.uid);
document.getElementsByTagName("body").item(0).appendChild(this.MouseIcon);
this.MouseIcon.className="ntbMouse";
this.MouseIcon.style.position="absolute";
this.MouseIcon.style.top="0px";
this.MouseIcon.style.left="0px";
this.MouseIcon.style.zIndex=999999;
this.MouseIcon.style.display="none";
this.MouseIcon.style.visibility="visible";
this.waitForMouse=false;
this.mouseDone=true;
this.mouseTimerObj=null;
this.Mouse_offX=0;
this.Mouse_offY=0;
this.MouseX=0;
this.MouseY=0;
this.MouseOrigX=0;
this.MouseOrigY=0;
this.MouseAngle=0;
this.MouseDistance=0;
this.setMouseIcon("ntbMouse");
this.targetScrollX=0;
this.targetScrollY=0;
this.startingScrollX=0;
this.startingScrollY=0;
this.inScroll=false;
this.scrollTimer=null;
this.scrollX=0;
this.scrollY=0;
this.onfindscroll=null;
this.MouseTargetX=0;
this.MouseTargetY=0;
for(var t=0;t<4;t++){
this.Containers[t]=document.createElement("div");
this.Containers[t].innerHTML="";
this.Containers[t].setAttribute("id","ntbBackground"+t+"_"+this.uid);
document.getElementsByTagName("body").item(0).appendChild(this.Containers[t]);
this.Containers[t].style.backgroundColor="#000000";
this.Containers[t].style.position="absolute";
this.Containers[t].style.top="0px";
this.Containers[t].style.left="0px";
this.Containers[t].style.zIndex=999990;
this.Containers[t].style.overflow="hidden";
this.Containers[t].style.display="block";
this.Containers[t].style.visibility="hidden";
this.ContainerCoords[t]=Array();
this.ContainerTempCoords[t]=Array();
for(o=0;o<4;o++){
this.ContainerCoords[t][o]=0;
this.ContainerTempCoords[t][o]=0;
}
}
this.Lens;
this.setupLens();
};
nitobi.spotlight.Spotlight.continueTour;
nitobi.spotlight.Spotlight.prototype.setupLens=function(){
this.Lens=document.createElement("div");
var tL=this.Lens;
tL.innerHTML="&nbsp;";
tL.setAttribute("id","ntbLens"+this.uid);
document.getElementsByTagName("body").item(0).appendChild(tL);
var tLs=tL.style;
tLs.overflow="hidden";
tLs.position="absolute";
tLs.top="0px";
tLs.left="0px";
tLs.width="300px";
tLs.height="300px";
tLs.zIndex=999990;
tLs.display="block";
tLs.visibility="hidden";
if((this.ie)&&(!this.ie7)){
tL.innerHTML="<div id=\"ntbLensI"+this.uid+"\" style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.StyleSheetUrl+"/"+this.lensType+".png', sizingMethod='scale');\"></div>";
}else{
tL.innerHTML="<img id=\"ntbLensI"+this.uid+"\" src=\""+this.StyleSheetUrl+"/"+this.lensType+".png\">";
}
};
nitobi.spotlight.Spotlight.prototype.drawLens=function(){
if(this.useLens){
var tL=this.Lens;
var tLs=tL.style;
tLs.visibility="visible";
tLs.left=this.coords.x+"px";
tLs.top=this.coords.y+"px";
tLs.width=this.coords.w+"px";
if(this.swipePos<this.coords.h+this.coords.y){
if(this.swipePos<=this.coords.y){
tLs.height="0px";
tLs.visibility="hidden";
}else{
tLs.height=(this.swipePos-this.coords.y)+"px";
}
}else{
tLs.height=this.coords.h+"px";
}
var tLi=$ntb("ntbLensI"+this.uid).style;
tLi.width=this.coords.w+"px";
tLi.height=this.coords.h+"px";
}
};
nitobi.spotlight.Spotlight.prototype.updateScroller=function(x1,y1,x2,y2){
clearTimeout(this.scrollTimer);
if(this.allowScrolling){
var mS=nitobi.callout.Callout.getScrollPosition();
var _97=mS.scrollTop;
var _98=mS.scrollLeft;
if(y1<mS.scrollTop){
var _97=y1-(mS.clientHeight/4.5);
}
if(x1<mS.scrollLeft){
var _98=x1-(mS.clientWidth/4.5);
}
if(y2>(mS.scrollTop+mS.clientHeight)){
var _97=y2-mS.clientHeight+(mS.clientHeight/4.5);
}
if(x2>(mS.scrollLeft+mS.clientWidth)){
var _98=x2-mS.clientWidth+(mS.clientWidth/4.5);
}
if(_97<0){
_97=0;
}
if(_98<0){
_98=0;
}
if(_97>(mS.bodyHeight-mS.clientHeight)){
_97=(mS.bodyHeight-mS.clientHeight+10);
}
if(_98>(this.oS.bodyWidth-this.oS.clientWidth)){
_98=(this.oS.bodyWidth-this.oS.clientWidth);
}
this.targetScrollX=_98;
this.targetScrollY=_97;
if(!this.inScroll){
this.startingScrollX=mS.scrollLeft;
this.startingScrollY=mS.scrollTop;
this.inScroll=true;
}
this.scrollX=mS.scrollLeft;
this.scrollY=mS.scrollTop;
this.iterateScroller();
}else{
try{
this.onfindscroll.call();
}
catch(e){
}
}
};
nitobi.spotlight.Spotlight.prototype.iterateScroller=function(){
var _99=0;
var _9a=0;
var ids=this;
var _9c=10;
var _9d=10;
var _9e=0;
var _9f=0;
if((this.targetScrollX-this.scrollX)>0){
_99=1.1;
}
if((this.targetScrollX-this.scrollX)<0){
_99=-1.1;
}
if((this.targetScrollY-this.scrollY)>0){
_9a=1.1;
}
if((this.targetScrollY-this.scrollY)<0){
_9a=-1.1;
}
_9c=(Math.abs(this.targetScrollX-this.startingScrollX)/20)*0.8;
_9d=(Math.abs(this.targetScrollY-this.startingScrollY)/20)*0.8;
_9e=(this.scrollX-this.startingScrollX)/(this.targetScrollX-this.startingScrollX+0.0001);
_9f=(this.scrollY-this.startingScrollY)/(this.targetScrollY-this.startingScrollY+0.0001);
_99=(this.easeInEaseOut(_9c,1,_9e)*_99);
_9a=(this.easeInEaseOut(_9d,1,_9f)*_9a);
this.scrollX+=_99;
this.scrollY+=_9a;
if(this.scrollY<0){
this.scrollY=0;
}
if(this.scrollX<0){
this.scrollX=0;
}
window.scrollTo(this.scrollX,this.scrollY);
if((Math.abs(this.targetScrollY-this.scrollY)>3)||(Math.abs(this.targetScrollX-this.scrollX)>3)){
this.scrollTimer=setTimeout(function(){
ids.iterateScroller();
},15);
}else{
this.inScroll=false;
try{
this.onfindscroll.call();
}
catch(e){
}
}
};
nitobi.spotlight.Spotlight.prototype.setMouseIcon=function(_a0){
this.MouseIcon.className=_a0;
if((this.ie)&&(!this.ie7)){
this.MouseIcon.style.backgroundImage="none";
this.MouseIcon.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.StyleSheetUrl+nitobi.callout.Callout.readClassAttribute(_a0,"backgroundImage")+"', sizingMethod='crop');";
}else{
this.MouseIcon.style.filter="";
}
this.Mouse_offX=nitobi.callout.Callout.readClassAttribute(_a0+"_offset","left");
this.Mouse_offY=nitobi.callout.Callout.readClassAttribute(_a0+"_offset","top");
this.MouseIcon.style.left=(this.MouseX+this.Mouse_offX)+"px";
this.MouseIcon.style.top=(this.MouseY+this.Mouse_offY)+"px";
};
nitobi.spotlight.Spotlight.prototype.setEffect=function(_a1){
this.effectMode=_a1.toUpperCase();
};
nitobi.spotlight.Spotlight.prototype.destroy=function(){
if(this.Lens){
this.Lens.removeChild(this.Lens.firstChild);
this.Lens=null;
}
for(var t=0;t<4;t++){
document.getElementsByTagName("body").item(0).removeChild(this.Containers[t]);
this.Containers[t]=null;
}
document.getElementsByTagName("body").item(0).removeChild(this.MouseIcon);
this.MouseIcon=null;
};
nitobi.spotlight.Spotlight.prototype.lensMagnify=function(_a3){
var _a4;
_a4=_a3;
if(this.useLens){
_a4.x-=parseInt(_a3.w*this.lensOversize);
_a4.y-=parseInt(_a3.h*this.lensOversize);
_a4.w+=parseInt(_a3.w*(this.lensOversize*2));
_a4.h+=parseInt(_a3.h*(this.lensOversize*2));
}
return _a4;
};
nitobi.spotlight.Spotlight.prototype.setEffect=function(_a5){
var _a6=false;
if(_a5==null){
_a6=true;
var mc=nitobi.callout.Callout.getCoords($ntb(_a5));
_a5="NTB_tempDiv"+this.uid;
var me=nitobi.html.createElement("div",{"id":_a5},{"position":"absolute","top":mc.y+"px","left":mc.x+"px","width":"0px","height":"0px"});
document.getElementsByTagName("body").item(0).appendChild(me);
}
if(typeof (_a5)=="string"){
if(_a5.indexOf(":")>0){
_a5=document.forms[_a5.split(":")[0]][[_a5.split(":")[1]]];
}else{
_a5=document.getElementById(_a5);
}
}
if(typeof (_a5)=="object"){
try{
_a5=_a5.id;
}
catch(e){
}
}
if(typeof (_a5)=="function"){
try{
_a5=_a5.call();
}
catch(e){
}
}
if((this.effectMode=="GREYSWIPE")||(this.effectMode=="MODAL")||(this.effectMode=="NONE")){
if(this.effectMode=="MODAL"){
this.swipePos=this.swipeEnd;
}
var sP=nitobi.callout.Callout.getScrollPosition();
var _aa;
if(_a5!=this.lastID){
this.lastID=_a5;
if(this.opera){
_aa=nitobi.callout.Callout.getCoordsAlt($ntb(_a5));
}else{
_aa=nitobi.callout.Callout.getCoords($ntb(_a5));
}
_aa=this.lensMagnify(_aa);
this.coords=_aa;
this.ContainerCoords[0][0]=0;
this.ContainerCoords[0][1]=0;
this.ContainerCoords[0][2]=sP.bodyWidth;
this.ContainerCoords[0][3]=_aa.y;
this.ContainerCoords[1][0]=0;
this.ContainerCoords[1][1]=_aa.y;
this.ContainerCoords[1][2]=_aa.x;
this.ContainerCoords[1][3]=_aa.h;
this.ContainerCoords[2][0]=_aa.x+_aa.w;
this.ContainerCoords[2][1]=_aa.y;
this.ContainerCoords[2][2]=sP.bodyWidth-(_aa.x+_aa.w);
this.ContainerCoords[2][3]=_aa.h;
this.ContainerCoords[3][0]=0;
this.ContainerCoords[3][1]=_aa.y+_aa.h;
this.ContainerCoords[3][2]=sP.bodyWidth;
this.ContainerCoords[3][3]=sP.bodyHeight-(_aa.y+_aa.h);
}else{
_aa=this.coords;
}
for(var t=0;t<4;t++){
this.ContainerTempCoords[t][0]=this.ContainerCoords[t][0];
if(this.swipePos>this.ContainerCoords[t][1]){
this.ContainerTempCoords[t][1]=this.ContainerCoords[t][1];
}else{
this.ContainerTempCoords[t][1]=-1;
}
this.ContainerTempCoords[t][2]=this.ContainerCoords[t][2];
if(this.swipePos>(this.ContainerCoords[t][3]+this.ContainerCoords[t][1])){
this.ContainerTempCoords[t][3]=this.ContainerCoords[t][3];
}else{
this.ContainerTempCoords[t][3]=this.swipePos-this.ContainerCoords[t][1];
}
}
try{
for(var t=0;t<4;t++){
if((this.ContainerTempCoords[t][3]>0)){
if((this.ContainerTempCoords[t][2]>0)&&(this.ContainerTempCoords[t][3]>0)){
this.Containers[t].style.left=this.ContainerTempCoords[t][0]+"px";
this.Containers[t].style.top=this.ContainerTempCoords[t][1]+"px";
this.Containers[t].style.width=this.ContainerTempCoords[t][2]+"px";
this.Containers[t].style.height=this.ContainerTempCoords[t][3]+"px";
this.Containers[t].style.visibility="visible";
}else{
this.Containers[t].style.visibility="hidden";
}
}else{
this.Containers[t].style.visibility="hidden";
}
}
}
catch(e){
}
}
this.drawLens();
if(_a6){
document.getElementsByTagName("body").item(0).removeChild($ntb(_a5));
}
};
nitobi.spotlight.Spotlight.prototype.swipeIn=function(){
var fd=this;
if(this.swipePos<this.swipeEnd-3){
var _ad=this.swipePos-this.swipeStart;
var _ae=this.swipeEnd-this.swipeStart;
this.swipePos+=((_ad/_ae)*700)+2;
this.setEffect(this.lastID);
setTimeout(function(){
fd.swipeIn();
},30);
}else{
this.swipePos=nitobi.callout.Callout.permHeight;
this.setEffect(this.lastID);
}
};
nitobi.spotlight.Spotlight.prototype.swipeOut=function(){
var fd=this;
if(this.swipePos>(this.swipeStart+3)){
var _b0=this.swipePos-this.swipeStart;
var _b1=this.swipeEnd-this.swipeStart;
this.swipePos-=((_b0/_b1)*300)+5;
this.setEffect(this.lastID);
setTimeout(function(){
fd.swipeOut();
},30);
}else{
var sP=nitobi.callout.Callout.getScrollPosition();
this.swipePos=0;
for(var t=0;t<4;t++){
this.Containers[t].style.visibility="hidden";
}
this.setEffect(this.lastID);
this.destroy();
document.body.style.overflowX=this.bodyScroll;
}
};
nitobi.spotlight.Spotlight.prototype.initEffect=function(){
var _b4=0;
for(var d=0;d<this.stepArray.length;d++){
if(this.stepArray[d][3]=="OBJID"){
_b4=d;
var _b6=this.stepArray[_b4][0];
break;
}
if(this.stepArray[d][3]=="EXECFORMHELPER"){
if((this.firefox)||(this.opera)){
if(this.stepArray[d][0].id.length==0){
this.stepArray[d][0].id="ff"+Math.random();
}
var _b6=this.stepArray[d][0].id;
}
if(this.ie){
if(this.stepArray[d][0].id.length==0){
var _b6=this.stepArray[d][0].id;
}else{
var _b6=this.stepArray[d][0].name;
}
}
_b4=d;
break;
}
}
var sP=nitobi.callout.Callout.getScrollPosition();
if((this.effectMode=="GREYSWIPE")||(this.effectMode=="MODAL")){
for(var t=0;t<4;t++){
this.Containers[t].style.opacity=this.masterOpacity;
this.Containers[t].style.filter="alpha(opacity="+(0.3*100)+")";
}
this.swipeStart=sP.scrollTop;
this.swipePos=sP.scrollTop;
this.swipeEnd=sP.scrollTop+sP.clientHeight;
this.setEffect(_b6);
this.swipeIn();
for(var t=0;t<4;t++){
this.Containers[t].style.visibility="visible";
}
}
};
nitobi.spotlight.Spotlight.prototype.endEffect=function(_b9){
var _ba=0;
if(this.effectMode=="GREYSWIPE"){
var sP=nitobi.callout.Callout.getScrollPosition();
this.swipeStart=sP.scrollTop;
this.swipeEnd=sP.scrollTop+sP.clientHeight;
this.swipePos=sP.scrollTop+sP.clientHeight;
this.setEffect(this.lastID);
this.swipeOut();
}else{
this.destroy();
document.body.style.overflowX=this.bodyScroll;
}
};
nitobi.spotlight.Spotlight.prototype.runFormHelper=function(_bc){
var ff=this;
var _be=true;
if(this.waitForMouse){
if(!this.mouseDone){
_be=false;
}
}
if(_be){
if(typeof (_bc[0])=="string"){
if(_bc[0].indexOf(":")!=-1){
_bc[0]=document.forms[_bc[0].split(":")[0]][[_bc[0].split(":")[1]]];
}else{
_bc[0]=document.getElementById(_bc[0]);
}
}
if(_bc[4]=="TYPETEXT"){
if(this.textIterator==0){
_bc[0].focus();
}
this.textIterator++;
if(this.textIterator<_bc[2].length+1){
_bc[0].value=_bc[2].substring(0,this.textIterator);
if(_bc[0].onkeydown!=null){
_bc[0].onkeydown.call();
}
if(_bc[0].onkeyup!=null){
_bc[0].onkeyup.call();
}
if(_bc[0].onkeypress!=null){
_bc[0].onkeypress.call();
}
var _bf=80;
if(Math.round((Math.random()*9)+1)>7){
_bf=Math.round((Math.random()*250)+1);
}
setTimeout(function(){
ff.runFormHelper(_bc);
},_bf);
}else{
_bc[0].blur();
setTimeout(function(){
ff.play();
},this.stepArray[this.currentStep][1]);
}
}
}else{
setTimeout(function(){
ff.runFormHelper(_bc);
},250);
}
};
nitobi.spotlight.Spotlight.prototype.easeInEaseOut=function(_c0,_c1,_c2){
var _c3=0.5;
if(_c2>0.7){
_c3=(_c2-0.4)/0.6;
}
if(_c2<0.15){
_c3=_c2/0.3;
}
var _c4=(Math.sin((parseFloat(_c3)*180)*(3.141592/180)))*_c0;
if(_c4<_c1){
_c4=_c1;
}
return _c4;
};
nitobi.spotlight.Spotlight.prototype.moveMouseXY=function(_c5,_c6){
this.MouseTargetX=_c5;
this.MouseTargetY=_c6;
var fk=this;
clearTimeout(this.mouseTimerObj);
var _c8=(_c5-this.MouseOrigX);
var _c9=(_c6-this.MouseOrigY);
var _ca=(_c5-this.MouseX)+1e-10;
var _cb=(_c6-this.MouseY);
var _cc=Math.round(Math.sqrt((_c8*_c8)+(_c9*_c9)))+0.001;
var _cd=Math.round(Math.sqrt((_ca*_ca)+(_cb*_cb)));
var _ce=((_cc-_cd)/_cc);
if((Math.abs(_c5-this.MouseX)>3)||(Math.abs(_c6-this.MouseY)>3)){
var _cf=_cb/_ca;
var _d0=this.easeInEaseOut((_cc/80)*5.5,0,_ce)+1;
var _d1=0;
var _d2=0;
if(_cf<=0){
if(_c5>=this.MouseX){
_d1=1;
_d2=_cf;
}else{
_d1=-1;
_d2=-_cf;
}
}else{
if(_c5>=this.MouseX){
_d1=1;
_d2=_cf;
}else{
_d1=-1;
_d2=-_cf;
}
}
if(Math.abs(_cf)>1){
var _d3=Math.abs(_d1);
var _d4=Math.abs(_d2);
var _d5,_d6;
if(_d3<_d4){
if(_d1>0){
_d5=_d3/_d4;
}else{
_d5=-_d3/_d4;
}
if(_d2>0){
_d6=1;
}else{
_d6=-1;
}
}else{
if(_d2>0){
_d6=_d4/_d3;
}else{
_d6=-_d4/_d3;
}
if(_d1>0){
_d5=1;
}else{
_d5=-1;
}
}
_d1=_d5;
_d2=_d6;
}
this.MouseX+=_d1*_d0;
this.MouseY+=_d2*_d0;
var _d7=Math.sin((_ce+0.01)*3.1415927)*(this.MouseDistance/100)*13;
var _d8=nitobi.lang.Math.rotateCoords(0,-_d7,this.MouseAngle);
this.MouseIcon.style.left=this.MouseX+this.Mouse_offX+_d8.x+"px";
this.MouseIcon.style.top=this.MouseY+this.Mouse_offY+_d8.y+"px";
this.mouseTimerObj=setTimeout(function(){
fk.moveMouseXY(fk.MouseTargetX,fk.MouseTargetY);
},20);
}else{
if(this.waitForMouse){
this.mouseDone=true;
}
if(this.stepArray[this.currentStep][3]=="EXECFORMHELPER"){
this.setMouseIcon("ntbType");
}
if(this.stepArray[this.currentStep][2]=="MOVETOOBJECT"){
setTimeout(function(){
fk.play();
},1);
}
if((this.stepArray[this.currentStep][2]=="CLICKONOBJECT")||(this.stepArray[this.currentStep][2]=="CLICKONOBJECTCALCED")){
this.setMouseIcon("ntbMouseClick");
if(this.stepArray[this.currentStep][2]=="CLICKONOBJECTCALCED"){
}else{
if(typeof (this.stepArray[this.currentStep][0])=="string"){
try{
var _d9=$ntb(this.stepArray[this.currentStep][0]);
}
catch(e){
}
}
if(typeof (this.stepArray[this.currentStep][0])=="function"){
try{
var _d9=$ntb(this.stepArray[this.currentStep][0].call());
}
catch(e){
}
}
}
try{
_d9.onmouseover.call();
}
catch(e){
}
try{
_d9.onmousedown.call();
}
catch(e){
}
setTimeout(function(){
fk.setMouseIcon("ntbMouse");
try{
_d9.onmouseup.call();
}
catch(e){
}
try{
if(_d9.tagName!="IMG"){
_d9.onclick.call();
}
}
catch(e){
try{
if(_d9.href!=null){
if(_d9.href!="#"){
window.location=_d9.href;
}
}
}
catch(e){
}
}
try{
_d9.onmouseout.call();
}
catch(e){
}
},100);
setTimeout(function(){
fk.play();
},100+this.stepArray[this.currentStep][1]);
}
}
};
nitobi.spotlight.Spotlight.prototype.createFormHelperStep=function(_da,_db,_dc,_dd,_de){
this.stepArray[this.stepArray.length]=Array(6);
this.stepArray[this.stepArray.length-1][0]=_da;
if(_dc!=null){
this.stepArray[this.stepArray.length-1][1]=_dc;
}else{
this.stepArray[this.stepArray.length-1][1]=100;
}
this.stepArray[this.stepArray.length-1][2]=_dd;
this.stepArray[this.stepArray.length-1][3]="EXECFORMHELPER";
this.stepArray[this.stepArray.length-1][4]=_db.toUpperCase();
if(_de!=null){
this.stepArray[this.stepArray.length-1][5]=_de;
}else{
this.stepArray[this.stepArray.length-1][5]=true;
}
};
nitobi.spotlight.Spotlight.prototype.createMouseStep=function(_df,_e0,_e1){
this.stepArray[this.stepArray.length]=Array(6);
this.stepArray[this.stepArray.length-1][0]=_e0;
if(_e1!=null){
this.stepArray[this.stepArray.length-1][1]=_e1;
}else{
this.stepArray[this.stepArray.length-1][1]=100;
}
this.stepArray[this.stepArray.length-1][2]=_df.toUpperCase();
this.stepArray[this.stepArray.length-1][3]="MOUSEACTION";
};
nitobi.spotlight.Spotlight.prototype.createCodeStep=function(_e2,_e3){
this.stepArray[this.stepArray.length]=Array(6);
this.stepArray[this.stepArray.length-1][0]=_e2;
if(_e3!=null){
this.stepArray[this.stepArray.length-1][1]=_e3;
}else{
this.stepArray[this.stepArray.length-1][1]=100;
}
this.stepArray[this.stepArray.length-1][3]="EXECCODE";
};
nitobi.spotlight.Spotlight.prototype.createCalloutStep=function(_e4,_e5,_e6){
this.stepArray[this.stepArray.length]=Array(6);
this.stepArray[this.stepArray.length-1][0]=_e4;
this.stepArray[this.stepArray.length-1][1]=_e5;
this.stepArray[this.stepArray.length-1][2]=_e6;
this.stepArray[this.stepArray.length-1][3]="OBJID";
};
nitobi.spotlight.Spotlight.prototype.createFocusStep=function(_e7,_e8){
this.stepArray[this.stepArray.length]=Array(6);
this.stepArray[this.stepArray.length-1][0]=_e7;
this.stepArray[this.stepArray.length-1][3]="FOCUSID";
if(_e8!=null){
this.stepArray[this.stepArray.length-1][1]=_e8;
}else{
this.stepArray[this.stepArray.length-1][1]=100;
}
};
nitobi.spotlight.Spotlight.prototype.play=function(){
var ds=this;
if(nitobi.html.Css.isPrecaching){
nitobi.ui.setWaitScreen(true);
nitobi.html.Css.onPrecached.subscribe(function(){
nitobi.ui.setWaitScreen(false);
ds.play();
});
return;
}
this.currentStep++;
this.mouseDone=false;
document.body.style.overflowX="hidden";
if(this.currentStep==0){
this.initEffect();
}
if(this.currentStep<this.stepArray.length){
if(typeof (this.currentStep)=="undefined"){
setTimeout(function(){
ds.play();
},1);
}
if((this.stepArray[this.currentStep][3]=="OBJID")&&(typeof (this.currentStep)!="undefined")){
this.setEffect(this.stepArray[this.currentStep][0]);
this.callout=new nitobi.callout.Callout(this.stylesheet);
var myt=this.stepArray[this.currentStep][1];
this.callout.HaltAttributes=true;
this.callout.setTitle(this.stepArray[this.currentStep][1]);
this.callout.setBody(this.stepArray[this.currentStep][2]+"<br><div id='calloutclose"+this.uid+"'  onclick='nitobi.spotlight.Spotlight.continueTour = true; $ntb(\"close"+this.callout.uid+"\").onmouseup.call(); return false;' class=ntb"+this.stylesheet+"Callout_next_off onmouseover='this.className=\"ntb"+this.stylesheet+"Callout_next_on\"' onmouseout='this.className=\"ntb"+this.stylesheet+"Callout_next_off\"' onmousedown='this.className=\"ntb"+this.stylesheet+"Callout_next_off\"' onmouseup='this.className=\"ntb"+this.stylesheet+"Callout_next_on\"; return false;'></div>");
this.callout.setOnDestroy(function(){
if(nitobi.spotlight.Spotlight.continueTour==true){
ds.play();
}else{
ds.destroy();
}
nitobi.spotlight.Spotlight.continueTour=false;
});
try{
this.callout.setOnScreenUpdate(function(){
nitobi.callout.Callout.permHeight=0;
nitobi.callout.Callout.permWidth=0;
ds.lastID="";
try{
ds.setEffect(ds.stepArray[ds.currentStep][0]);
}
catch(e){
}
});
}
catch(e){
}
this.callout.setExpire(25000);
this.onfindscroll=function(){
if(ds.stepArray[ds.currentStep][0]==null){
ds.callout.setCalloutDirection(0);
var cc=nitobi.callout.Callout.getScrollPosition();
ds.callout.moveTo(cc.scrollLeft+(cc.clientWidth/2),cc.scrollTop+(cc.clientHeight/2));
}else{
ds.callout.attachToElement(ds.stepArray[ds.currentStep][0]);
}
ds.callout.show();
};
var fd=this.callout;
this.setMouseIcon("ntbMouse");
if(this.opera){
var _ed=nitobi.callout.Callout.getCoordsAlt($ntb(this.stepArray[this.currentStep][0]));
}else{
var _ed=nitobi.callout.Callout.getCoords($ntb(this.stepArray[this.currentStep][0]));
}
_ed=this.lensMagnify(_ed);
this.updateScroller(_ed.x,_ed.y,_ed.x+_ed.w,_ed.y+_ed.h);
if(this.useMouse){
this.waitForMouse=true;
this.mouseDone=false;
this.MouseOrigX=this.MouseX;
this.MouseOrigY=this.MouseY;
this.MouseAngle=nitobi.lang.Math.returnAngle(this.MouseX,this.MouseY,_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
this.MouseDistance=nitobi.lang.Math.returnDistance(this.MouseX,this.MouseY,_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
this.moveMouseXY(_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
}
this.callout.HaltAttributes=false;
this.callout.assignAttributes();
}
if(this.stepArray[this.currentStep][3]=="FOCUSID"){
if(this.opera){
var _ed=nitobi.callout.Callout.getCoordsAlt($ntb(this.stepArray[this.currentStep][0]));
}else{
var _ed=nitobi.callout.Callout.getCoords($ntb(this.stepArray[this.currentStep][0]));
}
this.setEffect(this.stepArray[this.currentStep][0]);
_ed=this.lensMagnify(_ed);
this.updateScroller(_ed.x,_ed.y,_ed.x+_ed.w,_ed.y+_ed.h);
setTimeout(function(){
ds.play();
},this.stepArray[this.currentStep][1]);
}
if(this.stepArray[this.currentStep][3]=="EXECCODE"){
eval(this.stepArray[this.currentStep][0]);
setTimeout(function(){
ds.play();
},this.stepArray[this.currentStep][1]);
}
if(this.stepArray[this.currentStep][3]=="EXECFORMHELPER"){
var _ee="";
if(typeof (this.stepArray[this.currentStep][0])=="string"){
if(this.stepArray[this.currentStep][0].indexOf(":")>0){
this.stepArray[this.currentStep][0]=document.forms[this.stepArray[this.currentStep][0].split(":")[0]][[this.stepArray[this.currentStep][0].split(":")[1]]];
}else{
this.stepArray[this.currentStep][0]=document.getElementById(this.stepArray[this.currentStep][0]);
}
}
if((this.firefox)||(this.opera)){
if(this.stepArray[this.currentStep][0].id.length==0){
this.stepArray[this.currentStep][0].id="ff"+Math.random();
}
if(this.stepArray[this.currentStep][5]){
this.setEffect(this.stepArray[this.currentStep][0].id);
}
_ee=this.stepArray[this.currentStep][0].id;
}
if(this.ie){
if(this.stepArray[this.currentStep][0].id!=null&&this.stepArray[this.currentStep][0].length>0){
_ee=this.stepArray[this.currentStep][0].id;
}else{
_ee=this.stepArray[this.currentStep][0].name;
}
if(this.stepArray[this.currentStep][5]){
this.setEffect(_ee);
}
}
if(this.opera){
var _ed=nitobi.callout.Callout.getCoordsAlt($ntb(_ee));
}else{
var _ed=nitobi.callout.Callout.getCoords($ntb(_ee));
}
_ed=this.lensMagnify(_ed);
this.updateScroller(_ed.x,_ed.y,_ed.x+_ed.w,_ed.y+_ed.h);
if(this.useMouse){
this.MouseOrigX=this.MouseX;
this.MouseOrigY=this.MouseY;
this.MouseAngle=nitobi.lang.Math.returnAngle(this.MouseX,this.MouseY,_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
this.MouseDistance=nitobi.lang.Math.returnDistance(this.MouseX,this.MouseY,_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
this.moveMouseXY(_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
this.waitForMouse=true;
}
this.textIterator=-1;
this.runFormHelper(this.stepArray[this.currentStep]);
}
if(this.stepArray[this.currentStep][3]=="MOUSEACTION"){
nitobi.callout.Callout.rewriteId(this.stepArray[this.currentStep][0]);
if(!this.useMouse){
this.useMouse=true;
this.MouseIcon.style.display="block";
}
if(this.stepArray[this.currentStep][2]=="APPEARONOBJECT"){
this.setMouseIcon("ntbMouse");
if(typeof (this.stepArray[this.currentStep][0])=="string"){
try{
var _ef=$ntb(this.stepArray[this.currentStep][0]);
}
catch(e){
}
}
if(typeof (this.stepArray[this.currentStep][0])=="function"){
try{
var _ef=$ntb(this.stepArray[this.currentStep][0].call());
}
catch(e){
}
}
if(this.opera){
var _ed=nitobi.callout.Callout.getCoordsAlt(_ef);
}else{
var _ed=nitobi.callout.Callout.getCoords(_ef);
}
this.MouseX=_ed.x+(_ed.w*0.8);
this.MouseY=_ed.y+(_ed.h/3);
this.MouseOrigX=this.MouseX;
this.MouseOrigY=this.MouseY;
this.MouseIcon.style.left=this.MouseX+this.Mouse_offX;
this.MouseIcon.style.top=this.MouseY+this.Mouse_offY;
setTimeout(function(){
ds.play();
},this.stepArray[this.currentStep][1]);
}
if(this.stepArray[this.currentStep][2]=="MOVETOOBJECT"){
this.setMouseIcon("ntbMouse");
if(typeof (this.stepArray[this.currentStep][0])=="string"){
try{
var _ef=$ntb(this.stepArray[this.currentStep][0]);
}
catch(e){
}
}
if(typeof (this.stepArray[this.currentStep][0])=="function"){
try{
var _ef=$ntb(this.stepArray[this.currentStep][0].call());
}
catch(e){
}
}
if(this.opera){
var _ed=nitobi.callout.Callout.getCoordsAlt(_ef);
}else{
var _ed=nitobi.callout.Callout.getCoords(_ef);
}
_ed=this.lensMagnify(_ed);
this.updateScroller(_ed.x,_ed.y,_ed.x+_ed.w,_ed.y+_ed.h);
this.MouseOrigX=this.MouseX;
this.MouseOrigY=this.MouseY;
this.MouseAngle=nitobi.lang.Math.returnAngle(this.MouseX,this.MouseY,_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
this.MouseDistance=nitobi.lang.Math.returnDistance(this.MouseX,this.MouseY,_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
this.moveMouseXY(_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/3));
}
if((this.stepArray[this.currentStep][2]=="CLICKONOBJECT")||(this.stepArray[this.currentStep][2]=="CLICKONOBJECTCALCED")){
this.setMouseIcon("ntbMouse");
if(typeof (this.stepArray[this.currentStep][0])=="string"){
try{
var _ef=$ntb(this.stepArray[this.currentStep][0]);
}
catch(e){
}
}
if(typeof (this.stepArray[this.currentStep][0])=="function"){
try{
var _ef=$ntb(this.stepArray[this.currentStep][0].call());
}
catch(e){
}
}
if(this.opera){
var _ed=nitobi.callout.Callout.getCoordsAlt(_ef);
}else{
var _ed=nitobi.callout.Callout.getCoords(_ef);
}
_ed=this.lensMagnify(_ed);
this.updateScroller(_ed.x,_ed.y,_ed.x+_ed.w,_ed.y+_ed.h);
this.MouseOrigX=this.MouseX;
this.MouseOrigY=this.MouseY;
this.MouseAngle=nitobi.lang.Math.returnAngle(this.MouseX,this.MouseY,_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
this.MouseDistance=nitobi.lang.Math.returnDistance(this.MouseX,this.MouseY,_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/2));
this.moveMouseXY(_ed.x+(_ed.w*0.8),_ed.y+(_ed.h/3));
}
}
}else{
this.onfindscroll=function(){
ds.endEffect();
};
this.updateScroller(0,0,0,0);
}
};


