<!--
root_dir = '/';

var leader_names= new Array();
var leader_bios= new Array();

leader_names['jim']="Jim Goodmiller";
leader_bios['jim']='Jim is co-founder, Chairman and President of illuma.'+
'<br /><br />' +
'Prior to launching illuma, Jim was the Director of Recruiting for Digital Consulting and Software Services, a leading provider of Outsourced IT Solutions for Fortune 500 companies.' +
'<br /><br />' +
'Jim spent 9 years with Allegis Group, the largest privately held technical staffing organization in the US.  His tenure included serving as Director of Regional Operations, where he was responsible for operations in 9 states and over $200 million in revenue.  Jim is a member of the Human Resources Management Association of Chicago and is actively involved in a number of local non-profits and charities.' +
'<br /><br />' +
'Jim graduated with a B.S. in Journalism from the University of Kansas.';

leader_names['adam']="Adam Robinson";
leader_bios['adam']='Adam is co-founder and President of illuma.'+
'<br /><br />' +
'Adam has 12 years of experience in the recruitment services industry, beginning his career with the largest privately held staffing organization in the United States.  During his tenure there, he managed the delivery of recruiting services to Fortune 500 companies including IBM, AT&T, Monsanto, and ADP.' +
'<br /><br />' +
'Before launching illuma, Adam served as Senior Director, Professional Services at Click Commerce, Inc., a NASDAQ-listed provider of collaborative commerce and RFID technologies, where he had responsibility for delivering consulting services across a $30M software implementation portfolio.' +
'<br /><br />' +
'Adam serves on the Board of Advisors for the Coleman Entrepreneurship Center at DePaul University, the Board of Directors of the Chicago Chapter of the Entrepreneurs\' Organization (EO) and is a member the Executive\'s Club of Chicago, the Young Professionals of Chicago and the Young Executives Club.  In 2008, Adam helped to lead the successful launch of the Entrepreneurs\' Organization\'s "<a href=http://www.accelerator.eonetwork.org target=_blank>Accelerator Program</a>,"  a non-profit program aimed helping entrepreneurs break the $1M revenue barrier.  To date, over 300 early-stage companies have participated in this program across the United States.' +
'<br /><br />' +
'Adam graduated with a Bachelor of Arts from the University of Illinois at Urbana-Champaign and received his MBA from DePaul University.';

leader_names['derek']="Derek Wright";
leader_bios['derek']='Derek is a Principal Consultant with illuma, responsible for all aspects of Business Development.'+
'<br /><br />' +
'Prior to joining illuma, Derek worked as a consultant for GCG Financial, designing and implementing employee benefit programs for mid-market companies in Chicago.  He began his HR career as a regional training and development director for a large, global insurance company.' +
'<br /><br />' +
'Derek is a member of the Society for Human Resource Management and the Human Resource Management Association of Chicago, and is proud to be involved with MS Society, Breast Cancer Society, Leukemia Society, Alzheimer�s Association and the United Way.  Derek is a board member of the UCP of Will County, the Chicagoland Business Leadership Network, and a founding member of the Rotary Club of Shorewood.' +
'<br /><br />' +
'Derek graduated with a B.S. from the University of Illinois at Urbana-Champaign.';

leader_names['ravi']="Ravi Subramanian";
leader_bios['ravi']='Ravi Subramanian is the Director of Strategy & Development at illuma, where he is responsible for the development and implementation of Enterprise Recruitment Management (ERM) initiatives that enable success across illuma�s client base.'+
'<br /><br />' +
'Ravi brings over 20 years of international experience in building and leading operations in a variety of areas such as staffing, human resources, program management and business process improvement in the consulting, finance, healthcare, information technology, education and manufacturing industries.' +
'<br /><br />' +
'Prior to joining illuma, Ravi managed outsourced recruitment operations on behalf of Fortune 1000 companies including GE, Freddie Mac, Coram Healthcare, YOH HR Solutions and Kelly IT Resources (HR First). In addition to Staffing and HR, previous roles involved Multi-Site Operations, Sales & Marketing and Plant Operations. His international experience includes work assignments in Asia, Africa, Europe and North America (U.S. and Canada).' +
'<br /><br />' +
'Ravi is actively involved with and makes regular contributions to the Human Capital Institute (HCI), HRMAC, Electronic Recruiters Exchange (ERE), Employment Management Association (EMA) and the Society of Human Resources (SHRM).'+
'<br /><br />' +
'Ravi has an undergraduate degree in Statistics, a Diploma in Systems Management and an MBA in Marketing & Strategic Management.';

