var TC_promo_Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(c){var a="";var k,h,f,j,g,e,d;var b=0;c=TC_promo_Base64._utf8_encode(c);while(b>2;g=((k&3)<<4)|(h>>4);e=((h&15)<<2)|(f>>6);d=f&63;if(isNaN(h)){e=d=64}else{if(isNaN(f)){d=64}}a=a+this._keyStr.charAt(j)+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(d)}return a},decode:function(c){var a="";var k,h,f;var j,g,e,d;var b=0;c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(b>4);h=((g&15)<<4)|(e>>2);f=((e&3)<<6)|d;a=a+String.fromCharCode(k);if(e!=64){a=a+String.fromCharCode(h)}if(d!=64){a=a+String.fromCharCode(f)}}a=TC_promo_Base64._utf8_decode(a);return a},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},_utf8_decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3}}}return b}};function tc_promo_parseURL(a){if(a!=""){var c={href:a};var b=a.replace("//","/").split("/");c.protocol=b[0];c.host=b[1];b[1]=b[1].split(":");c.hostname=b[1][0];c.port=b[1].length>1?b[1][1]:"";b.splice(0,2);c.pathname="/"+b.join("/");c.pathname=c.pathname.split("#");c.hash=c.pathname.length>1?"#"+c.pathname[1]:"";c.pathname=c.pathname[0];c.pathname=c.pathname.split("?");c.search=c.pathname.length>1?"?"+c.pathname[1]:"";c.pathname=c.pathname[0];return c}return false}function tc_promo_setCookie(b,c,a){var d=new Date();d.setDate(d.getDate()+a);document.cookie=b+"="+escape(c)+((a==null)?"":";expires="+d.toGMTString())}function tc_promo_getCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return""}function tc_promo_encode(b){var a=b;if(a!=""){a=TC_promo_Base64.encode(a);a=a.replace("/","_");a=a.replace("+","-");a=a.replace(/=/g,"");a=encodeURIComponent(a)}return a}function tc_promo_decode(c){var b=c;if(b!=""){b=decodeURIComponent(b);b.replace("_","/");b.replace("-","+");var a=b.length();while(a%4!=0){a++;b+="="}b=TC_promo_Base64.decode(b)}return b}if(pid!=undefined){var url;var def_width=630;var def_height=3000;if(owner==undefined){var owner=window.document.URL;owner=tc_promo_encode(owner)}if(tc_ref==undefined){var tc_ref;var tc_ref_host=tc_promo_parseURL(window.document.referrer);if(location.host!=tc_ref_host.hostname){tc_ref=window.document.referrer;if(tc_ref!=""){tc_ref=tc_promo_encode(tc_ref)}}else{tc_ref=tc_promo_getCookie("tc_referrer");if(tc_ref==""){tc_ref=window.document.referrer;if(tc_ref!=""){tc_ref=tc_promo_encode(tc_ref)}}}tc_promo_setCookie("tc_referrer",tc_ref,null)}if(eval("typeof pid")=="object"){var nids=pid.length;var perc=Math.floor(Math.random()*99);var index=0;if(perc>0){index=parseInt(perc/(100/nids),10)}var newpid=pid[index];pid=newpid}var promotool_inuse=false;if(promotools==undefined){var promotools=new Array();promotools[0]=pid}else{for(var i in promotools){if(promotools[i]==pid){promotool_inuse=true;break}}if(promotool_inuse==false){promotools.push(pid)}}if(width=="0"){var width=def_width}if(height=="0"){var height=def_height}var countview="";if(promotool_inuse==true){countview="/cv/"+1}var v_own="/own/"+owner;var v_ref=(tc_ref!="")?"/ref/"+tc_ref:"";width+=2;var niche_url="";if(typeof(niche)!="undefined"){niche_url="/cat/"+niche}url='';document.write(url)}else{document.write('undeclared variable "pid"')};