function hov(loc,cls) {
	if(loc.className)
	loc.className=cls;
}

function relocateUser(thisAction,thisForm) {
	if (arguments.length == 2) {
		var thisForm = document.forms[thisForm];
	
		if (arguments.length == 3) {
			thisForm.thisAnchor.value = arguments[2];
		} 
		
		if (thisForm.thisAction && thisForm.thisAction.disabled == false) {
			thisForm.thisAction.value = thisAction;
		} else if (thisForm.thisBody) {
			thisForm.thisBody.value = thisAction;
		} 
		thisForm.submit();
	} else {
		document.location.href = thisAction;
	}
}

function goAnchor(thisAnchor) {
	location.hash = thisAnchor;
}


function getStyleObject(objectId) {
    
    if(document.getElementById && document.getElementById(objectId)) {		// cross-browser function to get an object's style object given its id
	
	return document.getElementById(objectId).style;							// W3C DOM
    } else if (document.all && document.all(objectId)) {
	
	return document.all(objectId).style;									// MSIE 4 DOM
    } else if (document.layers && document.layers[objectId]) {
	
	return document.layers[objectId];										// NN 4 DOM.. note: this won't find nested layers
    } else {
	return false;
    }
} 

function hideThis(objectID) {
	var styleObject = getStyleObject(objectID);
	if(styleObject) {
		styleObject.display = "none";
		return true;
	} else {
		return false;
	}
}

function loopHide() {
	for(i=0; i<arguments.length; i++) {
		hideThis(arguments[i]);
	}
}

function showThis(objectID) {
	var styleObject = getStyleObject(objectID);
	if(styleObject) {
		styleObject.display = "";
		} else {
		return false;
	}
}

function disableButton(thisButton, thisForm) {
	thisForm = document.forms[thisForm];
	thisButton = thisForm[thisButton];
	
	if(thisButton) {
		thisButton.disabled = true;
		thisButton.className = 'button_dis';
	}
}

function disableButtons(thisForm) {
	var arrayElements = disableButtons.arguments;
	var numberArrayElements = arrayElements.length;
	var thisButton = new Array(numberArrayElements);
	
	for (i=1; i<numberArrayElements; i++) {
		var thisButton = arrayElements[i];
		disableButton(thisButton,thisForm);
	}
}

function enableButton(thisButton, thisForm) {										
	document.forms[thisForm][thisButton].disabled = false;
	document.forms[thisForm][thisButton].className = 'button_a';
}
