	// 메뉴바 움직이기
	var isDOM = (document.getElementById ? true : false); 
	var isIE4 = ((document.all && !isDOM) ? true : false);
	var isNS4 = (document.layers ? true : false);

	function getRef(id) {
		if (isDOM) return document.getElementById(id);
		if (isIE4) return document.all[id];
		if (isNS4) return document.layers[id];
	}

	var isNS = navigator.appName == 'Netscape';

	function moveRightEdge() {
		var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

		if (isNS4) {
			yMenuFrom = divMenu.top;
			yMenuTo = windows.pageYOffset + stmnGAP;
		} else if (isDOM) {
			yMenuFrom   = parseInt (divMenu.style.top, 10);
			yMenuTo = (isNS ? window.pageYOffset : document.body.scrollTop) + stmnGAP;
		}

	    if (yMenuTo < stmnBASE) yMenuTo = stmnBASE;

		timeoutNextCheck = 500;

		if (yMenuFrom != yMenuTo) {
			yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
			if (yMenuTo < yMenuFrom)
				yOffset = -yOffset;
			if (isNS4)
				divMenu.top += yOffset;
			else if (isDOM)
				divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;	

			timeoutNextCheck = 10;
		}
		setTimeout ('moveRightEdge()', timeoutNextCheck);
	}

 	// 쿠키 읽기
        	function ReadCookie(name){
                var label = name + "=";
                var labelLen = label.length;
                var cLen = document.cookie.length;
                var i = 0;

                while (i < cLen) {
                        var j = i + labelLen;

                        if (document.cookie.substring(i, j) == label) {
                                var cEnd = document.cookie.indexOf(";", j);
                                if (cEnd == -1) cEnd = document.cookie.length;

                                return unescape(document.cookie.substring(j, cEnd));
                        }
        
                        i++;
                }
           	    return "";
        	}

	 // 쿠키 저장
	function SaveCookie(name, value, expire){
            	var eDate = new Date();
            	eDate.setDate(eDate.getDate() + expire);
            	document.cookie = name + "=" + value + "; expires=" +  eDate.toGMTString()+ "; path=/";
	}

	// Show Menu(nn4+, ie4+)
	function Show_Menu(id) {
		if(document.all || document.getElementById) {
			if(document.all) { 
				obj = document.all[id]; 
			}
			else { 
				obj = document.getElementById(id); 
			}
			obj.style.display = "";
		}else{
			obj = document.layers[id];
			obj.display = "";
		}
	}

	// Hide Menu(nn4+, ie4+)
	function Hide_Menu(id) {
		if(document.all || document.getElementById) {
			if(document.all) { obj = document.all[id]; }
			else { obj = document.getElementById(id); }
			obj.style.display = "none";
		}else{
			obj = document.layers[id];
			obj.display = "none";
		}
	}
	
	// 보이기/숨기기...
	function Show_Hide(opt) {
		if (opt == 1) {
			if(sideview == "now") {
				Show_Menu("side_spot");
				Show_Menu("bt_close");
				Hide_Menu("bt_open");
			}	
		 	SaveCookie("VIEW", "true", 300);
		}
		
		if (opt == 2) {
			if(sideview == "now") {
				Hide_Menu("side_spot");
				Hide_Menu("bt_close");
				Show_Menu("bt_open");
			}	
		 	SaveCookie("VIEW", "false", 300);
		}
		
		if(sideview == "reload") { window.location.reload(); }
	}

	// 보이기/숨기기 초기화
	function Act_Menu() {
            	if(ReadCookie("VIEW") == "false") {
					Hide_Menu("side_spot");
					Hide_Menu("bt_close");
					Show_Menu("bt_open");
               		//Show_Hide(2);
            	} else {
					Show_Menu("side_spot");
					Show_Menu("bt_close");
					Hide_Menu("bt_open");
            		//Show_Hide(1);
                }
	}

	// iframe 리사이즈 부분
	function doResize() {
		container.height = myframe.document.body.scrollHeight;
		container.width = myframe.document.body.scrollWidth;
	}

	function SkinImagesLoad(){ 
		if(skin_preloading){
			for (i=0; i<SkinImagesLoad.arguments.length;i++){ 
				skinpix[i]=new Image(); 
				skinpix[i].src=skin_url + SkinImagesLoad.arguments[i]; 
			}
		}
	} 

	function HeadImagesLoad(){ 
		if(head_preloading){
			for (i=0; i<HeadImagesLoad.arguments.length;i++){ 
				headpix[i]=new Image(); 
				headpix[i].src=head_url + HeadImagesLoad.arguments[i]; 
			}
		}
	} 

	function ThemaImagesLoad(){ 
		if(thema_preloading){
			for (i=0; i<ThemaImagesLoad.arguments.length;i++){ 
				themapix[i]=new Image(); 
				themapix[i].src=thema_url + ThemaImagesLoad.arguments[i]; 
			}
		}
	}

	// 스타일 이미지 미리 읽어 오기..
	SkinImagesLoad(
		'category.gif',
		'notice.gif',
		'tags.gif',
		'entries.gif',
		'comments.gif',
		'trackbacks.gif',
		'calendar.gif',
		'archives.gif',
		'link.gif',
		'bullet1.gif',
		'bullet2.gif',
		'1.gif',
		'2.gif',
		'3.gif',
		'4.gif',
		'5.gif',
		'6.gif',
		'7.gif',
		'8.gif',
		'9.gif',
		'entry_tag.gif'
		)

		
		
