/* (c) 2002-2003 Algorithms, development, coding by V.ladimir */

kept=3;
saveCookie('tmp','2',1000*86400*365,'/');

function errorsuppressor() {
        return true
}
window.onerror=errorsuppressor;

ie=(document.all)?true:false;
ns=(document.getElementById)?true:false;

function getE(id) {
	if (ie) {return document.all(id)}
	else if (ns) {return document.getElementById(id)}		
	else return false
}

n=20;
if (!getCookie('eff')) { 
	effects=ie;
	saveCookie('eff',effects?1:0,1000*86400*30);
} else effects=(getCookie('eff')=="1")?true:false

sint=new Array();
for (i=0;i<175;i++) sint[i]=Math.sin(6.2832*(i/100));

function splash (name, m, isbl) {
	if (isbl) {
		i=Math.floor(m/n*100-25);
	    gv=Math.floor((m<n*0.2)?0:(1+sint[i])*100);
	    rv=Math.floor((m>n*0.8)?0:(1+sint[i])*160);
	    bv=0;
	} else {
		gv=Math.floor((m<n*0.2)?255:(1+sint[Math.floor(m/n*100+75)])*50+200);
	    rv=Math.floor((m>n*0.8)?255:(1+sint[Math.floor(m/n*100+25)])*50+200);
	    bv=255;
	}
    ss="rgb("+ rv +","+ gv +","+ bv +")";
    if (m==1) ss=isbl?"rgb(0,0,0)":"rgb(255,255,255)"
    if (m==0) {
        ss=((ns)?"":'');
        ss=((ie)?"transparent":'');
	}
    if (ns) document.getElementById(name).style.background=ss
    if (ie) document.all(name).style.background=ss
}

function ovr(name,m) {
         if (!effects && m==n) return;
         splash(name,m,name.indexOf('h_')==0?1:0);
         m--;
         if (m>-1) setTimeout('ovr("'+name+'",'+m+');',n);
}

function wr(s) {
        document.write(s);
        }

function getCookie(n) {
        pfx=n+"=";
        cok=document.cookie;
        be=cok.indexOf(pfx);
        if (be==-1) {return null}
        var en=cok.indexOf(";",be+pfx.length);
        if (en==-1) {en=cok.length}
        return unescape(cok.substring(be+pfx.length,en))
}

function setCookie(n,val,exp,pth,dom,sec) {
        document.cookie=n+"="+escape(val)+
                (exp?"; expires="+exp.toGMTString():"")+
                (pth?"; path="+pth:"")+
                (dom?"; domain="+dom:"")+
                (sec?"; secure":"")
}

function saveCookie(name,value,msec) {
        dt0=new Date();
        dt0.setTime(dt0.getTime()+msec);
        setCookie(name,value,dt0,'/','','');
}

function cookieEnbld() {
        tmp=getCookie('tmp');
        return tmp=='2';
}
	
function norm() {
	return 400;}
	
	
	