function openTopJobsWin(url) {
  x=Math.max(1, screen.width-798);
  y=1;
  h=Math.min(640, screen.availHeight);
  windowName='topjobs';
  if (self.name=='topjobs') {
    x=1;
    y=40;
    windowName='topjobs2';
  }
  window.open(url, windowName, 'width=788,height='+h+',top='+y+',left='+x+',scrollbars=yes,toolbar=yes,status=yes,menubar=yes,location=yes,resizable=yes').focus();
}
function showTopJobs(element,all) {
  if (all) {
    jobsToShow = jobs.length;
    firstJob = 0;
  } else {
    jobsToShow = 6;
    firstJob = new Date().getTime() % jobs.length;
  }
  jobsList = new String();
  for (count = 0; count < jobsToShow && count < jobs.length; count++) {
    index = (firstJob + count) % jobs.length;
    jobsList += jobs[index].listing();
  }
  $("#"+element).append(jobsList);
}
