/* Onload.js */

var Cookies = {};

function parseCookies(){
	cookies = document.cookie.split(";");
	for(i = 0; i < cookies.length; i++){
		cookie = cookies[i].split("=");
		Cookies[trim(cookie[0])] = (cookie.length == 2) ? trim(cookie[1]): "";
	}
}
function trim(val){return val.replace(/\s/, "").toLowerCase();}
function cookieExists(cName){
	var foundCookie = false;
	for(c in Cookies){
		if(c.toLowerCase() == cName.toLowerCase()){
			if(trim(Cookies[cName.toLowerCase()]) != ''){
				foundCookie = true;
			}
		}
	}
	return foundCookie;
}
function loadCookies() {
        var Cookies = {};
        parseCookies();
}

/* Load Cookies called before MyJobBoard loads to enable login  */
        loadCookies();
/* End Onload */

/* Adkit Configuration */
function adkit_config (inClass, inState) 
    { 	
      ndm.page.site = "CONE";
      ndm.page.section = inClass;
      ndm.page.custom = inState;
      ndm.page.runads = true;
	  ndm.page.nielsen.ci = "newscorp";
      	 
      ndm.page.nielsen.cg = "0";       
      ndm.page.setup();
    }

/* End Adkit Configuration */

function _gaLoad () {
    var pageTracker = _gat._getTracker("UA-2816198-1");
        pageTracker._initData();
        pageTracker._trackPageview();
}

function _diLoad() {
	var refr=escape(document.referrer); /* get the http referer and encode it */ 
	var dom=location.hostname; /* get the host domain */ 
	var stURL="http://pm14.com/n/8831/23791/www.careerone.com.au/d6a02d990025030000000006000000000355c2020000000000000000000000000000000100/i/c?0&1pixgif&referer=" + refr; 
	if ( (refr && refr.search(dom) == -1) && (location.href.toUpperCase().indexOf("247SEO=N") == -1) ) /* if the referrer is external preload the image request and does not contain 247SEO argument = "N" */ 
	{ 
		imageTR = new Image(); 
		imageTR.src = stURL; 
	}
}

/* MY JOB BOARD (220px) - Function to call the 220px wide My Job Board login widget (including logged in and logged out versions) and to populate the correct relative path for the links within the widget (eg Forgot Password) */
function mjb (inPath) 
{ 
if(cookieExists('ccloggedin')){
	document.write('	<ul>\n');
	document.write('		<li class="icon-loggedin">\n');
	document.write('		<h4>Welcome</h4>\n');
	document.write('		<a href="http://jobs.careerone.com.au/texis/jobseeker/editProfile.html">Account Profile</a> | <a href="http://jobs.careerone.com.au/texis/jobseeker/accountLogout.html">Logout</a>\n');
	document.write('		</li>\n');
	document.write('		<li class="icon-shortlist">\n');
	document.write('		<h4>Saved Jobs</h4>\n');
	document.write('		<a href="http://jobs.careerone.com.au/texis/jobseeker/folder.html?Folder=Saved">View saved jobs now</a>\n');
	document.write('		</li>\n');
	document.write('		<li class="icon-email">\n');
	document.write('		<h4>Job Alerts</h4>\n');
	document.write('		<a href="http://jobs.careerone.com.au/texis/jobseeker/agentCenter.html">View</a> | <a href="http://jobs.careerone.com.au/texis/jobseeker/addAgent.html">Create a job alert</a>\n');
	document.write('		</li>\n');
	document.write('		<li class="icon-resume">\n');
	document.write('		<h4>Resumes</h4>\n');
	document.write('		<a href="http://jobs.careerone.com.au/texis/jobseeker/resumeCenter.html">View</a> | <a href="http://jobs.careerone.com.au/texis/jobseeker/createResume.html">Create resume</a>\n');
	document.write('		</li>\n');
	document.write('		<li class="icon-more">\n');
	document.write('		<strong><a href="http://jobs.careerone.com.au/texis/jobseeker/jobTools.html">View all job tools</a></strong>\n');
	document.write('		</li>\n');
	document.write('	</ul>\n');
} else {
	document.write('	<form action="http://jobs.careerone.com.au/texis/jobseeker/jobTools.html" name="profileLogin" method="post" id="profileLoginId" >\n');
	document.write('		<label for="loginEmail">Username <input class="textfield_log" name="loginEmail" id="loginEmail" type="text" value="Your email address" onclick="javascript:document.getElementById(\'loginEmail\').value=\'\'"></label>\n');
	document.write('		<label for="loginPass">Password <input class="textfield_log" name="loginPass" id="loginPass" type="password"></label>\n');
	document.write('		<label for="rememberMe" class="remember"><input name="rememberMe" type="checkbox" value="yes" id="rememberMe">Remember me on this computer</label>\n');
	document.write('		<input class="loginbutton" type="image" src="/images/site/buttons/button_login.gif" name="login" title="Login now"  id="jobseeker-login-submit" />\n');
	document.write('		<p class="forgot"><a href="'+inPath+'my-account/forgot-your-password">Forgot password?</a></p>\n');
	document.write('		<p id="sign-up"><a href="http://jobs.careerone.com.au/texis/jobseeker/profile.html"><span>Sign up now!</span></a></p>\n');
	document.write('    </form>\n');
}

}

