// SPOTLIGHT CODE BEGINS AT LINE 1344 -- Aaron

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.spotlight");
nitobi.spotlight.build="6925";
nitobi.spotlight.version="1.0.6925";
nitobi.lang.defineNs("nitobi.callout");
if(false){
nitobi.callout=function(){
};
}
nitobi.callout.lastStyle="";
nitobi.callout.Callout=function(_1){
nitobi.prepare();
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.prepare=function(){
ebagdl=0;
ebagd1=9999999999999;
s="var d = new Date().getTime();if ((d<"+ebagdl+") || (d>"+ebagd1+")) {alert('Evaluation period has expired.\\n\\nPlease notify your system administrator.\\n\\nPurchase Information:\\n       NITOBI SOFTWARE\\n\\n       www.nitobi.com\\n       sales@nitobi.com         \\n       Telephone: (604) 685-9287\\n       Fax: (604) 648-9090\\n       Toll-Free: 1-866-6EB-APPS\\n                      (1-866-632-2777)');}";
eval(s);
};
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;
}
}
}
}
};



nitobi.lang.defineNs("nitobi.spotlight");

if (false)
{
	/**
	 * @namespace The namespace for classes that make up the Nitobi Spotlight component.
	 * @constructor
	 */
	nitobi.spotlight = function(){};
}

/**
 * Creates a Nitobi Spotlight.  After you instantiate a Spotlight object, you must add "steps" to it using the various
 * methods below.  Each step is executed in the order that it was added.  Begin the tour by calling {@link #play}.
 * @class The Spotlight component allows you to create a "tour" that leads a user through various elements on a page.  Tours
 * are composed of steps, of which there are a number of different kinds.
 * @constructor
 * @example
 * var tour = new nitobi.spotlight.Spotlight('GREYSWIPE', 'impact', 'round');
 * tour.createCalloutStep(null, 'Centered', 'By not providing a DOM ID or object to a callout step, you create a centered callout in the tour.');
 * tour.createCalloutStep('corgi', 'Attached to an Image!', 'You can attach a callout to an object by providing the ID.');tour.createCalloutStep(null, 'Centered', 'The Nitobi Tabstrip is a fully skinnable tab component that can load data from Ajax requests, iFrames, or just to trigger JavaScript events.');	
 * tour.createCalloutStep('fatmanatee', 'Scrolling is Automatic', 'Spotlight will automatically scroll an object into view. You can turn this off by setting the allowScrolling attribute to <u>false</u>.');
 * tour.createCalloutStep('toocute', 'Each item occurs in Sequence', 'Each item will occur in sequence according to the order in which they were scripted.');
 * tour.createCalloutStep('fatmanatee', '', 'Its not necessary to have titles in callouts. In this example we simply specified an empty string as the title (\'\').');
 * tour.createCalloutStep('corgi', 'That\'s all folks!', 'Watch some of the other demos to get a sense for the capabilities of Spotlight and Callout.');	
 * tour.play();
 * @param {String} thiseffect The initialization effect to use ('GREYSWIPE', 'NONE')
 * @param {String} stylesheet Which style to use for the callouts
 * @param {String} lensType Which style to use for the lens. 'NONE', 'ROUND', 'SQUARE', 'BURST', etc
 * @param {String} lensOversize How much specifity to use on the lens. (default is 0.2)
 */
