function Is() {
    var agent = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
    this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
    this.ns2 = (this.ns && (this.major == 2));
    this.ns3 = (this.ns && (this.major == 3));
    this.ns4b = (this.ns && (this.minor < 4.04));
    this.ns4 = (this.ns && (this.major == 4));
    this.ns6 = (this.ns) && (this.major == 5);
    this.ie   = (agent.indexOf("msie") != -1);
    this.ie3  = (this.ie && (this.major == 2));
    this.ie4  = (this.ie && (this.major >= 4));
    this.op3 = (agent.indexOf("opera") != -1);
    this.win   = (agent.indexOf("win")!= -1);
    this.mac   = (agent.indexOf("mac")!= -1);
    this.unix  = (agent.indexOf("x11")!= -1);
//    this.ie5 = (this.ie4 && (agent.indexOf("msie 5") != -1)); /* old MSIE6 check */
    this.ie5 = (this.ie4 && this.major >= 5); /* IE5+, wait for 7 :\ */
}
var i = 0;
var c = 0;
var g = 0;
var aw;
var ah;
var et;
var is = new Is();
var ltrs = new Array;
ltrs[0] = "a";
ltrs[1] = "b";
ltrs[2] = "c";
ltrs[3] = "d";
ltrs[4] = "e";
ltrs[5] = "f";
ltrs[6] = "g";
ltrs[7] = "h";
ltrs[8] = "i";
ltrs[9] = "j";
ltrs[10] = "k";
ltrs[11] = "l";
ltrs[12] = "m";
ltrs[13] = "n";
ltrs[14] = "o";
ltrs[15] = "p";
ltrs[16] = "q";
ltrs[17] = "r";
ltrs[18] = "s";
ltrs[19] = "t";
ltrs[20] = "u";
ltrs[21] = "v";
ltrs[22] = "w";
ltrs[23] = "x";
ltrs[24] = "y";
ltrs[25] = "z";
ltrs[26] = ".";

