/**
	lib_tools.js
	Nützliche Tools
*/

var oldnl=new Date();

function doreload() {
        var newnl=new Date();
        if (oldnl!=null) {
                var delta=Math.round((newnl.getTime() - oldnl.getTime())/1000.);
                if (delta>30) document.location.reload();
                }
        }

/**
	PMs innerhalb der Community
*/
   function mail(name, betreff) {
   document.mail.user.value=name;
   document.mail.betreff.value=betreff;
   document.mail.submit();
   }




/**
	Löschen des Forms
*/
function clearIt(formular)  {
      formular.submit();
      formular.say.value="";
      formular.say.focus();
      formular.say.select();
      return (false);
    }

/**
	Aktionhack
*/
  function aktion(wert,myflag)  {
    if(document.nickliste.showreg.value != "")  {
       if (myflag=='false') parent.postframe.postframe.say.value = wert + ' ' + document.nickliste.showreg.value;
       else parent.postframe.postframe.say.value = wert + ' ' + document.nickliste.showreg.value + ' ';
       parent.postframe.postframe.say.focus();
     }
    }

/**
	selecthack
*/
  function select(name) {
      document.nickliste.showreg.value =name;
      parent.postframe.postframe.say.focus();
	}

/**
	Colhack
*/
    function changeCol(myCol) {
    var url = 'jfchat--sid--?&auth&say=/col+'+myCol;
    parent.dummy.location.href=url;
	}

/**
	Geisterbuttons
*/
	function ghost()	{
	document.FWCMAIL.submit.disabled = true;
	return true;
	}

/**
	hackhack ;)
*/
	function hack(wert) {
        parent.postframe.postframe.say.value =parent.postframe.postframe.say.value+wert;
        parent.postframe.postframe.say.focus();
	}


function emo(welches)
{
	document.FWCMAIL.daten.value += welches+" ";
	document.FWCMAIL.daten.focus();
}

/**
	Last but not least: Hall of Fame (hof) Geschichten hier:
*/
	function hof(wert) {
        document.halloffame.hof.value=wert;
        document.halloffame.submit();
       }