// 列表全选
function ClickAll(obj)
	{
		var cObj = document.getElementById("CAll").checked;
		var obj = document.getElementsByName(obj);
		var len = obj.length;
		if (cObj)
		{
			for (i=0;i<len;i++)
			{
				obj[i].checked = true;
			}
		}
		else
		{
			for (i=0;i<len;i++)
			{
				obj[i].checked = false;
			}
		}
	}

//确认点击
function CheckClick(msg)
	{
		if(confirm(msg))
		{
			event.returnValue=true;
		}
		else
		{
			event.returnValue=false;
		}
	}

// 缩放图片
function PicZoom(obj)
{
	iWidth = 780;
	if (obj!=null)
	{
		if (obj.width >iWidth )
		{
			obj.width = iWidth;
		}
	}
	else
	{
		if (document.all.docpic!=null)
		{
			if (docpic.length!=null)
			{
				for (i=0;i<docpic.length;i++)
				{
					if (docpic[i].width>iWidth)
					{
						docpic[i].width=iWidth;
					}
				}
			}
			else
			{
				if (docpic.width>iWidth)
				{
					docpic.width=iWidth;
				}
			}
		}
	}
}

//UBB 代码获取字符
function storeCaret (txtobj)   
{
	if (txtobj.createTextRange)
	{
		txtobj.curRange = document.selection.createRange().duplicate();
	}
}

//UBB 代码写入字符
function insertAtCaret (txtobj,txt1,txt2,overcast)
{
	if (txtobj.curRange)   
	{
		if (overcast == 0)
		{
			txtobj.curRange.text = txt1+txtobj.curRange.text+txt2;
		}
		else
		{
			txtobj.curRange.text = txt1+txt2;
		}
		txtobj.curRange.select();
	}
	else
	{
		txtobj.focus();
		storeCaret(txtobj);
		insertAtCaret (txtobj,txt1,txt2,overcast);
	}
}

//打开关闭说明列表
function fExpCon()
{
	if (ExpCon.innerText == "打开说明文档")
	{
		oExpCon.style.display = "";
		ExpCon.innerText = "关闭说明文档"
	}
	else
	{
		oExpCon.style.display = "none";
		ExpCon.innerText = "打开说明文档"
	}
}
