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

function main_tab_mouse_on(index){
	document.getElementById('menu_arrow_'+index).src='images/downarrow_on.gif';
}

function main_tab_mouse_off(index){
	document.getElementById('menu_arrow_'+index).src='images/downarrow.gif';
}

function menu_click(index){
	if(document.getElementById('main_tab2_'+index).style.display!='block')
	{
		//closing all other opened submenus
		for (i=1;document.getElementById('main_tab2_'+i)!=null;i++)
		{               document.getElementById('main_tab2_'+i).style.display='none';
		}
		document.getElementById('main_tab2_'+index).style.display='block';
	}
	else
		document.getElementById('main_tab2_'+index).style.display='none';
}

function load_input_default(id, value){
	$('div.page #'+id).each(function() {
		if (this.value=='')
		{
			this.value = value;
		}
	});
}

function clear_all_fields()
{
	document.advanced_search.keywords.value = '';
	document.advanced_search.mult_industries.selectedIndex = -1;
	document.advanced_search.exp_level.selectedIndex = -1;
	document.advanced_search.position_type.selectedIndex = -1;
    document.advanced_search.city_state_zip.value = 'City and State or Zip Code';
	document.advanced_search.zip_radius.selectedIndex = 1;
	document.advanced_search.education.selectedIndex = 0;
	document.advanced_search.req_travel.selectedIndex = 0;
	document.advanced_search.min_salary.value = '';
	document.advanced_search.max_salary.value = '';
	document.advanced_search.salary_type.selectedIndex = 0;
	document.advanced_search.telecom.selectedIndex = 0;
	document.advanced_search.employer_type.selectedIndex = 0;
	document.advanced_search.save_search.selectedIndex = 0;
	document.advanced_search.search_name.value = '';
}
