// JavaScript Document

function makeObject(){
	var x; 
	var browser = navigator.appName; 
	//detect the client browser
	if(browser == "Microsoft Internet Explorer"){
		x = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else{
		x = new XMLHttpRequest();
	}
	
	return x;
}
	//call the function makeObject()
		//call the function makeObject()	
	//call the function makeObject()
	var request = makeObject();
var md="";
var popupwindow;
function send_Mail(){
	
	if((chk_empty(document.contact.contact_name))&&(chk_empty(document.contact.contact_phone))&&(checkEmail(document.contact.contact_email))){
	document.contact.action="process.php?val=send_mail";
	document.contact.submit();
	return true;
	}
	else{return false;}
}

function submit_visaAssesment(){
	
	if((checkEmail(document.visa_assessment.assesmnt_email))&& (chk_empty(document.visa_assessment.assesmnt_surname)) && (chk_empty(document.visa_assessment.assesmnt_contact))&& (chk_empty(document.visa_assessment.assesmnt_birthday))&&(is_selected(document.visa_assessment.assesmnt_ageGroup))  )
	{
	document.visa_assessment.action="process.php?val=mail_visa_assessmnt";
	document.visa_assessment.submit();
	return true;
	}
	else
	{return false; }
}

function submit_holidayVisa(ax,bx){
	//edited by Hashani De Silva on 08 July 2009
	if( (chk_empty(document.HolidayVisa.visa_firstname))&&(chk_empty(document.HolidayVisa.visa_surname))&&(chk_empty(document.HolidayVisa.visa_birthday))&&(is_selected(document.HolidayVisa.visa_birthcountry))&& (is_selected(document.HolidayVisa.visa_passportCountry))&&  (checkEmail(document.HolidayVisa.visa_email))&&(chk_empty(document.HolidayVisa.visa_address))&& (chk_empty(document.HolidayVisa.home_phone)) && (chk_empty(document.HolidayVisa.visa_departure)))
	{
		document.HolidayVisa.action="process.php?val=holiday_visa&cat="+ax+"&title="+bx+"";
		document.HolidayVisa.submit();
		return true;
	}
	else
	{
		return false;
	}
}

function submit_questionneries(){
	if((checkEmail(document.Skills_questionnier.questionnier_email)) && (chk_empty(document.Skills_questionnier.questionnier_surname)) && (chk_empty(document.Skills_questionnier.questionnier_name)) && (chk_empty(document.Skills_questionnier.questionnier_birthday)))
	{
		document.Skills_questionnier.action="process.php?val=mail_questionneries";
		document.Skills_questionnier.submit();
		return true;
	}
	else 
	{return false;}
}

function submit_onlineAssesment(){
	if( (chk_empty(document.onlineAssesment.onlineAss_fullname))&&(checkEmail(document.onlineAssesment.onlineAss_email))){
	document.onlineAssesmentm1.action="process.php?val=mail_onlineAssesment";
	document.onlineAssesmentm1.submit();
     return true;
	}
	else 
	{return false;}
}
function migration_visa(ax,bx){
	if((chk_empty(document.form175.visa_firstname))&&(chk_empty(document.form175.visa_surname))&&(chk_empty(document.form175.visa_birthday))&&(is_selected(document.form175.visa_birthcountry))&&(checkEmail(document.form175.visa_email))&&(chk_empty(document.form175.visa_address))&&(chk_empty(document.form175.home_phone))&&(is_selected(document.form175.work_industry))&&(is_selected(document.form175.work_ocupation))&&(chk_empty(document.form175.work_experience))&&(chk_empty(document.form175.qualification_type))&&(is_selected(document.form175.english_proficiency))&&(is_selected(document.form175.offer_job))&&(is_selected(document.form175.interesting_criteria))&&(is_selected(document.form175.hear_service)))
	{
	document.form175.action="process.php?val=migration_visa&cat="+ax+"&title="+bx+"";
	document.form175.submit();
    return true;
	}
	else 
	{return false;}
}

function submit_visaForm(ax,bx){
	if((chk_empty(document.visaForm.visa_firstname))&&(chk_empty(document.visaForm.visa_surname))&&(chk_empty(document.visaForm.visa_birthday))&&(is_selected(document.visaForm.visa_birthcountry))&&(checkEmail(document.visaForm.visa_email))&&(chk_empty(document.visaForm.visa_address))&&(chk_empty(document.visaForm.home_phone))&&(is_selected(document.visaForm.hear_service)))
	{
	document.visaForm.action="process.php?val=visa_form&cat="+ax+"&title="+bx+"";
	document.visaForm.submit();
   return true;
	}
	else 
	{return false;}
}
function business_Visa(){
	if((chk_empty(document.BusinessVisa.visa_firstname))&&(checkEmail(document.BusinessVisa.visa_email))){
	document.BusinessVisa.action="process.php?val=business_Visa";
	document.BusinessVisa.submit();
   return true;
	}
	else 
	{return false;}
}
function holiday_Visa(ax,bx){
	if((chk_empty(document.HolidayVisa.visa_firstname))&&(checkEmail(document.HolidayVisa.visa_email))){
	document.HolidayVisa.action="process.php?val=holidayVisa_3month&cat="+ax+"&title="+bx+"";
	document.HolidayVisa.submit();
    return true;
	}
	else 
	{return false;}
}
function business_Owner_Visa(ax,bx){
	 if((chk_empty(document.HolidayVisa.visa_firstname))&&(checkEmail(document.HolidayVisa.visa_email))){
	document.HolidayVisa.action="process.php?val=business_Owner&cat="+ax+"&title="+bx+"";
	document.HolidayVisa.submit();
    return true;
	}
	else 
	{return false;}
}
function holidayVisa_6months(bx){
	 if((chk_empty(document.HolidayVisa.visa_firstname))&&(checkEmail(document.HolidayVisa.visa_email))){
	document.HolidayVisa.action="process.php?val=Visa_6months&title="+bx+"";
	document.HolidayVisa.submit();
    return true;
	}
	else 
	{return false;}
}
function regionalSponsored(bx){
	 if((chk_empty(document.HolidayVisa.visa_firstname))&&(checkEmail(document.HolidayVisa.visa_email))){
	document.HolidayVisa.action="process.php?val=regional_sponsored&title="+bx+"";
	document.HolidayVisa.submit();
    return true;
	}
	else 
	{return false;}
}
function skilledRegional(bx){
	 if((chk_empty(document.HolidayVisa.visa_firstname))&&(checkEmail(document.HolidayVisa.visa_email))){
	document.HolidayVisa.action="process.php?val=skilled_regional&title="+bx+"";
	document.HolidayVisa.submit();
    return true;
	}
	else 
	{return false;}
}
//----------------------edited by Hashani De Silva on 12 July 2009------------------
function submit_partnerVisa()
{
	if((checkEmail(document.partnerVisa.partner_email)) && (chk_empty(document.partnerVisa.partner_firstname)) && (chk_empty(document.partnerVisa.partner_lastname))&& (chk_empty(document.partnerVisa.partner_birthday)))
	{
		document.partnerVisa.action="process.php?val=partner_visa";
		document.partnerVisa.submit();
		return true;
	}
	else
	{
		return false
	}
}
function submit_GSM()
{
		if((checkEmail(document.generalSkilledMigration.GSM_email)))
		{
			document.generalSkilledMigration.action="process.php?val=GSM_visa";
			document.generalSkilledMigration.submit();
			return true;
		}
		else 
		{
			return false;
		}
}
function submit_businessSkills()
{//alert("clicked");
	if((radio_button_checker(document.businessSkills.business_visaType,document.businessSkills.alertmsg)) && (checkEmail(document.businessSkills.businessSkiills_email)) && (chk_empty(document.businessSkills.businessSkiills_firstName)) && (chk_empty(document.businessSkills.businessSkiills_lastName)) && (chk_empty(document.businessSkills.businessSkiills_birthday)))	
	{ 
		document.businessSkills.action="process.php?val=Business_Skills";
		document.businessSkills.submit();
		return true;
	}
	else
	{
		return false;
	}
}
//-----------------------------------end Hashani------------------------------------
//--------------------------edited by Hashani De Silva on 31 July 2009---------------

function submit_studentData()
{ 
		if((chk_empty(document.studentVisa.visa_firstname))&&(chk_empty(document.studentVisa.visa_lastName))&&(checkEmail(document.studentVisa.visa_email))&&(checkSame(document.studentVisa.visa_email,document.studentVisa.visa_RetypeEmail))&&(is_selected(document.studentVisa.visa_nationality))&&(radio_button_checker(document.studentVisa.visa_gender,document.studentVisa.alertmsg1))&&(is_selected(document.studentVisa.visa_Age))&&(is_selected(document.studentVisa.visa_maritalStatus))&&(radio_button_checker(document.studentVisa.visa_children,document.studentVisa.alertmsg2))&&(is_selected(document.studentVisa.visa_EnglishProficiency))&&(chk_empty(document.studentVisa.visa_whatStudy))&&(radio_button_checker(document.studentVisa.visa_permanantResidances,document.studentVisa.alertmsg3))&&(radio_button_checker(document.studentVisa.visa_supportself,document.studentVisa.alertmsg4))&&(chk_empty(document.studentVisa.visa_otherData)))
		{
			document.studentVisa.action="process.php?val=Student_Data";
			document.studentVisa.submit();
			return true;
		}
		else
		{
			return false;
		}
}
function submit_remainingRelative()
{
	if((chk_empty(document.remainingRelative.remainingRelative_firstname)) && (chk_empty(document.remainingRelative.remainingRelative_lastName)) && (checkEmail(document.remainingRelative.remainingRelative_email))&&(checkSame(document.remainingRelative.remainingRelative_email,document.remainingRelative.remainingRelative_RetypeEmail)) && (chk_empty(document.remainingRelative.remainingRelative_otherData)) )
	{
		document.remainingRelative.action="process.php?val=Remaining_Relative";
		document.remainingRelative.submit();
		return true;
	}
	else 
	{
		return false;
	}
}

function submit_parentVisa()
{
	if((chk_empty(document.parentVisa.parentVisa_firstname)) && (chk_empty(document.parentVisa.parentVisa_lastName)) && (checkEmail(document.parentVisa.parentVisa_email))&&(checkSame(document.parentVisa.parentVisa_email,document.parentVisa.parentVisa_RetypeEmail))&& (chk_empty(document.parentVisa.parentVisa_otherData)) )
	{
		document.parentVisa.action="process.php?val=Parent_Visa";
		document.parentVisa.submit();
		return true;
	}
	else 
	{
		return false;
	}
}
function submit_childVisa()
{
	if((chk_empty(document.childVisa.childVisa_firstname)) && (chk_empty(document.childVisa.childVisa_lastName)) && (checkEmail(document.childVisa.childVisa_email))&&(checkSame(document.childVisa.childVisa_email,document.childVisa.childVisa_RetypeEmail))&& (chk_empty(document.childVisa.childVisa_otherData)) )
	{
		document.childVisa.action="process.php?val=Child_Visa";
		document.childVisa.submit();
		return true;
	}
	else 
	{
		return false;
	}
}
function submit_otherVisa(bx,ax)
{//alert("ax= "+ax+"bx= "+bx+"");
	if((checkEmail(document.OtherVisa.OtherVisa_email))&&(checkSame(document.OtherVisa.OtherVisa_email,document.OtherVisa.OtherVisa_RetypeEmail)) )
	{
		document.OtherVisa.action="process.php?val=Other_Visa&title="+bx+"&cat="+ax+"";
		document.OtherVisa.submit();
		return true;
	}
	else 
	{
		return false;
	}
}
function submit_ENSVisa(bx,ax)
{ 
//alert("ax= "+ax+"bx= "+bx+"");
	if((chk_empty(document.ENSVisa.ENSVisa_firstname)) && (chk_empty(document.ENSVisa.ENSVisa_lastname)) && (checkEmail(document.ENSVisa.ENSVisa_email))&&(checkSame(document.ENSVisa.ENSVisa_email,document.ENSVisa.ENSVisa_retypeEmail))&&(is_selected(document.ENSVisa.ENSVisa_nationality)) )
	{
		//alert(bx);
		document.ENSVisa.action="process.php?val=ENS_Visa&title="+bx+"&cat="+ax+"";
		

		document.ENSVisa.submit();
		return true;
	}
	else 
	{
		return false;
	}
}
function submit_refugeeVisa()
{
	if((checkEmail(document.refugeeVisa.refugeeVisa_email))&&(chk_empty(document.refugeeVisa.refugeeVisa_fName))&&(chk_empty(document.refugeeVisa.refugeeVisa_lastName))&&(chk_empty(document.refugeeVisa.refugeeVisa_address))&&(chk_empty(document.refugeeVisa.refugeeVisa_city))&&(chk_empty(document.refugeeVisa.refugeeVisa_zipCode))&&(is_selected(document.refugeeVisa.refugeeVisa_country))&&(radio_button_checker(document.refugeeVisa.refugeeVisa_gender,document.refugeeVisa.alertmsg))&&(chk_empty(document.refugeeVisa.refugeeVisa_birthday))&&(chk_empty(document.refugeeVisa.refugeeVisa_telephone)))
	{
		document.refugeeVisa.action="process.php?val=Refugee_Visa";
		document.refugeeVisa.submit();
		return true;
	}
	else
	{
		return false;
	}

}
function submit_onlineAssesment2()
{
	if((chk_empty(document.onlineAssesment2.onlineAss_fname))&&(chk_empty(document.onlineAssesment2.onlineAss_lastName))&&(checkEmail(document.onlineAssesment2.onlineAss_email))&&(is_selected(document.onlineAssesment2.onlineAss_gender))&&(chk_empty(document.onlineAssesment2.onlineAss_telephone))&&(chk_empty(document.onlineAssesment2.onlineAss_birthday)))
	{
		document.onlineAssesment2.action="process.php?val=Online_Assesment2";
		document.onlineAssesment2.submit();
		return true;
	}
	else
	{
		return false;
	}

}
function submit_GSMNew()
{
		if((chk_empty(document.generalSkilledMigration.GSM_firstName)) && (is_selected(document.generalSkilledMigration.GSM_country)) && (radio_button_checker(document.generalSkilledMigration.GSM_gender,document.generalSkilledMigration.alertmsg)) && (chk_empty(document.generalSkilledMigration.GSM_birthday)) && (checkEmail(document.generalSkilledMigration.GSM_email)))
		{
			document.generalSkilledMigration.action="process.php?val=GSMNew_visa";
			document.generalSkilledMigration.submit();
			return true;
		}
		else 
		{
			return false;
		}
}
function submit_visitorVisa() //edited on 17/08/2009
{	
		
		if((chk_empty(document.visitorVisa.visitorVisa_firstname)) && (chk_empty(document.visitorVisa.visitorVisa_birthday)) && (is_selected(document.visitorVisa.visitorVisa_passportCountry)) && (is_selected(document.visitorVisa.visitorVisa_maritalStatus))&& (chk_empty(document.visitorVisa.visitorVisa_currentAdd)) && (checkEmail(document.visitorVisa.visitorVisa_email)))
		{
			if((document.visitorVisa.visitorVisa_sponsorFname.value)!=""){
				
				if(checkEmail(document.visitorVisa.visitorVisa_sponsorEmail)){
			document.visitorVisa.action="process.php?val=Visitor_Visa";
			document.visitorVisa.submit();
			return true;
				}
				else 
				{ return false; }
			}
		else{
			document.visitorVisa.action="process.php?val=Visitor_Visa";
			document.visitorVisa.submit();
			return true;
		}
			

		}
		else 
		{
			return false;
		}
}
function sponsorEmail(mx)
{
	if(mx.value!="")
	{
		checkEmail(mx);
		return true;
	}
	else
	{
		return false;
	}
}
//------------------------------------end Hashani--------------------------------------

//--------------------------   Check Functions   -----------------------------------------
function chk_empty(bx){
	if(bx.value==""){
		var nm=bx.name.split("_");
		var b_nm=nm[1].toUpperCase();
		alert("The field \'"+b_nm+"\' cannot be empty. Please enter a valid value");
		bx.focus();
		return false;
	}
	else{return true;}	
}
function checkEmail(cho) {
   if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(cho.value)){
   return (true);
   }
	alert("Invalid E-mail Address! Please re-enter.");
	cho.focus();
	return (false);
}

