var UA = navigator.userAgent.toLowerCase();
var isIE = (UA.indexOf('msie') >= 0) ? true : false;
var isNS = (UA.indexOf('mozilla') >= 0) ? true : false;

function modalDialog2(url,width,height){
    //var left = screen.availWidth/2 - width/2;
    //var top = screen.availHeight/2 - height/2;
    //activeModalWin = window.open(url, "", "width="+width+"px,height="+height+",left="+left+",top="+top+",scrollbars=yes,resizable=yes");
    //window.onfocus = function(){if (activeModalWin.closed == false){activeModalWin.focus();};};

    if(typeof(modalDialogShow) == "undefined") {
    
      var id = "ID"+(new Date()).getTime();
      var f = new ISWindow(id);
      f.iconPath = oUtil.scriptPath + "icons/";
      f.show({width:width+"px", height:height+"px",overlay:false,center:true, url:url, openerWin:null, options:null});
    
    } else {
        modalDialogShow(url, width, height );
    }
    
    }
function modalDialog(url,width,height,title) {
    if (title)
        box.open({ url: url, type: 'iframe', width: width + 'px', height: height + 'px', title: title, adjY: '20px', overlay: false });
    else
        box.open({ url: url, type: 'iframe', width: width + 'px', height: height + 'px', adjY: '20px', overlay: false });
    }
function mDialogInline(url, width, height, title, overlay, parent, addscript, addclass) {
    if (isIE) height = height + 10;
    if (title)
        box.open({ url: url, type: 'inline', width: width + 'px', height: height + 'px', title: title, adjY: '20px', overlay: overlay, parent: parent });
    else
        box.open({ url: url, type: 'inline', width: width + 'px', height: height + 'px', adjY: '20px', overlay: overlay, parent: parent });
    if (addscript) eval(addscript);
    if (addclass) 
        {
        box.rt.ca.className = addclass;
        }
    else 
        {
        box.rt.ca.className = 'content_area';
        }
    }
function icCloseDlg(){
    box.close();
    }
function areaOver(s) {
    if (document.getElementById('divAddModule_' + s))
        document.getElementById('divAddModule_' + s).style.visibility = 'visible';
    }
function areaOut(s) {
    if (document.getElementById('divAddModule_' + s))
        document.getElementById('divAddModule_' + s).style.visibility = 'hidden';
    }
