var tc_blinker_timers=new Array();var tc_blinker_objs=new Array();var tc_blinker_objs_nulltext=new Array();var tc_blinker_nulltext="@";var tc_blinker_interval=500;var tc_popunder_url="";window.tc_jscss_filesadded="";function tc_resize_window(){if(window.outerWidth!=undefined&&(window.outerWidth>=screen.availWidth&&window.outerHeight>=screen.availHeight)){return false}if(top===self){window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight)}return true}function tc_ajax_thumb_hit(a){microAjax("/thumbclickpopup/"+a,function(b){})}function tc_parseQueryStr(d){var c;var b=new Object;if(d!=undefined&&d!=""){c=d.replace(/\%20/g," ");var a=c.split("&");for(var e=0;e<a.length;e++){var f=a[e].split("=");if(f[0]!=undefined&&f[1]!=undefined){b[f[0]]=f[1]}}}return b}function tc_getDomain(b){var a=new RegExp("(http|ftp|https)://(.*?)/.*$");var c=b.match(a);return c[2]}function tc_popunder(e,g){var a=typeof(tc_popunder_shown);var b;if(g==undefined){g=false}if(a=="undefined"||g==true){if(navigator.userAgent.indexOf("Firefox/4")!=-1||(navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1)){return false}tc_popunder_shown=true;if(navigator.userAgent.indexOf("Firefox")!=-1||navigator.userAgent.indexOf("MSIE 8")!=-1){b=window.open(e,"_blank","width=1024, height=950 , toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1");if(b!=null){b.blur()}}else{if(navigator.userAgent.indexOf("MSIE 9")!=-1){var d="width=1024, height=950, toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1";var c=tc_getDomain(window.location.toString());var f=tc_getDomain(e.toString());if(c==f){b=window.open(e,"_blank",d);window.focus()}}else{var d="width=1024, height=950, toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1";b=window.open(e,"_blank",d);window.focus()}}return b}return false}function tc_add_window_click_popunder_event(a){if(!window.addEventListener){window.document.body.attachEvent("onclick",function(){tc_popunder(a)})}else{window.document.body.addEventListener("click",function(){tc_popunder(a)},false)}}function tc_text_doBlink(a){if(tc_blinker_objs[a]!=undefined){if(tc_blinker_objs[a].type==undefined){tc_blinker_objs[a].style.visibility=tc_blinker_objs[a].style.visibility==""?"hidden":""}else{if(tc_blinker_objs[a].type=="text"){if(tc_blinker_objs[a].value==""||tc_blinker_objs[a].value==tc_blinker_objs_nulltext[a]){tc_blinker_objs[a].value=(tc_blinker_objs[a].value!="")?"":tc_blinker_objs_nulltext[a]}}}}}function tc_text_stopBlink(a){clearInterval(tc_blinker_timers[a]);if(tc_blinker_objs[a]!=undefined){if(tc_blinker_objs[a].type==undefined){tc_blinker_objs[a].style.visibility=""}else{if(tc_blinker_objs[a].type=="text"){if(tc_blinker_objs[a].value==tc_blinker_objs_nulltext[a]){tc_blinker_objs[a].value=""}}}}}function tc_text_startBlink(a){clearInterval(tc_blinker_timers[a]);tc_blinker_timers[a]=setInterval("tc_text_doBlink('"+a+"')",tc_blinker_interval)}function tc_blinker(b,c,a){if(a==undefined){a=3}if(c==undefined){c=tc_blinker_nulltext}var d=b;if(typeof b=="string"){d=document.getElementById(b)}if(d==null){if(a==0){return}setTimeout(function(){tc_blinker(b,c,a-1)},3000)}else{d.onblur=function(){tc_text_startBlink(this.id)};d.onfocus=function(){tc_text_stopBlink(this.id)};d.start_blink=function(){tc_text_doBlink(this.id)};tc_blinker_objs[d.id]=d;tc_blinker_objs_nulltext[d.id]=c;tc_text_startBlink(d.id)}}function tc_validate_mail(a,b){if(/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/.test(a.toLowerCase())){return true}else{alert(b);return false}}function tc_email_check(f){var a="@";var b=".";var e=f.indexOf(a);var c=f.length;var d=f.indexOf(b);if(f.indexOf(a)==-1){return false}if(f.indexOf(a)==-1||f.indexOf(a)==0||f.indexOf(a)==c){return false}if(f.indexOf(b)==-1||f.indexOf(b)==0||f.indexOf(b)==c){return false}if(f.indexOf(a,(e+1))!=-1){return false}if(f.substring(e-1,e)==b||f.substring(e+1,e+2)==b){return false}if(f.indexOf(b,(e+2))==-1){return false}if(f.indexOf(" ")!=-1){return false}return true}function microAjax(b,a){this.bindFunction=function(e,d){return function(){return e.apply(d,[d])}};this.stateChange=function(d){if(this.request.readyState==4){this.callbackFunction(this.request.responseText)}};this.getRequest=function(){if(window.ActiveXObject){return new ActiveXObject("Microsoft.XMLHTTP")}else{if(window.XMLHttpRequest){return new XMLHttpRequest()}}return false};this.postBody=(arguments[2]||"");this.callbackFunction=a;this.url=b;this.request=this.getRequest();if(this.request){var c=this.request;c.onreadystatechange=this.bindFunction(this.stateChange,this);if(this.postBody!==""){c.open("POST",b,true);c.setRequestHeader("X-Requested-With","XMLHttpRequest");c.setRequestHeader("Content-type","application/x-www-form-urlencoded");c.setRequestHeader("Connection","close")}else{c.open("GET",b,true)}c.send(this.postBody)}}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<c.length){k=c.charCodeAt(b++);h=c.charCodeAt(b++);f=c.charCodeAt(b++);j=k>>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<c.length){j=this._keyStr.indexOf(c.charAt(b++));g=this._keyStr.indexOf(c.charAt(b++));e=this._keyStr.indexOf(c.charAt(b++));d=this._keyStr.indexOf(c.charAt(b++));k=(j<<2)|(g>>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;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(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(d<a.length){e=a.charCodeAt(d);if(e<128){b+=String.fromCharCode(e);d++}else{if((e>191)&&(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}};if(typeof(tc_promo_parseURL)!="function"){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}}if(typeof(tc_promo_setCookie)!="function"){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())}}if(typeof(tc_promo_getCookie)!="function"){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""}}if(typeof(tc_get_real_window_height)!="function"){function tc_get_real_window_height(){if(typeof window.innerHeight=="number"){return(window.scrollMaxX>0)?window.innerHeight-17:window.innerHeight}else{if(document.documentElement.clientHeight){return document.documentElement.clientHeight}else{if(typeof document.body.clientHeight=="number"){return document.body.clientHeight}}}return false}}if(typeof(tc_get_real_window_width)!="function"){function tc_get_real_window_width(){if(typeof window.innerWidth=="number"){return(window.scrollMaxY>0)?window.innerWidth-17:window.innerWidth}else{if(document.documentElement.clientWidth){return document.documentElement.clientWidth}else{if(typeof document.body.clientWidth=="number"){return document.body.clientWidth}}}return false}}if(typeof(tc_get_real_scroll_top)!="function"){function tc_get_real_scroll_top(){var a=false;if(window.innerHeight){a=window.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollTop}}}return(typeof a=="number")?a:0}}if(typeof(tc_add_onload_event)!="function"){(function(){var i=window.DomReady={};var h=navigator.userAgent.toLowerCase();var c={version:(h.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(h),opera:/opera/.test(h),msie:(/msie/.test(h))&&(!/opera/.test(h)),mozilla:(/mozilla/.test(h))&&(!/(compatible|webkit)/.test(h))};var d=false;var e=false;var g=[];function a(){if(!e){e=true;if(g){for(var j=0;j<g.length;j++){g[j].call(window,[])}g=[]}}}function f(j){var k=window.onload;if(typeof window.onload!="function"){window.onload=j}else{window.onload=function(){if(k){k()}j()}}}function b(){if(d){return}d=true;if(document.addEventListener&&!c.opera){document.addEventListener("DOMContentLoaded",a,false)}if(c.msie&&window==top){(function(){if(e){return}try{document.documentElement.doScroll("left")}catch(k){setTimeout(arguments.callee,0);return}a()})()}if(c.opera){document.addEventListener("DOMContentLoaded",function(){if(e){return}for(var k=0;k<document.styleSheets.length;k++){if(document.styleSheets[k].disabled){setTimeout(arguments.callee,0);return}}a()},false)}if(c.safari){var j;(function(){if(e){return}if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return}if(j===undefined){var k=document.getElementsByTagName("link");for(var l=0;l<k.length;l++){if(k[l].getAttribute("rel")=="stylesheet"){j++}}var m=document.getElementsByTagName("style");j+=m.length}if(document.styleSheets.length!=j){setTimeout(arguments.callee,0);return}a()})()}f(a)}i.ready=function(k,j){b();if(e){k.call(window,[])}else{g.push(function(){return k.call(window,[])})}};b()})();tc_add_onload_event=DomReady.ready}if(typeof(tc_promo_encode)!="function"){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}}if(typeof(tc_get_referrer)!="function"){function tc_get_referrer(){if(typeof(tc_ref)=="undefined"){var a=tc_promo_parseURL(window.document.referrer);if(location.host!=a.hostname){tc_ref=window.document.referrer;if(tc_ref!=""){tc_ref=TC_promo_Base64.encode(tc_ref);tc_ref=encodeURIComponent(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_Base64.encode(tc_ref);tc_ref=encodeURIComponent(tc_ref)}}}tc_promo_setCookie("tc_referrer",tc_ref,null);return tc_ref}return""}}if(typeof(tc_img_blink)!="function"){function tc_img_blink(f,e,a){var b=750;if(a!=undefined){b=a}if(document.body!=null){var d=document.body.getElementsByTagName(f);for(var c=0;c<d.length;c++){if(d[c].className.search(new RegExp("(^|\\s)"+e+"(?:\\s|$)"))>=0){d[c].style.visibility=d[c].style.visibility=="hidden"?"visible":"hidden"}}setTimeout('tc_img_blink("'+f+'","'+e+'",'+b+")",b)}}}if(typeof(tc_promo_bg_blink)!="function"){function tc_promo_bg_blink(b,a){bg_blink_obj=document.getElementById(b);if(bg_blink_obj!=undefined){bg_blink_obj.className=(bg_blink_obj.className+" "+a);setTimeout("tc_promo_bg_blink_stop('"+b+"','"+a+"');",1000)}}}if(typeof(tc_promo_bg_blink_stop)!="function"){function tc_promo_bg_blink_stop(b,a){bg_blink_obj=document.getElementById(b);if(bg_blink_obj!=undefined){bg_blink_obj.className=bg_blink_obj.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1")}}}function tc_execJS(b){if(b&&b.getElementsByTagName("script")[0]){var c=document.createElement("script"),a=document.getElementsByTagName("head")[0];c.setAttribute("type","text/javascript");js_code=b.getElementsByTagName("script")[0].text;c.text=js_code;a.appendChild(c)}}function tc_keyupevent(e,key,action){var code;if(!e){var e=window.event}if(e.keyCode){code=e.keyCode}else{if(e.which){code=e.which}}if(code==key){eval(action)}}function tc_add_key_event(a,b){if(document.addEventListener){document.addEventListener("keyup",function(c){tc_keyupevent(c,a,b)},false)}else{if(document.attachEvent){document.attachEvent("onkeyup",function(c){tc_keyupevent(c,a,b)})}}}if(typeof(blink_bg_field)!="function"){function blink_bg_field(e,a,f,b,d){if(d==undefined){d=0}var c=document.getElementById(e);if(c!=undefined&&d<b){if(d%2==0){c.style.backgroundColor=f;d++;timer=setTimeout("blink_bg_field('"+e+"','"+a+"','"+f+"',"+b+","+d+")",100)}else{c.style.backgroundColor=a;d++;timer=setTimeout("blink_bg_field('"+e+"','"+a+"','"+f+"',"+b+","+d+")",100)}}else{c.style.backgroundColor=a}}}if(typeof(tc_popdhtml_add_css)!="function"){function tc_popdhtml_add_css(a){var c=document.createElement("link");c.rel="stylesheet";c.type="text/css";c.href=a;var b=document.getElementsByTagName("head")[0];b.appendChild(c)}}if(typeof(tc_change_msgerror)!="function"){function tc_change_msgerror(a){msgerror=a}}if(typeof(tc_preload_image)!="function"){function tc_preload_image(a){var b=new Image();b.src=a}}if(typeof(tc_gettopleft)!="function"){function tc_gettopleft(c){var a,b=0;a=c.offsetLeft;b=c.offsetTop;c=c.offsetParent;while(c!=null){a=parseInt(a)+parseInt(c.offsetLeft);b=parseInt(b)+parseInt(c.offsetTop);c=c.offsetParent}return{top:b,left:a}}}function getElementsByClassName(d,c,a){var b;if(c){b=c}else{b=document.body}if(typeof a=="undefined"){a=[];getElementsByClassName.search=new RegExp(d,"gi")}while(b){if(getElementsByClassName.search.test(b.className)){a.push(b)}if(b.firstChild){getElementsByClassName(d,b.firstChild,a)}b=b.nextSibling}return a}function add_centered_overlay(e,k,l){var a=document.getElementById(e);var f=(a.offsetWidth/2);var g=(a.offsetHeight/2);var h=getElementsByClassName(k);var j;for(var d=0;d<h.length;d++){j=h[d];var c=((j.offsetWidth/2)*-1)-f;var m=(j.offsetHeight/2)-g;var b=a.cloneNode(false);j.parentNode.insertBefore(b,j.nextSibling);b.className=l;b.id="";b.style.cssText="margin-top:"+m+"px;margin-left:"+c+"px;visibility:visible;"}}function ShowForm(f,l,b,g,d,a){var e=document.getElementById(l);var k=tc_gettopleft(e);var h=k.top;var c=k.left;var j=document.getElementById(d);if(j){j.style.top=h+"px";j.style.left=c+"px";j.style.visibility="visible";document.myForm.emailfield.focus();if(f!=""){b=f+","+b}document.myForm.thumb_id.value=b;document.myForm.testmode.value=g?1:0}var i=document.getElementById(a);if(i){i.style.visibility="hidden"}}function tc_change_email_value(c){var b=document.getElementsByName("email");var a;for(a=0;a<b.length;a++){b[a].value=c}}function get_random_int(b,a){var c=Math.random()*(a-b);return(Math.round(c)+b)}function tc_load_jscss_file(a,b){if(b=="js"){var c=document.createElement("script");c.setAttribute("type","text/javascript");c.setAttribute("src",a)}else{if(b=="css"){if(document.createStyleSheet){document.createStyleSheet(a)}else{var c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("href",a)}}}if(typeof c!="undefined"){document.getElementsByTagName("head")[0].appendChild(c)}}function tc_check_load_jscss_file(a,b){if(window.tc_jscss_filesadded.indexOf("["+a+"]")==-1){tc_load_jscss_file(a,b);window.tc_jscss_filesadded+="["+a+"]"}};
