function saveMovieData(){	
	var movieData = {}, netData = [],netGroup = {},doubanData ={};
	var flag = true;
	//节目id
	var programId = $("#programId").val();
	//电影票房
	var movieLastDate = $('#movieLastDate').val();
	var movieCboTotal = $('#movieCboTotal').val();	
	movieData = {"lastDate":movieLastDate,"cboTotal":movieCboTotal};
	
	if(movieCboTotal!= '' && !isNumber(movieCboTotal)){
		top.alert("电影票房:累计票房请输入非负数");
		return false;
	}
	//网络平台人群受众构成
	var netGroupProps = ["sexMan","sexWoman","age17","age1824","age2530","age3135","age3640","age40"];
	var netGroupPropsCH = ["男性","女性","1-17岁","18-24岁","25-30岁","31-35岁","36-40岁","40岁以上"];
	$("#netGroupTerrace tr td input").each(function(n){
		netGroup[netGroupProps[n]] = $(this).val();
	});
	
	for(var i=0; i<netGroupProps.length; i++){
		if(netGroup[netGroupProps[i]] != '' &&!isNumber(netGroup[netGroupProps[i]])){
			top.alert("网络平台人群受众构成" + netGroupPropsCH[i]+"请输入非负数");
			return false;
		}
	}
	var sex = parseFloat(nullToZero(netGroup[netGroupProps[0]]))+parseFloat(nullToZero(netGroup[netGroupProps[1]]));
	if( parseInt(sex) != 0 && parseInt(sex) != 100){
		top.alert("网络平台人群受众构成:男女比例之和不等于100");
		return false;
	};
	
	var age = 0; 
	for(var i = 2; i<netGroupProps.length; i++){
		age =  parseFloat(nullToZero(age)) + parseFloat(nullToZero(netGroup[netGroupProps[i]]));
	}
	if( parseInt(age) != 0 && parseInt(age) != 100){
		top.alert("网络平台人群受众构成:年龄段比例之和不等于100");
		return false;
	}
	
	//豆瓣数据
	var doubanProps = ["lastDate","score","commentCount"];
	var doubanPropsCH =["截止日期","评分","评论数"];
	$("#doubanTerrace tr td input").each(function(n){
		doubanData[doubanProps[n]] = $(this).val();
	});	
	
	for(var i= 1; i<doubanProps.length; i++){
		if(doubanData[doubanProps[i]] != '' && !isNumber(doubanData[doubanProps[i]])){
			top.alert("豆瓣数据：" + doubanPropsCH[i] + "请输入非负数");
			return false;
		}
	}
	
	if(parseFloat(doubanData[doubanProps[1]])> 10){
		top.alert("豆瓣数据：评分不能大于10分");
		return false;
	}
	//网络平台数据
	var netLastDate = $("#netLastDate").val();
	var netProps = ["platformName","clickTimes","score","lastDate"];
	var netPropsCH = ["视频平台","点击量","评分","截止日期"];
	var platform = [];
	$("#netWorkTerrace tr").each(function(){
		var obj = new Object();
		$(this).find('td input,select').each(function(n){
			obj[netProps[n]] = $(this).val();
			if(n == 0){
				if(isInArray2(platform,obj[netProps[n]])){
					top.alert("网络平台数据:视频平台不能重复");
					flag = false;
					return false;
				}else{
					platform.push(obj[netProps[n]]);
				}			
			}
			if(n !=0 && obj[netProps[n]]!= '' && !isNumber(obj[netProps[n]])){
				top.alert("网络平台数据:" + netPropsCH[n] + "请输入非负数");
				flag = false;
				return false;
			}
			if(n == 2 && parseFloat(obj[netProps[2]])>10){
				top.alert("网络平台数据:评分不能大于10分");
				flag = false;
				return false;
			}
		});
		obj[netProps[netProps.length-1]] = netLastDate;
		netData.push(obj);
	});
	if(!flag){
		return false;
	}
	
	var params = {"programId":programId,"movieData":movieData,"netGroup":netGroup,"doubanData":doubanData,"netData":netData};
	console.log(params);
	$.ajax({type : "POST", url : "save_program_data_info.do", contentType:"application/json", data :JSON.stringify(params), success : function(res){
			if(res.code== 1){
				top.alert("保存成功。", 1, function(){
					location.href = "program_data_movie.do?id=" + programId;
	            });
			}else{
				alert(res.msg);
			}
		} 
	});
}
