
function Request(url,e,params)
{
    var xmlHttp;
    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();
    }
    
    xmlHttp.onreadystatechange=function()
    {
        if(xmlHttp.readyState==4)
        {
         
             
            var h1 = document.createElement("div");
           
            h1.innerHTML =  xmlHttp.responseText;
           
            var x = h1.getElementsByTagName("script"); 
	        
	        for( var i=0; i < x.length; i++) 
	        {
	           eval(x[i].text);
		    }
		    
		    
	        
            e(xmlHttp.responseText);
        }
    }
   
    xmlHttp.open("Post",url,true);
    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp.send(params);  
}

function RespuestaVacia(s){ }

function res()
{
    
    
    if( typeof( window.innerWidth ) == 'number' ) {
      
      myWidth = window.innerWidth;
      myHeight = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
      
      myWidth = document.body.clientWidth;
      myHeight = document.body.clientHeight;
    }
     
	
	
    
	if (screen.availWidth<640) {
	  if (myWidth<=320) {
		  myWidth=320;
	  }
	}
	
	else {
	
		
	    	if (myHeight<600) 
			{
				myHeight=600;
			}
			
		
			if (myWidth<1000) 
			{
				myWidth=1000;
			}
			
		
	}
	myWidthFs = myWidth;
    myHeightFs = myHeight;
	
    Request('/ccode/ajax/rese.aspx',Respuesta,'parpanc='+myWidth+'&parpalt='+myHeight+'&parpancFS='+myWidthFs+'&parpaltFS='+myHeightFs);
}
function Respuesta(s)
{
    if(s=='RELOAD')
    {
        location.reload(true); //window.open(document.location,'_self');
    }
}

function RespuestaAbrirCentro(s)
{
    if(s!='nulo') location.href=s;//window.open(document.location,'_self');
}

function RespuestaDescargaProd(s)
{
    if(s!='nulo') document.getElementById("productos").innerHTML=s;
}

function RespuestaDescargaDesca(s)
{
    if(s!='nulo') document.getElementById("descargas").innerHTML=s;
}
res();


