// ==========================
// COntrollo send mail / contact
// ==========================

	function testEmail(oggTextfield) {
	 oggTextfield.value = oggTextfield.value.replace(/\s+$|^\s+/g,"")
	 var re = /^[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)*@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_]+)*\.[a-zA-Z]{2,}$/g
	 return(re.test(oggTextfield.value))
	}
	function ControllaForm() {
		ok = "yes"
		if (document.SendFriend.YourName.value.length < 1)
			ok = "no";
		if (document.SendFriend.YourAddress.value.length < 1)
			ok = "no";
		if (document.SendFriend.FriendName.value.length < 1)
			ok = "no";
		var returnTestEmail = testEmail(document.SendFriend.FriendAddress)
		if (!(returnTestEmail)) {
			ok = "no";
		}
		if (ok == "no") {
			alert("Sorry. Your inserts data are incomplete or inexact. Please, compile all the fields.")
			return false
		}
	}
	function ControllaForm2() {
		ok = "yes"
		if (document.ContactUs.Name.value.length < 1)
			ok = "no";
		if (document.ContactUs.Subject.value.length < 1)
			ok = "no";
//		if (document.ContactUs.request.value.length < 1)
//			ok = "no";
		var returnTestEmail = testEmail(document.ContactUs.Email)
		if (!(returnTestEmail)) {
			ok = "no";
		}
		if (ok == "no") {
			alert("Sorry. Your inserts data are incomplete or inexact. Compile all the fields.")
			return false
		}
	}
// ==========================
// Check Browser for Style Sheet
// ==========================

AppVer = parseInt(navigator.appVersion);
		 var ver = navigator.appVersion;
		 
if (window.navigator.userAgent.indexOf("Mac") != -1) {  // Mac's browser 
           
	if (ver.indexOf("MSIE") != -1) {	// IE
		document.write('<LINK REL=stylesheet HREF="../Css/style.css" TYPE="text/css">')
	}
	
	else {	// Netscape
	document.write('<LINK REL=stylesheet HREF="../Css/style.css" TYPE="text/css">')
	}  
}

else  {  // Pc's browser

	if (ver.indexOf("MSIE") != -1) {	// IE
		document.write('<LINK REL=stylesheet HREF="../Css/style_pc.css" TYPE="text/css">')
	}
	
	else {	// Netscape
		if (document.layers){document.write('<LINK REL=stylesheet HREF="../Css/style_pc.css" TYPE="text/css">')}
		else {document.write('<LINK REL=stylesheet HREF="../Css/style_pc.css" TYPE="text/css">')}
	}
}

// End -->
