// ********************** Browser Detect *********************************************
var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{
			string: navigator.userAgent,
			subString: "Chrome",
			identity: "Chrome"
		},
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};

BrowserDetect.init();


// ********************** No Right Mouse click *********************************************

var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")

// ******************************** jemail *************************************************

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original:  William Rozell Jr (elranzer@nospam.com ) -->
<!-- Web Site:  http://www.elranzer.com -->
<!-- Begin
var user;
var domain;
var suffix;
var text;
function jemail(user, domain, suffix, text){
document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">' + text + '</a>');
}

<!--- ************************* Smart Popup Window *********************************** --->

var version4 = (navigator.appVersion.charAt(0) == "4"); 
var popupHandle;
function closePopup() {
	if(popupHandle != null && !popupHandle.closed) popupHandle.close();
}

function displayPopup(position,url,name,height,width,evnt) {
// position=1 POPUP: makes screen display up and/or left, down and/or right 
// depending on where cursor falls and size of window to open
// position=2 CENTER: makes screen fall in center
var height = document.body.clientHeight + 85;
var width = document.body.clientWidth + 10;
var properties = "toolbar = 0, location = 0, height = " + height;
properties = properties + ", width=" + width;
var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
if(navigator.appName == "Microsoft Internet Explorer") {
	screenY = document.body.offsetHeight;
	screenX = window.screen.availWidth;
}
else {
	screenY = window.outerHeight
	screenX = window.outerWidth
}

if(position == 1)	{ // if POPUP not CENTER
	cursorX = evnt.screenX;
	cursorY = evnt.screenY;
	padAmtX = 10;
	padAmtY = 10;
if((cursorY + height + padAmtY) > screenY) {
	// make sizes a negative number to move left/up
	padAmtY = (-30) + (height * -1);
	// if up or to left, make 30 as padding amount
}
if((cursorX + width + padAmtX) > screenX)	{
	padAmtX = (-30) + (width * -1);	
	// if up or to left, make 30 as padding amount
}
if(navigator.appName == "Microsoft Internet Explorer") {
	leftprop = cursorX + padAmtX;
	topprop = cursorY + padAmtY;
}
else {
	leftprop = (cursorX - pageXOffset + padAmtX);
	topprop = (cursorY - pageYOffset + padAmtY);
   }
}
else{
	leftvar = (screenX - width) / 2;
	rightvar = (screenY - height) / 2;
	if(navigator.appName == "Microsoft Internet Explorer") {
	leftprop = leftvar;
	topprop = rightvar;
}
else {
	leftprop = (leftvar - pageXOffset);
	topprop = (rightvar - pageYOffset);
   }
}
if(evnt != null) {
	properties = properties + ", left = " + 0 //leftprop;
	properties = properties + ", top = " + 0 //topprop;
}
closePopup();
popupHandle = open(url,name,properties);
}


<!--- ************************* Highlight Image Script *********************************** --->

/*
Highlight Image Script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=40
}
