//Browser Detection
function Is() {
	var agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.ns = ((agent.indexOf('mozilla') != -1) && (agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1) && (agent.indexOf('opera') == -1) && (agent.indexOf('webtv') == -1));
	this.ns2 = (this.ns && (this.major == 2));
	this.ns3 = (this.ns && (this.major == 3));
	this.ns4 = (this.ns && (this.major == 4));
	this.ns6 = (this.ns && (this.major >= 5));
	this.ie = (agent.indexOf("msie") != -1);
	this.ie3 = (this.ie && (this.major < 4));
	this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5") == -1));
	this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5") != -1));
	this.ieX = (this.ie && !this.ie3 && !this.ie4);
	this.op3 = (agent.indexOf("opera") != -1);
	this.win = (agent.indexOf("win")!=-1);
	this.mac = (agent.indexOf("mac")!=-1);
	this.unix = (agent.indexOf("x11")!=-1);
}


	var is = new Is(); // Create a browser detection object
//Main Nav Rollovers
if (document.images) {
	img1on = new Image();    img1on.src =  "/_img/tnav1_on.gif";
	img2on = new Image();    img2on.src =  "/_img/tnav2_on.gif";
	img3on = new Image();    img3on.src =  "/_img/tnav3_on.gif";
	img4on = new Image();    img4on.src =  "/_img/tnav4_on.gif";
	img5on = new Image();    img5on.src =  "/_img/tnav5_on.gif";
	img6on = new Image();    img6on.src =  "/_img/tnav6_on.gif";
	img7on = new Image();    img7on.src =  "/_img/tnav7_on.gif";
	
	img1off = new Image();   img1off.src =  "/_img/tnav1.gif";
	img2off = new Image();   img2off.src =  "/_img/tnav2.gif";
	img3off = new Image();   img3off.src =  "/_img/tnav3.gif";
	img4off =  new Image();  img4off.src =  "/_img/tnav4.gif";
	img5off =  new Image();  img5off.src =  "/_img/tnav5.gif";
	img6off =  new Image();  img6off.src =  "/_img/tnav6.gif";
	img7off =  new Image();  img7off.src =  "/_img/tnav7.gif";
	}
	function imgOn(imgName) {
		if (document.images) {
				document[imgName].src = eval(imgName + "on.src");
		}
	}
	function imgOff(imgName) {
		if (document.images) {
				document[imgName].src = eval(imgName + "off.src");
		}
	}

if(document.layers){
window.onResize=reloadNow;}
function reloadNow(){
document.location = document.location;
}
//Open Window
function Popper(theURL,winName,features) {
	newWin = window.open(theURL,winName,features);
	
}


<!--//This is to Control Flash
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
  var obj=MM_findObj(objStr);
  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}
//-->

		function popup(url,windName)
		{
			if (url!="choose")
			{
			//window.open(url,windName,'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=767,height=600')
			window.open(url,'MCwin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes')

			}
		}




// POPUP WINDOW
var popwin=null;

function popup(popupURL,popupWidth,popupHeight,popupLeft,popupTop){
	popupLeft=(screen.width-popupWidth)/2;
	popupTop=(screen.height-popupHeight)/2;
	var args='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=NO,resize=no,width='+popupWidth+',height='+popupHeight+',left='+popupLeft+',top='+popupTop;
	if(popwin && !popwin.closed) popwin.close();
	popwin=window.open(popupURL,'',args);
}

// IMAGE ROLLOVER AND PRELOADER
function newImage(arg){
	if(document.images){
		rslt=new Image();
		rslt.src=arg;
		return rslt;
	}
}

function changeImages(){
	if(document.images && (preloadFlag==true)){
		for(var i=0;i<changeImages.arguments.length;i+=2){
		document[changeImages.arguments[i]].src=changeImages.arguments[i+1];
		}
	}
}

// LAUNCH EXTERNAL LINKS THAT ARE XHTML STRICT COMPLIANT
function externalLinks(){
	if(!document.getElementsByTagName) return;
	var anchors=document.getElementsByTagName("a");
	for(var i=0;i<anchors.length;i++){
		var anchor=anchors[i];
		if(anchor.getAttribute("href") &&
			anchor.getAttribute("rel")=="external")
			anchor.target="_blank";
	}
}

// HIGHLIGHT FORM FIELDS WITH FOCUS FOR EASIER USE
var highlightcolor="#c8e9a7"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
	if(which.style&&intended.test(which.tagName)){
		if(ns6&&eventobj.nodeType==3)
			eventobj=eventobj.parentNode.parentNode
			return true
		}
	else
	return false
}

//Function to highlight form element
function highlight(e){
	eventobj=ns6? e.target:event.srcElement
	if(previous!=''){
		if(checkel(previous))
			previous.style.backgroundColor=''
			previous=eventobj
				if(checkel(eventobj))
					eventobj.style.backgroundColor=highlightcolor
				}
		else{
	if(checkel(eventobj))
		eventobj.style.backgroundColor=highlightcolor
		previous=eventobj
	}
}

function noEnter(e) {

	// This limitation should only apply to text fields, 
	// not textareas which do not submit a form via enter 
	// and in fact need to allow returns in their input
	if ( window.event ) {
		if ( window.event.srcElement.type == 'text' || window.event.srcElement.type == 'password' ) {
			return window.event.keyCode != 13;
		} else {
			return true;
		}
	}

}
// REMOVE DOTTED UNDERLINES FROM IMAGES
function customImageLinks(){
	if(!document.getElementsByTagName) return;
	var anchors=document.getElementsByTagName('a');
	for(var i=0;i<anchors.length;i++){
		anchor=anchors[i];
		var images=anchor.getElementsByTagName('img');
		if(images[0]!=null){
			anchor.className+=anchor.className?" image":"image";
		}
	}
	if(window.addEventListener) window.addEventListener("load",customImageLinks,false);
}

// INITIATE IMAGE LINKS NO BORDER
window.onload=function(){
	customImageLinks();
}
