    <!-- 최P 본 상품 탭 시작 -->
    function OpenWindow(url,intWidth,intHeight) {           // 일정보기
          window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",resizable=1,scrollbars=no") ;
    }  

    var lastScrollY = 0;
    var layerLeftPosition = 0;
    function initlayerPostion() {

        //layerLeftPosition = document.body.offsetWidth/2 + 465;
        layerLeftPosition = document.body.offsetWidth/2 + 475; // 옥화 : 초기 가로값.

        if (layerLeftPosition <= 955) {
            layerLeftPosition = 955;
        }
        document.getElementById("productView").style.top = 0 + "px";                        // 옥화 : px 추가(파폭도 같이 적용될려면 px가 붙어야함. ie는 없어도 됨.
        document.getElementById("productView").style.left = layerLeftPosition + "px";       // 옥화 : px 추가(파폭도 같이 적용될려면 px가 붙어야함. ie는 없어도 됨.
        $("#productView").css("display","block");
        document.getElementById("nowSeeList").style.left = layerLeftPosition - 298 + "px";  // 옥화 : px 추가(파폭도 같이 적용될려면 px가 붙어야함. ie는 없어도 됨.
    }
        
    function layerPostion() {
        //layerLeftPosition = document.body.offsetWidth/2 + 465;
        layerLeftPosition = document.body.offsetWidth/2 + 475; // 옥화 : 브라우져 사이즈 변경시 지정되는 가로값. 

        if (layerLeftPosition <= 955) {
            layerLeftPosition = 955;
        }
        //document.getElementById("productView").style.left = layerLeftPosition;
        //document.getElementById("nowSeeList").style.left = layerLeftPosition - 0;
        $("#productView").css("left", layerLeftPosition + "px"); // 옥화 : px 추가(파폭도 같이 적용될려면 px가 붙어야함. ie는 없어도 됨.
        $("#nowSeeList").css("left", layerLeftPosition - 0 + "px"); // 옥화 : px 추가(파폭도 같이 적용될려면 px가 붙어야함. ie는 없어도 됨.
    }

    function heartBeat() {
        //var diffY = document.body.scrollTop;
        var diffY = getWindowScrollTop();    // 옥화 : 파폭에서도 될수 있도록.

        if (diffY != lastScrollY) {
            percent = .5 * (diffY - lastScrollY);

            if (percent > 900) {
                percent = Math.ceil(percent);
            } else { 
                percent = Math.floor(percent);
            }

            //document.all.productView.style.pixelTop += percent;
            //document.all.nowSeeList.style.pixelTop += percent;

            document.getElementById('productView').style.top = parseInt(document.getElementById('productView').style.top) + percent + "px"; // 비표준 태그 없앰. 
            document.getElementById('nowSeeList').style.top = parseInt(document.getElementById('nowSeeList').style.top) + percent  + "px";  // 비표준 태그 없앰.

            lastScrollY = lastScrollY + percent;
        }
    }

    // 최근본상품 레이어 열기
    function layerNowSeeOn(){
        $('#nowSeeList').show();
    }
    // 최근본상품 레이어 닫기
    function layerNowSeeOff(){
        $('#nowSeeList').hide();
    }
    $(document).ready(function(){
        initlayerPostion();
        window.setInterval('heartBeat()',5);
    //window.setInterval('heartBeat()', 3000);
    window.onresize = layerPostion;
    OnLoad();
    });
    // 옥화 : scrolltop 구하기.
    function getWindowScrollTop(){
        return (document.documentElement&&document.documentElement.scrollTop)||(document.body&&document.body.scrollTop)||0;
    }
    
    // 옥화 : clientHeight 구하기
    function getWindowClientHeight() {
        return( window.innerHeight||(document.documentElement&&document.documentElement.clientHeight)||(document.body&&document.body.clientHeight)||0);
    }
    function OnLoad() {
        var y;
        
        var oDivLayer = document.getElementById('productView');
    
     // 페이지 로딩시 포지션
        //productView.style.pixelTop=document.body.scrollTop + document.body.clientHeight - productView.offsetHeight //- 700;
        $(oDivLayer).css("top", getWindowScrollTop() + getWindowClientHeight() - oDivLayer.offsetHeight);
        
        //productView.style.visibility = "visible";
        $(oDivLayer).css("visibility", "visible");
    
        // initializing UI update timer
        CheckUIElements();
    
        return true;
    }
    
    function CheckUIElements() {
    
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;
        
        var oDivLayer = document.getElementById('productView');
    
        yMenuFrom = parseInt (oDivLayer.style.top, 10);
        yMenuTo = getWindowScrollTop() + 58;
        //yMenuTo = document.body.scrollTop + document.body.clientHeight - productView.offsetHeight - 100 // 위쪽 위치
    
        timeoutNextCheck = 500;
    
        if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
         setTimeout ("CheckUIElements()", timeoutNextCheck);
      return;
     }
    
     var oDivLayer = document.getElementById('productView');
     
     if ( yButtonFrom != yButtonTo ) {
         yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
      if ( yButtonTo < yButtonFrom )
                yOffset = -yOffset;
      timeoutNextCheck = 10;
     }
     if ( yMenuFrom != yMenuTo ) {
         yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
      if ( yMenuTo < yMenuFrom )
          yOffset = -yOffset;
    
            //oDivLayer.style.top = parseInt (oDivLayer.style.top, 10) + yOffset;
            oDivLayer.style.top = parseInt (oDivLayer.style.top, 10) + yOffset + "px"; // 옥화 : 파폭 지원위해 px 붙임
    
            timeoutNextCheck = 10;
        }
    
     setTimeout ("CheckUIElements()", timeoutNextCheck);
    }

