function abrirCalendario(cadena)
{
	window.open('http://www.Joyaclick.com/vistas/calendario.aspx?txt=' + cadena, 'Calendario', 'width=250,height=190,resizable=yes');
}


//function getWindowHeight() {
//	var windowHeight = 0;
//	if (typeof(window.innerHeight) == 'number') {
//		windowHeight = window.innerHeight;
//	}
//	else {
//		if (document.documentElement && document.documentElement.clientHeight) {
//			windowHeight = document.documentElement.clientHeight;
//		}
//		else {
//			if (document.body && document.body.clientHeight) {
//				windowHeight = document.body.clientHeight;
//			}
//		}
//	}
//	return windowHeight;
//}
//function getWindowWidth() {
//	var windowWidth = 0;
//	if (typeof(window.innerWidth) == 'number') {
//		windowWidth = window.innerWidth;
//	}
//	else {
//		if (document.documentElement && document.documentElement.clientWidth) {
//			windowWidth = document.documentElement.clientWidth;
//		}
//		else {
//			if (document.body && document.body.clientWidth) {
//				windowWidth = document.body.clientWidth;
//			}
//		}
//	}
//	return windowWidth;
//}
//function setFooter() {
//	if (document.getElementById) {
//		var windowHeight = getWindowHeight();
//		if (windowHeight > 0) {
//			var contentHeight = document.getElementById('content').offsetHeight;
//			var footerElement = document.getElementById('footer');
//			//var tableElement = document.getElementById('tbl_central');
//			var footerHeight  = footerElement.offsetHeight;
//			if (windowHeight - (contentHeight + footerHeight) >= 0) {
//				footerElement.style.position = 'relative';
//				footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
//			}
//			else {
//				footerElement.style.position = 'static';
//			}
//		}
//	}
//}

//window.onload = function() {
//	setFooter();
//}
//window.onresize = function() {
//	setFooter();
//}

function ieFix(topLevel) 
{
var ua = navigator.userAgent;
var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
var isMSIE5_5 = isMSIE && (ua.indexOf('MSIE 5.5') != -1);
var isMSIE6 = isMSIE && (ua.indexOf('MSIE 6.0') != -1);

	if (isMSIE5_5 || isMSIE6) 
	{
	document.getElementById(topLevel).innerHTML = document.getElementById(topLevel).innerHTML.replace (/<ul/gi,"<table cellpadding='0' cellspacing='0'><tr><td><ul").replace (/<\/ul>/gi,"</ul></td></tr></table></a>");
	for (i=0;i<document.getElementsByTagName("li").length; i++) 
		{
		if (document.getElementsByTagName("li").item(i).className == "sub")
			{
			document.getElementsByTagName("li").item(i).innerHTML = document.getElementsByTagName("li").item(i).innerHTML.replace(/<\/a>/i,"");
			}
		}
	}
}



	// deteccion del navegador.
	
	function DetectorNavegador() {
	  this.NS4 = document.layers;
	  this.IE4 = document.all;
	  this.DOM = document.getElementById;
	}
	
	var soporta = new DetectorNavegador();
	

    
function ClickOpinion(Bloque)
{

	// abrimos o cerramos la opinion
	
	if (soporta.NS4)
	{
		if (document["Bloque"].visibility == "visible")
		{
			document["Bloque"].visibility = "hidden";
			document["Bloque"].display = "none";
			//eval('document.' + 'img_' + Bloque + '.src = "'+carpeta+'imagenes/nodo_img.gif"');
		}
		else
		{
			document["Bloque"].visibility = "visible";
			document["Bloque"].display = "block";
			//eval('document.' + 'img_' + Bloque + '.src = "'+carpeta+'imagenes/nodo_img_des.gif"');
		}
	}
	else
	{
		if (soporta.IE4)
		{
			if (document.all[Bloque].style.visibility == "visible")
			{
				document.all[Bloque].style.visibility = "hidden";
				document.all[Bloque].style.display = "none";
				//eval('document.' + 'img_' + Bloque + '.src = "'+carpeta+'imagenes/nodo_img.gif"');
			}
			else
			{
				document.all[Bloque].style.visibility = "visible";
				document.all[Bloque].style.display = "block";
				//eval('document.' + 'img_' + Bloque + '.src = "'+carpeta+'imagenes/nodo_img_des.gif"');
			}
		}
		else
		{
			if (document.getElementById(Bloque).style.visibility == "visible")
			{
				document.getElementById(Bloque).style.visibility = "hidden";
				document.getElementById(Bloque).style.display = "none";
				//eval('document.' + 'img_' + Bloque + '.src = "'+carpeta+'imagenes/nodo_img.gif"');
			}
			else
			{
				document.getElementById(Bloque).style.visibility = "visible";
				document.getElementById(Bloque).style.display = "block";
				//eval('document.' + 'img_' + Bloque + '.src = "'+carpeta+'imagenes/nodo_img_des.gif"');
			}
		}
	}
}


function OcultaCapas()
{

	// abrimos o cerramos la opinion
	
	if (soporta.NS4)
	{
		document["div_empresa"].visibility = "hidden";
		document["div_empresa"].display = "none";
		document["div_productos"].visibility = "hidden";
		document["div_productos"].display = "none";
	}
	else
	{
		if (soporta.IE4)
		{
				document.all["div_empresa"].style.visibility = "hidden";
				document.all["div_empresa"].style.display = "none";
				document.all["div_productos"].style.visibility = "hidden";
				document.all["div_productos"].style.display = "none";
		}
		else
		{
				document.getElementById("div_empresa").style.visibility = "hidden";
				document.getElementById("div_empresa").style.display = "none";
				document.getElementById("div_productos").style.visibility = "hidden";
				document.getElementById("div_productos").style.display = "none";
		}
	}
}



var sMensaje = 'Boton derecho deshabilitado. \nTodos los derechos reservados Joyaclick.com';

function anularBotonDerecho(e) {

    if (navigator.appName == 'Netscape'  && (e.which == 3 || e.which ==    2)){       
        alert(sMensaje);       
        return false;    
    } else if (navigator.appName == 'Microsoft Internet Explorer'  && (event.button    == 2)) {       
        alert(sMensaje);     
    }   
 }

document.onmousedown=anularBotonDerecho;   
document.oncontextmenu=new Function("return false");

 





