//Javascript for liquidfists

//VARIABLES FOR 5 SECOND REDIRECT ----------------------------------------------
//number of seconds
var x = 5;

function delineate(str){
	str = String(str);
	point = str.lastIndexOf("/");
	return(str.substring(point+1,str.length));
}
function countDown(curURL,milli){
	
	var locate = window.location;
	//does the element text exist?
	var elExist = document.getElementById("test");
	if (elExist!=null){
		newDiv = document.createElement("div");
		newDiv.setAttribute("id","fillme");
		document.body.appendChild(newDiv);
	var thehtml = document.getElementById("test").innerHTML;
	}
	var dyn_link = delineate(locate);

	function startCount(){
	if(x==0){
		clearInterval(time);
		window.location=curURL;
	}
	
	if (elExist!=null){
	document.getElementById("fillme").className="cDownBox";
	document.getElementById("fillme").innerHTML=x;
	//document.getElementById("test").innerHTML=thehtml+'<p align="center">'+x+'</p>';
	x--;
	}
	}
	
	var time = setInterval(startCount,milli);

}
//--------------------------------------------------------------------------------------------
