반응형

/**
 * 브라우저의 버전을 체크합니다.
 */
function getbrowser() 
{
    var tempdocument = window.document;

    if (tempdocument.all && tempdocument.getelementbyid) // 인터넷 익스플로러 5.x
    { 
        return 1;
    }
    else if (tempdocument.all && !tempdocument.getelementbyid) // 인터넷 익스플로러 4.x
    { 
        return 2;
    }
    else if (tempdocument.getelementbyid && !tempdocument.all) // 넷스케이프 6
    { 
        return 3;
    }
    else if (tempdocument.layers) // 넷스케이프 4.x
    {     
        return 4;
    }
}

/**
 * 팝업창을 원하는 위치에 생성합니다.
 */
function openwindow(url, name, width, height, align, valign, option) 
{
    var x,y;
    var window_option = "width="+width+",height="+height;

    if (option!=null) window_option+=","+option;
    if (align==null) align="center";
    if (valign==null) valign="center";

    if (align=="left") x=0;
    else if (align=="right") x=(screen.width-width);
    else if (align=="center") x=(screen.width-width)/2

    if (valign=="top") y=0;
    else if (valign=="bottom") y=(screen.height-height);
    else if (valign=="center") y=(screen.height-height)/2

    window_option+=",left="+x+",top="+y;

    var win = window.open(url,name,window_option);

    focus();
    win.focus();
    return win;
}

/**
 * 윈도우가 열려있는지 체크합니다.
 */
function isalivewindow(win)
{
    if (!win.closed) return true;
    else return false;
}

/**
 * 사운드를 들을수 있는지 환경인지 체크합니다. (ie전용)
 */
function enablesound()
{
  document.write("");
  return player64.issoundcardenabled();
}

/**
 * 리얼플레이어(realplayer) 설치 여부 체크합니다.
 */
function enablerealplayer()
{
    var nrealmode=0;
    var nrealplayer5=0;
    var nrealplayer4=0;
    var nrealplayerg2=0;

    if (window.document.all) // ie
    {
        document.write('
    
    
  

WRITTEN BY
데르벨준

,