// JavaScript Document
<!--
function BrowseBy(By){
  if(By=='Location'){
    document.ImgKeyword.src='/images/ojoby/popular-gray.gif';
    document.ImgLocation.src='/images/ojoby/location-green.gif';
    document.getElementById('DivKeyword').style.display ='None';
    document.getElementById('DivLocation').style.display='Block';
  }else{
    document.ImgKeyword.src='/images/ojoby/popular-green.gif';
    document.ImgLocation.src='/images/ojoby/location-gray.gif';
    document.getElementById('DivKeyword').style.display='Block';
    document.getElementById('DivLocation').style.display='None';
  }
  
  //div='wrapperMiddle';
  //url='/browse_by.php?By='+By+'&Rand='+Math.random( );
  //makeRequest(div,url);
}

function ClearMyRecentSearches(){
  div='MyRecentSearches';
  url='/browse_by.php?Clear=Yes';
  makeRequest(div,url);
}


function SearchJob(){
  var Loc=document.SearchForm.location.value;
  var Key=document.SearchForm.keyword.value;
  Loc=Loc.toLowerCase() ;
  //Loc.replace(\[[^\]]*\], '');
  
  while(Loc.indexOf('  ')!= -1 )Loc=Loc.replace('  ',' ');
  while(Key.indexOf('  ')!= -1 )Key=Key.replace('  ',' ');
  
  while(Loc.indexOf(' ')!= -1 )Loc=Loc.replace(' ','-');
  while(Key.indexOf(' ')!= -1 )Key=Key.replace(' ','-');
  
  
  Key=Key.replace(' ','-').toLowerCase() ;
  Loc=Loc.toLowerCase() ;
  Key=Key.toLowerCase() ;
 
  if(Key!=''){
    URL='/'+Key+'-jobs';
    if(Loc!='')URL=URL+'-in-'+Loc;  
  }
  else if(Loc!=''){
    URL='/jobs-in-'+Loc;  
  }else{
   alert('Please Enter Keyword or location');
   return;
  }
  window.location=URL+'.html';
}

function doOpen(id){ 
	hideAll();
	document.getElementById('initContent'+id).style.display = 'block';
	document.getElementById('img'+id).innerHTML = '<img src="/images/ojoby/minus.gif" class="icon" border="0"/>';
}

function hideAll()
{
	for(i=1;i<=3;i++)
	{
		document.getElementById('initContent'+i).style.display = 'none';
		document.getElementById('img'+i).innerHTML = '<img src="/images/ojoby/plus.gif" class="icon" border="0" />';
	}
}

