
if (document.images) {
	img_on =new Image();  img_on.src ="interfaceImages/rank_mare_plin.png"; 
	img_off=new Image();  img_off.src="interfaceImages/rank_mare_gol.png"; 
}

function handleOver(id) { 
	switch(id)
	{
		case 1:
			if (document.images) document.imgName1.src=img_on.src;
			break;    
		case 2:
			if (document.images) document.imgName1.src=img_on.src;		
			if (document.images) document.imgName2.src=img_on.src;
			break;    
		case 3:
			if (document.images) document.imgName1.src=img_on.src;		
			if (document.images) document.imgName2.src=img_on.src;
			if (document.images) document.imgName3.src=img_on.src;						
			break;    
		case 4:
			if (document.images) document.imgName1.src=img_on.src;		
			if (document.images) document.imgName2.src=img_on.src;
			if (document.images) document.imgName3.src=img_on.src;						
			if (document.images) document.imgName4.src=img_on.src;									
			break;    
	}

}


function handleOut() {
	if (document.images) document.imgName4.src=img_off.src;
	if (document.images) document.imgName3.src=img_off.src;
	if (document.images) document.imgName2.src=img_off.src;
	if (document.images) document.imgName1.src=img_off.src;	
}

function Rate(val, gId) { 

	url = "rate.php?gameId="+gId+"&val="+val;
	var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }

  if (req) {
    // Synchronous request, wait till we have it all
    req.open('GET', url, false);
	document.location.reload();
	req.send(null);
    element.innerHTML = req.responseText;
  } else {
    element.innerHTML =
   "Sorry, your browser does not support " +
      "XMLHTTPRequest objects. This page requires " +
      "Internet Explorer 5 or better for Windows, " +
      "or Firefox for any system, or Safari. Other " +
      "compatible browsers may also exist.";
  }
}


//-->

