///----------------------------------------------------------------
/// Copyright (C) 2006 中国数码集团
/// 版权所有。 
///
/// 文件名：BlogLog.js
/// 文件功能描述：日志的JS验证
///
/// 
/// 创建标识：于洋/20061206
///----------------------------------------------------------------


function CheckAddLogClass()
{
	var className = Trim(document.getElementById("txtClassName").value);
	var classInstroduce = Trim(document.getElementById("txtClassIntr").value);
	var IsTure = true;
	IsTure = CheckData("txtClassName","E/L","分类名称",10);
	if(!IsTure)
	{
		return false;
	}
	
	IsTure = CheckData("txtClassIntr","L","分类简介",100);
	
	if(!IsTure)
	{
		return false;
	}
	
	//return confirm("是否添加分类?");
	return true;
}

function CheckEditLogClass()
{
	var className = Trim(document.getElementById("txtClassName").value);
	var classInstroduce = Trim(document.getElementById("txtClassIntr").value);
	var IsTure = true;
	IsTure = CheckData("txtClassName","E/L","分类名称",10);
	if(!IsTure)
	{
		return false;
	}
	
	IsTure = CheckData("txtClassIntr","L","分类简介",100);
	
	if(!IsTure)
	{
		return false;
	}
	
	//return confirm("是否修改分类?");
	return true;
}

function CheckADDSyetemLogClass()
{
	
	var IsTure = true;
	IsTure = CheckData("txtClassName","E/L","系统分类名称",10);
	if(!IsTure)
	{
		return false;
	}
	
	//return confirm("确定要添加系统分类?");
	return true;
}

function CheckEDITSyetemLogClass()
{

	var IsTure = true;
	IsTure = CheckData("txtClassName","E/L","系统分类名称",10);
	if(!IsTure)
	{
		return false;
	}
	
	//return confirm("确定要编辑系统分类?");
	return true;
}

function CheckLogInformation()
{
	var logTitle = Trim(document.getElementById("txtTitle").value);
	var logTags = Trim(document.getElementById("txtTags").value);
	var logContent = Trim(document.getElementById("FreeTextBox1").value);
	var url = Trim(document.getElementById("txtTraceBack").value);
	var isTrue = true;
	
	isTrue = CheckData("txtTitle","E/L","标题",150);
	if(!isTrue)
	{
		return false;
	}
	isTrue = CheckData("txtTags","L","标签",100);
	if(!isTrue)
	{
		return false;
	}
	
	/*isTrue = CheckData("FreeTextBox1","E/L","内容",10000);
	FCK无法用js判断
	if(!isTrue)
	{
		return false;
	}*/
	/*isTrue = CheckData("filesPath","I","上传图片")
	if(!isTrue)
	{
		return false;
	}*/
	
	//return confirm("确定要添加?");
	return true;
}

function CheckLogComment()
{
	var userName = Trim(document.getElementById("txtUserName").value);
	var logComment = Trim(document.getElementById("txtComment").value);
	var isTure=true;
	isTure = CheckData("txtUserName","L","用户名称",40);
	if(!isTure)
	{
		return false;
	}
	isTure = CheckData("txtComment","E/L","评论内容",4000);
	if(!isTure)
	{
		return false;
	}
	
	//return confirm("确定要发表评论?");
	return true;
}

function CheckEditeLogInformation()
{
	var logTitle = Trim(document.getElementById("txtTitle").value);
	var logContent = Trim(document.getElementById("FreeTextBox1").value);
	var url = Trim(document.getElementById("txtTraceBack").value);
	var isTrue = true;
	
	isTrue = CheckData("txtTitle","E/L","标题",150);
	if(!isTrue)
	{
		return false;
	}
	/*isTrue = CheckData("FreeTextBox1","E/L","内容",10000);
	if(!isTrue)
	{
		return false;
	}
	*/
	//return confirm("确定要修改?");
	return true;
}

function CheckEditBlogItem()
	{
		var checkResult = true;

		checkResult = CheckData("txtTitle","E/L","标题",10);
		if (!checkResult)	
		{
			return false;
		}
		//return confirm("是否保存？");
		return true;
	}
