var popUpWin=0;
function popUpWindow(id){
 var left=200;
 var top=200;
 var width=640;
 var height=480;
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open('/zoom.php?page='+id, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function f1(event,popup){
 popup.style.left=document.body.scrollLeft+event.clientX-5;
 popup.style.top=document.body.scrollTop+event.clientY-5;
 popup.style.display='';
}
function f2(popup){
popup.style.display='none';
}

function isEmpty(elem) {
 var str = elem.value;
    var re = /.+/;
    if(!str.match(re)) {
        return true;
    } else {
        return false;
    }
}

function isEmptyById(id){
 var text=document.getElementById(id).value;
 return(text==null || text.length==0);
}

function isEMailAddr(elem) {
 var str = elem.value;
    var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
    if (!str.match(re)) {
        return true;
    } else {
        return false;
    }
}

