function gObj(obj) {var theObj;if(document.all){if(typeof obj=="string"){return document.all(obj);}else{return obj.style;}}if(document.getElementById){if(typeof obj=="string"){return document.getElementById(obj);}else{return obj.style;}}return null;}
function trimAll(sString){while (sString.substring(0,1) == ' '){sString = sString.substring(1, sString.length);}while (sString.substring(sString.length-1, sString.length) == ' '){sString = sString.substring(0,sString.length-1);} return sString;}

var jcArraykey = new Array(200,206,210,213,216,220,225,230,235,240,245,250,255,260,265,270,275,280,285,290,400,403,406,410,413,416,418,420,423,426,430,433,436,440,443,446,450,453,456,460,465,470,475,480,485,490,600,603,606,610,613,616,620,623,626,630,633,636,640,643,646,650,653,656,660,663,666,670,672,674,676,678,680,682,684,686,688,690,693,800,810,815,820,825,830,835,840,845,850,855,860,865,870,875,880,885,890);
var jcArray = new Array("Allied Health","Clinical, Medical Assistant","Dental","Dietetics, Nutrition","Emergency Medicine","Laboratory","Optometry, Ophthalmology","Pharmacy","Physician Assistant","Psychology, Mental Health","Radiology, Imaging","Research","Social Work","Speech Language Pathology","Technologist, Technician","Therapy - Occupational","Therapy - Physical","Therapy - Respiratory","Therapy - Others","Other Allied Health","Nursing","Advanced Practice","LPN, LVN","Nurse Assistants","Nurse Education","Nurse Management","RN - Any Specialties","RN - Acute Care: Cardiology","RN - Acute Care: Dialysis","RN - Acute Care: Medicine/Surgery","RN - Acute Care: Oncology","RN - Acute Care: Radiology","RN - Acute Care: Rehabilitation","RN - Acute Care: Others","RN - Ambulatory Care","RN - Community Health","RN - Critical Care","RN - Emergency Medicine","RN - Geriatrics","RN - Operating Room","RN - Pediatric","RN - Psychiatry","RN - Women's Health","RN - Others","Travel Nurse","Other Nursing","Medical Doctor","Allergy, Asthma & Immunology","Anesthesiology","Cardiology","Critical Care","Dermatology","Emergency Medicine","Endocrinology, Urology, Nephrology","Epidemiology, Infectious Disease","Family Medicine, General Practice","Gastroenterology","Internal Medicine","Neurology","Obstetrics & Gynecology","Occupational, Environmental Medicine","Oncology, Hematology","Ophthalmology","Otolaryngology","Pathology","Pediatrics","Physical Medicine & Rehabilitation","Psychiatry","Pulmonary Medicine","Radiology","Rheumatology","Surgery - Cardiovascular, Thoracic","Surgery - Head and Neck","Surgery - Neurological","Surgery - Oral & Maxillofacial","Surgery - Orthopedic","Surgery - Transplant","Surgery - Others","Other Medical Doctor","Service, Admin, Others","Administration, Management","Support Services, Clerk","Education, Training","Environmental Services","Executive","Finance, Accounting","Food & Nutritional Services","Home Health Aide","Human Resource, Receptionist","Information Technology, System","Medical Records & Processing","Patient, Customer Service","Quality Assurance","Sales, Marketing, Development","Secretaries, Assistant","Transport, Security, Drivers","Other Service & Admin");

