﻿// JScript File

function GenericToggler(lid , lad)
{
	var x = document.getElementById(lid);
	if (x != null) {
		x.style.display = x.style.display == "none" ? "block" : "none" ;
		
		var img = document.getElementById(lad);
		if (img != null) {
			img.src = x.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function locationstoggle()
{
	var x = document.getElementById("ctl00_li_location1");
	if (x != null) {
		x.style.display = x.style.display == "none" ? "block" : "none" ;
	}

	x = document.getElementById("ctl00_li_location2");
	if (x != null) {
		x.style.display = x.style.display == "none" ? "block" : "none" ;
	}

	x = document.getElementById("ctl00_li_location3");
	if (x != null) {
		x.style.display = x.style.display == "none" ? "block" : "none" ;
	}

	x = document.getElementById("ctl00_li_location4");
	if (x != null) {
		x.style.display = x.style.display == "none" ? "block" : "none" ;
	}
	
		x = document.getElementById("ctl00_li_location5");
	if (x != null) {
		x.style.display = x.style.display == "none" ? "block" : "none" ;
	}

	x = document.getElementById("ctl00_li_location6");
	if (x != null) {
		x.style.display = x.style.display == "none" ? "block" : "none" ;
	}

}

function chkSearchCandidatesShowDateRange_toggle()
{
	// get reference to the thing we're checking on
	var chk = document.getElementById('ctl00_chpGeneral_chkSearchCandidatesShowDateRange');
	var div = document.getElementById('ctl00_chpGeneral_div_SearchCandidatesDateRange');
	// check we found it before testing it
	if ( (chk != null) & (div != null) ) {
		// if checked - display stuff, unchecked - hide it.
		if (chk.checked) {
			div.style.display = 'block';
		}
		else {
			div.style.display = 'none';
		}
	}
}

function chkSearchCandidatesShowSkills_toggle()
{
	// get reference to the thing we're checking on
	var chk = document.getElementById('ctl00_chpGeneral_chkSearchCandidatesShowSkills'); 
	var hdn = document.getElementById('ctl00_chpGeneral_hdnSearchCandidatesSkills');

	// check we found it before testing it
	if ( (chk != null) & (hdn != null) ) {
		if (hdn.value > 1) {
			var div = document.getElementById('ctl00_chpGeneral_div_SearchCandidatesSkills');
		}
		else {
			var div = document.getElementById('ctl00_chpGeneral_div_SearchCandidatesNoSkills');
		}

		// check we found the div
		if (div != null) {
			// if checked - display stuff, unchecked - hide it.
			if (chk.checked) {
				div.style.display = 'block';
			}	
			else {
				div.style.display = 'none';
			}
		}
	}
}

function lnkAddVacancyDuplicateShowHide_click()
{
	var divdup = document.getElementById('ctl00_chpGeneral_div_AddVacancyDuplicate');

	if (divdup != null) {
		if (divdup.style.display == "block") {
			divdup.style.display = "none";
		}
		else {
			divdup.style.display = "block";
		}
		
		var img = document.getElementById('ctl00_chpGeneral_imgAddVacancyDuplicateShowHide');
		if (img != null) {
			img.src = divdup.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
	}
}

function lnkAddVacancyShowHide_click()
{
	var divadd = document.getElementById('ctl00_chpGeneral_div_AddVacancy');
	var txt = document.getElementById('ctl00_chpGeneral_txtAddVacancyTitle');
	
	if (divadd != null) {
		if (divadd.style.display == "none") {
			divadd.style.display = "block";
			if (txt != null) {
				txt.focus();
			}
		}
		else {
			divadd.style.display = "none";
		}
		
		var img = document.getElementById("ctl00_chpGeneral_imgAddVacancyShowHide");
		if (img != null) {
			img.src = divadd.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function VacancyTabGeneralInformation_click()
{
	var div = document.getElementById("ctl00_chpGeneral_div_VacancyTabGeneralInformation_inner");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none" ;
	
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyTabGeneralInformation");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}		 
	}
}

function VacancyDetailsDivision()
{
	var div = document.getElementById("ctl00_chpGeneral_divVacancyDetailsDivision");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none" ;
	
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyDetailsDivision");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function VacancyDetailsViewAllDetails()
{
	var div = document.getElementById("ctl00_chpGeneral_div_VacancyTabFullDetails");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none" ;
	
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyDetailsViewAllDetails");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function VacancyDetailsViewAdvertText()
{
	var div = document.getElementById("ctl00_chpGeneral_div_VacancyDetailsViewAdvertText");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyDetailsViewAdvertText");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}


function ChangeVacancyStatus()
{
	var div = document.getElementById("ctl00_chpGeneral_div_VacancyDetailsViewVacancyStatus");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyDetailsViewVacancyStatus");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function Candidates_click()
{
	var div = document.getElementById("ctl00_chpGeneral_div_VacancyDetailsViewCandidates");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyDetailsViewCandidates");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}


function Interviews_click()
{
	var div = document.getElementById("ctl00_chpGeneral_div_VacancyDetailsViewInterviews");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyDetailsViewInterviews");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function Agencies_click()
{
	var div = document.getElementById("ctl00_chpGeneral_div_VacancyDetailsViewAgencies");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyDetailsViewAgencies");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function SearchCandidates_Options_click()
{
	var div = document.getElementById("ctl00_chpGeneral_div_SearchCandidates");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgSearchCandidates");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function SearchCandidatesResults()
{
	var div = document.getElementById("ctl00_chpGeneral_div_SearchCandidatesResults");
	
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgSearchCandidatesResults");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function SearchVacancies_Options_click()
{
	var div = document.getElementById("ctl00_chpGeneral_div_SearchVacancies");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgSearchVacancies");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function SearchVacanciesResults()
{
	var p = document.getElementById("ctl00_chpGeneral_pSearchVacanciesResults");

	if (p != null) {
		p.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgSearchVacanciesResults");
		if (img != null) {
			img.src = p.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function loginDetailsView_click()
{
	var div = document.getElementById("ctl00_chpGeneral_div_LoginDetailsView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgLoginDetailsView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
	
	div = document.getElementById("ctl00_chpGeneral_div_LoginDetailsAddNew");
	if (div != null) {
		div.style.display = "none";
		img  = document.getElementById("ctl00_chpGeneral_imgLoginDetailsAddNew");
		if (img != null) {
			img.src = "../../images/expand1.jpg";
		}
	}

	// Now reset all the Edit value fields.
	var x = document.getElementById("ctl00_chpGeneral_lblLoginDetailsEditID");
	if (x != null) {
		x.value = '';
	}
	x = document.getElementById("ctl00_chpGeneral_txtLoginDetailsEditName");
	if (x != null) {
		x.value = '';
	}
	x = document.getElementById("ctl00_chpGeneral_txtLoginDetailsEditUsername");
	if (x != null) {
		x.value = '';
	}
	x = document.getElementById("ctl00_chpGeneral_txtLoginDetailsEditPassword");
	if (x != null) {
		x.value = '';
	}
	x = document.getElementById("ctl00_chpGeneral_txtLoginDetailsEditEmail");
	if (x != null) {
		x.value = '';
	}
	x = document.getElementById("ctl00_chpGeneral_ddlLoginDetailsEditRemoved");
	if (x != null) {
		x.selectedindex = 0;
	}
}

function LoginDetailsAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_LoginDetailsAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgLoginDetailsAddNew");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function CandidateStatusAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateStatusAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateStatusAddNew");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
		// if div is open force close of edit
		var div2 = document.getElementById("ctl00_chpGeneral_div_CandidateStatusEdit");
		if (div2 != null) {
			if (div.style.display == "block") {
				div2.style.display = "none" ; 
				var txt = document.getElementById('ctl00_chpGeneral_txtCandidateStatusEditCandidateStatus');
				if (txt != null) {
					txt.value = 'defaulttext' ;
				}
			}
		}
	}
}

function CandidateStatusView()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateStatusView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateStatusView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
		
		var div2 = document.getElementById("ctl00_chpGeneral_div_CandidateStatusAddNew");
		if (div2 != null) {
			if (div.style.display == "block") {
				div2.style.display = "none" ; 
				var img2 = document.getElementById("ctl00_chpGeneral_imgCandidateStatusAddNew");
				if (img2 != null) {
					img.src = "../../images/expand1.jpg";
				}
			}
		}
		var txt = document.getElementById('ctl00_chpGeneral_txtCandidateStatusAddCandidateStatus');
		if (txt != null) {
			txt.value = '';
		}
	}
}

function gvCandidateStatus_status_click(id , status , newResponse , completionStatus , declineStatus)
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateStatusEdit");
	if (div != null) {
		// check the new status paramter against the current - if different make sure the div is displayed, if the same toggle display
		var str = document.getElementById("ctl00_chpGeneral_txtCandidateStatusEditCandidateStatus").value;
		if (str != null) {
			if (str == status) {
				div.style.display = div.style.display == "block" ? "none" : "block";
			}
			else {
				div.style.display = "block";
				
				var x = document.getElementById("ctl00_chpGeneral_lblCandidateStatusEditID");
				if (x != null) {
					x.value = id;
					x = document.getElementById("ctl00_chpGeneral_hdnCandidateStatusEditID");
					if (x != null) {
						x.value = id;
					}
				}				
				x = document.getElementById("ctl00_chpGeneral_txtCandidateStatusEditCandidateStatus");
				if (x != null) {
					x.value = status;
				}
				x = document.getElementById("ctl00_chpGeneral_ddlCandidateStatusEditCompletion");
				if (x != null) {
					x.Enabled = true;
					x.disabled = !x.Enabled;
					if (completionStatus == "Yes") {
						x.value = "1" ;
					}
					else {
						x.value = "0" ;
					} 	
				}
				x = document.getElementById('ctl00_chpGeneral_ddlCandidateStatusEditDecline');
				if (x != null) {
					x.Enabled = true;
					x.disabled = (!completionStatus == "Yes");
					if (declineStatus == "Yes") {
						x.value = "1" ;
					}
					else {
						x.value = "0";
					}
				}
			}
		}
		var div = document.getElementById("ctl00_chpGeneral_div_CandidateStatusAddNew");
		if (div != null) {
			div.style.display = "none"; 
			var img = document.getElementById("ctl00_chpGeneral_imgCandidateStatusAddNew");
			if (img != null) {
				img.src = "../../images/expand1.jpg" ;
			}
			var txt = document.getElementById('ctl00_chpGeneral_txtCandidateStatusAddCandidateStatus');
			if (txt != null) {
				txt.value = 'defaulttext';
			}
		}
	}
}

function CompletionStatus_Change(_completion , _decline)
{
	var ddla = document.getElementById(_completion);
	var ddlb = document.getElementById(_decline);

	if (ddla != null && ddlb != null) {
		ddlb.disabled = (ddla.selectedIndex == 0);
		if (ddlb.disabled) {
			ddlb.selectedIndex = 0;		
		}
	}
}

function ManageSkillsViewEditRemoveShowHide() 
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageSkillsView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageSkillsView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
	div = document.getElementById("ctl00_chpGeneral_div_ManageSkillsAddNew");
	if (div != null) {
		div.style.display = "none";
		img = document.getElementById("ctl00_chpGeneral_imgManageSkillsAddShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function ManageSkillsAddShowHide()
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageSkillsAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageSkillsAddShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function EmailTemplatesShowHide()
{
	var div = document.getElementById("ctl00_chpGeneral_div_EmailTemplates");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgEmailTemplatesShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
		var x = document.getElementById("ctl00_chpGeneral_lblEmailTemplateEditID");
		if (x != null) {
			x.value = "";
		}
		var x = document.getElementById("ctl00_chpGeneral_lblEmailTemplateEditTemplateDescription");
		if (x != null) {
			x.value = "";
		}
		var x = document.getElementById("ctl00_chpGeneral_txtEmailTemplateEditSalutation");
		if (x != null) {
			x.value = "";
		}
		var x = document.getElementById("ctl00_chpGeneral_txtEmailTemplateEditSubject");
		if (x != null) {
			x.value = "";
		}
		var x = document.getElementById("ctl00_chpGeneral_ftbEmailTemplateEditContent");
		if (x != null) {
			x.value = "";
		}
	}
}

function EmailTemplatesEditShowHide()
{
	var div = document.getElementById("ctl00_chpGeneral_div_EmailTemplateEdit");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgEmailTemplateEdit");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function GeneralConfigurationShowHide()
{
	var div = document.getElementById("ctl00_chpGeneral_div_GeneralConfigurationEdit");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgGeneralConfigurationEdit");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function GeneralConfigurationSystemURLs()
{
	var div = document.getElementById("ctl00_chpGeneral_div_GeneralConfigurationSystemURLs");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgGeneralConfigurationSystemURLs");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function GeneralConfigurationAdvertTemplate()
{
	var div = document.getElementById("ctl00_chpGeneral_div_GeneralConfigurationAdvertTemplate");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgGeneralConfigurationAdvertTemplate");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function GeneralConfigurationPrivacyStatement()
{
	var div = document.getElementById("ctl00_chpGeneral_div_GeneralConfigurationPrivacyStatement");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgGeneralConfigurationPrivacyStatement");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function GeneralConfigurationPrincipalContactDetails()
{
	var div = document.getElementById("ctl00_chpGeneral_div_GeneralConfigurationPrincipalContactDetails");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgGeneralConfigurationPrincipalContactDetails");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function GeneralConfigurationExplanation()
{
	var div = document.getElementById("ctl00_chpGeneral_div_GeneralConfigurationExplanation");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgGeneralConfigurationExplanation");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function CandidateDetailsPersonalDetailsShowHide()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateDetailsPersonalDetailsShowHide");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateDetailsPersonalDetailsShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function CandidateDetailsApplicationDetailsSiteApp()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateDetailsApplicationDetailsHideShow");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateDetailsApplicationDetailsSiteApp");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function CandidateDetailsSkillsShowHide()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateDetailsSkillsShowHide");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateDetailsSkillsShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function CandidateDetailsDuplicateShowHide()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateDetailsDuplicateShowHide");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateDetailsDuplicateShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function candidateDetailsInterviewsShowHide()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateDetailsInterviewsShowHide");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateDetailsInterviewsShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function CandidateDetailsNotesShowHide()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateDetailsNotesShowHide");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateDetailsNotesShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function CandidateDetailsQualifyingAnswers()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateDetailsQualifyingAnswers");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateDetailsQualifyingAnswersShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function CandidateDetailsStatusManagement()
{
	var div = document.getElementById("ctl00_chpGeneral_div_CandidateDetailsStatusManagement");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgCandidateDetailsStatusManagementShowHide");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function DivisionView()
{
	var div = document.getElementById("ctl00_chpGeneral_div_DivisionView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgDivisionView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
		
		var div2 = document.getElementById("ctl00_chpGeneral_div_DivisionAddNew");
		if (div2 != null) {
			if (div2.style.display == "block") {
				div2.style.display = "none";
				img = document.getElementById("ctl00_chpGeneral_imgDivisionAddNew");
				if (img != null) {
					img.src = div.style.display == "none" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
				}
			} 
		}
	}
}

function DivisionAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_DivisionAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgDivisionAddNew");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function ManageDepartmentsView()
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageDepartmentsView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageDepartmentsView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
		var div2 = document.getElementById("ctl00_chpGeneral_div_ManageDepartmentsAddNew");
		if (div2 != null) {
			if (div2.style.display == "block") {
				div2.style.display = "none";
				img = document.getElementById("ctl00_chpGeneral_imgManageDepartmentsAddNew");
				if (img != null) {
					img.src = div.style.display == "none" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
				}
			} 
		}
	}
}

function ManageDepartmentsAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageDepartmentsAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageDepartmentsAddNew");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function VacancyTypeView()
{
	var div = document.getElementById("ctl00_chpGeneral_div_VacancyTypeView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyTypeView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
		var div2 = document.getElementById("ctl00_chpGeneral_div_VacancyTypeAddNew");
		if (div2 != null) {
			if (div2.style.display == "block") {
				div2.style.display = "none";
				img = document.getElementById("ctl00_chpGeneral_imgVacancyTypeAddNew");
				if (img != null) {
					img.src = div2.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
				}
			} 
		}
	}
}

function VacancyTypeAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_VacancyTypeAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgVacancyTypeAddNew");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}


function LocationNameView()
{
	var div = document.getElementById("ctl00_chpGeneral_div_LocationNameView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgLocationNameView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
		var div2 = document.getElementById("ctl00_chpGeneral_div_LocationNameAddNew");
		if (div2 != null) {
			if (div2.style.display == "block") {
				div2.style.display = "none";
				img = document.getElementById("ctl00_chpGeneral_imgLocationNameAddNew");
				if (img != null) {
					img.src = div2.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
				}
			} 
		}
	}
}

function LocationNameAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_LocationNameAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgLocationNameAddNew");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function ManageRegionsView()
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageRegionsView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageRegionsView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
		var div2 = document.getElementById("ctl00_chpGeneral_div_ManageRegionsAddNew");
		if (div2 != null) {
			if (div2.style.display == "block") {
				div2.style.display = "none";
				img = document.getElementById("ctl00_chpGeneral_imgManageRegionsAddRegion");
				if (img != null) {
					img.src = div2.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
				}
			} 
		}
	}
}

function ManageRegionsAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageRegionsAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageRegionsAddRegion");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function ManageInterviewTypesView()
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageInterviewTypesView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageInterviewTypesView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
		var div2 = document.getElementById("ctl00_chpGeneral_div_ManageInterviewTypesAddNew");
		if (div2 != null) {
			if (div2.style.display == "block") {
				div2.style.display = "none";
				img = document.getElementById("ctl00_chpGeneral_imgManageInterviewTypesAddNew");
				if (img != null) {
					img.src = div2.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
				}
			} 
		}
	}
}

function ManageInterviewTypesAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageInterviewTypesAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageInterviewTypesAddNew");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function ManageCountiesView()
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageCountiesView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageCountiesView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
		var div2 = document.getElementById("ctl00_chpGeneral_div_ManageCountiesAddNew");
		if (div2 != null) {
			if (div2.style.display == "block") {
				div2.style.display = "none";
				img = document.getElementById("ctl00_chpGeneral_imgManageCountiesAddNew");
				if (img != null) {
					img.src = div2.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
				}
			} 
		}
	}
}

function ManageCountiesAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_ManageCountiesAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgManageCountiesAddNew");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function ManageHowHeardView()
{
	var div = document.getElementById("ctl00_chpGeneral_div_HowHeardView");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgHowHeardView");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	
		var div2 = document.getElementById("ctl00_chpGeneral_div_HowHeardAddNew");
		if (div2 != null) {
			if (div2.style.display == "block") {
				div2.style.display = "none";
				img = document.getElementById("ctl00_chpGeneral_imgHowHeardAddNew");
				if (img != null) {
					img.src = div2.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
				}
			} 
		}
	}
}

function ManageHowHeardAddNew()
{
	var div = document.getElementById("ctl00_chpGeneral_div_HowHeardAddNew");

	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none"; 
		
		var img = document.getElementById("ctl00_chpGeneral_imgHowHeardAddNew");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function AdvertText()
{
	var div = document.getElementById("ctl00_chpGeneral_divAdvertText");
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none";
		
		var img = document.getElementById("ctl00_chpGeneral_imgAdvertText");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}

function SearchVacanciesResults()
{
	var div = document.getElementById("ctl00_chpGeneral_divSearchVacanciesResults");
	if (div != null) {
		div.style.display = div.style.display == "none" ? "block" : "none";
		
		var img = document.getElementById("ctl00_chpGeneral_imgSearchVacanciesResults");
		if (img != null) {
			img.src = div.style.display == "block" ? "../../images/expand.jpg" : "../../images/expand1.jpg" ;
		}
	}
}
