
//PLEASE NOTE: coding this function with the absolute path to the 'popups' folder is a MUST. 
//This function is called from many levels within the site, and must know EXACTLY where to find the 
//files...
var url;
var w;
var h;
function openNewWin(url,w,h) {
		ContactWindow = window.open('http://www.teamirg.com/popups/' + url, 'help', 'toolbar=no,scrollbars=yes,resizeable=no,width=' + w +',height=' + h +'')
	}
	
//used as a generic pop-up function.
//you must pass height, width, and a fully qualified URL...that is what will make this one a true all purpose pop-up function...
//Tod O'Brien 12.March.2004
var url;
var w;
var h;
function openGenericWindow(url,w,h) {
		ContactWindow = window.open(url, 'help', 'toolbar=no,scrollbars=no,resizeable=no,width=' + w +',height=' + h +'')
	}
	
	
	
//********Func to hide/show blocks of text*********************************************
// Specifically on conferences/jan04/index.asp when the conf schedules are collapable...************
function showItDisplay(id) 
{ 
		if (document.getElementById) {
		obj = document.getElementById([id]);
		obj.style.display="block";
	}

}

function hideItDisplay(id) 
{ 
	
	if (document.getElementById) {
		obj = document.getElementById([id]);
		obj.style.display="none";
	}

}

function showhideItDisplay(id) 
{ 
	
	if (document.getElementById) {
		obj = document.getElementById([id]);
		
		if (obj.style.display=="none") {
		obj.style.display="block";
		} else {
		obj.style.display="none";
		}
	}

}
//********END Func to hide/show blocks of text******************************************
	
//used to build pop-up for audio clips to be played.
var clip;
var size;
//?clip= + clip + '&size=' + size'
function openAudio(clip,size) {
		ContactWindow = window.open('http://www.teamirg.com/popups/assocCall/audio.asp?clip=' + clip + '&size=' + size, 'help', 'toolbar=no,scrollbars=yes,resizeable=no,width=322,height=295')
	}	

	
//This func. allows a graphical button to clear a form...ie: The Log-In page...	
function resetForm()
	  {	  
	  document.FrontPage_Form1.reset();
	  //document.FrontPage_Form1.reset();
	  setState();
	  }

//This function is called when the LogIn form is submitted.
//It is legacy code that is being re-used in the name of a quick deployment of the new site. march 2003.  
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.UserName.value == "")
  {
    alert("Please enter a value for the \"UserName\" field.");
    theForm.UserName.focus();
    return (false);
  }

  if (theForm.Password.value == "")
  {
    alert("Please enter a value for the \"Password\" field.");
    theForm.Password.focus();
    return (false);
  }
  return (true);
}	 

//This function is called when the sampleTraining.asp form is submitted.
function validateTraining(Form)
{
	if (Form.txtName.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    Form.txtName.focus();
    return (false);
  }
  if (Form.txtPhone.value == "")
  {
    alert("Please enter a value for the \"Phone Number\" field.");
    Form.txtPhone.focus();
    return (false);
  }
   if (Form.txtEmail.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    Form.txtEmail.focus();
    return (false);
  }
  return (true);
}

//This function is called when the startUpKitOrder.asp form is submitted.
//It is legacy code that is being re-used in the name of a quick deployment of the new site. march 2003.  
function validateInfo(Form)
{

  if (Form.txtFName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    Form.txtFName.focus();
    return (false);
  }
  
  if (Form.txtLName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    Form.txtLName.focus();
    return (false);
  }

if (Form.txtAddress.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    Form.txtAddress.focus();
    return (false);
  }
  
  if (Form.txtCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    Form.txtCity.focus();
    return (false);
  }

if (Form.txtZip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    Form.txtZip.focus();
    return (false);
  }

if (Form.txtPhone.value == "")
  {
    alert("Please enter a value for the \"Phone\" field.");
    Form.txtPhone.focus();
    return (false);
  }

if (Form.txtEmail.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    Form.txtEmail.focus();
    return (false);
  }
return (true);
}	 

