function CheckSH(SHNameID)
{
	var array;
	array = SHNameID.split("|");//拆分成三个数组

	try
	{
		var s1 = array[0];
		var s2 = array[1];
		var s3 = array[2];
		var s4 = array[3];
		var s5 = array[4];

       if(document.all(s1).value == '' || document.all(s2).value == '' 
			|| document.all(s3).value == '' || document.all(s4).value == ''
			|| document.all(s5).value == '')
       {
			alert('请先把五个股东填写完才可以增加!');
       }
       else
       {
       		//var left = screen.width/2-width/2;
			//var top = screen.height/2-height/2-35;
			NewWebForm('../Common/ShareHolder.aspx', '_blank', 500, 600, 200, 300);
			
       }
       
	}
	catch(e)
	{
		alert(e);
	}

}

function SelectView(ddlID,txtID,control1,control2,action)
{
	if(action == 'True')
	{
	//alert(document.all(ddlID).options[document.all(ddlID).selectedIndex].value);
		if(document.all(ddlID).options[document.all(ddlID).selectedIndex].value == txtID)
		{
			document.all(control1).disabled = false;
			document.all(control2).disabled = false;
			document.all(control1).style.backgroundColor = "#ffffff";
			document.all(control2).style.backgroundColor = "#ffffff";
		}
		else
		{
			document.all(control1).disabled = true;
			document.all(control2).disabled = true;
			document.all(control1).value = "";
			document.all(control2).value = "";
			document.all(control1).style.backgroundColor = "#F0F0F0";
			document.all(control2).style.backgroundColor = "#F0F0F0";
		}
	}
	else
	{	
		if(document.all(ddlID).options[document.all(ddlID).selectedIndex].value == txtID)
		{
			document.all(control1).disabled = true;
			document.all(control2).disabled = true;
			document.all(control1).value = "";
			document.all(control2).value = "";
			document.all(control1).style.backgroundColor = "#F0F0F0";
			document.all(control2).style.backgroundColor = "#F0F0F0";
		}
		else
		{
			document.all(control1).disabled = false;
			document.all(control2).disabled = false;
			document.all(control1).style.backgroundColor = "#ffffff";
			document.all(control2).style.backgroundColor = "#ffffff";
			
		}
	}
}

function SetDrop(control1,control2)
{
	if(document.all(control1).options[document.all(control1).selectedIndex].value == '5000')
	{
		alert(document.all(control1).options[document.all(control1).selectedIndex].Text);
		document.all(control2).disabled = true;
	}
}

function GetEntName(c1,c2,c3,c5,c6)
{


			//document.all(c6).visible = '';
			//document.all(c6).style.backgroundColor = "#ffffff";
			//document.all(c6).disabled = '';
			document.all(c1).value = 
			document.all(c2).value +
			document.all(c3).value +
			document.all(c6).value + 
			document.all(c5).options[document.all(c5).selectedIndex].text ;
		//}
		//else
		//{
		//	document.all(c6).value = '';
		//	document.all(c6).style.backgroundColor = "#F0F0F0";
		//	document.all(c6).disabled = true;
		//	document.all(c1).value = 
		//	document.all(c2).value +
		//	document.all(c3).value +
		//	document.all(c4).options[document.all(c4).selectedIndex].text + 
		////	document.all(c5).options[document.all(c5).selectedIndex].text ;
		//}
}

function SetSH(c1,c2,c3)
{
	//if(document.all(c1).options[document.all(c1).selectedIndex].Value == '20')
	//{
	//	document.all(c2).disabled = 'none';
	//	document.all(c3).disabled = 'none';
	//}
}


//验证日期
function CheckDate(ev)
{
	
	var str = document.all(ev).value;
    var reg =/([2]{1}[0-9]{3})[/\-]{0,1}([0-1][0-9])[/\-]{0,1}([0-3][0-9])/;
    var r = str.match(reg);

    if(r==null){
		var yn;
		yn = window.confirm('对不起，请输入正确的日期格式，如：2000-12-20');
        //alert("对不起，请输入正确的日期格式，如：2000-12-20");
        if(yn == true)
        {
			document.all(ev).value = '';
			document.all(ev).focus(); 
        }
        else
        {
			document.all(ev).value = '';
			document.all(ev).focus(); 
        }
    }
}


//验证日期
function CheckDate(ev)
{
	
	var str = document.all(ev).value;
    var reg =/([2]{1}[0-9]{3})[/\-]{0,1}([0-1][0-9])[/\-]{0,1}([0-3][0-9])/;
    var r = str.match(reg);

    if(r==null){
		var yn;
		yn = window.confirm('对不起，请输入正确的日期格式，如：2000-12-20');
        //alert("对不起，请输入正确的日期格式，如：2000-12-20");
        if(yn == true)
        {
			document.all(ev).value = '';
			document.all(ev).focus(); 
        }
        else
        {
			document.all(ev).value = '';
			document.all(ev).focus(); 
        }
    }
}


function CheckMoney(ev)
{
	var str = document.all(ev).value;
    var reg =/^[\-\+]?([0-9]\d*|0|[1-9]\d{0,2}(,\d{3})*)(\.\d+)?$/;
    var r = str.match(reg);

    if(r==null){
		var yn;
		yn = window.confirm('对不起，请输入正确的数值');
        //alert("对不起，请输入正确的日期格式，如：2000-12-20");
        if(yn == true)
        {
			document.all(ev).value = '';
			document.all(ev).focus(); 
        }
        else
        {
			document.all(ev).value = '';
			document.all(ev).focus(); 
        }
    }
}
//打开字号查重界面
function NewWebZHCCForm(ID)
{
	var Url='';
	Url = "../Common/EntNameSearchRepeat.aspx?EntName=" + encodeURIComponent(document.all(ID).value);
	NewCenterWin(Url, '_blank', 400, 200);
		
	event.returnValue = false;//不允许postback
}