// JavaScript Document
	function hideForm(id)
	{ 
		if(document.getElementById(id))
		{
			document.getElementById(id).style.visibility 	= "hidden";		
			document.getElementById(id).style.height 		= '0px';	
		}
	}
  
	function uncheckInputAll(frm,name)
	{	
		var x = frm.elements;	
		for (var i=0 ; i < x.length ; i++)
		{			 
			if(x[i].name == name && x[i].type == 'checkbox')
				x[i].checked = false;								
		}
		return false;
	} 
	
	function checkInputAll(frm,name)
	{	
		var x = frm.elements;	
		for (var i=0 ; i < x.length ; i++)
		{			 
			if(x[i].name == name && x[i].type == 'checkbox' )
				x[i].checked = true;								
		}
		return false;
	} 
	/**************************** FUNCIONES AJAX ************************************/
	function objetoAjax()
	{
		var xmlhttp=false;
		try {
			   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			   try {
				  xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			   } catch (E) {
					   xmlhttp = false;
			   }
		}
	
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
			   xmlhttp = new XMLHttpRequest();
		}
		return xmlhttp;
	}
	
	function repairAjaxIE()
	{
		var ahora = new Date();
		var salida = "&repairIE="+ahora.getTime();
		return salida; 	
	}
	
	
	
	
	function HttpRequest(url){
		var pageRequest = false //variable to hold ajax object
	 
	
		if (!pageRequest && typeof XMLHttpRequest != 'undefined')
		   pageRequest = new XMLHttpRequest()
	
		if (pageRequest){ //if pageRequest is not false
		   pageRequest.open('GET', url, false) //get page synchronously 
		   pageRequest.send(null)
		   embedpage(pageRequest)
		 }
	}
	
	function embedpage(request){
		//if viewing page offline or the document was successfully retrieved online (status code=2000)
		if (window.location.href.indexOf("http")==-1 || request.status==200)
		   document.write(request.responseText)
	}
	
	
	 


function echeck(str) {
/**
 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   //alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   //alert("Invalid E-mail ID");
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    //alert("Invalid E-mail ID");
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    //alert("Invalid E-mail ID");
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    //alert("Invalid E-mail ID");
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    //alert("Invalid E-mail ID");
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    //alert("Invalid E-mail ID");
		    return false
		 }

 		 return true					
	}
 