var mymessage = "© VentaDeColchones.Com";
function rtclickcheck(keyp) {
  if (navigator.appName == "Netscape" && keyp.which == 3) {
    alert(mymessage);
    return false;
  }
  if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) {
    alert(mymessage);
    return false;
  }
}
// document.onmousedown = rtclickcheck

function CargandoOff () {
   Cargando.style.visibility = 'hidden';
   Cargando2.style.visibility = 'hidden';
}

function CargandoOn () {
   Cargando.style.visibility = '';
   Cargando2.style.visibility = '';
}

			function muestraCargando () {
				w = window.parent.frames['contenido'];
				w.CargandoOn ();
			}

			function pulsaCarrito () {
				pulsaBoton (document.all[('btn' + carrito)]);
			}
			
			function muestrafoto (foto) {
				foto_mediana_img42.src = foto;
				s = foto_mediana_img42.style;
				s.display = '';
			}
			function ocultafoto () {
				foto_mediana_img42.src = "./colchones-imgs/carga.gif";
				foto_mediana_img42.style.display = 'none';
			}
			function abreEnlace (fuente) {
				window.open (fuente, 'contenido', '');
			}
			function AbreVentanaSofa (url) {
				var ventana = document.open (url, '_blank', 'toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, left=40, top=0, width=730, height=650, resizable=yes');
			}	
			function AbreVentanaSofa2 (url) {
				var ventana = document.open (url, '_blank', 'toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, left=40, top=0, width=850, height=650, resizable=yes');
			}
			function Abre (url) {
				 var ventana2 = window.open(url, '_blank', 'toolbar=no, location=no, directories=no, status=no, scrollbars=no, left=40, top=0, left=200, top=200, width=300px, height=150px, resizable=no' );
				 ventana2.focus();
			}
			function AbreConsulta (url) {
				var ventana = document.open (url, '_blank', 'toolbar=no, location=no, directories=no, status=no, scrollbars=no, left=200, top=200, width=550, height=180, resizable=no');
			}
			function AbreConsulta2 (url) {
				var ventana = document.open (url, '_blank', 'toolbar=no, location=no, directories=no, status=no, scrollbars=no, left=200, top=200, width=620, height=210, resizable=no');
			}
			function AbreVentanaPatas (url) {
				var ventana = document.open (url, '_blank', 'toolbar=no, location=no, directories=no, status=no, scrollbars=no, left=100, top=100, width=420, height=500, resizable=no');
			}
	function AbreVentanaPersonalizador(url) {
				document.open (url, '_blank', 'toolbar=no, location=no, directories=no, status=no, scrollbars=no, left=100, top=100, width=400, height=350, resizable=no');
	}
	
	function AbreVentanaMedidasEsp(url) {
				document.open (url, '_blank', 'toolbar=no, location=no, directories=no, status=yes, scrollbars=no, left=100, top=100, width=300, height=500, resizable=no');
	}
	
	function imprimir () {
	   if (window.print != null) {
		  window.print()
	   } else {
		  alert('Desafortunadamente, tu navegador no soporta este método de impresión.\nPor favor, selecciona la opción de Imprimir del menú de Archivo de tu navegador.')
	   }
	}

function deseleccionar (valor, colorvacio) {
	alert(valor)
	if (valor!=-1){
		alert(document.all.productos.rows.length);
		for (i = 0; i<document.all.productos.rows.length; i++){
			alert(document.all.productos.rows(i).children.length)
			if (document.all.productos.rows(i).children.length==7){
				if (document.all.productos.rows(i).id==valor){
					for (j = 0; j < 7; j++) {
						document.all.productos.rows(i).children(j).style.backgroundColor = colorvacio;
					}
				}
			}
		}
	}	
}

var celda_ant;         
celda_ant="";          
function ilumina(celda){ 
	if (celda_ant==""){ 
		celda_ant = celda; 
	} 
	celda_ant.style.backgroundColor=""; 
	celda.style.backgroundColor="#F9CA4B"; 
	celda_ant = celda; 
} 
 