leader_names['al']="Al Herbach";
leader_bios['al']='Al Herbach is Chief Operating Officer of illuma, responsible for leading illuma�s Delivery and Professional Services teams, its financial operations and its technology infrastructure.' +
'<br /><br />' +
'Prior to joining illuma, Al served as Managing Director of Client Services for Callidus Software, a leading Enterprise Incentive Management software firm. He has worked with two early stage firms�Systems Start-Up, Ltd., an ERP consulting firm, which he grew from four consultants to over 50 and sold to Computer Associates in 1997. In 2001, Al founded Strategiz, a marketing services firm, specializing in strategy and fundraising for non-profit organizations.' +
'<br /><br />' +
'Mr. Herbach holds a BS degree in Computer Science from Michigan State University and an MBA in Entrepreneurship from DePaul University. He serves on the Board of Advisors for the Coleman Entrepreneurship Center at DePaul University and the Board of Directors for H. P. Schmaltz and Company.';

leader_names['david']="David Mulligan";
leader_bios['david']='David is Chief Executive Officer of illuma.' +
'<br /><br />' +
'David has over 20 years of experience leading successful service businesses.  Prior to joining illuma, David was the co-founder and former Chairman and CEO of First Commonwealth, Inc., a leading dental insurance company. First Commonweath was founded in 1987 as a venture-funded start-up, and was twice recognized as one of the fastest growing firms nationally by Inc magazine. The company had a successful public offering 1995 and was subsequently recognized by Forbes as one of the top 200 small cap public companies. Prior to that, David managed the successful start-up of a health maintenance organization based in Virginia.' +
'<br /><br />' +
'David holds a Bachelor of Arts degree from the University of Rochester in New York and an MBA from the Samuel Johnson School of Business at Cornell University. He serves as Senior Microfinance Advisor for Kiva.org, the world\'s first person-to-person microlending platform. He is an inductee in the Illinois Entrepreneur Hall of Fame, a founder and past Chairman of the National Association of Dental Plans and a member of the Chicago chapter of the World Presidents Organization.  Mr. Mulligan has also been listed in the Crain\'s Business Magazine\'s annual list of  "Who\'s Who in Chicago Business."' ;



function leaderOnClick ( leader ) {
	$('leader').show();
	$('leader_on_display').src='../images/EL_'+leader+'.gif';
	$('content_header').update(leader_names[leader]);
	$('leader_bio').update(leader_bios[leader]);
}

function linkSaveWin(windowType,windowState) {
	//clear windows first
	Element.hide('emailLink');
	//now display appropriate window
	if(windowState == 1) { new Effect.Appear(windowType, {duration: 0.5}) 
	} else {
	new Effect.Fade(windowType, {duration: 0.5}) 	
	}
}

