var windowName;

function PopupFenster(URL) {
	Popup(URL, 'Bearbeiten');
}

function Popup(URL, PName) {
  if (windowName && !windowName.closed)  {
	windowName.close();
	}
	windowName = window.open(URL,PName,"toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=600");
	windowName.focus();
}

function fnDelete(url)
{
 var ok=confirm("Wollen Sie den Eintrag wirklich löschen?");
 if (!ok){
  return;
	}
  else{
  showPopWin680(url);
  } 
}

function refreshParent(URL) {

  var NewUrl = window.top.location.toString();
  var iGatterIndex = NewUrl.lastIndexOf("#");
  if (iGatterIndex != -1)
  {
	NewUrl = NewUrl.substring(0, iGatterIndex);
  }
  window.top.location = NewUrl;
  window.close();
}

function einblenden(x) 
{ 
	document.getElementById(x).style.position="relative";
	document.getElementById(x).style.visibility="visible";
} 

function ausblenden(x)
{ 
	document.getElementById(x).style.position="absolute";
	document.getElementById(x).style.visibility="hidden";
} 

function changeVisibility(x) 
{
if(document.getElementById(x).style.visibility=='hidden')
	{
	einblenden(x);
	} 
    else
	{
	ausblenden(x);
	} 
} 

function textCounter(field, countfield, maxlimit) {
  countfield.value = maxlimit - field.value.length;
}

function checknewprofilename(field)
{
	if (field.value == "hier bitte den neuen Profilnamen eintragen")
		field.value = "";
}

function CheckBlocker(BlockerInstalled) {
	/*  Function:      setEvents
		Creation Date: April 5, 2004
		Programmer:    Edmond Woychowsky
		Purpose:       The purpose of this function is to attempt to open
					a popup window to determine if a popup blocker is
					enabled.
		Update Date:            Programmer:         Description:
		*/
		var objChild;                           // Window
		var reWork = new RegExp('object','gi');	// Regular expression
		try {
			objChild = window.open('','child','width=50,height=50,status=no,resizable=yes'); 
			objChild.close();
		}
		catch(e) { }
		if(!reWork.test(String(objChild)))
			alert(BlockerInstalled);
}