/* MY JOB BOARD (300px) - Function to call the 300px wide My Job Board login widget (including logged in and logged out versions) and to populate the correct relative path for the links within the widget (eg Forgot Password) */
function mjb_wide (inPath) 
{ 
if(cookieExists('ccloggedin')){
	document.write('	<ul>\n');
	document.write('		<li class="icon-loggedin">\n');
	document.write('		<h4>You are now logged in</h4>\n');
	document.write('		<a href="http://jobs.careerone.com.au/texis/jobseeker/editProfile.html">My Account</a> | <a href="http://jobs.careerone.com.au/texis/jobseeker/jobTools.html" >All Job Tools</a>\n');
	document.write('		</li>\n');
	document.write('	</ul>\n');
	document.write('	<span class="logoutbutton"><a href="http://jobs.careerone.com.au/texis/jobseeker/accountLogout.html"><img src="/images/site/buttons/button_logout.gif" name="logout" title="Logout of your account"></a></span>\n');
}else{
	document.write('	<span class="signup">Not signed up? <a href="http://jobs.careerone.com.au/texis/jobseeker/profile.html">Register for free</a></span>\n');
	document.write('	<form action="http://jobs.careerone.com.au/texis/jobseeker/jobTools.html" name="profileLogin" method="post" id="profileLoginId" >\n');
	document.write('		<label for="loginEmail">Username <input class="textfield_log" name="loginEmail" id="loginEmail" type="text" value="Your email address" onclick="javascript:document.getElementById(\'loginEmail\').value=\'\'"></label>\n');
	document.write('		<label for="loginPass">Password <input class="textfield_log" name="loginPass" id="loginPass" type="password"></label>\n');
	document.write('		<label for="rememberMe" class="remember"><input name="rememberMe" type="checkbox" value="yes" id="rememberMe">Remember me</label>\n');
	document.write('		<input class="loginbutton" type="image" src="/images/site/buttons/button_login.gif" name="login" title="Login now" id="jobseeker-login-submit" />\n');
	document.write('		<span class="forgot"><a href="'+inPath+'my-account/forgot-your-password">Forgot password?</a></span>\n');
	document.write('    </form>\n');
}

}

 /* ADVERTISER LOGIN -  Function to call the Advertiser Login widget (including logged in and logged out versions).  Also passing the relative path value for the Forgot Password link. */
 function advlog (inPath) 
{ 
	if(!cookieExists('ccloggedin')) {
		document.write('	<div id="advertiser-login">\n');
		document.write('		<h2><span>Regular Advertisers</span></h2>\n');
		document.write('	<form action="http://jobs.careerone.com.au/texis/account/login.html" name="advlogin" method="post" id="advlogin">\n');
		document.write('		<label for="loginEmail">Username <input class="textfield_log" name="loginEmail" id="loginEmail" type="text"></label>\n');
		document.write('		<label for="loginPass">Password <input class="textfield_log" name="loginPass" id="loginPass" type="password"></label>\n');
		document.write('		<input class="loginbutton" type="image" src="/images/site/buttons/button_adv_login.gif" name="login" title="Login now" id="advertiser-login-submit" />\n');
		document.write('		<span class="forgot"><a href="'+inPath+'advertisers/forgot-password">Forgot password?</a></span>\n');
		document.write('	</form>\n');
		document.write('	</div>\n');
	}	else {
        document.write('	<br />');
}				
}

