// ÇÃ·¡½Ã¸Þ´º ¿Í ÇÃ·¡½Ã°ü·Ã

function JS_viewObj(objhtml){
	document.write(objhtml);
}
function flashWrite(url,w,h,id,bg,vars,win){

 var flashStr=
 "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
 "<param name='allowScriptAccess' value='always' />"+
 "<param name='movie' value='"+url+"' />"+
 "<param name='FlashVars' value='"+vars+"' />"+
 "<param name='wmode' value='"+win+"' />"+
 "<param name='menu' value='false' />"+
 "<param name='quality' value='high' />"+
 "<param name='bgcolor' value='"+bg+"' />"+
 "<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
 "</object>";
 document.write(flashStr);

}

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);



 
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_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 MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}

 

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 listview_icon() {
	iconview.style.visibility = 'visible';
}

function select_icon(i) {
	document.newicon.src = '../images/emoticon_face'+i+'.gif';
	iconview.style.visibility = 'hidden';
}

function select_menu() {
alert("ff");
}

//init_layer('<?=$inited_layer?>'); //¼­ºê¸Þ´º·¹ÀÌ¾î
 


// Å¬¸¯ÇÏ¸é º»¹®º¸ÀÌ±â
function remarkview(id) {
	eval("document.all.remark"+id).style.display = "";
	eval("document.all.remarkd"+id).style.display = "";
}
function remarkhidd(id) {
	eval("document.all.remark"+id).style.display = "none";
	eval("document.all.remarkd"+id).style.display = "none";
}


// ÆË¾÷Ã¢ ¶ç¿ì±â
var gonggi1 = null;
var imgwin = null;

function open_notice(url) {
	var notice = window.open ( url, "notice", "toolbar=no, menubar=no, scrollbars=no, resizable=no, width=505, height=452, left=200, top=0");
}

function open_win1(url,fromwin,w,h) {
  
if (fromwin == 1){  
  if (imgwin != null){ 
    imgwin.close();
  }
  	
  if ( !gonggi1 || gonggi1.closed ){ 
     gonggi1=window.open ( url, "gonggi1", "toolbar=no, menubar=no, scrollbars=yes, resizable=no, width=" + w + ", height=" + h + ", left=200, top=0");
  }else{
     gonggi1.location.href = url; 
  } 
 
}else{
 
  if (gonggi1 != null){ 
    gonggi1.close();
  }
    
  if ( !imgwin || imgwin.closed ){ 
     imgwin=window.open ( url, "imgwin", "toolbar=no, menubar=no, scrollbars=no, resizable=no, width=" + w + ", height=" + h + ", left=200, top=0");
  }else{
     imgwin.location.href = url; 
  } 
 
}  
}

function CaricaFoto(img){ 
        foto1= new Image(); 
        foto1.src=(img); 
        Controlla(img); 
} 
function Controlla(img){ 
        if((foto1.width!=0)&&(foto1.height!=0)){ 
                viewFoto(img); 
        } 
        else{ 
                funzione="Controlla('"+img+"')"; 
                intervallo=setTimeout(funzione,20); 
        } 
} 
function viewFoto(img){
        largh=foto1.width + 30;
        altez=foto1.height + 20;

		window_left = (screen.width-largh)/2;
		window_top = (screen.height-altez)/2;

        stringa="width="+largh+",height="+altez+",left="+window_left+",top="+window_top+",resizable="+1+",scrollbars=yes";
        image_view=window.open(img,"",stringa);
        image_view.document.write("<html><head><meta HTTP-EQUIV='imagetoolbar' CONTENT='no'><title> </title></head><body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0><img src="+img+" onclick='self.close()' style=cursor:hand></body></html>");
        image_view.document.close();
}


// Áñ°ÜÃ£±â
 

// Äü¸Þ´º 
//Float layer 
function initMoving(target, position, topLimit, btmLimit) { 
 if (!target) 
  return false; 

 var obj = target; 
 obj.initTop = position; 
 obj.topLimit = topLimit; 
 obj.bottomLimit = document.documentElement.scrollHeight - btmLimit; 

 obj.style.position = "absolute"; 
 obj.top = obj.initTop; 
 obj.left = obj.initLeft; 

 if (typeof(window.pageYOffset) == "number") { 
  obj.getTop = function() { 
  return window.pageYOffset; 
  } 
 } else if (typeof(document.documentElement.scrollTop) == "number") { 
  obj.getTop = function() { 
  return document.documentElement.scrollTop; 
  } 
 } else { 
  obj.getTop = function() { 
  return 0; 
  } 
 } 

 if (self.innerHeight) { 
  obj.getHeight = function() { 
  return self.innerHeight; 
  } 
 } else if(document.documentElement.clientHeight) { 
  obj.getHeight = function() { 
  return document.documentElement.clientHeight; 
  } 
 } else { 
  obj.getHeight = function() { 
  return 500; 
  } 
 } 

 obj.move = setInterval(function() { 
  if (obj.initTop > 0) { 
  pos = obj.getTop() + obj.initTop; 
  } else { 
  pos = obj.getTop() + obj.getHeight() + obj.initTop; 
  //pos = obj.getTop() + obj.getHeight() / 2 - 15; 
  } 

  if (pos > obj.bottomLimit) 
  pos = obj.bottomLimit; 
  if (pos < obj.topLimit) 
  pos = obj.topLimit; 

  interval = obj.top - pos; 
  obj.top = obj.top - interval / 3; 
  obj.style.top = obj.top + "px"; 
 }, 30) 
} 

/* È®´ëÀÌ¹ÌÁö */
function PopupCenter(get_width,get_height) { //popup Ã¢ °¡¿îµ¥ ¶ì¿ì±â
	horizontal = (screen.width-get_width)/2;
	vertical = (screen.height-get_height)/2;
	new_posi='width='+get_width+',height='+get_height+',top='+vertical+',left='+horizontal+',toolbar=no,scrollbars=no,menubar=no,status=no,resizable=no';
	return new_posi;
}

 
  
function PhotoWindows(p_url,p_witdh,p_height){  //photo windows ¿ÀÇÂ
	var photo_win = null;
	if ( !photo_win || photo_win.closed ){
		photo_win = window.open('/js/photowindows.php?src='+p_url+'&p_witdh='+p_witdh+'&p_height='+p_height,'photo_win',PopupCenter(p_witdh,p_height));
	} else {
		photo_win.location.href = '/js/photowindows.php?src='+p_url+'&p_witdh='+p_witdh+'&p_height='+p_height;
	}
}


/*¼­ºê¸Þ´º*/
 function showNotice(show){
	if(show == "1"){
			document.getElementById('Notice01').style.display = '';
			document.getElementById('Notice02').style.display = 'none';
			document.getElementById('Notice03').style.display = 'none';
			document.getElementById('Notice04').style.display = 'none';
		}else if(show == "2"){
			document.getElementById('Notice01').style.display = 'none';
			document.getElementById('Notice02').style.display = '';
			document.getElementById('Notice03').style.display = 'none';
			document.getElementById('Notice04').style.display = 'none';
		}else if(show == "3"){
			document.getElementById('Notice01').style.display = 'none';
			document.getElementById('Notice02').style.display = 'none';
			document.getElementById('Notice03').style.display = '';
			document.getElementById('Notice04').style.display = 'none';
		}else if(show == "4"){
			document.getElementById('Notice01').style.display = 'none';
			document.getElementById('Notice02').style.display = 'none';
			document.getElementById('Notice03').style.display = 'none';
			document.getElementById('Notice04').style.display = '';
		}
}
