jQuery(document).ready(function($){
$(".initialHide").hide().removeClass("initialHide");
fn.showFaq=function(_2,_3){
if($(_3).hasClass("current_question")){
$(_3).removeClass("current_question");
$(".faq_answer").hide();
return false;
}
$(".faqQuestion").removeClass("current_question");
$(_3).addClass("current_question");
$(".faq_answer").hide();
$("#faq_answer_"+_2).show("fast");
};
$(".faq_large_list").each(function(){
var _4=fn.getUrlParam(window.location.search.toString(),"faq_id");
if(_4){
fn.jumpTo($(this).find("[name=faq_"+_4+"]"));
}
});
$(".gotoMenuSelector").change(function(){
var _5=$(this).val();
if(_5!=""){
window.location=_5;
}
});
$(".menuListLink").click(function(){
var _6=$(this);
var _7=/_(\d+)$/;
var id=(_7.test(_6.attr("id")))?RegExp.$1:null;
var _9=$("#menuListSelector_"+id).val();
if(_9!=""){
window.location=_9;
}
});
$(".top_menu_wrapper .cmb_content .lv_0").mouseenter(function(){
$(this).addClass("active");
}).mouseleave(function(){
$(this).removeClass("active");
});
$("[id$='ActionButtonId']").click(function(e){
e.stopPropagation();
var _b=$("#"+$(this).attr("id")+"_layer");
$(".context_menu_box").each(function(){
if($(this).attr("id")!=_b.attr("id")){
$(this).slideUp();
}
});
_b.slideToggle().css("width",$(this).width()-10).each(function(){
$(this).find("a").click(function(){
_b.hide();
});
$(this).find("li").click(function(){
var _c=$(this).find("a");
var _d=_c.attr("href");
if(_c.hasClass("target_blank")){
window.open(_d);
}else{
fn.changeLocation(_d);
}
});
});
$("html").click(function(e){
_b.slideUp();
});
});
$(".rss_channel").mouseenter(function(){
$(this).addClass("hover");
}).mouseleave(function(){
$(this).removeClass("hover");
});
$(".news_row").mouseenter(function(){
$(this).parent().addClass("selected");
}).mouseleave(function(){
$(this).parent().removeClass("selected");
});
fn.filterList=function(_f,_10,_11){
var _12=$(_11).parent();
_12.find("a").removeClass("active");
$(_11).addClass("active");
var _13=$("#list_container_"+_10).find(".list");
$(_13).each(function(_14){
var $el=$(this);
if(_14%2==0){
if(!$el.hasClass("list_box_spacer")){
$el.addClass("list_box_spacer");
}
}else{
$el.removeClass("list_box_spacer");
}
(_f!="-1"&&!$el.hasClass(_f))?$el.hide():$el.show();
});
};
var _16=0;
$(".list_boxes").each(function(){
$(this).find(".panel_content").each(function(_17){
$(this).find(".panel_title, .description").wrapAll("<div class='box_container'></div>");
var _18=$(this).find(".box_container");
if(_18.height()>_16){
_16=_18.height();
}
});
$(this).find(".box_container").css({height:_16});
});
$(".list_teasers_wrapper").each(function(_19){
var _1a=$(this).find(".panel_content");
var _1b=0;
_1a.each(function(){
if($(this).height()>_1b){
_1b=$(this).height();
}
});
_1a.height(_1b);
$(this).find(".bl, .br").css({bottom:"-1px"});
});
fn.rewardsTransactions=function(el){
var _1d={};
_1d=env[el.attr("id")];
_1d.seq=0;
_1d.t="";
fn.rewardsTransactions.jumpTo=function(_1e,_1f){
var _20=$("#"+_1e);
_1d=env[_20.attr("id")];
clearTimeout(_1d.t);
if(_1d.seq==_1d.rt_elements.length-1){
_1d.seq=(_1f=="next")?0:_1d.seq-1;
}else{
if(_1d.seq==0&&(_1f=="prev")){
_1d.seq=_1d.rt_elements.length-1;
}else{
_1d.seq=(_1f=="next")?_1d.seq+1:_1d.seq-1;
}
}
var opt=_1d.rt_elements[_1d.seq];
var _22=_20.find(".rewards_transactions_link");
var _23=_20.find(".rewards_transactions_img");
if(opt.is_link=="true"){
if(_23.parent().attr("nodeName")!="A"){
_23.wrap($("<a>").addClass("rewards_transactions_link").attr({href:opt.url}));
var _22=_20.find(".rewards_transactions_link");
}
_22.attr("href",opt.url);
}else{
if(_23.parent().attr("nodeName")=="A"){
_23.unwrap();
}
}
_23.attr({alt:opt.alt,title:opt.alt,src:opt.id});
_1d.t=setTimeout(function(){
fn.rewardsTransactions.overloader(_1e);
},_1d.timeout);
};
fn.rewardsTransactions.overloader=function(el){
fn.rewardsTransactions.jumpTo(el,"next");
};
_1d.t=setTimeout(function(){
fn.rewardsTransactions.overloader(el.attr("id"));
},_1d.timeout);
};
$(".rewards_transactions").each(function(){
fn.rewardsTransactions($(this));
});
fn.messages=function(el){
var _26={};
_26=env[el.attr("id")];
_26.t="";
var _27=false;
var _28=el.attr("id");
var _29=1;
fn.messages.w8=function(el,_2b){
if(!_27){
_26.t=setTimeout(function(){
var _2c=_2b||_29;
var _2d=el||_28;
fn.messages.jumpTo(_2d,_2c);
},_26.timeout);
}
};
fn.messages.jumpTo=function(_2e,msg){
clearTimeout(_26.t);
var _30=$("#"+_2e);
var _31=msg-1;
var _32=_26.objects[_31];
function createMsgField(obj){
if(obj.url!=""){
var _34=$("<a>");
_34.addClass("msg").attr("href",obj.url);
if(obj.newWindow){
_34.addClass("target_blank");
}
return _34;
}else{
return $("<span>").addClass("msg");
}
}
function setActiveButton(msg){
_30.findAndRemoveClass("active");
_30.find(".msg_num").eq(_31).addClass("active");
}
var _36=_30.find(".msg");
var _37=createMsgField(_32);
_36.before(_37).remove();
if(_32.title){
_37.text(_32.title);
}
setActiveButton(msg);
if(_31+1==_26.objects.length){
fn.messages.w8(_2e,1);
_29=1;
}else{
_31+=2;
fn.messages.w8(_2e,_31);
_29=_31;
}
_28=_2e;
};
if(_26.objects.length>1){
el.mouseenter(function(){
clearTimeout(_26.t);
_27=true;
}).mouseleave(function(){
_27=false;
fn.messages.w8();
});
fn.messages.w8(el.attr("id"),2);
}
};
$(".messages").each(function(){
fn.messages($(this));
});
$(".tabs_panel_choice").click(function(){
var _38=$(this);
var _39=_38.closest(".horizontal_tabs");
if(_39.size()==0){
_39=_38.parent();
}
var _3a=_39.find(".selected");
_3a.removeClass("selected active");
_39.find(".tabs_panel_wrapper").hide();
_39.find(".results").hide();
_38.addClass("selected active");
var _3b=_38.attr("class").split(" ");
var _3c;
for(var i=0;i<_3b.length;i++){
if(_3b[i]=="tab"){
continue;
}
_3c=_39.find("."+_3b[i]+"_content");
if(_3c.exists()){
_3c.show();
break;
}
}
_3b=_3a.attr("class").split(" ");
for(var i=0;i<_3b.length;i++){
if(_3b[i]=="tab"){
continue;
}
_old_class_content=_39.find("."+_3b[i]+"_content");
if(_old_class_content.exists()){
_3c.find("input[name=localization]").attr("value",_old_class_content.find("input[name=localization]").attr("value"));
break;
}
}
});
var _3e=function(obj,_40){
for(var _41 in obj){
if(obj.hasOwnProperty(_41)&&_41==_40){
return obj[_41];
}else{
if(typeof obj[_41]=="object"){
var _42=_3e(obj[_41],_40);
if(_42!=null){
return _42;
}
}
}
}
return null;
};
var _43=function(obj){
var _45="";
var _46=_3e(obj,"AdministrativeAreaName");
if(_46!=null){
_45+=_46;
}
var _47=_3e(obj,"LocalityName");
if(_47!=null){
_45+=", "+_47;
}
var _48=_3e(obj,"ThoroughfareName");
if(_48!=null){
_45+=", "+_48;
}
return _45;
};
var _49=function(_4a,_4b,_4c,_4d){
var _4e=document.getElementById(_4c);
_4e.innerHTML="";
var _4f=document.createElement("div");
_4f.className="listLabel";
_4e.appendChild(_4f);
_4f.innerHTML=env.globalEnv.manyResultsMessage+": <strong>"+document.getElementById(_4d).value+"</strong>";
var _ul=document.createElement("ul");
_ul.className="list_style_4";
for(var j=0;j<_4a.Placemark.length;j++){
var _52=_4a.Placemark[j].Point.coordinates[1].toFixed(4);
var _53=_4a.Placemark[j].Point.coordinates[0].toFixed(4);
var _54=document.createElement("li");
_ul.appendChild(_54);
var _55=document.createElement("a");
_55.className="link_style_2";
var _56=_43(_4a.Placemark[j].AddressDetails);
_55.href="javascript:doNearestSearch('"+_56+"','"+_52+"','"+_53+"','"+_4b+"');void(0);";
_55.innerHTML=_56;
_54.appendChild(_55);
}
_4e.appendChild(_ul);
};
var _57=function(e){
if(e.target.id.indexOf("branch")==0){
var _59="branch-nearest-search";
var _5a="branch-user-localization";
var _5b=env.globalEnv.branchEmptyLocation;
var _5c="branch-many-results";
}else{
if(e.target.id.indexOf("atm")==0){
var _59="atm-nearest-search";
var _5a="atm-user-localization";
var _5b=env.globalEnv.atmEmptyLocation;
var _5c="atm-many-results";
}else{
if(e.target.id.indexOf("deposit-atm")==0){
var _59="deposit-atm-nearest-search";
var _5a="deposit-atm-user-localization";
var _5b=env.globalEnv.depositAtmEmptyLocation;
var _5c="deposit-atm-many-results";
}else{
return false;
}
}
}
var _5d=document.getElementById(_5a).value;
var _5e=document.getElementById(_5c);
if(_5d==""){
_5e.style.display="block";
_5e.innerHTML=_5b;
return false;
}else{
userAddress="Polska, "+_5d;
}
var geo=new GClientGeocoder();
geo.getLocations(userAddress,function(_60){
if(_60.Status.code==G_GEO_SUCCESS){
if(_60.Placemark.length>1){
$("#"+_5c).show();
_49(_60,_59,_5c,_5a);
}else{
$("#"+_5c).hide();
var _61=_60.Placemark[0].Point.coordinates[1].toFixed(4);
var _62=_60.Placemark[0].Point.coordinates[0].toFixed(4);
var _63=_43(_60.Placemark[0].AddressDetails);
doNearestSearch(_63,_61,_62,_59);
}
}else{
_5e.style.display="block";
_5e.innerHTML=env.globalEnv.addressNotFound;
}
});
return false;
};
$("#branch-nearest-search").submit(_57);
$("#branch-search-button").click(_57);
$("#atm-nearest-search").submit(_57);
$("#atm-search-button").click(_57);
$("#deposit-atm-nearest-search").submit(_57);
$("#deposit-atm-search-button").click(_57);
$(".see_also .panel_content").each(function(){
var _64=$(this);
var _65=_64.find(".graphic_element");
if(_65.exists()){
var _66=_64.outerWidth();
var _67=_65.first().width();
var c=2;
_65.each(function(_69){
if((c*_67)>_66){
$(this).after($("<div>").attr("class","clear_all"));
c=1;
}
c++;
});
}
});
fn.SiteSearchValidator=SiteSearchValidator;
function SiteSearchValidator(_6a){
this.search_field=_6a;
this.form=_6a.parents("form").eq(0);
this._prompt=_6a.val();
this.is_modified=false;
this.is_focus=false;
this.observed=false;
this.allow_submit=false;
SiteSearchValidator.validators[this.form.attr("id")]=this;
}
SiteSearchValidator.validators={};
SiteSearchValidator.submitSearchForm=function(id){
SiteSearchValidator.validators[id]._submitSearchForm();
};
SiteSearchValidator.prototype._submitSearchForm=function(){
if(!this.is_focus){
this.search_field.focus();
}
if(this.observed){
this.checkFieldStatus();
}else{
this.allow_submit=(this.search_field.val()!="")?true:false;
}
if(this.is_modified||this.allow_submit){
var _6c=this.form;
_6c.attr("action",env.globalEnv.form_action);
setTimeout(function(){
_6c.submit();
},0);
}else{
alert(bundle.site_search_validate);
}
};
SiteSearchValidator.prototype.checkFieldStatus=function(){
if(this.is_focus&&(this.search_field.val()!="")){
this.is_modified=true;
}else{
this.is_modified=false;
this.search_field.val(this._prompt);
}
this.is_focus=false;
};
SiteSearchValidator.prototype.setValueFromURL=function(){
var _6d=fn.getUrlParam(window.location.search.toString(),"q");
if(_6d!=""){
var _6e=decodeURIComponent(_6d.replace(/\+/g," "));
this.search_field.val(_6e);
this.is_modified=true;
}
};
SiteSearchValidator.prototype.startObserve=function(){
this.setValueFromURL();
var _6f=this;
this.search_field.focus(function(){
if(!_6f.is_modified){
_6f.search_field.val("");
}
_6f.is_focus=true;
}).blur(function(){
_6f.checkFieldStatus();
});
};
SiteSearchValidator.prototype.init=function(){
if(this.form.is("#site-search-form-mini")){
this.observed=true;
this.startObserve();
}
};
$(".search_field").each(function(){
new SiteSearchValidator($(this)).init();
});
$(".horizontal_tabs .tab_list").each(function(){
var _70=$(this);
var _71=_70.find(".tab");
var _72=0;
_71.each(function(_73){
if($(this).height()>_72){
_72=$(this).height();
}
});
_71.css("height",_72);
});
var _74=fn.syncVerticalTabsHeight={};
_74.changeContentHeight=function(tab){
var _76=tab.parents(".tab_list");
var _77=0;
_76.find(".tab").each(function(){
_77+=$(this).outerHeight()+1;
});
var _78=$("#"+tab.attr("id").replace("header","content"));
var _79=_78.find(".content_area").first().outerHeight();
if(_77>_78.outerHeight()){
_78.height(_77-(_78.outerHeight()-_78.innerHeight())-parseInt(_78.css("paddingTop"))-parseInt(_78.css("paddingBottom"))-1);
}
if(_79>_78.outerHeight()&&_79>_77){
_78.css("height","");
}
};
$(".vertical_tabs").each(function(){
$(".tab_row").mouseenter(function(){
if(!$(this).hasClass("opened")){
$(this).addClass("active");
}
}).mouseleave(function(){
if(!$(this).hasClass("opened")){
$(this).removeClass("active");
}
});
});
function toggleActiveCustomSelect(el){
var _7b="active_custom_select";
if(el=="hide"){
$("."+_7b).removeClass(_7b);
return false;
}
var $el=$("#"+el.attr("id")+"_container");
var _7d=el.offset();
var _7e=$el.is(":visible")?true:false;
$("."+_7b).removeClass(_7b);
if(_7e){
$el.removeClass(_7b);
}else{
if(el.next().attr("id")==$el.attr("id")){
$el.insertBefore("#wrapper").css({left:_7d.left,top:_7d.top+el.height()});
}
$el.addClass(_7b);
}
$("html").click(function(e){
toggleActiveCustomSelect("hide");
});
}
$(".custom_selector").click(function(e){
e.stopPropagation();
toggleActiveCustomSelect($(this));
});
fn.expandElementContainer=function(){
var _81=$(this);
var _82=$("#"+_81.attr("id")+"_container");
var _83=((_81.attr("id")!="")&&_82.exists())?true:false;
if(_83){
var _84=_81.parents(".user_components");
if(_81.attr("id")==_84.find(".expand_element.current_expanded").attr("id")){
_84.eq(0).findAndRemoveClass("current_expanded");
_82.hide();
return false;
}
_84.eq(0).find(".expanded_element.current_expanded").hide();
_84.eq(0).findAndRemoveClass("current_expanded");
_81.addClass("current_expanded");
_82.addClass("current_expanded").show();
}
};
$(".expand_element").click(function(){
$(this).expandElementContainer();
});
$("tr.ee_toggle").click(function(){
var _85=$(this).parents(".expand_element_tab").eq(0);
var _86=_85.find(".ee_content");
if(_85.hasClass("element_fold")){
_85.removeClass("element_fold");
_86.show();
}else{
_85.addClass("element_fold");
_86.css("display","none");
}
});
fn.switchPage=function(_87,_88){
var _89=$("span[class*='switch_"+_87+"_']");
var _8a=_89.filter(".active");
if(_88=="next"){
var _8b=_8a.next().next();
if(_8b.is("span.page_no")){
_8b.click();
}
return;
}
if(_88=="prev"){
var _8c=_8a.prev().prev();
if(_8c.is("span.page_no")){
_8c.click();
}
return;
}
$("div[id^='page_"+_87+"_']").hide();
_89.removeClass("active");
$("div#page_"+_87+"_"+_88).show();
var _8d=$("span.switch_"+_87+"_"+_88);
var _8e=$("span.switch_"+_87+"_next");
var _8f=$("span.switch_"+_87+"_prev");
_8d.addClass("active");
if(!_8d.next().next().is("span.page_no")){
_8e.hide();
}else{
_8e.show();
}
if(!_8d.prev().prev().is("span.page_no")){
_8f.hide();
}else{
_8f.show();
}
if(_89.parents(".tab_content").exists()){
var _90=_89.parents(".tab_content").eq(0);
var _91=$("#"+_90.attr("id").replace("content","header"));
_90.css("height","auto");
_74.changeContentHeight(_91);
$(window).scrollTop(0);
}
};
$("a").live("click",function(){
if($(this).hasClass("target_blank")){
$(this).attr("target","_blank");
}
});
$(".print, .save_as_pdf").click(function(e){
var _93=$(this);
if(_93.attr("class").match(/\bmode_/)){
var _94=_93.getFirstMatchingClass(/\bmode_/);
var _95=document.location.hash.replace(/#tab=/,"");
var _96=document.location.href.replace(/#.+/,"");
_96=_96.replace(/[?&]tab=./,"");
var _97=(_96.indexOf("?")==-1)?"?":"&";
if(_95){
_96=_96+_97+"tab="+_95+"&"+_94.replace("_","=")+document.location.hash;
}else{
_96=_96+_97+_94.replace("_","=")+document.location.hash;
}
fn.openWindow(_96);
return false;
}
});
$("body#print").each(function(){
window.print();
$(this).find("*").each(function(){
$(this).removeAttr("onclick").unbind("click").click(function(){
return false;
});
});
});
if(env.globalEnv.ie6){
setTimeout(function(){
fn.pngFix();
},500);
}
$(".hint").each(function(){
if($(this).is("[type=text]")){
$(this).hints();
}
});
$("#site-search-results iframe").load(function(){
setFavicon();
});
var _98=null;
var _99=null;
function setContextLayerPosition(_9a,_9b){
var _9c=_9a.offset();
_9b.css({top:(_9c.top+_9a.outerHeight())-5,left:_9c.left});
}
function onmouseLeaveEvents(_9d,_9e,_9f){
_98=setTimeout(function(){
_9e.slideUp(function(){
_9e.removeClass("active_context_layer");
_9e.appendTo(_9f);
_9d.removeClass("active_trigger_context_layer");
});
_9e.unbind("mouseenter.layer");
_9e.unbind("mouseleave.layer");
_9d.unbind("mouseleave.trigger");
},10);
}
function toggleContextLayer(_a0,_a1){
clearTimeout(_98);
var _a2=$(_a0);
if(_a1.hasClass("second_level_component")){
if($(".active_context_layer").exists()){
onmouseLeaveEvents($(".active_trigger_context_layer"),$(".active_context_layer"),active_context_layer);
}
var _a3=active_context_layer=_a1.parent();
_a1.addClass("active_context_layer");
_a1.appendTo("body");
setContextLayerPosition(_a2,_a1);
_a1.slideDown();
_a2.addClass("active_trigger_context_layer");
_a2.bind("mouseleave.trigger",function(){
onmouseLeaveEvents(_a2,_a1,_a3);
});
_a1.bind("mouseenter.layer",function(){
clearTimeout(_98);
});
_a1.bind("mouseleave.layer",function(){
onmouseLeaveEvents(_a2,_a1,_a3);
});
}
}
$(".has_second_level_component").mouseenter(function(){
toggleContextLayer(this,$(this).next(".second_level_component"));
});
$("body").delegate(".open_answer textarea[name=\"open_answer\"]","keypress",function(){
$(this).parent(".open_answer").find("input[type=radio]").attr("checked","checked");
$("#"+$(this).closest("form").attr("id")+"_buttons").find(".submit_poll").removeClass("button_disabled");
});
$("div.polls form input[type='radio']").live("click",function(){
var _a4=$("#"+$(this).closest("form").attr("id")+"_buttons").find(".submit_poll");
_a4.removeClass("button_disabled");
}).each(function(){
if($(this).is(":checked")){
$(this).click();
}
});
$(".button_disabled").click(function(){
return false;
});
if(jQuery.browser.msie&&jQuery.browser.version<=7){
function getLastNotEmptyTextNode(_a5){
var _a6=_a5.contents();
var _a7=_a6.last();
while(_a7.exists()){
if(_a7.get(0).nodeType==3){
return _a7;
}else{
if(_a7.get(0).nodeType==1){
var _a8=getLastNotEmptyTextNode(_a7);
if(_a8!=null){
return _a8;
}
}
}
_a7=_a7.prev();
}
return null;
}
$(".link_style_3, .link_style_3_color_1, .link_style_3_color_2, .link_style_4, .link_style_4_strong").each(function(){
var _a9=$(this);
var _aa=_a9.css("background-image").replace(/^\s*url\(/,"").replace(/\).*$/,"").replace(/'|"/g,"");
var _ab="<img src='"+_aa+"' alt='' class='background_replacer'>";
var _ac=getLastNotEmptyTextNode(_a9);
_ac.get(0).data=_ac.text().replace(/\s+$/,"");
var _ad=_ac.text();
var _ae=_ad.split(/\s+/);
var _af=_ae[_ae.length-1];
_a9.css("background","none");
_ac.get(0).data=_ad.substring(0,_ad.length-_af.length);
_ac.after("<span class='nowrap'>"+_af+_ab+"</span>");
});
}
});
function doNearestSearch(_b0,_b1,_b2,_b3){
var _b4=document.forms[_b3];
_b4.localization.value=_b0;
_b4.latitude.value=_b1;
_b4.longitude.value=_b2;
_b4.submit();
}
function submitPoll(_b5,_b6,_b7){
var _b8="form_poll_form_"+_b7+"_"+_b6;
var _b9=$("#"+_b8);
if(!_b9.find("input[type='radio']:checked").exists()){
return false;
}
if(typeof $("#"+_b8+" input[name=\"answers\"]:checked").val()=="undefined"){
alert(env.globalEnv.pollAnswerRequired);
return;
}
if(typeof $("#"+_b8+" div.open_answer input[name=\"answers\"]:checked").val()!=="undefined"){
if($.trim($("#"+_b8+" div.open_answer textarea[name=\"open_answer\"]").val())==""){
alert(env.globalEnv.pollOpenAnswerRequired);
return;
}
}
if(_b5.indexOf("?")===0){
_b5=_b5.substring(1);
}
epoint.Util.ajax2(document.location.href,$("#"+_b8).serialize()+"&"+_b5,function(_ba){
if(_ba=="ERROR"){
window.location.reload();
}else{
$("#poll_component_"+_b6).html(_ba);
}
});
}
function nextPoll(_bb,_bc){
if(_bb.indexOf("?")===0){
_bb=_bb.substring(1);
}
$.post(window.location,_bb,function(_bd){
if(_bd=="ERROR"){
window.location.reload();
}else{
var _be=$("#poll_component_"+_bc);
_be.find("object").remove();
_be.html(_bd);
}
});
}
function resizePoll(el){
var _c0=$("#"+el);
if(/^1$/.test(_c0.attr("height").replace("px",""))){
_c0.height(_c0.width());
}
}
function setFavicon(){
var _c1=$("link[type=image/x-icon]").remove().attr("href");
$("<link href=\""+_c1+"\" rel=\"shortcut icon\" type=\"image/x-icon\">").appendTo("head");
}
var ChartLabel={};
ChartLabel.lastVisitedChart=null;
ChartLabel.labelText="";
ChartLabel.setLabelText=function(){
ChartLabel.tooltip.innerHTML=ChartLabel.labelText;
};
ChartLabel.setLabelPos=function(){
if(ChartLabel.tooltip.parentNode.nodeName!="BODY"){
document.body.insertBefore(ChartLabel.tooltip,document.getElementById("wrapper"));
}
if(ofc_data.y==0){
ChartLabel.setLabelPos();
}
var _c2=$("#"+ChartLabel.chart.id).offset();
ChartLabel.tooltip.style.top=(_c2.top+ofc_data.y)-ChartLabel.tooltip.offsetHeight+"px";
ChartLabel.tooltip.style.left=_c2.left+ofc_data.x+"px";
};
ChartLabel.hideLabel=function(){
ChartLabel.tooltip.style.display="none";
ChartLabel.chart.parentNode.appendChild(ChartLabel.tooltip);
};
ChartLabel.showLabel=function(){
ChartLabel.tooltip.style.display="block";
};
ChartLabel.fire=function(_c3,_c4,_c5){
if(ChartLabel.lastVisitedChart==null||ChartLabel.lastVisitedChart==_c5){
ChartLabel.chart=document.getElementById(_c5);
ChartLabel.tooltip=document.getElementById(_c5+"_tooltip");
}else{
ChartLabel.lastVisitedChart=_c5;
}
ChartLabel.index=_c4;
ChartLabel.labelText=ofc_data.text;
if(_c3=="over"){
ChartLabel.showLabel();
ChartLabel.setLabelText();
ChartLabel.setLabelPos();
}else{
ChartLabel.hideLabel();
}
};
var ofc_data={};
function ofc_tooltip_pos(x,y,t){
ofc_data.x=x;
ofc_data.y=y;
ofc_data.text=t;
}
function ofc_ready(id){
ofc_data.chartId=id;
resizePoll(id);
}
function ofc_hover(i,_cb){
ofc_data.index=i;
ChartLabel.fire("over",i,_cb);
}
function ofc_out(i,_cd){
ofc_data.index=i;
ChartLabel.fire("out",i,_cd);
}


