function flashPostBackReturn(arg){
	if(arg == 'nolsh'){
		outputlsh(arg);
	}
	else if(arg == 'lsh'){
		ZhengMing_Search();
	}
	else if(arg == 'ip')
	{
		document.all.item("alert").innerHTML ='您已发送信件多次了!';
	} 
	else 
	{
		output(arg);
		ClearData();
	}
	
}
function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
		//alert(movieName);
        //return window[movieName]
        return document.getElementById(movieName);
    }
    else {
        //return document[movieName]
        return document.getElementById(movieName);
    }
}
function CheckForm()
{
	var error="";
	if(document.all.item("Iname").value.length <= 0){
		error="姓名不可以为空！";
	}
	if(document.all.item("Ititle").value.length <= 0){
		error +="标题不可以为空！";
	}
	if(document.all.item("Imess").value.length <= 0){
		error +="详细内容不可以为空！";
	}
	if(document.all.item("Iemail").value.length > 0){
		if(! isMail(document.all.item("Iemail").value)) {
			document.all.item("Iemail").focus();
			error+="您的电子邮件不合法！";
		}
	}
	if(document.all.item("Ipost").value.length > 0){
		if(! isNumber(document.all.item("Ipost").value)) {
			document.all.item("Ipost").focus();
			error += "邮政编码不合法！";
		}
	}
	if(document.all.item("Itel").value.length > 0){
		if(! isTel(document.all.item("Itel").value)) {
			document.all.item("Itel").focus();
			error += "您的电话号码不合法！";
		}
	}
	if(error != ""){
		document.all.item("alert").innerHTML =error;
		return false;
	}	
	return true;
}

function isMail(name) // E-mail值检测
{
	//if(! isEnglish(name))
		//return false;
	i = name.indexOf("@");
	j = name.lastIndexOf("@");
	if(i == -1)
		return false;
	if(i != j)
		return false;
	if(i == name.length)
		return false;
	return true;
}

function isNumber(name) //数值检测
{
	if(name.length == 0)
		return false;
		for(i = 0; i < name.length; i++) {
		if(name.charAt(i) < "0" || name.charAt(i) > "9")
		return false;
	}
	return true;
}

function isEnglish(name) //英文值检测
{
	if(name.length == 0)
		return false;
		for(i = 0; i < name.length; i++) {
		if(name.charCodeAt(i) > 128)
		return false;
	}
	return true;
}

function isChinese(name) //中文值检测
{
	if(name.length == 0)
		return false;
		for(i = 0; i < name.length; i++) {
		if(name.charCodeAt(i) > 128)
		return true;
	}
	return false;
}

function isTel(String)
{ 
	var Letters = "1234567890-"; //可以自己增加可输入值
	var i;
	var c;
	if(String.charAt( 0 )=='-')
		return false;
	if( String.charAt( String.length - 1 ) == '-' )
		return false;
	for( i = 0; i < String.length; i ++ )
	{
		c = String.charAt( i );
	if (Letters.indexOf( c ) < 0)
		return false;
	}
	return true;
}
function outputlsh(arg){
	document.all.item("ZhengMing").value = "此流水号不存在!";
}