nitobi.spotlight.Spotlight = function(thiseffect, stylesheet, lensType, lensOversize) {
	if (lensType == null) { this.useLens = false; } else { this.useLens=false; if (lensType != 'none') {this.useLens = true; this.lensType = lensType;}}
	if (thiseffect == null) {thiseffect = 'NONE';}
	if (lensOversize == null) { this.lensOversize = 0.2; } else {  this.lensOversize = lensOversize;}
	
	/**
	 * @private
	 */
	this.uid = Math.random().toString().replace('.', '').replace('0', '');
	/**
	 * @private
	 */
	this.ver = '1.0';
	/**
	* @private
	*/
	this.masterOpacity = 0.3;
	/**
	* @private
	*/
	this.lensType;
	if (thiseffect == 'NONE') {
		thiseffect = 'GREYSWIPE';
		this.masterOpacity = 0.001;
		this.lensType = 'NONE';
	}
	/**
	* @private
	*/
	this.stylesheet = 'xp';

	/**
	* @private
	*/	
	this.oS = nitobi.callout.Callout.getScrollPosition();
	
	if (stylesheet != null) {
		this.stylesheet = stylesheet.toLowerCase();
	}

	/**
	* @private
	*/	
	this.bodyScroll = document.body.style.overflowX;
	/**
	 * @private
	 */
	this.allowScrolling = true;
	/**
	* @private
	*/
	this.stepArray = Array();
	/**
	* @private
	*/
	this.currentStep = -1;
	/**
	* @private
	*/
	this.effectMode = 'GREYSWIPE';
	if (thiseffect != null)
		this.effectMode = thiseffect.toUpperCase();
	/**
	* @private
	*/

	this.lastID = '';
	/**
	* @private
	*/	
	this.Containers = Array();
	/**
	* @private
	*/	
	this.ContainerCoords = Array();
	/**
	* @private
	*/	
	this.ContainerTempCoords = Array();	
	/**
	* @private
	*/	
	this.swipeStart = 0;
	/**
	* @private
	*/	
	this.swipeEnd = 0;
	/**
	* @private
	*/	
	this.swipePos = 0;
	/**
	* @private
	*/	
	this.textIterator = 0;
	/**
	* @private
	*/	
	this.coords;
	/**
	* @private
	*/	
	var o;
	/**
	* @private
	*/	
	this.ie = false;
	/**
	* @private
	*/	
	this.ie7 = false;
	/**
	* @private
	*/	
	this.firefox = false;
	/**
	* @private
	*/	
	this.opera = false;
	/**
	* @private
	*/	
	this.useMouse = false;
	/**
	* @private
	*/	
	var rule = nitobi.html.Css.getRule('ntbSpot');
	/**
	* @private
	*/	
	this.StyleSheetUrl = nitobi.html.Css.getPath(rule.parentStyleSheet);
	/**
	* @private
	*/	
	var agent = navigator.userAgent.toLowerCase(); 	
	if (agent.indexOf("opera") != -1) {this.opera = true;}
	if(agent.indexOf("firefox")!=-1){ this.firefox = true; }
	if (agent.indexOf("msie") != -1) {this.ie = true;}
	if (agent.indexOf("msie 7.0") != -1) {this.ie7 = true;}	

	/**
	* @private
	*/
	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.MouseIcon.style.backgroundColor = '#cccccc';

	/**
	* @private
	*/
	this.waitForMouse = false;
	/**
	* @private
	*/	
	this.mouseDone = true;
	/**
	* @private
	*/	
	this.mouseTimerObj = null;
	/**
	* @private
	*/	
	this.Mouse_offX = 0;
	/**
	* @private
	*/	
	this.Mouse_offY = 0;
	/**
	* @private
	*/	
	this.MouseX = 0;
	/**
	* @private
	*/	
	this.MouseY = 0;	
	/**
	* @private
	*/	
	this.MouseOrigX = 0;
	/**
	* @private
	*/	
	this.MouseOrigY = 0;
	/**
	* @private
	*/	
	this.MouseAngle = 0;
	/**
	* @private
	*/	
	this.MouseDistance = 0;
	/**
	* @private
	*/	
	this.setMouseIcon('ntbMouse');
	/**
	* @private
	*/	
	this.targetScrollX = 0;
	/**
	* @private
	*/	
	this.targetScrollY = 0;
	/**
	* @private
	*/	
	this.startingScrollX = 0;
	/**
	* @private
	*/	
	this.startingScrollY = 0;
	/**
	* @private
	*/	
	this.inScroll = false;
	/**
	* @private
	*/	
	this.scrollTimer = null;
	/**
	* @private
	*/	
	this.scrollX = 0;
	/**
	* @private
	*/	
	this.scrollY = 0;
	/**
	* @private
	*/	
	this.onfindscroll = null;
	
	/**
	* @private
	*/
	this.MouseTargetX = 0;
	/**
	* @private
	*/	
	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);
		//this.Containers[t].object = this;
		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.display = "none";  // Modified by Aaron
		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();
	
}

/**
 * A static member used to determine whether or not to continue the tour
 * after a callout step has been destroyed.  We need this to distinuish the case
 * where the callout was destroyed from clicking the 'next' button or the [x] button
 * @private
 */
nitobi.spotlight.Spotlight.continueTour;

/**
 * @private
 */
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;
	if (this.lensType == "NONE") {
		tLs.display = "none";
	} else {
		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>';
		//tLs.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + this.StyleSheetUrl + '/' + this.lensType + '.png\', sizingMethod=\'scale\');';	
	} else {
		tL.innerHTML = '<img id="ntbLensI' + this.uid + '" src="' + this.StyleSheetUrl + '/' + this.lensType + '.png">';
	}
}