function submitEmailLinkForm ( ) {
	
	form = document.forms['fm_email_link'];
	
	if (form.from_name.value == "") {
	alert( "Please enter your name.");
	form.from_name.focus();
	return false;
	}
	if (form.from_email.value == "") {
	alert( "Please enter your email.");
	form.from_email.focus();
	return false;
	}
	if (form.to_email.value == "") {
	alert( "Please enter your friend's email.");
	form.to_email.focus();
	return false;
	}
		
	var opt = {
		// Use POST
		method: 'post',
		// Send this lovely data
		postBody: Form.serialize(form),
		// Handle successful response
		onSuccess: function(t) {
			if (t.responseText == 0) {
				// success
				alert( "link sent successfully." );
				linkSaveWin('savelink');
			} else if (t.responseText == 1) {
				// password doesn't match
				alert( "email was not sent." );
				
			}
			
		},
		// Handle 404
		on404: function(t) {
			alert('Error 404: location "' + t.statusText + '" was not found.');
		},
		// Handle other errors
		onFailure: function(t) {
			alert('Error ' + t.status + ' -- ' + t.statusText);
		}
	}

	Element.hide('el_fm_steps');
	Element.show('el_fm_waiting');
	new Ajax.Request( root_dir + 'email_page.php', opt);

	Element.hide('sl_fm_waiting');
	Element.show('el_fm_steps');

	return true;
}


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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function mmLoadMenus() {
  if (window.mm_menu_0403110541_0) return;
  window.mm_menu_0403110541_0 = new Menu("root",116,30,"Helvetica, Verdana, Arial, sans-serif",14,"#666666","#D99318","#eeeeee","#eeeeee","center","top",1,0,500,-5,0,true,false,true,0,true,true);
  mm_menu_0403110541_0.addMenuItem("Why illuma?","location=root_dir+'who/'");
  mm_menu_0403110541_0.addMenuItem("Our People","location=root_dir+'who/people.php'");
  //mm_menu_0403110541_0.addMenuItem("Our Leadership","location=root_dir+'who/leadership.php'");
   mm_menu_0403110541_0.hideOnMouseOut=true;
   mm_menu_0403110541_0.menuBorder=0;
   mm_menu_0403110541_0.menuLiteBgColor='#ffffff';
   mm_menu_0403110541_0.menuBorderBgColor='#555555';
   mm_menu_0403110541_0.bgColor='#555555';
  window.mm_menu_0403110957_4 = new Menu("root",118,30,"Helvetica, Verdana, Arial, sans-serif",14,"#666666","#D99318","#eeeeee","#eeeeee","center","top",1,0,500,-5,0,true,false,true,0,true,true);
  mm_menu_0403110957_4.addMenuItem("Our Services","location=root_dir+'what/services/'");
  mm_menu_0403110957_4.addMenuItem("How We Deliver","location=root_dir+'what/deliver.php'");
  mm_menu_0403110957_4.addMenuItem("Case Studies","location=root_dir+'what/case_studies.php'");
   mm_menu_0403110957_4.hideOnMouseOut=true;
   mm_menu_0403110957_4.menuBorder=0;
   mm_menu_0403110957_4.menuLiteBgColor='#ffffff';
   mm_menu_0403110957_4.menuBorderBgColor='#555555';
   mm_menu_0403110957_4.bgColor='#555555';
  window.mm_menu_0403110957_1 = new Menu("root",142,30,"Helvetica, Verdana, Arial, sans-serif",14,"#666666","#D99318","#eeeeee","#eeeeee","center","top",1,0,500,-5,0,true,false,true,0,true,true);
  mm_menu_0403110957_1.addMenuItem("Our Core Values","location=root_dir+'culture/core_values.php'");
  mm_menu_0403110957_1.addMenuItem("Join Our Team","location=root_dir+'join/'");
   mm_menu_0403110957_1.hideOnMouseOut=true;
   mm_menu_0403110957_1.menuBorder=0;
   mm_menu_0403110957_1.menuLiteBgColor='#ffffff';
   mm_menu_0403110957_1.menuBorderBgColor='#555555';
   mm_menu_0403110957_1.bgColor='#555555';
  window.mm_menu_0403111123_2 = new Menu("root",140,30,"Helvetica, Verdana, Arial, sans-serif",14,"#666666","#D99318","#eeeeee","#eeeeee","center","top",1,0,500,-5,0,true,false,true,0,true,true);
  mm_menu_0403111123_2.addMenuItem("illuma News &amp; Events","location=root_dir+'news/'");
  //mm_menu_0403111123_2.addMenuItem("Industry Events","location=root_dir+'learning/industry_events.php'");
  mm_menu_0403111123_2.addMenuItem("Links &amp; Resources","location=root_dir+'learning/resources.php'");
   mm_menu_0403111123_2.hideOnMouseOut=true;
   mm_menu_0403111123_2.menuBorder=0;
   mm_menu_0403111123_2.menuLiteBgColor='#ffffff';
   mm_menu_0403111123_2.menuBorderBgColor='#555555';
   mm_menu_0403111123_2.bgColor='#555555';
  window.mm_menu_0403111227_3 = new Menu("root",140,30,"Helvetica, Verdana, Arial, sans-serif",14,"#666666","#D99318","#eeeeee","#eeeeee","center","top",1,0,500,-5,0,true,false,true,0,true,true);
  mm_menu_0403111227_3.addMenuItem("Contact Us","location=root_dir+'contact/'");
   mm_menu_0403111227_3.hideOnMouseOut=true;
   mm_menu_0403111227_3.menuBorder=0;
   mm_menu_0403111227_3.menuLiteBgColor='#ffffff';
   mm_menu_0403111227_3.menuBorderBgColor='#555555';
   mm_menu_0403111227_3.bgColor='#555555';

  mm_menu_0403111227_3.writeMenus();
} // mmLoadMenus()

