// JavaScript Document


function allcheck(obj,main){
	for(var i=0; i < obj.elements.length ; i++){		
		if(main.checked==true){
			obj[i].checked=true;
		}else{
			obj[i].checked=false;
		}
	}
}



function newwin(URLStr,width, height, usescrollbar)
{
	  var popUpWin=0;
	  var left = (screen.width/2) - width/2;
	  var top = (screen.height/2) - height/2;
	  if(popUpWin)
	  {
		  if(!popUpWin.closed) popUpWin.close();
	   }
	   popUpWin = open(URLStr, 'popUpWin', 'toolbar=0,location=0,directories=0,status=0,menub ar=0,scrollbars='+usescrollbar+',resizable=0,copyhistory=0,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


function validEmail(email){ 
	var emailRE = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;	
	if (!emailRE.test(email)){	
		return false;
	}else{
		return true;
	}
}

function isUrl(s) {
	var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
	return regexp.test(s);
}

