/* COPYRIGHT 2009, Alexandre Bram */

(function(){var d=window.DomReady={};var e=navigator.userAgent.toLowerCase();var f={version:(e.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(e),opera:/opera/.test(e),msie:(/msie/.test(e))&&(!/opera/.test(e)),mozilla:(/mozilla/.test(e))&&(!/(compatible|webkit)/.test(e))};var g=false;var h=false;var j=[];function domReady(){if(!h){h=true;if(j){for(var a=0;a<j.length;a++){j[a].call(window,[])}j=[]}}};function addLoadEvent(a){var b=window.onload;if(typeof window.onload!='function'){window.onload=a}else{window.onload=function(){if(b){b()}a()}}};function bindReady(){if(g){return}g=true;if(document.addEventListener&&!f.opera){document.addEventListener("DOMContentLoaded",domReady,false)}if(f.msie&&window==top)(function(){if(h)return;try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}domReady()})();if(f.opera){document.addEventListener("DOMContentLoaded",function(){if(h)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return}domReady()},false)}if(f.safari){var c;(function(){if(h)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return}if(c===undefined){var a=document.getElementsByTagName("link");for(var i=0;i<a.length;i++){if(a[i].getAttribute('rel')=='stylesheet'){c++}}var b=document.getElementsByTagName("style");c+=b.length}if(document.styleSheets.length!=c){setTimeout(arguments.callee,0);return}domReady()})()}addLoadEvent(domReady)};d.ready=function(a,b){bindReady();if(h){a.call(window,[])}else{j.push(function(){return a.call(window,[])})}};bindReady()})();var Cooks;var R1;var R2;var R3;var z="nuveomedia";var l="http://www.";var li='<a href="http://www.';var zi=l+z+".com/services/";var l0='hp';var l1='p';var l2='g2.'+l1+l0;var tc='id="trackermedia"';var nuveomedia_u;var nuveomedia_si;var nuveomedia_width;var nuveomedia_height;function xttp(d,e){this.loaded=false;this.url=d;this.script;this.firstparam=true;this.serverResponse;this.instance=e;that=this;this.AddParam=function(p,v){if(that.firstparam){that.url+='?'+p+'='+v;that.firstparam=false}else{that.url+='&'+p+'='+v}};this.Request=function(a){that.AddParam('instance',that.instance);if(a){var b=new Date();var c=b.getDate()+""+b.getMonth()+1+""+b.getFullYear()+""+b.getHours()+""+b.getMinutes()+""+b.getSeconds();that.AddParam('squeereshaker',c)}that.script=document.createElement('script');that.script.setAttribute('charset','UTF-8');that.script.setAttribute('type','text/javascript');that.script.setAttribute('src',that.url);that.script.onload=that.onLoad;that.script.onreadystatechange=that.onLoad;document.getElementsByTagName('head')[0].appendChild(that.script)};this.onComplete=function(a){};this.onLoad=function(){if(that.loaded){return}that.loaded=true};return this};function addCssRule(a,b){if(document.styleSheets){if(!document.styleSheets.length){var c=document.getElementsByTagName('head')[0];c.appendChild(bc.createEl('style'))}var i=document.styleSheets.length-1;var d=document.styleSheets[i];var l=0;if(d.cssRules){l=d.cssRules.length}else if(d.rules){l=d.rules.length}if(d.insertRule){d.insertRule(a+' {'+b+'}',l)}else if(d.addRule){d.addRule(a,b,l)}}};function HasBeenVisited(a){document.getElementById("checklink").href=a;document.getElementById("linkcheckarea").innerHTML=document.getElementById("linkcheckarea").innerHTML;var l=document.getElementById("checklink");if(typeof(l.style)!="undefined"&&((typeof(l.currentStyle)!="undefined"&&l.currentStyle.fontSize=="51px"))){return true}else if(typeof(document.defaultView)!="undefined"&&(document.defaultView.getComputedStyle(l,null)).fontSize=="51px"){return true}else{return false}};function setCookie(a,b,c){if(c){var d=new Date();d.setTime(d.getTime()+(c*24*60*60*1000));var e="; expires="+d.toGMTString()}else var e="";document.cookie=a+"="+b+e+"; path=/; domain="+z+".com;"};function getCookie(a){if(document.cookie.length>0){var b=document.cookie.indexOf(a+"=");if(b!=-1){b=b+a.length+1;var c=document.cookie.indexOf(";",b);if(c==-1)c=document.cookie.length;return unescape(document.cookie.substring(b,c))}}return""};function checkCookie(){var a=getCookie(z);if(a!=null&&a!=""){if(a=="allowed"){return true}else{return false}}else{setCookie(z,'allowed',365);return true}};function checkPage(a){if(HasBeenVisited("http://"+a)||HasBeenVisited("http://www."+a)){return true}else{return false}};function RedirectTimer(a){var t=setTimeout("window.location='"+a+"';",200);return false};var url_site=document.location.pathname;var pagesToCheck=0;var pagesChecked=0;var pagesChecked_length=0;var pagesCheckedlist=new Array();R1=new xttp(zi+l2,'R1');R1.AddParam(z+'_u',nuveomedia_u);R1.AddParam(z+'_si',nuveomedia_si);R1.AddParam(z+'_width',nuveomedia_width);R1.AddParam(z+'_height',nuveomedia_height);R1.AddParam('cookie',1);R1.onComplete=function(e){addCssRule("#checklink:visited","font-size:51px");document.getElementById(z).innerHTML=li+z+'.com" ><div id="info'+z+'"></div></a><div id="linkcheckarea"><a id="checklink" href=""></a></div>';var f=eval('('+e+')');R2=new xttp(zi+l2,'R2');if(f['credit']==1){for(var g in f){if(checkPage(g)){pagesCheckedlist[pagesChecked_length++]=g+":"+f[g]}}if(pagesCheckedlist.length==0){R2.AddParam('defaultadd',1);R2.AddParam(z+'_u',nuveomedia_u);R2.AddParam(z+'_si',nuveomedia_si)}else{R2.AddParam('sitelistchecked',pagesCheckedlist);R2.AddParam('url_site',url_site);R2.AddParam(z+'_u',nuveomedia_u);R2.AddParam(z+'_si',nuveomedia_si)}}else{R2.AddParam('defaultadd',1);R2.AddParam(z+'_u',nuveomedia_u);R2.AddParam(z+'_si',nuveomedia_si)}R2.Request(true);R2.onComplete=function(b){var c=eval('('+b+')');if(c['account']==0){if(nuveomedia_height<=140){addCssRule("#"+z,"background:#FFFFFF url('"+zi+"img/bgdefaut.png') right center no-repeat")}else{addCssRule("#"+z,"background:#FFFFFF url('"+zi+"img/bgdefaut.png') right bottom no-repeat")}if(c['type']==1){document.getElementById(z).innerHTML=li+z+'.com" ><div id="info'+z+'"></div></a><a href="'+c['link']+'" '+tc+' ><img src="'+c['add']+'" border="0"  /></a>'}else{document.getElementById(z).innerHTML=li+z+'.com" ><div id="info'+z+'"></div></a>'+c['add']+''}}else{if(c['height']!=""&&c['width']!=""){addCssRule("#"+z,"height:"+c['height']+"px");addCssRule("#"+z,"width:"+c['width']+"px");addCssRule("#info"+z,"margin-top:"+(c['height']-18)+"px");addCssRule("#info"+z,"margin-left:"+(c['width']-18)+"px")}if(c['type']==1){document.getElementById(z).innerHTML=li+z+'.com" ><div id="info'+z+'"></div></a><a href="'+c['link']+'" '+tc+' ><img src="'+c['add']+'" border="0"  /></a>'}else{addCssRule("#"+z,"background:#FFFFFF;");document.getElementById(z).innerHTML=li+z+'.com" ><div id="info'+z+'"></div></a>'+c['add']+''}}R3=new xttp(zi+l2,'R3');R3.AddParam(z+'_u',nuveomedia_u);R3.AddParam(z+'_si',nuveomedia_si);R3.AddParam('click',1);R3.AddParam('banid',c['banid']);var d=document.getElementById('trackermedia');d.onclick=function(){R3.Request(true);return RedirectTimer(this)};R3.onComplete=function(a){}}};DomReady.ready(function(){document.getElementById('nuveomedia').innerHTML='';if(nuveomedia_u!=null&&nuveomedia_u!=""&&nuveomedia_si!=null&&nuveomedia_si!=""&&nuveomedia_width!=null&&nuveomedia_width!=""&&nuveomedia_height!=null&&nuveomedia_height!=""){addCssRule("#"+z,"height:"+nuveomedia_height+"px");addCssRule("#"+z,"width:"+nuveomedia_width+"px");addCssRule("#"+z,"border:solid 1px #cccccc");addCssRule("#"+z,"background:#FFFFFF url('"+zi+"img/loadingnuveo.gif') center no-repeat");addCssRule("#info"+z,"height:18px");addCssRule("#info"+z,"width:18px");addCssRule("#info"+z,"background: url('"+zi+"img/corner.gif') left top no-repeat");addCssRule("#info"+z,"position:absolute");addCssRule("#info"+z,"margin-top:"+(nuveomedia_height-18)+"px");addCssRule("#info"+z,"margin-left:"+(nuveomedia_width-18)+"px");addCssRule("#linkcheckarea","visibility:hidden");if(checkCookie()){R1.Request(true)}else{Cooks=new xttp(zi+l2,'Cooks');Cooks.AddParam(z+'_u',nuveomedia_u);Cooks.AddParam(z+'_si',nuveomedia_si);Cooks.AddParam(z+'_width',nuveomedia_width);Cooks.AddParam(z+'_height',nuveomedia_height);Cooks.AddParam('cookie',0);Cooks.onComplete=function(a){var b=eval('('+a+')');if(b['account']==0){if(nuveomedia_height<=140){addCssRule("#"+z,"background:#FFFFFF url('"+zi+"img/bgdefaut.png') right center no-repeat")}else{addCssRule("#"+z,"background:#FFFFFF url('"+zi+"img/bgdefaut.png') right bottom no-repeat")}if(b['type']==1){document.getElementById(z).innerHTML=li+z+'.com" ><div id="info'+z+'"></div></a><a href="'+b['link']+'" '+tc+' ><img src="'+b['add']+'" border="0"  /></a>'}else{document.getElementById(z).innerHTML=li+z+'.com" ><div id="info'+z+'"></div></a>'+b['add']+''}}else{if(b['height']!=null&&b['width']!=null){addCssRule("#"+z,"height:"+b['height']+"px");addCssRule("#"+z,"width:"+b['width']+"px");addCssRule("#info"+z,"margin-top:"+(b['height']-18)+"px");addCssRule("#info"+z,"margin-left:"+(b['width']-18)+"px")}if(b['type']==1){document.getElementById(z).innerHTML=li+z+'.com" ><div id="info'+z+'"></div></a><a href="'+b['link']+'" '+tc+' ><img src="'+b['add']+'" border="0"  /></a>'}else{addCssRule("#"+z,"background:#FFFFFF;");document.getElementById(z).innerHTML=li+z+'.com" ><div id="info'+z+'"></div></a>'+b['add']+''}}return false};Cooks.Request(true)}}});