function IsNumeric(sText)
{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
}

function validateNumericField( fieldName, fieldValue) {
	if ( ! IsNumeric(fieldValue) ) {
		alert( fieldName + ": Numeric value required" );
		return false;
	}
	else {
		return true;
	}
}

function getInt( value ) {
	if ( value != "" ) {
		return value;
	}
	else {
		return 0;
	}
}

function calPositionOfLastYear ( ) {
	var form = document.forms["employees"];
	if (form.num_new_employees_ly.value != "" || form.num_repl_employees_ly.value != "") {
		document.getElementById("num_total_employees_ly").innerHTML = parseInt(getInt(form.num_new_employees_ly.value)) + parseInt(getInt(form.num_repl_employees_ly.value));
	}
	else {
		document.getElementById("num_total_employees_ly").innerHTML = "";
	}
}

function calAttritionRate ( ) {
	var form = document.forms["employees"];
	if (form.num_employees_ly.value != "" && form.num_repl_employees_ly.value != "") {
		document.getElementById("attrition_rate").innerHTML = parseInt(parseInt(form.num_repl_employees_ly.value)*100/parseInt(form.num_employees_ly.value))+"%";
	}
	else {
		document.getElementById("attrition_rate").innerHTML = "";
	}
}

function calCompensation ( numPosition, salary, compensation) {
	
	var num = document.getElementById(numPosition).value;
	var sal = document.getElementById(salary).value;
	if (num != "" && sal != "") {
		document.getElementById(compensation).innerHTML = "$"+(parseInt(num)*parseInt(sal));
	}
	else {
		document.getElementById(compensation).innerHTML = "";
	}
}

