function PopUpWindow(url, width, height, scrollbars, resizable)
{
    var options = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scrollbars+',resizable='+resizable+',copyhistory=no,width='+width+',height='+height;
    var w = window.open(url, 'Petra', options);
    w.focus();
}



function PopupFenster(url,breite,hoehe)
	{
	var options = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=' + breite + ',height='+hoehe;
if(!window.myWin || myWin.closed)
		{
				window.myWin=window.open(url, 'Petra',options);
		}
		else
		{
			
			window.myWin.focus();
			window.myWin.document.location.href = link;
		}

	}


function ShowUserOnline()
{
    PopUpWindow("/community/useronline/liste.asp",210,540,1,0);
    /*window.open("/community/useronline/liste.asp","UserOnline","alwaysRaised=1,toolbar=0,location=0,scrollbars=1,menubar=0,resizable=0,status=0,width=210,height=540");*/
}




     
        
function InitializeRegistration()
{
    PermissionCheck(window.location.href)
}



function FocusTextBox(elementid)
{
    var element = document.getElementById(elementid);
    if(element != null)
    {
        element.focus();
        element.value += '';
    }
}


function toggleLoginView(pwdCaptionDiv, pwdInputId)
{
    document.getElementById(pwdCaptionDiv).style.zIndex = '0';
    document.getElementById(pwdInputId).focus();
}


function ToggleDisplay(elementid)
{
    var element = document.getElementById(elementid);
    if(element != null)
    {
        if(element.style.display == 'none')
            element.style.display = '';
        else
            element.style.display = 'none';
    }
}

function HighLight(elementid)
{
    var element = document.getElementById(elementid);
    if(element != null)
    {
        element.className = "current";
    }
}

// ---------------------------------------------------------------------------
// Banner
// ---------------------------------------------------------------------------
function moveBanner(codeId, targetId) 
{	
	if (document.getElementById) 
	{		
		var myBannerCode = $(codeId);
		var targetId     = $(targetId);
		
		if (myBannerCode && targetId) 
		{	
			while ((myBannerCodeElem = myBannerCode.firstChild)) 
			{	
                
				if (myBannerCodeElem.tagName && myBannerCodeElem.tagName.toLowerCase() == "script") 
				{	
					myBannerCode.removeChild(myBannerCodeElem);
				} 
				else 
				{	
					targetId.appendChild(myBannerCodeElem);
				}

			}
		}
	}
}