/* 
 * SEO Order 
 *
 * This code will re-arrange the DOM structure so that it looks correct to the eye, and to the DOM
 * This change is required to allow search engine spiders to look at the important information on the page, not the navigation and ndm bar 
 *
 * */
 
/* Not required for Monster integration - used for Google Analytics
if (typeof load_analytics == "undefined") {
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
}

/*	This has been commented out for Monster integration - Google and DI Analytics are not required.
if(typeof jQuery == 'function'){ // if Jquery has been loaded then we can do this, otherwise it will throw errors and stop downline scripts from working. So we ignore everything that requires Jquery.
$(document).ready(function() {
	$('#content-wrap').removeClass('content-wrap-noJS');
	$('#content-wrap').before($('#head-wrap'));
	$('#head-wrap').removeClass('head-wrap-noJS');
});
$(window).ready(function() {
	$('#hide-ads').removeClass('hide-ads');	
	$('#content-wrap').before($('#head-wrap'));
	if (typeof load_analytics == "undefined") {
		_diLoad();
		_gaLoad();
	}
	loadqInd();
});
}
/* End SEO Order */

/* Search_home.js */
function loadIndustries() {

	var industriesList = document.getElementById('qInd');
	industriesList.options.length=0
	
	if (gPreselectIndustryValue == "\"divFashion & Beautydiv\"")
		gPreselectIndustryValue = "\"divFashion/Beautydiv\"";	// pli - special case for Funnelback. diff from ref data.
	
	var selectedIndexIEWorkaround = 0;	// pli - work around for IE's inability to use the "selected" param in Option() construction.
	var index = 0;
	
	for (i=0; i<industries_ref_list.length; i++)
	{
		industriesList.options[industriesList.options.length]=new Option(industries_ref_list[i].split("|")[0], industries_ref_list[i].split("|")[1], ((industries_ref_list[i].split("|")[1] == gPreselectIndustryValue) ? true : false));
		
		if (industries_ref_list[i].split("|")[1] == gPreselectIndustryValue)
			selectedIndexIEWorkaround = index;
		index++;
	}
	
	industriesList.selectedIndex = selectedIndexIEWorkaround;
}

function updatesubcategories(selectedIndustry) {

	var subcategorieslist = document.getElementById('qsubcat');
	subcategorieslist.options.length=0

	var selectedIndexIEWorkaround = 0;
	var index = 0;

	if (selectedIndustry == 13 && gPreselectSubcategoryValue == "\"Administrative\"")
		gPreselectSubcategoryValue = "\"Administration\"";	// pli - ref data name diff from parameter name - added exception

	if (selectedIndustry>-1) {
		for (i=0; i<subcategories[selectedIndustry].length; i++)
		{
			subcategorieslist.options[subcategorieslist.options.length]=new Option(subcategories[selectedIndustry][i].split("|")[0], subcategories[selectedIndustry][i].split("|")[1], ((subcategories[selectedIndustry][i].split("|")[1] == gPreselectSubcategoryValue) ? true : false));
			if (subcategories[selectedIndustry][i].split("|")[1] == gPreselectSubcategoryValue)
				selectedIndexIEWorkaround = index;
			index++;
		}
		
		subcategorieslist.selectedIndex = selectedIndexIEWorkaround;
	}
}

function loadStates() {

	var statesList = document.getElementById('qState');
	statesList.options.length=0

	var selectedIndexIEWorkaround = 0;
	var index = 0;

	for (i=0; i<states_ref_list.length; i++)
	{
		statesList.options[statesList.options.length]=new Option(states_ref_list[i].split("|")[0], states_ref_list[i].split("|")[1], ((states_ref_list[i].split("|")[1] == gPreselectStateValue) ? true : false));

		if (states_ref_list[i].split("|")[1] == gPreselectStateValue)
			selectedIndexIEWorkaround = index;
		index++;
	}

	statesList.selectedIndex = selectedIndexIEWorkaround;
}

function loadJobTypes() {

	var jobtypeList = document.getElementById('jobtype');
	jobtypeList.options.length=0

	if (gPreselectJobTypeValue == "DIVPart-timeDIV")
		gPreselectJobTypeValue = "DIVPart TimeDIV";	// pli - special case for Funnelback. diff from ref data.

	var selectedIndexIEWorkaround = 0;
	var index = 0;

	for (i=0; i<jobtype_ref_list.length; i++)
	{
		jobtypeList.options[jobtypeList.options.length]=new Option(jobtype_ref_list[i].split("|")[0], jobtype_ref_list[i].split("|")[1], ((jobtype_ref_list[i].split("|")[1] == gPreselectJobTypeValue) ? true : false));

		if (jobtype_ref_list[i].split("|")[1] == gPreselectJobTypeValue)
			selectedIndexIEWorkaround = index;
		index++;
	}
	jobtypeList.selectedIndex = selectedIndexIEWorkaround;
}