function calTotalCompensation () {
	var numCat = 9;
	
	calCompensation('num_em_pos','em_sal','em_compen');
	calCompensation('num_it_pos','it_sal','it_compen');
	calCompensation('num_af_pos','af_sal','af_compen');
	calCompensation('num_oa_pos','oa_sal','oa_compen');
	calCompensation('num_sm_pos','sm_sal','sm_compen');
	calCompensation('num_op_pos','op_sal','op_compen');
	calCompensation('num_eng_pos','eng_sal','eng_compen');
	calCompensation('num_hr_pos','hr_sal','hr_compen');
	calCompensation('num_leg_pos','leg_sal','leg_compen');
	
	var form = document.forms["employees"];
	var totalNum = "";
	var totalSal = "";
	
	if ( form.num_em_pos.value != "" || form.num_it_pos.value != "" || form.num_af_pos.value != "" || form.num_oa_pos.value != "" 
	|| form.num_sm_pos.value != "" || form.num_eng_pos.value != "" || form.num_hr_pos.value != "" || form.num_leg_pos.value != ""
	|| form.num_op_pos.value != "") {
		totalNum = 	parseInt(getInt(form.num_em_pos.value)) + 
					parseInt(getInt(form.num_it_pos.value)) + 
					parseInt(getInt(form.num_af_pos.value)) + 
					parseInt(getInt(form.num_oa_pos.value)) + 
					parseInt(getInt(form.num_sm_pos.value)) + 
					parseInt(getInt(form.num_eng_pos.value))+ 
					parseInt(getInt(form.num_hr_pos.value)) + 
					parseInt(getInt(form.num_leg_pos.value))+ 
					parseInt(getInt(form.num_op_pos.value)); 
				
		document.getElementById("num_total_pos").innerHTML = totalNum;
		document.getElementById("ny_pos_total").value = totalNum;
	}
	else {
		document.getElementById("num_total_pos").innerHTML = "";
		document.getElementById("ny_pos_total").value = 0;
	}
	
	var numAve = 0;
	if ( form.em_sal.value != "" || form.it_sal.value != "" || form.af_sal.value != "" || form.oa_sal.value != "" 
	|| form.sm_sal.value != "" || form.eng_sal.value != "" || form.hr_sal.value != "" || form.leg_sal.value != ""
	|| form.op_sal.value != "") {
		totalSal = 	parseInt(getInt(form.em_sal.value)) + 
					parseInt(getInt(form.it_sal.value)) + 
					parseInt(getInt(form.af_sal.value)) + 
					parseInt(getInt(form.oa_sal.value)) + 
					parseInt(getInt(form.sm_sal.value)) + 
					parseInt(getInt(form.eng_sal.value))+ 
					parseInt(getInt(form.hr_sal.value)) + 
					parseInt(getInt(form.leg_sal.value))+ 
					parseInt(getInt(form.op_sal.value));
		if ( form.em_sal.value != "" ) {
			numAve++;
		}
		if ( form.it_sal.value != "" ) {
			numAve++;
		}
		if ( form.af_sal.value != "" ) {
			numAve++;
		}
		if ( form.oa_sal.value != "" ) {
			numAve++;
		}
		if ( form.sm_sal.value != "" ) {
			numAve++;
		}
		if ( form.eng_sal.value != "" ) {
			numAve++;
		}
		if ( form.hr_sal.value != "" ) {
			numAve++;
		}
		if ( form.leg_sal.value != "" ) {
			numAve++;
		}
		if ( form.op_sal.value != "" ) {
			numAve++;
		}
		document.getElementById("ave_sal").innerHTML = "$" + parseInt(totalSal/parseInt(numAve));
		document.getElementById("avg_salary").value = parseInt(totalSal/parseInt(numAve)); 
	}
	else {
		document.getElementById("ave_sal").innerHTML = "";
		document.getElementById("avg_salary").value = "0";
	}
	
	var totalCompen = ""; 
	if ( totalNum != "" && totalSal != "" ) {
		totalCompen = parseInt(parseInt(document.getElementById("avg_salary").value)*parseInt(totalNum));
		document.getElementById("total_compen").innerHTML = "$"+totalCompen;
	}
	else {
		document.getElementById("total_compen").innerHTML = "";
	}
	
	if ( totalNum != "" && form.num_backfill.value != "" ) {
		document.getElementById("num_total_hire").innerHTML = (parseInt(totalNum) + parseInt(form.num_backfill.value));
	}
	else {
		document.getElementById("num_total_hire").innerHTML = "";
	}
	
	var backfillCompen = "";
	if (form.num_backfill.value != "" && totalSal != "") {
		backfillCompen = parseInt(parseInt(form.num_backfill.value)*parseInt(document.getElementById("avg_salary").value));
		document.getElementById("backfill_compen").innerHTML = "$" + backfillCompen;
	}
	else {
		document.getElementById("backfill_compen").innerHTML = "";
	}
	
	if ( backfillCompen != "" && totalCompen != "" ) {
		document.getElementById("total_hire_compen").innerHTML = "$" + (parseInt(backfillCompen) + parseInt(totalCompen));
	}
	else {
		document.getElementById("total_hire_compen").innerHTML = "";
	} 
}

