function formsubmit(butt)
{
	$(butt).replaceWith( "<span class='dgwindow'><img class='os' src='images/loading.gif' /></span><span>启动中...</span>" );
	var jp= new monor_jsonp();
	jp.url='http://'+cfg_remote_host+"/co_main.php?eb5707348=eminershow&t=" + Math.random()+"&callback=?";
	jp.default_errmaininfo="<div class='dgmsg_error'><div class='initmsg'><img class='faceimg' src='images/dg_face/face_error.png'/><span>"+"您的身份标识验证失败，请再重试一次或联系官网客服"+"</span></div></div>";
	jp.default_sucmaininfo=="<div class='dgmsg_success'><div class='initmsg'><img class='faceimg' src='images/dg_face/face_success.png'/><span>"+"身份标识验证成功，现在开始工作中"+"</span></div></div>";
	
	
	$("#go").html();		
	
	
	
	jp.callbackfunc=function(data) {
		jp.localloginfinish=true;
		$("#infotable").hide();
		$("#repaircostart").show();
		
		if(data.status=='success'){
			var c='co_getsource_url_action.php';
			var formpostdata=$(document.form1).serialize();
			var eminer0 = new co_pub();
			eminer0.ed70276a8=true;
			eminer0.efabd4b3b='采集进行中。。。';
			
			$("div#pubdataconsolearea input#b116").bind('click',{'owner':eminer0},eminer0.togglecopub);
			if(document.form1.ebee555a9.value==1)eminer0.eminercoerr_allownum=$paramarr["cfg_search_err_allownum"];
			else eminer0.eminercoerr_allownum=$paramarr["cfg_eminercoerr_allownum"];
			
			if(!eminer0.eminercoerr_allownum)eminer0.eminercoerr_allownum=0;
			if($paramarr["cfg_eminerpuberr_allownum"])eminer0.eminerpuberr_allownum=$paramarr["cfg_eminerpuberr_allownum"];
			else eminer0.eminerpuberr_allownum=0;
			if($("input[name='e8afb736c']").val() && parseInt($("input[name='e8afb736c']").val())<$paramarr["cfg_search_err_allownum"]){
				eminer0.eminercoerr_allownum = parseInt($("input[name='e8afb736c']").val());
			}
			var tipinfo='';
			if(data.info)tipinfo=data.info;
			else tipinfo=jp.default_sucmaininfo;
			$("#go").html(tipinfo);
			c += "?e9d2722af=1&action=robot&kw_g=1&ecab1c4fe=1&e6dd1f3ba=1&eabd06204=1&ec7fca41a=1&e05ca0eb9=1&e66756569=1&donow=1&temp_origin=1&"+formpostdata;
			eminer0.eminerco(c);
		}else{
			jp.err_handle(data);
		}
	};
	jp.err_handle=function(data) {
		jp.localloginfinish=true;
		$("#infotable").hide();
		$("#repaircostart").show();
		if(!data)data={};
		if(!data.info ) $("#go").html(jp.default_errmaininfo);
		else{
			$("#go").html(infos[0]);
		}
	};	
	jp.do_locallogin();
}
function showtitletypechange(radio){
	if($(radio).val()=='0'){
		$(radio).closest("tr").find(".pagesizesetarea").hide();
		if(parseInt($("input.sptime").val())<1 || $("input.sptime").val()=="")$("input.sptime").val(1);
	}else{
		$(radio).closest("tr").find(".pagesizesetarea").show();
	}
}
function savesetting(butt)
{
	if(em_usrrank<10 && $("#eaaed87de").val()=='emusr1') {
		alert("此节点为公共示例节点，不能修改！");
		return false;
	}
	formpostdata=$(butt.form).serialize();
	 var s = $.ajax({
		type: "GET",
		url: "?ajax=1&eb5707348=savesetting&nid="+butt.form.nid.value+"&setting="+encodeURIComponent(formpostdata)+"&t=" + Math.random(),
		data: null,
		dataType: "json" ,
		cache: false,
		async: false,
		success: function(data){
			alert(data.info);
		},
		error: function(XMLHttpRequest, textStatus, errorThrown) {
			alert("设置故障，未保存成功,故障原因："+textStatus);
		}
	});	
}

$(document).ready(function(){ 
$("input[id^='fetchcode_']").keydown(function(e){ 
if(e.which == 13){ 
$("#codesubmit").click(); 
return false; 
} 
}); 
}); 
/*function SubmitNew()
{
	document.form1.eb9539bf7.value = "0";
	document.form1.submit();
}
function getCheckboxItem()
{
	var d = [];
	$("input[name='tid[]']:checked").each(function(){
		d.push($(this).val());
	});
	if(d.length==0){
		if(getCookie('nid'))return getCookie('nid');
		//$.dialog({title:null,content:"请您先选择要采集的栏目！",time:2000});
		return false;
	}
	if(d.length>1){
		//$.dialog({title:null,content:"一次只能选择一个栏目！",time:2000});
		return false;
	}
	
	if(d.length==1) return d[0];
}

function showeachtitle(input)
{
	if(input.checked==true) {input.form.e84883c47.value=0; input.form.e84883c47.disabled=true;}
	else{input.form.e84883c47.disabled=false;}
}*/
