		function loadImages() {
		if (document.getElementById) {  // DOM3 = IE5, NS6
		document.getElementById('hidepage').style.visibility = 'hidden';
		}
		else {
		if (document.layers) {  // Netscape 4
		document.hidepage.visibility = 'hidden';
		}
		else {  // IE 4
		document.all.hidepage.style.visibility = 'hidden';
			  }
		   }
		}
		
		function recuperardados() {
		var nome = document.form.nome.value;
		var ajax = new AJAX();
		ajax.Updater("ajax/listar.php?digito="+nome,"conteudo","get","<div style='color:#FFFFFF;background-color:#0044DB;'>Loading data, please wait...</div>");
		}
		
	
		function semerro(){
		return true;}
		window.onerror=semerro;
		
		function OpenImage(url,l,a)
		{
		var x = parseInt((screen.width-l)/2);
		var y = parseInt((screen.height-a)/2);
		var win = window.open(url,'','width='+l+',height='+a);
		win.moveTo(x,y);
		}
		
		function corrijeTexto(o){
		o.value=o.value.replace(/([^0-9a-z@\-_.])/g,"");
		}
		
		function onlyAlpha(o){
		o.value=o.value.replace(/([^0-9 ?!, a-z@\-_.])/g,"");
		}
		
		window.defaultStatus="SchoenstattYouth.com :: The Official Website of the Schoenstatt Youth"
		
		
		function Profile(aURL, W, L) {
				
				var x = parseInt((screen.width-W)/2);
				var y = parseInt((screen.height-L)/2);
				
			window.open(aURL,'', 'width='+W+', height='+L+', top=0, left=0, top=100, left=100, scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
			
				win.moveTo(x,y);
		}
		
		
		function LaunchChat(person) {
			window.open("LaunchChat.php?inv="+person, person,"height=500,width=400,status=yes,scrollbars=yes,toolbar=no,resize=yes,menubar=no,location=no");
		}
		
		
		function MM_swapImgRestore() { //v3.0
		  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
		}
		
		function MM_preloadImages() { //v3.0
		  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
			var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
		}
		
		function MM_findObj(n, d) { //v4.01
		  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
		  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
		  if(!x && d.getElementById) x=d.getElementById(n); return x;
		}
		
		function MM_swapImage() { //v3.0
		  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
		   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
		}
		
		
		function smile(str){ 
			  f.scrap.value+=str; 
		} 
		
			function smileChat(str){ 
				f.line.value+=str; 
			} 
			function closeChatSmiles()
			{
				document.getElementById('scrapSmiles').style.display = 'none';
			}
		
		function addSmile(str){ 
			  enviar_formulario.msg.value+=str; 
		} 
		
		function addSmileTxt(str){ 
			  post_comment.text.value+=str; 
		} 
		
		function toodle(name) {
			document.getElementById(name).style.display = 'block';
		}
		
		function SearchOptions() {
			document.getElementById('SearchOptions').style.display = 'block';
			document.form.nome.focus();
		}
		
		
		function closex(name) {
			document.getElementById(name).style.display = 'none';
		}
		
		function Smiles()
		{
		document.getElementById('smiles').style.display = 'block';
		}
				
		function closeSmiles()
		{
			document.getElementById('smiles').style.display = 'none';
		}
		
		function DisplayGroupMembers()
		{
			document.getElementById('members').style.display = 'block';
			document.getElementById('forum').style.display = 'none';
		}
		
		function DisplayGroupForum()
		{
			document.getElementById('members').style.display = 'none';
			document.getElementById('forum').style.display = 'block';
		}
		
		function isValidEmail(str) 
		{
 	  		return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  		}
		
		function enviar(){

			if (document.enviar_formulario.username.value==''){
			alert('Please insert a valid login name, if can be a email or a name.\n Do not use capital letters or symbols');
			document.enviar_formulario.username.focus();
			return(false);
			}
			
			if (document.enviar_formulario.name.value==''){
			alert('Please insert your full name.\n please do not use nicknames');
			document.enviar_formulario.name.focus();
			return(false);
			}
			
			if (document.enviar_formulario.password.value==''){
			alert('Please insert a valid password, do not insert your birthday, email, or any kind of information which may be easy to other people to find out.\n Do not use capital letters or symbols');
			document.enviar_formulario.password.focus();
			return(false);
			}
			
			if (document.enviar_formulario.email.value==''){
			alert('Please insert a valid email address, such as \n YourName@YourDomain.com');
			document.enviar_formulario.email.focus();
			return(false);
			}  
					
		}

