	
	/************************************************
	* Addlisteners
	************************************************/
	function addlisteners(){
		if(!document.getElementsByTagName || !document.getElementById) return;
		//addEvent({OBJ}, '{EVENT}', {SOMEFUNCTION}, false);
				
		if ( typeof document.forms['information'] != 'undefined' ){
			ValidateForm.init();
		}
		//startList(); // If using dropdown initialize menu
	}
	
	/**************************************************
	* Adds event triggers to html elements unobtrusivly
	**************************************************/
	function addEvent(elm, evType, fn, useCapture){
		if(elm.addEventListener){
			elm.addEventListener(evType, fn, useCapture);
			return true;
		} else if(elm.attachEvent){
			elm['on' + evType] = fn;
		}
	}

	/************************************************
	* Set up dropdown menu functionality for IE
	***********************************************
	startList = function() {
		if (document.all&&document.getElementById) {
			navRoot = document.getElementById("sitenav");
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}
	}*/

	/************************************************
	* Used in conjunction with the Sarissa library
	* getUrl('someurl.php', someFunction);
	************************************************/
	function getUrl(url, fn, extra){
		var xmlhttp = Sarissa.getXmlHttpRequest();
		xmlhttp.open('GET', url, true);
		
		xmlhttp.onreadystatechange = function(){
			if(xmlhttp.readyState == 4){
				fn(xmlhttp.responseText, extra);
			}
		};
		xmlhttp.send(null);
	}
	
	// Add listeners on page load
	addEvent(window, 'load', addlisteners, false);
	
	/******************************************
	* Select box auto jump
	******************************************/
	function JumpURL(selection) {
		var tempIndex, selectedURL;
		tempIndex = selection.selectedIndex;
		selectedURL = selection.options[tempIndex].value;
		window.top.location.href = selectedURL;
	}


	
	/* PHOTO */
	function viewPhoto(id,category){
		getUrl('http://www.thelenockersonline.com/ajax/view_photo.ajax.php?id='+id+'&cat='+category, loadPhoto);
	}
	
	function loadPhoto(xml){
		if ( xml!='' ){
			closePhotoView();
			var doc_body = document.body;
			
			var new_div = document.createElement("DIV");
			doc_body.appendChild(new_div);
			new_div.id = 'view_photo';
			new_div.innerHTML = xml;
		}
		else {
			alert('Failure!');
		}
	}
	
	function closePhotoView(){
		var doc_body = document.body;
		var view_photo = document.getElementById('view_photo');
		if ( view_photo && typeof view_photo != 'undefined' ){
			doc_body.removeChild(view_photo);
		}
	}

