function closer() {
	opener.location.reload();
	self.close();
}


function numbersonly(myfield, e, dec) {
	var key;
	var keychar;
	
	if(window.event) {
	   key = window.event.keyCode;
	}
	else if(e) {
	   key = e.which;
	}
	else {
	   return true;
	}
	keychar = String.fromCharCode(key);
	
	if((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27)) {
	   return true;
	}
	
	else if ((("0123456789./`").indexOf(keychar) > -1)) {
	   return true;
	}
	
	else if (dec && (keychar == ".")) {
	   myfield.form.elements[dec].focus();
	   return false;
	}
	else {
	   return false;
	}
}
// <input type='text' name='bla' size='20' onKeyPress="return numbersonly(this, event)">


function del_entry(DEST) {
	if(confirm("Klicken Sie auf ok um den Eintrag definitiv zu entfernen!")) {
		window.location.href = DEST;
	}
}


function MM_reloadPage(init) {
	if(init==true) with (navigator) {
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage;
		}
	}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function openWindow(theURL,winName,winWidth,winHeight,sb) {
	var winLeft = ((screen.availWidth - winWidth) / 2);
	var winTop = ((screen.availHeight - winHeight) / 2);
	if(sb == "yes") {
		sb_string = ",scrollbars=yes";
	}
	else {
		sb_string = ",scrollbars=no";
	}
	window.open(theURL,winName,'toolbar=no' + sb_string + ',status=no,menubar=no,resizable=no,location=no,dependent=yes,width=' + winWidth + ',height=' + winHeight + ',left=' + winLeft + ',top=' + winTop);
}


function twoFrames(URI1,F1,URI2,F2) {
	Frame1=eval("parent."+F1);
	Frame2=eval("parent."+F2);
	Frame1.location.href = URI1;
	Frame2.location.href = URI2;
}


function showEntry(divID) {
	document.getElementById(divID).style.overflow = "visible";
	document.getElementById(divID).style.height = "auto";
}

function hideEntry(divID) {
	document.getElementById(divID).style.overflow = "hidden";
	document.getElementById(divID).style.height = "20px";
}

function printLink() {
	url = prompt("URL:","http://");
	if(url != "" && url != "http://") {
		document.form01.thread_text.value = document.form01.thread_text.value + "<a href='" + url + "' target='_blank'>Linktext</a>";
	}
}

function printImage() {
	image = prompt("URL:","http://");
	if(image != "") {
		document.form01.thread_text.value = document.form01.thread_text.value + "<img src='" + image + "' border='0'>";
	}
}