﻿

function CheckSubmit(){
	if($("LishiShouru").length==0){
		alert("请填写历史收入！");
		return false;
	}
	if($("YuqiShouru").length==0){
		alert("请填写预期收入！");
		return false;
	}
	for(var i=0;i<$("LishiShouru").length;i++){
		if(i==0){
			$("HiddenLishiShouru").value=$("LishiShouru")[i].value;
		}else{
			$("HiddenLishiShouru").value += "&"+$("LishiShouru")[i].value;
		}
	}
	for(var i=0;i<$("YuqiShouru").length;i++){
		if(i==0){
			$("HiddenYuqiShouru").value=$("YuqiShouru")[i].value;
		}else{
			$("HiddenYuqiShouru").value += "&"+$("YuqiShouru")[i].value;
		}
	}
	$("ShenFen").value=$F("ShenFenSelect");
	if($("TouziLeixingA").checked){
		$("TouziLeixing").value="风险投资";
	}else if($("TouziLeixingB").checked){
		$("TouziLeixing").value="出售企业";
	}else{
		$("TouziLeixing").value="天使投资";
	}
	if($F("CompanyName")==""){
		alert("请填写完整！");
		$("CompanyName").focus();
		return false;
	}
	
	if($F("ItemName")==""){
		alert("请填写完整！");
		$("ItemName").focus();
		return false;
	}
	
	if($F("Vocationid")==""){
		alert("请填写完整！");
		$("VocationName").focus();
		return false;
	}
	
	if($F("Content")==""){
		alert("请填写完整！");
		$("Content").focus();
		return false;
	}else if($("Content").value.length>2000){
		alert("介绍内容2000字以内，您输入了"+$("Content").value.length+"字！");
		$("Content").focus();
		return false;
	}
	if($F("LinkMan")==""){
		alert("请填写完整！");
		$("LinkMan").focus();
		return false;
	}
	if($F("LinkTel")==""){
		alert("请填写完整！");
		$("LinkTel").focus();
		return false;
	}
	if($F("Email")==""){
		alert("请填写完整！");
		$("Email").focus();
		return false;
	}
	if($F("ShenFenSelect")==""){
		alert("请填写完整！");
		$("ShenFenSelect").focus();
		return false;
	}
	if($F("RongziJine")==""){
		alert("请填写完整！");
		$("RongziJine").focus();
		return false;
	}
	return true;
}

function LishiShouruAdd(){
    if($F("LishiShouru_Num")==""){
        alert("错误：您没有填写历史收入");
		$("LishiShouru_Num").focus();
    }else{
		var temp=$F("LishiShouru_Num");
		if(temp.indexOf("人民币")<1){
			temp+="人民币";
		}
        $("LishiShouru").options[$("LishiShouru").length]=new Option($F("LishiShouru_Year")+"|"+temp,$F("LishiShouru_Year")+"|"+temp);
		$("LishiShouru_Num").value="";
    }   
}
function LishiShouruDel(){
	if($("LishiShouru").selectedIndex>=0){
        $("LishiShouru").remove($("LishiShouru").selectedIndex);
    }  
}
function YuqiShouruAdd(){
    if($F("YuqiShouru_Num")==""){
        alert("错误：您没有填写预计收入");
		$("YuqiShouru_Num").focus();
    }else{
		var temp=$F("YuqiShouru_Num");
		if(temp.indexOf("人民币")<1){
			temp+="人民币";
		}
        $("YuqiShouru").options[$("YuqiShouru").length]=new Option($F("YuqiShouru_Year")+"|"+temp,$F("YuqiShouru_Year")+"|"+temp);
		$("YuqiShouru_Num").value="";
    }   
}
function YuqiShouruDel(){
	if($("YuqiShouru").selectedIndex>=0){
        $("YuqiShouru").remove($("YuqiShouru").selectedIndex);
    }  
}