function loadCapitalCity()
{
	if (gPreselectCapitalCityValue != '')
	{
		var cityField = document.getElementById('qCity');
		
		cityField.value = gPreselectCapitalCityValue;
		cityField.hadFocus = true;
		cityField.style.color='Black';
	}
}

function setupPreselectedFields()
{
	loadIndustries();
	updatesubcategories(document.getElementById('qInd').selectedIndex);
	loadStates();
	loadJobTypes();
	loadCapitalCity();
}


function clearForm(){
	selectLists = document.getElementById('form-search').getElementsByTagName('select');
	inputs = document.getElementById('form-search').getElementsByTagName('input');
	
	for(i=0; i<selectLists.length; i++){
		if(selectLists[i].value == ""){
			selectLists[i].name = "";
		}
	}
	
	for(i=0; i<inputs.length; i++){
		if(inputs[i].type.toLowerCase() == "text"){
			if(!inputs[i].hadFocus){
				inputs[i].value = "";
			}
		}
	}
	
	return true;
}

function loadqInd() {
	var qInd = document.getElementById('qInd');
	if (qInd) {
		var selectedIndustry = document.getElementById('qInd').selectedIndex;
		if(selectedIndustry > 0){
			updatesubcategories(selectedIndustry)
		}
	}
}
/* END Search_home.js */

/* subcategories.js */
var industries_ref_list = new Array()

industries_ref_list = ["All Industries|",
							"Accounting|\"divAccountingdiv\"",
							"Administration & Secretarial|\"divAdministration & Secretarialdiv\"",
							"Advertising & Media|\"divAdvertising & Mediadiv\"",
							"Agricultural & Animals|\"divAgricultural & Animalsdiv\"",
							"Arts & Entertainment|\"divArts & Entertainmentdiv\"",
							"Automotive|\"divAutomotivediv\"",
							"Aviation & Transport|\"divAviation & Transportdiv\"",
							"Banking & Financial Services|\"divBanking & Financial Servicesdiv\"",
							"Construction, Arch. & Interiors|\"divConstruction, Architecture & Interiorsdiv\"",
							"Customer Service & Call Centre|\"divCustomer Service & Call Centrediv\"",
							"Defence & Emergency|\"divDefence & Emergencydiv\"",
							"Education & Childcare|\"divEducation & Childcarediv\"",
							"Engineering|\"divEngineeringdiv\"",
							"Executive|\"divExecutivediv\"",
/* */							"Fashion/Beauty|\"divFashion/Beautydiv\"",
							"Food & Beverage|\"divFood & Beveragediv\"",
							"Government|\"divGovernmentdiv\"",
							"Graduate|\"divGraduatediv\"",
							"Health, Medical & Pharma|\"divHealth, Medical & Pharmadiv\"",
							"Hospitality, Travel & Tourism|\"divHospitality, Travel & Tourismdiv\"",
							"HR, Recruitment & Training|\"divHR, Recruitment & Trainingdiv\"",
							"IT & T|\"divIT & Tdiv\"",
							"Legal|\"divLegaldiv\"",
							"Manufacturing & Industrial|\"divManufacturing & Industrialdiv\"",
							"Marketing|\"divMarketingdiv\"",
							"Mining & Resources|\"divMining & Resourcesdiv\"",
							"Property & Real Estate|\"divProperty & Real Estatediv\"",
							"Retail|\"divRetaildiv\"",
							"Sales|\"divSalesdiv\"",
							"Science|\"divSciencediv\"",
							"Security & Protective|\"divSecurity & Protectivediv\"",
							"Sport & Recreation|\"divSport & Recreationdiv\"",
							"Supply Chain & Logistics|\"divSupply Chain & Logisticsdiv\"",
							"Trades & Services|\"divTrades & Servicesdiv\"",
							"Voluntary, Charity & Social|\"divVoluntary, Charity & Socialdiv\""
							]