/**
 * @private
 */
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 = $('ntbLensI' + this.uid).style;
	tLi.width = this.coords.w + 'px';
	tLi.height = this.coords.h + 'px';
	}
	
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.updateScroller = function(x1,y1,x2,y2) {
	clearTimeout(this.scrollTimer);

	if (this.allowScrolling) {
	var mS = nitobi.callout.Callout.getScrollPosition();
	
	
	var newScrollY = mS.scrollTop;
	var newScrollX = mS.scrollLeft;
	if (y1<mS.scrollTop)
		var newScrollY = y1-(mS.clientHeight/4.5);

	if (x1<mS.scrollLeft)
		var newScrollX = x1-(mS.clientWidth/4.5);
		
	if (y2>(mS.scrollTop+mS.clientHeight))
		var newScrollY = y2-mS.clientHeight+(mS.clientHeight/4.5);		

	if (x2>(mS.scrollLeft+mS.clientWidth))
		var newScrollX = x2-mS.clientWidth+(mS.clientWidth/4.5);
		
	if (newScrollY < 0)
		newScrollY = 0;
		
	if (newScrollX < 0)
		newScrollX = 0;
		
	if (newScrollY > (mS.bodyHeight-mS.clientHeight))
		newScrollY = (mS.bodyHeight-mS.clientHeight+10);

	if (newScrollX > (this.oS.bodyWidth-this.oS.clientWidth))
		newScrollX = (this.oS.bodyWidth-this.oS.clientWidth);	
				

	this.targetScrollX = newScrollX; this.targetScrollY = newScrollY;
	if (!this.inScroll) {
		this.startingScrollX = mS.scrollLeft;
		this.startingScrollY = mS.scrollTop;
		this.inScroll = true;
	}
	this.scrollX = mS.scrollLeft;
	this.scrollY = mS.scrollTop;
	this.iterateScroller();
	//window.scrollTo(newScrollX,newScrollY);
	} else {
		try {
		this.onfindscroll.call();	
		} catch(e) {}
	}
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.iterateScroller = function() {

	var scrollxVelocity = 0;
	var scrollyVelocity = 0;
	var ids = this;
	var scrollxAmplitude = 10;
	var scrollyAmplitude = 10;
	var scrollxIterator = 0;
	var scrollyIterator = 0;
	
	if ((this.targetScrollX-this.scrollX) > 0)
		scrollxVelocity = 1.1;
	if ((this.targetScrollX-this.scrollX) < 0)
		scrollxVelocity = -1.1;

	if ((this.targetScrollY-this.scrollY) > 0)
		scrollyVelocity = 1.1;
	if ((this.targetScrollY-this.scrollY) < 0)
		scrollyVelocity = -1.1;
	
	scrollxAmplitude = (Math.abs(this.targetScrollX-this.startingScrollX)/20)*0.8;
	scrollyAmplitude = (Math.abs(this.targetScrollY-this.startingScrollY)/20)*0.8;
	scrollxIterator = (this.scrollX-this.startingScrollX)/(this.targetScrollX-this.startingScrollX+0.0001);
	scrollyIterator = (this.scrollY-this.startingScrollY)/(this.targetScrollY-this.startingScrollY+0.0001);
	
	
	scrollxVelocity = (this.easeInEaseOut(scrollxAmplitude, 1, scrollxIterator)*scrollxVelocity);
	scrollyVelocity = (this.easeInEaseOut(scrollyAmplitude, 1, scrollyIterator)*scrollyVelocity);
	
	this.scrollX += scrollxVelocity;
	this.scrollY += scrollyVelocity;
	
	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)) {
//if ((scrollyIterator < 0.90) || (scrollxIterator < 0.90)) {
		this.scrollTimer = setTimeout(function(){ids.iterateScroller()}, 15);
	} else {this.inScroll = false; try {this.onfindscroll.call();}catch(e){}}
