
// Ratingsymbol object animation
function Rating(temp,postrating) {
  this.elementName = temp;
  if (postrating) {
	this.currentRating = postrating;
  } else {
  	this.currentRating = 0;
  }


 this.ratingimage = '/images/gfx/star/star_orange_bigg.gif';
 this.noratingimage = '/images/gfx/star/star_grey_bigg.gif';
  
  /**
   * Initialises a new rating option.
   */
  this.init = function() {
    var span = document.getElementById(this.elementName);
    if (span) {
      // add stars
      for (var i = 1; i <= 5; i++) {
        
        var star = document.createElement('img');
        star.src = 'images/gfx/star/star_grey_bigg.gif';
        star.alt = '';
        star.rating = this;
        star.name = i;
        star.onmouseover = function() { this.style.cursor = 'pointer'; this.rating.showRating(parseInt(this.name)); };
        star.onclick = function() { this.rating.submitRating(parseInt(this.name)); };
        span.appendChild(star);
      }

      // add listener
      span.rating = this;
      span.onmouseout = function() { this.rating.showCurrentRating(); };
      
      // set visible
      span.className = '';
    }
    
    this.showCurrentRating();
  }
  
  /**
   * Shows the current user rating.
   */
  this.showCurrentRating = function() {
    this.showRating(this.currentRating);
  }
  
  /**
   * Shows a selected rating.
   */
  this.showRating = function(rating) {
    var span = document.getElementById(this.elementName);
    if (span) {
      for (var i = 1; i <= rating; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.ratingimage;
        }
      }
      rating++;
      for (var i = rating; i <= 5; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.noratingimage;
        }
      }
    }
  }
  
  /**
   * Submits a selected rating.
   */
  this.submitRating = function(rating) {
    this.currentRating = rating;
    document.getElementById('input_rating').value = this.currentRating;
  }
  
  this.init();
}







// Ratingsymbol object animation
function Rating02(temp,postrating) {
  this.elementName = temp;
  if (postrating) {
	this.currentRating = postrating;
  } else {
  	this.currentRating = 0;
  }

  this.ratingimage = '/images/gfx/star/star_orange_bigg.gif';
 this.noratingimage = '/images/gfx/star/star_grey_bigg.gif';  
   

  /**
   * Initialises a new rating option.
   */
  this.init = function() {
    var span = document.getElementById(this.elementName);
    if (span) {
      // add stars
      for (var i = 1; i <= 5; i++) {
        
        var star = document.createElement('img');
        star.src = 'images/gfx/star/star_grey_bigg.gif';
        star.alt = '';
        star.rating = this;
        star.name = i;
        star.onmouseover = function() { this.style.cursor = 'pointer'; this.rating.showRating(parseInt(this.name)); };
        star.onclick = function() { this.rating.submitRating(parseInt(this.name)); };
        span.appendChild(star);
      }

      // add listener
      span.rating = this;
      span.onmouseout = function() { this.rating.showCurrentRating(); };
      
      // set visible
      span.className = '';
    }
    
    this.showCurrentRating();
  }
  
  /**
   * Shows the current user rating.
   */
  this.showCurrentRating = function() {
    this.showRating(this.currentRating);
  }
  
  /**
   * Shows a selected rating.
   */
  this.showRating = function(rating) {
    var span = document.getElementById(this.elementName);
    if (span) {
      for (var i = 1; i <= rating; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.ratingimage;
        }
      }
      rating++;
      for (var i = rating; i <= 5; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.noratingimage;
        }
      }
    }
  }
  
  /**
   * Submits a selected rating.
   */
  this.submitRating = function(rating) {
    this.currentRating = rating;
    document.getElementById('input_rating02').value = this.currentRating;
  }
  
  this.init();
}



