function getCookie( name ) {
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}

function bookmark(url, sitename)
{
   	if (window.sidebar) 
	{ 
		window.sidebar.addPanel(document.title, document.location.href ,"");
	} 
	else if( window.external ) 
	{
		window.external.AddFavorite( document.location.href, document.title); 
	}
	else 
	if(window.opera && window.print) 
	{ 
		return true;
	}
}

var private_from;
function private_deny(name)
{
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp_private=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp_private=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp_private.onreadystatechange=function()
  {
	if (xmlhttp_private.readyState==4 && xmlhttp_private.status==200)
    {
		document.getElementById("private_chat").innerHTML = "";
	}
  }
var url = "http://www.nastyspace.com/roulette/privatechat/private_chat.php?action=deny&name="+name;
xmlhttp_private.open("GET",url,true);
xmlhttp_private.send();
}

var ad_bottom_timer = 0;
function private_chat()
{
var top = screen.height - 400;
var left = 12;
document.getElementById("private_chat").style.width =  "300px";
document.getElementById("private_chat").style.top =  top+"px";
document.getElementById("private_chat").style.left =  left+"px";
document.getElementById("private_chat").style.color =  "#FF6600";

if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp_private=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp_private=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp_private.onreadystatechange=function()
  {
  if (xmlhttp_private.readyState==4 && xmlhttp_private.status==200)
    {
		if(document.getElementById("private_chat").innerHTML == "")
		document.getElementById("private_chat").innerHTML = xmlhttp_private.responseText;
    }
  }
xmlhttp_private.open("GET","http://www.nastyspace.com/roulette/privatechat/private_chat.php",true);
xmlhttp_private.send();
setTimeout ("private_chat()", 10000);
}
function ad_bottom(){
document.getElementById('fd_holder').style.display="block";
}
function getUsername()
{
return getCookie('username');
}

function getMembershiplevel()
{
return getCookie('membership_level');
}