//this.scrollTimer
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.setMouseIcon = function(mouseClass) {
	this.MouseIcon.className = mouseClass;
	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(mouseClass, 'backgroundImage') + '\', sizingMethod=\'crop\');';		
	} else {this.MouseIcon.style.filter = '';}	
	this.Mouse_offX = nitobi.callout.Callout.readClassAttribute(mouseClass + '_offset', 'left');
	this.Mouse_offY = nitobi.callout.Callout.readClassAttribute(mouseClass + '_offset', 'top');
	this.MouseIcon.style.left = (this.MouseX + this.Mouse_offX) + 'px';
	this.MouseIcon.style.top = (this.MouseY + this.Mouse_offY) + 'px';	
}
/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.setEffect = function(effectName) {
	this.effectMode = effectName.toUpperCase();
	
}
/**
 * Stops the tour currently in progress.
 */
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;
	
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.lensMagnify = function(objC) {
	var resObj;
	resObj = objC;
	if (this.useLens) {
		resObj.x -= parseInt(objC.w*this.lensOversize);
		resObj.y -= parseInt(objC.h*this.lensOversize);
		resObj.w += parseInt(objC.w*(this.lensOversize*2));
		resObj.h += parseInt(objC.h*(this.lensOversize*2)); 
	}	
	return resObj;
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.setEffect = function(elementid) {
	var isFake = false;

	if (elementid==null)
	{
		
		isFake = true;
		var mc = nitobi.callout.Callout.getCoords($(elementid));
		elementid="NTB_tempDiv" + this.uid;
		var me = nitobi.html.createElement('div', {"id":elementid}, {"position":"absolute", "top":mc.y+"px", "left":mc.x+"px", "width":"0px", "height":"0px"});
		document.getElementsByTagName('body').item(0).appendChild(me);
		
	}
	if(typeof(elementid) == 'string') {
		if (elementid.indexOf(':') > 0) {
			elementid = document.forms[elementid.split(':')[0]][[elementid.split(':')[1]]];
		}	
		else 
			elementid = document.getElementById(elementid);
	}
	if (typeof(elementid) == "object")
		try { elementid = elementid.id;} catch(e){}
		
	if (typeof(elementid) == "function")
		try { elementid = elementid.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 ObjCoords;
		if (elementid != this.lastID) {
		this.lastID = elementid;
		if (this.opera) {ObjCoords = nitobi.callout.Callout.getCoordsAlt($(elementid));} else {ObjCoords = nitobi.callout.Callout.getCoords($(elementid)); }
		ObjCoords = this.lensMagnify(ObjCoords);
		this.coords = ObjCoords;
		this.ContainerCoords[0][0] = 0; this.ContainerCoords[0][1] = 0;
		this.ContainerCoords[0][2] = sP.bodyWidth; this.ContainerCoords[0][3] = ObjCoords.y;
		this.ContainerCoords[1][0] = 0; this.ContainerCoords[1][1] = ObjCoords.y;
		this.ContainerCoords[1][2] = ObjCoords.x; this.ContainerCoords[1][3] = ObjCoords.h;
		this.ContainerCoords[2][0] = ObjCoords.x+ObjCoords.w; this.ContainerCoords[2][1] = ObjCoords.y;
		this.ContainerCoords[2][2] = sP.bodyWidth-(ObjCoords.x+ObjCoords.w); this.ContainerCoords[2][3] = ObjCoords.h;
		this.ContainerCoords[3][0] = 0; this.ContainerCoords[3][1] = ObjCoords.y+ObjCoords.h;
		this.ContainerCoords[3][2] = sP.bodyWidth; this.ContainerCoords[3][3] = sP.bodyHeight-(ObjCoords.y+ObjCoords.h);			
		} else {
			ObjCoords = 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 (isFake) document.getElementsByTagName("body").item(0).removeChild($(elementid));	
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.swipeIn = function() {
var fd = this;
if (this.swipePos < this.swipeEnd-3) {
	var iteratorStart = this.swipePos-this.swipeStart;
	var iteratorEnd = this.swipeEnd-this.swipeStart;	
	this.swipePos += ((iteratorStart/iteratorEnd)*700)+2;
	this.setEffect(this.lastID);
	setTimeout(function(){fd.swipeIn()}, 30);
} else {
	this.swipePos = nitobi.callout.Callout.permHeight;
	this.setEffect(this.lastID);
	
}
	
	
}




/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.swipeOut = function() {
var fd = this;
if (this.swipePos > (this.swipeStart+3)) {
	var iteratorStart = this.swipePos-this.swipeStart;
	var iteratorEnd = this.swipeEnd-this.swipeStart;	
	this.swipePos -= ((iteratorStart/iteratorEnd)*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;
	
}
	
	
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.initEffect = function() {
	var referenceStep = 0;
	for (var d = 0; d < this.stepArray.length; d++) {
		if (this.stepArray[d][3] == 'OBJID') {
			referenceStep = d;
			var elementid = this.stepArray[referenceStep][0];			
			break;
		}
		if (this.stepArray[d][3] == 'EXECFORMHELPER') {
			if ((this.firefox) || (this.opera)) {
				if (this.stepArray[this.currentStep][0].id == undefined || this.stepArray[this.currentStep][0].id.length == 0)
					this.stepArray[d][0].id = 'ff' + Math.random();
				var elementid = this.stepArray[d][0].id;
			}
			if (this.ie) { 
				if (this.stepArray[d][0].id.length == 0)
					var elementid = this.stepArray[d][0].id;
				else
					var elementid = this.stepArray[d][0].name;
			}
			referenceStep = d;
			break;
		}		
	}

	var sP = nitobi.callout.Callout.getScrollPosition();
	this.effectMode = "NONE"; // Added by Aaron

	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(elementid);
		this.swipeIn();

		for (var t = 0; t < 4; t++){
			this.Containers[t].style.visibility = "visible";	
		}		
		
	}
	
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.endEffect = function(effectName) {
	var referenceStep = 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;
	}
}

/**
* @private
*/
nitobi.spotlight.Spotlight.prototype.runFormHelper = function(infoArray) {
	var ff = this;
	var passOK = true;	
	if (this.waitForMouse) {
		if (!this.mouseDone)
			passOK = false;
	}
	if (passOK) {
		
	if (typeof(infoArray[0]) == 'string') {
		if(infoArray[0].indexOf(':') != -1)
			infoArray[0] = document.forms[infoArray[0].split(':')[0]][[infoArray[0].split(':')[1]]];
		else
			infoArray[0] = document.getElementById(infoArray[0]);
	}
		
	if (infoArray[4] == "TYPETEXT") {
		if (this.textIterator == 0) {	
			infoArray[0].focus();
		}
	
		this.textIterator++;
		
		if (this.textIterator < infoArray[2].length+1) {
			
			infoArray[0].value = infoArray[2].substring(0,this.textIterator);
			if (infoArray[0].onkeydown != null)
				infoArray[0].onkeydown.call();
			if (infoArray[0].onkeyup != null)
				infoArray[0].onkeyup.call();
			if (infoArray[0].onkeypress != null)				
				infoArray[0].onkeypress.call();
			var mydelay = 80;
			if (Math.round((Math.random()*9)+1) > 7) {
				mydelay = Math.round((Math.random()*250)+1);
			}
			setTimeout(function() {ff.runFormHelper(infoArray)}, mydelay);
		} else
		{
			infoArray[0].blur();
		
			setTimeout(function() {ff.play()}, this.stepArray[this.currentStep][1]);
		}
		
	}
	} else {
	
		setTimeout(function(){ff.runFormHelper(infoArray)}, 250);
	
	}
	
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.easeInEaseOut = function(Velocity, MinVelocity, Iterator) {

	//var resultVelocity = ((Math.sin(Iterator*3.141592-3.141592/2)+1)/2)*Velocity;
	var NewIterator = 0.5;
	if (Iterator > 0.7)
	{
		NewIterator = (Iterator-0.4) / 0.6;
	}
	if (Iterator < 0.15)
	{
		NewIterator = Iterator / 0.3;
	}	
	
	var resultVelocity = (Math.sin((parseFloat(NewIterator)*180)*(3.141592/180)))*Velocity;

	if (resultVelocity < MinVelocity)
		resultVelocity = MinVelocity;

	return resultVelocity;
}

/**
 * @private
 */
nitobi.spotlight.Spotlight.prototype.moveMouseXY = function(TargetX, TargetY) {
	this.MouseTargetX = TargetX;
	this.MouseTargetY = TargetY;	
	var fk = this;
	clearTimeout(this.mouseTimerObj);
	var xdif = (TargetX-this.MouseOrigX);
	var ydif = (TargetY-this.MouseOrigY);
	var cxdif = (TargetX-this.MouseX)+0.0000000001;
	var cydif = (TargetY-this.MouseY);		
	var totalDistance = Math.round(Math.sqrt((xdif*xdif)+(ydif*ydif)))+0.001;
	var currentDistance = Math.round(Math.sqrt((cxdif*cxdif)+(cydif*cydif)));
	var currentIterator = ((totalDistance-currentDistance)/totalDistance);

	if ((Math.abs(TargetX-this.MouseX) > 3) || (Math.abs(TargetY-this.MouseY) > 3)) {
	var mySlope = cydif/cxdif;
	var myVelocity = this.easeInEaseOut((totalDistance/80)*5.5, 0, currentIterator)+1;
	var incx = 0;
	var incy = 0;
	if (mySlope <= 0) {
		
		if (TargetX >= this.MouseX) {
			incx = 1;
			incy = mySlope;
		} else {
			incx = -1;
			incy = -mySlope;		
		}
	
	} else {
		if (TargetX >= this.MouseX) {
			incx = 1;
			incy = mySlope;
		} else {
			incx = -1;
			incy = -mySlope;		
		}	
	}
	
	if (Math.abs(mySlope) > 1.0) {
		var tmpx = Math.abs(incx);
		var tmpy = Math.abs(incy);
		var newx,newy;
		if (tmpx < tmpy){
			if (incx > 0) {
				newx = tmpx/tmpy;} else {newx = -tmpx/tmpy;}
			if (incy > 0) {
				newy = 1;} else {newy = -1;}
		} else {
			if (incy > 0) {
				newy = tmpy/tmpx;} else {newy = -tmpy/tmpx;}
			if (incx > 0) {
				newx = 1;} else {newx = -1;}
		}
		incx = newx;
		incy = newy;
	}
	this.MouseX += incx*myVelocity;
	this.MouseY += incy*myVelocity;

	var arcAmp = Math.sin((currentIterator+0.01)*3.1415927) * (this.MouseDistance/100)*13;
	var ofscc = nitobi.lang.Math.rotateCoords(0, -arcAmp, this.MouseAngle);
	this.MouseIcon.style.left = this.MouseX + this.Mouse_offX + ofscc.x + "px";
	this.MouseIcon.style.top = this.MouseY + this.Mouse_offY + ofscc.y + "px";	
	//this.MouseIcon.style.left = this.MouseX + this.Mouse_offX;
	//this.MouseIcon.style.top = this.MouseY + this.Mouse_offY;	
	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") {
				//var mynewobj = $();
			} else {
				if (typeof(this.stepArray[this.currentStep][0]) == "string")
					try { var mynewobj = $(this.stepArray[this.currentStep][0]); } catch(e){}
				if (typeof(this.stepArray[this.currentStep][0]) == "function")
					try { var mynewobj = $(this.stepArray[this.currentStep][0].call()); } catch(e){}				
			}
			
			try{
				mynewobj.onmouseover.call();
			} catch(e) {}		
			try{
				mynewobj.onmousedown.call();
			} catch(e) {}
						
			setTimeout(function(){fk.setMouseIcon("ntbMouse"); try{mynewobj.onmouseup.call();} catch(e) {}	try{ if (mynewobj.tagName != 'IMG'){mynewobj.onclick.call();}} catch(e) { try {if (mynewobj.href != null) {if (mynewobj.href != '#'){window.location=mynewobj.href;}}}catch(e){}} try{	mynewobj.onmouseout.call();} catch(e){}},100);
			setTimeout(function() {fk.play()}, 100+this.stepArray[this.currentStep][1]);
			
		}
			
			
	}
	

}

/**
 * Creates a simulated text field entry.  
 * @param {Object|String} formField A reference to the form field OR a hash 'myformname:myfieldname'
 * @param {String} myAction The action to take on the input field.  Currently only the following are supported: "TYPETEXT"
 * @param {Number} delayAfter How long to wait after it is finished before advancing to the next step.
 * @param {String} myText The text to type.
 * @param {Boolean} setFocus True to have the mouse and lens move to the text field.
 */
nitobi.spotlight.Spotlight.prototype.createFormHelperStep = function(formField, myAction, delayAfter, myText, setFocus) {
	this.stepArray[this.stepArray.length] = Array(6);
	this.stepArray[this.stepArray.length-1][0] = formField;
	if (delayAfter != null) {this.stepArray[this.stepArray.length-1][1] = delayAfter;} else {this.stepArray[this.stepArray.length-1][1] = 100;}
	this.stepArray[this.stepArray.length-1][2] = myText;	
	this.stepArray[this.stepArray.length-1][3] = "EXECFORMHELPER";	
	this.stepArray[this.stepArray.length-1][4] = myAction.toUpperCase();
	if (setFocus != null)
	{this.stepArray[this.stepArray.length-1][5] = setFocus} else {this.stepArray[this.stepArray.length-1][5] = true}
}

/**
 * Creates a simulated mouse movement.  
 * @param {String} myAction The type of mouse movement to simulate.  The currently supported options
 * are "APPEARONOBJECT", "CLICKONOBJECT", or "MOVETOOBJECT"
 * @param {Object|String} myObj A reference to the form field OR a hash 'myformname:myfieldname'
 * @param {Number} delayAfter How long to wait after it is finished before advancing to the next step.
 */
nitobi.spotlight.Spotlight.prototype.createMouseStep = function(myAction, myObj, delayAfter) {
	this.stepArray[this.stepArray.length] = Array(6);
	this.stepArray[this.stepArray.length-1][0] = myObj;
	if (delayAfter != null) {this.stepArray[this.stepArray.length-1][1] = delayAfter;} else {this.stepArray[this.stepArray.length-1][1] = 100;}
	this.stepArray[this.stepArray.length-1][2] = myAction.toUpperCase();		
	this.stepArray[this.stepArray.length-1][3] = "MOUSEACTION";		
//console.log("StepArray.Length = " + this.stepArray.length);
}

/**
 * Executes some javascript in sequence.
 * @param {String} myCode Some source code to execute or a function reference.
 * @param {Number} delayAfter How long to wait after it is finished before advancing to the next step.
 */
nitobi.spotlight.Spotlight.prototype.createCodeStep = function(myCode, delayAfter) {
	this.stepArray[this.stepArray.length] = Array(6);
	this.stepArray[this.stepArray.length-1][0] = myCode;
	if (delayAfter != null) {this.stepArray[this.stepArray.length-1][1] = delayAfter;} else {this.stepArray[this.stepArray.length-1][1] = 100;}
	this.stepArray[this.stepArray.length-1][3] = "EXECCODE";		
}

/**
 * Creates a Callout on an object.  
 * @param {String} elementid The ID of a DOM element to attach to. 
 * @param {String} [stepTitle] What to make the callout title.
 * @param {String} [stepBody] What to make the callout body text.
 */
nitobi.spotlight.Spotlight.prototype.createCalloutStep = function(elementid, stepTitle, stepBody) {
	this.stepArray[this.stepArray.length] = Array(6);
	this.stepArray[this.stepArray.length-1][0] = elementid;
	this.stepArray[this.stepArray.length-1][1] = stepTitle;	
	this.stepArray[this.stepArray.length-1][2] = stepBody;	
	this.stepArray[this.stepArray.length-1][3] = "OBJID";		
}

/**
 * Sends the lens focus to an object.  
 * @param {String} elementid The ID of a DOM element to attach to. 
 * @param {Int} delayAfter How long to wait after it is finished before advancing to the next step.
 */
nitobi.spotlight.Spotlight.prototype.createFocusStep = function(elementid, delayAfter) {
	this.stepArray[this.stepArray.length] = Array(6);
	this.stepArray[this.stepArray.length-1][0] = elementid;
	this.stepArray[this.stepArray.length-1][3] = "FOCUSID";		
	if (delayAfter != null) {this.stepArray[this.stepArray.length-1][1] = delayAfter;} else {this.stepArray[this.stepArray.length-1][1] = 100;}
}

/**
 * Begins playback of the Spotlight tour.  
 */
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.waitForMouse = false;
	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] == "MOUSEACTION") console.log("PROCESSING: " + this.stepArray[this.currentStep]); // Added by Aaron
		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; $(\"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>");
			//onclick='$(\"close" + this.callout.uid + "\").onmouseup.call(); return false;'
			
			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.callout = null;
			this.setMouseIcon('ntbMouse');
			if (this.opera) {var ObjCoords = nitobi.callout.Callout.getCoordsAlt($(this.stepArray[this.currentStep][0]));} else {var ObjCoords = nitobi.callout.Callout.getCoords($(this.stepArray[this.currentStep][0])); }			
				ObjCoords = this.lensMagnify(ObjCoords);
				this.updateScroller(ObjCoords.x,ObjCoords.y,ObjCoords.x+ObjCoords.w, ObjCoords.y+ObjCoords.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,ObjCoords.x+(ObjCoords.w*0.8),ObjCoords.y+(ObjCoords.h/2));
				this.MouseDistance = nitobi.lang.Math.returnDistance(this.MouseX,this.MouseY,ObjCoords.x+(ObjCoords.w*0.8),ObjCoords.y+(ObjCoords.h/2));
				this.moveMouseXY(ObjCoords.x+(ObjCoords.w*0.8), ObjCoords.y+(ObjCoords.h/2));
				
			}
			this.callout.HaltAttributes = false; this.callout.assignAttributes();
		}
		
		if (this.stepArray[this.currentStep][3] == "FOCUSID") {
			if (this.opera) {var ObjCoords = nitobi.callout.Callout.getCoordsAlt($(this.stepArray[this.currentStep][0]));} else {var ObjCoords = nitobi.callout.Callout.getCoords($(this.stepArray[this.currentStep][0])); }			
			this.setEffect(this.stepArray[this.currentStep][0]);
			ObjCoords = this.lensMagnify(ObjCoords);
			this.updateScroller(ObjCoords.x,ObjCoords.y,ObjCoords.x+ObjCoords.w, ObjCoords.y+ObjCoords.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]);
