// JavaScript Document
function DisplayWoodfinish(formId)
{	
	var stain = true
	if (document.forms[formId].woodfinishid.value =='')
	{
		alert('The first "Select Wood Finish" option is not a valid selection. Please choose one of the other options.' );
		document.forms[formId].woodfinishid.focus();	
		stain = false;
		//return (false);	
	}	
	var cid = document.forms[formId].woodfinishid.value
	if (cid != '' && stain==true) {
	stain = window.open("ax_woodfinish.asp?cid="+cid,'_large','scrollbars=0,menubar=0,location=0,titlebar=0,width=370,height=180,left=0,top=0');
	stain.focus();
	}
}
function DisplayBand(formId)
{	
	var band = true
	if (document.forms[formId].metalbandid.value =='')
	{
		alert('The first "Select Metal Band" option is not a valid selection. Please choose one of the other options.' );
		document.forms[formId].metalbandid.focus();	
		band = false;
		//return (false);	
	}	
	var cid = document.forms[formId].metalbandid.value
	if (cid != '' && band==true) {
	band = window.open("ax_metalband.asp?cid="+cid,'_large','scrollbars=0,menubar=0,location=0,titlebar=0,width=370,height=180,left=0,top=0');
	band.focus();
	}
	
}
function DisplayBandfinish(formId)
{	
	var fband = true
	if (document.forms[formId].metalbandfinishid.value =='')
	{
		alert('The first "Select Metal Band Finish" option is not a valid selection. Please choose one of the other options.' );
		document.forms[formId].metalbandfinishid.focus();	
		fband = false;
		//return (false);	
	}	
	var cid = document.forms[formId].metalbandfinishid.value
	if (cid != '' && fband==true) {
	fband = window.open("ax_metalband_finish.asp?cid="+cid,'_large','scrollbars=0,menubar=0,location=0,titlebar=0,width=370,height=180,left=0,top=0');
	fband.focus();
	}
	
}

function FrontPage_Form1_Validator(theForm)
{

  if (theForm.category.selectedIndex < 0)
  {
    alert("Please select one of the \"Product Use\" options.");
    theForm.category.focus();
    return (false);
  }

  if (theForm.category.selectedIndex == 0)
  {
    alert("The first \"Product Use\" option is not a valid selection.  Please choose one of the other options.");
    theForm.category.focus();
    return (false);
  }

if (theForm.woodfinishid != null) {
	if (theForm.woodfinishid.selectedIndex < 0)
	  {
		alert("Please select one of the \"Select Wood Finish\" options.");
		theForm.woodfinishid.focus();
		return (false);
	  }
	
	if (theForm.woodfinishid.selectedIndex == 0)
	  {
		alert("The first \"Select Wood Finish\" option is not a valid selection.  Please choose one of the other options.");
		theForm.woodfinishid.focus();
		return (false);
	  }
}

if (theForm.metalbandid != null) {
	if (theForm.metalbandid.selectedIndex < 0)
	  {
		alert("Please select one of the \"Select Metal Band\" options.");
		theForm.metalbandid.focus();
		return (false);
	  }
	
	  if (theForm.metalbandid.selectedIndex == 0)
	  {
		alert("The first \"Select Metal Band\" option is not a valid selection.  Please choose one of the other options.");
		theForm.metalbandid.focus();
		return (false);
	  }
}

if (theForm.metalbandfinishid != null) {
	if (theForm.metalbandfinishid.selectedIndex < 0)
	  {
		alert("Please select one of the \"Select Metal Band Finish\" options.");
		theForm.metalbandfinishid.focus();
		return (false);
	  }
	
	  if (theForm.metalbandfinishid.selectedIndex == 0)
	  {
		alert("The first \"Select Metal Band Finish\" option is not a valid selection.  Please choose one of the other options.");
		theForm.metalbandfinishid.focus();
		return (false);
	  }
}
  
  //To avoid cashing of DisplayColor function
  theForm.target = "_self"
  theForm.action = "inquiry.asp"
  return (true);
}

