<!--
/******************************************************************************
  JavaScript Library for R.W.Beck Inc. Website (http://www.rwbeck.com)

******************************************************************************/

///////////////////////////////////////////////////////////////////////////////
// GENERAL SITE-WIDE FUNCTIONS                                               //
///////////////////////////////////////////////////////////////////////////////

//New Popup Window
function popWindow(myURL, winH){
  myWindow = this.window.open(myURL,"myWindow","menubar=0, location=0, resizable=0, scrollbars=0, width=640, height=" + winH);
  myWindow.moveTo((screen.width/2)-320,(screen.height/2)-(winH/2));

}

///////////////////////////////////////////////////////////////////////////////
// SEARCH RELATED FUNCTIONS                                                  //
///////////////////////////////////////////////////////////////////////////////

// Handle OnFocus Event for the Search Text Box
function cleanSearch(){
  if(document.fSearch.txt_search.value == 'search...'){
    document.fSearch.txt_search.value = '';
  }
}

///////////////////////////////////////////////////////////////////////////////
// VALIDATION FUNCTIONS                                                      //
///////////////////////////////////////////////////////////////////////////////

//VALIDATION FOR REFERRALS PAGE [../careers/referrals.htm]
function refVal(){
  var iFSubmit = 0;
  var sMsg = "Please review the following fields before continuing:\n";

  //Check Field Values
  if(document.form1.txt_empName.value == ""){
    iFSubmit = 1;
    sMsg += "\n   - Your Full Name";
  }
  if(document.form1.txt_empEmail.value == ""){
    iFSubmit = 1;
    sMsg += "\n   - Your Email Address";
  }
  if(document.form1.txt_empPhone.value == ""){
    iFSubmit = 1;
    sMsg += "\n   - Your Phone Number";
  }
  if(document.form1.txt_refFirstN.value == ""){
    iFSubmit = 1;
    sMsg += "\n   - Your Referral's First Name";
  }
  if(document.form1.txt_refLastN.value == ""){
    iFSubmit = 1;
    sMsg += "\n   - Your Referral's Last Name";
  }
  if(document.form1.txt_refHomeP.value == ""){
    iFSubmit = 1;
    sMsg += "\n   - Your Referral's Home Phone Number";
  }
  if(document.form1.txt_refWorkP.value == ""){
    iFSubmit = 1;
    sMsg += "\n   - Your Referral's Work Phone Number";
  }
  if(document.form1.txt_refEmail.value == ""){
    iFSubmit = 1;
    sMsg += "\n   - Your Referral's Email Address";
  } 

  //Submit Form If Ready
  if(iFSubmit == 0){
    document.form1.submit();
  }
  else{
    alert(sMsg);
  }
}




//-->