if(!Binocs){var Binocs={};
}Binocs.BUBSIZE_LARGE=0;
Binocs.BUBSIZE_MED=1;
Binocs.BUBSIZE_SMALL=2;
Binocs.BUBUP=0;
Binocs.BUBDOWN=1;
Binocs.TAB_MODE=false;
Binocs.NUM_TABS=2;
Binocs.P_SIZEPARAM=["1","2","3"];
Binocs.S_SIZEPARAM=["large","medium","small"];
Binocs.LOFFSET=2;
Binocs.BUB_PAD=20;
Binocs.EL_PAD=0;
Binocs.TAB_HEIGHT=0;
Binocs.INFO_HEIGHT=0;
Binocs.init=function(A){if(A&&A==1){Binocs.TAB_HEIGHT=30;
Binocs.INFO_HEIGHT=38;
Binocs.EL_PAD=14;
Binocs.BUB_DIM=[[554,Binocs.BUB_PAD+Binocs.TAB_HEIGHT+Binocs.EL_PAD+Binocs.P_DIM[0][1]+Binocs.EL_PAD+Binocs.INFO_HEIGHT+Binocs.BUB_PAD],[390,Binocs.BUB_PAD+Binocs.TAB_HEIGHT+Binocs.EL_PAD+Binocs.P_DIM[1][1]+Binocs.EL_PAD+Binocs.INFO_HEIGHT+Binocs.BUB_PAD],[280,Binocs.BUB_PAD+Binocs.TAB_HEIGHT+Binocs.EL_PAD+Binocs.P_DIM[2][1]+Binocs.EL_PAD+Binocs.INFO_HEIGHT+Binocs.BUB_PAD]];
Binocs.TAB_MODE=true;
}};
Binocs.SPRITE_WIDTH=554;
Binocs.SPRITE_HEIGHT=540;
Binocs.P_DIM=[[520,391],[350,263],[240,180]];
Binocs.BUB_DIM=[[554,477],[390,345],[280,262]];
Binocs.HPIMG_NAME=["hpimg_162x40.png","hpimg_138x34.png","hpimg_138x34.png"];
Binocs.HPIMG_DIM=[[162,40],[138,34],[138,34]];
Binocs.BUB_IDX_DEFAULT=-100;
Binocs._curBubIdx=Binocs.BUB_IDX_DEFAULT;
Binocs.b_PIP=false;
Binocs.b_c=function(F){if(!document.layers&&Binocs.b_PIP){var G=Binocs.bubSize();
var E=Binocs.bup(F);
var H,D,I,C,A;
H=$("b_Prev");
D=$("b_C");
I=$("r"+F+"_b");
var B=Binocs.b_Pos(I)[1];
if(E==Binocs.BUBUP){A=B-Binocs.BUB_DIM[G][1]+45;
}else{A=B-34;
}H.style.top=A+"px";
H.style.left=Binocs.b_Pos(I)[0]+30+"px";
if(a10.browser.isIE6()){D.style.top=H.offsetTop;
D.style.left=H.offsetLeft;
D.style.width=Binocs.BUB_DIM[G][0]-10;
D.style.height=Binocs.BUB_DIM[G][1]-10;
D.style.filter="mask()";
D.style.zIndex=H.style.zIndex-1;
D.style.display="";
}H.style.visibility="visible";
Binocs._curBubIdx=F;
}};
Binocs.b_s=function(binoc,p,io,destUri,pickObj,mjEnabled,mode,statObj){if(Binocs._curBubIdx!=io){Binocs.b_doHide();
}else{if(Binocs._hideTO){clearTimeout(Binocs._hideTO);
return ;
}}if(a10.zoom){a10.zoom.closeBubble();
}if(a10.nb){a10.nb.close();
}a10.ss.closePopup();
Binocs.init(mode);
var preview=false;
var statistics=false;
if(Binocs.TAB_MODE){if(binoc&&binoc!=""){preview=true;
}if(statObj&&statObj!=""){statistics=true;
statObj=eval(statObj);
}}else{preview=true;
}if(!document.layers&&document.getElementById){var bubsize=Binocs.bubSize();
var up=Binocs.bup(io);
var b_P,en,eo,pt,sld,url,ref,bub;
b_P=$("b_Prev");
var bubbleWidth=Binocs.BUB_DIM[bubsize][0];
var bubbleHeight=Binocs.BUB_DIM[bubsize][1];
var bubblePadding=Binocs.BUB_PAD;
var lOffset=Binocs.LOFFSET;
b_P.innerHTML="";
var prevContainer=document.createElement("div");
prevContainer.id="b_PrevContentsContainer";
prevContainer.style.position="absolute";
var helpContainer=document.createElement("div");
helpContainer.id="b_HelpContentsContainer";
helpContainer.style.position="absolute";
var statContainer=document.createElement("div");
statContainer.id="b_StatContentsContainer";
statContainer.style.position="absolute";
new a10.Bubble(b_P,prevContainer,bubbleWidth-(bubblePadding),bubbleHeight-(bubblePadding*2),up==Binocs.BUBDOWN?"left-high":"left",false,null,0);
var bubbleBg=document.createElement("div");
bubbleBg.style.backgroundColor="#FFF";
bubbleBg.style.position="absolute";
bubbleBg.style.top=bubblePadding+"px";
bubbleBg.style.left=lOffset+bubblePadding+"px";
bubbleBg.style.width=bubbleWidth-(bubblePadding*2)+"px";
bubbleBg.style.height=bubbleHeight-bubblePadding-bubblePadding+"px";
bubbleBg.onmouseover=Binocs.b_bubmover;
bubbleBg.onmouseout=Binocs.b_h;
b_P.appendChild(bubbleBg);
if(Binocs.TAB_MODE){var tabContainer=document.createElement("div");
tabContainer.id="b_TabContainer";
tabContainer.style.position="absolute";
tabContainer.style.left=lOffset+bubblePadding+"px";
tabContainer.style.top=bubblePadding+"px";
tabContainer.style.height=Binocs.TAB_HEIGHT+"px";
tabContainer.style.width=Binocs.P_DIM[bubsize][0]+"px";
var ul=document.createElement("ul");
var prevTab;
var statTab;
var emptyTab;
var tabCount=0;
if(preview){var prevTab=document.createElement("li");
prevTab.id="prevTab";
prevTab.style.width=(Binocs.P_DIM[bubsize][0]/2)-1+"px";
prevTab.style.height="29px";
var lip=$("b_PreviewTabLink").cloneNode(true);
lip.onmousedown=function(event){spk(this,pickObj);
Binocs.highlightTab("prevTab");
Binocs.switchPrevViewOn();
};
prevTab.appendChild(lip);
prevTab.first=true;
ul.appendChild(prevTab);
tabCount++;
}if(statistics){var statTab=document.createElement("li");
statTab.id="statTab";
if(!$(prevTab)){statTab.first=true;
}statTab.style.width=(Binocs.P_DIM[bubsize][0]/2)-1+"px";
statTab.style.height="29px";
var lis=$("b_StatisticsTabLink").cloneNode(true);
statTab.appendChild(lis);
ul.appendChild(statTab);
lis.onmousedown=function(event){spk(this,statObj.pickObj);
Binocs.highlightTab("statTab");
Binocs.switchStatViewOn();
};
tabCount++;
}if(tabCount<2){emptyTab=document.createElement("li");
emptyTab.id="emptyTab";
emptyTab.style.width=Binocs.P_DIM[bubsize][0]/2+"px";
emptyTab.style.height="29px";
emptyTab.innerHTML="";
ul.appendChild(emptyTab);
tabCount++;
}tabContainer.appendChild(ul);
tabContainer.onmouseover=Binocs.b_bubmover;
tabContainer.onmouseout=Binocs.b_h;
b_P.appendChild(tabContainer);
}b_P.appendChild(prevContainer);
b_P.appendChild(helpContainer);
b_P.appendChild(statContainer);
if(preview){Binocs.initPreview(binoc,p,pickObj,mjEnabled,io,destUri,bubsize,prevContainer);
}if(statistics){Binocs.initStatView(p,io,statObj,preview);
}Binocs.initTab();
}};
Binocs.initTab=function(){var A=$("prevTab");
if(A){Binocs.highlightTab(A.id);
return ;
}var B=$("statTab");
if(B){Binocs.highlightTab(B.id);
return ;
}};
Binocs.highlightTab=function(D){var B=["prevTab","statTab","emptyTab"];
var A=$(D);
if(A){A.style.backgroundImage="";
A.style.backgroundColor="#fff";
A.style.border="0px none";
if(A.first){A.style.borderRight="1px solid #b9b9b9";
}else{A.style.borderLeft="1px solid #b9b9b9";
}}for(i=0;
i<B.length;
i++){if(D!=B[i]){var C=$(B[i]);
if(C){C.style.background="url("+Binocs.imageTab+") repeat-x";
C.style.border="0px none";
}}}};
Binocs.initPreview=function(O,M,G,R,E,A,L,Q){M.u=Binocs.previewImagePath+O+"&size="+Binocs.P_SIZEPARAM[L];
if(navigator.userAgent.toLowerCase().indexOf("msie 5")>-1){ref=M.u;
}else{ref=_RP(M);
}Binocs.b_PIP=true;
var N=Binocs.BUB_DIM[L][0];
var V=Binocs.BUB_DIM[L][1];
var T=Binocs.BUB_PAD;
var B=Binocs.LOFFSET;
var C=document.createElement("a");
C.href=A;
C.style.textDecoration="none";
C.onmousedown=function(W){return fp(this,G,R,E);
};
var F=B+(T);
var D=T+Binocs.TAB_HEIGHT+Binocs.EL_PAD;
var I=document.createElement("img");
I.id="binocImg"+E;
I.width=Binocs.P_DIM[L][0];
I.height=Binocs.P_DIM[L][1];
I.onload=function(){Binocs.b_c(E);
};
var U=Binocs.previewErrorImagePath.replace(/SIZE/,L);
I.onerror=function(){this.src=U;
};
I.style.position="absolute";
I.style.left=F+"px";
I.style.top=D+"px";
I.style.border="0";
I.onmouseover=Binocs.b_bubmover;
I.onmouseout=Binocs.b_h;
C.appendChild(I);
Q.appendChild(C);
var K=document.createElement("div");
K.style.position="absolute";
K.style.width=Binocs.P_DIM[L][0]+"px";
K.style.height=Binocs.INFO_HEIGHT+"px";
K.style.left=B+T+"px";
if(!Binocs.TAB_MODE){K.style.marginTop=T+Binocs.TAB_HEIGHT+Binocs.EL_PAD+Binocs.P_DIM[L][1]+Binocs.EL_PAD+10+"px";
}else{K.style.marginTop=T+Binocs.TAB_HEIGHT+Binocs.EL_PAD+Binocs.P_DIM[L][1]+Binocs.EL_PAD+"px";
}K.onmouseover=Binocs.b_bubmover;
K.onmouseout=Binocs.b_h;
K.innerHTML=$("b_PrevInfo"+E).innerHTML;
Q.appendChild(K);
var S=document.createElement("img");
S.style.position="absolute";
S.style.width="16px";
S.style.height="16px";
S.style.top=V-T-20+"px";
if(L==Binocs.BUBSIZE_LARGE){S.style.left=(B+T)+Binocs.P_DIM[L][0]-21+"px";
}else{S.style.left=(B+T)+Binocs.P_DIM[L][0]-16+"px";
}S.style.border="0";
S.style.cursor="pointer";
S.onmouseover=Binocs.b_bubmover;
S.onmouseout=Binocs.b_h;
S.onclick=function(){Binocs.switchHelpViewOn(E);
};
Q.appendChild(S);
S.src=Binocs.imageHelpIcon;
I.src=ref;
var P=$("hpimg_"+E);
if(P!=null){var J=document.createElement("img");
J.id="HPImg"+E;
J.width=Binocs.HPIMG_DIM[L][0];
J.height=Binocs.HPIMG_DIM[L][1];
J.style.position="absolute";
J.style.left=F+(Binocs.P_DIM[L][0]-Binocs.HPIMG_DIM[L][0])/2+"px";
J.style.top=D+(Binocs.P_DIM[L][1]-Binocs.HPIMG_DIM[L][1])/2+"px";
J.style.border="0";
J.onmouseover=Binocs.b_bubmover;
J.onmouseout=Binocs.b_h;
C.appendChild(J);
Q.appendChild(C);
var H=Binocs.imageOverlayPath+Binocs.HPIMG_NAME[L];
if(a10.browser.isIE6()){J.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+H+"', sizingMethod='none')";
J.src=Binocs.imageTransparent;
}else{J.src=H;
}}};
Binocs.b_h=function(){if(!document.layers){Binocs._hideTO=setTimeout(Binocs.b_doHide,200);
}};
Binocs.b_doHide=function(){if(Binocs._hideTO){clearTimeout(Binocs._hideTO);
}Binocs.b_PIP=false;
$("b_Prev").style.visibility="hidden";
if($("b_PrevContentsContainer")){$("b_PrevContentsContainer").style.visibility="hidden";
}if($("b_HelpContentsContainer")){$("b_HelpContentsContainer").style.visibility="hidden";
}if($("b_StatContentsContainer")){$("b_StatContentsContainer").style.visibility="hidden";
}$("b_C").style.display="none";
Binocs._hideTO=false;
Binocs._curBubIdx=Binocs.BUB_IDX_DEFAULT;
};
Binocs.b_bubmover=function(){if(Binocs._hideTO){clearTimeout(Binocs._hideTO);
}};
Binocs.switchHelpViewOn=function(I){var E=$("b_HelpContentsContainer");
var L=$("b_PrevContentsContainer");
if(E&&L){var J=Binocs.bubSize();
var G=Binocs.bup(I);
if(E.childNodes.length==0){var B=Binocs.BUB_DIM[J][1];
var K=Binocs.BUB_PAD;
var A=Binocs.LOFFSET;
var H=12;
var D=document.createElement("div");
D.id="b_bubHelpContent";
D.style.position="absolute";
D.style.width=Binocs.P_DIM[J][0]+"px";
D.style.height=Binocs.P_DIM[J][1]+H+"px";
D.style.left=A+K+"px";
if(Binocs.TAB_MODE){D.style.marginTop=K+Binocs.TAB_HEIGHT+5+"px";
}else{D.style.top=K+5+"px";
}D.style.overflow="auto";
D.onmouseover=Binocs.helpMOver;
D.onmouseout=Binocs.helpMOut;
var M=$("b_PrevHelp").innerHTML;
if(J==Binocs.BUBSIZE_LARGE||J==Binocs.BUBSIZE_MED){M=M.replace(/T3/g,'class="T1"');
var C=10;
D.style.left=A+K+C+"px";
D.style.top=K+C+"px";
D.style.width=Binocs.P_DIM[J][0]-(C*2)+"px";
}D.innerHTML='<a id="binocHelpFocusAnchor" href="javascript:void(null)" style="cursor: default"></a>'+M;
E.appendChild(D);
var F=document.createElement("div");
F.style.position="absolute";
if(J==Binocs.BUBSIZE_LARGE){F.style.width=Binocs.P_DIM[J][0]-5+"px";
}else{F.style.width=Binocs.P_DIM[J][0]+"px";
}F.style.top=B-K-20+"px";
F.style.left=A+K+"px";
F.style.textAlign="right";
F.onmouseover=Binocs.b_bubmover;
F.onmouseout=Binocs.b_h;
F.innerHTML=$("b_HelpBackLink").innerHTML;
E.appendChild(F);
}L.style.visibility="hidden";
E.style.visibility="visible";
$("binocHelpFocusAnchor").focus();
}};
Binocs.switchHelpViewOff=function(){var A=$("b_HelpContentsContainer");
var B=$("b_PrevContentsContainer");
if(A&&B){A.style.visibility="hidden";
B.style.visibility="visible";
}};
Binocs.initStatView=function(L,F,P,K){var I=Binocs.bubSize();
var E=Binocs.statisticsImagePath.replace(/SIZE/,Binocs.S_SIZEPARAM[I]);
E=E.replace(/DOMAIN/,P.domain);
var C=Binocs.statisticsErrorImagePath.replace(/SIZE/,I);
if(!K){L.u=E;
if(navigator.userAgent.toLowerCase().indexOf("msie 5")>-1){ref=L.u;
}else{ref=_RP(L);
}Binocs.b_PIP=true;
}else{ref=E;
}var A=$("b_StatContentsContainer");
if(A){var G=Binocs.bup(F);
if(A.childNodes.length==0){var S=Binocs.BUB_DIM[I][1];
var R=Binocs.BUB_PAD;
var D=Binocs.LOFFSET;
var J=D+(R);
var N=R+Binocs.TAB_HEIGHT+Binocs.EL_PAD;
var O=Binocs.statisticsReportPath.replace(/DOMAIN/,P.domain);
var Q=document.createElement("a");
Q.href=O;
Q.style.textDecoration="none";
Q.onmousedown=function(T){return ct(this,44137);
};
var H=document.createElement("img");
H.id="statImg"+F;
H.width=Binocs.P_DIM[I][0];
H.height=Binocs.P_DIM[I][1];
if(!K){H.onload=function(){Binocs.b_c(F);
};
}H.onerror=function(){this.src=C;
};
H.style.position="absolute";
H.style.left=J+"px";
H.style.top=N+"px";
H.style.border="0";
H.onmouseover=Binocs.b_bubmover;
H.onmouseout=Binocs.b_h;
Q.appendChild(H);
A.appendChild(Q);
if(K){A.style.visibility="hidden";
}var B=document.createElement("div");
B.style.position="absolute";
B.style.width=Binocs.P_DIM[I][0]+"px";
B.style.height=Binocs.INFO_HEIGHT+"px";
B.style.left=D+R+"px";
B.style.marginTop=R+Binocs.TAB_HEIGHT+Binocs.EL_PAD+Binocs.P_DIM[I][1]+Binocs.EL_PAD+"px";
B.onmouseover=Binocs.b_bubmover;
B.onmouseout=Binocs.b_h;
if(I==Binocs.BUBSIZE_SMALL){B.innerHTML="<span class='T7'>"+Binocs.statisticsVisitorsMsgSmall+"&#160;</span>";
}else{B.innerHTML="<span class='T7'>"+Binocs.statisticsVisitorsMsg+"&#160;</span>";
}B.innerHTML+="<span class='T3'>"+P.visitors+"</span>";
B.innerHTML+="&#160;&#160;&#160;&#160;";
B.innerHTML+="<span class='T7'>"+Binocs.statisticsRankMsg+"&#160;</span>";
B.innerHTML+="<span class='T3'>"+P.rank+"</span>";
A.appendChild(B);
var M=document.createElement("div");
M.style.position="absolute";
M.style.width=Binocs.P_DIM[I][0]+"px";
M.style.height=Binocs.INFO_HEIGHT+"px";
if(I==Binocs.BUBSIZE_LARGE){M.style.left=D+R+410+"px";
M.style.marginTop=R+Binocs.TAB_HEIGHT+Binocs.EL_PAD+Binocs.P_DIM[I][1]+Binocs.EL_PAD+"px";
}else{M.style.left=D+R+"px";
M.style.marginTop=R+Binocs.TAB_HEIGHT+Binocs.EL_PAD+Binocs.P_DIM[I][1]+Binocs.EL_PAD+Binocs.EL_PAD+"px";
}M.onmouseover=Binocs.b_bubmover;
M.onmouseout=Binocs.b_h;
M.innerHTML="<a class='L3' href='"+O+"' onmousedown='return ct(this,44137)'>"+Binocs.statisticsReportMsg+"</a>";
A.appendChild(M);
H.src=ref;
}}};
Binocs.switchStatViewOn=function(D){var A=$("b_HelpContentsContainer");
var B=$("b_PrevContentsContainer");
var C=$("b_StatContentsContainer");
if(A&&B&&C){B.style.visibility="hidden";
A.style.visibility="hidden";
C.style.visibility="visible";
}};
Binocs.switchPrevViewOn=function(){var A=$("b_HelpContentsContainer");
var B=$("b_PrevContentsContainer");
var C=$("b_StatContentsContainer");
if(A&&B){if(C){C.style.visibility="hidden";
}A.style.visibility="hidden";
B.style.visibility="visible";
}};
Binocs.helpMOver=function(){Binocs.b_bubmover();
};
Binocs.helpMOut=function(){Binocs.b_h();
};
Binocs.png=function(C,A){var B=navigator.userAgent.toLowerCase();
if(document.all&&B.indexOf("opera")==-1&&(/png/.test(A))){C.src=Binocs.imageTransparent;
C.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+A+"', sizingMethod='none')";
}};
Binocs.pngFix=function(A,B){if(a10.browser.isIE6()){var C=Binocs.imageTransparent;
if(A){if(A.src.indexOf("transparent.gif")==-1){A.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', src='"+A.src+"', sizingMethod='"+B+"')";
A.src=C;
}}}};
Binocs.bubSize=function(){var A=Binocs.displayH();
var B=Binocs.displayW();
if(A>=880&&B>=800){return Binocs.BUBSIZE_LARGE;
}else{if(A>=670&&B>=600){return Binocs.BUBSIZE_MED;
}}return Binocs.BUBSIZE_SMALL;
};
Binocs.displayH=function(){return a10.browser.innerDimension()[1];
};
Binocs.displayW=function(){return a10.browser.innerDimension()[0];
};
Binocs.b_Pos=function(A){var B=curtop=0;
if(A.offsetParent){B=A.offsetLeft;
curtop=A.offsetTop;
while(A=A.offsetParent){B+=A.offsetLeft;
curtop+=A.offsetTop;
}}return[B,curtop];
};
Binocs.bup=function(E){var D=$("r"+E+"_b");
var A=Binocs.b_Pos(D)[1];
var B;
if(self.pageYOffset){B=self.pageYOffset;
}else{if(document.documentElement&&document.documentElement.scrollTop){B=document.documentElement.scrollTop;
}else{if(document.body){B=document.body.scrollTop;
}}}var C=B;
return(A-C>Binocs.displayH()/2)?Binocs.BUBUP:Binocs.BUBDOWN;
};
Binocs.clickHandler=function(B){var A=$("bub"+Binocs._curBubIdx);
var C=$("r"+Binocs._curBubIdx+"_b");
if(A&&C){if(!a10.element.containsPoint(A,B.clientX,B.clientY,true)&&!a10.element.containsPoint(C,B.clientX,B.clientY,true)){Binocs.b_doHide();
}}};
a10.event.addListener(document,"click",Binocs.clickHandler);


