﻿function CallOut(co_a){var co_=this;co_.co_ae='px';co_.co_p='';co_.co_b=null;co_.co_f=null;co_.co_aa=false;co_.co_bw=true;co_.co_bo=co_a['ev']?co_a['ev']:'';co_.co_bv=co_a['ah']!="undefined"?co_a['ah']:true;co_.co_az=co_a['aht']?co_a['aht']:5000;co_.co_ag=co_a['ti']?co_a['ti']:1000;co_.co_bd=false;co_.co_u=co_a['cop']!=null?co_a['cop']:0.5;co_.co_bu=co_a['w']?co_a['w']:200;co_.co_i=co_a['p']?co_a['p']:'right';co_.co_cf=co_a['ml']?co_a['ml']:0;co_.co_cd=co_a['so']?co_a['so']:0;co_.co_n=co_a['pre']?co_a['pre']:'co_';co_.co_t=co_a['ps']?co_a['ps']:'lg';co_.co_ar=co_a['nbtn']?co_a['nbtn']:null;if(!co_a['id']){co_.co_at('callout: no id');}else{co_.co_bt=co_a['id'];};if(!co_a['co']){}else{co_.co_bx=co_a['co'];};if(!co_a['o']){co_.co_at('callout: no parent element');}else{if(typeof co_a['o']=='string'){co_.co_af=co_a['o'];co_.co_h=document.getElementById(co_a['o']);}else if(typeof co_a['o']=='object'){co_.co_af=co_a['o'].id;co_.co_h=co_a['o'];}else{co_.co_at('callout: no parent element');};};co_.co_w=11;co_.co_ak=25+9;co_.co_br=11;co_.co_bn=25+9;co_.co_bs=co_a['ajax']?co_a['ajax']:null;co_.co_as=co_a['close']?co_a['close']:null;co_.co_aj=false;};CallOut.prototype.co_ai=function(co_ba){var co_=this;co_ba=co_ba.value;if(co_ba){co_.render();co_.co_bi.innerHTML=co_ba;co_.show();}else{};};CallOut.prototype.getContent=function(_sFunc){var co_=this;if(co_.co_bs!=null){co_.co_bs[_sFunc](co_.co_ai.bind(co_));};};CallOut.prototype.co_at=function(sString){var co_=this;co_.co_bw=false;};CallOut.prototype.co_au=function(_sType,_sClassName){var co_am;if(typeof _sType=='undefined'){co_.co_at('callout: can\'t create callout');return;};co_am=document.createElement(_sType);if(typeof _sClassName=='string'){co_am.className=_sClassName;};return co_am;};CallOut.prototype.co_ah=function(_sLocation){var co_=this;switch(_sLocation){case'top':co_.co_i='top';co_.co_p=co_.co_n+'pnt_'+co_.co_t+'_b';break;case'bottom':co_.co_i='bottom';co_.co_p=co_.co_n+'pnt_'+co_.co_t+'_t';break;case'bottom-right':co_.co_i='bottom-right';co_.co_p=co_.co_n+'pnt_'+co_.co_t+'_tr';break;case'left':co_.co_i='left';co_.co_p=co_.co_n+'pnt_'+co_.co_t+'_r';break;case'right':default:co_.co_i='right';co_.co_p=co_.co_n+'pnt_'+co_.co_t+'_l';};if(co_.co_f!=null){co_.co_f.className=co_.co_ad();};};CallOut.prototype.co_ad=function(){var co_=this;return co_.co_n+'pnt '+co_.co_p;};CallOut.prototype.show=function(){var co_=this;if(co_.co_h==undefined||co_.co_h==null){co_.co_h=document.getElementById(co_.co_af);};if(!co_.co_aj){co_.render();};document.getElementById(co_.co_bt).style.display='';co_.co_ac();if(co_.co_bd){co_.co_ca();};if(co_.co_bv==true){setTimeout(function(){co_.hide()},co_.co_az);};};CallOut.prototype.showByID=function(_sID){var co_=this;co_.co_af=_sID;co_.co_h=document.getElementById(co_.co_af);co_.show();};CallOut.prototype.hide=function(){var co_=this;if(co_.co_bd){co_.co_ca();};document.getElementById(co_.co_bt).style.display='none';};CallOut.prototype.co_ca=function(){var co_=this,co_l=co_.co_b.getAttribute('op'),co_k=co_.co_b.getAttribute('ti'),co_ce=co_.co_b.style.opacity;if(co_l==1||co_l==-1){co_l=co_l==1?-1:1;co_k=co_.co_ag-co_k;co_.co_b.setAttribute('op',co_l);co_.co_b.setAttribute('ti',co_k);}else{co_l=co_l==2?-1:1;co_k=co_.co_ag;co_.co_b.setAttribute('op',co_l);co_.co_b.setAttribute('ti',co_k);setTimeout(function(){co_.co_bk(new Date().getTime());},33);};};CallOut.prototype.co_bk=function(_iLastTick){var co_=this,co_aw=new Date().getTime(),co_bl=co_aw-_iLastTick,co_k=co_.co_b.getAttribute('ti'),co_o=0;if(co_k<=co_bl){co_.co_b.style.opacity=co_.co_b.getAttribute('op')==1?'1':'0';co_.co_b.style.filter='alpha(opacity = '+(co_.co_b.getAttribute('op')==1?'100':'0')+')';co_.co_b.setAttribute('op',(co_.co_b.getAttribute('op')==1?2:-2));return;};co_.co_b.setAttribute('ti',co_k-co_bl);co_o=co_.co_b.getAttribute('ti')/co_.co_ag;if(co_.co_b.getAttribute('op')==1){co_o=1-co_o;};co_.co_b.style.opacity=co_o;co_.co_b.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity = '+parseInt(co_o*100)+')';co_.co_b.style.filter='alpha(opacity = '+parseInt(co_o*100)+')';setTimeout(function(){co_.co_bk(co_aw);},33);};CallOut.prototype.toggle=function(){var co_=this,co_am=document.getElementById(co_.co_bt);if(co_am.style.display=='none'){co_am.style.display='';}else{co_am.style.display='none';};};CallOut.prototype.next=function(_oCallOutNext){var co_=this;co_.hide();if(_oCallOutNext!=null&&typeof _oCallOutNext!="undefined"){_oCallOutNext.show();};};CallOut.prototype.co_bc=function(){var co_=this,co_bb=document.body?document.body:document,co_bh=co_bb.scrollTop?co_bb.scrollTop:0,co_bg=co_bb.scrollLeft?co_bb.scrollLeft:0,co_bq=0,co_bp=0,co_m;for(co_m=co_.co_h;co_m;co_m=co_m.offsetParent){if(co_m.offsetLeft){co_bq+=co_m.offsetLeft;};if(co_m.offsetTop){co_bp+=co_m.offsetTop;};};co_bq+=co_bg;co_bp+=co_bh;return{'left':co_bq,'top':co_bp};};CallOut.prototype.co_bm=function(){var co_=this,co_bf=co_.co_bc(co_.co_h),co_cc=co_.co_h.offsetWidth,co_bz=co_.co_h.offsetHeight;return{'left':co_bf.left,'top':co_bf.top,'width':co_cc,'height':co_bz};};CallOut.prototype.co_ab=function(){var co_=this,co_d=co_.co_bm(),co_z=0,co_aq=0,co_g=function(_sStr){return parseInt(_sStr);};switch(co_.co_i){case'top':if(co_.co_aa==false&&co_.co_b.offsetHeight>co_d.top){co_.co_aa=true;co_.co_ah('bottom');return co_.co_ab();};co_z=co_d.left-10-10-co_g(co_.co_f.offsetWidth/2)+co_g(co_d.width*co_.co_u)+co_.co_ae;co_aq=co_d.top-co_.co_b.offsetHeight-10+co_.co_ae;break;case'bottom':co_z=co_d.left-10-10-co_g(co_.co_f.offsetWidth/2)+co_g(co_d.width*co_.co_u)+co_.co_ae;co_aq=co_d.top+co_d.height+co_.co_f.offsetHeight-5+co_.co_ae;break;case'bottom-right':co_z=co_d.left-co_.co_b.offsetWidth+co_.co_f.offsetWidth;co_ay=co_d.left-co_z-co_.co_f.offsetWidth+(co_d.width/3);co_z+=co_.co_ae;co_aq=co_d.top+co_d.height+co_.co_f.offsetHeight-5+co_.co_ae;co_.co_f.style.left=co_ay+co_.co_ae;break;case'left':if(co_.co_aa==false&&co_.co_b.offsetWidth>co_d.left){co_.co_aa=true;co_.co_ah('right');return co_.co_ab();};co_z=co_d.left-co_g(co_.co_bu)-co_.co_ak+co_.co_ae;co_aq=co_d.top+co_g(co_.co_u*co_d.height)-co_g(co_.co_f.offsetHeight/2)-co_.co_w+co_.co_ae;break;case'right':default:co_z=co_d.left+co_d.width+co_.co_ae;co_aq=co_d.top+co_g(co_.co_u*co_d.height)-co_g(co_.co_f.offsetHeight/2)-co_.co_w+co_.co_ae;break;};return{'left':co_z,'top':co_aq};};CallOut.prototype.co_ac=function(){var co_=this,co_cb=co_.co_ab();co_.co_b.style.left=co_cb.left;co_.co_b.style.top=co_cb.top;};CallOut.prototype.co_e=function(sClassName){var co_=this;return co_.co_n+sClassName;};CallOut.prototype.co_an=function(){var co_=this,co_bj=co_.co_bo;switch(co_bj){case'mouseover':co_.co_h.onmouseover=function(){co_.co_h.style.cursor='pointer';co_.show();};co_.co_h.onmouseout=function(){co_.hide();};co_.co_b.onmouseover=function(){co_.show();};co_.co_b.onmouseout=function(){co_.hide();};co_.co_f.onmouseover=function(){co_.show();};co_.co_f.onmouseout=function(){co_.hide();};break;case'click':co_.co_h.onclick=function(){co_.show();};};};CallOut.prototype.updateContent=function(_sContent){var co_=this;co_.co_r.innerHTML=_sContent;};CallOut.prototype.render=function(){var co_=this;if(co_.co_bw&&!co_.co_aj){var co_y='div',co_cg='a',co_c=co_.co_au,co_j,co_s,co_ap,co_q,co_ch,co_av,co_r,co_al,co_ax,co_x,co_ao='';co_.co_ah(co_.co_i);co_ao=co_.co_ad();co_j=co_c(co_y,co_.co_e('outer'));co_j.id=co_.co_bt;co_j.style.width=co_.co_bu;co_s=co_c(co_y,co_.co_e('inner'));co_ap=co_c(co_y,co_.co_e('t'));co_q=co_c(co_y,co_.co_e('content'));co_av=co_c(co_cg,co_.co_e('close'));co_r=co_c(co_y);co_.co_r=co_r;co_al=co_c(co_y,co_.co_e('b'));co_ax=co_c(co_y);co_x=co_c(co_y,co_ao);co_x.id=co_.co_bt+'_pnt';co_av.onclick=function(){co_.hide();if(co_.co_as!=null){eval(co_.co_as);};};co_q.appendChild(co_av);co_r.innerHTML=co_.co_bx;co_.co_bi=co_r;co_q.appendChild(co_r);if(co_.co_ar!=null){var co_be=co_c(co_y,co_.co_e('nb'));co_be.innerHTML=co_.co_ar;co_q.appendChild(co_be);};co_s.appendChild(co_ap);co_s.appendChild(co_q);co_al.appendChild(co_ax);var co_v;co_v=co_c(co_y);co_v.appendChild(co_s);co_v.appendChild(co_al);co_v.appendChild(co_x);co_j.appendChild(co_v);co_.co_h.parentNode.appendChild(co_j);co_.co_b=co_j;co_.co_f=co_x;co_.co_an();if(typeof window.onresize=='function'){var co_by=window.onresize;window.onresize=function(){co_by();co_.co_ac();};}else{window.onresize=function(){co_.co_ac();};};co_j.style.display='none';if(document.firstChild.nodeValue!=null){if(document.firstChild.nodeValue.indexOf('XHTML')==-1){co_ap.style.height='1000px';co_ap.style.backgroundRepeat="no-repeat";co_s.style.zoom='1';co_s.style.overflowY='hidden';};};if(co_.co_bd){co_j.setAttribute('op',-2);co_j.setAttribute('ti',co_.co_ag);co_j.style.opacity=0;};co_.co_aj=true;};};
