
    //Browser Support Code
    function ajaxSave(id, num, cat){
      document.getElementById('loader').style.visibility='visible';
    	var ajaxRequest;  // The variable that makes Ajax possible!
    	
    	try{
    		// Opera 8.0+, Firefox, Safari
    		ajaxRequest = new XMLHttpRequest();
    	} catch (e){
    		// Internet Explorer Browsers
    		try{
    			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
    		} catch (e) {
    			try{
    				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
    			} catch (e){
    				// Something went wrong
    				alert("Your browser broke!");
    				return false;
    			}
    		}
    	}
    	// Create a function that will receive data sent from the server
    	ajaxRequest.onreadystatechange = function(){
    		if(ajaxRequest.readyState == 4){
    			var ajaxDisplay = document.getElementById('loader');
    			ajaxDisplay.innerHTML = ajaxRequest.responseText;      
           
    		}
    	}
    	                
      var queryString = "&id=" + id + "&num=" + num + "&cat=" + cat;
    	ajaxRequest.open("POST", "include/check_rating.php" , true);
      ajaxRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      ajaxRequest.setRequestHeader("Content-length", queryString.length);
      ajaxRequest.setRequestHeader("Connection", "close");
    	ajaxRequest.send(queryString); 
    }

    grey = new Image(); 
    grey.src = "images/star_g.png"; 
    /* normale-Grafik */ 
    yellow = new Image(); 
    yellow.src = "images/star_y.png"; 
    /* Highlight-Grafik */ 
    
    function change(Bildname,Tauschbildname, num) 
    {
      var i = 1;
      if(num == 5)
      {
        while(i <= 5)
        {
          document.images[Bildname + i].src = eval(Tauschbildname + ".src")          
          i = i + 1;
        }
      }
      else
      {
        while(i <= num)
        {
          document.images[Bildname + i].src = eval(Tauschbildname + ".src")          
          i = i + 1;
        }
         
         while(i <= 5)
        {
          document.images[Bildname + i].src = eval('grey' + ".src")  
          i = i + 1;        
        }
      }    
    } 
    function changeout(Bildname,Tauschbildname, num)
    {
      var i = parseInt(num);
      while(i > 0)
      {
        document.images[Bildname + i].src = eval('yellow' + ".src")  
        i = i - 1;        
      }
      var i = parseInt(num);
      while(i < 5)
      {
        document.images[Bildname + (i+1)].src = eval(Tauschbildname + ".src")  
        i = i + 1;        
      }
    }

