function openSubwinresize(wname,src,width,height) {
     wpars='status=0,toolbar=0,location=0,menubar=0,directories=0,scrollbars=1,resizable=1,dependent=1,width='+width+',height='+height;
	newwindow=window.open(src,wname,wpars);
	if (window.focus) {newwindow.focus()}
} 
 
function checkMail(email) {	
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(email)) {				
		return false;
	}
	return true;
}

function checkExtension(filename) {
	if (filename == '') {
		return true;
	}
	var extArray = new Array("gif","png","jpg","zip","rar","doc","docx","xls","xlsx","ppt","pptx","pps");
    var allowSubmit = false;
    var ext = filename.split('.').pop().toLowerCase();
    for (var i = 0; i < extArray.length; i++) {
    	if (extArray[i] == ext) { allowSubmit = true; break; }
    }
    if (allowSubmit) { 
		return true;
	}
    else {	    
	    return false;
    }
}
