function fnOver(obj){
	if(obj.className.indexOf("_page")>=0){}
	else{
		obj.className=obj.className+'_over';
	}
}
function fnOut(obj){
	if(obj.className.indexOf("_page")>=0){}
	else{
		obj.className=obj.className.substr(0,obj.className.length-5);
	}
}
function fnClick(obj){
	window.location=obj;
}

function checkEmptyFeedback_form(thisform){
	var theMessage = "Fel i formuläret: \n-----------------------------------\n";
    var noErrors = theMessage
	with(thisform){
		// make sure field is not blank
		if (msg.value=="") {
			theMessage = theMessage + "\n --> Tomt inlägg!";
		}
		// If no errors, submit the form
		if (theMessage == noErrors) {
			return true;

		} else {

			// If errors were found, show alert message
			alert(theMessage);
			return false;
		}
	}
}



function getObject(obj) {
	var theObj;
	if(document.all) {
		if(typeof obj=="string") {
			return document.all(obj);
		} else {
			return obj.style;
		}
	}
	if(document.getElementById) {
		if(typeof obj=="string") {
			return document.getElementById(obj);
		} else {
			return obj.style;
		}
	}
	return null;
}

function Contar(entrada,salida,texto,caracteres) {
	var entradaObj=getObject(entrada);
	var salidaObj=getObject(salida);
	var longitud=caracteres - entradaObj.value.length;
	if(longitud <= 0) {
		longitud=0;
		texto='<span class="disable">&nbsp;'+texto+'&nbsp;</span>';
		entradaObj.value=entradaObj.value.substr(0,caracteres);
	}
	salidaObj.innerHTML = texto.replace("{CHAR}",longitud);
}