
// ÀÌ¹ÌÁö ·Ñ¿À¹ö °ü·Ã
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_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 Layers_findObj(n, d) { //v4.0
	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=Layers_findObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function Layers_showHideLayers(strArg1, strArg2, strArg3) { //v3.0
	var i,p,v,obj,args=Layers_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=Layers_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; }

}


// Open New Window Script Start
function MM_openBrWindow(theURL,winName,features){ //v2.0
window.open(theURL,winName,features);
}

// bookmark
var favoriteurl="http://www.fishman.co.kr/"
var favoritetitle="ÀÔÅ«ºØ¾î"
function favoritesite(){
if (document.all)
window.external.AddFavorite(favoriteurl,favoritetitle)
}

// È­º¸°Ë»öÀÔ·ÂÃ¢
function clearText (thefield){
	if (thefield.defaultValue ==thefield.value)
	thefield.value = ""
}

// ÇÃ·¡ÀÌ¾î
function player(no){
	window.open("/player/mmsPlayAction.html?no="+no,"player","width=354,height=390,left=100,top=60,resizable=yes,scrollbars=no,status=1,location=no");
}

// Å¬¸³º¸µå
function copyText(sId)
{
	bResult = window.clipboardData.setData("Text",document.getElementById(sId).innerText);
	if (bResult)
		alert('Å¬¸³º¸µå¿¡ ÀúÀåµÇ¾ú½À´Ï´Ù.');
}

// Æû¸ÞÀÏ
function f_mail(){
	window.open("/feedback/mailsend.php","email","left=0,top=0,width=400,height=500,toolbar=no,scrollbars=yes");
}


// flash
function flash_contents(file,width,height){
document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+width+"' HEIGHT='"+height+"' id='top' align='middle'>");
document.writeln("<param name=movie value='"+file+"' />");
document.writeln("<param name=quality VALUE=high>");
document.writeln("<param name=bgcolor VALUE=#FFFFFF>");
document.writeln("<param name=wmode VALUE=transparent> ");
document.writeln("<embed src='"+file+"' quality='high' bgcolor='#FFFFFF' width='"+width+"' height='"+height+"' name='contents' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.writeln("</object>");
}

function FlashView(fn,wd,ht)
{
 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + wd + '" height="' + ht + '" id="main_layer_banner" align="middle">');
 document.write('<param name="allowScriptAccess" value="sameDomain">');
 document.write('<param name="movie" value="' + fn + '">');
 document.write('<param name="loop" value="true" />');
 document.write('<param name="menu" value="false">');
 document.write('<param name="quality" value="high">');
 document.write('<param name="wmode" value="transparent">');
 document.write('<param name="scale" value="noscale" />');
 document.write('<embed src="' + fn + '" menu="false" quality="high" wmode="transparent" width="' + wd + '" height="' + ht + '" name="main_layer_banner" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
 document.write('</object>');
}

// flash
function flash_banner(file,width,height){
document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+width+"' HEIGHT='"+height+"' id='top' align='middle'>");
document.writeln("<param name=movie value='"+file+"' />");
document.writeln("<param name=quality VALUE=high>");
document.writeln("<param name=bgcolor VALUE=#282828>");
document.writeln("<embed src='"+file+"' quality='high' bgcolor='#282828' width='"+width+"' height='"+height+"' name='contents' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.writeln("</object>");
}

// Layer
function toggleLayer(whichLayer) {
  var elem, vis;
  if(document.getElementById) // this is the way the standards work
    elem = document.getElementById(whichLayer);
  else if(document.all) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if(document.layers) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}


function nice_chk(){
    if(confirm("º»ÀÎÀÎÁõÀ» ÇÏ¼Å¾ß¸¸ ±Û¾²±â°¡ °¡´ÉÇÕ´Ï´Ù.")) {
        window.open("/checknice/index.php", "nice", "width=930,height=570,toolbars=no,autoscrollbars=no");
    }
}

function sendTwitter(title,url) {
	var wp = window.open("http://twitter.com/home?status=" + encodeURIComponent(title) + " " + encodeURIComponent(url), 'twitter', '');
	if ( wp ) {
		wp.focus();
	}
}
function sendMe2Day(title,url,tag) {
	title = "\""+title+"\":"+url;
	var wp = window.open("http://me2day.net/posts/new?new_post[body]=" + encodeURIComponent(title) + "&new_post[tags]=" + encodeURIComponent(tag), 'me2Day', '');
	if ( wp ) {
		wp.focus();
	}
}
function sendFaceBook(title,url) {
	var href = "http://www.facebook.com/sharer.php?u=" + url + "&t=" + encodeURIComponent(title);
	var a = window.open(href, 'facebook', 'toolbar=no,width=750,height=450,status=no,resizable=yes,scrollbars=no');
	if ( a ) {
		a.focus();
	}
}
function goYozmDaum(link,prefix,parameter) {
	var href = "http://yozm.daum.net/api/popup/prePost?link=" + encodeURIComponent(link) + "&prefix=" + encodeURIComponent(prefix) + "&parameter=" + encodeURIComponent(parameter);
	var a = window.open(href, 'yozm', 'width=466, height=356');
	if ( a ) {
		a.focus();
	}
}

