function display1()
{
        alert("Hi1");
}


  function validate_form2(thisform)
  {
        with (thisform)
        {
                if (validate_required(jobtitle,"Job Title must be filled out!")==false)
                        {jobtitle.focus();return false;}
                if (validate_required(companyname,"Company name must be filled out!")==false)
                        {companyname.focus();return false;}
                if (validate_required(jobdescription,"Job description must be filled out!")==false)
                {jobdescription.focus(); return false}
                loc = validateLocation();
                switch(loc) {
                    case 1:  alert("Province must be filled out!");
                             document.postoffer.canadawide.focus();                                                                                       return false;                                                                                         	      case 2:  alert("City must be filled out!");
                	     document.postoffer.city.focus();
                	     return false;
                	     break;
                    case 3:  alert("The new city must be filled out!");
                             document.forms["postoffer"].elements["othercity"].focus();
                             return false;
                	     break;
                }
                if (newcity.value == "") {
                        alert("The city you are trying to add already exists!")
                        othercity.focus();
                        return false;
                }
                if (validate_required(jobdescription,"Job description must be filled out!")==false)
                        {jobdescription.focus(); return false}
        }
  }

  function validateLocation()
  {
	//alert("Hi from offer.js:validateLocation()");
        if (!document.postoffer.canadawide.checked ) {
                if (document.postoffer.province.value == 0) {
                        return 1;
                }
                else if (document.postoffer.city.value == 0) {
                        return 2;
                }
                else if ((document.postoffer.city.value == "-1") && ((document.forms["postoffer"].elements["othercity"].value == "") || (document.forms["postoffer"].elements["othercity"].value == null))) {
                        return 3;
                }
        }
  }

  function checkChange()
  {
    var _F=document.postoffer;
        if (_F.canadawide.checked) {
                document.getElementById("location").style.display="none";
        }
        else document.getElementById("location").style.display="block";
  }

  function otherCity(cityValue)
  {
        var _F=document.postoffer;
        if (cityValue == -1){
                document.getElementById("othercity").style.display="block";
        }
        else document.getElementById("othercity").style.display="none";
  }

  function loading()
  {
                document.forms["postoffer"].elements["province"].value = 0;
  }

