<!-- //

// Please note: if you are viewing this code, you probably already know
// how to view source, copy/paste etc. If this is the case, you should
// also know about copyright. Please get your own copy written. Thanks!
// The code you are welcome to use. This is IE only- not tested anywhere
// else, though much of it will work. Good luck to you!


//to trap right click button 
function right(e) {
	/*if (event.button == 2 || event.button == 3) {
		// this we must modify to produce a faked version of the right-click menu.
		if(document.hrefValue!=null && document.hrefValue!='undefined') {
			getMouseXY()
			var dx=document._xmouse;
			var dy=document._ymouse;	
			fShowRightClickMenu(e,dx,dy, document.hrefValue);
		}
		return false;
	}
	return true;*/
}
// to trap Cntrl, Alt and that funny menu button next to the r.h.s cntrl button -
// but doesnt mess with cntrl f5!! Yippee!
function key(k) {
	/*if(event.keyCode==17 || event.keyCode==18 || event.keyCode==93) {
		return false;
		}
	return true;*/
}
// Prevent hightlight copy and paste
function highlight(){
	/*return false;*/
}
// With thanks to Andy Smith - http://weblogs.asp.net/asmith/archive/2003/10/06/30744.aspx
function fAddEventHandler(sTargetElem,sEventName,sHandlerObj) { 
  /*if ( sTargetElem.addEventListener ) { 
    sTargetElem.addEventListener(sEventName, function(e){sTargetElem[sHandlerObj](e);}, false);
  } else { 
    var originalHandler = sTargetElem["on" + sEventName]; 
    if ( originalHandler ) { 
      sTargetElem["on" + sEventName] = function(e){originalHandler(e);sTargetElem[sHandlerObj](e);}; 
    } else { 
      sTargetElem["on" + sEventName] = sTargetElem[sHandlerObj]; 
    } 
  } */
}
// some usefull functions we will attach to events
function fOnMouseOver(e){/*
	// set the global href value
	document.hrefValue=this.href*/
}
function fOnMouseOut(e){/*
	// set the global href value to null
	document.hrefValue=null;*/
}
function fOnMouseOverRCM(e){/*
	// clear the timeout
	clearTimeout(this.tid)*/
}
function fOnMouseOutRCM(e){/*
	// hide the div after 500 millisecond
	this.tid = setTimeout("fHideRightClickMenu()", 500);*/
}
function fHideRightClickMenu(){/*
	// hides menu, sets it off screen
	var RCM = document.getElementById("RightClickMenu")
	if(RCM!=null && RCM !="undefined") {
		RCM.style.position="absolute";
		RCM.style.left="-500";
		RCM.style.top="-500"
		RCM.style.display = 'block'; 
	}*/
}
function fShowRightClickMenu(e,x,y,hrefValue){/*
	// sets the href to the value of the one that the mouse is over
	document.getElementById("RightClickMenuOpen").href=hrefValue
	document.getElementById("RightClickMenuOpenNew").href=hrefValue
	// add slight offset as we have trouble with mouseovers
	var RCM = document.getElementById("RightClickMenu")
	if(RCM!=null && RCM !="undefined") {
   		RCM.style.left =  Number(x-2) + "px"; 
   		RCM.style.top = Number(y-2) + "px"; 
    	RCM.style.display = 'block'; 	
	}

   	return false; */
}

function fAddLinkHandlers(){/*
	fHideRightClickMenu()
	// we need to know which <a href> the mouse is over, and prepare for a click..
	// but not for those in the fake select boxes and main nav, as it causes troubles.
	var aLinks=document.getElementsByTagName("a");	
	for(var i=0; i<aLinks.length; i++) {
		aLinks[i].fOnMouseOverHandler=fOnMouseOver;
		aLinks[i].fOnMouseOutHandler=fOnMouseOut;
		fAddEventHandler(aLinks[i],"mouseover","fOnMouseOverHandler"); 
		fAddEventHandler(aLinks[i],"mouseout","fOnMouseOutHandler"); 
		}
	
	var ddNav = getElementsByClassName(document, "*", "dropDown")
	
	for(var i=0; i<ddNav.length; i++) {
		aLinks=ddNav[i].getElementsByTagName("a");

		for(var j=0; j<aLinks.length; j++) {
			aLinks[j].fOnMouseOverHandler="";
			aLinks[j].fOnMouseOutHandler="";
			}
		}

	// timeout settings for the right click menu
	var RCM = document.getElementById("RightClickMenu")
	if(RCM!=null || RCM!="undefined") {
		RCM.fOnMouseOverHandler=fOnMouseOverRCM;
		RCM.fOnMouseOutHandler=fOnMouseOutRCM;
		fAddEventHandler(RCM,"mouseover","fOnMouseOverHandler");
		fAddEventHandler(RCM,"mouseout","fOnMouseOutHandler");
		}

	return false*/
}

function getElementsByClassName(oElm, strTagName, strClassName){/*
	// Original by Jonathan Snook, http://www.snook.ca/jonathan
    // Add-ons by Robert Nyman, http://www.robertnyman.com
	// Modded by Anthony Buckland, http://www.about-blank.co.za
    var arrElements = (strTagName == "*" && document.all) ? document.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
        oElement = arrElements[i];      
        if(oRegExp.test(oElement.className)){
            arrReturnElements.push(oElement);
        }   
    }
    return (arrReturnElements)*/
}

var tempX = 0
var tempY = 0
function getMouseXY(e) {/*
	// silly IE 6 with an HTML 4 doctype doesnot see document.body.scrollLeft, it uses document.documentElement.scrollLeft. Who knows what IE7 will do?
  	tempX = event.clientX + document.documentElement.scrollLeft;
  	tempY = event.clientY + document.documentElement.scrollTop;
  	// catch possible negative values in NS4
  	if (tempX < 0){tempX = 0}
  	if (tempY < 0){tempY = 0}  
  	// show the position values in the form named Show
  	// in the text fields named MouseX and MouseY
  	document._xmouse = tempX
  	document._ymouse = tempY
  	return true
	}

// apply it to IE browers
if(navigator.appVersion.indexOf("MSIE") != -1) {
	document.onkeydown=key;  
	document.onmousedown=right;
	document.onmouseup=right;
	document.ondragstart=highlight;
	document.onselectstart=highlight;
	document.oncontextmenu=highlight;
	// document.onmousemove = getMouseXY;*/
}

//if (window.attachEvent) window.attachEvent("onload", fAddLinkHandlers);
// -->