// JavaScript Document
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//---------------   END LOCALIZEABLE   ---------------

function toggle( targetId,targetA ){
	if (document.getElementById){
		target = document.getElementById( targetId );
		target_a = document.getElementById( targetA );
		if (target.style.display == "none"){
			target.style.display='block';
			document.getElementById( targetA ).setAttribute('class','collapse');
			document.getElementById( targetA ).setAttribute('className','collapse');
			} else {
			target.style.display='none';
			document.getElementById( targetA ).setAttribute('class','expand');
			document.getElementById( targetA ).setAttribute('className','expand');
			}
		}
	}

function showEventDiv() {
	var holder = document.job_form.website;
	var changeV = holder.options[holder.selectedIndex].value;
	switch (changeV) {
		case "9": // Monster
		document.getElementById('monster_div').style.display='block';
		break;
	}
}

function showMe( targetId,targetA ){
	if (document.getElementById){
		target = document.getElementById( targetId );
		target_a = document.getElementById( targetA );
			target.style.display='block';
			document.getElementById( targetA ).setAttribute('class','collapse');
			document.getElementById( targetA ).setAttribute('className','collapse');
		}
	}

function hideMe( targetId,targetA ){
	if (document.getElementById){
		target = document.getElementById( targetId );
		target_a = document.getElementById( targetA );
			target.style.display='none';
			document.getElementById( targetA ).setAttribute('class','expand');
			document.getElementById( targetA ).setAttribute('className','expand');
		}
	}

function showThis( targetId ){
	if (document.getElementById){
		target = document.getElementById( targetId );
		document.forms['form1'].pf_fee.options[0].value = '-1';
		document.forms['form1'].pf_agent.options[0].value = '-1';
		document.forms['form1'].pf_resume.options[0].value = '-1';
		if (target.style.display == "none"){
			target.style.display='block';
			} 
		}
	}

function showAssoc( targetId ){
	if (document.getElementById){
		target = document.getElementById( targetId );
		document.forms['form1'].pf_assoc_fee.options[0].value = '-1';
		if (target.style.display == "none"){
			target.style.display='block';
			} 
		}
	}

function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}

function showRows(){
	for ( var i=0; i < arguments.length; i++ ) {
			$(arguments[i]).style.display = 'block';
	}
}

function hideRows(){
	for ( var i=0; i < arguments.length; i++ ) {
			$(arguments[i]).style.display = 'none';
	}
}

function showLogin(xLeft,yTop,pod) {
	if (document.getElementById){
		target = document.getElementById( pod );
		if (target.style.display == "none"){
			target.style.left=xLeft+ 'px';
			target.style.top=yTop+ 'px';
			target.style.display='block';
			} else {
			target.style.display='none';
		}
	}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.title; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }

function validateDropdown(Formname,Item){
	if(document.Formname.Item.selectedIndex==0)
	{
		alert("Please select an Item.");
		document.Formname.Item.focus();
		return false;
	}
	return true;
}
//-->
