日期:2013-07-22  浏览次数:20804 次

<!--#Include File="Statistics_Connection.asp"-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="Statistics_CSS.css">
<title>Statistics View</title>

<SCRIPT LANGUAGE="JScript">
<!--
// ---------- 函数 - 处理表格交互变化
function ChangeColor(argPtr, argColor)
{
if(!argColor)
argPtr.style.backgroundColor = "#dddddd";
else
argPtr.style.backgroundColor = "#eeeeee";
}

// ---------- 函数 - 处理多选框 ----------
var ie = document.all ? 1 : 0;
//var ns4 = document.layers ? 1 : 0;

function HighLight(cb)
{
if(ie)
{ while(cb.tagName != "TR")
{ cb = cb.parentElement;
}
}
else
{ while (cb.tagName != "TR")
{ cb = cb.parentNode;
}
}
cb.className = 'ColorHighLight';
}

function LowLight(cb)
{
if(ie)
{ while (cb.tagName != "TR")
{ cb = cb.parentElement;
}
}
else
{ while (cb.tagName != "TR")
{ cb = cb.parentNode;
}
}
cb.className = 'ColorLowLight';
}

function Check(cb)
{
if (cb.checked)
{ HighLight(cb);
}
else
{ LowLight(cb);
}
}

function CheckAll()
{
var fmobj = document.frmOperation;

for(var i = 0; i < fmobj.elements.length; i ++)
{ var e = fmobj.elements[i];

if((e.name != 'Check_All') && (e.type == 'checkbox') && (!e.disabled))
{ e.checked = fmobj.Check_All.checked;
if(e.checked)
{ HighLight(e);
}
else
{ LowLight(e);
}
}
}
}

function CheckCheckAll()
{
var fmobj = document.frmOperation;
var TotalBoxes = 0;
var TotalOn = 0;

for(var i = 0; i < fmobj.elements.length; i ++)
{ var e = fmobj.elements[i];
if((e.name != 'Check_All') && (e.type == 'checkbox'))
{ TotalBoxes ++;
if(e.checked)
{ TotalOn ++;
}
}
}
if(TotalBoxes == TotalOn)
{ fmobj.Check_All.checked = true;
}
else
{ fmobj.Check_All.checked = false;
}
}

function Check_Read()
{
var fmobj = document.frmOperation;

for(var i = 0; i < fmobj.elements.length; i ++)
{ var e = fmobj.elements[i];

if((e.type == 'hidden') && (e.value == 1) && (! isNaN(e.name)))
{ eval("fmobj.Check_ID_" + e.name + ".checked = true;");
HighLight(e);
}
}
}

function UnCheck_All()
{
var fmobj = document.frmOperation;

for(var i = 0; i < fmobj.elements.length; i ++)
{ var e = fmobj.elements[i];

if(e.type == 'checkbox')
{ e.checked = false;
LowLight(e);
}
}
}

// ---------- 函数 - 处理Submit() ----------
function CheckSubmit(argAction)
{
var frmObject = document.frmOperation;
var flgChecked = false;
var flgSubmit = false;

for(var i = 0; i < frmObject.elements.length; i ++)
{ var e = frmObject.elements[i];
if((e.name != 'CheckAll') && (e.type == 'checkbox') && e.checked)
{ flgChecked = true;
break;
}
}

if(! flgChecked)
{ alert("Please select any record first!");
return;
}
else
{ if(confirm(argAction + " the selected record(s)?"))
{ frmObject.HiddenAction.value = argAction;
frmObject.submit();
}
else
return;
}