// JavaScript Document


function handleHttpResponse() {
    if (http.readyState == 4) {
       if (http.status == 200) {
          if (http.responseText.indexOf('invalid') == -1) {
				 // Armamos un array, usando la coma para separar elementos
			 results = http.responseText.split(":");
			  if(results[0] == "strapsc")
			  {
				//  alert(results[1])

		           document.getElementById("Strapsa").innerHTML = results[1];
					/*document.getElementById("idusuario").value = results[1];
	  			  	document.frmMorgan.action = "check_out_s.asp"
					document.frmMorgan.submit();
					//alert(results[1]);*/

			  }
			  if(results[0] == "strapsb")
			  {
				//  alert(results[1])

		           document.getElementById("Strapsb").innerHTML = results[1];
					/*document.getElementById("idusuario").value = results[1];
	  			  	document.frmMorgan.action = "check_out_s.asp"
					document.frmMorgan.submit();
					//alert(results[1]);*/

			  }
			  if(results[0] == "strapsct")
			  {
				  //alert(results[1])

		           document.getElementById("Strapst").innerHTML = results[1];
					/*document.getElementById("idusuario").value = results[1];
	  			  	document.frmMorgan.action = "check_out_s.asp"
					document.frmMorgan.submit();
					//alert(results[1]);*/

			  }		
			  if(results[0] == "bucklets")
			  {
				  //alert(results[1])

		           document.getElementById("list_bucklets").innerHTML = results[1];
					/*document.getElementById("idusuario").value = results[1];
	  			  	document.frmMorgan.action = "check_out_s.asp"
					document.frmMorgan.submit();
					//alert(results[1]);*/

			  }	
			  
			  if(results[0] == "heels")
			  {
				  //alert(results[1])

		           document.getElementById("list_heel").innerHTML = results[1];
					/*document.getElementById("idusuario").value = results[1];
	  			  	document.frmMorgan.action = "check_out_s.asp"
					document.frmMorgan.submit();
					//alert(results[1]);*/

			  }	
			  
			  if(results[0] == "cushion")
			  {
				  //alert(results[1])

		           document.getElementById("list_cushion").innerHTML = results[1];
					/*document.getElementById("idusuario").value = results[1];
	  			  	document.frmMorgan.action = "check_out_s.asp"
					document.frmMorgan.submit();
					//alert(results[1]);*/

			  }	
			  			  
			  
			   if(results[0] == "Error")
			  {
				  document.getElementById("mensaje").innerHTML ="<table width='100%' height='35' border='0' cellpadding='0' cellspacing='0'><tr><td width='3%' align='right'>&nbsp;</td><td width='3%'  class='Contenidos_3eye'><strong>Error:</strong> User or Password are incorrect. Try again</td><td width='3%' class='Contenidos_3eye'>&nbsp;</td></tr></table>"	
			  }			  
			  
			  
             enProceso = false;
          }
       }
    }
}






function MoreShoeStrap(cuales)
{
	
		if (!enProceso && http) {
		   var cules = escape(cuales);
		   if(cules == 1)
		   {
		     document.getElementById("Strapsa").innerHTML = "<label><img src='img/loading.gif' alt='Loading' width='32' height='32' longdesc='Loading - Please Wait'>&nbsp;<img src='img/publicacion_shopping_cart/loading.jpg' alt='loading' width='79' height='26'></label>";			   
		   }
		   if(cules == 2)
		   {
		     document.getElementById("Strapst").innerHTML = "<label><img src='img/loading.gif' alt='Loading' width='32' height='32' longdesc='Loading - Please Wait'>&nbsp;<img src='img/publicacion_shopping_cart/loading.jpg' alt='loading' width='79' height='26'></label>";			   
		   }
		   if(cules == 3)
		   {
		     document.getElementById("list_bucklets").innerHTML = "<label><img src='img/loading.gif' alt='Loading' width='32' height='32' longdesc='Loading - Please Wait'>&nbsp;<img src='img/publicacion_shopping_cart/loading.jpg' alt='loading' width='79' height='26'></label>";			   
		   }		   	   
		   if(cules == 6)
		   {
		     document.getElementById("Strapsb").innerHTML = "<label><img src='img/loading.gif' alt='Loading' width='32' height='32' longdesc='Loading - Please Wait'>&nbsp;<img src='img/publicacion_shopping_cart/loading.jpg' alt='loading' width='79' height='26'></label>";			   
		   }
		   if(cules == 12)
		   {
		     document.getElementById("list_heel").innerHTML = "<label><img src='img/loading.gif' alt='Loading' width='32' height='32' longdesc='Loading - Please Wait'>&nbsp;<img src='img/publicacion_shopping_cart/loading.jpg' alt='loading' width='79' height='26'></label>";			   
		   }
		   if(cules == 13)
		   {
		     document.getElementById("list_cushion").innerHTML = "<label><img src='img/loading.gif' alt='Loading' width='32' height='32' longdesc='Loading - Please Wait'>&nbsp;<img src='img/publicacion_shopping_cart/loading.jpg' alt='loading' width='79' height='26'></label>";			   
		   }		   
		   
		   
		   
		   
		   
		   var url = "moreproducts.asp?tipo="+cules;
		   //alert(url);
		   http.open("GET", url, true);
		   http.onreadystatechange = handleHttpResponse;
		   enProceso = true;
		   http.send(null);
		}
	return false;
}


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;
}


var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest