/***********************************************************
 说明：对所有列表记录行颜色操作


***********************************************************/


<!--

<!--选择后我颜色-->
var checkColor="#999999";
<!--鼠标所在行颜色-->
var OverColor="#ffffff";
<!--鼠标离开行颜色-->
var OutColor="#e9f0f8";


<!-- 鼠标所在行背景色操作  -->
function MOver(tr1)
{
    if(tr1.style.backgroundColor.toString()!=checkColor)
    tr1.style.backgroundColor=OverColor;
}

<!-- 鼠标离开当前行背景色操作  -->
function MOut(tr2)
{
    if(tr2.style.backgroundColor.toString()==OverColor)
    tr2.style.backgroundColor=OutColor;
}


<!-- 选择CheckBox所在行背景色操作  -->
function CheckStyle(tr3)
{
   var trc=tr3.value.toString();
   <!--判断是否选择-->
   if(tr3.checked) 
    {
      document.getElementById(trc).style.backgroundColor=checkColor; 
    }
    else
    {
      document.getElementById(trc).style.backgroundColor=OutColor;
    }
}

<!-- URL的跳转  -->
function gotourls(url,sname,swidths,sheight,sreplace,sclose)
{
	var objNewWin;				
	if (swidths=="") swidths = "790";
	if (sheight=="") sheight = "480";
	if (sreplace=="") sreplace = false;
	if (sclose=="") sclose = false;
	objNewWin = window.open(url,sname,"fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=" + swidths + ",height=" + sheight + ",top=200,left=200",sreplace);
	if (sclose) window.close();
	objNewWin.focus();	
}
    
function CheckStyle8(tr3)
{
   var trc=tr3.value.toString();
   <!--判断是否选择-->
   if(tr3.checked) 
    {
      document.getElementById(trc).style.backgroundColor=checkColor; 
      document.getElementById("btnAdd").value="\u65B0\u589E\u6210\u5458";
    }
    else
    {
      document.getElementById(trc).style.backgroundColor=OutColor;
      document.getElementById("btnAdd").value="\u65B0\u589E\u6237\u4E3B";
    }
}

<!-- 全选操作  -->
function CheckAllStyle(obj)
{
    var colors=OutColor;
    <!--判断是否选择-->
    var f = document.forms[0];
    var count=f.elements.length;
    
    <!-- 判断是否是要选择的那些复选框 -->
    <!-- "if(f.elements[i].name=='ckbSelect')" -->
    <!--"{"-->
    
    if(obj.checked)
    {
        colors=checkColor;
        for (i=0;i<count;i++)
        {
            f.elements[i].checked = true;
        }
    }
    else
    {
        for (i=0;i<count;i++)
        {
            f.elements[i].checked = false;
        }
    }
    <!--"}"-->
    changstyle(colors);
}
<!-- 选择操作 事务列表(用于单选的Radio)  -->
function CheckStyleRadio(obj)
{
    var trc=obj.value.toString();
    <!-- 判断是否是要选择的那些复选框 -->
    changstyle(OutColor);
    if(obj.checked)
    {
        document.getElementById(trc).style.backgroundColor=checkColor; 
    }
}

<!-- 全选时对列表所有行背景色操作  -->
function changstyle(colors)
{
    var count=tb.rows.length;
    for(i=1;i<count;i++)
    {
        tb.rows[i].style.backgroundColor=colors;
    }
}


<!-- 全选操作  -->
    function CheckAllStyles(obj,chkbox,tables)
    {
        var colors=OutColor;
        <!--判断是否选择-->
        var f = document.forms[0];
        var count=f.elements.length;
        
        <!-- 判断是否是要选择的那些复选框 -->
                
            if(obj.checked)
            {
                colors=checkColor;
                for (i=0;i<count;i++)
                {
                    if(f.elements[i].name==chkbox)
                    {
                       f.elements[i].checked = true;
                    }
                }
            }
            else
            {
                for (i=0;i<count;i++)
                {
                    if(f.elements[i].name==chkbox)
                    {
                        f.elements[i].checked = false;
                    }
                }
            }
        changstyles(colors,tables,2);
    }


    <!-- 全选时对列表所有行背景色操作  -->
    function changstyles(colors,tbs,num)
    {
        var count=document.getElementById(tbs).rows.length;
        for(i=num;i<count;i++)
        {
            document.getElementById(tbs).rows[i].style.backgroundColor=colors;
        }
    }

<!--返回-->
function fun_go()
{
history.back(-1);
}

function OpenUrl(url)
{
	window.location.href=url;
}

<!--下面为田归龙补写-->
<!-- 全选操作  -->
function CheckAllStyle1(obj,RowValue)
{
    var colors=OutColor;
    <!--判断是否选择-->
    var f = document.forms[0];
    var count=f.elements.length;
    
    <!-- 判断是否是要选择的那些复选框 -->
    <!-- "if(f.elements[i].name=='ckbSelect')" -->
    <!--"{"-->
    
    if(obj.checked)
    {
        colors=checkColor;
        for (i=0;i<count;i++)
        {
            f.elements[i].checked = true;
        }
    }
    else
    {
        for (i=0;i<count;i++)
        {
            f.elements[i].checked = false;
        }
    }
    <!--"}"-->
    changstyle1(colors,RowValue);
}


<!-- 全选时对列表所有行背景色操作  -->
function changstyle1(colors,RowValue)
{
    var count=tb.rows.length;
    for(i=RowValue;i<count;i++)
    {
        tb.rows[i].style.backgroundColor=colors;
    }
}
<!-- 点击图片对TOP主图片进行操作  -->
    function Show_Hide_MenuTop(){
    if(window.parent.faithoa_frame.rows=="0,*,25")
    {
    ///    document.getElementById("menuICON").src="../Skins/V1/top/hidemenu.gif";
        document.getElementById("td_Top").title="\u9690\u85CF\u4E3B\u56FE\u7247"
        window.parent.faithoa_frame.rows="95,*,25";
        }
        else{
    ///    document.getElementById("menuICON").src="../Skins/V1/top/showmenu.gif";
        document.getElementById("td_Top").title="\u663E\u793A\u4E3B\u56FE\u7247"
        window.parent.faithoa_frame.rows="0,*,25";
     }
    }

<!-- 打印页面 start -->
///<param name=PrintArea>要打印的部分的ID名称</param>
	function doPrint(PrintArea)
	{
	    var str="<html>";
	    var article;
	    var css;
	    var strAdBegin="<!--JusticeReport_BEGIN-->";
	    var strAdEnd="<!--JusticeReport_END-->";
	    var strdoPrint="doPrint()";
	    var strTmp;
	        css="<style>"
		    +"body{font-family:宋体}"
		    +"td,.f12{font-size:12px}"
		    +".f24 {font-size:24px;}"
		    +".f14 {font-size:14px;}"
		    +".title14 {font-size:14px;line-height:130%}"
		    +".l17 {line-height:170%;}"
		    +"</style>";
    	
		    str +=	css;
	        str +=	'<meta http-equiv="content-type" content="text/html; charset=gb2312">';
		    str +=	'<title>'+document.title+'</title>';
		    str +=	"<body topmargin=2 leftmargin=2 marginheight=2 marginwidth=2 onLoad='window.print()'>";	
    				
		    article=document.getElementById(PrintArea).innerHTML;
		    if(article.indexOf(strAdBegin)!=-1){
			    str +=article.substr(0,article.indexOf(strAdBegin));
			    strTmp=article.substr(article.indexOf(strAdEnd)+strAdEnd.length, article.length);
		    }else{
			    strTmp=article
		    }
		    str +=strTmp
		    str +=	"";
		    str +=	"</body></html>";
		    document.write(str);
		    document.close();
	}
<!-- 打印页面 end -->
<!-- 检测字符长度 start -->
    function CheckLength(obj,lengths,words)
    {
        if(obj.value.length<lengths)
        {
            alert(words);
        }
    } 
<!-- 检测字符长度 end -->

<!-- 将控件ReadOnly属性设为真 start -->
	function checkReadOnly(ids)
	{
	    for(var i=0;i<ids.length;i++)
	    {
	       document.getElementById(ids[i]).readOnly=true;
	    }
	}
<!-- 将控件ReadOnly属性设为真 end -->	
//-->
