function processmenu(f,v) {
	if (f == "navForm") {
		toolTypeParam="";
		
		if ( v=="2" )
			toolTypeParam="&tt=Tool";
			
		if ( v=="2a" )
			toolTypeParam="&tt=ToolSet";
		
		document.location = "?p=" + v + "&s=0" + toolTypeParam ;
	} else {
		if (v != "") {			
			if ( f == "toolsectionForm")
			{		
				toolDesc = v.value.split('~');
			 	document.location = "?p=" + currentpage + "&s=" + toolDesc[0] + "&t=0" + "&tt=" + toolDesc[1]; 			 	
			 }
			else if ( f == "toolForm" )
				document.location = "?p=" + currentpage + "&s=" + currentsect + "&t=" + v.value + "&tt=" + currenttooltype ;
		} else {
			return true;
		}
	}
}

function incomplete(txtBox){
	if (txtBox.value == '') {
		txtBox.focus();
		alert('Please complete all required fields identified in yellow...') ;
		return true;
	} else {
		return false;
	}
}

function validateForm() {
	if (incomplete(document.ContactForm.name))    		  {return false;};
	if (incomplete(document.ContactForm.address)) 		  {return false;};
	if (incomplete(document.ContactForm.city))    		  {return false;};
	if (incomplete(document.ContactForm.state))  		  {return false;};
	if (incomplete(document.ContactForm.country)) 		  {return false;};
	if (incomplete(document.ContactForm.zip))    		  {return false;};
	if (incomplete(document.ContactForm.phone0))		  {return false;};
	if (incomplete(document.ContactForm.phone1))		  {return false;};
	if (incomplete(document.ContactForm.phone2))		  {return false;};
	if (incomplete(document.ContactForm.customeremail))   {return false;};

	return true;
}

function imgOn(which) {
	var title = document.getElementById([which]+"_title");
	var icon  = document.getElementById("icon");
 	
 	if (title)
		title.src = "images/" + which + "_titleLIT.gif";
		
	if (icon)
		icon.src  = "images/" + which + "_icon.gif";
}

function imgOff(which) {
	var title = document.getElementById([which]+"_title");
	var icon  = document.getElementById("icon");
 	
 	if (title)
		title.src = "images/" + which + "_titleDIM.gif";
		
	if (icon)
		icon.src  = "images/default_icon.gif";
}



function getQryStrValue()
{
	var qsParm = new Array();
	var query = window.location.search.substring(1);
	var parms = query.split('&');
	for (var i=0; i<parms.length; i++) {
		var pos = parms[i].indexOf('=');
		if (pos > 0) {
			var key = parms[i].substring(0,pos);
			var val = parms[i].substring(pos+1);
		qsParm[key] = val;
		}
	}
	return qsParm;
}
