﻿function PopUp(Page,Width,Height,hasScrollBar,target){
    window.open(Page,target,"width=" + Width + ",height=" + Height + ",toolbar=no,location=no,status=no,memubar=no,scrollbars="+hasScrollBar+",resizable=no,left=50,top=50");
}

function Cover(bottom, top, ignoreSize) {
    var location = Sys.UI.DomElement.getLocation(bottom);
    top.style.position = 'absolute';
    top.style.top = location.y + 'px';
    top.style.left = location.x + 'px';
    if (!ignoreSize) {
        top.style.height = bottom.offsetHeight + 'px';
        top.style.width = bottom.offsetWidth + 'px';
    }
}

function getFlash(name,width,height,mode){
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+width+'" height="'+height+'">');
    document.write('<param name=movie value="'+name+'">');
    document.write('<param name=wmode value="'+mode+'">');
    document.write('<param name=quality value=high>');
    document.write('<param name=menu value=false>');
    document.write('<embed src="'+name+'" wmode="transparent" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
    document.write('</object>');
}

function getFlashString(name,width,height,mode){
    var strTemp = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+width+'" height="'+height+'">';
    strTemp += '<param name=movie value="'+name+'">';
    strTemp += '<param name=wmode value="'+mode+'">';
    strTemp += '<param name=quality value=high>';
    strTemp += '<param name=menu value=false>';
    strTemp += '<embed src="'+name+'" wmode="transparent" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>';
    strTemp += '</object>';
    return strTemp
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function PrintDoc() {
    document.getElementById("PrintHeader").style.display = "none";
    var objScriptX = document.getElementById("objScriptX")
    objScriptX.printing.header = "";                //머리글설정
    objScriptX.printing.footer = "";                  //바닥글설정
    
    if (location.search.indexOf("p=0")!=-1){
        objScriptX.printing.portrait = false;}
    else objScriptX.printing.portrait = true;
    
     // true-세로, false-가로
     if (location.search.indexOf("top=10")!=-1){
        objScriptX.printing.topMargin = 10.0;}
    else objScriptX.printing.topMargin = 15.0;
    objScriptX.printing.leftMargin = 10.0;          //좌측여백
    objScriptX.printing.rightMargin = 10.0;        //우측여백
    objScriptX.printing.bottomMargin = 10.0;     //하단여백
    objScriptX.printing.Print(true); //프린트실행 false프린트설정화면 안보여짐 true보여짐
    document.getElementById("PrintHeader").style.display = "block";
}

function GetParamValue(Url,Param) {
    var tmpParam = Url.substring(1).split("&");

    if (Url.substring(1).length > 0)
    {
        var Params = new Array;
        for (i=0;i< tmpParam.length ; i++)
        {
            Params = tmpParam[i].split("=");
            if (Params[0] == Param) {
                return Params[1];
            }
        }
    }
}