function onSub(form, e, strParam) {
  var keycode;
  if (window.event) keycode = window.event.keyCode;
  else if (e) keycode = e.which;
  else return true;
  if (keycode == 13) {
    submit_form (form, strParam);
    return false;
  } else return true;
}


function submit_form()
{ 
 var arrArgs = submit_form.arguments;
 var oForm = arrArgs[0];
 var strParam = arrArgs[1];
 var strIn1, strIn2, strIn3, strIn4, strIn5;
 
if (strParam == 'seek')
{ if ("[" + typeof(oForm.catlocation.value) + "]"!="[undefined]")
	{	strIn1 = oForm.catlocation.value;
		strIn2 = oForm.keywords.value;
		strIn3 = oForm.catindustry.value;
	}else
	{	strIn1 = '';
	}
	window.location.href = "http://www.seek.co.nz/jobsearch/index.ascx?tracking=sk:isl:sknz:msnnz:1:hp:intsb&"+"catlocation="+strIn1+"&keywords="+strIn2+"&catindustry="+strIn3;
}

else if (strParam == 'seek2')
{ if ("[" + typeof(oForm.catlocation.value) + "]"!="[undefined]")
	{	strIn1 = oForm.catlocation.value;
		strIn3 = oForm.catindustry.value;
	}else
	{	strIn1 = '';
	}
	//window.location.href = "http://www.seek.co.nz/jobsearch/index.ascx?tracking=sk:int:sknz:msnnz:1:windowslive:intsbtab&catlocation="+strIn1+"&catindustry="+strIn3;
window.open("http://www.seek.co.nz/jobsearch/index.ascx?tracking=sk:int:sknz:msnnz:1:windowslive:intsbtab&catlocation="+strIn1+"&catindustry="+strIn3);
}

else if (strParam == 'match')
{ if ("[" + typeof(oForm.GC.value) + "]"!="[undefined]")
	{	strIn1 = oForm.GC.value;
		strIn2 = oForm.TR.value;
		strIn3 = oForm.LAge.value;
		strIn4 = oForm.UAge.value;
		strIn5 = oForm.SL.value;
	}else
	{	strIn1 = '';
	}

	window.location.href = "http://match.nz.msn.com/search/search.aspx?pg=channel&tcid=1003860&searchaction=search&CL=168&GC="+strIn1+"&TR="+strIn2+"&LAge="+strIn3+"&UAge="+strIn4+"&SL="+strIn5;
}

else if (strParam == 'live')
{ if ("[" + typeof(oForm.q.value) + "]"!="[undefined]")
	{	strIn1 = oForm.q.value;
	}else
	{	strIn1 = '';
	}
if(oForm.frmtarget == undefined)
	window.location.href = "http://search.live.com/results.aspx?q="+strIn1+"&mkt=en-nz&FORM=MSNH";
else
 window.open("http://search.live.com/results.aspx?q="+strIn1+"&mkt=en-nz&FORM=MSNH");
}


 return false;
}

function fnSet(){
 var mh = document.getElementById('mh');
 if(mh && typeof(mh.setHomePage)!="undefined")
 {
  mh.setHomePage('http://msn.co.nz/');
  event.returnValue = false;
  return false;
 }
}









