/*
+----------------------------------------------------------------+
|																							|
|	GaMerZ Expenses Tracking System											|
|	Copyright (c) 2005 Lester 'GaMerZ' Chan									|
|	http://www.lesterchan.net													|
|																							|
|	File Written By:																	|
|	- Lester "GaMerZ" Chan															|
|	- http://www.lesterchan.net													|
|																							|
|	File Information:																	|
|	- General JavaScript File														|
|	- scripts/javascript.js															|
|																							|
+----------------------------------------------------------------+
*/


// Check Form Field Is Empty
function isEmpty(value){
	if (trim(value) == "")
		return true;
	return false;
}

// Trim White Spaces
function trim(strText) { 
    // this will get rid of leading spaces 
    while (strText.substring(0,1) == ' ') 
        strText = strText.substring(1, strText.length);
    // this will get rid of trailing spaces 
    while (strText.substring(strText.length-1,strText.length) == ' ')
        strText = strText.substring(0, strText.length-1);
   return strText;
}

// Disbable Button
function disable_button(theButton) {
	theButton.value="Processing...";
	theButton.disabled = true;
}

// Quick Menu
function quickmenu() {
	var form = document.quick_menu.menu;
	if(form.options[form.selectedIndex].value != "None") {
		parent.location.href = form.options[form.selectedIndex].value;
	}
}
