function backa()
{
window.history.back();
}
function viewImage(image,text){
	handle = window.open('viewimage.asp?image='+image+'&text='+text, 'image', 'menubar=no,resizable=no,Width=200,Height=200,titlebar=no,alwaysRaised=yes,status=no,scrollbars=no');
	handle.focus();
}

function rating(rate, half, range)
{

for(i=1; i<=rate; i++){
	document.write("<img src='./graphics/filled.GIF'>")
}

if(half == 1) {	
	document.write("<img src='./graphics/half.GIF'>") 

}

for(i=1; i<=(range - rate); i++){
	document.write("<img src='./graphics/blank.GIF'>")
}
document.write("<br>")

}

function CheckForm() {
	var bulle = 0;
	var punkt = 0;
	var errorMsg = "";
	if (document.newslist.name.value == ""){
		errorMsg += "You have to enter your name!";
		alert(errorMsg);
		document.newslist.name.focus();
		return false;

	}

	if (document.newslist.email.value.length == 0) { 	
		errorMsg += "Please enter your E-mail address!";
			alert(errorMsg);
			document.newslist.email.focus();
			return false;	 
		
	}


	if (document.newslist.email.value.length > 0) { 

		email=document.newslist.email.value;

		if (!isEmail(email)) {   
			errorMsg += "Please enter a valid E-mail address!";
			alert(errorMsg);
			document.newslist.email.focus();
			return false;	 
		}
	}

return true;

}

function isEmail(str) {
  // are regular expressions supported?
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,4})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}