<!--

//opens a new popup window containing the page from parameter "url":
var newWin;
function WinOpen(url,title,w,h){
	w=parseInt(w);
	h=parseInt(h);
	if (!mac) if (new String(newWin)!="undefined" && newWin!=null) if (!newWin.closed) newWin.close();
	newWin=window.open(url,title,"width="+w+",height="+h+",top=0,left=0,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes,z-lock=yes");
	//if (mac) win.resizeTo(w+25,h+50);
	newWin.focus();
}

//used for paging:
function GoToPageNo(page){
	document.frmMain.page.value=page;
	document.frmMain.submit();
}

function AddToPortfolio(jobid,vac) {
	self.location.href=site_sslpath+"candidate_addport.asp?jobid="+jobid
}

function ApplyJob(jobid,vac) {
	self.location.href=site_path+"candidates_apply.asp?jobid="+jobid
	//document.frmApply.submit();
}

function SubmitSearchJobs(frm){
	frm.submit();
}

function DisplayRandomLogos(){
	
	var no1=parseInt(Math.random()*(arr.length));
	if (no1>arr.length-1) no1=0
	
	document.write(no1);
}



var arrLogos=new Array("logo_01.gif","logo_02.gif","logo_03.gif","logo_04.gif","logo_05.gif","logo_07.gif","logo_08.gif","logo_10.gif","logo_11.gif","logo_12.gif","logo_13.gif","logo_14.gif","logo_15.gif");

var Found=false
var Current = new Array()
var MaxValue=12 //(Example 2 is equal to: 0,1,2)
var NumUnique=3  //The number of unique numbers required
var Count=0
var Current = new Array(NumUnique)
GetUnique()

function GetUnique()
{
  for (i=0;Count<NumUnique;Count++)
  {
    Found=false
    var rndValue = get_random()
    var j=0
    for (j=0;j<Current.length;j++)
    {
      if (Current[j] == rndValue)
      {
        Found=true
        break
      }
    }
    if (Found)
    {
      Count--
    } else {
      Current[Count]=rndValue
    }
  }
}

function get_random()
{
  var ranNum= Math.round(Math.random()*MaxValue);
  return ranNum;
}
//-->
