
/*   CALLING THIS PAGE:   <script type="text/javascript" src="../../includes/common.js"></script>    */






function loadAbuseReport() {
var load = window.open('/reportAbuse.php','','scrollbars=no,menubar=no,height=550,width=450,resizable=yes,toolbar=no,location=no,status=no');
}



/*
Button is unclickable after pressing SUBMIT
*/
function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}



/*
Make sure that textBox only contain number
*/
function checkNumber(textBox)
{
	while (textBox.value.length > 0 && isNaN(textBox.value)) {
		textBox.value = textBox.value.substring(0, textBox.value.length - 1)
	}
	
	textBox.value = trim(textBox.value);
/*	if (textBox.value.length == 0) {
		textBox.value = 0;		
	} else {
		textBox.value = parseInt(textBox.value);
	}*/
}



/*
Confirming before acting
*/
// SAMPLE:  <a href="#" onClick="confirmLoad('../../link.php', 'DELETE');">NAME</a>
function confirmLoad(url, action)
		{
			if (confirm(''+action+''))
			{
				window.location = url;
			}
		}








/*
Make sure that textBox only contain number
*/
// SAMPLE: <a href="javascript:popUp('/fan/members/privmsg_comp.php')">NAME</a>
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=610,left = 100,top = 50');");
}