var subcategories=new Array()
subcategories[0]=["All subcategories|"]
subcategories[1]=["All subcategories|", "Accounts Payable|\"Accounts Payable\"", "Accounts Receivable|\"Accounts Receivable\"", "Analyst|\"Analyst\"", "Auditing|\"Auditing\"", "Bookkeeping|\"Bookkeeping\"", "Business Services|\"Business Services\"", "Clerks/Admin|\"Clerks/Admin\"", "Company Secretary|\"Company Secretary\"", "Corporate Advisory & Forensic|\"Corporate Advisory & Forensic\"", "CPA/Chartered|\"CPA/Chartered\"", "Credit|\"Credit\"", "Financial Accountant|\"Financial Accountant\"", "Financial Controllers & Directors|\"Financial Controllers & Directors\"", "Insolvency|\"Insolvency\"", "Management Accountant|\"Management Accountant\"", "Part Qualified|\"Part Qualified\"", "Payroll|\"Payroll\"", "Procurement & Inventory|\"Procurement & Inventory\"", "Risk Management|\"Risk Management\"", "Taxation|\"Taxation\""]
subcategories[2]=["All subcategories|", "Administration|\"Administration\"", "Data Entry|\"Data Entry\"", "Mailroom|\"Mailroom\"", "Office Management|\"Office Management\"", "Office Support|\"Office Support\"", "PA/Executive Assistant|\"PA/Executive Assistant\"", "Receptionist|\"Receptionist\"", "Secretary|\"Secretary\""]
subcategories[3]=["All subcategories|", "Account Manager|\"Account Manager\"", "Copywriter|\"Copywriter\"", "Creative Roles|\"Creative Roles\"", "Graphic Design|\"Graphic Design\"", "Journalism|\"Journalism\"", "Media Buying|\"Media Buying\"", "Photography|\"Photography\"", "Public Relations|\"Public Relations\"", "Publishing|\"Publishing\"", "Strategic Planning|\"Strategic Planning\""]
subcategories[4]=["All subcategories|", "Environmental Services|\"Environmental Services\"", "Vet Nurse|\"Vet Nurse\"", "Veterinarian/Animal Welfare|\"Veterinarian/Animal Welfare\""]
subcategories[5]=["All subcategories|", "Arts Administration|\"Arts Administration\"", "Film/Radio/TV|\"Film/Radio/TV\"", "Models|\"Models\"", "Performing Artist|\"Performing Artist\""]
subcategories[6]=["All subcategories|", "Car Hire|\"Car Hire\"", "Detailing|\"Detailing\"", "Driver|\"Driver\"", "Fleet Management|\"Fleet Management\"", "Mechanic|\"Mechanic\"", "Panel Beater|\"Panel Beater\"", "Sales/Account Management|\"Sales/Account Management\"", "Yard Person|\"Yard Person\""]
subcategories[7]=["All subcategories|", "Aeronautical|\"Aeronautical\"", "Air Freight|\"Air Freight\"", "Aircraft Maintenance|\"Aircraft Maintenance\"", "Airlines|\"Airlines\"", "Aviation|\"Aviation\"", "Baggage Handler|\"Baggage Handler\"", "Pilot|\"Pilot\"", "Sea Freight|\"Sea Freight\"", "Traffic Control|\"Traffic Control\"", "Transport|\"Transport\""]
subcategories[8]=["All subcategories|", "Actuary|\"Actuary\"", "Analyst|\"Analyst\"", "Business/Corporate|\"Business/Corporate\"", "Claims|\"Claims\"", "Client Services|\"Client Services\"", "Finance|\"Finance\"", "Fund Management|\"Fund Management\"", "Insurance|\"Insurance\"", "Investment|\"Investment\"", "Management|\"Management\"", "Retail|\"Retail\"", "Stockbroker|\"Stockbroker\"", "Superannuation|\"Superannuation\"", "Treasury|\"Treasury\"", "Workers Compensation|\"Workers Compensation\""]
subcategories[9]=["All subcategories|", "Architecture|\"Architecture\"", "Building Trades|\"Building Trades\"", "Drafting|\"Drafting\"", "Estimating|\"Estimating\"", "Excavator|\"Excavator\"", "Foremans/Supervisors|\"Foremans/Supervisors\"", "Inspectors|\"Inspectors\"", "Interior Design|\"Interior Design\"", "Labourer|\"Labourer\"", "Planner|\"Planner\"", "Property Development|\"Property Development\"", "Surveying|\"Surveying\""]
subcategories[10]=["All subcategories|", "Call Centre|\"Call Centre\"", "Customer Service Reps|\"Customer Service Reps\"", "Data Entry|\"Data Entry\"", "Team Leader|\"Team Leader\"", "Technical Support|\"Technical Support\"", "Telemarketing|\"Telemarketing\""]
subcategories[11]=["All subcategories|", "Air Force|\"Air Force\"", "Ambulance/Paramedic|\"Ambulance/Paramedic\"", "Army|\"Army\"", "Emergency Services|\"Emergency Services\"", "Navy|\"Navy\"", "Police|\"Police\""]
subcategories[12]=["All subcategories|", "Administration|\"Administration\"", "Childcare|\"Childcare\"", "Early Childhood|\"Early Childhood\"", "General Teaching|\"General Teaching\"", "Library Services|\"Library Services\"", "Primary|\"Primary\"", "Secondary|\"Secondary\"", "Special Needs|\"Special Needs\"", "Tertiary/TAFE|\"Tertiary/TAFE\"", "Training|\"Training\"", "Vocational Education|\"Vocational Education\""]
subcategories[13]=["All subcategories|", "Administration|\"Administration\"", "Automotive|\"Automotive\"", "CAD / CAE|\"CAD / CAE\"", "Chemical|\"Chemical\"", "Civil/Structural|\"Civil/Structural\"", "Drafting|\"Drafting\"", "Electrical|\"Electrical\"", "Field Engineer|\"Field Engineer\"", "Industrial|\"Industrial\"", "Lab|\"Lab\"", "Maintenance|\"Maintenance\"", "Management|\"Management\"", "Mechanical|\"Mechanical\"", "Project Engineer|\"Project Engineer\"", "Project manager|\"Project manager\"", "Research|\"Research\"", "Safety Coordinator/Officer|\"Safety Coordinator/Officer\"", "Systems|\"Systems\"", "Technical|\"Technical\""]
subcategories[14]=["All subcategories|", "Business Development|\"Business Development\"", "Chief Executive Officer|\"Chief Executive Officer\"", "General Management|\"General Management\"", "Sales Executive|\"Sales Executive\"", "Senior Management|\"Senior Management\""]
subcategories[15]=["All subcategories|", "Beauty Therapy|\"Beauty Therapy\"", "Fashion|\"Fashion\"", "Fitness|\"Fitness\"", "Hairdresser|\"Hairdresser\""]
subcategories[16]=["All subcategories|", "Baker|\"Baker\"", "Butcher|\"Butcher\"", "Chef/Cook|\"Chef/Cook\"", "Restaurant Manager|\"Restaurant Manager\"", "Vineyard/Winery|\"Vineyard/Winery\""]
subcategories[17]=["All subcategories|", "Federal Government|\"Federal Government\"", "Fire|\"Fire\"", "Local Government|\"Local Government\"", "Police|\"Police\"", "State Government|\"State Government\""]
subcategories[18]=["All subcategories|", "Cadet|\"Cadet\"", "Graduate|\"Graduate\""]
subcategories[19]=["All subcategories|", "Administration|\"Administration\"", "Ambulance|\"Ambulance\"", "Chiropractor|\"Chiropractor\"", "Community Health|\"Community Health\"", "Dental|\"Dental\"", "Dispensary/Compounder|\"Dispensary/Compounder\"", "First Aid|\"First Aid\"", "Medical Practitioner|\"Medical Practitioner\"", "Midwife|\"Midwife\"", "Natural Therapies|\"Natural Therapies\"", "Nurse|\"Nurse\"", "Occupational Therapist|\"Occupational Therapist\"", "Optometrist|\"Optometrist\"", "Pathology|\"Pathology\"", "Patient Services|\"Patient Services\"", "Pharmaceutical Sales|\"Pharmaceutical Sales\"", "Pharmacist|\"Pharmacist\"", "Pharmacy Assistant|\"Pharmacy Assistant\"", "Physiotherapy|\"Physiotherapy\"", "Psychology/Counselling|\"Psychology/Counselling\"", "Quality Manager|\"Quality Manager\"", "Radio/Sono/Ultrasound|\"Radio/Sono/Ultrasound\"", "Research|\"Research\"", "Sales|\"Sales\"", "Specialists|\"Specialists\"", "Speech Pathology|\"Speech Pathology\""]
subcategories[20]=["All subcategories|", "Accommodation/Hotels|\"Accommodation/Hotels\"", "Bar/Beverage|\"Bar/Beverage\"", "Chef/Cook|\"Chef/Cook\"", "Events Manager|\"Events Manager\"", "Front Office|\"Front Office\"", "Gaming|\"Gaming\"", "Housekeeping|\"Housekeeping\"", "Kitchen/Waiting|\"Kitchen/Waiting\"", "Management|\"Management\"", "Tour Guides|\"Tour Guides\"", "Travel Consultants|\"Travel Consultants\"", "Vineyards|\"Vineyards\""]
subcategories[21]=["All subcategories|", "Human Resources|\"Human Resources\"", "Industrial Relations|\"Industrial Relations\"", "Occupational Health and Safety|\"Occupational Health and Safety\"", "Project Management|\"Project Management\"", "Recruitment Consulting|\"Recruitment Consulting\"", "Training/Development|\"Training/Development\""]
subcategories[22]=["All subcategories|", "Analyst Programmer|\"Analyst Programmer\"", "Business Analyst|\"Business Analyst\"", "Computer Operator|\"Computer Operator\"", "Consultant|\"Consultant\"", "Data Warehousing|\"Data Warehousing\"", "Database Administration|\"Database Administration\"", "Database Developer|\"Database Developer\"", "Engineer/Hardware|\"Engineer/Hardware\"", "Engineer/Mainframe|\"Engineer/Mainframe\"", "Engineer/Network|\"Engineer/Network\"", "Engineer/Software|\"Engineer/Software\"", "Helpdesk/Support|\"Helpdesk/Support\"", "IT Architect|\"IT Architect\"", "Network Administrator|\"Network Administrator\"", "Programmer|\"Programmer\"", "Project Management|\"Project Management\"", "R&D|\"R&D\"", "Sales Reps/Execs|\"Sales Reps/Execs\"", "SAP|\"SAP\"", "Systems Administrator|\"Systems Administrator\"", "Technical Writer|\"Technical Writer\"", "Telecommunications|\"Telecommunications\"", "Test Analyst|\"Test Analyst\"", "Tester|\"Tester\"", "Web Developer|\"Web Developer\""]
subcategories[23]=["All subcategories|", "Banking/Finance|\"Banking/Finance\"", "Barrister|\"Barrister\"", "Civil/Criminal|\"Civil/Criminal\"", "Commercial/Corporate|\"Commercial/Corporate\"", "Conveyancing|\"Conveyancing\"", "Counsel/Advisor|\"Counsel/Advisor\"", "Law Clerk/Paralegal|\"Law Clerk/Paralegal\"", "Management|\"Management\"", "Property|\"Property\"", "Secretary|\"Secretary\"", "Solicitor|\"Solicitor\"", "Trademark/Franchise|\"Trademark/Franchise\""]
subcategories[24]=["All subcategories|", "Assembly|\"Assembly\"", "Fitters/Machinists|\"Fitters/Machinists\"", "Industrial Design|\"Industrial Design\"", "Labouring|\"Labouring\"", "Machine Operating|\"Machine Operating\"", "Plant Manager|\"Plant Manager\"", "Process Worker|\"Process Worker\"", "Production|\"Production\"", "Quality Assurance|\"Quality Assurance\""]
subcategories[25]=["All subcategories|", "Account Manager|\"Account Manager\"", "Analyst|\"Analyst\"", "Assistant|\"Assistant\"", "Brand/Product Manager|\"Brand/Product Manager\"", "Communications|\"Communications\"", "Consumer|\"Consumer\"", "Events/Promotions|\"Events/Promotions\"", "Management|\"Management\"", "Market Development|\"Market Development\"", "Network|\"Network\"", "Research|\"Research\"", "Telemarketing|\"Telemarketing\""]
subcategories[26]=["All subcategories|", "Coal Manager|\"Coal Manager\"", "Drilling|\"Drilling\"", "Environment, Health and Safety|\"Environment, Health and Safety\"", "General Manager|\"General Manager\"", "Mineral Processing|\"Mineral Processing\"", "Mining Engineer|\"Mining Engineer\"", "Oil/Gas|\"Oil/Gas\"", "Project Manager|\"Project Manager\"", "Utilities|\"Utilities\""]
subcategories[27]=["All subcategories|", "Admin/Office Support|\"Admin/Office Support\"", "Commercial|\"Commercial\"", "Leasing|\"Leasing\"", "Property Management|\"Property Management\"", "Residential|\"Residential\"", "Sales|\"Sales\""]
subcategories[28]=["All subcategories|", "Purchasers|\"Purchasers\"", "Retail Assistant|\"Retail Assistant\"", "Sales Person|\"Sales Person\"", "Store Manager|\"Store Manager\"", "Visual Merchandiser|\"Visual Merchandiser\""]
subcategories[29]=["All subcategories|", "Account Manager|\"Account Manager\"", "Advertising Sales|\"Advertising Sales\"", "FMCG|\"FMCG\"", "Management|\"Management\"", "Sales|\"Sales\"", "Sales Reps/Execs|\"Sales Reps/Execs\"", "Telesales|\"Telesales\""]
subcategories[30]=["All subcategories|", "Food Technologist|\"Food Technologist\"", "Medical Laboratory|\"Medical Laboratory\"", "Research and Development|\"Research and Development\"", "Scientist|\"Scientist\""]
subcategories[31]=["All subcategories|", "Prison|\"Prison\"", "Security|\"Security\""]
subcategories[32]=["All subcategories|", "Coaches|\"Coaches\"", "Dancers|\"Dancers\"", "Fitness|\"Fitness\"", "Gaming|\"Gaming\"", "Trainers|\"Trainers\""]
subcategories[33]=["All subcategories|", "Air Freight|\"Air Freight\"", "Customer Support|\"Customer Support\"", "Inventory|\"Inventory\"", "Logistics|\"Logistics\"", "Materials|\"Materials\"", "Purchasing|\"Purchasing\"", "Sea Freight|\"Sea Freight\"", "Systems|\"Systems\"", "Warehouse/Distribution|\"Warehouse/Distribution\""]
subcategories[34]=["All subcategories|", "Agriculture|\"Agriculture\"", "Apprentice|\"Apprentice\"", "Automotive|\"Automotive\"", "Baker|\"Baker\"", "Boiler Maker|\"Boiler Maker\"", "Bricklayer|\"Bricklayer\"", "Building|\"Building\"", "Butcher|\"Butcher\"", "Cabinet Maker|\"Cabinet Maker\"", "Carpentry|\"Carpentry\"", "Cleaning|\"Cleaning\"", "Courier|\"Courier\"", "Electrician|\"Electrician\"", "Fitting/Welding|\"Fitting/Welding\"", "Florist|\"Florist\"", "Food Preparation|\"Food Preparation\"", "Forestry/Fishing|\"Forestry/Fishing\"", "Home|\"Home\"", "Landscape Gardener|\"Landscape Gardener\"", "Mechanic|\"Mechanic\"", "Painting|\"Painting\"", "Plumbing|\"Plumbing\"", "Printing|\"Printing\"", "Welder/Sheet Metal|\"Welder/Sheet Metal\""]
subcategories[35]=["All subcategories|", "Charity|\"Charity\"", "Fundraising|\"Fundraising\"", "Religion/Church|\"Religion/Church\"", "Social Work|\"Social Work\"", "Volunteer|\"Volunteer\"", "Work Experience|\"Work Experience\""]