function chk_radio(rdb)
{
	if(rdb.value=="EMPTY")
	{
		var nm=bx.rdb.split("_");
		var b_nm=nm[1].toUpperCase();
		alert("The fied \'"+b_nm+"\' cannot be empty.Please enter a valid value.");
		rdb.focus();
		return false;
	}
	else
	{
		return true;
	}
}

function is_selected(cbo){
	if(cbo.value=="EMPTY"){
		var nm=cbo.name.split("_");
		var b_nm=nm[1].toUpperCase();
		alert("The field \'"+b_nm+"\' cannot be empty. Please Select a \'"+b_nm+"\' form the drop down");
		cbo.focus();
		return false;
	}
	else{return true;}	
}
function get_occupation()
{
	var jobCategory =document.generalSkilledMigration.GSM_jobCategory.value;
	alert("selected"+jobCategory+"");
	//document.generalSkilledMigration.action="Australian-Visas-Online-Assessment-General-Skilled-Migration.php";
}

function checkSame(em1,em2)
{
	if(em1.value!=em2.value)
	{
		alert("Please ReEnter your Email correctly");
		em2.focus();
		return false;
	}
	else
	{
		return true;	
	}
}

function radio_button_checker(ax,bx)
{
// set var radio_choice to false
var radio_choice = false;

// Loop from zero to the one minus the number of radio button selections
for (counter = 0; counter < ax.length; counter++)
{
// If a radio button has been selected it will return true
// (If not it will return false)
if (ax[counter].checked)
radio_choice = true; 
}

if (!radio_choice)
{
// If there were no selections made display an alert box 
alert(bx.value)
//ax.focus();
return (false);
}
return (true);
}
//------------------------------getting the job for selected job category------------------------
function getjob(ax){//alert(ax.value);
            var cat=ax.value;
			//var newoption=new Option('Select','EMPTY');
			var newoption=new Option('Please Select','EMPTY');
			if(cat=="EMPTY"){
					
					document.generalSkilledMigration.GSM_job.innerHTML='<option value="EMPTY">Please Select</option>';
					var array11=new Array('Please Select');
					for(m=0;m<(array11.length);m++){
					var newoption1=new Option(array11[m],m);	
				
					document.generalSkilledMigration.GSM_job.options[m]=newoption1;}
					}
			else if(cat=='Managers'){
				document.generalSkilledMigration.GSM_job.innerHTML='<option value="EMPTY">Please Select</option>';
				//document.generalSkilledMigration.GSM_job.options[0]=newoption;
				var array1a=new Array('Please Select','Child Care Co-ordinator','Company Secretary','Construction Project Manager','Director of Nursing','Education Managers (nec)','Engineering Manager','Environment, Parks and Land Care Manager','Finance Manager','General Manager','Human Resource Manager','Information Technology Manager','Laboratory Manager','Medical Administrator','Policy And Planning Manager','Production Manager (Manufacturing)','Production Manager (Mining)','Project Builder','Regional Education Manager','Research and Development Manager','Sales and Marketing Manager','Sports Administrator','Supply and Distribution Manager','Welfare Centre Manager');
				
				var array1b=new Array('EMPTY','Child Care Co-ordinator','Company Secretary','Construction Project Manager','Director of Nursing','Education Managers (nec)','Engineering Manager','Environment, Parks and Land Care Manager','Finance Manager','General Manager','Human Resource Manager','Information Technology Manager','Laboratory Manager','Medical Administrator','Policy And Planning Manager','Production Manager (Manufacturing)','Production Manager (Mining)','Project Builder','Regional Education Manager','Research and Development Manager','Sales and Marketing Manager','Sports Administrator','Supply and Distribution Manager','Welfare Centre Manager');
				for(j=0;j<(array1a.length);j++){
				var newoption=new Option(array1a[j],array1b[j]);	
			
				document.generalSkilledMigration.GSM_job.options[j]=newoption;}
			}
			else if(cat=='Professionals'){
				document.generalSkilledMigration.GSM_job.innerHTML='<option value="EMPTY">Please Select</option>';
				var array2a=new Array('Please Select','Accountant','Accountant-Corporate Treasurer','Accountant-Internal Auditor','Accountant-External Auditor','Actuary','Acupuncturist','Advertising Specialist','Agricultural Adviser','Agricultural Scientist','Anatomist or Physiologist','Architect','Archivist','Art Teacher (Private)','Audiologist','Biochemist','Botanist','Building Surveyor','Business and Information Professionals (nec)','Careers Counsellor','Cartographer','Chemist','Chiropractor','Community Worker','Computing Professionals-(nec)','Computing Professionals-Applications and Analyst Programmer','Computing Professionals-Computer Systems Auditor','Computing Professionals-Software Designer','Computing Professionals-Systems Designer','Computing Professionals-Systems Manager','Computing Professionals-Systems Programmer','Conservator','Copywriter','Counsellors (nec)','Dance Teacher (Private)','Dental Specialist','Dentist','Dietitian','Drama Teacher (Private)','Drug and Alcohol Counsellor','Economist','Editor','Electorate Officer','Engineer-Aeronautical Engineer','Engineer-Agricultural Engineer','Engineer-Biomedical Engineer','Engineer-Building and Engineering Professionals (nec)','Engineer-Chemical Engineer','Engineer-Civil Engineer','Engineer-Civil Engineering Technologist','Engineer-Electrical Engineer 2125-11 Y 60','Engineer-Electrical or Electronics Engineering Technologist','Engineer-Electronics Engineer','Engineer-Engineering Technologists (nec)','Engineer-Industrial Engineer','Engineer-Materials Engineer','Engineer-Mechanical Engineer','Engineer-Mechanical Engineering Technologist','Engineer-Mining Engineer (excluding Petroleum)','Engineer-Naval Architect','Engineer-Petroleum Engineer','Engineer-Production or Plant Engineer','Environmental Health Officer','Environmental Research Scientist','Extractive Metallurgist','Family Counsellor','Fashion Designer','Forester','Geologist','Geophysicist','Graphic Designer','Health Information Manager','Historian','Illustrator','Industrial Designer','Industrial Relations Officer','Intelligence Officer','Interior Designer','Interpreter','Journalists and Related Professionals (nec)','Land Economist','Landscape Architect','Legal Practitioner-Barrister','Legal Practitioner-Solicitor','Librarian','Life Scientists (nec)','Management Consultant','Marine Biologist','Market Research Analyst','Marketing Specialist','Master Fisher','Materials Scientist','Mathematician','Medical Practitioner-Anaesthetist','Medical Practitioner-Dermatologist','Medical Practitioner-Emergency Medicine Specialist','Medical Practitioner-General Medical Practitioner','Medical Practitioner-Obstetrician and Gynaecologist','Medical Practitioner-Ophthalmologist','Medical Practitioner-Paediatrician','Medical Practitioner-Pathologist','Medical Practitioner-Psychiatrist','Medical Practitioner-Radiologist','Medical Practitioner-Specialist Medical Practitioners (nec)','Medical Practitioner-Specialist Physician','Medical Practitioner-Surgeon','Medical Scientist','Medical Scientist (Medical Physicist)','Meteorologist','Museum or Gallery Curator','Music Teacher (Private)','Natural and Physical Science Professionals (nec)','Naturopath','Nurse-Registered Developmental Disability Nurse','Nurse-Registered Mental Health Nurse','Nurse-Registered Midwife','Nurse-Registered Nurse','Occupational Health and Safety Officer','Occupational Therapist','Oenologist','Optometrist','Organisation and Methods Analyst','Orthoptist','Orthotist','Osteopath','Park Ranger','Patents Examiner','Personnel Consultant','Personnel Officer','Pharmacist-Hospital Pharmacist','Pharmacist-Industrial Pharmacist','Pharmacist-Retail Pharmacist','Physical Metallurgist','Physicist','Physiotherapist','Podiatrist','Policy Analyst','Print Journalist','Psychologist-Clinical Psychologist','Psychologist-Educational Psychologist','Psychologist-Organisational Psychologist','Psychologist-Psychologists (nec)','Public Relations Officer','Quality Assurance Manager','Quantity Surveyor','Radio Journalist','Radiographer-Medical Diagnostic Radiographer','Radiographer-Nuclear Medicine Technologist','Radiographer-Radiation Therapist','Radiographer-Sonographer','Records Manager','Recreation Officer','Rehabilitation Counsellor','Sales Representative (Industrial Products)','Sales Representative (Information and Communication Products)','Sales Representative (Medical and Pharmaceutical Products)','Seafarer-Ship\'s Engineer','Seafarer-Ship\'s Master','Seafarer-Ship\'s Officer','Social Professionals (nec)','Social Worker','Soil Scientist','Speech Pathologist','Statistician','Surveyor','Teacher-Education Officer','Teacher-Pre-Primary School Teacher','Teacher-Primary School Teacher','Teacher-Secondary School Teacher','Teacher-Vocational Education Teacher (Non-trades)','Teacher-Vocational Education Teacher (Trades)','Technical Sales Representatives (nec)','Technical Writer','Television Journalist','Training Officer','Translator','Urban and Regional Planner','Valuer','Veterinarian','Welfare Worker','Zoologist');
				
				var array2b=new Array('EMPTY','Accountant','Accountant-Corporate Treasurer','Accountant-Internal Auditor','Accountant-External Auditor','Actuary','Acupuncturist','Advertising Specialist','Agricultural Adviser','Agricultural Scientist','Anatomist or Physiologist','Architect','Archivist','Art Teacher (Private)','Audiologist','Biochemist','Botanist','Building Surveyor','Business and Information Professionals (nec)','Careers Counsellor','Cartographer','Chemist','Chiropractor','Community Worker','Computing Professionals-(nec)','Computing Professionals-Applications and Analyst Programmer','Computing Professionals-Computer Systems Auditor','Computing Professionals-Software Designer','Computing Professionals-Systems Designer','Computing Professionals-Systems Manager','Computing Professionals-Systems Programmer','Conservator','Copywriter','Counsellors (nec)','Dance Teacher (Private)','Dental Specialist','Dentist','Dietitian','Drama Teacher (Private)','Drug and Alcohol Counsellor','Economist','Editor','Electorate Officer','Engineer-Aeronautical Engineer','Engineer-Agricultural Engineer','Engineer-Biomedical Engineer','Engineer-Building and Engineering Professionals (nec)','Engineer-Chemical Engineer','Engineer-Civil Engineer','Engineer-Civil Engineering Technologist','Engineer-Electrical Engineer 2125-11 Y 60','Engineer-Electrical or Electronics Engineering Technologist','Engineer-Electronics Engineer','Engineer-Engineering Technologists (nec)','Engineer-Industrial Engineer','Engineer-Materials Engineer','Engineer-Mechanical Engineer','Engineer-Mechanical Engineering Technologist','Engineer-Mining Engineer (excluding Petroleum)','Engineer-Naval Architect','Engineer-Petroleum Engineer','Engineer-Production or Plant Engineer','Environmental Health Officer','Environmental Research Scientist','Extractive Metallurgist','Family Counsellor','Fashion Designer','Forester','Geologist','Geophysicist','Graphic Designer','Health Information Manager','Historian','Illustrator','Industrial Designer','Industrial Relations Officer','Intelligence Officer','Interior Designer','Interpreter','Journalists and Related Professionals (nec)','Land Economist','Landscape Architect','Legal Practitioner-Barrister','Legal Practitioner-Solicitor','Librarian','Life Scientists (nec)','Management Consultant','Marine Biologist','Market Research Analyst','Marketing Specialist','Master Fisher','Materials Scientist','Mathematician','Medical Practitioner-Anaesthetist','Medical Practitioner-Dermatologist','Medical Practitioner-Emergency Medicine Specialist','Medical Practitioner-General Medical Practitioner','Medical Practitioner-Obstetrician and Gynaecologist','Medical Practitioner-Ophthalmologist','Medical Practitioner-Paediatrician','Medical Practitioner-Pathologist','Medical Practitioner-Psychiatrist','Medical Practitioner-Radiologist','Medical Practitioner-Specialist Medical Practitioners (nec)','Medical Practitioner-Specialist Physician','Medical Practitioner-Surgeon','Medical Scientist','Medical Scientist (Medical Physicist)','Meteorologist','Museum or Gallery Curator','Music Teacher (Private)','Natural and Physical Science Professionals (nec)','Naturopath','Nurse-Registered Developmental Disability Nurse','Nurse-Registered Mental Health Nurse','Nurse-Registered Midwife','Nurse-Registered Nurse','Occupational Health and Safety Officer','Occupational Therapist','Oenologist','Optometrist','Organisation and Methods Analyst','Orthoptist','Orthotist','Osteopath','Park Ranger','Patents Examiner','Personnel Consultant','Personnel Officer','Pharmacist-Hospital Pharmacist','Pharmacist-Industrial Pharmacist','Pharmacist-Retail Pharmacist','Physical Metallurgist','Physicist','Physiotherapist','Podiatrist','Policy Analyst','Print Journalist','Psychologist-Clinical Psychologist','Psychologist-Educational Psychologist','Psychologist-Organisational Psychologist','Psychologist-Psychologists (nec)','Public Relations Officer','Quality Assurance Manager','Quantity Surveyor','Radio Journalist','Radiographer-Medical Diagnostic Radiographer','Radiographer-Nuclear Medicine Technologist','Radiographer-Radiation Therapist','Radiographer-Sonographer','Records Manager','Recreation Officer','Rehabilitation Counsellor','Sales Representative (Industrial Products)','Sales Representative (Information and Communication Products)','Sales Representative (Medical and Pharmaceutical Products)','Seafarer-Ship\'s Engineer','Seafarer-Ship\'s Master','Seafarer-Ship\'s Officer','Social Professionals (nec)','Social Worker','Soil Scientist','Speech Pathologist','Statistician','Surveyor','Teacher-Education Officer','Teacher-Pre-Primary School Teacher','Teacher-Primary School Teacher','Teacher-Secondary School Teacher','Teacher-Vocational Education Teacher (Non-trades)','Teacher-Vocational Education Teacher (Trades)','Technical Sales Representatives (nec)','Technical Writer','Television Journalist','Training Officer','Translator','Urban and Regional Planner','Valuer','Veterinarian','Welfare Worker','Zoologist');
				
				for(j=0;j<(array2a.length);j++){
				var newoption=new Option(array2a[j],array2b[j]);	
			
				document.generalSkilledMigration.GSM_job.options[j]=newoption;}
			}
			else if(cat=='Associate'){
				document.generalSkilledMigration.GSM_job.innerHTML='<option value="EMPTY">Please Select</option>';
				var array3a=new Array('Please Select','Aboriginal and Torres Strait Islander Health Worker','Ambulance Officer','Architectural Associate','Biomedical Engineering Associate','Branch Accountant (Financial Institution)','Building Associate','Building Associate Professionals (nec)','Building Inspector','Chef','Chef-Head Chef','Chemistry Technical Officer','Civil Engineering Associate','Civil Engineering Technician','Commodities Trader','Computing Support Technician','Dental Hygienist','Dental Technician','Dental Therapist','Disabilities Services Officer','Electrical Engineering Associate','Electrical Engineering Technician','Electronic Engineering Associate','Electronic Engineering Technician','Engineering Associate Professionals (nec)','Family Support Worker','Financial Dealers and Brokers (nec)','Financial Institution Branch Manager','Financial Investment Adviser','Financial Market Dealer','Futures Trader','Hotel or Motel Manager (Degree Level)','Hotel or Motel Manager (Diploma Level)','Insurance Broker','Intensive Care Ambulance Paramedic','Interior Decorator','Library Technician','Massage Therapist','Mechanical Engineering Associate','Mechanical Engineering Technician','Medical Laboratory Technical Officer','Metallurgical and Materials Technician','Mine Deputy','Museum or Art Gallery Technician','Office Manager','Parole or Probation Officer','Plumbing Engineering Associate','Plumbing Inspector','Primary Products Inspector','Project or Program Administrator','Property Manager','Real Estate Agency Manager','Real Estate Salesperson','Residential Care Officer','Safety Inspector','Stockbroking Dealer','Surveying and Cartographic Associate','Youth Worker');
				
				var array3b=new Array('EMPTY','Aboriginal and Torres Strait Islander Health Worker','Ambulance Officer','Architectural Associate','Biomedical Engineering Associate','Branch Accountant (Financial Institution)','Building Associate','Building Associate Professionals (nec)','Building Inspector','Chef','Chef-Head Chef','Chemistry Technical Officer','Civil Engineering Associate','Civil Engineering Technician','Commodities Trader','Computing Support Technician','Dental Hygienist','Dental Technician','Dental Therapist','Disabilities Services Officer','Electrical Engineering Associate','Electrical Engineering Technician','Electronic Engineering Associate','Electronic Engineering Technician','Engineering Associate Professionals (nec)','Family Support Worker','Financial Dealers and Brokers (nec)','Financial Institution Branch Manager','Financial Investment Adviser','Financial Market Dealer','Futures Trader','Hotel or Motel Manager (Degree Level)','Hotel or Motel Manager (Diploma Level)','Insurance Broker','Intensive Care Ambulance Paramedic','Interior Decorator','Library Technician','Massage Therapist','Mechanical Engineering Associate','Mechanical Engineering Technician','Medical Laboratory Technical Officer','Metallurgical and Materials Technician','Mine Deputy','Museum or Art Gallery Technician','Office Manager','Parole or Probation Officer','Plumbing Engineering Associate','Plumbing Inspector','Primary Products Inspector','Project or Program Administrator','Property Manager','Real Estate Agency Manager','Real Estate Salesperson','Residential Care Officer','Safety Inspector','Stockbroking Dealer','Surveying and Cartographic Associate','Youth Worker');
				
				for(j=0;j<(array3a.length);j++){
				var newoption=new Option(array3a[j],array3b[j]);	
			
				document.generalSkilledMigration.GSM_job.options[j]=newoption;}
			}
			else if(cat=='Tradespersons'){
				document.generalSkilledMigration.GSM_job.innerHTML='<option value="EMPTY">Please Select</option>';
				var array1=new Array('Please Select','Aircraft Maintenance Engineer (Avionics)','Aircraft Maintenance Engineer (Mechanical)','Aircraft Maintenance Engineer (Structures)','Aircraft Maintenance Engineers-Supervisor','Apparel Cutter','Automotive Electrician','Automotive Electricians-Supervisor','Baker','Bakers and Pastry cooks-Supervisor','Binder and Finisher','Blacksmith','Boat Builder and Repairer','Bricklayer','Bricklayers-Supervisor','Broadcast Transmitter Operator','Business Machine Mechanic','Butcher','Buttermaker or Cheesemaker','Cabinetmaker','Cabinetmakers-Supervisor','Cable Jointer','Canvas Goods Maker','Carpenter','Carpenter and Joiner','Carpentry and Joinery Tradespersons-Supervisor','Communications Linesperson','Communications Tradespersons-Supervisor','Confectioner','Cook','Drainer','Dressmaker','Electrical Powerline Tradesperson','Electrician (Special Class)','Electricians-Supervisor','Electrical Distribution Tradespersons-Supervisor','Electronic and Office Equipment Tradespersons-Supervisor','Electronic Equipment Tradesperson','Electronic Instrument Tradesperson (Special Class)','Electronic Instrument Tradespersons-Supervisor','Electroplater','Engraver','Farrier','Fibrous Plasterer','Fibrous Plasterers-Supervisor','Fitter','Flat Glass Tradesperson','Floor Finisher','Floor Finishers-Supervisor','Forging Tradespersons-Supervisor','Furniture Finisher','Furniture Upholsterer','Gasfitter','Gem Cutter and Polisher','General Clothing Tradesperson','General Communications Tradesperson','General Electrician','General Electronic Instrument Tradesperson','General Fabrication Engineering Tradesperson','General Fabrication Engineering Tradespersons-Supervisor','General Gardener','General Mechanical Engineering Tradesperson','General Mechanical Engineering Tradespersons-Supervisor','General Plumber','Glass Blower','Graphic Pre-Press Tradesperson','Greenkeeper','Gunsmith','Hairdresser','Hairdressers-Supervisor','Head Gardener','Jeweller','Joiner','Landscape Gardener','Leather Goods Maker','Lift Mechanic','Locksmith','Meat Tradespersons-Supervisor','Mechanical Services and Air-conditioning Plumber','Medical Grade Shoemaker','Metal Casting Tradesperson','Metal Casting Tradespersons-Supervisor','Metal Fabricator (Boilermaker)','Metal Finishing Tradespersons-Supervisor','Metal Fitters and Machinists-Supervisor','Metal Machinist (First Class)','Metal Polisher','Motor Mechanic','Motor Mechanics-Supervisor','Nursery person','Optical Mechanic','Painter and Decorator','Painters and Decorators-Supervisor','Panel Beater','Panel Beaters-Supervisor','Pastry cook','Pattern maker-Grader (Clothing)','Piano Tuner','Picture Framer','Plumbers-Supervisor','Precision Instrument Maker and Repairer','Precision Metal Tradespersons-Supervisor','Pressure Welder','Printing Machinist','Refrigeration and Air-conditioning Mechanic','Refrigeration and Air-conditioning Mechanics-Supervisor','Roof Plumber','Roof Slater and Tiler','Roof Slaters and Tilers-Supervisor','Sail Maker','Saw Maker and Repairer','Screen Printer','Sheetmetal Worker (First Class)','Sheetmetal Tradespersons-Supervisor','Shipwright','Shoemaker','Signwriter','Signwriters-Supervisor','Small Offset Printer','Smallgoods Maker','Solid Plasterer','Solid Plasterers-Supervisor','Stonemason','Structural Steel and Welding Tradespersons-Supervisor','Tailor','Textile, Clothing or Footwear Mechanic','Toolmaker','Toolmakers-Supervisor','Tradesperson and Related Workers (nec)','Tree Surgeon','Upholsterers and Bedding Tradespersons (nec)','Vehicle Body Maker','Vehicle Body Makers-Supervisor','Vehicle Painter','Vehicle Painters-Supervisor','Vehicle Trimmer','Vehicle Trimmers-Supervisor','Wall and Floor Tiler','Wall and Floor Tilers and Stonemasons-Supervisor','Watch and Clock Maker and Repairer','Welder (First Class)','Wood Tradespersons (nec)','Wood Turner');
				
				var array2=new Array('EMPTY','Aircraft Maintenance Engineer (Avionics)','Aircraft Maintenance Engineer (Mechanical)','Aircraft Maintenance Engineer (Structures)','Aircraft Maintenance Engineers-Supervisor','Apparel Cutter','Automotive Electrician','Automotive Electricians-Supervisor','Baker','Bakers and Pastry cooks-Supervisor','Binder and Finisher','Blacksmith','Boat Builder and Repairer','Bricklayer','Bricklayers-Supervisor','Broadcast Transmitter Operator','Business Machine Mechanic','Butcher','Buttermaker or Cheesemaker','Cabinetmaker','Cabinetmakers-Supervisor','Cable Jointer','Canvas Goods Maker','Carpenter','Carpenter and Joiner','Carpentry and Joinery Tradespersons-Supervisor','Communications Linesperson','Communications Tradespersons-Supervisor','Confectioner','Cook','Drainer','Dressmaker','Electrical Powerline Tradesperson','Electrician (Special Class)','Electricians-Supervisor','Electrical Distribution Tradespersons-Supervisor','Electronic and Office Equipment Tradespersons-Supervisor','Electronic Equipment Tradesperson','Electronic Instrument Tradesperson (Special Class)','Electronic Instrument Tradespersons-Supervisor','Electroplater','Engraver','Farrier','Fibrous Plasterer','Fibrous Plasterers-Supervisor','Fitter','Flat Glass Tradesperson','Floor Finisher','Floor Finishers-Supervisor','Forging Tradespersons-Supervisor','Furniture Finisher','Furniture Upholsterer','Gasfitter','Gem Cutter and Polisher','General Clothing Tradesperson','General Communications Tradesperson','General Electrician','General Electronic Instrument Tradesperson','General Fabrication Engineering Tradesperson','General Fabrication Engineering Tradespersons-Supervisor','General Gardener','General Mechanical Engineering Tradesperson','General Mechanical Engineering Tradespersons-Supervisor','General Plumber','Glass Blower','Graphic Pre-Press Tradesperson','Greenkeeper','Gunsmith','Hairdresser','Hairdressers-Supervisor','Head Gardener','Jeweller','Joiner','Landscape Gardener','Leather Goods Maker','Lift Mechanic','Locksmith','Meat Tradespersons-Supervisor','Mechanical Services and Air-conditioning Plumber','Medical Grade Shoemaker','Metal Casting Tradesperson','Metal Casting Tradespersons-Supervisor','Metal Fabricator (Boilermaker)','Metal Finishing Tradespersons-Supervisor','Metal Fitters and Machinists-Supervisor','Metal Machinist (First Class)','Metal Polisher','Motor Mechanic','Motor Mechanics-Supervisor','Nursery person','Optical Mechanic','Painter and Decorator','Painters and Decorators-Supervisor','Panel Beater','Panel Beaters-Supervisor','Pastry cook','Pattern maker-Grader (Clothing)','Piano Tuner','Picture Framer','Plumbers-Supervisor','Precision Instrument Maker and Repairer','Precision Metal Tradespersons-Supervisor','Pressure Welder','Printing Machinist','Refrigeration and Air-conditioning Mechanic','Refrigeration and Air-conditioning Mechanics-Supervisor','Roof Plumber','Roof Slater and Tiler','Roof Slaters and Tilers-Supervisor','Sail Maker','Saw Maker and Repairer','Screen Printer','Sheetmetal Worker (First Class)','Sheetmetal Tradespersons-Supervisor','Shipwright','Shoemaker','Signwriter','Signwriters-Supervisor','Small Offset Printer','Smallgoods Maker','Solid Plasterer','Solid Plasterers-Supervisor','Stonemason','Structural Steel and Welding Tradespersons-Supervisor','Tailor','Textile, Clothing or Footwear Mechanic','Toolmaker','Toolmakers-Supervisor','Tradesperson and Related Workers (nec)','Tree Surgeon','Upholsterers and Bedding Tradespersons (nec)','Vehicle Body Maker','Vehicle Body Makers-Supervisor','Vehicle Painter','Vehicle Painters-Supervisor','Vehicle Trimmer','Vehicle Trimmers-Supervisor','Wall and Floor Tiler','Wall and Floor Tilers and Stonemasons-Supervisor','Watch and Clock Maker and Repairer','Welder (First Class)','Wood Tradespersons (nec)','Wood Turner');
				
				for(j=0;j<(array1.length);j++){
				var newoption=new Option(array1[j],array2[j]);	
			
				document.generalSkilledMigration.GSM_job.options[j]=newoption;}
			}
			/*else if(cat=='Health_Care'){
				document.generalSkilledMigration.GSM_job.innerHTML='<option value="EMPTY">Please Select</option>';
				var array1=new Array('Please Select','Doctor','Medical Technician','Nurse');
				var array2=new Array('EMPTY','Doctor','Medical Technician','Nurse');
				
				for(j=0;j<(array1.length);j++){
				var newoption=new Option(array1[j],array2[j]);	
			
				document.generalSkilledMigration.GSM_job.options[j]=newoption;}
			}
			else if(cat=='Human_Resources'){
				document.generalSkilledMigration.GSM_job.innerHTML='<option value="EMPTY">Please Select</option>';
				var array1=new Array('Please Select','HR Manager','Assistant HR Manager','HR Coordinator');
				var array2=new Array('EMPTY','HR Manager','Assistant HR Manager','HR Coordinator');
				
				for(j=0;j<(array1.length);j++){
				var newoption=new Option(array1[j],array2[j]);	
			
				document.generalSkilledMigration.GSM_job.options[j]=newoption;}
			}
			else if(cat=='Information_Technology'){
				document.generalSkilledMigration.GSM_job.innerHTML='<option value="EMPTY">Please Select</option>';
				var array1=new Array('Please Select','Project Manager','Team Leader','Software Engineer','Web Developer','QA Engineer');
				var array2=new Array('EMPTY','Project Manager','Team Leader','Software Engineer','Web Developer','QA Engineer');
				
				for(j=0;j<(array1.length);j++){
				var newoption=new Option(array1[j],array2[j]);	
			
				document.generalSkilledMigration.GSM_job.options[j]=newoption;}
			}
			else if(cat=='Transportation'){
				document.generalSkilledMigration.GSM_job.innerHTML='<option value="EMPTY">Please Select</option>';
				var array1=new Array('Please Select','Area Manager','Tire Service Manager');
				var array2=new Array('EMPTY','Area Manager','Tire Service Manager');
				
				for(j=0;j<(array1.length);j++){
				var newoption=new Option(array1[j],array2[j]);	
			
				document.generalSkilledMigration.GSM_job.options[j]=newoption;}
			}*/
			//alert(newoption);
}	
//---------------------end of getting the job----------------------------------------

