function changeLang(theLang)	{
	location.href	= "/language_" + theLang + ".htm"
}
function checkRegBlogStep1()	{
	//	This is the form
	var myForm					= document.RegBlogStep1;
	//	These are the fields to check
	var k_username				= myForm.username.value;
	var k_password				= myForm.password.value;
	var k_passwordconfirm		= myForm.passwordconfirm.value;
	var k_email					= myForm.email.value;



	//	regExp
	var FiltroMail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
	var FiltroNum	= /^([0-9])+$/;

	//	... and now, check all!
	var errors	= "";
	if (k_username == "")	
	{
		alert('Inserisci la tua Username');
		myForm.username.focus();
		return;
	}
	else 
	{
		if (k_username.length < 5)	{
			alert('La Username deve essere lunga almeno 5 caratteri');
			myForm.username.focus();
			return;		
		}
	}
	
	if (k_password == "")	{
		alert('Inserisci la tua Password');
		myForm.password.focus();
		return;
	}	
	else 
	{
		if (k_password.length < 5)	{
			alert('La Password deve essere lunga almeno 6 caratteri');
			myForm.username.focus();
			return;		
		}
	}	
	
	
	if (k_passwordconfirm == "")	{
		alert('Reinserisci la tua Password');
		myForm.passwordconfirm.focus();
		return;
	}		
	
	if (k_password != k_passwordconfirm)	{
		alert('Le 2 password non coincidono');
		return;
	}	

	if (k_email == "")	
	{
		alert('Inserisci la tua Email');
		myForm.email.focus();
		return;
	}
	else 
	{
		if (FiltroMail.test(k_email) == false) {
			alert('Inserisci una Email valida');
			myForm.email.focus();
			return;
		}
	}

	myForm.submit();
}



function checkRegBlogStep2()	{
	//	This is the form
	var myForm					= document.RegBlogStep2;
	//	These are the fields to check
	var k_title					= myForm.title.value;


	//	... and now, check all!
	var errors	= "";
	if (k_title == "")	
	{
		alert('Inserisci il Titolo');
		myForm.title.focus();
		return;
	}
	else
	{
			if (k_title.length < 3)	
			{
				alert('Il titolo deve essere lungo almeno 3 caratteri');
				myForm.title.focus();
				return;
			}
	}


	myForm.submit();
}


function checkLogin()	{
	//	This is the form
	var myForm					= document.LoginForm;
	//	These are the fields to check
	var k_user					= myForm.user.value;
	var k_psw 					= myForm.psw.value;


	//	... and now, check all!
	var errors	= "";
	if (k_user == "")	
	{
		alert('Inserisci la Username');
		myForm.user.focus();
		return;
	}
	else
	{
			if (k_user.length < 5)	
			{
				alert('La Username deve essere lunga almeno 5 caratteri');
				myForm.user.focus();
				return;
			}
	}


	if (k_psw == "")	
	{
		alert('Inserisci la Password');
		myForm.psw.focus();
		return;
	}
	else
	{
			if (k_psw.length < 5)	
			{
				alert('La Password deve essere lunga almeno 6 caratteri');
				myForm.psw.focus();
				return;
			}
	}	
	


	myForm.submit();
}


checkAddPost

function checkAddPost()	{
	//	This is the form
	var myForm					= document.SecForm;
	//	These are the fields to check
	var k_PostTitle					= myForm.PostTitle.value;
	var k_PostContent				= myForm.PostContent.value;


	//	... and now, check all!
	var errors	= "";
	if (k_PostTitle == "")	
	{
		alert('Inserisci il titolo del Post');
		myForm.PostTitle.focus();
		return;
	}

	if (k_PostContent == "")	
	{
		alert('Inserisci il contenuto del Post');
		myForm.PostContent.focus();
		return;
	}

	myForm.submit();
}

function checkModPost()	{
	//	This is the form
	var myForm					= document.SecForm;
	//	These are the fields to check
	var k_PostTitle					= myForm.PostTitle.value;
	var k_PostContent				= myForm.PostContent.value;


	//	... and now, check all!
	var errors	= "";
	if (k_PostTitle == "")	
	{
		alert('Inserisci il titolo del Post');
		myForm.PostTitle.focus();
		return;
	}

	if (k_PostContent == "")	
	{
		alert('Inserisci il contenuto del Post');
		myForm.PostContent.focus();
		return;
	}

	myForm.submit();
}


function TheOpener(theUrl,WinName,width,height,scrollbar,resize,msgNoPopUp,goTo) {
//	theUrl 		= The page
//	width		= Width of the window
//	height		= Height of the windows
//	scroll		= Do You want the Scroll??? ][ Value = yes|no
//	resize		= Do You want to resize Window??? ][ Value = yes|no
//	msgNoPopUp	= set a message if popUp is not opened (aka blocked by a PopUp blocker)
//	goTo		= set a page where to go if popUp is not opened
//
// brought to you by []==ThoRŪ
//
	var x = screen.availWidth
	var y = screen.availHeight
	var spaceSx = (x - width)/2
	//var spaceUp = 0										// To Point PopUp top
	var spaceUp = (y - height)/2							// To point PopUp in the center

	winparams	= ""										// Start Params for Window
	winparams	= winparams + "scrollbars=" 	+ scrollbar	// Scroll
	winparams 	= winparams + ",resizable=" 	+ resize	// Resizable
	winparams 	= winparams + ",left=" 			+ spaceSx	// Space From Left
	winparams 	= winparams + ",top=" 			+ spaceUp	// Space From Top
	winparams 	= winparams + ",width=" 		+ width		// Windowz Width
	winparams 	= winparams + ",height=" 		+ height	// Windowz Height
	winparams 	= winparams + ",directory=no"				// The Tool Bar Menu
	winparams 	= winparams + ",status=no"					//
	winparams 	= winparams + ",location=no"				//
	winparams 	= winparams + ",toolbar=no"					// -------------------
	// Open window
	var OpWind	= window.open(theUrl,WinName,winparams);
	if (OpWind==null || typeof(OpWind)=="undefined")	{
		if (msgNoPopUp != "")	{
			alert(msgNoPopUp);
		}
		if (goTo != "")	{
			location.href	= goTo;
		}
	} else {
		// Active window
		OpWind.focus();
	}
}