function myLoad()
if (document.getElementById("dMain"))
divInit();
function myResize()
if (document.getElementById("dMain"))
divInit();
function divInit()
var dMain = document.getElementById("dMain"); //主Div
var dTop = document.getElementById("dTop"); //锁定行的Div
var dLeft = document.getElementById("dLeft"); //锁定列的Div
var dMid = document.getElementById("dMid"); //左上角的Div
var windowWidth = document.body.scrollWidth;
var windowHeight = document.body.clientHeight;
//alert(windowWidth);
dMain.style.background="#ffffff";
//alert(windowHeight);
dMain.style.width = windowWidth - ;
var sch = document.getElementById("div_Search");
//alert(sch.scrollHeight);
if (sch.style.display == "")
dMain.style.height = windowHeight - - sch.scrollHeight;
dMain.style.height = windowHeight - ;
//dMain.style.display = "none";
//寻找Top 和 Left
var tt = dMain; // 寻找左上角的坐标,代码来自梅花雪的日期控件
var th = tt;
var ttop = tt.offsetTop;
var thei = tt.clientHeight;
var tleft = tt.offsetLeft;
var ttyp = tt.type;
while (tt = tt.offsetParent){ttop+=tt.offsetTop; tleft+=tt.offsetLeft;}
var myTop = (ttyp=="image")? ttop+thei : ttop+thei+; //左上角的坐标
var myLeft = tleft; //左上角的坐标
//===================================寻找完毕===============
//锁定行的高度
var RowsHeight = dg.rows[RowsCount].cells[].offsetTop - dg.rows[].cells[].offsetTop +
//锁定列的宽度
var LineWidth = dg.rows[].cells[LineCount].offsetLeft - dg.rows[].cells[].offsetLeft +
//锁定列的高度
var LineHeight = dMain.style.height;
LineHeight = LineHeight.replace("px","");
//锁定行的宽度
var RowsWidth = dMain.style.width;
RowsWidth = RowsWidth.replace("px","");
//hh = parseint(hh);
divResize(dMain,dTop,dLeft,dMid);
if (RowsHeight <)
RowsHeight = ;
if (LineWidth <)
LineWidth = ;
dTop.style.width = RowsWidth - ;
dTop.style.height = RowsHeight;
dLeft.style.width = LineWidth;
dLeft.style.height = LineHeight - ;
dMid.style.width = LineWidth ;
dMid.style.height = RowsHeight;
//设置左上角的位置
dTop.style.top = myTop ;
dTop.style.left = myLeft ;
dLeft.style.top = myTop;
dLeft.style.left = myLeft;
dMid.style.top = myTop;
dMid.style.left = myLeft;
function divResize(dMain,dTop,dLeft,dMid)
dTop.innerHTML = dMain.innerHTML;
dMid.innerHTML = dMain.innerHTML;
dLeft.innerHTML = dMain.innerHTML;
dLeft = dMain;
function divResize2(dMain,dLeft)
dLeft.innerHTML = dMain.innerHTML;
function myScroll(me)
var dTop = document.getElementById("dTop");
var dLeft = document.getElementById("dLeft");
var dMid = document.getElementById("dMid"); //左上角的Div