function checksearch() {
	var text = document.getElementById('nickfield').value;
	
	if (text == "Nicksuche") {
		return false;
	} else {
		return true;
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function showprofile(url) {

/*	if (opener.opener.opener.opener.opener.opener) {
		opener.opener.opener.opener.opener.opener.location.href = url;
	} else if (opener.opener.opener.opener.opener) {
		opener.opener.opener.opener.opener.location.href = url;
	} else if (opener.opener.opener.opener) {
		opener.opener.opener.opener.location.href = url;
	} else if (opener.opener.opener) {
		opener.opener.opener.location.href = url;
	} else if (opener.opener) {
		opener.opener.location.href = url;
	} else if (opener) {*/
		top.location.href = url;
	//}
}

function calc_length() {
    var l = document.box.message.value.length;
    document.box.cnt.value = ' ' + l +' Zeichen ';
}

function checkAll() {
	var state = document.getElementById('delbox').checked;
    for (i = 0; i < document.getElementsByName('mail[]').length; i++)
    document.getElementsByName('mail[]')[i].checked = state;
}

function checkAllS() {
	var state = document.getElementById('delbox').checked;
    for (i = 0; i < document.getElementsByName('smily[]').length; i++)
    document.getElementsByName('smily[]')[i].checked = state;
}

function pruefe() {
   if(document.all&&!window.opera) {
     var a=document.all.detail;
     live.document.body.scroll='no';
   } else {
     var a=document.getElementsByName('live')[0];
     a.scrolling='no';
   }
   var a=document.getElementsByName('live')[0];
   live.document.getElementsByTagName('body')[0].style.overflow='hidden';
   var b=live.document.getElementById('cont');
   if(a.style.height != eval(b.offsetHeight+35)+'px') {
      a.style.height=eval(b.offsetHeight+35)+'px';
   }
}

function resize_me(n)	{
  d=5;ifObj=document.getElementsByName(n)[0];p=(document.all)?'scroll':'offset';
  eval("ifObj.style.height=window.frames[n].document.getElementsByTagName('body')[0]."+p+"Height+"+d);
}

function resize_im(n)	{
  d=5;
  ifObj=document.getElementsByName(n)[0];
  p=(document.all)?'scroll':'offset';
  eval("h=window.frames[n].document.getElementsByTagName('body')[0]."+p+"Height+"+d);
  if (h > 600) { h = 600; }
  ifObj.style.height=h;
}

function ml_startup() {
  window.setTimeout("parent.resize_me('mlist')", 150);
}


function fm_popup(URL) {
	window.open(URL,'fm','menubar=no,resizeable=no,scrollbars=no,toolbar=no,width=300,height=190');
}

function im_popup(UID, URL) {
	window.open(URL,UID,'menubar=no,resizeable=no,scrollbars=no,toolbar=no,status=no,width=375,height=370');
}

function profile_popup(URL) {
        window.open(URL,'profile','location=0,menubar=no,resizeable=no,scrollbars=yes,status=no,toolbar=no,width=566,height=500');
}

function mini_popup(URL) {
        window.open(URL,'mini','location=0,menubar=no,resizeable=no,scrollbars=no,status=no,toolbar=no,width=100,height=10');
}

function agb_popup(URL) {
        window.open(URL,'agb','location=0,menubar=no,resizeable=no,scrollbars=yes,status=no,toolbar=no,width=540,height=550');
}

function guestbook_popup(URL, reloadit)
{
        window.open(URL,'_blank','location=0,menubar=no,resizeable=no,scrollbars=yes,status=no,toolbar=no,width=462,height=550');
        if (reloadit) { window.location.reload(); }
}

function gallery_popup(URL)
{
        window.open(URL,'gallery','location=0,menubar=no,resizeable=no,scrollbars=no,status=no,toolbar=no,width=563,height=635');
}

function userpics_popup(URL) {
	window.open(URL,'bla','menubar=no,resizeable=no,scrollbars=no,toolbar=no,width=500,height=500');
}

function party_popup(URL) {
	window.open(URL,'party','menubar=no,resizeable=no,scrollbars=no,toolbar=no,width=546,height=626');
}


function pic_popup(url,x,y)
{
    var name='picpopup';
    window.open(url ,name,'width=' + x + ',height=' + y + ',scrollbars=no');
}

function country_check() {
	if (document.getElementById('land').value != 'DE') {
		document.getElementById('wohnort').style.visibility = "visible";
	} else {
		document.getElementById('wohnort').style.visibility = "hidden";
	}
}

function mail_check() {
	if (document.mailform.subject.value == "") {
		alert ("Bitte einen Betreff angeben!");
		document.mailform.subject.focus();
		return false;
	}
}

function forum_check() {
	if (document.forumpost.subject.value == "") {
		alert ("Bitte einen Betreff angeben!");
		document.forumpost.subject.focus();
		return false;
	}
	if (document.forumpost.text.value == "") {
		alert ("Du mußt den Beitrag ausfüllen!");
		document.forumpost.text.focus();
		return false;
	}
}

function blog_check() {
	if (document.blogform.title.value == "") {
		alert ("Bitte eine Überschrift angeben!");
		document.blogform.title.focus();
		return false;
	}

	if (document.blogform.entry.value == "") {
		alert ("Du mußt das einen Text angeben, um einen Blog-Eintrag zu erstellen!");
		document.blogform.entry.focus();
		return false;
	}

	if (document.blogform.picture.value == "") {
		alert ("Ein Blog-Eintrag muß ein Bild enthalten!");
		document.blogform.picture.focus();
		return false;
	}
}

function live_switch() {
	if (document.getElementById('live').style.display == 'none') {
		document.getElementById('live').style.display = 'inline';
	} else {
		document.getElementById('live').style.display = 'none';
	}
	
//	pruefe();
}

function usercount(count) {
	parent.document.getElementById('usercount').childNodes[0].data = "Mitglieder Online: " + count;
}

/*
DHTML Ad Box (By Matt Gabbert- tax@nolag.com, http://www.nolag.com)
*/

adTime=30;  // seconds ad reminder is shown
chanceAd=1; // ad will be shown 1 in X times (put 1 for everytime)

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
adCount=0;
function initAd(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sponsorAdDiv.style');
	else if(ns)	adDiv=eval('document.layers["sponsorAdDiv"]');
	else if(w3)	adDiv=eval('document.getElementById("sponsorAdDiv").style');
	randAd=Math.ceil(Math.random()*chanceAd);
        if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	if(randAd==1) showAd();
}
function showAd(){
if(adCount<adTime*10){adCount+=1;
	if (ie){documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft-20;
	documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
	documentHeight=window.innerHeight/2+window.pageYOffset-20;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
	adDiv.left=documentWidth-350;adDiv.top =documentHeight-200;
	setTimeout("showAd()",100);}else closeAd();
}
function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}
onload=initAd;

