<!-- // BLOCK ERROR
function blockError(){return true;}
window.onerror = blockError;
// -->

// --------------------- Begin IMAGE ROLLOVER script-----------------------

function movepic(img_name,img_src) {
document[img_name].src=img_src;
}

// ----------- start NO SPAM CONTACT scripting --------------

function em(_u,_n)
{	var _l   = _u + "@" + "tritecinvestigations.com";
	document.write("<a href='mailto:"+_l+"?subject=Inquiry from website footer' CLASS='footer'>"+_n+"</a>");  }	
	
function em1(_u,_n)
{	var _l   = _u + "@" + "tritecinvestigations.com";
	document.write("<a href='mailto:"+_l+"?subject=Inquiry from website'>"+_n+"</a>");  }	
	
function pokeName(_f,_n,_d) {
  _f.elements["recipient"].value= _n + "@" + _d;
}

// ----------- start SELF-SIZING BROWSER-FRIENDLY CHILD WINDOW scripting --------------

/* Created by: Crazy Merlin :
http://nl.internet.com/ct.html?rtr=on&s=1,282v,1,83o,6n0z,lizu,hryg
Lee Underwood :
http://nl.internet.com/ct.html?rtr=on&s=1,282v,1,jlzb,dlcr,lizu,hryg
*/
function newWin(link,w,h,s,r,l,t) {
   // the next two lines should all be on one line with no space
     
   var winFeatures = 'width=' + w + ',height=' + h + ',scrollbars=' + s + ',resizable=' + r + ',left=' + l + ',top=' + t ;
   var bookWindow = window.open(link, "", winFeatures); }

// -------------------- Begin Form Value Delete -----------------------------

/*
Clear default form value script- By Ada Shimar (ada@chalktv.com)
Featured on Website Abstraction (http://wsabstract.com)
Visit wsabstract.com for 400+ free scripts!
*/

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

// -------------------- start FAVORITES POPUP scripting -----------------------------

