/**
 *	General JavaScript methods
 *	for LearnToSalsa.com
 *	by Kevin Lynn Brown
 *	Copyright 2001 All rights reserved
 */

// Compatibility
var NETSCAPE = (navigator.appName == "Netscape") ? true:false;
var MSIE = (navigator.userAgent.indexOf("MSIE") != -1) ? true:false;

/*
function redirect() {
	var filename = top.location.href;
	if (top.location.href.indexOf("/") != -1) {
		filename = top.location.href.substring(top.location.href.lastIndexOf("/"));
	}
	else if (top.location.href.indexOf("\\") != -1) {
		filename = top.location.href.substring(top.location.href.lastIndexOf("\\"));
	}
	if (filename != "/" 
			&& filename != "/learntosalsa.html"	
			&& filename != "\\learntosalsa.html") {
		top.location.href = "learntosalsa.html";
	}
}
redirect();
*/

function closeDiv(which) {
	if (MSIE) {
		document.all[which].style.visibility = "hidden";
	}
	else if (NETSCAPE) {
		document.layers[which].visibility = "hidden";
	}
}

function handleContextMenu(evnt) {
	if (NETSCAPE && evnt.which == 3) {
		return false; 
	}
	else if (MSIE && event.button == 2) {
		return false; 
	}
	else {
		return true;
	}
}

// MSIE 4
//window.document.onclick = handleContextMenu;

