
        var IE5=(document.getElementById && document.all)? true : false;
        var W3C=(document.getElementById)? true: false;
        var currIDb=null, currIDs=null, xoff=0, yoff=0; zctr=0; totz=0;

        function trackmouse(evt){
                if((currIDb!=null) && (currIDs!=null)){
                        var x=(IE5)? event.clientX+document.body.scrollLeft : evt.pageX;
                        var y=(IE5)? event.clientY+document.body.scrollTop : evt.pageY;
                                currIDb.style.left=x+xoff+'px';
                                currIDs.style.left=x+xoff+10+'px';
                                currIDb.style.top=y+yoff+'px';
                                currIDs.style.top=y+yoff+10+'px';
                        return false;
                }
        }

        function stopdrag(){
                currIDb=null;
                currIDs=null;
                NS6bugfix();
        }

        function grab_id(evt){
                xoff=parseInt(this.IDb.style.left)-((IE5)? event.clientX+document.body.scrollLeft : evt.pageX);
                yoff=parseInt(this.IDb.style.top)-((IE5)? event.clientY+document.body.scrollTop : evt.pageY);
                currIDb=this.IDb;
                currIDs=this.IDs;
        }

        function NS6bugfix(){
							
                if(!IE5){
                        self.resizeBy(0,1);
                        self.resizeBy(0,-1);
                }
        }

        function incrzindex(){
                zctr=zctr+2;
                this.subb.style.zIndex=zctr;
                this.subs.style.zIndex=zctr-1;
        }

        function createPopup(bgimg, mlink, pno, id, title, width, height, x , y , isdraggable, boxcolor, barcolor, shadowcolor, text, textcolor, textptsize, textfamily ){
                if(W3C){
                        zctr+=2;
                        totz=zctr;
                        var txt='';
                                txt+='<div id="'+id+'_s" style="position:absolute; left:'+(x+7)+'px; top:'+(y+7)+'px; width:'+width+'px; height:'+(height+30)+'px; background-color:'+shadowcolor+'; filter:alpha(opacity=50); visibility:visible"> </div>';
                                
                                if(bgimg == "")
                                {
									txt+='<div id="'+id+'_b" style="border:outset '+barcolor+' 2px; position:absolute; left:'+x+'px; top:'+y+'px; width:'+width+'px; overflow:hidden; height:'+(height+30)+'px; background-color:'+boxcolor+'; visibility:visible">';
                                }
                                else
                                {
								//	if(mlink > "")
								//	{									
								//		txt+='<div id="'+id+'_b"  onclick="location.href=\'' + mlink + '\';POPUP'+ pno + '.style.display=\'none\';" style="border:outset '+barcolor+' 2px; position:absolute; left:'+x+'px; top:'+y+'px; width:'+width+'px; overflow:hidden; height:'+(height+30)+'px; background-image:url(\'popup_img/'+ bgimg +'\'); visibility:visible">';
								//	}
								//	else
								//	{
										txt+='<div id="'+id+'_b"  style="border:outset '+barcolor+' 2px; position:absolute; left:'+x+'px; top:'+y+'px; width:'+width+'px; overflow:hidden; height:'+(height+30)+'px; background-image:url(\'popup_img/'+ bgimg +'\'); visibility:visible">';
								//	}
								}
                                
                                txt+='<div style="width:'+width+'px; height:16px; background-color:'+barcolor+'; padding:0px; border:1px"><table cellpadding="0" cellspacing="0" border="0" width="'+(IE5? width-4 : width)+'"><tr><td width="'+(width-20)+'"><div id="'+id+'_h" style="width:'+(width-20)+'px; height:14px; font: bold 12px Tahoma; cursor:move; color:'+textcolor+'"> '+title+'</div></td><td align="right"><a onmousedown="document.getElementById(\''+id+'_s\').style.display=\'none\'; document.getElementById(\''+id+'_b\').style.display=\'none\';return false"><img src="http://www.blueb.co.kr/SRC/javascript/image/close.gif" border="0" height="15" width="15"></a></td></tr></table></div>';
                                
                                if(mlink > "")
								{	
									txt+='<div id="'+id+'_ov"  onclick="location.href=\'' + mlink + '\';POPUP'+ pno + '.style.display=\'none\';" width:'+width+'px; style="margin:5px; color:'+textcolor+'; font:'+textptsize+'pt '+textfamily+';">'+text+'</div>';
								}
								else
								{
									txt+='<div id="'+id+'_ov" width:'+width+'px; style="margin:5px; color:'+textcolor+'; font:'+textptsize+'pt '+textfamily+';">'+text+'</div>';
								}
									
								//txt+='<div id="'+id+'_ov" width:'+width+'px; style="margin:5px; color:'+textcolor+'; font:'+textptsize+'pt '+textfamily+';">'+text+'</div>';
								
								txt+='<div style="width:'+width+'px; height:22px; background-color:'+barcolor+'; padding:0px; border:1px; overflow:hidden;"><table cellpadding="0" cellspacing="0" border="0" width="'+(IE5? width-4 : width)+'"><tr><form name="POPUP' + pno + '_form"><td width="'+(width-20)+'"><div id="'+id+'_hf" style="width:'+(width-20)+'px; height:20px; font: bold 12px Tahoma; color:'+textcolor+'"> <input type="checkbox" name="chkbox" value="checkbox">Do not show this page today <a href="javascript:closeWin(' + pno + ');"><B><font color=red>[Close]</font></B></a></div></td><td align="right"></td></tr></form></table></div>';
															
								txt+='</div>';
                                
       
                                document.write(txt);
                                this.IDh=document.getElementById(id+'_h');
                                this.IDh.IDb=document.getElementById(id+'_b');
                                this.IDh.IDs=document.getElementById(id+'_s');
                                this.IDh.IDb.subs=this.IDh.IDs;
                                this.IDh.IDb.subb=this.IDh.IDb;
                                this.IDh.IDb.IDov=document.getElementById(id+'_ov');
                                if(IE5){
                                        this.IDh.IDb.IDov.style.width=width-6;
                                        this.IDh.IDb.IDov.style.height=height-22;
                                        this.IDh.IDb.IDov.style.scrollbarBaseColor=boxcolor;
                                        this.IDh.IDb.IDov.style.overflow="auto";
                                }
                                else{
                                        this.IDh.IDs.style.MozOpacity=.5;
                                }
                                this.IDh.IDb.onmousedown=incrzindex;
                                if(isdraggable){
                                        this.IDh.onmousedown=grab_id;
                                        this.IDh.onmouseup=stopdrag;
                                }
                        }
                }

        /* ??? ??? ?? : ??? */        
        function setCookie( name, value, expiredays ) { 
		    var todayDate = new Date(); 
		        todayDate.setDate( todayDate.getDate() + expiredays ); 
		        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" ;
		    } 
			
			
			
/** Top menu */
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function sf_form_check()
{
	if(document.sf_form.s_fsearch.value > "")
		document.sf_form.submit();
	else
		return false;
}

function search_check()
{
	document.sform.submit();
}
