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";
	}
}

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;
		}
	}
}

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("/jsps/ko/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 openFactoryAbout()
{
	var aboutwin = window.open("/main/factory/about.jsp", "aboutwin", "width=518, height=680, left=0, top=0, scrollbars=yes");
	aboutwin.focus();
}
function openFactoryStandard()
{
	var stdwin = window.open("/main/factory/standard.jsp", "stdwin", "width=500, height=443, left=0, top=0, scrollbars=no");
	stdwin.focus();
}