function rsf(){
	var args = rsf.arguments;
	var frM = document.hsF;
	if (args.length>1){
		if (args[0]=='action'){
			eval("frM."+args[0]+"=args[1];");
		}else{
			eval("frM."+args[0]+".value=args[1];");
		}
		if (args.length>3) eval("frM."+args[2]+".value=args[3];");
		if (args.length>5) eval("frM."+args[4]+".value=args[5];");
		frM.submit();
	}
}
function getJobNum(catID){
	catID = parseInt(catID);
	for (ij=0;ij<gcDA.length;ij++){
		if (catID == gcDA[ij][1]) return " ("+gcDA[ij][0]+")";
	}
	return " (0)";
}
function setJobCat(catval,curVal){
	ciHTML = '';
	main ="<table border=0 cellspacing=0 cellpadding=0 class=text width=166><tr><td valign=top>";
	suboff ="<table border=0 cellspacing=0 cellpadding=0 class=smalltext width=166><tr><td width=12 valign=top><img src=/img/dtc.gif></td><td width=154>";
	subon ="<table border=0 cellspacing=0 cellpadding=0 class=smalltext width=166><tr><td width=12 valign=top><img src=/img/sr.gif></td><td width=154>";
	mainCat = catval - catval%100;

	ciHTML = ciHTML + "<b>Job categories:</b><table width=180 border=0 cellspacing=0 cellpadding=0><tr><td width=14>&nbsp;</td><td width=166>";
	if (curVal<100){
		ciHTML = ciHTML + main + "<b>All</b> (" + allCT + ") <img src=/img/sr.gif></td></tr></table>";
	}else{
		ciHTML = ciHTML + main + "<b><a href='#' onClick=\"rsf('c',0)\">All</a></b> (" + allCT + ")</td></tr></table>";
	}
	for (i=0;i<jcArraykey.length;i++){
		if ((jcArraykey[i]%100)>0){
			curMainCat = jcArraykey[i] - jcArraykey[i]%100;
			if (mainCat==curMainCat){
				if (catval==jcArraykey[i]){
					ciHTML = ciHTML + subon + "<b>" + jcArray[i] + "</b>"+getJobNum(jcArraykey[i])+"</td></tr></table>";
				}else{
					ciHTML = ciHTML + suboff + "<a href='#' onClick=\"rsf('c',"+jcArraykey[i]+")\">" + jcArray[i] + "</a>"+getJobNum(jcArraykey[i])+"</td></tr></table>";
				}
			}
		}else{
			if (mainCat==jcArraykey[i]){
				ciHTML = ciHTML + main + "<b><a href='#' onClick=\"setJobCat(0,"+curVal+");return false;\">" + jcArray[i] + "</a></b>"+getJobNum(jcArraykey[i])+"</td></tr></table>";
				if (curVal==jcArraykey[i]){
					ciHTML = ciHTML + subon + "<b>" + jcArray[i] + " (all)</b>"+getJobNum(jcArraykey[i])+"</td></tr></table>";
				}else{
					ciHTML = ciHTML + suboff + "<a href='#' onClick=\"rsf('c',"+jcArraykey[i]+")\">" + jcArray[i] + " (all)</a>"+getJobNum(jcArraykey[i])+"</td></tr></table>";
				}
			}else{
				ciHTML = ciHTML + main + "<b><a href='#' onClick=\"setJobCat("+jcArraykey[i]+","+curVal+");return false;\">" + jcArray[i] + "</a></b>"+getJobNum(jcArraykey[i])+"</td></tr></table>";
			}
		}
	}
	ciHTML = ciHTML + "</td></tr></table>";
	gObj("jobcat").innerHTML = ciHTML;
}


postedinA = new Array();
postedinA[0] = new Array(0, "Posted within");
postedinA[1] = new Array(1, "1 day");
postedinA[2] = new Array(3, "3 days");
postedinA[3] = new Array(7, "7 days");
postedinA[4] = new Array(14, "14 days");
postedinA[5] = new Array(30, "30 days");

positiontpA = new Array();
positiontpA[0] = new Array(-2, "Position type");
positiontpA[1] = new Array(1, "Full-time");
positiontpA[2] = new Array(2, "Part-time");
positiontpA[3] = new Array(3, "Per diem");
positiontpA[4] = new Array(4, "Per visit");
positiontpA[5] = new Array(5, "Temporary");
positiontpA[6] = new Array(6, "Contract");
positiontpA[7] = new Array(7, "On call");
positiontpA[8] = new Array(8, "Other");
positiontpA[9] = new Array(-1, "Not Specified");