function calIndividualCost(total_cost, field_name) {
	var field_value = document.getElementById(field_name).value;
	if ( total_cost != "" && field_value != "" ) {
		document.getElementById(field_name+"_cost").innerHTML = "$"+parseInt(parseInt(total_cost*field_value/100));
	}
	else {
		document.getElementById(field_name+"_cost").innerHTML = "";
	}
	
	if (field_value != "") {
		return field_value;
	}
	else {
		return 0;
	}
}

function calRecrutingCost ( currentField ) {
	
	var num = document.getElementById("num_fte").value;
	var cost = document.getElementById("fte_cost").value;
	var total_fte = "";
	if (num != "" && cost != "") {
		//total_fte = parseInt(num)*parseInt(cost*100)/100;
		total_fte = parseInt(num*cost*1.5);
		document.getElementById("total_fte_cost").innerHTML = "$"+total_fte;
	}
	else {
		document.getElementById("total_fte_cost").innerHTML = "";
	}
	
	num = document.getElementById("num_recruiter").value;
	cost = document.getElementById("recruiter_cost").value;
	var total_rec = "";
	if (num != "" && cost != "") {
		//total_rec = parseInt(num)*parseInt(cost*100)/100;
		total_rec = parseInt(num)*parseInt(cost);
		document.getElementById("total_recruiter_cost").innerHTML = "$"+total_rec;
	}
	else {
		document.getElementById("total_recruiter_cost").innerHTML = "";
	}
	
	var total_cost = "";
	if ( total_fte != "" || total_rec != "" ) {
		//total_cost = (parseInt(total_fte*100)+parseInt(total_rec*100))/100;
		total_cost = parseInt(getInt(total_fte))+parseInt(getInt(total_rec));
		document.getElementById("total_cost").innerHTML = "$"+total_cost;
	}
	else {
		document.getElementById("total_cost").innerHTML = "";
	}
	
	var remain_percentage = 100 - 
	parseInt(calIndividualCost(total_cost, "req_app")) -
	parseInt(calIndividualCost(total_cost, "req_mgmt")) -
	parseInt(calIndividualCost(total_cost, "search_job")) -
	parseInt(calIndividualCost(total_cost, "pass_candidate")) -
	parseInt(calIndividualCost(total_cost, "3rd_party_vendor")) -
	parseInt(calIndividualCost(total_cost, "phone_screen")) -
	parseInt(calIndividualCost(total_cost, "follow_up")) -
	parseInt(calIndividualCost(total_cost, "data_entry")) -
	parseInt(calIndividualCost(total_cost, "interview")) -
	parseInt(calIndividualCost(total_cost, "offer_proc"));

	if (parseInt(remain_percentage) < 0) {
		alert("Allocation Remaining Percentage cannot be less than 0");
		document.getElementById("remaining").innerHTML = "";
		document.getElementById("remaining_cost").innerHTML = "";
		document.getElementById("total_cost1").innerHTML = "";
		currentField.focus();
	}
	else  {
		document.getElementById("remaining").innerHTML = remain_percentage;
		document.getElementById("pct_remaining").value = remain_percentage;
		if (total_cost != "") {
			document.getElementById("remaining_cost").innerHTML = "$"+parseInt(remain_percentage*total_cost/100);
			document.getElementById("total_cost1").innerHTML = "$"+total_cost;
		}
		else {
			document.getElementById("remaining_cost").innerHTML = "";
			document.getElementById("total_cost1").innerHTML = "";
		}
	}
}

