﻿// Window Controls JScript File

//Open Window In Standard Popup Mode
function WindowOpen(URL,Name,Width,Height,Top,Left)
{
        window.open(URL
        ,Name
        ,'height=' + Height + ',width=' + Width + ',top=' + Top + ',left=' + Left + ',toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,modal=yes');
        return false;
}

//Open Window In Modal Mode
function WindowModal(URL,Name,Width,Height,Top,Left,ReturnFalse) 
{
    if (window.showModalDialog)
    {
        //window.showModalDialog("xpopupex.htm","name","dialogWidth:255px;dialogHeight:250px");
        window.showModalDialog(URL,Name,"dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;red");
        if(ReturnFalse=="1")
        {
            return false;
        }
    } 
    else 
    {
        WindowOpen(URL,Name,Width,Height,Top,Left);
        //window.open('xpopupex.htm'
        //,'name'
        //,'height=255,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
    }
}

//Open Window In DHTML Mode
function WindowDHTML(ID,URL,Name,Width,Height,Top,Left,Resize,Scrolling,Center)
{
    //if (!ie5&&!ns6)
    //{
    //    WindowOpen(URL,Name,Width,Height,Top,Left);
        //window.open(url,"","width=width,height=height,scrollbars=1")
    //}
    //else
    //{
        //var googlewin=dhtmlwindow.open(ID, "iframe", URL, Name, "width=" + Width + "px,height=" + Height + "px,left=" + Left + "px,top=" + Top + "px,resize=1,scrolling=1,center=1", "recal");
        var googlewin=dhtmlwindow.open(ID, "iframe", URL, Name, "width=" + Width + "px,height=" + Height + "px,resize=" + Resize + ",scrolling=" + Scrolling + ",center=" + Center + "", "recal");
        //var googlewin=dhtmlwindow.open(ID, "iframe", URL, Name, "resize=1,scrolling=1,center=1", "recal");
        //var googlewin=dhtmlwindow.open(ID, "iframe", URL, Name, "width=800px,height=800px,resize=1,scrolling=1,center=1", "recal");
        return false;
        //var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://google.com", "Google Web site", "width=700px,height=450px,resize=1,scrolling=1,center=1", "recal")
        //open:function(t, contenttype, contentsource, title, attr, recalonload)
        
        //document.getElementById("dwindow").style.display=''
        //document.getElementById("dwindow").style.width=initialwidth=Width
        //document.getElementById("dwindow").style.height=initialheight=Height
        //document.getElementById("dwindow").style.left=30
        //document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30 : document.body.scrollTop*1+30
        //document.getElementById("cframe").src=URL
    //}
}


