﻿function fn_rootPage() {
    if (document.location.toString().indexOf("/kier") > -1) {
        document.location.replace("http://" + document.location.host + "/kier");
    } else {
        document.location.replace("http://" + document.location.host);
    }

}

function Test() {
    alert(document.location.host);
    alert("TEST");
}  

function enterKey(e) {
    if (e.keyCode == 13) {
        Send();
    }
}

function flash(c, d, e) {
    if (document.location.toString().indexOf("/kier") > -1) {
        rootStr = "http://" + document.location.host + "/kier"
    }

    var flash_tag = "";
    flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
    flash_tag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
    flash_tag += 'WIDTH="' + c + '" HEIGHT="' + d + '" >';
    flash_tag += '<param name="movie" value="' + e + '">';
    flash_tag += '<param name="quality" value="high">';
    flash_tag += '<param name="wmode" value="transparent">';
    flash_tag += '<embed src="' + e + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
    flash_tag += 'type="application/x-shockwave-flash"  WIDTH="' + c + '" HEIGHT="' + d + '" wmode="transparent""></embed></object>'

    document.write(flash_tag);
}

//메인 상단 quick 버튼 
function main(menuID) {
    var urlStr = "";

    switch (menuID) {
        case 'qna': urlStr = "/05_community/community_qna.aspx"; break;
        case 'pds': urlStr = "/06_dataCenter/document.aspx"; break;
        case 'dic': urlStr = "/06_dataCenter/dic.aspx"; break;
        case 'poll': urlStr = "/05_community/community_poll.aspx"; break;
        default: alert("해당 페이지가 존재하지 않습니다"); break;
    }

    location.href(rootStr + urlStr);
}