var states_ref_list = new Array()

states_ref_list = ["All States|",
						"NSW|NSW",
						"VIC|VIC",
						"QLD|QLD",
						"WA|WA",
						"SA|SA",
						"TAS|TAS",
						"ACT|ACT",
						"NT|NT"];

var jobtype_ref_list = new Array()

jobtype_ref_list = ["All Job Types|",
						"Permanent|DIVPermanentDIV",
/* */						"Part-time|DIVPart TimeDIV",
						"Temporary/Contract|DIVTemporary / ContractDIV"];

						
var gPreselectIndustryValue = "";
var gPreselectSubcategoryValue = "";
var gPreselectStateValue = "";
var gPreselectJobTypeValue = "";
var gPreselectCapitalCityValue = "";

/* end subcategories.js */

//$(window).load(function () {
//});

function submitCompanyProfileSearch() {
	if ($('#searchString').val().indexOf("Enter company or recruiter name") != -1) {
		$('#searchCompanies').attr('action', "/research-companies/search-results/" + $('#companyType').val() + "/1/");
	} else {
		var searchString = $('#searchString').val().replace( /^\s+/g, "" ).replace( /\s+$/g, "" );// strip leading and trailing whitespace from value
		$('#searchCompanies').attr('action', "/research-companies/search-results/" + $('#companyType').val() + "/1/" + searchString );
	}
}
