﻿var is_ie = document.all ? true : false;
var is_ff = window.addEventListener ? true : false;

function refreshmainframe(e) {
    e = e ? e : window.event;
    actualCode = e.keyCode ? e.keyCode : e.charCode;
    if (actualCode == 116 && parent.right) {
        parent.right.location.reload();
        if (is_ie) {
            e.keyCode = 0;
            e.returnValue = false;
        }
        else {
            e.preventDefault();
        }
    }
}

var closeDiv = function (obj) { //删除层
    obj.parentNode.removeChild(obj);
}

//更新 2009-12-30
function ErrInf(obj, errMsg) {
    alert(errMsg);
    obj.focus();
}

var $$ = function (elementID) { return document.getElementById(elementID) }

var getInfo = function (o) {//取得坐标
    var to = new Object();
    to.left = to.right = to.top = to.bottom = 0;
    var twidth = o.offsetWidth;
    var theight = o.offsetHeight;
    while (o != document.body) {
        to.left += o.offsetLeft-1 ;
        to.top += o.offsetTop - 1;
        o = o.offsetParent;
    }
    to.right = to.left + twidth;
    to.bottom = to.top + theight;
    return to;
}


