function MM_openBrWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
}

function fullScreen(theURL) {
window.open(theURL, 'winname', 'fullscreen=yes, scrollbars=no');
}

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 fncShowHideSwitch()
{
	var i, v, obj;
	var args = fncShowHideSwitch.arguments;
	if ( ( obj=MM_findObj(args[0]) ) != null ) { 
		if (obj.style) 
		{
			obj = obj.style;
		}
			if ( obj.display == "block")
				obj.display = "none";
			else 
				obj.display = "block";
	}

	if ( window.top.frames[1] != null && window.top.frames[1].name == "content")
	{
		top.content.reSize();
	}
	else
	{
		parent.reSize();
	}
}

function fncShowHide()
{
	var i, v, obj, args=fncShowHide.arguments;
	for( i = 0 ; i < args.length-1 ; i+=2)
	{
		if ( ( obj=MM_findObj(args[i])) != null ) { 
			v = args[i+1];
			if (obj.style) 
			{
				obj = obj.style;
				v=(v=='show')?'block':(v=='hide')?'none':v; 
			}
				obj.display=v;
		}
	}
	if ( window.top.frames[1] != null && window.top.frames[1].name == "content")
	{
		top.content.reSize();
	}
	else
	{
		parent.reSize();
	}
}

function fncShowHideSwitch2()
{
	var i, v, obj;
	var args = fncShowHideSwitch2.arguments;
	if ( ( obj=MM_findObj(args[0]) ) != null ) { 
		if (obj.style) 
		{
			obj = obj.style;
		}
			if ( obj.display == "block")
				obj.display = "none";
			else 
				obj.display = "block";
	}
}

function openLoginForm(blogid)
{
	var loginwin = window.open("/loginForm.jsp?blogid=" + blogid, "loginwin", "width=230, height=120, left=0, top=0, resizable=false");
	loginwin.focus();
}

function openAddNeighbor(blogid)
{
	var nhwin = window.open("addnh.jsp?blogid="+blogid, "nhwin", "width=230, height=120, left=0, top=0, resizable=false");
	nhwin.focus();
}

function openScrabHistory(clubid, tableid, num, cnt)
{
	if(cnt=="0")
	{
		alert("½ºÅ©·¦ µÇÁö ¾ÊÀº °Ô½Ã¹°ÀÌ¹Ç·Î È÷½ºÅä¸®¸¦ º¼ ¼ö ¾ø½À´Ï´Ù.");
		return;
	}
	
	var scrwin = window.open("/scrab/history.jsp?clubid=" + clubid + "&tableid=" + tableid + "&number=" + num, "scrwin", "width=420, height=400, left=0, top=0, scrollbars=yes");
	scrwin.focus();
}

function popview(img)
{
  img = unescape(img);
  foto1= new Image();
  foto1.src=(img);
  contImg(img);
}

function contImg(img)
{
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewImg(img);
  }
  else{
    funzione="contImg('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}

function viewImg(img){
//  largh=foto1.width+20;
//  altez=foto1.height+20;
 largh=100;
 altez=100;
 stringa="width="+largh+",height="+altez + ",scrollbars=yes";
 
  finestra=window.open("/common/viewMyPic.jsp?img="+img,"",stringa);
}

function resizeImage(num)
{

	var width = eval('document.all.userImg'+num+'.width');
	if( width > 520 )
	{
		eval('document.all.userImg'+num+'.width = 520');
	}
}

function openRegWin(server)
{
	var regwin = window.open(server + "/main/join/step_1.jsp", "regwin", "width=600, height=600, top=0, left=0, scrollbar=yes");
	regwin.focus();
}


function checkNum(num){
var temp = "0123456789";
//var num = numbers.value;
var len = num.length;
   for(var i=0; i<len; i++){
      if(temp.indexOf(num.charAt(i)) < 0){
          return false;
      }
   }
   return true;
}

function doFilter()
{
	try
	{
		mainContents.filters.blendTrans.apply(); 
		mainContents.style.visibility = "visible";
		mainContents.filters.blendTrans.play(); 
	}
	catch(e){}
}

function findIDPW()
{
	var idwin = window.open('http://www.kyca.net/member/id_search.php','searchId','width=100,height=100,toolbars=no,resizable=no,scrollbars=no,top=50,left=50');
	idwin.focus();
}
function showFlash(name, width, height, id_name, strFlashvar) {
	str =	'<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" WIDTH="'+width+'" HEIGHT="'+height+'" id="'+id_name+'" ALIGN="">' +
			'<PARAM NAME="movie" VALUE="'+name+'">' +
			'<PARAM NAME="quality" VALUE="high">' +
			'<param name="flashvars" value="' + strFlashvar + '">' +
			'<PARAM NAME="menu" VALUE="false">' +
			'<EMBED src="'+name+'" quality=high  WIDTH="'+width+'" HEIGHT="'+height+'" NAME="'+id_name+'" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>' +
			'</OBJECT>';
	document.write(str);
}

function openMyPage(userid)
{
	var mywin = window.open("/mypage/?userid=" + userid, "mywin", "width=820, height=600, top=0, left=0, scrollbars=yes");
	mywin.focus();
}

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];}
}
