var charCount = 0;
var op = 0;
var skipEnter = 0;
var opDiv = 0;
var op2 = 0;
var startNext = 0;
var preLoad = new Array();
var chars = text.length; 

function startPreLoad(){
	for(i=0; i<chars; i++)
	{
		if( text.substring(i,i+2) == "/n" ){
			startNext = i+2;
			skipEnter = 2;
		}
		preLoad[i] = new Image();
		preLoad[i].src = "header/char.php?id="+( text.substring(startNext, (i+1+skipEnter) ) )+"&ocolor=005bb3&size=17";
	}//004990
}

function addChar()
{
	var character = text.substring(charCount,charCount+1);
	if(charCount < chars)
	{
		if( character == " "){
			document.getElementById("title").src = preLoad[charCount].src;
			charCount++;
		}
		window.status = text.substring(0,charCount+1);
		document.getElementById("title").src = preLoad[charCount].src;
		charCount++;
		if( charCount == startNext-2 ){
			setTimeout("addCharNext()",500);
		}
		else{
			if(character == ":") setTimeout("addChar()",1000);
			else setTimeout("addChar()",95);
		}
	}
}
function addCharNext()
{
	var character = text.substring(charCount,charCount+1);
	if(charCount < chars)
	{
		if( character == " "){
			document.getElementById("title2").src = preLoad[charCount].src;
			charCount++;
		}
		document.getElementById("title2").src = preLoad[charCount].src;
		charCount++;
		setTimeout("addCharNext()",95);
	}
}
function fadeIn()
{
	if(op != 100)
	{
		document.getElementById("headerImg").style.filter = "alpha(opacity="+op+")";
		if(document.getElementById("headerImg").style.opacity == .0 && op == 5){
			document.getElementById("headerImg").style.opacity = ".05";
		}
		else document.getElementById("headerImg").style.opacity = "."+op;
		op+=5;
		setTimeout("fadeIn()",40);
	}
	else setTimeout("fadeInDiv()",250);
}
function fadeInDiv()
{
	if(opDiv != 70)
	{
		document.getElementById("headerDiv").style.filter = "alpha(opacity="+opDiv+")";
		if(document.getElementById("headerDiv").style.opacity == .0 && opDiv == 5){
			document.getElementById("headerDiv").style.opacity = ".05";
		}
		else document.getElementById("headerDiv").style.opacity = "."+opDiv;
		opDiv+=5;
		setTimeout("fadeInDiv()",40);
	}
	else setTimeout("fadeInTxt()",250);
}
function fadeInTxt()
{
	if(op2 != 100)
	{
		//document.getElementById("png").style.filter = "alpha(opacity="+op2+")";
		document.getElementById("title").style.filter = "alpha(opacity="+op2+")";
		document.getElementById("title2").style.filter = "alpha(opacity="+op2+")";
		if(document.getElementById("png").style.opacity == .0 && op2 == 5){
			document.getElementById("png").style.opacity = ".05";
			document.getElementById("title").style.opacity = ".05";
			document.getElementById("title2").style.opacity = ".05";
		}
		else{
			document.getElementById("png").style.opacity = "."+op2;
			document.getElementById("title").style.opacity = "."+op2;
			document.getElementById("title2").style.opacity = "."+op2;
		}
		op2+=5;
		setTimeout("fadeInTxt()",40);
	}
	//else setTimeout("addChar()",250);
}
function startTxt(){
	startPreLoad();
	fadeIn();
}