function call_post_job_submit()
	{
		var obj = document.getElementById('selShowFormAdd');
		obj.innerHTML = "<img src=\"../images/loadingBig.gif\" />";
		document.getElementById('add_job_old_company_select_submit').style.display='none';
		box = document.forms['addjob1'].company_name_id;
		var company = box.options[box.selectedIndex].value;
		url = siteURL +'members/addJob_ajax.php?company_name_id='+company+'&add_job_old_company_select_submit=add_job_old_company_select_submit';
		AG_ajax(url,'call_post_job_show');
		return false;
	}

function call_post_job_show(data)
	{
		data = unescape(data);
		if(data.indexOf(find_word)<1)
			{
				location.replace(replace_url);return;
			}
		data = data.replace(replace_word,'');
		var obj = document.getElementById('selShowFormAdd');
		obj.innerHTML = data;
	}

function call_post_job_new_submit()
	{
		box = document.forms['addjob'].industry_id;
		var industry_id = box.options[box.selectedIndex].value;
		var title = document.getElementById('title').value;
		var description = escape(document.addjob.description.value);
		var keyword = document.getElementById('keyword').value;
		box = document.forms['addjob'].type_id;
		var type_id = box.options[box.selectedIndex].value;
		box = document.forms['addjob'].region_list;
		var region_list = box.options[box.selectedIndex].value;
		try
			{

				box = document.forms['addjob'].city_list;
				var city_list = box.options[box.selectedIndex].value;
			}
		catch(e){}
		box = document.forms['addjob'].offering_from_day;
		var offering_from_day = box.options[box.selectedIndex].value;
		box = document.forms['addjob'].offering_from_month;
		var offering_from_month = box.options[box.selectedIndex].value;
		box = document.forms['addjob'].offering_from_year;
		var offering_from_year = box.options[box.selectedIndex].value;

		box = document.forms['addjob'].offering_to_day;
		var offering_to_day = box.options[box.selectedIndex].value;
		box = document.forms['addjob'].offering_to_month;
		var offering_to_month = box.options[box.selectedIndex].value;
		box = document.forms['addjob'].offering_to_year;
		var offering_to_year = box.options[box.selectedIndex].value;

		var sal_min = document.getElementById('sal_min').value;
		var sal_max = document.getElementById('sal_max').value;
		box = document.forms['addjob'].currency_id;
		var currency_id = box.options[box.selectedIndex].value;
		box = document.forms['addjob'].period_id;
		var period_id = box.options[box.selectedIndex].value;
		box = document.forms['addjob'].work_experience;
		var work_experience = box.options[box.selectedIndex].value;
		var company_name_id = document.getElementById('company_name_id').value;
		var contact_name = document.getElementById('contact_name').value;
		var email = document.getElementById('email').value;
		var phone = document.getElementById('phone').value;
		var reference_code = document.getElementById('reference_code').value;

		if(document.getElementById('status_yes').checked === true)
			var status = 'Active';
		else
			var status = 'InActive';
		if(document.getElementById('alert_email_yes').checked === true)
			var alert_email = 'Yes';
		else
			var alert_email = 'No';
		url = siteURL +'members/addJob_ajax.php?industry_id='+industry_id+'&title='+title+'&description='+description+'&offering_from_day='+offering_from_day+'&offering_from_year='+offering_from_year+'&offering_from_month='+offering_from_month+'&offering_to_day='+offering_to_day+'&offering_to_year='+offering_to_year+'&offering_to_month='+offering_to_month+'&keyword='+keyword+'&type_id='+type_id+'&region_list='+region_list+'&city_list='+city_list+'&sal_min='+sal_min+'&sal_max='+sal_max+'&period_id='+period_id+'&currency_id='+currency_id+'&work_experience='+work_experience+'&company_name_id='+company_name_id+'&email='+email+'&contact_name='+contact_name+'&phone='+phone+'&reference_code='+reference_code+'&status='+status+'&alert_email='+alert_email+'&add_job_submit=add_job_submit';

		AG_ajax(url,'call_post_job_new_show');
		return false;

	}

function call_post_job_new_show(data)
	{
		data = unescape(data);
		if(data.indexOf(find_word)<1)
			{
				location.replace(replace_url);return;
			}
		data = data.replace(replace_word,'');
		if (data == 'REDIRECT')
			parent.document.location = 'employeeIndex.php?msg=1';
		var obj = document.getElementById('selShowFormAdd');
		obj.innerHTML = data;
	}

var split_word = '|||';
function call_ajax_city_list(url)
	{
		var obj = document.getElementById('ajax_city_id');
		obj.innerHTML = '';
		country = document.addjob.country;
		country_code = country.options[country.selectedIndex].value;
		region = document.addjob.region_list;
		region_code = region.options[region.selectedIndex].value;
		url = siteURL + url + '?region_code=' + region_code +'&country_code=' + country_code;
		new AG_ajax(url,'call_ajax_city_show');
		return false;

	}
function call_ajax_city_show(data)
	{
		data = unescape(data);
		var obj = document.getElementById('ajax_city_id');
		if(obj!=null)
			{
				obj.innerHTML = data;
			}
	}
/*
function call_ajax_job_region_list(url)
	{
		var obj = document.getElementById('ajax_region_id');
		obj.innerHTML = '';
		var obj = document.getElementById('ajax_city_id');
		obj.innerHTML = '';
		country = document.addjob.country;
		country_code = country.options[country.selectedIndex].value;
		url = siteURL + url + '?country_code=' + country_code;
		new AG_ajax(url,'call_ajax_job_region_show');
		return false;
	}

function call_ajax_job_region_show(data)
	{
        data = unescape(data);
		var obj = document.getElementById('ajax_region_id');
        if( data.substr(data.indexOf('option'))!=0)
            {
        		if(obj!=null)
        			{
        				obj.innerHTML = data;
        			}
        	}
        var obj = document.getElementById('ajax_region_id_td');
        obj.style.display = 'block';
	}
*/
function call_ajax_job_city_list(url)
	{
		var obj = document.getElementById('ajax_city_id');
		obj.innerHTML = '';
		country = document.addjob.country;
		country_code = country.options[country.selectedIndex].value;
		region = document.addjob.region_list;
		region_code = region.options[region.selectedIndex].value;
		url = siteURL + url + '?region_code=' + region_code +'&country_code=' + country_code;
		new AG_ajax(url,'call_ajax_job_city_show');
		return false;
	}
function call_ajax_job_city_show(data)
	{
		data = unescape(data);
		var obj = document.getElementById('ajax_city_id');
		if(obj!=null)
			{
				obj.innerHTML = data;
			}
	}