if(typeof BPTool=="undefined"||!BPTool){var BPTool={}}BPTool.Notify=typeof BPTool.Notify!="undefined"&&BPTool.Notify?BPTool.Notify:function(){var B=function(){var O={ie:0,opera:0,gecko:0,webkit:0};var N=navigator.userAgent,M;if((/KHTML/).test(N)){O.webkit=1}M=N.match(/AppleWebKit\/([^\s]*)/);if(M&&M[1]){O.webkit=parseFloat(M[1])}if(!O.webkit){M=N.match(/Opera[\s\/]([^\s]*)/);if(M&&M[1]){O.opera=parseFloat(M[1])}else{M=N.match(/MSIE\s([^;]*)/);if(M&&M[1]){O.ie=parseFloat(M[1])}else{M=N.match(/Gecko\/([^\s]*)/);if(M){O.gecko=1;M=N.match(/rv:([^\s\)]*)/);if(M&&M[1]){O.gecko=parseFloat(M[1])}}}}}return O}();var H=B.ie;var D=B.opera;var E=function(M){return typeof M==="string"};var L=function(M){return(M&&(typeof M==="object"||typeof M==="function"))||false};var J=function(M,N,O){switch(N){case"opacity":if(H){if(E(M.style.filter)){M.style.filter="alpha(opacity="+O*100+")";if(!M.currentStyle||!M.currentStyle.hasLayout){M.style.zoom=1}}}else{M.style.opacity=O}break;case"z-index":M.style[N]=O;M.style.zIndex=O;break;case"float":N=H?"styleFloat":"cssFloat";M.style[N]=O;break;default:M.style[N]=O;break}};var G=function(){var M=self.innerHeight;var N=document.compatMode;if((N||H)&&!D){M=(N=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight}return M};var A=function(){var M=self.innerWidth;var N=document.compatMode;if(N||H){M=(N=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth}return M};var I=function(M){M.style.top="10px";M.style.right="20px"};var C=function(M){M.style.top=(G()/2-M.offsetHeight/2-20)+"px";M.style.left=(A()/2-M.offsetWidth/2)+"px"};var K=0;var F={duration:"3",displayLocation:"center",htmlFallback:true,div:{backgroundColor:"#222",color:"white",opacity:"0.90",padding:"5px 20px",fontFamily:'"Lucida Grande", Arial, Helvetica, Verdana, sans-serif',textAlign:"center",width:"200px",boxShadow:"4px 6px 25px #333",borderRadius:"20px"},img:{margin:"12px"},h1:{fontSize:"13px",textAlign:"left"},p:{fontSize:"11px",textAlign:"left"}};return{create:function(O){var T=false;var U=false;var S=[];var Q="ybpt_notify_div";var V,N;if(O){for(V in O){if(O.hasOwnProperty(V)){if(L(F[V])){for(N in O[V]){if(O[V].hasOwnProperty(N)){F[V][N]=O[V][N]}}}else{F[V]=O[V]}}}}BrowserPlus.init({},function(W){if(W.success){BrowserPlus.require({services:[{service:"Notify",version:"2"}]},function(X){U=X.success;T=true;R()})}else{T=true;R()}});function P(Y,Z){var X,W;for(X in Z){if(Z.hasOwnProperty(X)){if(X=="boxShadow"||X=="borderRadius"){W=X.charAt(0).toUpperCase()+X.substring(1);J(Y,"webkit"+W,Z[X]);J(Y,"Moz"+W,Z[X])}else{J(Y,X,Z[X])}}}}function M(c,b,a){var W,d,X,Z,Y;if(K!==0){clearTimeout(K)}d=document.getElementById(Q);if(!d){d=document.createElement("DIV");W=document.createElement("IMG");X=document.createElement("H1");Z=document.createElement("P");d.id=Q;d.appendChild(W);d.appendChild(X);d.appendChild(Z);P(d,F.div);P(d,{position:"absolute",zIndex:999,visibility:"hidden"});P(W,F.img);P(X,F.h1);P(Z,F.p);document.body.appendChild(d)}W=d.childNodes[0];X=d.childNodes[1];Z=d.childNodes[2];X.innerHTML=c;Z.innerHTML=b;if(a){if(a!=W.getAttribute("src")){W.setAttribute("src",a)}J(W,"display","block")}else{J(W,"display","none")}if(F.displayLocation=="topRight"){I(d)}else{C(d)}J(d,"visibility","visible");Y=Math.min(Math.max(250,F.duration*1000),20000);K=setTimeout(function(){K=0;J(d,"visibility","hidden")},Y)}function R(){var W=S.length;for(i=0;i<W;i++){var X=function(){var Y=S.shift();return function(){if(U){BrowserPlus.Notify.show(Y,function(Z){})}else{if(F.htmlFallback){M(Y.title.substr(0,26),Y.message.substr(0,160),Y.icon)}}}}();setTimeout(X,i*750)}}return{show:function(Y,X,W){if(T){if(U){BrowserPlus.Notify.show({title:Y,message:X,icon:W},function(Z){})}else{if(F.htmlFallback){M(Y.substr(0,26),X.substr(0,160),W)}}}else{S.push({title:Y,message:X,icon:W})}}}}}}();