function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function show(element, todo)
{
if (todo=='show')
{
document.getElementById(element).style.visibility = 'visible';
switch(element)
{
case "1":
document.getElementById(element).innerHTML = '<p><strong>Westmoreland County Human Resources Association</strong><br>Annual Conference<br>May 11th - St. Vincent College, Latrobe PA</p>';
break;
case "2":
document.getElementById(element).innerHTML = '<p><strong>Society for Human Resource Management</strong><br>National Conference<br>June 25th-28th - Washington DC Convention Center, Washington DC</p>';
break;
case "3":
document.getElementById(element).innerHTML = '<p><strong>Pittsburgh Human Resources Association</strong><br>"The Power of HR" Annual Conference<br>October 9th-10th - The David L. Lawrence Convention Center - Pittsburgh, PA</p>';
break;
case "4":
document.getElementById(element).innerHTML = '<p><strong>Ohio Society for Human Resource Management</strong><br>Annual Conference<br>September 13th-15th - Sawmill Creek Resort - Huron, OH</p>';
break;
}
}
else
{
document.getElementById(element).style.visibility = 'hidden';
document.getElementById(element).innerHTML = '';
}

}

function submit_form()  {

	var fname = document.getElementById("fname").value;
	var lname = document.getElementById("lname").value;
	var phone = document.getElementById("phone").value;
	var email = document.getElementById("email").value;
	var alert = "";
	var showWarning = 0;

	if(fname.length < 2) {
	alert = 'You must provide your first name to submit this form' ;
	showWarning = 1;
	document.getElementById("fname").focus();
	document.getElementById("fnamefield").style.fontWeight = 'bold';
	document.getElementById("fnamefield").style.backgroundColor = '#FFFFCC';
	} else
	if(lname.length < 2) {
	alert = 'You must provide your last name to submit this form';
	document.getElementById("lname").focus();
	document.getElementById("lnamefield").style.fontWeight = 'bold';
	document.getElementById("lnamefield").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
	if(phone.length < 10) {
	alert = 'You must provide a phone number to submit this form';
	document.getElementById("phone").focus();
	document.getElementById("phonefield").style.fontWeight = 'bold';
	document.getElementById("phonefield").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
	if(email.length < 6) {
	alert = 'You must provide a valid email address to submit this form';
	document.getElementById("email").focus();
	document.getElementById("emailfield").style.fontWeight = 'bold';
	document.getElementById("emailfield").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	}
	if(showWarning == 1)
	{
	window.alert(alert);
	}
	else
	{
		document.getElementById("requestform").action="./applicationsent.php";
		document.getElementById("requestform").submit();
		}
}

function submit_form_contactyou()  {

	var name = document.getElementById("name").value;
	var company = document.getElementById("company").value;
	var email = document.getElementById("email").value;
        var phone = document.getElementById("phno").value;
        var addr = document.getElementById("addyline1").value;
        var city = document.getElementById("city").value;
        var state = document.getElementById("state").value;
        var zip = document.getElementById("zip").value;
	var alert = "";
	var showWarning = 0;

	if(name.length < 2) {
	alert = 'You must provide your name to submit this form' ;
	showWarning = 1;
	document.getElementById("name").focus();
	document.getElementById("namefield").style.fontWeight = 'bold';
	document.getElementById("namefield").style.backgroundColor = '#FFFFCC';
	} else
	if(company.length < 2) {
	alert = 'You must provide your company name to submit this form';
	document.getElementById("company").focus();
	document.getElementById("companyfield").style.fontWeight = 'bold';
	document.getElementById("companyfield").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(addr.length < 5) {
	alert = 'You must provide an address to submit this form';
	document.getElementById("addyline1").focus();
	document.getElementById("addyline1").style.fontWeight = 'bold';
	document.getElementById("addyline1").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(city.length < 1) {
	alert = 'You must provide an address to submit this form';
	document.getElementById("city").focus();
	document.getElementById("city").style.fontWeight = 'bold';
	document.getElementById("city").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(state < 2) {
	alert = 'You must provide an address to submit this form';
	document.getElementById("state").focus();
	document.getElementById("state").style.fontWeight = 'bold';
	document.getElementById("state").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(zip < 5) {
	alert = 'You must provide an address to submit this form';
	document.getElementById("zip").focus();
	document.getElementById("zip").style.fontWeight = 'bold';
	document.getElementById("zip").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(phone.length < 10) {
	alert = 'You must provide a phone number to submit this form';
	document.getElementById("phno").focus();
	document.getElementById("phno").style.fontWeight = 'bold';
	document.getElementById("phno").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(email.length < 6) {
	alert = 'You must provide an email address to submit this form';
	document.getElementById("email").focus();
	document.getElementById("emailfield").style.fontWeight = 'bold';
	document.getElementById("emailfield").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} 

	if(showWarning == 1)
	{
          window.alert(alert);
	}
	else
	 {
		document.getElementById("requestform").action="./contactmerequest.php";
		document.getElementById("requestform").submit();
	}

}

function submit_form_inforequest()  {


	var name = document.getElementById("name").value;
	var company = document.getElementById("company").value;
	var email = document.getElementById("email").value;
        var phone = document.getElementById("phno").value;
        var addr = document.getElementById("addyline1").value;
        var city = document.getElementById("city").value;
        var state = document.getElementById("state").value;
        var zip = document.getElementById("zip").value;

	
	var alert = "";
	var showWarning = 0;

	if(name.length < 2) {
	alert = 'You must provide your name to submit this form' ;
	showWarning = 1;
	document.getElementById("name").focus();
	document.getElementById("namefield").style.fontWeight = 'bold';
	document.getElementById("namefield").style.backgroundColor = '#FFFFCC';
	} else
	if(company.length < 2) {
	alert = 'You must provide your company name to submit this form';
	document.getElementById("company").focus();
	document.getElementById("companyfield").style.fontWeight = 'bold';
	document.getElementById("companyfield").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(addr.length < 5) {
	alert = 'You must provide an address to submit this form';
	document.getElementById("addyline1").focus();
	document.getElementById("addyline1").style.fontWeight = 'bold';
	document.getElementById("addyline1").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(city.length < 1) {
	alert = 'You must provide an address to submit this form';
	document.getElementById("city").focus();
	document.getElementById("city").style.fontWeight = 'bold';
	document.getElementById("city").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(state < 2) {
	alert = 'You must provide an address to submit this form';
	document.getElementById("state").focus();
	document.getElementById("state").style.fontWeight = 'bold';
	document.getElementById("state").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(zip < 5) {
	alert = 'You must provide an address to submit this form';
	document.getElementById("zip").focus();
	document.getElementById("zip").style.fontWeight = 'bold';
	document.getElementById("zip").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(phone.length < 10) {
	alert = 'You must provide a phone number to submit this form';
	document.getElementById("phno").focus();
	document.getElementById("phno").style.fontWeight = 'bold';
	document.getElementById("phno").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} else
        if(email.length < 6) {
	alert = 'You must provide an email address to submit this form';
	document.getElementById("email").focus();
	document.getElementById("emailfield").style.fontWeight = 'bold';
	document.getElementById("emailfield").style.backgroundColor = '#FFFFCC';
	showWarning=1;
	} 

	if(showWarning == 1)
	{
          window.alert(alert);
	}
	else
	 {

          document.getElementById("requestform").action="./send_request.php";
          document.getElementById("requestform").submit();

	}

}

function submit_form_infosent()  {

	var name = requestform.txtname.value;
	var company = requestform.txtcompany.value;
	var phone = requestform.txtphno.value;
	var alert = "";
	var showWarning = 0;

	if(name.length < 2) {
	alert = 'You must provide your name to submit this form' ;
	showWarning = 1;
	requestform.txtname.focus();
	} else
	if(company.length < 2) {
	alert = 'You must provide your company name to submit this form';
	requestform.txtcompany.focus();
	showWarning=1;
	} else
	if(phone.length < 10) {
	alert = 'You must provide your phone number to submit this form';
	requestform.txtphno.focus();
	showWarning=1;
	}
	if(showWarning == 1)
	{
	window.alert(alert);
	}
	else
	 {

		requestform.action="./send_request.php";
		requestform.submit();

	}
}
  
function show(elname){

if(document.getElementById(elname).style.display=='none')
{
document.getElementById(elname).style.display='block';
}
else
{
document.getElementById(elname).style.display='none';
}

}
