function displayFlash(path, width, height) {
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" WIDTH="' + width);
	document.write('" HEIGHT="' + height + '" id="FlashContent">');
	document.write('<PARAM NAME="movie" VALUE="' + path + '"><PARAM NAME="quality" VALUE="high">');
	document.write('<PARAM NAME="AllowScriptAccess" VALUE="never"><EMBED src="' + path + '"');
	document.write(' quality="high" WIDTH="' + width + '" HEIGHT="' + height + '" NAME="FlashContent"');
	document.write(' AllowScriptAccess="never" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write('</EMBED></OBJECT>');
}
// Ajax stuff
var xmlHttp
var divName

function ajax(v,dn) {
	divName = document.getElementById(dn);
	divName.innerHTML = "<img src=\"images/timer.gif\">";
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null) {
		//alert ("Browser does not support HTTP Request");
		return;
	} 
	var url=v;
	url=url+"&dn="+dn+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 

function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		divName.innerHTML=xmlHttp.responseText;
	} else {
		divName.innerHTML="";
	}
} 

function GetXmlHttpObject() { 
	var objXMLHttp=null
	if (window.XMLHttpRequest) {
		objXMLHttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	return objXMLHttp;
} 

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('main').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>edie.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('main').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;
}






