$(document).ready(function(){var a=$("#hid-main-wsurl").val(),b="";b=a!=""&&a?a+"system/js/thickbox/loadingAnimation.gif":"system/js/thickbox/loadingAnimation.gif";tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image;imgLoader.src=b;$("*").find("a[href='"+window.location.href+"']").each(function(){$(this).addClass("current")});$(".errors").click(function(){$(".errors").hide()});$(".success").click(function(){$(".success").hide()});$(".formErrorMessage").click(function(){$(".formErrorMessage").hide()}); $(".formSuccessMessage").click(function(){$(".formSuccessMessage").hide()});if($("#publish_content").attr("checked")==true){$("#datepicker").attr("disabled",true);$("#datepicker").css("background","grey");$("#publish_on_date").attr("disabled",true);$("#publish_on_date").attr("checked",false)}else{if($("#publish_on_date").attr("checked")==true){$("#datepicker").attr("disabled",false);$("#datepicker").css("background","#FFE45C")}else{$("#datepicker").attr("disabled",true);$("#datepicker").css("background", "grey")}$("#publish_on_date").attr("disabled",false)}$("#publish_content").click(function(){if($("#publish_content").attr("checked")==true){$("#datepicker").attr("disabled",true);$("#datepicker").css("background","grey");$("#datepicker").val("");$("#publish_on_date").attr("checked",false);$("#publish_on_date").attr("disabled",true)}else{$("#datepicker").attr("disabled",true);$("#publish_on_date").attr("disabled",false)}});$("#publish_on_date").click(function(){if($("#publish_on_date").attr("checked")== true){$("#datepicker").attr("disabled",false);$("#datepicker").css("background","#FFE45C");$("#datepicker").datepicker("setDate",new Date)}else{$("#datepicker").attr("disabled",true);$("#datepicker").css("background","grey");$("#datepicker").val("")}});$("#editContentForm, #addContentForm").submit(function(){content=encodeURIComponent($("#admincontentarea").val());publish_content=$("#publish_content").attr("checked");publish_on_date=$("#publish_on_date").attr("checked");datepicker=$("#datepicker").val(); var c=$("#ctype").val(),d=$("#blog").val();publish_content=publish_content==true?1:0;publish_on_date=publish_on_date==true?1:0;$("#ajaxcontentmsg").ajaxStart(function(){$(this).html("Working, please wait...");$(this).show()});jQuery.ajax({type:"post",url:this.action,data:"admincontentarea="+content+"&publish_content="+publish_content+"&publish_on_date="+publish_on_date+"&datepicker="+datepicker+"&ctype="+c+"&blog="+d,success:function(e){if(e=="success"){top.location.reload();top.location.reload()}}}); return false});$("#showhide").click(function(){$("#admincpanel").toggle()});$("#cantDeletePage").animate({opacity:0},6E3,function(){$("#cantDeletePage").hide()});$("#addHeader, #editHeader").submit(function(){content=$("#editheader").val();var c=$("#ctype").val();jQuery.ajax({type:"post",url:this.action,data:{admincontentarea:content,ctype:c},success:function(d){d=="success"&&top.location.reload()}});return false});$(".pc_list_item, .pb_list_item").click(function(c){c.preventDefault();c=$("#hid-main-wsurl").val(); var d=$(this).text(),e=$(this).attr("href");$.ajax({type:"post",url:c+"sys/backend_ajax/storeprodfilter",data:{productFilter:d},success:function(){window.location.href=e}})})}); function addComment(a,b,c,d,e){$("#comment-captcha-invalid-error-"+b).hide();var g=$("#websiteUrl").val(),f=encodeURIComponent($("#post-content-"+b).val()),h=encodeURIComponent($("#sign-"+b).val()),j=encodeURIComponent($("#email-"+b).val()),n=encodeURIComponent($("#website-"+b).val()),l=encodeURIComponent($("#keyword-"+b).val()),m=encodeURIComponent($("#topic-"+b).val()),o=encodeURIComponent($("#publishedbydefault-"+b).val()),p=$("#notify-"+b).attr("checked"),q=encodeURIComponent($("#captcha-input").val()), t=encodeURIComponent($("#captcha-id").val());$(".success").ajaxStart(function(){$(this).show().find("#proccessing").show()});jQuery.ajax({type:"post",url:""+g+"sys/backend_ajax/addcomment/",data:"content="+f+"&sign="+h+"&email="+j+"&website="+n+"&containerId="+a+"&topic="+m+"&keyword="+l+"&publishedbydefault="+o+"&notify="+p+"&captcha-input="+q+"&captcha-id="+t+"&requestedPage="+d,success:function(k){k=k.split("~");$("#proccessing").hide();if(k[0]!="captacha error")if(e==1){$("#comments-ol-"+b).prepend(k[0]); var r=$("#comments-ol-"+b+" li").get();if(r){for(var s=c;s<r.length;s++)r[s].style.display="none";if(r.length>c){$("#commentslinkholder").empty();$("#commentslinkholder").html('<a href="javascript:void(0);" onclick="showHideComments(\''+b+"','"+c+'\');" id="show-all-comments-'+b+'" title="Show All Comments" >Show all comments</a>')}$("#captcha-input").val("");$("#captcha-id").val(k[1]);$("#captcha-image").attr("src",g+"tmp/"+k[1]+".png");$(".success").show();$("#added").show()}}else{$("#captcha-input").val(""); $("#captcha-id").val(k[1]);$("#captcha-image").attr("src",g+"tmp/"+k[1]+".png");$(".success").show();$("#addedwait").show()}else{hideCommentErrors(b);$("#sign-"+b).val(k[1]);$("#email-"+b).val(k[2]);$("#website-"+b).val(k[3]);k[4]==1&&$("#notify-"+b).attr("checked",true);$("#post-content-"+b).val(k[5]);$("#captcha-id").val(k[6]);$("#captcha-image").attr("src",g+"tmp/"+k[6]+".png");$("#comment-errors-"+b).show();$("#comment-captcha-invalid-error-"+b).show()}}});$("#sign-"+b).val("");$("#email-"+b).val(""); $("#website-"+b).val("");$("#post-content-"+b).val("");$("#notify-"+b).attr("checked",false)}function publishComment(a){var b=$("#websiteUrl").val();a>0&&jQuery.ajax({type:"post",url:""+b+"sys/backend_ajax/publishcomment/",data:"id="+a,success:function(c){c=c.length>20?c.split("<br")[0]:c;$("#comment-item-li-"+c).attr("style","border:1px solid #DDDDDD;");$("#publish-link-"+c).empty()}})} function hideCommentErrors(){$(".errors").click(function(){$(".errors").hide()});$(".success").click(function(){$(".success").hide()})} function checkPostCommentForm(a){hideCommentErrors(a);var b=true,c=/^\s+/g,d=/\s+$/g;document.getElementById("sign-"+a).value=document.getElementById("sign-"+a).value.replace(c,"");document.getElementById("sign-"+a).value=document.getElementById("sign-"+a).value.replace(d,"");document.getElementById("email-"+a).value=document.getElementById("email-"+a).value.replace(c,"");document.getElementById("email-"+a).value=document.getElementById("email-"+a).value.replace(d,"");document.getElementById("post-content-"+ a).value=document.getElementById("post-content-"+a).value.replace(c,"");document.getElementById("post-content-"+a).value=document.getElementById("post-content-"+a).value.replace(d,"");document.getElementById("captcha-input").value=document.getElementById("captcha-input").value.replace(c,"");document.getElementById("captcha-input").value=document.getElementById("captcha-input").value.replace(d,"");if(document.getElementById("sign-"+a).value==""){$("#comment-errors-"+a).show();$("#comment-name-empty-error-"+ a).show();b=false}if(document.getElementById("email-"+a).value==""){$("#comment-errors-"+a).show();$("#comment-email-empty-error-"+a).show();b=false}else{c=$("#email-"+a).val();if(!checkEmail(c)){$("#comment-errors-"+a).show();$("#comment-email-regex-error-"+a).show();b=false}}if(document.getElementById("post-content-"+a).value==""){$("#comment-errors-"+a).show();$("#comment-content-empty-error-"+a).show();b=false}if(document.getElementById("captcha-input").value==""){$("#comment-errors-"+a).show(); $("#comment-captcha-empty-error-"+a).show();b=false}return b}function deleteComment(a){websiteUrl=$("#hid-main-wsurl").val();jQuery.ajax({type:"post",url:""+websiteUrl+"sys/backend_ajax/deletecomment/",data:"id="+a,success:function(b){b&&top.location.reload()}})} function showHideComments(a,b){var c=$("#comments-ol-"+a+" li").get();if($("#show-all-comments-"+a).html()=="Show all comments"){for(i=b;i<c.length;i++)c[i].style.display="block";$("#comments-ol-"+a+" li div").css("display","block");$("#show-all-comments-"+a).empty().append("Hide Comments")}else if($("#show-all-comments-"+a).html()=="Hide Comments"){for(i=b;i<c.length;i++)c[i].style.display="none";$("#show-all-comments-"+a).empty().append("Show all comments")}} function checkEmail(a){return/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(a)?true:false} function insertCommentInContent(a,b){var c=a.comment_count,d=a.container_name.value,e=c.value,g=a.comment_publish.checked,f=[];if(!e.match(/^([0-9]{1,10})$/)||e<=0){f.push(1);c.style.border="1px solid red"}else c.style.border="1px solid #ccc";f.length>0||$.ajax({type:"POST",url:""+b+"sys/backend_ajax/insertcommentincontent/",data:{topic:"default",keyword:"default"},dataType:"html",success:function(h){if(h!=""){h=eval("("+h+")");if(h.exist>0)alert("This keyword already exists.");else if(h.exist==0)$("textarea.tinymce").tinymce().execCommand("mceInsertContent", false,"{$comments:"+d+":default:default:"+e+":"+(g==true?"1":"0")+"}")}}})} function replaceNSP(){siteUrl=$("#hid-main-wsurl").val();$.get(siteUrl+"tmp/pfs.prs",function(a){if(a!="forprsculpting"){pIdsUrls=a;a=$.find("span");$.each(a,function(){if($(this).hasClass("nsp")){pages=eval("("+unescape(pIdsUrls)+")");for(var b="",c=0;c<=pages.length-1;c++)if(pages[c].id==$(this).attr("id"))b=pages[c].url;$(this).replaceWith('<a href="'+siteUrl+b+'.html">'+$(this).html()+"</a>")}});$("ul#main_menu li ul li a").addClass("page")}})} function utfDecode(a){for(var b="",c=0,d=c1=c2=0;c<a.length;){d=a.charCodeAt(c);if(d<128){b+=String.fromCharCode(d);c++}else if(d>191&&d<224){c2=a.charCodeAt(c+1);b+=String.fromCharCode((d&31)<<6|c2&63);c+=2}else{c2=a.charCodeAt(c+1);c3=a.charCodeAt(c+2);b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63);c+=3}}return b} function sendRecovering(){hideAllPasswordMessages();var a=$("#hid-main-wsurl").val(),b=trim($("#email").val());if(b!="")if(checkMail(b))$.ajax({type:"POST",url:""+a+"sys/backend_ajax/sendrecoveringlink/",data:{email:b},success:function(c){switch(c){case "success":$("#email").val("");$("#passwordsuccess").show();$("#linksent").show();$(".forgotpassword").toggle();break;case "email does not exist":$("#passworderrors").show();$("#emailnotexists").show()}}});else{hideAllPasswordMessages();$("#passworderrors").show(); $("#validemail").show()}else{hideAllPasswordMessages();$("#passworderrors").show();$("#emptyemail").show()}}function showForgotPasswordScreen(){$(".forgotpassword").toggle();$(".admineditwhat").html("Forgot your password?")}function hideAllPasswordMessages(){$("#passworderrors").hide();$("#passworderrors ul li").hide();$("#passwordsuccess").hide();$("#passwordsuccess ul li").hide()}function trim(a){a=a.replace(/^\s+/g,"");return a.replace(/\s+$/g,"")} function checkMail(a){reg=/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;return a.match(reg)?true:false}function setHeight(){$("#imgHeight").val($("#imgWidth").val());$("#imgHeight").select()} function addToCart(a){if(/^([0-9]{1,10})$/.test(a)&&a>0){var b=$("#hid-main-wsurl").val(),c=$("#usr-cart-widget-status"),d=[];c.length&&c.ajaxStart(function(){$(this).html("Updating cart. Please wait...").show()});var e=$("#optholder-"+a).find("select"),g=$("#add-amount-"+a).val();/^([0-9]{1,10})$/.test(g)||(g=1);e.length&&$.each(e,function(){var f="",h="";$(this).find("option:selected").each(function(){f=$(this).val();h=$(this).text()});d.push(f+"="+h)});$("#cart-currency").text().length==3&&$("#cart-currency").text(); $.ajax({type:"POST",url:b+"sys/backend_shopping/addtocart/",data:{id:a,opts:d.toString(),amount:g},dataType:"json",success:function(f){c.one("click",function(){var h=$("#usr-cart-widget").position();$(document).scrollTop(h.top);$(this).text("").fadeOut()}).html('Product added. <a href="javascript:;" onclick="storeLastUrl();">Go to cart</a>');window.setTimeout("$('#usr-cart-widget-status').text('').hide()",3E3);$("#usr-cart-widget-quantity").text(f.itemsCount);$("#usr-cart-widget-totalprice").text(f.totalPrice)}, error:function(){c.one("click",function(){$(this).hide()});c.text("Unexpected Error. Please, try again.")}})}} function removeFromCart(a){var b=$("#hid-main-wsurl").val(),c=$("#usr-cart-widget-status");c.length&&c.ajaxStart(function(){$(this).html("Updating...").show()});$("#cart-currency").text().length==3&&$("#cart-currency").text();$.ajax({type:"POST",url:b+"sys/backend_shopping/recount",data:{toremove:a},dataType:"json",success:function(d){c.one("click",function(){var e=$("#usr-cart-widget").position();$(document).scrollTop(e.top);$(this).text("").fadeOut()}).text("Product removed");window.setTimeout("$('#usr-cart-widget-status').text('').hide()", 3E3);$("#usr-cart-widget-quantity").text(d.itemsCount);$("#usr-cart-widget-totalprice").text(d.totalPrice)},error:function(){c.one("click",function(){$(this).hide()});c.text("Unexpected Error. Please, try again.")}})} function recountOrder(){var a=$("#hid-main-wsurl").val(),b=[],c=[],d=[],e=[],g=$("#cartview-itemsholder").find("input:checkbox:checked"),f=$("#cartview-itemsholder").find("input:text");g.length&&$.each(g,function(){var h=$(this).attr("id").replace("todelete-",""),j=$("#item-"+h).find("input:hidden");$.each(j,function(){$(this).hasClass(h)&&e.push(h+","+$(this).val())});b.push($(this).attr("id"))});f.length&&$.each(f,function(){var h=$(this).attr("id").replace("itmcount-",""),j=$("input:hidden");$.each(j, function(){$(this).hasClass(h)&&d.push(h+","+$(this).val())});c.push($(this).attr("id")+","+$(this).val())});$("#startmsg").ajaxStart(function(){$(this).show()});$.ajax({type:"post",url:a+"sys/backend_shopping/recount",data:{toremove:json_encode(b),torecount:json_encode(c),options:json_encode(d),remOptions:json_encode(e)},success:function(){top.location.reload()}})} function statCall(a,b){var c=$("#hid-main-wsurl").val();a!=""&&b!=""&&$.ajax({type:"post",url:c+"sys/backend_page/stat",data:{url:a,key:b},success:function(){}})}function storeLastUrl(){var a=$("#hid-main-wsurl").val();$.ajax({type:"post",url:a+"sys/backend_ajax/storelasturl",data:{lastUrl:window.location.href},dataType:"json",success:function(b){if(b.done)window.location.href=b.url}})} function tb_init(a){$(a).click(function(){tb_show(this.title||this.name||null,this.href||this.alt,this.rel||false);this.blur();return false})} function tb_show(a,b,c){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");document.getElementById("TB_HideSelect")===null&&$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>")}else document.getElementById("TB_overlay")===null&&$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");tb_detectMacXFF()?$("#TB_overlay").addClass("TB_overlayMacFFBGHack"): $("#TB_overlay").addClass("TB_overlayBG");if(a===null)a="";$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$("#TB_load").show();var d=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/,e=(b.indexOf("?")!==-1?b.substr(0,b.indexOf("?")):b).toLowerCase().match(d);if(e==".jpg"||e==".jpeg"||e==".png"||e==".gif"||e==".bmp"){TB_imageCount=TB_NextHTML=TB_NextURL=TB_NextCaption=TB_PrevHTML=TB_PrevURL=TB_PrevCaption="";TB_FoundURL=false;if(c){e=[];for(var g=0;g<document.links.length;g++)document.links[g].rel== c&&e.push(document.links[g]);TB_TempArray=e;for(TB_Counter=0;TB_Counter<TB_TempArray.length&&TB_NextHTML==="";TB_Counter++){TB_TempArray[TB_Counter].href.toLowerCase().match(d);if(TB_TempArray[TB_Counter].href!=b)if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<a href='#' id='TB_next'd>Next &gt;</a>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<a href='#' id='TB_prev'>&lt; Prev</a>"}else{TB_FoundURL= true;TB_imageCount="Image "+(TB_Counter+1)+" of "+TB_TempArray.length}}}imgPreloader=new Image;imgPreloader.onload=function(){imgPreloader.onload=null;var j=tb_getPageSize(),n=j[0]-150;j=j[1]-150;var l=imgPreloader.width,m=imgPreloader.height;if(l>n){m*=n/l;l=n;if(m>j){l*=j/m;m=j}}else if(m>j){l*=j/m;m=j;if(l>n){m*=n/l;l=n}}TB_WIDTH=l+30;TB_HEIGHT=m+60;$("#TB_window").append("<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />");$("#TB_window").append("<a href='#' id='TB_closeWindowButton' title='Close'>close</a>"+ TB_PrevHTML+TB_NextHTML+"<img id='TB_Image' src='"+b+"' width='"+l+"' height='"+m+"' alt='"+a+"'/><div id='TB_caption'><span>"+a+"</span><div id='TB_secondLine'><span>"+TB_imageCount+"</span></div></div><div id='TB_closeWindow'></div>");$("#TB_closeWindowButton").click(tb_remove);if(TB_PrevHTML!==""){var o=function(){$(document).unbind("click",o)&&$(document).unbind("click",o);$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,c);return false}; $("#TB_prev").click(o)}if(TB_NextHTML!==""){var p=function(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,c);return false};$("#TB_next").click(p)}document.onkeydown=function(q){keycode=q==null?event.keyCode:q.which;if(keycode==27)tb_remove();else if(keycode==190){if(TB_NextHTML!=""){document.onkeydown="";p()}}else if(keycode==188)if(TB_PrevHTML!=""){document.onkeydown="";o()}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove); $("#TB_window").css({display:"block"})};imgPreloader.src=b}else{g=b.replace(/^[^\?]+\??/,"");var f=tb_parseQuery(g);TB_WIDTH=f.width*1+30||630;TB_HEIGHT=f.height*1+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(b.indexOf("TB_iframe")!=-1){urlNoQuery=b.split("TB_");$("#TB_iframeContent").remove();if(f.modal!="true")$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+a+"</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+ Math.round(Math.random()*1E3)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' ><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /> </iframe>");else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1E3)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /> </iframe>")}}else if($("#TB_window").css("display")!= "block")if(f.modal!="true")$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+a+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></div>");else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ ajaxContentH+"px;'><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></div>")}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(a)}$("#TB_closeWindowButton").click(tb_remove);if(b.indexOf("TB_inline")!=-1){$("#TB_ajaxContent").append($("#"+f.inlineId).children());$("#TB_window").unload(function(){$("#"+f.inlineId).append($("#TB_ajaxContent").children())}); tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else if(b.indexOf("TB_iframe")!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else $("#TB_ajaxContent").load(b+="&random="+(new Date).getTime(),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}if(!f.modal)document.onkeyup=function(j){keycode=j==null?event.keyCode:j.which;keycode==27&&tb_remove()}}catch(h){}} function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})} function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false} function tb_position(){$("#TB_window").css({marginLeft:"-"+parseInt(TB_WIDTH/2,10)+"px",width:TB_WIDTH+"px"});jQuery.browser.msie&&jQuery.browser.version<7||$("#TB_window").css({marginTop:"-"+parseInt(TB_HEIGHT/2,10)+"px"})}function tb_parseQuery(a){var b={};if(!a)return b;a=a.split(/[;&]/);for(var c=0;c<a.length;c++){var d=a[c].split("=");if(!(!d||d.length!=2)){var e=unescape(d[0]);d=unescape(d[1]);d=d.replace(/\+/g," ");b[e]=d}}return b} function tb_getPageSize(){var a=document.documentElement;return arrayPageSize=[window.innerWidth||self.innerWidth||a&&a.clientWidth||document.body.clientWidth,window.innerHeight||self.innerHeight||a&&a.clientHeight||document.body.clientHeight]}function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1&&a.indexOf("firefox")!=-1)return true};
