function GetXmlHttpObject()
{
    var objXMLHttp=null
    if (window.XMLHttpRequest)
    {
        objXMLHttp=new XMLHttpRequest()
    }
    else if (window.ActiveXObject)
    {
        objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
    }
    return objXMLHttp
}

function sendNod(t)
{
    var date = new Date();
	var url = "nod.php";
	var params = "ti="+t+"&t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("GET", url+"?"+params, true);
	xmlhttp.onreadystatechange = function() 
	{
		//Call a function when the state changes.
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			alert("Nod Sent");
		}
	}
	xmlhttp.send(null);	
}
function nod(u)
{
	document.write("<div id=\"nod\" style=\"position:absolute;height:420px;width:360px;top:0;z-index:999;\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0\" width=\"350\" height=\"400\" id=\"nod\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\" /><param name=\"FlashVars\" value=\"user="+u+"\" />	<param name=\"allowFullScreen\" value=\"false\" /><param name=\"movie\" value=\"http://www.bikerbuddies.co.uk/nod.swf\" /><param name=\"loop\" value=\"false\" /><param name=\"menu\" value=\"false\" /><param name=\"quality\" value=\"high\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"bgcolor\" value=\"#ffffff\" />	<embed src=\"http://www.bikerbuddies.co.uk/nod.swf\" loop=\"false\" menu=\"false\" quality=\"high\" wmode=\"transparent\" bgcolor=\"#ffffff\" width=\"350\" height=\"400\" name=\"nod\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.adobe.com/go/getflashplayer\" FlashVars=\"user="+u+"\" /></object><div style=\"bottom:0;text-align:center;\"><a href=\"http://bikerbuddies.co.uk/profile/?p="+u+"\">View Profile</a></div></div>");
	if(typeof(window.innerWidth) == 'number')
	{ 
        availHeight = window.innerHeight; 
        availWidth = window.innerWidth; 
    }
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))					
	{ 
        availHeight = document.documentElement.clientHeight; 
        availWidth = document.documentElement.clientWidth; 
    }
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{ 
        availHeight = document.body.clientHeight; 
        availWidth = document.body.clientWidth; 
    }

    var indicatorWidth = 440; 
    var indicatorHeight = 410; 
    var left = (availWidth/2) - (indicatorWidth/2); 
    var top = (availHeight/2) - (indicatorHeight/2); 

    var element = document.getElementById('nod'); 
    element.style.position="absolute"; 
    element.style.zIndex="999"; 
    element.style.top=top+"px"; 
    element.style.left=left+"px"; 
    element.style.display="block";
    element.style.position="fixed";
}
function bg(obj, value)
{
	obj.style.background=value;	
	obj.style.cursor = "pointer";	
	obj.style.cursor = "hand";
}
function news(value)
{
	window.location = "?n="+value;
}
function events(value)
{
	window.location = "?e="+value;
}
function section(value)
{
	window.location = value;
}

