function popit(url,w,h,s) {
	var l = (screen.width-w)/2 - 4; var t = (screen.height-h)/2 + 6; if(s=="") var s = "no";
	var pic = window.open(url,pic,"width="+w+",height="+h+",top="+t+",left="+l+",scrollbars="+s+",menubar=no,location=no,directories=no,resizable=no,status=no"); 
	pic.focus();
}

function Bewertung(stufen, id, textfield, bewertung)
{
	this.bewertung = bewertung;
	this.stufen = stufen;
	this.id = id;
	this.textfield = textfield;
	this.img0 = '/img/meinung_0.gif';
	this.img1 = '/img/meinung_1.gif';

	this.click = function(n)
	{
		this.bewertung = n;
		document.getElementById(this.textfield).value = n;
		document.getElementById(this.textfield).focus();
	}

	this.over = function(n) {
		for(var i=1; i<=this.stufen; i++) { this.setImage(i, (i<=n ? this.img1 : this.img0)); }
	}

	this.out = function(n) {
		for(var i=1; i<=this.stufen; i++) { this.setImage(i, (i<=this.bewertung ? this.img1 : this.img0)); }
	}

	this.setImage = function(i, uri) { document.getElementById(this.id+i).src = uri; }

	this.check = function()
	{
		if(!(this.bewertung >= 1 && this.bewertung <= this.stufen))
		{
			alert("Bitte geben Sie eine Bewertung (1 bis 5 Sterne) ab.");
			return false;
		}
		return true;
	}
}

function hover(io){
   if(!io.src)io=document.images[io];if(io.src){if(!io.over){
   io.over=io.src.replace(/\.(gif|jpe?g|png)$/i,hover.suffix+".$1");
   io.out=io.src;}io.src=io.over!=io.src?io.over:io.out;}}

hover.suffix = "_on";
