function createID () {

var base = location.href;
var part = base.replace("http://www.westpark-gamers.de","..");
part = part.replace("http://www.westpark-gamers.com","..");
part = part.replace("http://westpark-gamers.de","..");
part = part.replace("http://westpark-gamers.com","..");
parts = part.split("#");
return parts[0];
}


function sndReq(vote,id_num,units) {

if (!xhttp) {
                alert("An Error occured when trying to initialize XMLHttpRequest!");
                return; // exit
            }
if (xhttp.readyState != 0 && xhttp.readyState != 4) xhttp.abort();
try
  {
    xhttp.overrideMimeType ('text/html; charset=iso-8859-1');
  }
  catch (e)
  {
    try
    {
       setMimeType('text/html; charset=ISO-8859-1');
    }
    catch (e) {}
  }

    var request = '../rpc.php?j='+vote+'&c='+units+'&q='+id_num;
    xhttp.open('get', request);
    xhttp.setRequestHeader("Pragma", "no-cache");
    xhttp.setRequestHeader("Cache-Control", "must-revalidate");
    xhttp.setRequestHeader("If-Modified-Since", "document.lastModified");
    xhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; ISO-8859-1');
    xhttp.onreadystatechange = handleResponse;
    xhttp.send(null);
}

function handleResponse() {
  if(xhttp.readyState == 4){
		if (xhttp.status == 200){
                  document.getElementById("ratingblock").innerHTML=xhttp.responseText;
		}
    }
}

function rating_on(value, id) {

  for (i=1; i<=value;i++)
  {
     var elid = "img_"+id+"_"+i;

     document.getElementById(elid).className = "star_blue";

  }
}

function rating_off(value, id) {

  for (i=1; i<=value;i++)
  {
          var elid = "img_"+id+"_"+i;
          document.getElementById(elid).className = "star_gray";
  }

}

function rating_off1(value, id) {

  for (i=1; i<=value;i++)
  {
          var elid = "img_"+id+"_"+i;
          document.getElementById(elid).className = "star_gold";
  }

}