function ShowFlash(FN_Src,FN_Width,FN_Height){
	document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" WIDTH="' + FN_Width + '" HEIGHT="' + FN_Height + '" id="" ALIGN="" VIEWASTEXT>');
	document.write('<PARAM NAME=movie VALUE="' + FN_Src + '"> ');
	document.write('<PARAM NAME=quality VALUE=high>');
	document.write('<PARAM NAME=wmode VALUE=transparent>');
	document.write('<PARAM NAME=bgcolor VALUE=#FFFFFF>');
	document.write('<EMBED src="' + FN_Src + '" quality=high bgcolor=#FFFFFF wmode=transparent WIDTH="' + FN_Width + '" HEIGHT="' + FN_Height + '" NAME="" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write('</OBJECT>');    
}

function GoMenu (P_Num, S_Num, D_Num) {
    var url = "";
    //alert(P_Num + " / " + S_Num + " / " + D_Num);
    
    if(P_Num == "0") {
        if(S_Num == "0") {
            url = ServiceRoot + "/";
        } else if(S_Num == "1") {
            url = ServiceRoot + "";
        } else if(S_Num == "9") {
            url = "http://www.koun.co.kr/";
        }

    } else if(P_Num == "1") {
        if(S_Num == "1") {
            url = ServiceRoot + "/Koun/Poem.html";
        } else if(S_Num == "2") {
            url = ServiceRoot + "/Koun/Prologue.html";
        } else if(S_Num == "3") {
            url = ServiceRoot + "/Koun/WhoisKoun.html";
        } else if(S_Num == "4") {
            url = ServiceRoot + "/Koun/Chronology.html";
        } else {
            url = ServiceRoot + "/Koun/Poem.html";
        }

    } else if (P_Num == "2") {
        url = ServiceRoot + "/Publish/Publish.html";

    } else if (P_Num == "3") {
        url = ServiceRoot + "/Award/Award.html";
    
    } else if (P_Num == "4") {
        url = "http://www.koun.co.kr/translation/translation.html";
    
    } else if (P_Num == "5") {
        url = ServiceRoot + "/Activity/Activity.html";
    
    } else if (P_Num == "6") {
        url = ServiceRoot + "/Photo/Photo.html";

    } else if (P_Num == "7") {
        url = ServiceRoot + "/TV/TV.html";

    } else if (P_Num == "8") {
        url = ServiceRoot + "/Contact/Contact.html";

    }
    
    if(url != "") {
        if (P_Num == "4") {
            window.open(url);
        } else {
            window.location.href = url;
        }
    }
}




/***************************************************************************/
/*  Description : 이미지 크기 제어(비례 제어방식)
/***************************************************************************/
function Resizing(obj, x, y) {
    var resizeWidth;
    var resizeHeight;
     
    // 썸네일 리사이즈
    if (obj.width > x || obj.height > y) {
        if (obj.width > obj.height) {
            resizeWidth = x;
            resizeHeight = obj.height * x / obj.width;
            if(resizeHeight > y) {
                resizeWidth = y * obj.width / obj.height;
                resizeHeight = y;
            }
        } else {
            resizeHeight = y;
            resizeWidth = obj.width * y / obj.height;
            if(resizeWidth > x) {
                resizeWidth = x;
                resizeHeight = x * obj.height / obj.width;
            }
        }
    } else {
        resizeWidth = obj.width;
        resizeHeight = obj.height;
    }
    obj.width = resizeWidth;
    obj.height = resizeHeight;
}

/***************************************************************************/
/*  Description : 썸네일 이미지 크기 제어 (Resizing() 활용)
/***************************************************************************/
function ResizeImage(x, y) {
    if(document.all.thumbImage == "[object]") { // 데이터 유무 검사
        if(document.all.thumbImage.length > 0) {  // 데이터가 1건인지 2건이상인지 검사
            for(var i=0 ; i<document.all.thumbImage.length ; i++) {
                Resizing(document.all.thumbImage[i], x, y);
            }
        } else {
            Resizing(document.all.thumbImage, x, y);
        }
    }
}
