function right(e) 
{
	var msg = "Reservado Teleadhesivo.com.";
	if (navigator.appName == 'Netscape' && e.which == 3) 
	{
		alert(msg); // Delete this line to disable but not alert user
		return false;
	}
	else
		if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) 
		{
			alert(msg); // Delete this line to disable but not alert user
			return false;
		}
	return true;
}

//document.onmousedown = right;

function validar(f) {
	if ((f.idioma[0].checked) || (f.idioma[1].checked) || (f.idioma[2].checked) || (f.idioma[3].checked) || (f.idioma[4].checked)) {
        return 1;
	} else {	alert("Selecciona tu idioma / Select your language");
		return 0;
	}
}

function CreateBookmarkLink() {
    titulo="Teleadhesvo.com - " + window.document.title;
    url="http://www.teleadhesivo.com/";
    if (window.sidebar) {
        window.sidebar.addPanel(titulo, url,"");
    } else if( window.external ) {
        window.external.AddFavorite( url, titulo); 
    } else if(window.opera && window.print) {
        window.external.AddFavorite( url, titulo); 
    }
}

function setHomepage(obj) {
    obj.style.behavior = "url(#default#homepage)";
    obj.setHomePage("http://www.teleadhesivo.com");
}

function selectColor(idColor) {
    if (idColor == "27" || idColor == "28" || idColor == "32" || idColor == "33" || idColor == "35") {
        //Nomes brillo
        document.getElementById("mate_no").disabled = "";
        document.getElementById("mate_no").checked = "checked";
        document.getElementById("mate_si").disabled = "disabled";
    } else if (idColor == "34" || idColor == "30" || idColor == "31") {
        //Nomes mate
        document.getElementById("mate_si").disabled = "";
        document.getElementById("mate_si").checked = "checked";
        document.getElementById("mate_no").disabled = "disabled";
    } else {
        document.getElementById("mate_si").disabled = "";
        document.getElementById("mate_no").disabled = "";
    }
}


function loadFlash(sSwf, sIdDiv, iWidth, iHeight, oFlashVars, oParams, oAttributes) {
    window.onload = function() {
        document.getElementById("barraComprar").style.display = "none";
        document.getElementById("oldDetail").style.display = "none";
        swfobject.embedSWF(sSwf, sIdDiv, iWidth, iHeight, "9.0.0", "swf/expressInstall.swf", oFlashVars, oParams, oAttributes);
    };
}

function instruccionesFotoMurales() {
    w = window.open("instruccionesFotomurales.asp", "Teleadhesivo", "toolbar=no,location=no,menubar=no,directories=no,resizable=no,scrollbars=no,width=640,height=380");
}

function zoomFotoMural(sRef) {
	w = window.open("imagen.asp?Imagen=images/products/zoom/" + sRef + ".jpg", 'ImagenAmpliada', 'width=10,height=10,status=no,toolbars=no,location=no,menubar=no,personalbar=no,resizable=yes,scrollbars=yes');
}

function cancelEvent(objEvent) {
    objEvent.cancelBubble = true;
    objEvent.returnValue = false;

    return false;
}

function openNewsletter(e) {
	$.blockUI({ 
		message: $("#newsletterSignUpIframe"),
		css: { 
			border: 'none', 
			padding: '5px', 
			backgroundColor: '#fff', 
			'-webkit-border-radius': '10px', 
			'-moz-border-radius': '10px', 
			opacity: .9, 
			color: '#fff',
			width: '290px'
		}
	});

	return cancelEvent(e);
}

function closeNewsletter(e) {
	$.unblockUI();
	return cancelEvent(e);
}

window.onload = function() {
    if (document.all && document.getElementById("layoutr1")) {
        if (document.getElementById("layoutr1").clientHeight < 800) {
            document.getElementById("layoutr1").style.height = "800px";
        }
    }
};