function addbookmark()
{
bookmarkurl="http://www.tritecinvestigations.com/"
bookmarktitle="Tritec Investigations"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

// -------------------- end FAVORITES POPUP scripting -----------------------------

//  ----------------- begin right-click lockout script --------------------- 
//  Original:  Martin Webb (martin@irt.org) 

//  This script and many more are available free online at 
//  The JavaScript Source!! http://javascript.internet.com 


function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Sorry, you do not have permission to right click.");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;

//  -----------------end right-click lockout script--------------------- 

//  ----------------- Begin navigation scripting --------------------------  

// A cascading menu script by Fredrik Fridsten 2000 (c)
// Feel free to use this, but please mention in a comment in the code.

// To configure the script:
// Change the nom value to the number of menus that you want to use
// Note: Always make sure that this is correct, otherwise you might get a javascript error.

// The phrases "images/opened.gif" and "images/closed.gif" should be referring to the
// pictures you might use.
// If you don't want to use images, just remove the picopen and picclose functions.
// Also remove the lines in the toggle function that refer to those.

// The input variables to the toggle function are the number of the submenu to open/close,
// starting with 1, and the number of pixels to move the objects below.
// For example toggle(2,60) opens/closes the second submenu and moves the objects below 60 pixels.

var nom =13; // Number of menus

var tits = new Array(); // An array for the title objects
var subs = new Array(); // An array for the submenu objects
var lastn;
var lastmove;
var isIE4;
var isNav4;
var isNav6;

function setbrowser() {
	if (navigator.appVersion.charAt(0) == "4") {
		if (navigator.appName.indexOf("Explorer") >= 0) {
			isIE4 = true;
		}
		else {
			isNav4 = true;
		}
	}
	else if (navigator.appVersion.charAt(0) > "4") {
		isNav6 = true;
	}
	if (isNav4) { // Setting the visibility for NN and IE
		visible = 'show';
		hidden = 'hide';
	}
	else if (isIE4) {
		visible = 'visible';
		hidden = 'hidden';
	}
	else if (isNav6) {
		visible = 'visible';
		hidden = 'hidden';
	}
}


for (var i = 1; i <= nom; i++) { // Fills the arrays with title and submenu objects
	tits[i] = ('title' + i);
	subs[i] = ('submenu' +i);
}

// A couple of small functions that changes the image by the clicked menu
function picopen(n) {
	title = ('title' + n);
	pic = ('pic' + n);
	if (isNav4) {
		document.layers[title].document.images[pic].src = "images/opened.gif";
	}
	else if (isIE4) {
		document.all(pic).src = "images/opened.gif";
	}
	else if (isNav6) {
		document.getElementById(pic).src = "images/opened.gif";
	}
}

function picclose(n) {
	title = ('title' + n);
	pic = ('pic' + n);
	if (isNav4) {
		document.layers[title].document.images[pic].src = "images/closed.gif";
	}
	else if (isIE4) {
		document.all(pic).src = "images/closed.gif";
	}
	else if (isNav6) {
		document.getElementById(pic).src = "images/closed.gif";
	}
}

// The main script for toggling the selected menu
// Input variables:
// n = the number of the submenu to show/hide
// move = the number of pixels for moving the objects below

lastn = (nom + 1);
lastmove = 0;

function lasttoggle(n,move) {
	if (n <= nom) {
		menu = ('submenu' + n);
		if (isNav4) {
			submenu = document.layers[menu];
		}
		else if (isIE4) {
			submenu = document.all(menu).style;
		}
		else if (isNav6) {
			submenu = document.getElementById(menu).style;
		}
		if (submenu.visibility.toLowerCase() == visible) {
			submenu.visibility = hidden;
			picclose(n); // Remove this if you don't use pictures
			for (var i = (n+1); i <= nom; i++) {
				if (isNav4) {
					var tit = document.layers[tits[i]];
					var subm = document.layers[subs[i]];
				}
				else if (isIE4) {
					var tit = document.all(tits[i]).style;
					var subm = document.all(subs[i]).style;
				}
				else if (isNav6) {
					var tit = document.getElementById(tits[i]).style;
					var subm = document.getElementById(subs[i]).style;
				}
				tit.top = (parseInt(tit.top) - move);
				subm.top = (parseInt(subm.top) - move);
			}
		}
	}
}

function toggle(n,move) {
	var menu = ('submenu' + n);
	if (isNav4) {
		submenu = document.layers[menu];
	}
	else if (isIE4) {
		submenu = document.all(menu).style;
	}
	else if (isNav6) {
		submenu = document.getElementById(menu).style;
	}
	if (submenu.visibility.toLowerCase() == visible) {
		submenu.visibility = hidden;
		picclose(n); // Remove this if you don't use pictures
		for (var i = (n+1); i <= nom; i++) {
			if (isNav4) {
				var tit = document.layers[tits[i]];
				var subm = document.layers[subs[i]];
			}
			else if (isIE4) {
				var tit = document.all(tits[i]).style;
				var subm = document.all(subs[i]).style;
			}
			else if (isNav6) {
				var tit = document.getElementById(tits[i]).style;
				var subm = document.getElementById(subs[i]).style;
			}
			tit.top = (parseInt(tit.top) - move);
			subm.top = (parseInt(subm.top) - move);
		}
	}
	else {
		submenu.visibility = visible;
		picopen(n); // Remove this if you don't use pictures
		if (lastn != n) {
			lasttoggle(lastn,lastmove);
		}
		for (var i = (n+1); i <= nom; i++) {
			if (isNav4) {
				var tit = document.layers[tits[i]];
				var subm = document.layers[subs[i]];
			}
			else if (isIE4) {
				var tit = document.all(tits[i]).style;
				var subm = document.all(subs[i]).style;
			}
			else if (isNav6) {
				var tit = document.getElementById(tits[i]).style;
				var subm = document.getElementById(subs[i]).style;
			}
			tit.top = (parseInt(tit.top) + move);
			subm.top = (parseInt(subm.top) + move);
		}
	}
	lastn = n;
	lastmove = move;
}

function hilite(object) {
	if (isNav4) {
		document.layers[object].bgColor = "#ff0000";
	}
	else if (isIE4) {
		document.all(object).style.backgroundColor = "#ff0000";
	}
	else if (isNav6) {
		document.getElementById(object).style.bgColor = "#ff0000";
	}
}

function lolite(object) {
	if (isNav4) {
		document.layers[object].bgColor = "#ffff00";
	}
	else if (isIE4) {
		document.all(object).style.backgroundColor = "#ffff00";
	}
	else if (isNav6) {
		document.getElementById(object).style.bgColor = "#ffff00";
	}
}

function init() {
	setbrowser();
}


//  ------------------ End navigation scripting ---------------------------  

