function OpenCalender(frm, div) {
    OpenWindow('/MenuStructure/Module/ModulePopupCalender.asp?form='+frm+'&div='+div,203,246,'no');
}

function OpenMemberInfo(UserID) {
    OpenWindow('/MenuStructure/MemberMng/PopupMemberInfoView.asp?UserID='+UserID,630,330,'yes');
}

function OpenWindowWithName(URL, NAME, W,H,S) {
    if (screen.width == W){
      var T = 0;var L = 0;
    }else{
      var L = ((screen.width) - W) / 2;
      var T = ((screen.height) - H) / 2;
    }
    window.open(URL, NAME, 'width=' + W + ',height=' + H + ',left=' + L + ',top=' + T + ',resizable=no,scrollbars=' + S + '');
}
function OpenZipCode(frm, div) {
    OpenWindow('/MenuStructure/Module/ModulePopupAddrSearch.asp?form='+frm+'&div='+div,350,360,'no');
}
function OpenWindow(URL,W,H,S) {
    if (screen.width == W){
      var T = 0;var L = 0;
    }else{
      var L = ((screen.width) - W) / 2;
      var T = ((screen.height) - H) / 2;
    }
    window.open(URL, '', 'width=' + W + ',height=' + H + ',left=' + L + ',top=' + T + ',resizable=no,scrollbars=' + S + '');
}
function PopUpPage(V1,V2,V3,V4){
    var noticeCookie=getCookie("CookieName"+V1);
    if (noticeCookie != "no"){
        window.open('Common/Popup.aspx?Idx='+V1, ''+V1+'', 'width='+V2+',height='+V3+',top=0,left='+V4+',resizable=no,scrollbars=no');
    }
}
function getCookie(name) {
    var Found = false
    var start, end
    var i = 0

    while(i <= document.cookie.length) {
        start = i
        end = start + name.length

        if(document.cookie.substring(start, end) == name) {
            Found = true
            break
        }
        i++
    }

    if(Found == true) {
        start = end + 1
        end = document.cookie.indexOf(";", start)
        if(end < start)
            end = document.cookie.length
        return document.cookie.substring(start, end)
    }
    return ""
}
function ImgViewResize(Img)
{
	try {
		var p_height, p_width;
			p_width = Img.width;
			p_height = Img.height;

			if(Img.width > 560)
				Img.width = 560;
	}
	catch(exception){}
}
function _ShowEmbedObject(_ELEMENT_ID){
    document.write(_ELEMENT_ID.innerHTML);
    _ELEMENT_ID.id = "";
}

function scroll(){
   lblMBanner.style.top = document.body.scrollTop+144;
}
