<!--Áñ°ÜÃ£±â ½ºÅ©¸³Æ®
function bookmark(){
window.external.AddFavorite('http://sayfair.net', 'Á¦13È¸ ´ëÀüÃæÃ» °áÈ¥¹Ú¶÷È¸')
}
//½ºÅ©¸³Æ® ³¡-->

<!--- ¸µÅ©Á¡¼±¾ø¾Ö±â -->

function bluring(){ 
  if(event.srcElement.tagName == "A" || event.srcElement.tagName == "IMG")
    document.body.focus(); 
} 
document.onfocusin=bluring;

<!--- ¸µÅ©Á¡¼±¾ø¾Ö±â³¡ -->

<!-- ¾ÆÀÌº¸µå ¼Ò½º -->
     // ÀÏ¹Ý ÆË¾÷Ã¢
		function OpenWin_smart(Url,Target,Xsize,Ysize,left_is,top_is,Scroll,Resize){
			if(Resize != 'no' && Resize != 0 ) Resize=1;
			var winwhitch=(left_is >0 || top_is>0)? ',left='+left_is+',top='+top_is+',' : '';
			smart_Browser=window.open(Url,Target,'width='+Xsize+',height='+Ysize + winwhitch + ',scrollbars='+Scroll+',resizable='+Resize+',status=0');
			smart_Browser.focus();
		 }
		// ÀÌ¹ÌÁö »çÀÌÁî ¿¡ ¸ÂÃá ÆË¾÷Ã¢(flash Æ÷ÇÔ)
		function imgSize_iOPEN(imgurl,Wi,Hi,urllink,recnt){
			if(!imgurl) return;
			if(!Wi || !Hi){
				if(imgurl.match(/\.swf$/i)){Wi=400; Hi=250;}// it_flash
				else{
					if(!recnt){ tmpimg= new Image(); tmpimg.src=(imgurl);}
					if((tmpimg.width!=0)&&(tmpimg.height!=0)){Wi=tmpimg.width; Hi=tmpimg.height;}
					else {recountID=setTimeout("imgSize_iOPEN('"+imgurl+"','','','"+urllink+"',1)",50); return;}
			}}
			var limit_w=screen.width - 30; // ÃÖ´ë»çÀÌÁî w
			var limit_h=screen.height - 50; // ÃÖ´ë»çÀÌÁî h
			var usescroll='';
			if(limit_w<Wi){Wi=limit_w; usescroll=',scrollbars=1';}
			if(limit_h<Hi){Hi=limit_h; usescroll=',scrollbars=1';}
			popup_win=window.open('','im','width='+Wi+',resizable=1,height='+Hi+usescroll);
			popup_win.resizeTo(Wi+10,Hi+58);
			popup_win.focus();
			if(popup_win){
				popup_win.document.write("<html><head><title>Image Viewer</title></head>");
				popup_win.document.write("<body topmargin=0 rightmargin=0 leftmargin=0 style='border-width:0' onclick=\"");
				if(urllink) 	popup_win.document.write("location.href='"+urllink+"'");
				else popup_win.document.write("self.close()");
				popup_win.document.write("\"><table border=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr><td align=center>");
				if(imgurl.match(/\.swf$/i)) popup_win.document.write("<embed src="+imgurl+" width='98%' height='98%'>");
				else popup_win.document.write("<img src="+imgurl+" style='cursor:pointer' border=0>");
				popup_win.document.write("</td></tr></table></body></html>");
				popup_win.document.close();
			}
		}
		// ·¹ÀÌ¾î on/off(event,·¹ÀÌ¾îid,[Àý´ëÀ§Ä¡left,Àý´ëÀ§Ä¡top,»ó´ëÀ§Ä¡left,»ó´ëÀ§Ä¡top])
		function instantLayer(evt,layer_id,abs_left,abs_top,each_left,each_top){
			thislayer=document.getElementById(layer_id);
			if(evt=='close'){thislayer.style.visibility = 'hidden'; return;}
			abs_left=parseInt(abs_left); abs_top=parseInt(abs_top);
			each_left=parseInt(each_left); each_top=parseInt(each_top);
			if(abs_left==0 && abs_top==0){
				abs_left=(navigator.userAgent.indexOf('MSIE')==-1)? evt.pageX+each_left : event.clientX+document.body.scrollLeft+each_left;
				abs_top=(navigator.userAgent.indexOf('MSIE')==-1)? evt.pageY-each_top : event.clientY+document.body.scrollTop-each_top;
			}
			thislayer.style.left = abs_left;
			thislayer.style.top =abs_top;
			var all_left_ck=TnT_get_objLeft(thislayer);
			var all_top_ck=TnT_get_objTop(thislayer);
			if(abs_left!=all_left_ck || abs_top!=all_top_ck){
				var p_left_ck=TnT_get_objLeft(thislayer.offsetParent);
				var p_top_ck=TnT_get_objTop(thislayer.offsetParent);
				thislayer.style.left=all_left_ck-p_left_ck*2;
				thislayer.style.top=all_top_ck-p_top_ck*2;
			}thislayer.style.visibility = 'visible';
		}
		function TnT_get_objTop(thisobj){
			if(typeof(thisobj)!='object') thisobj=document.getElementById(thisobj);
			if (thisobj.offsetParent==document.body) return thisobj.offsetTop;
			else return thisobj.offsetTop + TnT_get_objTop(thisobj.offsetParent);
		}
		function TnT_get_objLeft(thisobj){
			if(typeof(thisobj)!='object') thisobj=document.getElementById(thisobj);
			if (thisobj.offsetParent==document.body) return thisobj.offsetLeft;
			else return thisobj.offsetLeft + TnT_get_objLeft(thisobj.offsetParent);
		}
		function TnT_get_objCenter(thisobj){
			if(typeof(thisobj)!='object') thisobj=document.getElementById(thisobj);
			if (thisobj.offsetParent==document.body) return thisobj.offsetCenter;
			else return thisobj.offsetCenter + TnT_get_objCenter(thisobj.offsetParent);
		}
		// ±Û¸ñ·Ï ¼¶³×ÀÏ »ý¼º img_w= ,  img_h= ¸¦ ÁöÁ¤ÇÏ¸é ÁöÁ¤ÇÑ Å©±â·Î »ý¼ºµÊ
		function ibd_thumbnail(thisimg,imgpath,img_w,img_h){
			if(thisimg.style.xrest=='rest') return;
			thisimg.style.xrest='rest';
			thisimg.src='<?=$CONFIG[board_php]?>?command=openfull&exe=img_nail&img_w='+img_w+'&img_h='+img_h+'&img='+imgpath;
		}

