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 http = getHTTPObject(); // Creamos el objeto XMLHttpRequest
var ajaxAndando = false;

function setPX(obj, propiedad, medida){
	if (document.all){
		if (propiedad=='width')	obj.style.width=medida;
		if (propiedad=='height') obj.style.height=medida;
	}else{
		if (propiedad=='width')	obj.style.width="" + medida + "px";
		if (propiedad=='height') obj.style.height="" + medida + "px";
	}
}

function resizeDiv(cualCliente){
	//window.document.getElementById('res').innerText = arriba.clientWidth;
	//x el mozilla
	ocontenido=eval("document.getElementById('contenido')");
	oarriba=eval("document.getElementById('arriba')");
	if (ocontenido!=null){
	//PARA VIRTUAL TRAINER 10
		if (cualCliente<'cl0010'){
				if (oarriba.clientWidth>1024){
					setPX(ocontenido, 'width', 1024);
				} else {
					setPX(ocontenido, 'width', oarriba.clientWidth);
				}
				//setear por ajax ancho del navegador
				try {
					var url = "setearAncho.asp?anchoBrowser="+oarriba.clientWidth;
					http.open("GET", url, true);
					http.onreadystatechange = handleHttpResponse;
					http.send(null);
				} catch(e) {};
		}else{
			//ANCHO FIJO NUEVO LAYOUT
			setPX(ocontenido, 'width', 920);
			setPX(oarriba, 'width', 920);
		}
	}
}

function handleHttpResponse() { 
	if (http.readyState == 4) { 
		if (http.status == 200) { 
			var results = http.responseText.toString(); 
			try{
			   document.getElementById('tirar').innerHTML=results;
			} catch(e){};
		} // 200
		else {
			//alert("error: " + http.status);
		}
	} // 4
}

function estilo(est){
	try{this.setAttribute('className',est);}catch(e){}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function ampliar(titulo,foto){
	MM_openBrWindow('../popUp.asp?t='+titulo+'&f='+foto,'popUp','width=400,height=300')
}

if (navigator.appName == 'Microsoft Internet Explorer' && (navigator.platform.substring(0,3) == 'Win')) {
	scw=screen.Width; sch=screen.Height;
} else if (navigator.appName == 'Netscape' || navigator.platform == 'MacPPC') {
	scw=screen.width; sch=screen.height;
} else {
	scw=screen.width; sch=screen.height;
}

