

 function verocultar(cual) 
 {
	  var c=cual.nextSibling;
	  if(c.style.display=='none') 
	  {	   c.style.display='block';	  } 
	  else
	  {	   c.style.display='none';   }
	  return false;
 }
 
 function MostrarTwitter() 
	{	div = document.getElementById('LoginTwitterIframe');	div.style.display = '';	}	
 
 function MostrarCode() 
	{	div = document.getElementById('CodeWidget');	div.style.display = '';	}	
	function CerrarCode() 
	{	div = document.getElementById('CodeWidget');	div.style.display='none';	}
	
function handleHttpResponseEmail() { 
    if (http.readyState == 4) { 
       if (http.status == 200) { 
          if (http.responseText.indexOf('invalid') == -1) {
             results = http.responseText.split("|"); 
             document.getElementById("EnvioEmail").innerHTML = results[0];
             enProceso = false;
          }
       }
    }
}
function EnviarEmailAjax() {
	if (!enProceso && http) {
       var valor1 = escape(document.getElementById("xLink").value);
       var valor2 = escape(document.getElementById("xEmail").value);
       var valor3 = escape(document.getElementById("xVCID").value);
       var valor4 = escape(document.getElementById("xName").value);
	   var url = "SEnvioVideoEmail.asp?l=" + valor1 + "&e=" + valor2 + "&n=" + valor4 + "&v=" + valor3;
	   location.href = url;
       //http.open("GET", url, true);
       //http.onreadystatechange = handleHttpResponseEmail;
       enProceso = true;
       http.send(null);
    }
}
function EnviarEmail()
{
	var xemail = document.getElementById("xEmail").value;
	var sw = false;
	for (i=0;i<xemail.length;i++)
	{
		if(xemail.charAt(i) == "@")
		{
			sw = true;
			break;
		}
	}
	if (sw == true)
	{
		EnviarEmailAjax();
	}
	else
	{alert("Email Invalid");}
}
function getHTTPObject() {
    var xmlhttp;
    /*@cc_on
    @if (@_jscript_version >= 5)
       try {
          xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
          try {
             xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (E) { xmlhttp = false; }
       }
    @else
    xmlhttp = false;
    @end @*/
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
       try {
          xmlhttp = new XMLHttpRequest();
       } catch (e) { xmlhttp = false; }
    }
    return xmlhttp;
}

function DisplayFolder()
	{
		document.getElementById("CFolder").style.display = "";
		document.getElementById("CProperties").style.display = "none";
		document.getElementById("CCommunity").style.display = "none";
		
		document.getElementById("AFolder").className = "";
		document.getElementById("AProperty").className = "noactivo";
		document.getElementById("ACommunity").className = "noactivo";
	}

function DisplayProperty()
	{
		
		document.getElementById("CProperties").style.display = "";
		document.getElementById("CCommunity").style.display = "none";
		
		
		document.getElementById("AProperty").className = "";
		document.getElementById("ACommunity").className = "noactivo";
	}
	
function DisplayProperty2()
	{
		document.getElementById("CFolder").style.display = "none";
		document.getElementById("CProperties").style.display = "";
		
		
		document.getElementById("AFolder").className = "noactivo";
		document.getElementById("AProperty").className = "";
		
	}

	
function DisplayProperty3()
	{
		document.getElementById("CFolder").style.display = "none";
		document.getElementById("CProperties").style.display = "";
		document.getElementById("CCommunity").style.display = "none";
		
		document.getElementById("AFolder").className = "noactivo";
		document.getElementById("AProperty").className = "";
		document.getElementById("ACommunity").className = "noactivo";
	}
	
	function DisplayCommunity()
	{
		
		document.getElementById("CProperties").style.display = "none";
		document.getElementById("CCommunity").style.display = "";
		
		
		document.getElementById("AProperty").className = "noactivo";
		document.getElementById("ACommunity").className = "";
	}
	
	function DisplayCommunity3()
	{
		document.getElementById("CFolder").style.display = "none";
		document.getElementById("CProperties").style.display = "none";
		document.getElementById("CCommunity").style.display = "";
		
		document.getElementById("AFolder").className = "noactivo";
		document.getElementById("AProperty").className = "noactivo";
		document.getElementById("ACommunity").className = "";
	}
	
	function DisplayBarrioBBR3()
	{
		document.getElementById("CBarrio").style.display = "";
		document.getElementById("CZona").style.display = "none";
		document.getElementById("CPueblo").style.display = "none";
		
		document.getElementById("ABarrio").className = "";
		document.getElementById("AZona").className = "noactivo";
		document.getElementById("APueblo").className = "noactivo";
	}
	
	function DisplayZonaBBR3()
	{
		document.getElementById("CBarrio").style.display = "none";
		document.getElementById("CZona").style.display = "";
		document.getElementById("CPueblo").style.display = "none";
		
		document.getElementById("ABarrio").className = "noactivo";
		document.getElementById("AZona").className = "";
		document.getElementById("APueblo").className = "noactivo";
	}
	
	function DisplayPuebloBBR3()
	{
		document.getElementById("CBarrio").style.display = "none";
		document.getElementById("CZona").style.display = "none";
		document.getElementById("CPueblo").style.display = "";
		
		document.getElementById("ABarrio").className = "noactivo";
		document.getElementById("AZona").className = "noactivo";
		document.getElementById("APueblo").className = "";
	}
	
	function DisplayPuebloBBR2cb()
	{
		
		document.getElementById("CBarrio").style.display = "none";
		document.getElementById("CPueblo").style.display = "";
		
		document.getElementById("ABarrio").className = "noactivo";
		document.getElementById("APueblo").className = "activo";
	}
	
	function DisplayBarrioBBR2cb()
	{
		
		document.getElementById("CBarrio").style.display = "";
		document.getElementById("CPueblo").style.display = "none";
		
		document.getElementById("ABarrio").className = "activo";
		document.getElementById("APueblo").className = "noactivo";
	}
	
	function DisplayPuebloBBR2cz()
	{
		
		document.getElementById("CZona").style.display = "none";
		document.getElementById("CPueblo").style.display = "";
		
		document.getElementById("AZona").className = "noactivo";
		document.getElementById("APueblo").className = "activo";
	}
	
	function DisplayZonaBBR2cz()
	{
		
		
		document.getElementById("CZona").style.display = "";
		document.getElementById("CPueblo").style.display = "none";
		
		
		document.getElementById("AZona").className = "activo";
		document.getElementById("APueblo").className = "noactivo";
	}


var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest
	
	
	
