function openFullWindow(id)
{
  window.open ('join_club.asp?id='+id);
}
function openWindow(w,h,url)
{
  var iTop = (window.screen.availHeight-30-h)/2;     
  var iLeft = (window.screen.availWidth-10-w)/2;  
  window.open (url, '', 'height='+h+', width='+w+', top='+iTop+',left='+iLeft+', toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no') 
;
}
function deleteconfirm(url)
{
if (confirm("È·¶¨ÒªÉ¾³ýÂð£¡"))
	{
	  window.open (url);
	}
}
function alertConfirm(str,url)
{
if (confirm(str))
	{
	  window.location = url;
	}
}
function picResize(ImgD,iwidth,iheight){ 
 var flag=false;  
 var image=new Image();   
 image.src=ImgD.src;   
 if(image.width>0 && image.height>0){   
 flag=true;   
 if(image.width/image.height>= iwidth/iheight){   
  if(image.width>iwidth){     
  ImgD.width=iwidth;   
  ImgD.height=(image.height*iwidth)/image.width;   
  }else{   
  ImgD.width=image.width;     
  ImgD.height=image.height;   
  }   

  }   
 else{   
  if(image.height>iheight){     
  ImgD.height=iheight;   
  ImgD.width=(image.width*iheight)/image.height;     
  }else{   
  ImgD.width=image.width;     
  ImgD.height=image.height;   
  }   

  }   
 }   
}    
function checkemail(email)
{
 flag='@';
 ok=0;
   for(i=0;i<=email.length-1;i++)
   {
     char1=email.charAt(i);
     if(char1==' '){
      return false; 
     }
     if(char1==flag)
     {
  if(i==0 || i==email.length-1){
         return false;     
       }else{
    if (flag=='.') ok=1 ;
    else flag='.';
  }
 }
   }
 if (ok==1&&char1!='.') return true;
 else return false;

}
