function openPic(url,winName,winParams)	{	
	var theWindow 
	if (theWindow)	{theWindow.close();}
	theWindow = window.open(url,winName,winParams);
	if (theWindow)	{theWindow.focus();}
}

if(document.all && !document.getElementById) {
      document.getElementById = function(id) {
           return document.all[id];
      }
}


function newplayfmWindow(newContent,x,y)
{
     window.name = "PLAY.FM";
     winContent = window.open(newContent, '_blank', "right=10,top=10,width="+x+",height="+y+", toolbar=no,scrollbars=no,resizable=no");
}


function check_email(e) {
ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

for(i=0; i < e.length ;i++){
if(ok.indexOf(e.charAt(i))<0){ 
return (false);
}	
} 

if (document.images) {
re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!e.match(re) && e.match(re_two)) {
return (-1);		
} 

}

}

function check_form(f) { 


var email = document.getElementById("personemail").value;


if(!check_email(email)){
alert("Ungültige email-Adresse! Bitte achte auf eine korrekte Eingabe Deiner email Adresse!");
document.getElementById("personemail").focus(); 

if(document.all || document.getElementByID){

document.getElementById("personemail").style.background = "yellow";
}

return false;
}

}

function check_form_eng(f) { 

var email = document.getElementById("personemail").value

if(!check_email(email)){
alert("Invalid email detected! Please make sure you entered the your email address correctly!");
document.getElementById("personemail").focus(); 

if(document.all || document.getElementByID){

document.getElementById("personemail").style.background = "yellow";
}

return false;
}

}

