/*

a mash up of scripts i collected and modified (poorly)... designed to check an array of text boxes for at least one value boooyah! report any bugs please...

*/

function checkTextboxes() {
	oTextBoxes = new Array(); // to store the textbox objects
	oInputs = document.getElementsByTagName( 'input' ) // store collection of all <input/> elements
	for ( i = 0; i < oInputs.length; i++ ) { // loop through and find <input type="text"/>
		if ( oInputs[i].type == 'text' ) {
			oTextBoxes.push( oInputs[i] ); // found one - store it in the oTextBoxes array
		}
	}


	

	numZero = new Array();
	for ( i = 0; i < oTextBoxes.length; i++ ) { // Loop through the stored textboxes and output the value
		if (oTextBoxes[i].value == "") {
			alert('Please enter a value');
			return false;
			
		}
		
		if (oTextBoxes[i].value != "0")  { // If not equal to zero add item to array
			//return false
			numZero.push( [i] );
		} 
		
		
	}

	a = numZero.length; // array length

	if ( a == 0 ) { // if array greater than 0 bingo!
		msg = " Please enter a number for the license(s) you wish to purchase into the text field(s)!";
		alert( msg );
		return false;
		
	}
	

}

;