//validate the qualification summary form...
//used on popups/qualSummary.asp
<!--
function validateQSumm(theForm)
{

  if (theForm.txtFname.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.txtFname.focus();
    return (false);
  }

  if (theForm.txtLname.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.txtLname.focus();
    return (false);
  }

  if (theForm.txtAddress.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.txtAddress.focus();
    return (false);
  }

  if (theForm.txtCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.txtCity.focus();
    return (false);
  }

  if (theForm.txtState.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.txtState.focus();
    return (false);
  }

  if (theForm.txtZip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.txtZip.focus();
    return (false);
  }

  if (theForm.txtHphone.value == "")
  {
    alert("Please enter a value for the \"Home Phone\" field.");
    theForm.txtHphone.focus();
    return (false);
  }

  if (theForm.txtWphone.value == "")
  {
    alert("Please enter a value for the \"Office Phone\" field.");
    theForm.txtWphone.focus();
    return (false);
  }

  if (theForm.txtEmail.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.txtEmail.focus();
    return (false);
  }

  if (theForm.txtFax.value == "")
  {
    alert("Please enter a value for the \"Fax Number\" field.");
    theForm.txtFax.focus();
    return (false);
  }

 return (true);
}

//validate the qualification summary form...
//used on popups/qualSummary.asp
<!--
function validateCandSummary(theForm)
{

  if (theForm.Contact_FirstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.Contact_FirstName.focus();
    return (false);
  }

  if (theForm.Contact_LastName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.Contact_LastName.focus();
    return (false);
  }

  if (theForm.Contact_Address.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.Contact_Address.focus();
    return (false);
  }

  if (theForm.Contact_City.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.Contact_City.focus();
    return (false);
  }

  if (theForm.Contact_State.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.Contact_State.focus();
    return (false);
  }

  if (theForm.Contact_ZipCode.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.Contact_ZipCode.focus();
    return (false);
  }

  if (theForm.Contact_HomePhone.value == "")
  {
    alert("Please enter a value for the \"Home Phone\" field.");
    theForm.Contact_HomePhone.focus();
    return (false);
  }

  if (theForm.Contact_OfficePhone.value == "")
  {
    alert("Please enter a value for the \"Office Phone\" field.");
    theForm.Contact_OfficePhone.focus();
    return (false);
  }

  if (theForm.Contact_Email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.Contact_Email.focus();
    return (false);
  }

  if (theForm.Contact_FaxNumber.value == "")
  {
    alert("Please enter a value for the \"Fax Number\" field.");
    theForm.Contact_FaxNumber.focus();
    return (false);
  }

 return (true);
}
//-->

//This function is called when the Proactive Job Search form is submitted.
//It is legacy code that is being re-used in the name of a quick deployment of the new site. march 2003.  
<!--
function validateProactiveContact(frmProactiveSignUp)
{

  if (frmProactiveSignUp.txtName.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    frmProactiveSignUp.txtName.focus();
    return (false);
  }
  
if (frmProactiveSignUp.txtAddress.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    frmProactiveSignUp.txtAddress.focus();
    return (false);
  }
  
  if (frmProactiveSignUp.txtCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    frmProactiveSignUp.txtCity.focus();
    return (false);
  }

if (frmProactiveSignUp.txtZip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    frmProactiveSignUp.txtZip.focus();
    return (false);
  }

if (frmProactiveSignUp.txtPhone.value == "")
  {
    alert("Please enter a value for the \"Phone\" field.");
    frmProactiveSignUp.txtPhone.focus();
    return (false);
  }

if (frmProactiveSignUp.txtEmail.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    frmProactiveSignUp.txtEmail.focus();
    return (false);
  }
return (true);
}	 
//-->

//validate the qualification summary form...
//used on popups/qualSummary.asp
<!--
function validateQSummRes(theForm)
{
	var str= theForm.txtEmail.value
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

  if (theForm.txtFName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.txtFName.focus();
    return (false);
  }

  if (theForm.txtLName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.txtLName.focus();
    return (false);
  }

  if (theForm.txtAddress1.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.txtAddress1.focus();
    return (false);
  }

  if (theForm.txtCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.txtCity.focus();
    return (false);
  }

  if (theForm.txtState.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.txtState.focus();
    return (false);
  }

  if (theForm.txtZip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.txtZip.focus();
    return (false);
  }

  if (theForm.txtPhone.value == "")
  {
    alert("Please enter a value for the \"Home Phone\" field.");
    theForm.txtPhone.focus();
    return (false);
  }
  
  

  if (theForm.txtFax.value == "")
  {
    alert("Please enter a value for the \"Fax Number\" field.");
    theForm.txtFax.focus();
    return (false);
  }
  
	if (filter.test(str))
		return (true);
	else
	{
		alert("Please enter a value for the \" Email address\" field.");
		return (false);
	}
 return (true);
}