// start (c) Radek HULAN, http://hulan.info/ Creative Commons Attribution License
var isXHTML;
var d=document;
function createNewEle(ele){
if(isXHTML) 
return document.createElementNS('http://www.w3.org/1999/xhtml', ele);
else 
return document.createElement(ele);
};     
function navrcholu(){
var ele=document.getElementById('navrcholu');
if(!ele)return;
isXHTML=/html\:/.test(document.getElementsByTagName('body')[0].nodeName);
var id=parseInt(ele.getAttribute('title'));
if(!id)alert('TITLE attribute does not contain your NAVRCHOLU.cz ID!');
var n=navigator;
var p=document;
var c,t,b,j,m,r,y,d,x,w;
d=x=w=j=0;
if(p.uniqueID && n.appVersion.indexOf("Win")>=0){
n3f8q=8
}
if( n.plugins && n.plugins["Shockwave Flash"]){
t=n.plugins["Shockwave Flash"].description;
n3f8q=parseInt(t.charAt(t.indexOf(".")-1)); 
}
m=(n.userAgent.substring(0,8)=="Mozilla/") ? n.userAgent.substring(8,9) : 4;
if(m>2) j=(n.javaEnabled()) ? 1 : 0;
r=window.top.document.referrer;
if(m>3 && screen){
d=screen.colorDepth;
if(d==0) d=screen.pixelDepth;
x=screen.width;
w=(p.all) ? top.document.body.clientWidth:top.innerWidth; 
}
y=new Date();
y.setTime(y.getTime()-31536000000);
p.cookie="nvt=1";
c=(p.cookie.indexOf("nvt") != -1)?1:0;
p.cookie="nvt=1; expires="+y.toGMTString();
ele.href='http://navrcholu.cz/Statistika/'+id+'/';
ele.setAttribute('title','NAVRCHOLU.cz');
var img=ele.appendChild(createNewEle('img'));
img.setAttribute('alt','NAVRCHOLU.cz');
img.style.width='80px'
img.style.height='15px';
img.setAttribute('src','http://c1.navrcholu.cz/hit?site='+id+';t=o80;'
+'fv='+n3f8q+';js='+j+';cs='+c+';ref='+escape(r)+';cd='
+d+';sx='+x+';wx='+w+';jss=1;r='+Math.random());
}
function gohref(){parent.location.href='http://www.toplist.cz'}
function toplist(){
var toplistcnt=d.createElement('img');
toplistcnt.setAttribute('src','http://toplist.cz/count.asp?id=275634&amp;logo=&amp;http='+escape(d.referrer)+'&amp;wi='+escape(window.screen.width)+'&he='+escape(window.screen.height)+'&amp;cd='+escape(window.screen.colorDepth)+'&amp;t='+escape(d.title)+'');
toplistcnt.setAttribute('width','88');
toplistcnt.setAttribute('height','31');
toplistcnt.setAttribute('alt','TOPlist');
toplistcnt.style.bottom='0';
toplistcnt.style.right='0';
toplistcnt.style.height='0';
toplistcnt.style.width='0';
toplistcnt.style.border='0';
toplistcnt.style.overflow='hidden';
toplistcnt.setAttribute('onclick','gohref()');
d.getElementsByTagName('body').item(0).appendChild(toplistcnt);
}
function divyhv(){
var divy=d.getElementById('hv').getElementsByTagName('div');
for(var i=0;i<divy.length;i++){
divy[i].onclick=function(){document.location.href=this.childNodes[0].getAttribute('href');}
if(d.uniqueID){
divy[i].onmouseover=function(){this.className+=' iehv';}
divy[i].onmouseout=function(){this.className=this.className.replace(new RegExp(' iehv\\b'),'');}
}}}
function koktan(){
var al=document.links;
for(var i=0;i<al.length;i++){
if(al[i].href.indexOf('https')!=-1){
al[i].onclick=function(){return !window.open(this.href);
};
}
}
}
function setadmin(){
navrcholu();
toplist();
koktan();
if(d.getElementById('hv')){divyhv();}
if(!d.uniqueID){
var kde=document.getElementById('admin')
admin=document.createElement('a')
admin.setAttribute('href','/?q=user');
admin.setAttribute('title','Admin');
kde.appendChild(admin)
admin.appendChild(document.createTextNode('\u00bb'));
}}
if(document.childNodes){window.onload=setadmin};

//function addEvent(obj,evType,fn){if(window.opera&&obj.addEventListener){obj.addEventListener(evType,fn,false);return true;}else if(obj.addEventListener){obj.addEventListener(evType,fn,true);return true;}else if(obj.attachEvent){var r=obj.attachEvent('on'+evType,fn);return r;}else{return false;}}
//addEvent(window,'load',setadmin);addEvent(window,'load',ven);addEvent(window,'scroll',fixedMenu);//addEvent http://www.scottandrew.com/weblog/articles/cbs-events
