﻿<!----------------------------------------------------------------------------!>
<!-- <copyright from='2006' to='2006' company='XXX Co.,Ltd.'>               --!>
<!--    Copyright (c) XXX. All Rights Reserved.                             --!>
<!--    본 프로그램의 저작권은 XXX 에 있습니다.                             --!>
<!-- </copyright                                                            --!>
<!-- -------------------------------------------------------------------------!>
<!-- 소스명     : Dom.js                                                    --!>
<!-- 작성자     :                                                           --!>
<!-- 설  명     : 공통 Script                                               --!>
<!-- 작성일     : 2006-07-04                                                --!>
<!-- 변경사항	:                                                           --!>
<!-- Who (When) : Description                                               --!>
<!----------------------------------------------------------------------------!>

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcGetElementById()                                      --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	: ID                                                        --!>
<!-- 반 환 값	: 정상 - DOM 객체                                           --!>
<!--              오류 - null                                               --!>
<!--                                                                        --!>
<!-- 모든 브라우저의 DOM 객체를 얻을 수 있다.                               --!>
<!----------------------------------------------------------------------------!>
function funcGetElementById(strObjectId) 
{
// childNodes : 현재 요소의 자식을 배열로 표현한다.
// firstChild : 현재 요소의 첫번째 자식이다.
// lastChild : 현재 요소의 마지막 자식이다.
// nextSibling : 현재 요소와 바로 다음의 요소를 의미한다.
// nodeValue : 해당 요소의 값을 읽고 쓸 수 있는 속성을 정의한다.(=data)
// parentNode : 해당 요소의 부모노드이다.
// previousSibling : 현재 요소와 바로 이전의 요소를 의미한다.
// getElementById(id) : 다큐먼트에서 특정한 id 속성값을 가지고 있는 요소를 반환한다.
// getElementsByTagName(name) : 특정한 태그 이름을 가지고 있는 자식 요소로 구성된 배열을 리턴한다.
// hasChildNodes() : 해당 요소가 자식 요소를 포함하고 있는지를 나타내는 Boolean 값을 리턴한다.
// getAttribute(name) : 특정한 name 에 해당하는 요소의 속성값을 리턴한다.
// document.createElement(tagName) : tagName 으로된 엘리먼트를 생성한다. div 를 메소드 파라미터로 입력하면 div 엘리먼트가 생성된다.
// document.createTextNode(text) : 정적 텍스트를 담고 있는 노드를 생성한다.
// <element>.appendChild(childNode) : 특정 노드를 현재 엘리먼트의 자식 노드에 추가시킨다. (예를들어 select 엘리먼트에 option 엘리먼트 추가)
// <element>.getAttribute(name) : 속성명이 name 인 속성값을 반환한다.
// <element>.setAttribute(name, value) : 속성값 value 를 속성명이 name 인 곳에 저장한다.
// <element>.insertBefore(newNode, targetNode) : newNode 를  targetNode 전에 삽입한다.
// <element>.removeAttribute(name) : 엘리먼트에서 name 속성을 제거한다.
// <element>.removeChild(childNode) : 자식 엘리먼트를 제거한다.
// <element>.replaceChild(newNode, oldNode) : oldNode 를 newNode 로 치환한다.
// <element>.hasChildNodes() : 자식 노드가 존재하는지 여부를 판단한다. 리턴형식은 Boolean 이다.
    if(typeof(strObjectId) == "string")
    {

		if(document.getElementById && document.getElementById(strObjectId)) 
		{
			return document.getElementById(strObjectId); // check W3C DOM
		}
		else if (document.all && document.all(strObjectId))
		{
			return document.all(strObjectId); // IE4
		}
		else if (document.layers && document.layers[strObjectId])
		{
			return document.layer[strObjectId]; // NN4
		}
	}
	else if(typeof(strObjectId) == "object")
	{
	    return strObjectId
	}
    else 
    {
        return null;
    }
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcGetChildNode()                                        --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>

function funcAppendChild(jsPSid, jsPSTagNm, jsPSValue)
{
    var jsLOParent = funcGetElementById(jsPSid);
    
    if (jsLOParent)
    {
        var jsLONewNode;
        if(jsPSTagNm == '')
        {
            jsLONewNode=document.createTextNode(jsPSValue);
        }
        else
        {
             jsLONewNode=document.createElement(jsPSTagNm); 
             jsLONewNode.value = jsPSValue;
        }    

        jsLOParent.appendChild(jsLONewNode);
    }
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcGetChildNode()                                        --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>

function funcInsertText(jsPSid, jsPSValue)
{
    var jsLOParent = funcGetElementById(jsPSid);
    
    if (jsLOParent)
    {
        jsLOParent.innerHTML = jsPSValue
    }
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcGetChildNode()                                        --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcFindChildNode(jsPSId, jsPISeq) 
{
    return funcGetElementById(jsPSId).childNodes[jsPISeq]?funcGetElementById(jsPSId).childNodes[jsPISeq]:null;
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcGetValueById()                                        --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcGetValueById(strObjectId)
{    
    return funcGetElementById(strObjectId)?funcGetElementById(strObjectId).value:"";
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcGetElementsByTagName()                                --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcGetElementsByTagName(strTagName)
{
    if(strTagName=="*" && document.all)
    {
        return document.all;
    }
    
    return document.getElementsByTagName?document.getElementsByTagName(strTagName):new Array;
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcFindChildNodeValue()                                  --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcFindChildNodeValue(obj, tag) 
{
    return obj.getElementsByTagName(tag)[0].firstChild.nodeValue;
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcGetSeletedValue()                                     --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>

function funcGetSeletedValue(strid)
{
    var jsLSResult = null;
    var jsLOSelect = funcGetElementById(strid);
    
    if(jsLOSelect)
    {
        jsLSResult = jsLOSelect.options[jsLOSelect.selectedIndex].value;
    }
    
    return jsLSResult;
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcDisplaySet()                                          --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcDisplaySet(strId)
{
   var objDisplayId = funcGetElementById(strId);
   
   if(objDisplayId)
   {
       objDisplayId.style.display = "";
   }
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcDisplayNoneSet()                                      --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcDisplayNoneSet(strId)
{
   var objDisplayId = funcGetElementById(strId);
  
   if(objDisplayId)
   {
       objDisplayId.style.display = "none";
   }
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcVisibilityHideSet()                                   --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>

function funcVisibilityHideSet(strObjectId)
{
    funcGetElementById(strObjectId).style.visibility = "hidden";
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcVisibilityShowSet()                                   --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>

function funcVisibilityShowSet(strObjectId)
{
    funcGetElementById(strObjectId).style.visibility = "visible";
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcBgImgSet()                                            --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcBgImgSet(strId, strImg)
{
   var objDisplayId = funcGetElementById(strId);
   
   if(objDisplayId)
   {
       objDisplayId.style.backgroundImage = "url(" + strImg + ")";
   }
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcBgImgSet()                                            --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcBgImgGet(strId, strImg)
{
   var objDisplayId = funcGetElementById(strId);
   var strBgImg = ""
   
   if(objDisplayId)
   {
       strBgImg = objDisplayId.style.backgroundImage;
   }
   
   return strBgImg;
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcRemoveChildById()                                     --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcRemoveChildById(strId)
{
    var objDisplayId;

    objDisplayId = funcGetElementById(strId);

    if(objDisplayId)
    {   
        for (var i=0;i<objDisplayId.childNodes.length;i++) 
        {   
            if(typeof(objDisplayId.childNodes[i]) != "function")
            {          
                objDisplayId.removeChild(objDisplayId.childNodes[i]);
            }

        }
               
        if(objDisplayId.childNodes.length > 0)
        {
            funcRemoveChildById(strId);
        }        
    }
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcDisabledById()                                        --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcDisabledById(strId, boolFlag)
{
    var objDisplayId;
    
    objDisplayId = funcGetElementById(strId);

    if(objDisplayId != null)
    {
       objDisplayId.disabled = boolFlag;
    }
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcDisabledChildById()                                   --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcDisabledChildById(strId, strTag, boolFlag)
{
    var objDisplayId;
    
    if (typeof strId == 'string')
    {
        objDisplayId = funcGetElementById(strId);
    }
    else
    {
        objDisplayId = strId;
    }

    if(objDisplayId != null)
    {   
        for (var i=0;i<objDisplayId.childNodes.length;i++) 
        {
            if(objDisplayId.childNodes[i])
            {
                if(objDisplayId.childNodes[i].childNodes)
                {
                    if(objDisplayId.childNodes[i].nodeName == strTag)
                    {
                        funcDisabledById(objDisplayId.childNodes[i], boolFlag);
                    }
                    else
                    {
                        funcDisabledChildById(objDisplayId.childNodes[i], strTag, boolFlag);
                    }
                }
                else
                {
                    if(objDisplayId.childNodes[i].nodeName == strTag )
                    {                        
                        funcDisabledById(objDisplayId.childNodes[i], boolFlag);
                    }
                }
            }
        }
    }
}

<!----------------------------------------------------------------------------!>
<!-- 함 수 명	: funcRemoveChildByTag()                                    --!>
<!-- 설 명      :                                                           --!>
<!-- 전달인수	:                                                           --!>
<!-- 반 환 값	: 정상 -                                                    --!>
<!--              오류 -                                                    --!>
<!--                                                                        --!>
<!----------------------------------------------------------------------------!>
function funcRemoveChildByTag(strTag)
{
    var FindTagSpans = document.getElementsByTagName(strTag);

    for(var i=0;i<FindTagSpans.length;i++)
    {
        var FindTagSpan = FindTagSpans[i];
        FindTagSpan.parentNode.removeChild(FindTagSpan);
    }
}

<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcInnerWidth(), funcInnerHeight()                       --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 - Width, Height                                      --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!-- 윈도우나 프레임의 내부 크기를 알아내는 방법이다.                       --!> 
<!----------------------------------------------------------------------------!>
function funcInnerWidth() 
{
    var strWidth;
    
    if (self.innerWidth) 
    { // IE 외 모든 브라우저
        strWidth = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth) 
    { // Explorer 6 Strict 모드
        strWidth = document.documentElement.clientWidth;
    }
    else if (document.body) 
    { // 다른 IE 브라우저
        strWidth = document.body.clientWidth;
    }
    
    return strWidth;
}

function funcInnerHeight() 
{
    var strHeight;
    
    if (self.innerHeight) 
    { // IE 외 모든 브라우저
        strHeight = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) 
    { // Explorer 6 Strict 모드
        strHeight = document.documentElement.clientHeight;
    }
    else if (document.body) 
    { // 다른 IE 브라우저
        strHeight = document.body.clientHeight;
    }
    
    return strHeight;
}

<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcPageXOffset(), funcPageYOffset()                      --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 - Width, Height                                      --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!-- 페이지가 얼마나 스크롤 됐는지 알아내는 방법이다.                       --!> 
<!----------------------------------------------------------------------------!>
function funcPageXOffset() 
{
    var strPageXOffset
    
    if (self.pageXOffset) 
    { // IE 외 모든 브라우저
        strPageXOffset= self.pageXOffset;
    }
    else if (document.documentElement && document.documentElement.scrollLeft) 
    {// Explorer 6 Strict
        strPageXOffset = document.documentElement.scrollLeft;
    }
    else if (document.body) 
    { // IE 브라우저
        strPageXOffset = document.body.scrollLeft;
    }
    
    return strPageXOffset;
}

function funcPageYOffset() 
{
    var strPageYOffset;
    
    if (self.pageYOffset) 
    { // IE 외 모든 브라우저
        strPageYOffset = self.pageYOffset;
    }
    else if (document.documentElement && document.documentElement.scrollTop) 
    {// Explorer 6 Strict
        strPageYOffset = document.documentElement.scrollTop;
    }
    else if (document.body) 
    { // IE 브라우저
        strPageYOffset = document.body.scrollTop;
    }
    
    return strPageYOffset;
}


<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcGetComputedStyle()                                    --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 - 해당노드의 스타일 속성                             --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!-- 스타일 가져오기                                                        --!> 
<!----------------------------------------------------------------------------!>
function funcGetPropertyValue(strElementId,strStyleProp)
{
    var strElement = funcGetElementById(strElementId);
    var strPropertyValue;
    
    if (window.getComputedStyle)
    {// IE 외 모든 브라우저
        strPropertyValue = document.defaultView.getComputedStyle(strElement,null).getPropertyValue(styleProp);
    }
    else if (strElement.currentStyle)
    {// IE 브라우저
        strPropertyValue = strElement.currentStyle[styleProp];
    }

    return strPropertyValue;
}

<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcGetDateObj()                                          --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 -                                                    --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!-- 해당노드의 스타일 넓이와 높이 지정                                     --!> 
<!----------------------------------------------------------------------------!>

function funcGetDateObj(strDate)
{
    var jsLODate;
    var jsLSDate;
    var jsLDivision;
    var jsLDivisions = strDate.match(/\D/g);
    var jsLIYear = new Number();
    var jsLIMonth = new Number();
    var jsLIDay = new Number();
    
    if(jsLDivisions)
    {
        jsLDivision = jsLDivisions[0];
        jsLSDate = strDate.split(jsLDivision);
        jsLIYear = parseInt(jsLSDate[0], 10);
        jsLIMonth = parseInt(jsLSDate[1], 10);
        jsLIDay = parseInt(jsLSDate[2], 10);
    }
    else
    {
        jsLSDate = strDate.replace(/\D/g, '');
        
		if(jsLSDate.length == 8)
		{
			jsLIYear = parseInt(jsLSDate.substring(0, 4), 10);
			jsLIMonth = parseInt(jsLSDate.substring(4, 6), 10);
			jsLIDay = parseInt(jsLSDate.substring(6, 8), 10);
		}
		else
		{
		    return null;
		}
    }
    
    jsLODate = new Date(jsLIYear, jsLIMonth, jsLIDay);

    return jsLODate;
}

<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcGetDateDiff()                                         --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 -                                                    --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!-- 해당노드의 스타일 넓이와 높이 지정                                     --!> 
<!----------------------------------------------------------------------------!>

function funcGetDateDiff(jsPOFromTime, jsPOToTime, jsPIFlag)
{
    var jsLIDiffTime = jsPOToTime.getTime() - jsPOFromTime.getTime();

    var jsLISecUnit = 1000;
    var jsLIMinUnit = jsLISecUnit * 60;
    var jsLIHourUnit = jsLIMinUnit * 60;
    var jsLIDateUnit = jsLIHourUnit * 24;
    var jsLIMonthUnit = jsLIDateUnit * 30;
    var jsLIYearUnit = jsLIMonthUnit * 12;

    var jsLIYear;     //1
    var jsLIMonth;    //2
    var jsLIDate;     //4
    var jsLIHour;     //8
    var jsLIMin;      //16
    var jsLISec;      //32

    var jsLSResult;

    with (Math)
    {
        jsLIYear = round(jsLIDiffTime/jsLIYearUnit);
        jsLIMonth = round(jsLIDiffTime/jsLIMonthUnit);
        jsLIDate = round(jsLIDiffTime/jsLIDateUnit);
        jsLIHour = round(jsLIDiffTime/jsLIHourUnit);
        jsLIMin = round(jsLIDiffTime/jsLIMinUnit);
        jsLISec = round(jsLIDiffTime/jsLISecUnit);
    }

    if(1 == jsPIFlag)
    {
        jsLSResult = jsLIYear;
    }
    else if(2 == jsPIFlag)
    {
        jsLSResult = jsLIMonth;
    }
    else if(4 == jsPIFlag)
    {
        jsLSResult = jsLIDate;
    }
    else if(8 == jsPIFlag)
    {
        jsLSResult = jsLIHour;
    }
    else if(16 == jsPIFlag)
    {
        jsLSResult = jsLIMin;
    }
    else if(32 == jsPIFlag)
    {
        jsLSResult = jsLISec;
    }
    
    return jsLSResult;
}

<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcSetLeft(), funcSetTop()                               --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 -                                                    --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!-- 해당노드의 스타일 넓이와 높이 지정                                     --!> 
<!----------------------------------------------------------------------------!>
function funcSetLeft(strElementId,strPx)
{
    var strElement = funcGetElementById(strElementId);
    
    if (strElement.style.left)
    {// IE 외 모든 브라우저
        strElement.style.left = strPx + "px";
    }
    else if (strElement.style.pixelLeft)
    {// IE 브라우저
        strElement.style.pixelLeft = strPx;
    }
}

function funcSetTop(strElementId,strPx)
{
    var strElement = funcGetElementById(strElementId);
    
    if (strElement.style.top)
    {// IE 외 모든 브라우저
        strElement.style.top = strPx + "px";
    }
    else if (strElement.style.pixelTop)
    {// IE 브라우저
        strElement.style.pixelTop = strPx;
    }
}

<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcSetLeft(), funcSetTop()                               --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 -                                                    --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!-- 해당노드의 스타일 넓이와 높이 지정                                     --!> 
<!----------------------------------------------------------------------------!>
function funcSetWidth(strElementId,strPx)
{
    var strElement = funcGetElementById(strElementId);
    
    if (strElement.style.pixelWidth == 0)
    {// IE 브라우저
        strElement.style.pixelWidth = strPx;
    }
    else
    {// IE 외 모든 브라우저
        strElement.style.width = strPx + "px";
    }
}

function funcSetHeight(strElementId,strPx)
{
    var strElement = funcGetElementById(strElementId);

    if (strElement.style.pixelHeight == 0)
    {// IE 브라우저
        strElement.style.pixelHeight = strPx;
    }
    else
    {// IE 외 모든 브라우저
        strElement.style.height = strPx + "px";
    }
}

<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcSetLeft(), funcSetTop()                               --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 -                                                    --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!-- 해당노드의 스타일 넓이와 높이 지정                                     --!> 
<!----------------------------------------------------------------------------!>

function funcGetOffSet(jsPOTemp, jsPSDirection) 
{ 
		// Function for IE to calculate position 
		// of an jsPOTempement. 
    var jsPIOffSet = jsPOTemp["offset"+jsPSDirection] 
		
	if (jsPSDirection=="Top") 
	{
		jsPIOffSet+=jsPOTemp.offsetHeight 
	}
		
	jsPOTemp = jsPOTemp.offsetParent 
		
	while (jsPOTemp!=null)
	{ 
		jsPIOffSet+=jsPOTemp["offset"+jsPSDirection] 
		jsPOTemp = jsPOTemp.offsetParent 
	} 
		
	return jsPIOffSet 
} 
	
<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcEmbededFlash()                                        --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 -                                                    --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!--                                                                        --!> 
<!----------------------------------------------------------------------------!>

function funcEmbededFlash(strSrcUrl,objWidth,objHeight)
{
    var resultHTML = "";
    
    resultHTML += "<OBJECT codeBase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
    resultHTML += "height='"+objHeight+"' width='"+objWidth+"' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'>";
    resultHTML += "<PARAM NAME='FlashVars' VALUE=''>";
    resultHTML += "<PARAM NAME='Movie' VALUE='"+strSrcUrl+"'>";
    resultHTML += "<PARAM NAME='Src' VALUE='"+strSrcUrl+"'>";
    resultHTML += "<PARAM NAME='WMode' VALUE='Transparent'>";
    resultHTML += "<PARAM NAME='Play' VALUE='-1'>";
    resultHTML += "<PARAM NAME='Loop' VALUE='-1'>";
    resultHTML += "<PARAM NAME='Quality' VALUE='High'>";
    resultHTML += "<PARAM NAME='SAlign' VALUE=''>";
    resultHTML += "<PARAM NAME='Menu' VALUE='-1'>";
    resultHTML += "<PARAM NAME='Base' VALUE=''>";
    resultHTML += "<PARAM NAME='Scale' VALUE='ShowAll'>";
    resultHTML += "<PARAM NAME='DeviceFont' VALUE='0'>";
    resultHTML += "<PARAM NAME='EmbedMovie' VALUE='0'>";
    resultHTML += "<PARAM NAME='BGColor' VALUE=''>";
    resultHTML += "<PARAM NAME='SWRemote' VALUE=''>";
    resultHTML += "<PARAM NAME='MovieData' VALUE=''>";
    resultHTML += "<param name='allowScriptAccess' value='always' />";
    resultHTML += "<PARAM NAME='SeamlessTabbing' VALUE='1'>";
    resultHTML += "<PARAM NAME='Profile' VALUE='0'>";
    resultHTML += "<PARAM NAME='ProfileAddress' VALUE=''>";
    resultHTML += "<PARAM NAME='ProfilePort' VALUE='0'>";
    resultHTML += "<embed src='"+strSrcUrl+"' quality='high' WMode='Transparent' bgcolor='#ffffff' width='"+objWidth+"' height='"+objHeight+"' align='middle'";
    resultHTML += "type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>";
    resultHTML += "</OBJECT>";
    
    return resultHTML
}

<!----------------------------------------------------------------------------!> 
<!-- 함 수 명	: funcEmbededMedia()                                        --!> 
<!-- 설 명      :                                                           --!> 
<!-- 전달인수	:                                                           --!> 
<!-- 반 환 값	: 정상 -                                                    --!> 
<!--              오류 - null                                               --!> 
<!--                                                                        --!> 
<!--                                                                        --!> 
<!----------------------------------------------------------------------------!>

function funcEmbededMedia(strSrcUrl,objWidth,objHeight)
{
    var resultHTML = "";
    

    resultHTML += "<object id='Player' classid='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95'  standby='Loading Windows Media Player components...'  type='application/x-oleobject' align='top' width='" + objWidth + "' height='" + objHeight + "' VIEWASTEXT>";
    resultHTML += "<param name='FileName' id='FileName' value='"+ strSrcUrl +"'>";
    resultHTML += "<param name='transparentAtStart' value='True'>";
    resultHTML += "<param name='transparentAtStop' value='False'>";
    resultHTML += "<param name='AnimationAtStart' value='False'>";
    resultHTML += "<param name='ShowControls' value='True'>";
    resultHTML += "<param name='ShowStatusBar' value='True'>";
    resultHTML += "<param name='AutoRewind' value='True'>";
    resultHTML += "<param name='AutoStart' value='True'>";
    resultHTML += "<param name='InvokeURLs' value='False'>";
    resultHTML += "<param name='VideoBorderWidth' value='False'>";
    resultHTML += "<param name='SendOpenStateChangeEvents' value='-1'>";
    resultHTML += "<param name='SendWarningEvents' value='-1'>";
    resultHTML += "<param name='SendErrorEvents' value='-1'>";
    resultHTML += "<param name='SendKeyboardEvents' value='1'>";
    resultHTML += "<param name='SendMouseClickEvents' value='1'>";
    resultHTML += "<param name='SendMouseMoveEvents' value='0'>";
    resultHTML += "<param name='SendPlayStateChangeEvents' value='1'>";
    resultHTML += "<param name='EnableContextMenu' value='False'>";
    resultHTML += "<param name='CursorType' value='0'>";
    resultHTML += "<param name='ClickToPlay' value='0'>";
    resultHTML += "<param name='AllowScan' value='-1'>";
    resultHTML += "</object>";

    return resultHTML
}