﻿// JScript 文件
function showWin(url, title)
{ 	
	window.open(url, title, 'width='+screen.width+',Height='+screen.height+',left=0,top=0, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes,location=yes, status=yes');
}

function ShowModeWin(strPath, strTitle, iWidth, iHeight, bFlushScreen)
{
    //alert('dialogWidth=' + iWidth + ';dialogHeight=' + iHeight);
    window.showModalDialog(strPath, strTitle, 'status=no;resizable:no;scroll:no;help:no;dialogWidth=' + iWidth + 'px;dialogHeight=' + iHeight + 'px');
    return bFlushScreen;
}

function ShowModeWinScroll(strPath, strTitle, iWidth, iHeight, bFlushScreen)
{
    //alert('dialogWidth=' + iWidth + ';dialogHeight=' + iHeight);
    window.showModalDialog(strPath, strTitle, 'status=no;resizable:no;scroll:yes;help:no;dialogWidth=' + iWidth + 'px;dialogHeight=' + iHeight + 'px');
    return bFlushScreen;
}

function getAbsolutePosition(obj)
{
    position = new Object();
    position.x = 0;
    position.y = 0;
    var tempobj = obj;
    while(tempobj!=null && tempobj!=document.body)
    {
        position.x += tempobj.offsetLeft + tempobj.clientLeft;
        position.y += tempobj.offsetTop + tempobj.clientTop;
        tempobj = tempobj.offsetParent
    }
    position.x += document.body.scrollLeft;
    position.y += document.body.scrollTop;
    return position;
}

