function checkSearchValues(theForm)
{searchString = theForm.searchValue.value.replace(/[ ,-]/g, "");
 if (searchString.length == 0)
   {alert("Please enter a search value");
    theForm.searchValue.focus();
	return false; }
 return true;
}

function popHelp(qid)
{ window.open("../templates/displayInfo.cfm?qid="+qid,"Info","WIDTH=590,HEIGHT=450,top=50,left=50,resizable=yes,scrollbars=yes,menubar=yes"); }

function popHelp2(qString)
{ window.open("../templates/displayInfo.cfm"+qString,"Info","WIDTH=590,HEIGHT=450,top=50,left=50,resizable=yes,scrollbars=yes,menubar=yes"); }

function popFAQ(bid)
{ window.open("../templates/displayInfo.cfm?bid="+bid,"FAQ","WIDTH=590,HEIGHT=450,top=50,left=50,resizable=yes,scrollbars=yes,menubar=yes"); }

function popNewsletter()
{ window.open("../templates/displayInfo.cfm?NL=Y","Info","WIDTH=490,HEIGHT=400,top=50,left=50,resizable=yes,scrollbars=yes,menubar=yes"); }

function popWindow(popurl, popWidth, popHeight)
{ if (typeof(popWidth) == "undefined")
  {popWidth = 550; }
  if (typeof(popHeight) == "undefined")
  {popHeight = 450; }
  window.open(popurl,"","WIDTH="+popWidth+",HEIGHT="+popHeight+",top=50,left=50,resizable=yes,scrollbars=yes,menubar=yes"); }

function swapOptions(optSel, optSel2)
{
  var the_array_name = optSel[optSel.selectedIndex].value;
  var the_array = eval(the_array_name);
  setOptionText(optSel2, the_array);
}
function setOptionText(the_select, the_array)
{ 
  the_select.length = 0;
  var selLength = the_select.options.length;
  var arrLength = the_array.length; 
  for (loop=0; loop < the_array.length; loop++)
   {
    oValues = the_array[loop].split("~");
    if (the_select.options[loop])
    { the_select.options[loop].value = oValues[0];
	 the_select.options[loop].text = oValues[1];}
	else
	{ the_select.options[loop] = new Option(oValues[1])
	  the_select.options[loop].value = oValues[0];}
  }
}
function check2Options(theForm, name1, name2)
{ 
  if (theForm.option1.selectedIndex == 0)
    { alert("Please select "+name1);
	  theForm.option1.focus();
	  return false; }
  if (theForm.option2.selectedIndex == 0)
    { alert("Please select "+name2);
	  theForm.option2.focus();
	  return false; }
	return true;
}

function checkVal(theSelect)
{if (theSelect[theSelect.selectedIndex].text == "")
  {theSelect.selectedIndex = 0; }
}

function popThawte(popUrl)
{ window.open(popUrl,"","WIDTH=500,HEIGHT=492,top=0,left=50,menubar=yes"); }

clearX = new Image(1, 1);
clearX.src = src="/images/clear.gif";

clearY = new Image(1, 1);
clearY.src = src="/images/clear.png";