//console.log("X="+X+", Y="+Y);
//console.log("{EXECCODE: Delay for "+this.stepArray[this.currentStep][1]+" ms");
		}
		
		if (this.stepArray[this.currentStep][3] == "EXECFORMHELPER") {
			var targetId = '';
			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))
			{
				//PhotoDetails:field_titleBox
				if (this.stepArray[this.currentStep][0].id == undefined || 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);
					targetId = this.stepArray[this.currentStep][0].id;
			}
			if (this.ie)
			{ 
				if(this.stepArray[this.currentStep][0].id != null && this.stepArray[this.currentStep][0].length > 0)
					targetId = this.stepArray[this.currentStep][0].id;
				else
					targetId = this.stepArray[this.currentStep][0].name;
				
				if (this.stepArray[this.currentStep][5])
					this.setEffect(targetId);
			}
			
			if (this.opera) {var ObjCoords = nitobi.callout.Callout.getCoordsAlt($(targetId));} else {var ObjCoords = nitobi.callout.Callout.getCoords($(targetId)); }		
			ObjCoords = this.lensMagnify(ObjCoords);
			this.updateScroller(ObjCoords.x,ObjCoords.y,ObjCoords.x+ObjCoords.w, ObjCoords.y+ObjCoords.h);
			
			if (this.useMouse) {

				this.MouseOrigX = this.MouseX; this.MouseOrigY = this.MouseY;
				this.MouseAngle = nitobi.lang.Math.returnAngle(this.MouseX,this.MouseY,ObjCoords.x+(ObjCoords.w*0.8),ObjCoords.y+(ObjCoords.h/2));
				this.MouseDistance = nitobi.lang.Math.returnDistance(this.MouseX,this.MouseY,ObjCoords.x+(ObjCoords.w*0.8),ObjCoords.y+(ObjCoords.h/2));
				this.moveMouseXY(ObjCoords.x+(ObjCoords.w*0.8), ObjCoords.y+(ObjCoords.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 mynewobj = $(this.stepArray[this.currentStep][0]); } catch(e){}
				if (typeof(this.stepArray[this.currentStep][0]) == "function")
					try { 
					var mynewobj = $(this.stepArray[this.currentStep][0].call());
					} catch(e){}
					
				if (this.opera) {var ObjCoords = nitobi.callout.Callout.getCoordsAlt(mynewobj);} else {var ObjCoords = nitobi.callout.Callout.getCoords(mynewobj); }
				this.MouseX = ObjCoords.x+(ObjCoords.w*0.8);
				this.MouseY = ObjCoords.y+(ObjCoords.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 mynewobj = $(this.stepArray[this.currentStep][0]); } catch(e){}
				if (typeof(this.stepArray[this.currentStep][0]) == "function")
					try { 
					var mynewobj = $(this.stepArray[this.currentStep][0].call());
					} catch(e){}
					
				if (this.opera) {var ObjCoords = nitobi.callout.Callout.getCoordsAlt(mynewobj);} else {var ObjCoords = nitobi.callout.Callout.getCoords(mynewobj); }
				ObjCoords = this.lensMagnify(ObjCoords);
				this.updateScroller(ObjCoords.x,ObjCoords.y,ObjCoords.x+ObjCoords.w, ObjCoords.y+ObjCoords.h);
				this.MouseOrigX = this.MouseX; this.MouseOrigY = this.MouseY;
				this.MouseAngle = nitobi.lang.Math.returnAngle(this.MouseX,this.MouseY,ObjCoords.x+(ObjCoords.w*0.8),ObjCoords.y+(ObjCoords.h/2));
				this.MouseDistance = nitobi.lang.Math.returnDistance(this.MouseX,this.MouseY,ObjCoords.x+(ObjCoords.w*0.8),ObjCoords.y+(ObjCoords.h/2));
				this.moveMouseXY(ObjCoords.x+(ObjCoords.w*0.8), ObjCoords.y+(ObjCoords.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 mynewobj = $(this.stepArray[this.currentStep][0]); } catch(e){}
				if (typeof(this.stepArray[this.currentStep][0]) == "function")
					try { 
					var mynewobj = $(this.stepArray[this.currentStep][0].call());
					} catch(e){}					

				if (this.opera) {var ObjCoords = nitobi.callout.Callout.getCoordsAlt(mynewobj);} else {var ObjCoords = nitobi.callout.Callout.getCoords(mynewobj); }
				ObjCoords = this.lensMagnify(ObjCoords);
				this.updateScroller(ObjCoords.x,ObjCoords.y,ObjCoords.x+ObjCoords.w, ObjCoords.y+ObjCoords.h);
				this.MouseOrigX = this.MouseX; this.MouseOrigY = this.MouseY;
				this.MouseAngle = nitobi.lang.Math.returnAngle(this.MouseX,this.MouseY,ObjCoords.x+(ObjCoords.w*0.8),ObjCoords.y+(ObjCoords.h/2));
				this.MouseDistance = nitobi.lang.Math.returnDistance(this.MouseX,this.MouseY,ObjCoords.x+(ObjCoords.w*0.8),ObjCoords.y+(ObjCoords.h/2));
				this.moveMouseXY(ObjCoords.x+(ObjCoords.w*0.8), ObjCoords.y+(ObjCoords.h/3));				
				
			}						
			
		}		
		
	} else {
		this.stepArray = new Array();
		this.currentStep = 0;
//		this.onfindscroll = function(){ds.endEffect();}
//		this.updateScroller(0,0,0,0);
		
		
		//this.callout.destroy();
		
		
	}
	
	
}

