var navIE6  = false;
var navIE55 = false;
var navIE5  = false;
var navNS6  = false;
var navNID  = false;
if (document.all) {
	if (document.fireEvent && document.createComment) { navIE6 = true; } else
	if (document.fireEvent && !document.createComment) { navIE55 = true; } else
	if (!document.fireEvent) { navIE5 = true; }
} else {
	if (document.getElementById) { navNS6 = true; } else { navNID = true; }
}
var message = "© 2010, Dental Speed Graph. All rights reserved.\nDireitos autorais reservados. Reprodução proibida.";
function doClick(e) {
	if (navNS6) {
		if ((e.ctrlKey || e.altKey) && e.which == 1) {
			alert(message);
			return false;
		} else if (e.shiftKey && e.which == 1){
			//top.location = 'protecao.php?pagina=' + self.location.href;
			alert(message);
		}
	} else {
		if ((event.ctrlKey || event.altKey || event.shiftKey) && event.button == 0) {
			alert(message);
			return false;
		}
	}
}
function doRightClick(e){
	if (navNS6) {
		if (e.which == 2 || e.which == 3){
			alert(message);
			return false;
		}
	} else {
		if (event.button == 2) {
			alert(message);
			return false;
		}
	}
}
if (navNS6) {
	document.oncontextmenu = new Function("alert(message);return false");
	document.onclick = doClick;
} else {
	document.onmousedown = doRightClick;
	document.onclick = doClick;
}

function addFav(){
    var url      = 'http://www.speedgraph.com.br';
    var title    = 'Speed Graph';
    if (window.sidebar) window.sidebar.addPanel(title, url,'');
    else if(window.opera && window.print){
        var mbm = document.createElement('a');
        mbm.setAttribute('rel','sidebar');
        mbm.setAttribute('href',url);
        mbm.setAttribute('title',title);
        mbm.click();
    }
    else if(document.all){window.external.AddFavorite(url, title);}
}

function addIniHome(obj) {
	var url      = 'http://www.speedgraph.com.br';
	obj.style.behavior='url(#default#homepage)'; 
	obj.setHomePage(url);
}

$(function () {
	if($('.campoLogin').height() > 0) {
		$('.carrinho').css('display', 'none');
	}
});
