var xmlHttp
//FUNCION QUE PROCESA LA INFORMACION INTRODUCIDA EN LOS CUADROS DE TEXTO
function procesarLineas(){
	if(document.getElementById("idSub").selectIndex != 0){
		var idSubFamilia = document.getElementById("idSub").value;
		showDropLineas(idSubFamilia);
	}
}
//-->
function showDropLineas(str)
{ 
	//alert(str);
	xmlHttp=GetXmlHttpObject2();
	if (xmlHttp==null)
	  {
		  alert ("Your browser does not support AJAX!");
		  return;
	  } 
	var url="includes/getLineasSearch.asp";
	url=url+"?idSubFamilia="+str;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChangedLineas;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
//-->
function stateChangedLineas(){ 
	if (xmlHttp.readyState==4){ 
	
	var posValue = xmlHttp.responseText.indexOf("value=");
	var currStatus = (xmlHttp.responseText.substr(posValue+7,1));	
		if(currStatus == "S"){		
			document.getElementById("rowLinea").style.display = "block";
			document.getElementById("addCheckLinea").innerHTML=xmlHttp.responseText;
			document.getElementById("checLineaValid").value = "1";
		}else{			
			document.getElementById("rowLinea").style.display = "none";
			document.getElementById("addCheckLinea").innerHTML= "";
			document.getElementById("checLineaValid").value = "0";
		}	 		
	}
}
	
function GetXmlHttpObject2(){
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}