var e = "info" + "@" + "stargiocodelcinema" + ".com" ;
var em = "mailto:" + e;

function $(id){
	return document.getElementById(id);
}

function $$(id){
	return document.getElementById(id).value;
}

function $$$(id){
	return encodeURIComponent(document.getElementById(id).value);	
}

function is_email(email){
	var regex=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if(regex.test(email)) return true;
	else return false;
}

function is_empty(s){   
	var i;
	var whitespace = " \t\n\r";

	if ((s == null) || (s.length == 0)) return true;
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (whitespace.indexOf(c) == -1) return false;
    }
    return true;
}

function isAlphanumeric(s){
		var i;

		for (i=0; i<s.length; i++){   
           var c1 = s.charAt(i);
           if (!(((c1>="a") && (c1<="z"))||((c1>="A")&&(c1<="Z"))||((c1>="0")&&(c1<="9")))) return false;	
       	}
        return true;
}

function hiddenShow(idHidden, idShow){
	if(idHidden != '')
		document.getElementById(idHidden).style.display= "none";
	if(idShow != '')
		document.getElementById(idShow).style.display = "block";
}
