$(document).ready(function(){ 
	buttnoretry();
	if(top==self){
		var paramarr=[];
		paramarr['webhost'] = location.hostname ;
		paramarr['targeturl']=location.href.replace('http://','').replace(location.hostname,'');		
		$e28dd6773=$e28dd6773?$e28dd6773:request('e28dd6773').replace('_mr_','.');
		$e28dd6773=$e28dd6773?$e28dd6773:location.hostname;
		top.location.href='http://'+ $e28dd6773 +'/index.php?'+http_build_query(paramarr);
	}
	innerresizeWeb();
}); 

$(function(){
	$("table.listtable input.ef73f2954").each(function(){
		if(timezone=='all'||timezone.indexOf(','+this.value+',')>-1) this.checked=true;
		
	});
	
	$(".tabcard").click(function(){
		$("table[id^='head']").hide();
		$("table#head"+$(this).attr("index")).show();
		//$(this).siblings("td").attr("background","images/itemnote2.gif");
		//$(this).attr("background","images/itemnote1.gif");
		$("tbody[id^='tbody']").hide();
		$("tbody#tbody"+$(this).attr("index")).show();
	});
	
	//class="contenttr"  index="timecontrol"
	
	
	$("input#e7016634f").val($("select#e833d05ff").find("option:selected").attr("type"));
	$("select#e833d05ff").change(function(){
		$("input#e7016634f").val($(this).find("option:selected").attr("type"));
	}); 
	
	
	
});

function startsession()
{
	var form=document.form1;
	if($(form.e833d05ff).val()==0 ){
		$(form.e833d05ff).focus();
		$.poping({height:'auto',overlayCSS:{display:'none'}},{},'信息提示','<img class="os" src="images/dg_face/face_error.png" />采集节点不能为空！');
		//alert("采集节点不能为空！");
		return;}
	if($(form.e103f1080).val()==0 ){
		$(form.e103f1080).focus();
		$.poping({height:'auto',overlayCSS:{display:'none'}},{},'信息提示','<img class="os" src="images/dg_face/face_error.png" />发布节点不能为空！');
		///alert("发布节点不能为空！");
		return;}
	
	var curl="co_flowstart.php?"+$(form).serialize();
	var maininfo="<div id=\"div_dialogcontent\"><iframe src=\""+curl+"\" frameborder=\"0\" width=\"100%\" id=\"div_dialog_iframe\" style=\"overflow: visible; height:360px;\"></iframe></div>";	
	 
	$.poping({height:'auto'},{},'流水线--'+$2('ecd0b8935').value,maininfo);
}

function showtitletypechange(radio){
	var sptimeinput=$(radio).closest("table").find("input.sptime");
	if($(radio).val()=='0'){
		$(radio).closest("tr").find(".pagesizesetarea").hide();
		if(parseInt(sptimeinput.val())<1 || sptimeinput.val()=="" )sptimeinput.val(1);
	}else{
		$(radio).closest("tr").find(".pagesizesetarea").show();
	}
}
function e103f1080change(selecttag){
	
	//var vararr=$(selecttag).val().split("::");
	//var pubid = vararr[0].replace("{","").replace("}","");
	$("input#e103f1080").val($(selecttag).val());
	
	/*
	var laststr='';
	$("div[id^='vardiv_']").hide();
	if($('div#vardiv_'+nodeval).length>0)
		$('div#vardiv_'+nodeval).show();
	else{
		var exportquery=$(selecttag.options[selecttag.selectedIndex]).attr("exportquery");
		var re=/\{(var_[^\}])\}/gi;
		while ((arr = re.exec(exportquery)) != null){
		   laststr+= "<div class='vardiv' id='vardiv_"+nodeval+"'>"+arr[1]+"<input class='varinput' name=vararr['"+arr[1]+"'] size=5 /></div>"
		}
		$("div#vararrdiv").append(laststr);
		
	}
	*/
	/*
	var inputarr,inputlabel,inputstr;
	if(varval){
		var vararr=varval.split(";");
		for (var i in vararr){
			if(vararr[i]){
				inputarr=vararr[i].split(":");
				if(inputarr[0])
				laststr+= "<div class='vardiv' id='vardiv_"+nodeval+"'>"+inputarr[0]+"&nbsp;<input class='varinput' name=vararr['"+inputarr[0]+"'] size=5 value='"+inputarr[1]+"' />&nbsp;&nbsp;</div>"
			}
		}
	}
	*/

}
function submitact(butt){
	if(em_usrrank<10 && $("#eaaed87de").val()=='emusr1') {
		$.poping({height:'auto',overlayCSS:{display:'none'}},{},'信息提示','<img class="os" src="images/dg_face/face_error.png" />此节点为公共示例节点，不能修改！');
		//alert("此节点为公共示例节点，不能修改！");
		return false;
	}
	$("div#vararrdiv div:hidden").remove();	
	var form=butt.form;
	if(form.ecd0b8935.value==""){
		$("input#ecd0b8935").focus();
		$.poping({height:'auto',overlayCSS:{display:'none'}},{},'信息提示','<img class="os" src="images/dg_face/face_error.png" />生产线名字不能为空！');
		//alert("生产线名字不能为空！");
		return;}
	localurl='http://'+window.name.replace('_mr_','.')+'/locallogin.php?eb5707348=dowithdata&e52731e59=flow&callback=?';
	$.getJSON(localurl,{},function(){});
	var _object = {
		url:'?ajax=1&gettype=post',
		params:$(butt.form).serialize(),
		timedelay:10000
	};
	
	var callbackfunc=function(data){
		if(data.data){
			document.form1.fid.value=data.data;
			document.form1.eb5707348.value='update';
		}
		return true;
	};
	$.submitajax(_object,'',{},{},'提示信息','<img class="os" src="images/loading.gif" />正在操作中...',callbackfunc);

}
