 img1= new Image(); 
function viewPic(img){ 

 img1.src=(img); 
  call(img); 
} 
function call(img){ 
  if((img1.width!=0)&&(img1.height!=0)){ 
    viewImg(img); 
  } 
  else{ 
    funzione="call('"+img+"')"; 
    intervallo=setTimeout(funzione,20); 
  } 
} 
function viewImg(img){ 
	WinW=img1.width+70; 
	WinH=img1.height+50; 
	/*
	LeftPosition = (screen.availWidth-WinW)/2 ;
	TopPosition = (screen.availHeight-WinH)/2 ;
		options ="scrollbars=yes,height="+WinH+",width="+WinW+",top="+TopPosition+",left="+LeftPosition+",";
	*/
options ="scrollbars=yes,height="+WinH+",width="+WinW;

	imgWin=window.open("","",options);
	imgWin.document.write("<html><head><title>Seoul Club since 1904</title></head>");
	imgWin.document.write("<img src="+img+" style='cursor:pointer;' onclick='self.close()'>");
	//imgWin.document.write("<SPAN id=imgObj style=' margin-top:-20;margin-left: -5px; border:0 solid #000000; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=#CCCCCC,offX=10,offY=10,positive=true); width:400'>");
	//imgWin.document.write("<img src="+img+" style='cursor:hand;MARGIN: 8px;border:solid 3 #ffffff' onclick='self.close()'>");
	//imgWin.document.write("</SPAN>");
	imgWin.document.write("<br/><center><a "+" style='cursor:hand' onclick='self.close()' >"+"<img src='/img/common/close.gif' border='0'></a></center>");
}

function isEmail(checkString){
    var newstr = "";
	var at = false;
    var dot = false;
    var ENGOnly=true;

    if (checkString.indexOf("@") !=-1) {
            at = true;
    } else if (checkString.indexOf(".") !=-1) {
            dot = true;
		}
	for (var i=0; i < checkString.length; i++) {
		ch = checkString.substring(i, i + 1)
        if ((ch>="A" && ch <="Z") || (ch>="a" && ch<="z")
               || (ch=="@") || (ch==".") || (ch=="_")
               || (ch=="-") || (ch>="0" && ch<="9")) {
               newstr += ch;
               if (ch=="@") {
                at=true;
               }
               if (ch==".") {
                dot=true;
               }
         }else {
              ENGOnly==false;
            }
	}
    if ((at==true) && (dot==true) && (ENGOnly==true)) {
            return newstr;
    }else {
            return false;
     }
}
function CheckAll(form_name) 
{	

	var chk = document.all(form_name);
	if (chk.checkall.checked == true) {
		for (var i=0; i < chk.length;i++)	{
			if (chk[i].type == "checkbox" && chk[i].checked == true) {
				chk[i].checked = false;
			}
		}
	}
	else {
		for (var i=0; i < chk.length;i++) {
			if (chk[i].type == "checkbox" && chk[i].checked == false) {
				chk[i].checked = true;
			}
		}
	}
}
function chkSubmit(form_name, del_url,msg)
{
	var chk = document.all(form_name);
	var sCount = 0;
  
	for (var i = 1; i < chk.length; i++)
	{
		if (chk[i].type == "checkbox" && chk[i].checked == true)
		{
			sCount++;	
        }
	}
      
	if (sCount == 0 )
	{
		alert ("Select list for "+msg);
	}          
	else {
			var DeleteMessage = window.confirm("¼±ÅÃÇÑ ¸®½ºÆ®¸¦ "+msg+" ÇÏ½Ã°Ú½À´Ï±î?");

			if (DeleteMessage)
			{		 				
				document.all(form_name).action =  del_url; 
				document.all(form_name).submit();
			}		
	}	
}
