<!--

function check_email(value) {
    email_type = /^[a-z0-9][a-z0-9_\.-]*@[a-z0-9][a-z0-9_\.-]*\.([a-z]{2}|com|org|net|mil|gov|edu|biz|info|name)$/i;
    if (!email_type.test(value)) {
        return false;
    } else {
        return true;
    } 
}
function check_alpha(value) {
    if (value == "") {
        return false;
    } else {
        return true;
    } 
}

function openwin(name,myname,mywidth,myheight,mytool,mydir,mystatus,myscroll,myresize,mymenu) {
    mytop=Math.floor((screen.height/2) - (myheight/2));
    myleft=Math.floor((screen.width/2) - (mywidth/2));
    debute = window.open(name,myname,"toolbar="+mytool+",width="+mywidth+",height="+myheight+",directories="+mydir+",status="+mystatus+",scrollbars="+myscroll+",top="+mytop+",left="+myleft+",resizable="+myresize+",menubar="+mymenu)
}

function CheckFormNews(){
	var message ="";
	if (!check_email(document.FormNews.email.value)) message+='Type a valid email\n';
	if(message.length>0) {
		alert(message);
	} else {
		openwin('inc/news.php?email='+document.FormNews.email.value,'news',200,100,0,0,0,0,0,0);
	}
}

function EmptyMail()
{
	//if (document.FormNews.email.value == "your email"){
		document.FormNews.email.value="";
	//}
}

function LaunchFlyer(img){
	openwin('inc/flyer.php?img='+img,'flyer',100,100,0,0,0,0,0,0);
}

//-->

