//ÀÌº¥Æ® ÆË¾÷ 
function cookieVal(cookieName){
        thisCookie = document.cookie.split("; ");
        for(i=0; i<thisCookie.length; i++){
                if(cookieName == thisCookie[i].split("=")[0]){
                        return thisCookie[i].split("=")[1];
                }
        }
        return "x";
}

function SetPopUp()
{	
	if(cookieVal("mainpopup") != "no"){
		var layer = document.getElementById("EventLayer_01");
		centerX = document.body.scrollWidth / 2 - (document.body.scrollWidth / 5);
		top10pY = document.body.scrollHeight * 0.21;
		layer.style.left = centerX;
		layer.style.top = top10pY;
		layer.style.display = "";
	}
	else
	{
		var layer = document.getElementById("EventLayer_01");
		layer.style.display = "none";
	}
}

function TWList(c)
{
	if(c!='')
		document.location.href="/Scripts/Contents/ThemeWorld/ThemeWorldList.aspx?catecode=" + c;
}

function SetSloganImg(no)
{
	var obj = document.getElementById("sloganImg");
	obj.style.cursor = "hand";
	switch (no) {
		case 1:
			obj.src = "/images/banner/main/Servicebanner_3.gif"; //º£½ºÆ®Åõ¾î°¡ÀÌµå ÀÌ¹ÌÁö ¾øÀ½
			obj.onclick = function(){location.href='/Scripts/Map/Weather/Weather.aspx';};
			break;
		case 2:
			obj.src = "/images/banner/main/Servicebanner_1.gif";
			obj.onclick = function(){location.href='/Scripts/Customer/Notice/NoticeView.aspx?idx=190';};
			break;
		case 3:
			obj.src = "/images/banner/main/Servicebanner_3.gif";
			obj.onclick = function(){location.href='/Scripts/Map/Weather/Weather.aspx';};
			break;
		case 4:
			obj.src = "/images/banner/main/Servicebanner_1.gif"; //º£½ºÆ®Åõ¾î°¡ÀÌµå ÀÌ¹ÌÁö ¾øÀ½
			obj.onclick = function(){location.href='/Scripts/Customer/Notice/NoticeView.aspx?idx=190';};
			break;
		default:
			obj.src = "/images/banner/main/Servicebanner_1.gif";
			obj.onclick = function(){location.href='/Scripts/Customer/Notice/NoticeView.aspx?idx=190';};
			break;
	}
}

/*


// Popup ·¹ÀÌ¾î Á¦¾î ½ºÅ©¸³Æ®
var _PopupLayer_bdown = false;
var _PopupLayer_x, _PopupLayer_y;
var _PopupLayer_Layer;

function _PopupLayerMouseDown_() {
	if(event.srcElement.id == "PopupLayerTitleBar") {
		_PopupLayer_bdown = true;
		_PopupLayer_Layer = document.getElementById("EventLayer_01"); //event.srcElement;
		_PopupLayer_x = event.clientX;
		_PopupLayer_y = event.clientY;
	}
}

function _PopupLayerMouseUp_() {
	_PopupLayer_bdown = false;
}

function _PopupLayerMove_() {
	if(_PopupLayer_bdown) {
		var distX = event.clientX - _PopupLayer_x;
		var distY = event.clientY - _PopupLayer_y;
		_PopupLayer_Layer.style.pixelLeft += distX;
		_PopupLayer_Layer.style.pixelTop += distY;
		_PopupLayer_x = event.clientX;
		_PopupLayer_y = event.clientY;
		if(_PopupLayer_Layer.style.pixelTop <= 0) 
		{
			_PopupLayer_Layer.style.pixelTop=0;
			_PopupLayer_y = 0;
		}
		return false;
	}
}

document.onmousedown = _PopupLayerMouseDown_;
document.onmouseup = _PopupLayerMouseUp_;
document.onmousemove = _PopupLayerMove_;

*/
