function initRank(nHeight){
	document.getElementById("ranker").height = nHeight;
}
function setRankCookie(sCookie,sValue){
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+365);
	document.cookie = sCookie + '=' + sValue + '; expires='+exdate.toGMTString()+ '; path=/; domain=bloodhorse.com';
}
function cookieValue(cookieName) {
	var thisCookie = document.cookie.split("; ");
	for (var i=0; i<thisCookie.length; i++) {
		if (cookieName == thisCookie[i].split("=")[0]) {
			return thisCookie[i].split("=")[1];
		}
	}
	return "0";
}
function writeRanker(xmlPath){
	document.write('<div style="clear:both;height:10px;width:450px;background:url(http://i.bloodhorse.com/img/new/roundedRect_450_top.gif) no-repeat top left"></div><div id="rankerHolder" style="border-right:1px solid #d0d0d0;border-left:1px solid #d0d0d0;width:448px;"></div><div style="height:10px;width:450px; background:url(http://i.bloodhorse.com/img/new/roundedRect_450_bottom.gif) no-repeat top left"></div>');
	soRank = new SWFObject("http://i.bloodhorse.com/flash/ranking/ranker.swf?" + (new Date).getTime(),"ranker","450","1","8","#ffffff");
	soRank.addParam("wmode", "transparent");
	soRank.addParam("allowScriptAccess", "always");
	soRank.addVariable("sXmlPath", xmlPath);
	soRank.write("rankerHolder");
} 
