var url = "";

// When called via a click, starts timer
function start_timer(u) {
	// save URL
	url = u;

	// Create transp layer for firefox etc
	t2 = document.createElement("div");
	t2.style.height = "100%";
	t2.style.width = "100%";
	t2.style.background = "white";
	t2.style.position = "absolute";
	t2.style.top = "0px";
	t2.style.left = "0px";
  t2.style.filter = "alpha(opacity=75)";
  t2.style.opacity = "0.75";
	document.getElementById('content').appendChild(t2);

	// Redirect info box
	t = document.createElement("div");
	txt = "<h1>Loading Requested Page...</h1><br><br>Please be sure to tell this company that you found their details through <b>DIY Week.net</b>!";
	txt = txt + "<br><br><br><br><span class=\"mini\">If you are not redirected shortly, <a href=\""+url+"\"><b>please click here</b></a>";
	txt = txt + "<br><br>To view this page again, <a href=\"javascript:window.location.reload(false);\"><b>click here</b></a></span>";
	t.innerHTML = txt;
	t.style.border = "1px solid black";
	t.style.background = "white";
	t.style.padding = "2px";
	t.style.height = "150px";
	t.style.padding = "30px 30px 30px 30px";
	t.style.width = "350px";
	t.style.position = "absolute";
	t.style.top = "225px";
	t.style.left = "250px";
	document.getElementById('content').appendChild(t);
	setTimeout("doRedirect()", 2000);

	// IE transp fix
	bg = document.getElementById('thePage');
	if (bg) {
	  bg.style.filter = "alpha(opacity=25)";
  	bg.style.opacity = "0.25";
	}
}

// Do redirect
function doRedirect() {
	document.location.href = url;
}