function chngPg() {
    window.location.replace("start.html");
}
function loadImg() {
    first = new Image;
    first.src ="img/first.jpg";
}
function goIf() {
    return;
    if(!is.ie5 && !is.ns6) {
        g = 1;
        chngPg();
    }
}
function posLtr() {
    if(is.ns) {
        aw = window.innerWidth;
        ah = window.innerHeight;
    } else if(is.ie4) {
        aw = document.body.clientWidth;
        ah = document.body.clientHeight;   
    }
    em = document.getElementById("ltr");
    em.style.left = parseInt(aw/2 - 140)+"px";
    em.style.top = parseInt(ah/2 - 30)+"px";
    em.style.visibility = "visible";
}
function mf1() {
    et = document.getElementById("lr1");
    et.innerHTML = ltrs[i];
    if (i == 3) {
        clearTimeout("mf1()");
        et = document.getElementById("lr2");
        i = 0;
        mf2();
	return;
    } else {
    setTimeout("mf1()",90);
    }
    i++;
}
function mf2() {
    et.innerHTML = ltrs[i];
    i++;
    if (i == 15) {
        clearTimeout("mf2()");
        et = document.getElementById("lr3");
        i = 0;
        mf3();
	return;
    }
    setTimeout("mf2()",60);  
}
function mf3() {
    et.innerHTML = ltrs[i];
    i+=2;
    if (i >= 21) {
        clearTimeout("mf3()");
        et = document.getElementById("lr4");
        i = 0;
        mf4();
	return;
    }
    setTimeout("mf3()",60);
}
function mf4() {
    et.innerHTML = ltrs[i];
    i++;
    if (i == 2) {
        clearTimeout("mf4()");
        et = document.getElementById("lr5");
        i = 0;
	mf5();
        return;
    }
    setTimeout("mf4()",90);
}
function mf5() {
    et.innerHTML = ltrs[i];
    i++;
    if (i == 12) {
        clearTimeout("mf5()");
        et = document.getElementById("lr6");
        i = 1;
	mf6();
        return;
    }
    setTimeout("mf5()",60);
}
function mf6() {
    et.innerHTML = ltrs[i];
    i++;
    if (i == 5) {
        clearTimeout("mf6()");
        et = document.getElementById("lr7");
        i = 0;
	mf7();
        return;
    }
    setTimeout("mf6()",60);
}
function mf7() {
    et.innerHTML = ltrs[i];
    i+=2;
    if (i >= 19) {
        clearTimeout("mf7()");
        et = document.getElementById("lr8");
        i = 0;
	mf8();
        return;
    }
    setTimeout("mf7()",60);
}
function mf8() {
    et.innerHTML = ltrs[i];
    i++;
    if (i == 9) {
        clearTimeout("mf8()");
        et = document.getElementById("lr9");
        i = 1;
	mf9();
        return;
    }
    setTimeout("mf8()",60);
}
function mf9() {
    et.innerHTML = ltrs[i];
    i+=2;
    if (i >= 24) {
        clearTimeout("mf9()");
        et = document.getElementById("lra");
        i = 2;
	mfa();
        return;
    }
    setTimeout("mf9()",60);
}
function mfa() {
    et.innerHTML = ltrs[i];
    i+=3;
    if (i >= 27) {
        clearTimeout("mfa()");
        et = document.getElementById("lrb");
        i = 0;
	mfb();
        return;
    }
    setTimeout("mfa()",60);
}
function mfb() {
    et.innerHTML = ltrs[i];
    i++;
    if (i >= 4) {
        clearTimeout("mfb()");
        et = document.getElementById("lrc");
        i = 0;
	mfc();
        return;
    }
    setTimeout("mfb()",60);
}
function mfc() {
    et.innerHTML = ltrs[i];
    i++;
    if (i >= 5) {
        clearTimeout("mfc()");
        i = 0;
	mb0();
        return;
    }
    setTimeout("mfc()",60);
}
function mb0() {
    if (i == 6) {
        clearTimeout("mb0()");
        i = 0;
	mb1();
        return;
    }
    i++;
    setTimeout("mb0()",60);
}       
function mb1() {
    if (i == 2) {
        et = document.getElementById("lb1");
        et.innerHTML = "d";
        clearTimeout("mb1()");
        i=0;
	mb2();
        return;
    }
    i++;
    setTimeout("mb1()",50);
}
function mb2() {
    if (i == 2) {
        et = document.getElementById("lb2");
        et.innerHTML = "o";
        clearTimeout("mb2()");
        i = 0;
	mb3();
        return;
    }
    i++;
    setTimeout("mb2()",50);
}
function mb3() {
    if (i == 2) {
        et = document.getElementById("lb3");
        et.innerHTML = "u";
        clearTimeout("mb3()");
        i = 0;
	mb4();
        return;
    }
    i++;
    setTimeout("mb3()",50);
}
function mb4() {
    if (i == 2) {
        et = document.getElementById("lb4");
        et.innerHTML = "b";
        clearTimeout("mb4()");

        i = 0;
	mb5();
        return;
    }
    i++;
    setTimeout("mb4()",50);
}
function mb5() {
    if (i == 2) {
        et = document.getElementById("lb5");
        et.innerHTML = "l";
        clearTimeout("mb5()");
        i = 0;
	mb6();
        return;
    }
    i++;
    setTimeout("mb5()",50);
}
function mb6() {
    if (i == 2) {
        et = document.getElementById("lb6");
        et.innerHTML = "e";
        clearTimeout("mb6()");
        i = 0;
	mb7();
        return;
    }
    i++;
    setTimeout("mb6()",50);
}
function mb7() {
    if (i == 2) {
        et = document.getElementById("lb7");
        et.innerHTML = "s";
        clearTimeout("mb7()");
        i = 0;
        mb8();
	return;
    }
    i++;
    setTimeout("mb7()",50);
}
function mb8() {
    if (i == 2) {
        et = document.getElementById("lb8");
        et.innerHTML = "i";
        clearTimeout("mb8()");
        i = 0;
        mb9();
	return;
    }
    i++;
    setTimeout("mb8()",50);
}
function mb9() {
    if (i == 2) {
        et = document.getElementById("lb9");
        et.innerHTML = "x";
        clearTimeout("mb9()");
        i = 0;
        mba();
	return;
    }
    i++;    
    setTimeout("mb9()",50);
}
function mba() {
    if (i == 2) {
        et = document.getElementById("lba");
        et.innerHTML = ".";
        clearTimeout("mba()");
        i = 0;
        mbb();
	return;
    }
    i++;
    setTimeout("mba()",50);
}
function mbb() {
    if (i ==2) {
        et = document.getElementById("lbb");
        et.innerHTML = "d";
        clearTimeout("mbb()");
        i = 0;
        mbc();
	return;
    }
    i++;
    setTimeout("mbb()",50);
}
function mbc() {
    if (i == 2) {
        et = document.getElementById("lbc");
        et.innerHTML = "e";
        clearTimeout("mbc()");
        i = 0;
	hf0();
        return;
    }
    i++;
    setTimeout("mbc()",50);
}
function hf0() {
    if (i == 15) {
        clearTimeout("hf0()");
        i = 0;
	hf1();
        return;
    }
    i++;
    setTimeout("hf0()",60);
}
function hf1() {
    if (i == 2) {
        et = document.getElementById("lr1");
        et.style.visibility = "hidden";
        clearTimeout("hf1()");
        i = 0;
        hf2();
	return;
    }
    i++;
    setTimeout("hf1()",50);
}
function hf2() {
    if (i == 2) {
        et = document.getElementById("lr2");
        et.style.visibility = "hidden";
        clearTimeout("hf2()");
        i = 0;
        hf3();
	return;
    }
    i++;
    setTimeout("hf2()",50);
}
function hf3() {
    if (i == 2) {
        et = document.getElementById("lr3");
        et.style.visibility = "hidden";
        clearTimeout("hf3()");
        i = 0;
        hf4();
	return;
    }
    i++;
    setTimeout("hf3()",50);
}
function hf4() {
    if (i == 2) {
        et = document.getElementById("lr4");
        et.style.visibility = "hidden";
        clearTimeout("hf4()");
        i = 0;
        hf5();
	return;
    }
    i++;
    setTimeout("hf4()",50);
}
function hf5() {
    if (i == 2) {
        et = document.getElementById("lr5");
        et.style.visibility = "hidden";
        clearTimeout("hf5()");
        i = 0;
        hf6();
	return;
    }
    i++;
    setTimeout("hf5()",50);
}
function hf6() {
    if (i == 2) {
        et = document.getElementById("lr6");
        et.style.visibility = "hidden";
        clearTimeout("hf6()");
        i = 0;
        hf7();
	return;
    }
    i++;
    setTimeout("hf6()",50);
}
function hf7() {
    if (i == 2) {
        et = document.getElementById("lr7");
        et.style.visibility = "hidden";
        clearTimeout("hf7()");
        i = 0;
        hf8();
	return;
    }
    i++;
    setTimeout("hf7()",50);
}
function hf8() {
    if (i == 2) {
        et = document.getElementById("lr8");
        et.style.visibility = "hidden";
        clearTimeout("hf8()");
        i = 0;
        hf9();
	return;
    }
    i++;
    setTimeout("hf8()",50);
}
function hf9() {
    if (i == 2) {
        et = document.getElementById("lr9");
        et.style.visibility = "hidden";
        clearTimeout("hf9()");
        i = 0;
        hfa();
	return;
    }
    i++;
    setTimeout("hf9()",50);
}
function hfa() {
    if (i == 2) {
        et = document.getElementById("lra");
        et.style.visibility = "hidden";
        clearTimeout("hfa()");
        i = 0;
        hfb();
	return;
    }
    i++;
    setTimeout("hfa()",50);
}
function hfb() {
    if (i == 2) {
        et = document.getElementById("lrb");
        et.style.visibility = "hidden";
        clearTimeout("hfb()");
        i = 0;
        hfc();
	return;
    }
    i++;
    setTimeout("hfb()",50);
}
function hfc() {
    if (i == 2) {
        et = document.getElementById("lrc");
        et.style.visibility = "hidden";
        clearTimeout("hfc()");
        et = document.getElementById("ltr");
        i = 0;
        fdOut();
	return;
    }
    i++;
    setTimeout("hfc()",50);
}
function fdOut() {
    if (c == 25) {
        et.style.visibility = "hidden";
        clearTimeout("fdOut()");
        chngPg();
        return;
    }
    if(is.ie) {
        et.style.filter = "alpha(opacity="+(100 - c*4)+")";
    } else if(is.ns6) {
        et.style.opacity = (100 - c*4) / 100;
    }
    c++;
    setTimeout("fdOut()",30);      
}
function ltRun() {
    goIf();
    if (g == 0) {
        loadImg();
        posLtr();
        mf1();
    }
}