// Ratingsymbol object animation
function Rating03(temp,postrating) {
  this.elementName = temp;
  if (postrating) {
	this.currentRating = postrating;
  } else {
  	this.currentRating = 0;
  }

 this.ratingimage = '/images/gfx/star/star_orange_bigg.gif';
 this.noratingimage = '/images/gfx/star/star_grey_bigg.gif';
  
  /**
   * Initialises a new rating option.
   */
  this.init = function() {
    var span = document.getElementById(this.elementName);
    if (span) {
      // add stars
      for (var i = 1; i <= 5; i++) {
        
        var star = document.createElement('img');
        star.src = 'images/gfx/star/star_grey_bigg.gif';
        star.alt = '';
        star.rating = this;
        star.name = i;
        star.onmouseover = function() { this.style.cursor = 'pointer'; this.rating.showRating(parseInt(this.name)); };
        star.onclick = function() { this.rating.submitRating(parseInt(this.name)); };
        span.appendChild(star);
      }

      // add listener
      span.rating = this;
      span.onmouseout = function() { this.rating.showCurrentRating(); };
      
      // set visible
      span.className = '';
    }
    
    this.showCurrentRating();
  }
  
  /**
   * Shows the current user rating.
   */
  this.showCurrentRating = function() {
    this.showRating(this.currentRating);
  }
  
  /**
   * Shows a selected rating.
   */
  this.showRating = function(rating) {
    var span = document.getElementById(this.elementName);
    if (span) {
      for (var i = 1; i <= rating; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.ratingimage;
        }
      }
      rating++;
      for (var i = rating; i <= 5; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.noratingimage;
        }
      }
    }
  }
  
  /**
   * Submits a selected rating.
   */
  this.submitRating = function(rating) {
    this.currentRating = rating;
    document.getElementById('input_rating03').value = this.currentRating;
  }
  
  this.init();
}





// Ratingsymbol object animation
function Rating04(temp,postrating) {
  this.elementName = temp;
  if (postrating) {
	this.currentRating = postrating;
  } else {
  	this.currentRating = 0;
  }

  this.ratingimage = '/images/gfx/star/star_orange_bigg.gif';
 this.noratingimage = '/images/gfx/star/star_grey_bigg.gif';  
  
  /**
   * Initialises a new rating option.
   */
  this.init = function() {
    var span = document.getElementById(this.elementName);
    if (span) {
      // add stars
      for (var i = 1; i <= 5; i++) {
        
        var star = document.createElement('img');
        star.src = 'images/gfx/star/star_grey_bigg.gif';
        star.alt = '';
        star.rating = this;
        star.name = i;
        star.onmouseover = function() { this.style.cursor = 'pointer'; this.rating.showRating(parseInt(this.name)); };
        star.onclick = function() { this.rating.submitRating(parseInt(this.name)); };
        span.appendChild(star);
      }

      // add listener
      span.rating = this;
      span.onmouseout = function() { this.rating.showCurrentRating(); };
      
      // set visible
      span.className = '';
    }
    
    this.showCurrentRating();
  }
  
  /**
   * Shows the current user rating.
   */
  this.showCurrentRating = function() {
    this.showRating(this.currentRating);
  }
  
  /**
   * Shows a selected rating.
   */
  this.showRating = function(rating) {
    var span = document.getElementById(this.elementName);
    if (span) {
      for (var i = 1; i <= rating; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.ratingimage;
        }
      }
      rating++;
      for (var i = rating; i <= 5; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.noratingimage;
        }
      }
    }
  }
  
  /**
   * Submits a selected rating.
   */
  this.submitRating = function(rating) {
    this.currentRating = rating;
    document.getElementById('input_rating04').value = this.currentRating;
  }
  
  this.init();
}














// Ratingsymbol object animation
function Rating05(temp,postrating) {
  this.elementName = temp;
  if (postrating) {
	this.currentRating = postrating;
  } else {
  	this.currentRating = 0;
  }

  this.ratingimage = '/images/gfx/star/star_orange_bigg.gif';
 this.noratingimage = '/images/gfx/star/star_grey_bigg.gif';
 	  

  /**
   * Initialises a new rating option.
   */
  this.init = function() {
    var span = document.getElementById(this.elementName);
    if (span) {
      // add stars
      for (var i = 1; i <= 5; i++) {
        
        var star = document.createElement('img');
        star.src = 'images/gfx/star/star_grey_bigg.gif';
        star.alt = '';
        star.rating = this;
        star.name = i;
        star.onmouseover = function() { this.style.cursor = 'pointer'; this.rating.showRating(parseInt(this.name)); };
        star.onclick = function() { this.rating.submitRating(parseInt(this.name)); };
        span.appendChild(star);
      }

      // add listener
      span.rating = this;
      span.onmouseout = function() { this.rating.showCurrentRating(); };
      
      // set visible
      span.className = '';
    }
    
    this.showCurrentRating();
  }
  
  /**
   * Shows the current user rating.
   */
  this.showCurrentRating = function() {
    this.showRating(this.currentRating);
  }
  
  /**
   * Shows a selected rating.
   */
  this.showRating = function(rating) {
    var span = document.getElementById(this.elementName);
    if (span) {
      for (var i = 1; i <= rating; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.ratingimage;
        }
      }
      rating++;
      for (var i = rating; i <= 5; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.noratingimage;
        }
      }
    }
  }
  
  /**
   * Submits a selected rating.
   */
  this.submitRating = function(rating) {
    this.currentRating = rating;
    document.getElementById('input_rating05').value = this.currentRating;
  }
  
  this.init();
}




