<!-- ÆíÁý½Ã À§ ÀÚ¹Ù½ºÅ©¸³Æ® ºÎºÐÀº »èÁ¦ÇÏÁö ¸¶½Ê½Ã¿À -->
<!-- ¾ÆÀÌÇÁ·¹ÀÓ ¼Ò½º -->
<!-- 
//iframe resize
var iframeids=["ifr","ifr1","ifr2","ifr3","ifr4","ifr5"] 
var iframehide="yes" 

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1] 
var FFextraHeight=getFFVersion>=.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.+ browsers 



function resizeCaller() { 
    var dyniframe=new Array() 
    for (i=0; i<iframeids.length; i++){ 
    if (document.getElementById(iframeids[i]))// alert(iframeids[i]) 
        resizeIframe(iframeids[i]) 
    if ((document.all || document.getElementById) && iframehide=="no"){ 
    var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i]) 
        tempobj.style.display="block" 
        } 
    } 
} 

function resizeIframe(frameid){ 
    var currentfr=document.getElementById(frameid) 
    if (currentfr && !window.opera){ 
        currentfr.style.display="block" 
    if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax 


        currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
    else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax 


        currentfr.height = currentfr.Document.body.scrollHeight; 
    if (currentfr.addEventListener) 
        currentfr.addEventListener("load", readjustIframe, false) 
    else if (currentfr.attachEvent){ 
        currentfr.detachEvent("onload", readjustIframe) // Bug fix line 


        currentfr.attachEvent("onload", readjustIframe) 
        } 
    } 
} 

function readjustIframe(loadevt) { 
    var crossevt=(window.event)? event : loadevt 
    var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement 
    if (iframeroot) 
        resizeIframe(iframeroot.id); 
} 

function loadintoIframe(iframeid, url){ 
    if (document.getElementById) 
        document.getElementById(iframeid).src=url 
    } 

if (window.addEventListener) 
    window.addEventListener("load", resizeCaller, false) 