compensationpA = new Array();
compensationpA[0] = new Array(-2, "Compensation per hour");
compensationpA[1] = new Array(1, "< 10");
compensationpA[2] = new Array(2, "10 - 15");
compensationpA[3] = new Array(3, "15 - 25");
compensationpA[4] = new Array(4, "25 - 35");
compensationpA[5] = new Array(5, "35 - 50");
compensationpA[6] = new Array(7, "50 - 70");
compensationpA[7] = new Array(10, "70 - 100");
compensationpA[8] = new Array(15, "100 - 150");
compensationpA[9] = new Array(20, "> 150");
compensationpA[10] = new Array(-1, "Not Specified");

experiencepA = new Array();
experiencepA[0] = new Array(-2, "Experience required");
experiencepA[1] = new Array(0, "Not Required");
experiencepA[2] = new Array(1, "At Least 1 Year");
experiencepA[3] = new Array(3, "At Least 3 Years");
experiencepA[4] = new Array(5, "At Least 5 Years");
experiencepA[5] = new Array(10, "At Least 10 Years");
experiencepA[6] = new Array(15, "At Least 15 Years");
experiencepA[7] = new Array(-1, "Not Specified");

degreepA = new Array();
degreepA[0] = new Array(-2, "Degree required");
degreepA[1] = new Array(1, "High School");
degreepA[2] = new Array(2, "Associates");
degreepA[3] = new Array(3, "Bachelor");
degreepA[4] = new Array(4, "Master or Equivalent");
degreepA[5] = new Array(5, "MD, Doctoral, or Equivalent");
degreepA[6] = new Array(-1, "Not Specified");

levelpA = new Array();
levelpA[0] = new Array(-2, "Medical doctor job level");
levelpA[1] = new Array(1, "Chief or Director");
levelpA[2] = new Array(2, "Fellow");
levelpA[3] = new Array(3, "Physician");
levelpA[4] = new Array(4, "Research");
levelpA[5] = new Array(5, "Residency");
levelpA[6] = new Array(6, "Others");
levelpA[7] = new Array(-1, "Not Specified");

orgtypepA = new Array();
orgtypepA[0] = new Array(-2, "Company or hospital type");
orgtypepA[1] = new Array(1, "Direct Employer");
orgtypepA[2] = new Array(2, "Staffing Firm/Recruiters");
orgtypepA[3] = new Array(-1, "Not Specified");

function setrefine(refid, fmrefid, refval, expand){
	riHTML = '';
	eval("refarray="+refid+"A;");
	if (((refval<=refarray[0][0])&&(expand==1))||(expand==0)){
		riHTML=riHTML+"<a href='#' onClick=\"setrefine('"+refid+"','"+fmrefid+"',"+refval+",2);return false;\"><img src='/img/tr.gif' border=0><b>"+refarray[0][1]+"</b></a>";
	}else{
		riHTML=riHTML+"<a href='#' onClick=\"setrefine('"+refid+"','"+fmrefid+"',"+refval+",0);return false;\"><img src='/img/td.gif' border=0><b>"+refarray[0][1]+"</b></a>";
		if (refval<=refarray[0][0]){
			riHTML=riHTML+"<br><img src=/img/1.gif width=14 height=1><img src=/img/sr.gif><b>All</b>";
		}else{
			riHTML=riHTML+"<br><img src=/img/1.gif width=23 height=1><a href='#' onClick=\"rsf('"+fmrefid+"',"+refarray[0][0]+");return false;\">All</a>";
		}
		for (i=1;i<refarray.length;i++){
			if (refval==refarray[i][0]){
				riHTML=riHTML+"<br><img src=/img/1.gif width=14 height=1><img src=/img/sr.gif><b>"+refarray[i][1]+"</b>";
			}else{
				riHTML=riHTML+"<br><img src=/img/1.gif width=23 height=1><a href='#' onClick=\"rsf('"+fmrefid+"',"+refarray[i][0]+");return false;\">"+refarray[i][1]+"</a>";
			}
		}
	}
	gObj(refid).innerHTML = riHTML;
}