function calAgencyFee () {
	var form = document.forms["agency_fee"];
	
	if ( form.num_pos_search_firm.value != "" && form.num_new_employees_ly.value != "" && form.num_repl_employees_ly.value != "" ) {
		document.getElementById("requisitions").innerHTML = parseInt(form.num_pos_search_firm.value*100/(parseInt(form.num_new_employees_ly.value) + parseInt(form.num_repl_employees_ly.value)))+"%";
	}
	else {
		document.getElementById("requisitions").innerHTML = "";
	}
	
	var totalSearchFirmSpent = "";
	if ( form.num_pos_search_firm.value != "" && form.vendor_fee.value != "" && form.ave_sal.value != "" ) {
		totalSearchFirmSpent = parseInt((form.num_pos_search_firm.value*form.vendor_fee.value*form.ave_sal.value)/100);
		document.getElementById("total_search_firm_spent").innerHTML = "$" + totalSearchFirmSpent;
	}
	else {
		document.getElementById("total_search_firm_spent").innerHTML = "";
	}
	
	if ( totalSearchFirmSpent != "" && form.num_pos_search_firm.value != "" ) {
		document.getElementById("ave_spent").innerHTML = "$" + parseInt( totalSearchFirmSpent/form.num_pos_search_firm.value);
	}
	else {
		document.getElementById("ave_spent").innerHTML = "";
	}

	var targetAgencyFee = 20;
	document.getElementById("target_agency_fee").innerHTML = targetAgencyFee + "%";
	var ermReduction = 75;
	document.getElementById("erm_reduction").innerHTML = ermReduction + "%";
	
	var cvmReduction = ""; 
	if ( form.vendor_fee.value != "" && targetAgencyFee != "" ) {
		cvmReduction = parseInt((parseInt(form.vendor_fee.value) - parseInt(targetAgencyFee))*100/form.vendor_fee.value);
		document.getElementById("cvm_reduction").innerHTML = cvmReduction + "%";
	}
	else {
		document.getElementById("cvm_reduction").innerHTML = "";
	}

	var ermCost = "";

	if ( totalSearchFirmSpent != "" && ermReduction != "" && (cvmReduction != "" || cvmReduction == "0" ) ) { 
		ermCost = parseInt( totalSearchFirmSpent*(100-parseInt(ermReduction))*(100-parseInt(cvmReduction))/10000 );
		document.getElementById("erm_cost").innerHTML = "$" + ermCost;
	}
	else {
		document.getElementById("erm_cost").innerHTML = "";
	}
	
	if ( totalSearchFirmSpent != "" && ermCost != "" ) {
		document.getElementById("savings").innerHTML = "$" + (parseInt( totalSearchFirmSpent ) - parseInt(ermCost) );
	}
	else {
		document.getElementById("savings").innerHTML = "";
	} 
}

function calIndividualCostReduction( fieldNamePrefix ) {
	var contractorNum = document.getElementById(fieldNamePrefix+"num_contractor").value;
	var vendorRate = document.getElementById(fieldNamePrefix+"vendor_rate").value;
	var totalSpend = "";
	
	if ( contractorNum != "" && vendorRate != "" ) {
		totalSpend = contractorNum * vendorRate * 2080;
		document.getElementById(fieldNamePrefix+"total_spend").innerHTML = "$" + totalSpend;
	}
	else {
		document.getElementById(fieldNamePrefix+"total_spend").innerHTML = "";
	}
	
	var ReductionPercentage = 10;
	document.getElementById(fieldNamePrefix+"reduction_percentage").innerHTML = ReductionPercentage + "%";
	
	if ( ReductionPercentage != "" && vendorRate != "" ) {
		document.getElementById(fieldNamePrefix+"illuma_rate").innerHTML = "$" + (vendorRate * (100-parseInt(ReductionPercentage))/100);
	}
	else {
		document.getElementById(fieldNamePrefix+"illuma_rate").innerHTML = ""
	}
	
	if ( ReductionPercentage != "" && totalSpend != "" ) {
		document.getElementById(fieldNamePrefix+"total_reduction").innerHTML = "$" + (ReductionPercentage*totalSpend/100);
	}
	else {
		document.getElementById(fieldNamePrefix+"total_reduction").innerHTML = "";
	}
	
}

