/* JavaScript for xGB v2.0 by Robert Klikics <rob@x-gfx.de> */

/* very, very basic spambot blocker ;) */
function contact(pt1, pt2) {
	
	window.location = "mailto:" + pt1 + "@" + pt2;
}

/* check len. of posting */
function CheckLength(MessageMax) {
	     
        alert("Max. chars: " + MessageMax + "\nIn use: " + document.newsarea.post.value.length);
}

/* bb-codes info */
function bb() {
	
	alert("[b] text [/b] = bold text\n[i] text [/i] = italic text\n[u] text [/u] = underlined text");	
}

/* add smilies from popup to textarea */
function add_smilie(code) {
		
	opener.document.newsarea.post.value += " " + code + " ";	
}

/* smilie popup */
function smilies() {
	
	window.open('xGB.php?act=smilies','smilies','width=200,height=300,resizable=yes,scrollbars=yes,left=50,top=50'); 
}	

/* confirm to delete a msg */
function delete_msg(theID) {
	
	if (confirm("Really delete this message?"))	window.location.href = "xGB.php?act=admin&do=del&id=" + theID;
	else						alert ("Nothing changed!");
	
}