function mouseover(obj)
{
	obj.className += "Hover";
}

function mouseout(obj)
{
	obj.className = obj.className.substring(0,obj.className.length - 5);
}

function bytsida(sida)
{
	window.location=sida;
}

function warning(warningText)
		{
		    if(confirm(warningText))
		        return true;
		    else
		        return false;
		}

 function checkMaxLen(obj)
{
    var mlength=obj.getAttribute? parseInt(obj.getAttribute('maxlength')) : '';
    
    if(isNaN(mlength))
        mlength = 500;

    if (obj.getAttribute && obj.value.length>mlength)
    {
        alert('Max ' + mlength + ' tecken är tillåtna i detta fält. Överstigande tecken har tagits bort');
        obj.value=obj.value.substring(0,mlength);
    }
}

function uppdateraAnsokan()
{
    return(confirm('Du har redan en ansökan registrerad på ärendet. Vill du uppdatera?'));
}

function uppdateraIntresseanm()
{
    return(confirm('Du har redan en intresseanmälan registrerad på yrkesområdet/yrket inom det geografiska området. Vill du uppdatera?'));
}

function uppdateraIntresseanmInfo()
{
    alert('Du kan inte uppdatera intresseanmälan.');
}

function infoMsg(infoMsg)
{
    alert(infoMsg);
    return false;
}

function cancelAnsokan(){
    return (confirm('Vill du avbryta ansökningen?'));
}

function cancelIntresse(){
    return (confirm('Vill du avbryta intresseanmälan?'));
}

function warnUserName()
{
    if(document.getElementById('EW2$EW2Content$ivUserNameOrg').value != document.getElementById('EW2$EW2Content$ivUsername').value){
        if(confirm("Vill du verkligen ändra användarnamnet?"))
            return true;
        else
            return false;
    }
}

function selectedDates(selectedFromDatum, selectedTomDatum, selectedFromDatumValue, selectedTomDatumValue) {
    
    document.getElementById(selectedFromDatum).value = selectedFromDatumValue;
    document.getElementById(selectedTomDatum).value = selectedTomDatumValue;
}

//Visar/Döljer listan med undantag
function undantag()
{
	var undlist	= document.getElementById("EW2_EW2Content_AnmalUndantagLista");
	var undCB	= document.getElementById("EW2_EW2Content_AnmalUndantag");  
    
	if(undCB.checked){
		undlist.style.display  = 'block';
	}
	else{
	    undlist.style.display  = 'none';
	}
}


