function pop(URL, w, h) {
	  window.open(URL,'refrence','width=' + w + ',height=' + h + ',resizable=yes,scrollbars=yes'); 
}
function addcode(text) {
	if (document.shoutbox.shout.value == document.shoutbox.shout.defaultValue) {
		document.shoutbox.shout.value = "";
	}
		document.shoutbox.shout.value += ' ' + text + ' ';
}
function verify(form) {
	empty = 0;
	if (document.shoutbox.name.value == document.shoutbox.name.defaultValue || document.shoutbox.name.value == "") {
		empty = 1;
	}
	if (document.shoutbox.site.value == document.shoutbox.site.defaultValue) {
		document.shoutbox.site.value = "";
	}
	if (document.shoutbox.shout.value == document.shoutbox.shout.defaultValue || document.shoutbox.shout.value == "") {
		empty = 1;
	}
	if (empty) {
		alert('Debes rellenar el nombre y el mensaje que quieras poner.');
		return false;
	} else {
		return true;
	}
}
function deleteconf(id) {
	if (confirm('Are you sure you want to delete this shout?')) {
		window.location.href= 'http://www.lumanet.net/modulos/tag/paboxadmin/shouts.php?act=delete&id=' + id;
	}
}
function dobold() {
	input = prompt('Introduce el texto que quieras poner en negrita', '');
	if(input) {
		addcode('[b]' + input + '[/b]');
	}
}
function doitalic() {
	input = prompt('Introduce el texto que quieras poner en cursiva', '');
	if(input) {
		addcode('[i]' + input + '[/i]');
	}
}
function dounderlined() {
	input = prompt('Introduce el texto que quieras poner subrayado', '');
	if(input) {
		addcode('[u]' + input + '[/u]');
	}
}
function dourl() {
	url = prompt('Introduce la url del enlace', '');
	title = prompt('Introduce el texto del enlace', '');
	if(url) {
		if(title) {
			addcode('[url=' + url + ']' + title + '[/url]');
		} else {
			addcode('[url]' + url + '[/url]');
		}
	}
}
function doemail() {
	url = prompt('Introduce la dirección de Email', '');
	title = prompt('Introduce el texto del enlace', '');
	if(url) {
		if(title) {
			addcode('[email=' + url + ']' + title + '[/email]');
		} else {
			addcode('[email]' + url + '[/email]');
		}
	}
}
function clearText(thefield){
	if (thefield.defaultValue==thefield.value) {
		thefield.value = "";
	}
}
