function disableSelect() {
	document.onselectstart = function () { return false; } // ie
	document.onmousedown = function () { return false; } // mozilla
}
//Event.observe(window, 'load', disableSelect);


//main navigation 
categoryHover = function() {
	
	var className = "hover",
	pattern = new RegExp('(^|\\s+)' + className + '(\\s+|$)');
	
	if ($('categories')){
		var lis = $('categories').getElementsByTagName("LI");
		for (var i=0; i<lis.length; i++) {
			lis[i].onmouseover=function() {
				this.className += ' ' + className;
			}
			lis[i].onmouseout=function() {
				//this.className="";
				this.className = this.className.replace(pattern, ' ');
			}
		}
	}
}
Event.observe(window, 'load', categoryHover);

function popUp(URL) {
	window.open( URL, "myWindow", "status = 1, height = 600, width = 700, resizable = yes" )
}


function popUpPrint(URL) {
	window.open( URL, "myWindow", "status = 1, height = 600, width = 700, toolbar=no, scrollbars=yes, menubar=no, resizable = yes" )	
}

function fade(el) {
	el.style.opacity =  0.5; 
	el.style.MozOpacity =  0.5; 	
	el.style.KhtmlOpacity =  0.5; 
	el.style.filter = "alpha(opacity=50)";
}

function unfade(el) {
	el.style.opacity =  1; 
	el.style.MozOpacity =  1; 	
	el.style.KhtmlOpacity =  1; 
	el.style.filter = "alpha(opacity=100)";
}


function emptyFormFields(el,val) {
	if (el.value == val ) {
		el.value = '';
	}	
}

function fillFormFields(el,val) {
	if (el.value == '' ) {
		el.value = val;
	}
}
