function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//Chrome Drop Down Menu- Author: Dynamic Drive (http://www.dynamicdrive.com) 
//Last updated: Jan 1st, 06' 

ns=window.navigator.appName == "Netscape" 
ie=window.navigator.appName == "Microsoft Internet Explorer" 
function openIt(x) { 
// NS ÀÇ °æ¿ì 
if(ns) { 
   showbox= document.layers[x+1] 
     showbox.visibility = "show"; 
       showbox.top=156; 
       
    var items = 6      ; // ¸Þ´ºÀÇ °¹¼ö 
     for (i=1; i<=items; i++) { 
      elopen=document.layers[i] 
        if (i != (x + 1)) { 
          elopen.visibility = "hide" } 
            } 
  }     
// IE ÀÏ °æ¿ì 
if(ie) { 
  
   showBox = document.all.box[x]; 
     showBox.style.visibility = "visible"; 
        showBox.style.top = 156;  // ¼­ºê¸Þ´ºÀÇ À§ÂÊ¿©¹é 
         
   var items = 6  // ¸Þ´ºÀÇ °¹¼ö 
    for (i=0; i<items; i++) { 
      elOpen=document.all.box[i] 
       barEl=document.all.chromemenu[i] 
        if (i != x){ 
          elOpen.style.visibility = "hidden" 
                            } 
     } 
   } 
} 
function closeIt() { 
   var items = 6 // ¸Þ´ºÀÇ °¹¼ö 
     for (i=0; i<items; i++) { 
       if(ie){ 
        document.all.box[i].style.visibility = "hidden" 
          barEl=document.all.chromemenu[i] 
        } 
       if(ns){ document.layers[i+1].visibility = "hide"}           
} 
}


function check_sch(form){
        if(!sch.str.value)
        {
                alert('°Ë»öÇÒ ³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä!');
                sch.str.focus();
                return false;
        }
		
}
function top_round(w,c) {
var top_html;
top_html="<table cellpadding=0 cellspacing=0 border=0 style='width:"+w+";margin:0px;padding:0px;' class=fixed>";
top_html+="<tr style='height: 1px;'><td rowspan=4 style='width:1px;' class=bin></td><td rowspan=3 style='width:1px;' class=bin>&nbsp;</td>";
top_html+="<td rowspan=2 style='width:1px;' class=bin>&nbsp;</td><td style='width:1px;' class=bin>&nbsp;</td><td bgcolor="+c+" class=bin>&nbsp;</td>";
top_html+="<td style='width:2px;' class=bin></td><td rowspan=2 style='width:1px;' class=bin>&nbsp;</td><td rowspan=3 style='width:1px;' class=bin>&nbsp;</td>";
top_html+="<td rowspan=4 style='width:1px;' class=bin>&nbsp;</td></tr><tr style='height:1px;'><td bgcolor="+c+" class=bin>&nbsp;</td>";
top_html+="<td bgcolor="+c+" class=bin>&nbsp;</td><td bgcolor="+c+" class=bin>&nbsp;</td></tr>";
top_html+="<tr style='height: 1px;'><td bgcolor="+c+" class=bin>&nbsp;</td><td colspan=3 bgcolor="+c+" class=bin>&nbsp;</td>";
top_html+="<td bgcolor="+c+" class=bin>&nbsp;</td></tr><tr style='height:2px;'><td bgcolor="+c+" class=bin>&nbsp;</td>";
top_html+="<td colspan=5 bgcolor="+c+" class=bin>&nbsp;</td><td bgcolor="+c+" class=bin>&nbsp;</td></tr></table>";
document.write(top_html);
}

