// System & browser detection
// Copyright 2001 Rui Bastos
// Created 1-1-2001.  Last Updated 12-7-2002.
// In order to use this code you must keep this comments

switch (navigator.platform) {
	case "Win32":
	case "Win16":
		p = "PC"
		break;
	case "MacPPC":
		p = "Mac"
		break;
}

// BROWSER SNIFFING
switch (navigator.appName) {
	case "Netscape":
		ns = true
		ie = false
		break
	case "Microsoft Internet Explorer":
		ie = true
		ns = false
		break
}

if (ns && !document.layers)
	// Netscape 6+
	with (navigator.userAgent) v = parseFloat(slice(lastIndexOf("/")+1))
else {
	msieIndex = navigator.appVersion.indexOf("MSIE") + 5
	v = parseFloat(navigator.appVersion.substr(msieIndex,3))
}

// cross-browser compatibility
if (ns && v >= 6) {
	doc = "document."
	sty = ".style"
	vis = "visible"
	invis = "hidden"
	show = "block"
	hide = "none"
}
if (ie) {
	doc = ""
	sty = ".style"
	vis = "visible"
	invis = "hidden"
	show = "block"
	hide = "none"
}