var path="";
$J(document).ready(function(){
   
//    $J("#CancelLogin").click(function(){
//		CancelLogin_Click();
//	});	

	//load hotjob
	//GetHotJob(School);
	
	//GetHotJob(Society);    
	
});
function GetHotJob(type)//1 school 2 society
{
	$J.ajax(
	{
		type:"GET",
		url:"bi/jobservice.aspx",
		data:{method:"PopJob",recruittype:type},		
		success:function(data){
			
			if (data != "") {
			    
				ShowHotJob(type,eval( '(' + data + ')' ));
			}
			
		},
		error:function(XMLHttpRequest, textStatus, errorThrown)
		{
			
		}
	}
	);
};
function ShowHotJob(type,jobnames)//contentid 装载热门工作的HTML元素ID，jobnames 工作名称数组
{
	if(jobnames.lenght==0)
	return;

	var ulstr="<table width='100%'>"
	var sname = "";
	for(var i=0;i<4;i++)
	{
		var trindex = i%2;
		
		if(trindex==0)
		ulstr=ulstr+"<tr>";
		ulstr=ulstr+"<td class='JobTD' width='50%'><a href='ui/job/job.aspx?name="+ encodeURI(jobnames[i].JobName)+"&recruittype="+type+"'>"+jobnames[i].JobName+"</a><td>"
		if(trindex==1)
		ulstr=ulstr+"</tr>";
	}
	
	ulstr=ulstr+"</table>"
    
	
	
	switch(type)
	{
		case "School":
		$J("#SchoolHotJobTD").html(ulstr);
		break;
		case "Society":
		$J("#SocietyHotJobTD").html(ulstr);
		break;
	}
	
}

function LoginSuccessDo(registerInfo)
{
    
	window.location  = AppPath+"ui/console/console.aspx?recruitType=" + registerInfo.RecruitType;
}