function bottom_round(w,c) {
var bottom_html;
bottom_html="<table cellpadding=0 cellspacing=0 border=0 style='width:"+w+";margin:0px;padding:0px;' class=fixed>";
bottom_html+="<tr style='height: 2px;'><td rowspan=4 width=1 class=bin>&nbsp;</td><td width=1 bgcolor="+c+" class=bin>&nbsp;</td><td style='width:1px;' bgcolor="+c+" class=bin>&nbsp;</td>";
bottom_html+="<td style='width:1px;' bgcolor="+c+" class=bin>&nbsp;</td><td bgcolor="+c+" class=bin>&nbsp;</td><td width=2 bgcolor="+c+" class=bin>&nbsp;</td>";
bottom_html+="<td style='width:1px;' bgcolor="+c+" class=bin>&nbsp;</td><td style='width:1px;' bgcolor="+c+" class=bin>&nbsp;</td><td rowspan=4 style='width:1px;' class=bin>&nbsp;</td></tr>";
bottom_html+="<tr style='height: 1px;'><td rowspan=3 class=bin>&nbsp;</td><td bgcolor="+c+" class=bin>&nbsp;</td><td colspan=3 bgcolor="+c+" class=bin>&nbsp;</td>";
bottom_html+="<td bgcolor="+c+" class=bin>&nbsp;</td><td rowspan=3 class=bin>&nbsp;</td></tr><tr style='height:1px;'><td rowspan=2 class=bin>&nbsp;</td>";
bottom_html+="<td bgcolor="+c+" class=bin>&nbsp;</td><td bgcolor="+c+" class=bin>&nbsp;</td><td bgcolor="+c+" class=bin>&nbsp;</td><td rowspan=2 class=bin>&nbsp;</td></tr>";
bottom_html+="<tr style='height: 1px;' class=bin><td class=bin>&nbsp;</td><td bgcolor="+c+" class=bin>&nbsp;</td><td class=bin>&nbsp;</td></tr></table>";
document.write(bottom_html);
}

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 imgreload(imgobj) {
        re = 4;        // ÀÌ¹ÌÁö ¿¡·¯ÀÌº¥Æ®°¡ ¹ß»ýÇßÀ»¶§ ÀÌ¹ÌÁö¸¦ È£ÃâÇÏ´Â Ä«¿îÅÍ
        imgobj.recount++;
        if(imgobj.recount >= re) {
                imgobj.src = "noimage.gif";        // re Ä«¿îÅÍ ¸¸Å­ ÀÌ¹ÌÁö¸¦ ¸®·ÎµåÈÄ¿¡µµ ¿¡·¯°¡ ¹ß»ýÇÏ¸é ´Ù¸¥ ¿¡·¯ÀÌ¹ÌÁö¸¦ º¸¿©ÁØ´Ù.
                return;
        }
        imgobj.src=imgobj.src;
}
function bookmark(){
window.external.AddFavorite('http://www.navinside.com', '::³×ºñÀÎ»çÀÌµå::³×ÀÌ¹ö DMB&GPS´Â³»Ä£±¸ Ä«Æä¿Í ÇÔ²²ÇÏ´Â ¸ÞÀÌÀú±Þ ³»ºñ°ÔÀÌ¼Ç Àü¹®Æ÷Å»::')
}
function copy_clip(strData) {
clipboardData.setData("Text",strData);
alert("URLÀÌ º¹»çµÇ¾ú½À´Ï´Ù.\n\nRSS¸®´õ±âÀÇ ÁÖ¼Ò¿¡ ºÙ¿©³Ö±â ÇÏ¼¼¿ä.");
}

function layer_toggle(obj) {
        if (obj.style.display == 'none') obj.style.display = 'block';
        else if (obj.style.display == 'block') obj.style.display = 'block';
}

function view(val){
if(val == 1){
document.getElementById('forum_hidden').style.display='block';
document.getElementById('navi_login').style.display='none';
}//¼Ó¼ºÀÌ º¸ÀÓÀÌ¸é °¨Ãã, °¨ÃãÀÌ¸é º¸ÀÓÀ¸·Î ·¹ÀÌ¾îÀÇ display ¼Ó¼ºÀ» Åä±Û
else if(val == 2) {
document.getElementById('navi_login').style.display='block';
document.getElementById('forum_hidden').style.display='none';
	}
}

function startTime(){
        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        closeTime=hours*3600+mins*60+secs;
        closeTime+=5;  //½Ã°£¼³Á¤
        Timer();
}

function Timer(){
        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        curTime=hours*3600+mins*60+secs
        if (curTime>=closeTime){
               document.all['divpop'].style.visibility = "hidden";
                }
        else{
                window.setTimeout("Timer()",1000)}
}
function setCookie( name, value, expiredays ) {
  var todayDate = new Date();
  todayDate.setDate( todayDate.getDate() + expiredays + 2 );
  document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function closeWin() { 
    if ( document.notice_form.chkbox.checked ){ 
        setCookie( "maindiv", "done" , 1 ); 
    } 
    document.all['divpop'].style.visibility = "hidden";
}
function loadIFrame() {
document.getElementById('innerFrame').contentWindow.location.href="./test_rerere1.php";

// innerFrame.document.location.href = "./test_rerere1.php";
}
function addEvent(obj, type, fn)   
{   
    if (obj.addEventListener)   
        obj.addEventListener(type, fn, false);   
    else if (obj.attachEvent)   
    {   
        obj["e"+type+fn] = fn;   
        obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }   
        obj.attachEvent("on"+type, obj[type+fn]);   
    }   
} 
