function saveApply(jobId, companyId) {

	// 发送数据
	$.ajax( {
		type : "post",
		dataType : "json",
		url : "job.php",
		data : "action=saveApp&jobid=" + jobId + "&companyid=" + companyId + makedatafromId("sentLetter,sentJobname"),
		success : function(msg) {
			
			if (msg.is_suc == 3) {
				$("#dialog-content").html(msg.out_msg);
				redirect('/module/human/resume-basic.php', 2);
			} else {
				$("#dialog-content").html(msg.out_msg);
			}
		}
	});
}

function saveFav(jobId) {
	$.weeboxs.open('正在加载...', {
		title : '职位收藏',
		showButton : true,
		showCancel : true,
		showOk:false,
		cancelBtnName:'关闭窗口'
	});

	// 发送数据
	$.ajax( {
		type : "post",
		dataType : "json",
		url : "job.php",
		data : "action=saveFav&jobid=" + jobId,
		success : function(msg) {
			
			if (msg.is_suc == 1) {
				$("#dialog-content").html(msg.out_msg);
				redirect(msg.url, 2);
			} else {
				$("#dialog-content").html(msg.out_msg);
			}

		}
	});

}

function login() {

$.ajax({
	type: "post",
	dataType: "json",
	url: "/module/login.php",
	data: "action=login"+makedatafromId("username,password,code,rememberpass"),
	success: function(msg){
		if(msg.is_suc==1)
		{
			showInfo();
		}
		else
		{
			alert(msg.out_msg);
			$("#code").val('');
			$("#codeimg").attr("src","/module/validateImg.php?t="+Math.random());
		}
	}
	});

	return false;

}



function appInfo(){
	
	$.weeboxs.open('正在加载...', {
		title : '职位申请',
		showButton : true,
		showCancel : true,
		showOk:false,
		cancelBtnName:'关闭窗口'
	});	

	$.ajax( {
		type : "post",
		dataType : "json",
		url : "job.php",
		data : "action=showInfo",
		success : function(msg) {
			
			if (msg.is_suc == 1) {
				showInfo();
			}else {
				$("#dialog-content").html(msg.out_msg);
			}
		}
	});
	
}