﻿var g_nZIndex = 100000;
function DontShowToday(strID)
{
    var objCheck = document.getElementById("chktoday" + strID);
    if (objCheck != null && objCheck.checked == true)
    {
        getWeb("/TKFrt/Common/SetCookie.ashx", "name=" + strID +"&value=true" );
    }



}

function ClosePopUp(strID)
{
    var objDiv = document.getElementById(strID);
    if (objDiv != null)
        objDiv.style.display = "none";
}
function ShowPopUp(strID, strURL, nTop, nLeft, nCX, nCY, strFileType, strSrc) {

  
    var strHTML = "<div style=\" padding:0; margin:0; background:#FFF \" >";
    strHTML += "<div style=\"margin-bottom:-2px;padding-bottom:-2px;\">";
    strHTML += "	<table>";
    strHTML += "		<tr>";
    strHTML += "			<td>";

    if (strFileType == "Flash")
        strHTML += getFlashObjectString(strSrc);
    else
        strHTML += "<a href=\"#;\" onclick=\"GoPopUpURL('" + strURL + "','" + strID + "')\"><img src=\"" + strSrc + " \" border=\"0\" width=\"" + nCX + "\" height=\"" + nCY + "\" /></a>";

    strHTML += "			</td>";
    strHTML += "		</tr>"
    strHTML += "	</table>";
    strHTML += "</div>";
    strHTML += "<div style=\"background:url(/Common/Images/Front/pop/main_pop_footer_bg.gif) repeat-x left top; height: 24px; margin-bottom:0 !important; margin-bottom:-12px;\">";
    strHTML += "	<div>";
    strHTML += "	<table width=\"100%\">";
    strHTML += "		<tr>";
    strHTML += "			<td align=\"left\" style=\"padding-top:5px;\">";
    strHTML += "				<a href=\"#;\" onclick=\"todayView('" + strID + "')\" >";
    strHTML += "					&nbsp;&nbsp;<img src=\"/Common/Images/Front/pop/main_pop_footer_check.gif\" />";
    strHTML += "				</a>";
    strHTML += "			</td>";
    strHTML += "			<td style=\"text-align:right;padding-top:5px;\";\">";   
    strHTML += "				<a href=\"#;\" onclick=\"ClosePopUp('" + strID + "')\">";
    strHTML += "					<img src=\"/Common/Images/Front/pop/main_btn_pop_close.gif\" alt=\"닫기\" valign=\"middle\" />";
    strHTML += "				</a>";
    strHTML += "			</td>";
    strHTML += "		</tr>";
    strHTML += "	</table>";
    strHTML += "	</div>";
    strHTML += "</div>";
    strHTML += "</div>";
    
    

    var objDiv = document.getElementById(strID);
    if (objDiv == null)
    {
        objDiv = document.createElement("div");
        objDiv.className = "popupdiv";
        objDiv.setAttribute("id", strID);
        objDiv.style.position = "absolute";
        objDiv.style.border = "1px solid #CCCCCC";
        objDiv.style.padding = "2px 2px 14px 2px";
        objDiv.style.zIndex = (g_nZIndex++);
        objDiv.style.display = "none";
        objDiv.style.backgroundColor = "#AAAAAA";
        objDiv.style.width = nCX + "px";
        objDiv.onclick = function()
        {
            this.style.zIndex = (g_nZIndex++);
        }
        document.body.appendChild(objDiv);
    }

    objDiv.innerHTML = strHTML;
    objDiv.style.top = nTop + "px";
    objDiv.style.left = nLeft + "px";

    objDiv.style.display = "";
}
function GoPopUpURL(strURL, strID)
{
    location.href(strURL);
    ClosePopUp(strID);
}