// Ratingsymbol object animation
function Rating06(temp,postrating) {
  this.elementName = temp;
  if (postrating) {
	this.currentRating = postrating;
  } else {
  	this.currentRating = 0;
  }

  this.ratingimage = '/images/gfx/star/star_orange_bigg.gif';
 this.noratingimage = '/images/gfx/star/star_grey_bigg.gif';

  /**
   * Initialises a new rating option.
   */
  this.init = function() {
    var span = document.getElementById(this.elementName);
    if (span) {
      // add stars
      for (var i = 1; i <= 5; i++) {
        
        var star = document.createElement('img');
        star.src = 'images/gfx/star/star_grey_bigg.gif';
        star.alt = '';
        star.rating = this;
        star.name = i;
        star.onmouseover = function() { this.style.cursor = 'pointer'; this.rating.showRating(parseInt(this.name)); };
        star.onclick = function() { this.rating.submitRating(parseInt(this.name)); };
        span.appendChild(star);
      }

      // add listener
      span.rating = this;
      span.onmouseout = function() { this.rating.showCurrentRating(); };
      
      // set visible
      span.className = '';
    }
    
    this.showCurrentRating();
  }
  
  /**
   * Shows the current user rating.
   */
  this.showCurrentRating = function() {
    this.showRating(this.currentRating);
  }
  
  /**
   * Shows a selected rating.
   */
  this.showRating = function(rating) {
    var span = document.getElementById(this.elementName);
    if (span) {
      for (var i = 1; i <= rating; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.ratingimage;
        }
      }
      rating++;
      for (var i = rating; i <= 5; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.noratingimage;
        }
      }
    }
  }
  
  /**
   * Submits a selected rating.
   */
  this.submitRating = function(rating) {
    this.currentRating = rating;
    document.getElementById('input_rating06').value = this.currentRating;
  }
  
  this.init();
}







// Ratingsymbol object animation
function Rating07(temp,postrating) {
  this.elementName = temp;
  if (postrating) {
	this.currentRating = postrating;
  } else {
  	this.currentRating = 0;
  }

  this.ratingimage = '/images/gfx/star/star_orange_bigg.gif';
 this.noratingimage = '/images/gfx/star/star_grey_bigg.gif';

  /**
   * Initialises a new rating option.
   */
  this.init = function() {
    var span = document.getElementById(this.elementName);
    if (span) {
      // add stars
      for (var i = 1; i <= 5; i++) {
        
        var star = document.createElement('img');
        star.src = 'images/gfx/star/star_grey_bigg.gif';
        star.alt = '';
        star.rating = this;
        star.name = i;
        star.onmouseover = function() { this.style.cursor = 'pointer'; this.rating.showRating(parseInt(this.name)); };
        star.onclick = function() { this.rating.submitRating(parseInt(this.name)); };
        span.appendChild(star);
      }

      // add listener
      span.rating = this;
      span.onmouseout = function() { this.rating.showCurrentRating(); };
      
      // set visible
      span.className = '';
    }
    
    this.showCurrentRating();
  }
  
  /**
   * Shows the current user rating.
   */
  this.showCurrentRating = function() {
    this.showRating(this.currentRating);
  }
  
  /**
   * Shows a selected rating.
   */
  this.showRating = function(rating) {
    var span = document.getElementById(this.elementName);
    if (span) {
      for (var i = 1; i <= rating; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.ratingimage;
        }
      }
      rating++;
      for (var i = rating; i <= 5; i++) {
        if (span.childNodes[i - 1]) {
          span.childNodes[i - 1].src = this.noratingimage;
        }
      }
    }
  }
  
  /**
   * Submits a selected rating.
   */
  this.submitRating = function(rating) {
    this.currentRating = rating;
    document.getElementById('input_rating07').value = this.currentRating;
  }
  
  this.init();
}




