function JS_viewObj(objhtml){
	document.write(objhtml);
}

function showswf(o,w,h){
	var i = parseInt(Math.random()*o.length);
	i=(isNaN(i))?0:i;
	JS_viewObj('\
					<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">\
						<param name="wmode" value="transparent">\
						<param name="movie" value="'+o[i]+'">\
						<param name="quality" value="high">\
						<embed src="'+o[i]+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed>\
					</object>\
					');
}


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


function fla_main(ccc,ddd) {
document.write('	<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="' + ccc + '" height="' + ddd + '" id="fla_main"/>');
document.write('	<param name="allowScriptAccess" value="sameDomain" />');
document.write('	<param name="movie" value="/fla/main.swf"/><param name="quality" value="high" /><param name="wmode" value="transparent" ><embed src="/fla/main.swf" quality="high" bgcolor="#ffffff" width="' + ccc + '" height="' + ddd + '" wmode="transparent" name="fla_main" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('	</object>');
}

 


function fla_menu(aaa,bbb,ccc,ddd) {
document.write('	<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="' + ccc + '" height="' + ddd + '" id="fla_menu"/>');
document.write('	<param name="allowScriptAccess" value="sameDomain" />');
document.write('	<param name="movie" value="/fla/menu.swf?pageNum=' + aaa + '&subNum=' + bbb + '" /><param name="quality" value="high" /><param name="wmode" value="transparent" ><embed src="/fla/menu.swf?pageNum=' + aaa + '&subNum=' + bbb + '" quality="high" bgcolor="#ffffff"  width="' + ccc + '" height="' + ddd + '" wmode="transparent" name="fla_menu" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('	</object>');
}

 


// vod_play
function vod_play(play_url, width, Height, CurrentPosition, SelectionStart) { // Media player version 9
var	str = "<object id=\"Player\" width="+width+" height="+Height+" viewastext style=\"z-index:1\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" type=\"application/x-oleobject\">"
        + "<param name=\"Filename\" value=\""+play_url+"\">"
        + "<param name=\"TransparentAtStart\" value=\"1\">" //¹öÆÛ¸µ½Ã Åõ¸íÇÏ°Ô, Áï ¹é±×¶ó¿îµåÀÌ¹ÌÁö¸¦ º¸¿©ÁÖ°Ô 1
        + "<param name=\"AnimationAtStart\" value=\"0\">" //¹öÆÛ¸µ½Ã ¹Ìµð¾î·Î°í ¾Èº¸¿©ÁÖ±â 0
        + "<param name=\"Enabled\" value=\"true\">"
        + "<param name=\"ShowControls\" value=\"1\">"
        + "<param name=\"AutoStart\" value=\"0\">"
        + "<param name=\"ShowDisplay\" value=\"0\">"
        + "<param name=\"ShowStatusBar\" value=\"0\">"
        + "<param name=\"ShowCaptioning\" value=\"0\">"
        + "<param name=\"CurrentPosition\" value=\""+CurrentPosition+"\">"
        + "<param name=\"SelectionStart\" value=\""+SelectionStart+"\">"
        + "<param name=\"Uimode\" value=\"FULL\">"
        + "<param name=\"EnableContextMenu\" value=\"1\">"
        + "</object>";
document.write(str);
}

function vod_play1(elm, play_url, width, Height) { // Media player version 9
	var	str = "<object id=\""+elm+"\" width="+width+" height="+Height+" viewastext style=\"z-index:1\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" "
			+ "codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" type=\"application/x-oleobject\">"
			+ "<param name=\"Filename\" value=\""+play_url+"\">"
			+ "<param name=\"TransparentAtStart\" value=\"1\">" //¹öÆÛ¸µ½Ã Åõ¸íÇÏ°Ô, Áï ¹é±×¶ó¿îµåÀÌ¹ÌÁö¸¦ º¸¿©ÁÖ°Ô 1
			+ "<param name=\"AnimationAtStart\" value=\"0\">" //¹öÆÛ¸µ½Ã ¹Ìµð¾î·Î°í ¾Èº¸¿©ÁÖ±â 0
			+ "<param name=\"Enabled\" value=\"true\">"
			+ "<param name=\"ShowControls\" value=\"0\">"
			+ "<param name=\"AutoStart\" value=\"0\">"
			+ "<param name=\"ShowDisplay\" value=\"0\">"
			+ "<param name=\"ShowStatusBar\" value=\"0\">"
			+ "<param name=\"ShowCaptioning\" value=\"0\">"
			+ "<param name=\"Uimode\" value=\"FULL\">"
			+ "<param name=\"EnableContextMenu\" value=\"0\">"
			+ "</object>";
	document.write(str);
}

function toPlay(elm) {
	if (elm.PlayState != 2) 
		elm.play();
}

function toPause(elm) {
	if (elm.PlayState == 2) 
		elm.pause();
}

function toStop(elm) {
	elm.stop();
}

var imgObj = new Image(); 
function showImgWin(imgName) { 
  imgObj.src = imgName; 
  setTimeout("createImgWin(imgObj)", 100); 
} 
function createImgWin(imgObj) { 
  if (! imgObj.complete) { 
    setTimeout("createImgWin(imgObj)", 100); 
    return; 
  } 
  imageWin = window.open("", "imageWin", 
    "width=" + imgObj.width + ",height=" + imgObj.height); 
  imageWin.document.write("<html><body style='margin:0'>"); 
  imageWin.document.write("<a href=javascript:window.close()><img src='" + imgObj.src + "' border=0></a>"); 
  imageWin.document.write("</body><html>"); 
  imageWin.document.title = imgObj.src; 
} 

//	function bluring(){			//ÀÌ¹ÌÁö onfocus="this.blur();" ÇÑ¹ø¿¡ Àâ¾ÆÁÖ´Â ½ºÅ©¸³Æ®
//		if(event.srcElement.tagName=="A"||event.srcElement.tageName=="IMG")document.body.focus();
//	}
//	document.onfocusin=bluring;


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