function formpopB(seite, scr, myw, myh) {
  var myWidth= screen.availWidth ;
  var myHeight = screen.availHeight;
  if (myHeight > 500)
  {
	 winH = ((myHeight - myh)/2);
  }
  else
  {
	 winH = 0 ;
  } 	
    if (myWidth > 600)
  {
	 winW = ((myWidth - myw)/2);
  }
  else
  {
	 winW = 0 ;
  } 	
if ( scr == 0){
funk = "\"width=" + myw + ",height=" + myh + "\"" ;
}
else{
funk = "\"toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,width=" + myw + ",height=" + myh + "\"";
} 
myWin = window.open (seite,'scene',funk);
myWin.moveTo(winW,winH);

//alert ("the value of funk is:\n" + funk) ;

}

function validate(theForm)
{
	var dname = theForm.WhoIs.value.length;
	pname = theForm.WhoIs.value.indexOf(".");
	if ( (dname < 5) || (pname == -1) ){
	    alert("Domainname ist nicht gültig.  Geben Sie bitte einen gültigen Domainnamen ein.");
   		 return (false);
	 	 theForm.WhoIs.focus();
	}
	if (! (checkname(theForm.WhoIs.value) == -1))
        {
        	alert("Domainname ist nicht gültig! Leerzeichen oder '@', '.', '?', '/', '_' sind nicht erlaubt. ");
    		  theForm.WhoIs.focus();
              return false;
	}
	if (! (checkit(theForm.WhoIs.value) == -1))
	{
		alert("Die Zeichen 'äüöÄÜÖß' sind nicht in dem Domainnamen erlaubt!");
		theForm.WhoIs.focus();
		return false;
	}
        
return true;
}

function checkit(strWord)
{
	h = strWord.indexOf("ä");
        g = strWord.indexOf("Ä");
        f = strWord.indexOf("ü");
        e = strWord.indexOf("Ü");
        d = strWord.indexOf("ö");
        c = strWord.indexOf("Ö");
        b = strWord.indexOf("ß");
        if (! ( (h == -1) && (g == -1) && (f == -1) && (e == -1) && (d == -1) && (c == -1) && (b == -1) ) )
        {
		return (0);
        }
	return (-1);
}

function checkname(strName)
{
       l = strName.indexOf(" ");
       a = strName.indexOf("@");
       q = strName.indexOf("?");
       s = strName.indexOf("/");
		t = strName.indexOf("_");
       if(!( (l == -1) && (a == -1) && (q == -1) && (s == -1) && (t == -1) ))
		{
			return (0);
       		}
       return (-1);
}
