<!--
var example  = null;
var example1 = null;

/***************************************************/
/*** ÇÔ¼ö ¸í   | popwindow  ************************/
/**************|************************************/
/*** Argument1 | Page ÁÖ¼Ò   ***********************/
/*** Argument2 | °¡·Î ³ôÀÌ   ***********************/
/*** Argument3 | ¼¼·Î ³ôÀÌ   ***********************/
/*** Argument4 | X ÁÂÇ¥      ***********************/
/*** Argument5 | Y ÁÂÇ¥      ***********************/
/*** Argument6 | Window ÀÌ¸§ ***********************/
/*** Argument7 | Properties  ***********************/
/***************************************************/

function popWindow(url){
  var args = popWindow.arguments;
  var window_name, window_properties, window_width, window_height, window_left, window_top ;
    url               = args[0];
    window_width      = args[1];
    window_height     = args[2];
    window_left       = args[3];
    window_top        = args[4];
    window_name       = args[5];
    window_properties = args[6];

    if ( typeof(window_width ) == 'undefined' ) { window_width  = -1; }
    if ( typeof(window_height) == 'undefined' ) { window_height = -1; }
    if ( typeof(window_left  ) == 'undefined' ) { window_left   = -1; }
    if ( typeof(window_top   ) == 'undefined' ) { window_top    = -1; }
    if ( typeof(window_name  ) == 'undefined' ) { window_name   = ''; }

    if ( window_width  < 0 ) { window_width  = screen.width ; }
    if ( window_height < 0 ) { window_height = screen.height; }

    if ( window_left   < 0 ) { window_left = ( screen.width - window_width  ) / 2; }
    if ( window_top    < 0 ) { window_top  = ( screen.height- window_height ) / 2; }

    var properties = '';

    properties = "width=" + window_width + " ,height=" + window_height + ",";
    if ( window_properties == null || window_properties == "" ) {
        properties += "location=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no,top=" + window_top + ",left=" + window_left;
    } else {
        properties += window_properties + ",top=" + window_top + ",left=" + window_left;
    }

//    alert ( properties );

    var name;
    if ( window_name == null || window_name == "" ) {
        name = "";
    } else {
        name = window_name;
    }

    example = window.open(url,name,properties);
    return example;
}
/***************************************************/
/*** ÇÔ¼ö ¸í   | modalDialog   *********************/
/**************|************************************/
/*** Argument0 | ±¸ºÐ ( Modal, Modeless ) **********/
/*** Argument1 | Page ÁÖ¼Ò   ***********************/
/*** Argument2 | °¡·Î ³ôÀÌ   ***********************/
/*** Argument3 | ¼¼·Î ³ôÀÌ   ***********************/
/*** Argument4 | X ÁÂÇ¥      ***********************/
/*** Argument5 | Y ÁÂÇ¥      ***********************/
/*** Argument6 | Window ÀÌ¸§ ***********************/
/*** Argument7 | Properties  ***********************/
/***************************************************/

function modalDialog(url) {
  var args = modalDialog.arguments;
  var window_width,window_height, window_left, window_top ;
    gubun             = args[0];
    url               = args[1];
    window_width      = args[2];
    window_height     = args[3];
    window_left       = args[4];
    window_top        = args[5];
    window_name       = args[6];
    window_properties = args[7];

    if ( typeof(window_width ) == 'undefined' ) { window_width  = -1; }
    if ( typeof(window_height) == 'undefined' ) { window_height = -1; }
    if ( typeof(window_left  ) == 'undefined' ) { window_left   = -1; }
    if ( typeof(window_top   ) == 'undefined' ) { window_top    = -1; }
    if ( typeof(window_name  ) == 'undefined' ) { window_name   = ''; }

    if ( window_width  < 0 ) { window_width  = screen.width ; }
    if ( window_height < 0 ) { window_height = screen.height; }

    if ( window_left   > 0 && window_width  < 0 ) { window_left = ( screen.width - window_width  ) / 2; }
    if ( window_top    > 0 && window_height < 0 ) { window_top  = ( screen.height- window_height ) / 2; }

    var properties = '';

    properties = "dialogWidth=" + window_width + "px;dialogHeight=" + window_height + "px,";

    if ( window_properties == null || window_properties == "" ) {
        properties = "dialogTop:" + window_top + ";dialogleft:" + window_left + ";status:true;px;dialogresizable=yes;";
    } else {
        properties = "dialogTop:" + window_top + ";dialogleft:" + window_left + ";" + window_properties;
    }

//    alert ( properties );
    var name;
    if ( window_name == null || window_name == "" ) { name = "example"; } else { name = window_name; }
    window.name = name;
    if ( gubun == 'Modal' ) {
        showModalDialog(url,window,properties);
    } else if( gubun == 'Modeless' ) {
        if ( example1 == null ) {
            example1 = showModelessDialog(url,window,properties);
        } else {
            example1.close();
            example1 = showModelessDialog(url,window,properties);
        }
    }
}
//-->