////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   goFlash
//
//**************************************************************************************************************
//
//  Usage) ÇÃ·¡½Ã ¸µÅ© ÀÚ¹Ù½ºÅ©¸³Æ® ¿¬µ¿
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

var flashLink=new Array();
flashLink[00]="/";

function goFlash(n){
	if (flashLink[n]) location.href=flashLink[n];	
}

function goFlash(n){
	if (!flashLink[n]) return;
	else if (n=='btn_cyworld') window.open(flashLink[n]);
	else location.href=flashLink[n];
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   setPng24
//
//**************************************************************************************************************
//
//  Usage) IE 7 ÀÌÇÏ¿¡¼­ png24 ÀÇ ¾ËÆÄÃ¤³Î Áö¿ø
//
//  Example)
//      <img src="ÀÌ¹ÌÁö" alt="" title="" class="png24">
//      -  css ÆÄÀÏ¶Ç´Â ¹®¼­³»¿¡ .png24{tmp:expression(setPng24(this));} °¡ ÁöÁ¤µÇÀÖ¾î¾ß »ç¿ë°¡´É
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function setPng24(obj) { 
      var browser = navigator.appName;
      var version = parseFloat(navigator.appVersion.replace (/^.*MSIE ([.0-9]+).*$/,"$1"));

      if(browser.indexOf("Internet Explorer") && version < 7.0 ) { // IE6 ÀÌÇÏ¿¡¼­¸¸ µ¿ÀÛ 2008-03-14 by zardsama
            obj.width=obj.height=1; 
            obj.className=obj.className.replace(/\bpng24\b/i,''); 
            obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
            obj.src='';  
            return ''; 
      }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   bookmarksite
//
//**************************************************************************************************************
//
//  Usage) Áñ°ÜÃ£±â
//         -  À§»ç¸ô °ü¸®ÀÚÀÇ ¼îÇÎ¸ô°ü¸® - ´ëÇ¥µµ¸ÞÀÎ ¼³Á¤ - ´ëÇ¥µµ¸ÞÀÎ, 
//            À§»ç¸ô °ü¸®ÀÚÀÇ ¼îÇÎ¸ô°ü¸® - Å¸ÀÌÆ²¸ÞÅ¸°Ë»ö - À¥ºê¶ó¿ìÀú Å¸ÀÌÆ²ÀÌ ³»¿ëÀ¸·Î µé¾î°¨
//
//  Example)
//      <img src="ÀÌ¹ÌÁö°æ·Î" alt="Áñ°ÜÃ£±â" onclick="addBookmark()">
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function addBookmark() {
	var url = root_url;
    var title = document.title;

    if (window.sidebar) {// firefox
        window.sidebar.addPanel(title, url, ""); 
    }

    else if(window.opera && window.print) {// opera
        var elem = document.createElement('a');
        elem.setAttribute('href',url);
        elem.setAttribute('title',title);
        elem.setAttribute('rel','sidebar');
        elem.click();
    }

    else if(window.external) {// IE
        window.external.AddFavorite(url, title);
    }
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//	¢Æ R2Slider 1.0
//
//	- 2008-03-20 by zardsama
//
// ************************************************************************************************************
//
// Usage)
//		var º¯¼ö¸í = new R2Slider("·¹ÀÌ¾î ID","º¯¼ö¸í", ¼Óµµ, »ó´Ü¸¶Áø);
//		º¯¼ö¸í.slide();
//
//		- ¼Óµµ, »ó´Ü¸¶ÁøÀº »ý·« °¡´É / ÃßÈÄ º¯°æ °¡´É
//		- 'º¯¼ö¸í.limitTop' È¤Àº 'º¯¼ö¸í.limitBottom' À¸·Î »ó/ÇÏ´Ü ÇÑ°è ÁöÁ¡ ¼³Á¤°¡´É
//
//
//	Example )
//		<div id="scroll" style="position:absolute; width: 100px; height: 400px;"></div>
//		<script type="text/javascript">
//			var test = new R2Slider ("scroll","test",null,null,null);
//			test.limitTop = 100;
//			test.slide();
//		</script>
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////

R2Slider = function(id, slider, divPitch, marginTop, dElement) {
	if (isNaN(parseInt(marginTop))) marginTop = 0;	// »ó´Ü ¸¶Áø µðÆúÆ®
	if (isNaN(parseInt(divPitch))) divPitch = 15;	// ÀÌµ¿ °£°Ý µðÆúÆ®
	if (!dElement) dElement = document.documentElement; // DTD strict ÀÏ¶§ ( Transitional ÀÏ¶§´Â document.body )

	this.timer;	// Å¸ÀÌ¸Ó º¯¼ö
	this.slider = slider;	// °´Ã¼ º¯¼ö¸í
	this.obj = document.getElementById (id);	// ¿ÀºêÁ§Æ®
	this.marginTop = parseInt(marginTop);	// »ó´Ü ¸¶Áø
	this.divPitch = parseInt(divPitch);	// ÀÌµ¿ °£°Ý
	this.dElement = dElement; // DTD ¿¡ µû¸¥ µµÅ¥¸ÕÆ® ¿¤¸®¸ÕÆ®
	this.limitTop;	 // »ó´Ü ÇÑ°èÁ¡
	this.limitBottom;	 // ÇÏ´Ü ÇÑ°èÁ¡
}


R2Slider.prototype.moveIt = function(){
	var pitch = (parseInt(this.dElement.scrollTop)+ parseInt(this.marginTop)) - parseInt(this.obj.style.top);

	if (pitch == 0) return;
	else nextPos = parseInt(this.obj.style.top) + pitch / this.divPitch
	nextPos = (pitch > 0) ? Math.ceil(nextPos) : Math.floor(nextPos);

	var limitBottom = this.dElement.scrollHeight - parseInt(this.limitBottom)- parseInt(this.obj.offsetHeight);
	if ( this.limitTop && nextPos  < this.limitTop ) nextPos = this.limitTop;
	if ( this.limitBottom && nextPos  > limitBottom ) nextPos = limitBottom;
	if (nextPos < this.marginTop) nextPos = this.marginTop;
	if (isNaN(nextPos)) nextPos = 0;

	this.obj.style.top = nextPos+"px";
}


R2Slider.prototype.slide = function() {
	this.timer = setInterval(""+this.slider+".moveIt()", 10);
}