else 
    if (window.attachEvent) window.attachEvent("onload", resizeCaller) 
    else window.onload=resizeCaller 

//--> 
<!-- ¾ÆÀÌÇÁ·¹ÀÓ ¼Ò½º³¡ -->

<!-- ÅÜ¸Þ´º -->
function premier(n) {
    for(var i = 1; i < 3; i++) {
        obj = document.getElementById('premier'+i);
        img = document.getElementById('premier_button'+i);
        if ( n == i ) {
            obj.style.display = "block";
                        img.height = 25;
            img.src = "/bbs/fair/images/tapon"+i+".gif";    
        } else {
            obj.style.display = "none";
                        img.height = 25;
            img.src = "/bbs/fair/images/tapoff"+i+".gif";
        }
    }
}



<!--- ÇÃ·ÎÆÃ -->


<!--
var downLayerId;
var dropDegree = 10; //½ºÅ©·Ñ ¼Óµµ
var doDirect;
var DirectTerm = 5000; //½ºÅ©·Ñ Áö¿¬½Ã°£
var curDropIdx = 0;

function DirectDown()
{
clearInterval(doDirect);
clearInterval(downLayerId);

for(i = curDropIdx ;i < document.all["DropHit"].length + curDropIdx;i++){
  document.all["DropHit"][i%document.all["DropHit"].length].style.posTop = document.all["DropHit"][i%document.all["DropHit"].length].style.posHeight * (-1*((i-curDropIdx)%document.all["DropHit"].length));
}
var temp = 'setInterval("DownLayer()",20)';
downLayerId = eval(temp);
direction = "down";
}
function DownLayer()
{
if(document.all["DropHit"][curDropIdx].style.posTop < document.all["DropHit"][curDropIdx].style.posHeight){
  for(j = curDropIdx ;j < document.all["DropHit"].length + curDropIdx;j++){
   document.all["DropHit"][j%document.all["DropHit"].length].style.posTop += dropDegree;
  }
}else{
  clearInterval(downLayerId);
  for(j = curDropIdx ;j < document.all["DropHit"].length + curDropIdx;j++){
   document.all["DropHit"][j%document.all["DropHit"].length].style.posTop = document.all["DropHit"][j%document.all["DropHit"].length].style.posHeight *((-1*((j-curDropIdx)%document.all["DropHit"].length))+1);
  }
  curDropIdx = (curDropIdx + 1) ;
  curDropIdx = curDropIdx > document.all["DropHit"].length-1 ? curDropIdx%document.all["DropHit"].length:curDropIdx;
  var temp = 'setInterval("DirectDown()",DirectTerm)';
  doDirect = eval(temp);
}
}
function DirectUp()
{
clearInterval(doDirect);
clearInterval(downLayerId);
var tempIdx = 0;
for(i = 0;i<document.all["DropHit"].length;i++){
  tempIdx = (document.all["DropHit"].length + curDropIdx - i) %document.all["DropHit"].length;
  document.all["DropHit"][tempIdx].style.posTop = i*document.all["DropHit"][tempIdx].style.posHeight;
}
var temp = 'setInterval("UpLayer()",20)';
downLayerId = eval(temp);
direction = "up";
}
function UpLayer()
{
var tempIdx = 0;
if(document.all["DropHit"][curDropIdx].style.posTop < document.all["DropHit"][curDropIdx].style.posHeight && document.all["DropHit"][curDropIdx].style.posTop > document.all["DropHit"][curDropIdx].style.posHeight * (-1)){
  for(j = 0 ;j < document.all["DropHit"].length;j++){
   tempIdx = (document.all["DropHit"].length + curDropIdx - j) %document.all["DropHit"].length;
   document.all["DropHit"][tempIdx].style.posTop -= dropDegree;
  }
}else{
  clearInterval(downLayerId);
  for(j = 0;j<document.all["DropHit"].length;j++){
   tempIdx = (document.all["DropHit"].length + curDropIdx - j) % document.all["DropHit"].length;
   document.all["DropHit"][tempIdx].style.posTop = (j-1)*(document.all["DropHit"][tempIdx].style.posHeight);
  }
  curDropIdx = (curDropIdx - 1) ;
  curDropIdx = curDropIdx < 0 ? document.all["DropHit"].length-1:curDropIdx;
  var temp = 'setInterval("DirectUp()",DirectTerm)';
  doDirect = eval(temp);
}
}
//-->