//---------------------get job for Australia Skilled Migration Visa - Subclass 175---------
function getjob2(ax){//alert(ax.value);
            var cat=ax.value;
			//var newoption=new Option('Select','EMPTY');
			var newoption=new Option('Please Select','EMPTY');
			if(cat=="EMPTY"){
					
					document.form175.work_ocupation.innerHTML='<option value="EMPTY">Please Select</option>';
					var array11=new Array('Please Select');
					for(m=0;m<(array11.length);m++){
					var newoption1=new Option(array11[m],m);	
				
					document.form175.work_ocupation.options[m]=newoption1;}
					}
			else if(cat=='Managers'){
				document.form175.work_ocupation.innerHTML='<option value="EMPTY">Please Select</option>';
				//document.form175.GSM_job.options[0]=newoption;
				var array1a=new Array('Please Select','Child Care Co-ordinator','Company Secretary','Construction Project Manager','Director of Nursing','Education Managers (nec)','Engineering Manager','Environment, Parks and Land Care Manager','Finance Manager','General Manager','Human Resource Manager','Information Technology Manager','Laboratory Manager','Medical Administrator','Policy And Planning Manager','Production Manager (Manufacturing)','Production Manager (Mining)','Project Builder','Regional Education Manager','Research and Development Manager','Sales and Marketing Manager','Sports Administrator','Supply and Distribution Manager','Welfare Centre Manager');
				
				var array1b=new Array('EMPTY','Child Care Co-ordinator','Company Secretary','Construction Project Manager','Director of Nursing','Education Managers (nec)','Engineering Manager','Environment, Parks and Land Care Manager','Finance Manager','General Manager','Human Resource Manager','Information Technology Manager','Laboratory Manager','Medical Administrator','Policy And Planning Manager','Production Manager (Manufacturing)','Production Manager (Mining)','Project Builder','Regional Education Manager','Research and Development Manager','Sales and Marketing Manager','Sports Administrator','Supply and Distribution Manager','Welfare Centre Manager');
				for(j=0;j<(array1a.length);j++){
				var newoption=new Option(array1a[j],array1b[j]);	
			
				document.form175.work_ocupation.options[j]=newoption;}
			}
			else if(cat=='Professionals'){
				document.form175.work_ocupation.innerHTML='<option value="EMPTY">Please Select</option>';
				var array2a=new Array('Please Select','Accountant','Accountant-Corporate Treasurer','Accountant-Internal Auditor','Accountant-External Auditor','Actuary','Acupuncturist','Advertising Specialist','Agricultural Adviser','Agricultural Scientist','Anatomist or Physiologist','Architect','Archivist','Art Teacher (Private)','Audiologist','Biochemist','Botanist','Building Surveyor','Business and Information Professionals (nec)','Careers Counsellor','Cartographer','Chemist','Chiropractor','Community Worker','Computing Professionals-(nec)','Computing Professionals-Applications and Analyst Programmer','Computing Professionals-Computer Systems Auditor','Computing Professionals-Software Designer','Computing Professionals-Systems Designer','Computing Professionals-Systems Manager','Computing Professionals-Systems Programmer','Conservator','Copywriter','Counsellors (nec)','Dance Teacher (Private)','Dental Specialist','Dentist','Dietitian','Drama Teacher (Private)','Drug and Alcohol Counsellor','Economist','Editor','Electorate Officer','Engineer-Aeronautical Engineer','Engineer-Agricultural Engineer','Engineer-Biomedical Engineer','Engineer-Building and Engineering Professionals (nec)','Engineer-Chemical Engineer','Engineer-Civil Engineer','Engineer-Civil Engineering Technologist','Engineer-Electrical Engineer 2125-11 Y 60','Engineer-Electrical or Electronics Engineering Technologist','Engineer-Electronics Engineer','Engineer-Engineering Technologists (nec)','Engineer-Industrial Engineer','Engineer-Materials Engineer','Engineer-Mechanical Engineer','Engineer-Mechanical Engineering Technologist','Engineer-Mining Engineer (excluding Petroleum)','Engineer-Naval Architect','Engineer-Petroleum Engineer','Engineer-Production or Plant Engineer','Environmental Health Officer','Environmental Research Scientist','Extractive Metallurgist','Family Counsellor','Fashion Designer','Forester','Geologist','Geophysicist','Graphic Designer','Health Information Manager','Historian','Illustrator','Industrial Designer','Industrial Relations Officer','Intelligence Officer','Interior Designer','Interpreter','Journalists and Related Professionals (nec)','Land Economist','Landscape Architect','Legal Practitioner-Barrister','Legal Practitioner-Solicitor','Librarian','Life Scientists (nec)','Management Consultant','Marine Biologist','Market Research Analyst','Marketing Specialist','Master Fisher','Materials Scientist','Mathematician','Medical Practitioner-Anaesthetist','Medical Practitioner-Dermatologist','Medical Practitioner-Emergency Medicine Specialist','Medical Practitioner-General Medical Practitioner','Medical Practitioner-Obstetrician and Gynaecologist','Medical Practitioner-Ophthalmologist','Medical Practitioner-Paediatrician','Medical Practitioner-Pathologist','Medical Practitioner-Psychiatrist','Medical Practitioner-Radiologist','Medical Practitioner-Specialist Medical Practitioners (nec)','Medical Practitioner-Specialist Physician','Medical Practitioner-Surgeon','Medical Scientist','Medical Scientist (Medical Physicist)','Meteorologist','Museum or Gallery Curator','Music Teacher (Private)','Natural and Physical Science Professionals (nec)','Naturopath','Nurse-Registered Developmental Disability Nurse','Nurse-Registered Mental Health Nurse','Nurse-Registered Midwife','Nurse-Registered Nurse','Occupational Health and Safety Officer','Occupational Therapist','Oenologist','Optometrist','Organisation and Methods Analyst','Orthoptist','Orthotist','Osteopath','Park Ranger','Patents Examiner','Personnel Consultant','Personnel Officer','Pharmacist-Hospital Pharmacist','Pharmacist-Industrial Pharmacist','Pharmacist-Retail Pharmacist','Physical Metallurgist','Physicist','Physiotherapist','Podiatrist','Policy Analyst','Print Journalist','Psychologist-Clinical Psychologist','Psychologist-Educational Psychologist','Psychologist-Organisational Psychologist','Psychologist-Psychologists (nec)','Public Relations Officer','Quality Assurance Manager','Quantity Surveyor','Radio Journalist','Radiographer-Medical Diagnostic Radiographer','Radiographer-Nuclear Medicine Technologist','Radiographer-Radiation Therapist','Radiographer-Sonographer','Records Manager','Recreation Officer','Rehabilitation Counsellor','Sales Representative (Industrial Products)','Sales Representative (Information and Communication Products)','Sales Representative (Medical and Pharmaceutical Products)','Seafarer-Ship\'s Engineer','Seafarer-Ship\'s Master','Seafarer-Ship\'s Officer','Social Professionals (nec)','Social Worker','Soil Scientist','Speech Pathologist','Statistician','Surveyor','Teacher-Education Officer','Teacher-Pre-Primary School Teacher','Teacher-Primary School Teacher','Teacher-Secondary School Teacher','Teacher-Vocational Education Teacher (Non-trades)','Teacher-Vocational Education Teacher (Trades)','Technical Sales Representatives (nec)','Technical Writer','Television Journalist','Training Officer','Translator','Urban and Regional Planner','Valuer','Veterinarian','Welfare Worker','Zoologist');
				
				var array2b=new Array('EMPTY','Accountant','Accountant-Corporate Treasurer','Accountant-Internal Auditor','Accountant-External Auditor','Actuary','Acupuncturist','Advertising Specialist','Agricultural Adviser','Agricultural Scientist','Anatomist or Physiologist','Architect','Archivist','Art Teacher (Private)','Audiologist','Biochemist','Botanist','Building Surveyor','Business and Information Professionals (nec)','Careers Counsellor','Cartographer','Chemist','Chiropractor','Community Worker','Computing Professionals-(nec)','Computing Professionals-Applications and Analyst Programmer','Computing Professionals-Computer Systems Auditor','Computing Professionals-Software Designer','Computing Professionals-Systems Designer','Computing Professionals-Systems Manager','Computing Professionals-Systems Programmer','Conservator','Copywriter','Counsellors (nec)','Dance Teacher (Private)','Dental Specialist','Dentist','Dietitian','Drama Teacher (Private)','Drug and Alcohol Counsellor','Economist','Editor','Electorate Officer','Engineer-Aeronautical Engineer','Engineer-Agricultural Engineer','Engineer-Biomedical Engineer','Engineer-Building and Engineering Professionals (nec)','Engineer-Chemical Engineer','Engineer-Civil Engineer','Engineer-Civil Engineering Technologist','Engineer-Electrical Engineer 2125-11 Y 60','Engineer-Electrical or Electronics Engineering Technologist','Engineer-Electronics Engineer','Engineer-Engineering Technologists (nec)','Engineer-Industrial Engineer','Engineer-Materials Engineer','Engineer-Mechanical Engineer','Engineer-Mechanical Engineering Technologist','Engineer-Mining Engineer (excluding Petroleum)','Engineer-Naval Architect','Engineer-Petroleum Engineer','Engineer-Production or Plant Engineer','Environmental Health Officer','Environmental Research Scientist','Extractive Metallurgist','Family Counsellor','Fashion Designer','Forester','Geologist','Geophysicist','Graphic Designer','Health Information Manager','Historian','Illustrator','Industrial Designer','Industrial Relations Officer','Intelligence Officer','Interior Designer','Interpreter','Journalists and Related Professionals (nec)','Land Economist','Landscape Architect','Legal Practitioner-Barrister','Legal Practitioner-Solicitor','Librarian','Life Scientists (nec)','Management Consultant','Marine Biologist','Market Research Analyst','Marketing Specialist','Master Fisher','Materials Scientist','Mathematician','Medical Practitioner-Anaesthetist','Medical Practitioner-Dermatologist','Medical Practitioner-Emergency Medicine Specialist','Medical Practitioner-General Medical Practitioner','Medical Practitioner-Obstetrician and Gynaecologist','Medical Practitioner-Ophthalmologist','Medical Practitioner-Paediatrician','Medical Practitioner-Pathologist','Medical Practitioner-Psychiatrist','Medical Practitioner-Radiologist','Medical Practitioner-Specialist Medical Practitioners (nec)','Medical Practitioner-Specialist Physician','Medical Practitioner-Surgeon','Medical Scientist','Medical Scientist (Medical Physicist)','Meteorologist','Museum or Gallery Curator','Music Teacher (Private)','Natural and Physical Science Professionals (nec)','Naturopath','Nurse-Registered Developmental Disability Nurse','Nurse-Registered Mental Health Nurse','Nurse-Registered Midwife','Nurse-Registered Nurse','Occupational Health and Safety Officer','Occupational Therapist','Oenologist','Optometrist','Organisation and Methods Analyst','Orthoptist','Orthotist','Osteopath','Park Ranger','Patents Examiner','Personnel Consultant','Personnel Officer','Pharmacist-Hospital Pharmacist','Pharmacist-Industrial Pharmacist','Pharmacist-Retail Pharmacist','Physical Metallurgist','Physicist','Physiotherapist','Podiatrist','Policy Analyst','Print Journalist','Psychologist-Clinical Psychologist','Psychologist-Educational Psychologist','Psychologist-Organisational Psychologist','Psychologist-Psychologists (nec)','Public Relations Officer','Quality Assurance Manager','Quantity Surveyor','Radio Journalist','Radiographer-Medical Diagnostic Radiographer','Radiographer-Nuclear Medicine Technologist','Radiographer-Radiation Therapist','Radiographer-Sonographer','Records Manager','Recreation Officer','Rehabilitation Counsellor','Sales Representative (Industrial Products)','Sales Representative (Information and Communication Products)','Sales Representative (Medical and Pharmaceutical Products)','Seafarer-Ship\'s Engineer','Seafarer-Ship\'s Master','Seafarer-Ship\'s Officer','Social Professionals (nec)','Social Worker','Soil Scientist','Speech Pathologist','Statistician','Surveyor','Teacher-Education Officer','Teacher-Pre-Primary School Teacher','Teacher-Primary School Teacher','Teacher-Secondary School Teacher','Teacher-Vocational Education Teacher (Non-trades)','Teacher-Vocational Education Teacher (Trades)','Technical Sales Representatives (nec)','Technical Writer','Television Journalist','Training Officer','Translator','Urban and Regional Planner','Valuer','Veterinarian','Welfare Worker','Zoologist');
				
				for(j=0;j<(array2a.length);j++){
				var newoption=new Option(array2a[j],array2b[j]);	
			
				document.form175.work_ocupation.options[j]=newoption;}
			}
			else if(cat=='Associate'){
				document.form175.work_ocupation.innerHTML='<option value="EMPTY">Please Select</option>';
				var array3a=new Array('Please Select','Aboriginal and Torres Strait Islander Health Worker','Ambulance Officer','Architectural Associate','Biomedical Engineering Associate','Branch Accountant (Financial Institution)','Building Associate','Building Associate Professionals (nec)','Building Inspector','Chef','Chef-Head Chef','Chemistry Technical Officer','Civil Engineering Associate','Civil Engineering Technician','Commodities Trader','Computing Support Technician','Dental Hygienist','Dental Technician','Dental Therapist','Disabilities Services Officer','Electrical Engineering Associate','Electrical Engineering Technician','Electronic Engineering Associate','Electronic Engineering Technician','Engineering Associate Professionals (nec)','Family Support Worker','Financial Dealers and Brokers (nec)','Financial Institution Branch Manager','Financial Investment Adviser','Financial Market Dealer','Futures Trader','Hotel or Motel Manager (Degree Level)','Hotel or Motel Manager (Diploma Level)','Insurance Broker','Intensive Care Ambulance Paramedic','Interior Decorator','Library Technician','Massage Therapist','Mechanical Engineering Associate','Mechanical Engineering Technician','Medical Laboratory Technical Officer','Metallurgical and Materials Technician','Mine Deputy','Museum or Art Gallery Technician','Office Manager','Parole or Probation Officer','Plumbing Engineering Associate','Plumbing Inspector','Primary Products Inspector','Project or Program Administrator','Property Manager','Real Estate Agency Manager','Real Estate Salesperson','Residential Care Officer','Safety Inspector','Stockbroking Dealer','Surveying and Cartographic Associate','Youth Worker');
				
				var array3b=new Array('EMPTY','Aboriginal and Torres Strait Islander Health Worker','Ambulance Officer','Architectural Associate','Biomedical Engineering Associate','Branch Accountant (Financial Institution)','Building Associate','Building Associate Professionals (nec)','Building Inspector','Chef','Chef-Head Chef','Chemistry Technical Officer','Civil Engineering Associate','Civil Engineering Technician','Commodities Trader','Computing Support Technician','Dental Hygienist','Dental Technician','Dental Therapist','Disabilities Services Officer','Electrical Engineering Associate','Electrical Engineering Technician','Electronic Engineering Associate','Electronic Engineering Technician','Engineering Associate Professionals (nec)','Family Support Worker','Financial Dealers and Brokers (nec)','Financial Institution Branch Manager','Financial Investment Adviser','Financial Market Dealer','Futures Trader','Hotel or Motel Manager (Degree Level)','Hotel or Motel Manager (Diploma Level)','Insurance Broker','Intensive Care Ambulance Paramedic','Interior Decorator','Library Technician','Massage Therapist','Mechanical Engineering Associate','Mechanical Engineering Technician','Medical Laboratory Technical Officer','Metallurgical and Materials Technician','Mine Deputy','Museum or Art Gallery Technician','Office Manager','Parole or Probation Officer','Plumbing Engineering Associate','Plumbing Inspector','Primary Products Inspector','Project or Program Administrator','Property Manager','Real Estate Agency Manager','Real Estate Salesperson','Residential Care Officer','Safety Inspector','Stockbroking Dealer','Surveying and Cartographic Associate','Youth Worker');
				
				for(j=0;j<(array3a.length);j++){
				var newoption=new Option(array3a[j],array3b[j]);	
			
				document.form175.work_ocupation.options[j]=newoption;}
			}
			else if(cat=='Tradespersons'){
				document.form175.work_ocupation.innerHTML='<option value="EMPTY">Please Select</option>';
				var array1=new Array('Please Select','Aircraft Maintenance Engineer (Avionics)','Aircraft Maintenance Engineer (Mechanical)','Aircraft Maintenance Engineer (Structures)','Aircraft Maintenance Engineers-Supervisor','Apparel Cutter','Automotive Electrician','Automotive Electricians-Supervisor','Baker','Bakers and Pastry cooks-Supervisor','Binder and Finisher','Blacksmith','Boat Builder and Repairer','Bricklayer','Bricklayers-Supervisor','Broadcast Transmitter Operator','Business Machine Mechanic','Butcher','Buttermaker or Cheesemaker','Cabinetmaker','Cabinetmakers-Supervisor','Cable Jointer','Canvas Goods Maker','Carpenter','Carpenter and Joiner','Carpentry and Joinery Tradespersons-Supervisor','Communications Linesperson','Communications Tradespersons-Supervisor','Confectioner','Cook','Drainer','Dressmaker','Electrical Powerline Tradesperson','Electrician (Special Class)','Electricians-Supervisor','Electrical Distribution Tradespersons-Supervisor','Electronic and Office Equipment Tradespersons-Supervisor','Electronic Equipment Tradesperson','Electronic Instrument Tradesperson (Special Class)','Electronic Instrument Tradespersons-Supervisor','Electroplater','Engraver','Farrier','Fibrous Plasterer','Fibrous Plasterers-Supervisor','Fitter','Flat Glass Tradesperson','Floor Finisher','Floor Finishers-Supervisor','Forging Tradespersons-Supervisor','Furniture Finisher','Furniture Upholsterer','Gasfitter','Gem Cutter and Polisher','General Clothing Tradesperson','General Communications Tradesperson','General Electrician','General Electronic Instrument Tradesperson','General Fabrication Engineering Tradesperson','General Fabrication Engineering Tradespersons-Supervisor','General Gardener','General Mechanical Engineering Tradesperson','General Mechanical Engineering Tradespersons-Supervisor','General Plumber','Glass Blower','Graphic Pre-Press Tradesperson','Greenkeeper','Gunsmith','Hairdresser','Hairdressers-Supervisor','Head Gardener','Jeweller','Joiner','Landscape Gardener','Leather Goods Maker','Lift Mechanic','Locksmith','Meat Tradespersons-Supervisor','Mechanical Services and Air-conditioning Plumber','Medical Grade Shoemaker','Metal Casting Tradesperson','Metal Casting Tradespersons-Supervisor','Metal Fabricator (Boilermaker)','Metal Finishing Tradespersons-Supervisor','Metal Fitters and Machinists-Supervisor','Metal Machinist (First Class)','Metal Polisher','Motor Mechanic','Motor Mechanics-Supervisor','Nursery person','Optical Mechanic','Painter and Decorator','Painters and Decorators-Supervisor','Panel Beater','Panel Beaters-Supervisor','Pastry cook','Pattern maker-Grader (Clothing)','Piano Tuner','Picture Framer','Plumbers-Supervisor','Precision Instrument Maker and Repairer','Precision Metal Tradespersons-Supervisor','Pressure Welder','Printing Machinist','Refrigeration and Air-conditioning Mechanic','Refrigeration and Air-conditioning Mechanics-Supervisor','Roof Plumber','Roof Slater and Tiler','Roof Slaters and Tilers-Supervisor','Sail Maker','Saw Maker and Repairer','Screen Printer','Sheetmetal Worker (First Class)','Sheetmetal Tradespersons-Supervisor','Shipwright','Shoemaker','Signwriter','Signwriters-Supervisor','Small Offset Printer','Smallgoods Maker','Solid Plasterer','Solid Plasterers-Supervisor','Stonemason','Structural Steel and Welding Tradespersons-Supervisor','Tailor','Textile, Clothing or Footwear Mechanic','Toolmaker','Toolmakers-Supervisor','Tradesperson and Related Workers (nec)','Tree Surgeon','Upholsterers and Bedding Tradespersons (nec)','Vehicle Body Maker','Vehicle Body Makers-Supervisor','Vehicle Painter','Vehicle Painters-Supervisor','Vehicle Trimmer','Vehicle Trimmers-Supervisor','Wall and Floor Tiler','Wall and Floor Tilers and Stonemasons-Supervisor','Watch and Clock Maker and Repairer','Welder (First Class)','Wood Tradespersons (nec)','Wood Turner');
				
				var array2=new Array('EMPTY','Aircraft Maintenance Engineer (Avionics)','Aircraft Maintenance Engineer (Mechanical)','Aircraft Maintenance Engineer (Structures)','Aircraft Maintenance Engineers-Supervisor','Apparel Cutter','Automotive Electrician','Automotive Electricians-Supervisor','Baker','Bakers and Pastry cooks-Supervisor','Binder and Finisher','Blacksmith','Boat Builder and Repairer','Bricklayer','Bricklayers-Supervisor','Broadcast Transmitter Operator','Business Machine Mechanic','Butcher','Buttermaker or Cheesemaker','Cabinetmaker','Cabinetmakers-Supervisor','Cable Jointer','Canvas Goods Maker','Carpenter','Carpenter and Joiner','Carpentry and Joinery Tradespersons-Supervisor','Communications Linesperson','Communications Tradespersons-Supervisor','Confectioner','Cook','Drainer','Dressmaker','Electrical Powerline Tradesperson','Electrician (Special Class)','Electricians-Supervisor','Electrical Distribution Tradespersons-Supervisor','Electronic and Office Equipment Tradespersons-Supervisor','Electronic Equipment Tradesperson','Electronic Instrument Tradesperson (Special Class)','Electronic Instrument Tradespersons-Supervisor','Electroplater','Engraver','Farrier','Fibrous Plasterer','Fibrous Plasterers-Supervisor','Fitter','Flat Glass Tradesperson','Floor Finisher','Floor Finishers-Supervisor','Forging Tradespersons-Supervisor','Furniture Finisher','Furniture Upholsterer','Gasfitter','Gem Cutter and Polisher','General Clothing Tradesperson','General Communications Tradesperson','General Electrician','General Electronic Instrument Tradesperson','General Fabrication Engineering Tradesperson','General Fabrication Engineering Tradespersons-Supervisor','General Gardener','General Mechanical Engineering Tradesperson','General Mechanical Engineering Tradespersons-Supervisor','General Plumber','Glass Blower','Graphic Pre-Press Tradesperson','Greenkeeper','Gunsmith','Hairdresser','Hairdressers-Supervisor','Head Gardener','Jeweller','Joiner','Landscape Gardener','Leather Goods Maker','Lift Mechanic','Locksmith','Meat Tradespersons-Supervisor','Mechanical Services and Air-conditioning Plumber','Medical Grade Shoemaker','Metal Casting Tradesperson','Metal Casting Tradespersons-Supervisor','Metal Fabricator (Boilermaker)','Metal Finishing Tradespersons-Supervisor','Metal Fitters and Machinists-Supervisor','Metal Machinist (First Class)','Metal Polisher','Motor Mechanic','Motor Mechanics-Supervisor','Nursery person','Optical Mechanic','Painter and Decorator','Painters and Decorators-Supervisor','Panel Beater','Panel Beaters-Supervisor','Pastry cook','Pattern maker-Grader (Clothing)','Piano Tuner','Picture Framer','Plumbers-Supervisor','Precision Instrument Maker and Repairer','Precision Metal Tradespersons-Supervisor','Pressure Welder','Printing Machinist','Refrigeration and Air-conditioning Mechanic','Refrigeration and Air-conditioning Mechanics-Supervisor','Roof Plumber','Roof Slater and Tiler','Roof Slaters and Tilers-Supervisor','Sail Maker','Saw Maker and Repairer','Screen Printer','Sheetmetal Worker (First Class)','Sheetmetal Tradespersons-Supervisor','Shipwright','Shoemaker','Signwriter','Signwriters-Supervisor','Small Offset Printer','Smallgoods Maker','Solid Plasterer','Solid Plasterers-Supervisor','Stonemason','Structural Steel and Welding Tradespersons-Supervisor','Tailor','Textile, Clothing or Footwear Mechanic','Toolmaker','Toolmakers-Supervisor','Tradesperson and Related Workers (nec)','Tree Surgeon','Upholsterers and Bedding Tradespersons (nec)','Vehicle Body Maker','Vehicle Body Makers-Supervisor','Vehicle Painter','Vehicle Painters-Supervisor','Vehicle Trimmer','Vehicle Trimmers-Supervisor','Wall and Floor Tiler','Wall and Floor Tilers and Stonemasons-Supervisor','Watch and Clock Maker and Repairer','Welder (First Class)','Wood Tradespersons (nec)','Wood Turner');
				
				for(j=0;j<(array1.length);j++){
				var newoption=new Option(array1[j],array2[j]);	
			
				document.form175.work_ocupation.options[j]=newoption;}
			}
}

function chk_dup1(){
	if (request.readyState == 1) {
		document.all.aj_msg.innerHTML="Loading.....";
		document.all.aj_button.disabled="Disabled";
		
	}
	if (request.readyState == 4) {
		document.all.aj_msg.innerHTML="";

    	if (request.status == 200) {
		 
		
			document.add_kids_front.aj_button.disabled=false;
			document.add_kids_front.add_city.disabled=false;													
			var ajax_result_array=request.responseText.split("#*");
			var newoption=new Option('Select','EMPTY');
						//alert(request.responseText);
			document.add_kids_front.add_city.options[0]=newoption;
			
			for(var j=1;j<(ajax_result_array.length);j++){
				var temp=ajax_result_array[j].split("$@");
				var newoption=new Option(temp[1],temp[0]);
				document.add_kids_front.add_city.options[j]=newoption;
		
			}																																							
		}
		else {
    		alert('There was a problem with the request.');
		}
	}		
}	
