/* checkAll() used on the compare.php page */
function checkAll() {
	docComp = document.compare;

	docComp.freqRange.checked = true;
	docComp.sndPressureLvl.checked = true;
	docComp.sens.checked = true;
	docComp.imp.checked = true;
	docComp.inputPwr.checked = true;
	docComp.ampPwr.checked = true;
	docComp.acousDesign.checked = true;
	docComp.size.checked = true;
	docComp.weight.checked = true;
	docComp.finish.checked = true;
	docComp.features.checked = true;
	docComp.price.checked = true;
}

/* unCheckAll() used on the compare.php page */
function unCheckAll() {
	docComp = document.compare;

	docComp.freqRange.checked = false;
	docComp.sndPressureLvl.checked = false;
	docComp.sens.checked = false;
	docComp.imp.checked = false;
	docComp.inputPwr.checked = false;
	docComp.ampPwr.checked = false;
	docComp.acousDesign.checked = false;
	docComp.size.checked = false;
	docComp.weight.checked = false;
	docComp.finish.checked = false;
	docComp.features.checked = false;
	docComp.price.checked = false;
}




/* 
 *  All following scripts are used by old MMaclellan pages
 *  As new pages are brought online, these scripts may be discarded or moved above this line
 */
 
/* popUp() used on the product.php page */
function popUp( src, wName, ww, wh ) {
	WND = window.open( src, wName, 'width=' + ww + ',height=' + wh + ',scrollbars=1' );
	if( WND != null ){ WND.focus(); WND.document.close(); return;}
	alert( 'Unable to open ' + src + ' !' );
	return;
}


function printpage() {
	window.print();  
}

var msg = "\r. . . Please check item(s) and then resubmit.";
var submitted = 0;
function checkList(f1){
	var ErrStr = "";
	if( submitted==1 ){ confirm( "Page is being submitted -- waiting for server response. This process may take several seconds.");
		return false;}
	if( !(f1.email.value.match("@")) || f1.email.value == ""  || f1.email.value.length < 7){ErrStr += "E-mail Address?\n";}
	if( f1.name.value == "" ){ErrStr += "First-Name?\n";}
	if( f1.qc.value == "" ){ErrStr += "Last-Name?\n";}
	if( ErrStr != "" ){ alert( ErrStr + msg); return false;}
	else{ submitted=1; f1.submit.value="SUBMITTED "; return true;}
}

