function open_win(url, target)
{
window.open(url,target,"toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, fullscreen=yes, width=screen.width, height=screen.height");
}

function fullscreen(url)
{
window.open(url,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, fullscreen=yes, width=screen.width, height=screen.height")
}

function NewWindow(url)
{
window.open(url,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, fullscreen=yes, width=screen.width, height=screen.height")
}

function open_chat(url)
{
window.open(url,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, fullscreen=yes, width=800, height=600")
}

function open_gameurl(url, width, height)
{
window.open(url,"_blank","toolbar=no, location=no, directories=no, status=yes, menubar=yes, scrollbars=no, resizable=no, copyhistory=yes, fullscreen=no, width="+width+", height="+height);
}

function rate_game(nameid, rating)
{
	var xmlHttp;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		
		catch (e)
		{
			try
		    {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}

			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	
	/*xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			alert(xmlHttp.responseText);
		}
	}*/
	
	xmlHttp.open("GET","/include/ajax_rate.php?nameid="+nameid+"&rating="+rating,true);
	xmlHttp.send(null);
	document.getElementById('rate_game').style.display='none';
	document.getElementById('successful_rating').style.display='';
}