function getDollorAmount( fieldName ) {
	var fieldValue = document.getElementById(fieldName).innerHTML;
	if ( fieldValue.length > 1 ) {
		return fieldValue.substr(1);
	}
	else {
		return 0;
	}
}

function calDeptSum(fieldNameSuffix) {
	var deptSum = 	parseInt(getDollorAmount("em_"+fieldNameSuffix)) +
					parseInt(getDollorAmount("it_"+fieldNameSuffix)) +
					parseInt(getDollorAmount("af_"+fieldNameSuffix)) +
					parseInt(getDollorAmount("oa_"+fieldNameSuffix)) +
					parseInt(getDollorAmount("sm_"+fieldNameSuffix)) +
					parseInt(getDollorAmount("op_"+fieldNameSuffix)) +
					parseInt(getDollorAmount("eng_"+fieldNameSuffix)) +
					parseInt(getDollorAmount("hr_"+fieldNameSuffix)) +
					parseInt(getDollorAmount("leg_"+fieldNameSuffix));
	return deptSum;
}

function calCostReduction( ) { 
	calIndividualCostReduction("em_");
	calIndividualCostReduction("it_");
	calIndividualCostReduction("af_");
	calIndividualCostReduction("oa_");
	calIndividualCostReduction("sm_");
	calIndividualCostReduction("op_");
	calIndividualCostReduction("eng_");
	calIndividualCostReduction("hr_");
	calIndividualCostReduction("leg_");
	
	var deptSpendSum = calDeptSum("total_spend");
	var deptRedSum = calDeptSum("total_reduction");
	
	if ( deptSpendSum != "" ) {
		document.getElementById("all_dept_total_spend").innerHTML = "$" + deptSpendSum;
	}
	else {
		document.getElementById("all_dept_total_spend").innerHTML = "";
	} 
	if ( deptRedSum != "" ) {
		document.getElementById("all_dept_total_reduction").innerHTML = "$" + deptRedSum;
	}
	else {
		document.getElementById("all_dept_total_reduction").innerHTML = "";
	}
	if ( deptSpendSum != "" && deptRedSum != "" ) {
		document.getElementById("all_dept_reduction_percentage").innerHTML = (deptRedSum/deptSpendSum)*100+"%";
	}
	else {
		document.getElementById("all_dept_reduction_percentage").innerHTML = "";
	} 
}

function calToolAndOtherCost ( ) {
	var form = document.forms["tool"];
	
	var totalToolCost = parseInt(getInt(form.job_board_cost.value)) + 
						parseInt(getInt(form.tracking_system_cost.value)) + 
						parseInt(getInt(form.drug_check_cost.value)) + 
						parseInt(getInt(form.ref_checking_cost.value)) + 
						parseInt(getInt(form.skill_test_cost.value)) +
						parseInt(getInt(form.tt_other.value));
	if ( totalToolCost != "" ) {
		document.getElementById("total_resource_cost").innerHTML = "$" + totalToolCost;
	}
	else {
		document.getElementById("total_resource_cost").innerHTML = "";
	}
	
	var totalAddCost =  parseInt(getInt(form.career_fair_cost.value)) + 
						parseInt(getInt(form.advertising_cost.value)) + 
						parseInt(getInt(form.travel_cost.value)) +  
						parseInt(getInt(form.relocation_cost.value)) +
						parseInt(getInt(form.addi_other.value));
	if ( totalAddCost != "" ) {
		document.getElementById("total_additional_cost").innerHTML = "$" + totalAddCost;
	}
	else {
		document.getElementById("total_additional_cost").innerHTML = "";
	}
}

//-->