var newWin = null;
function popUp(strURL, strType, strHeight, strWidth) {
	if (newWin != null && !newWin.closed)
		newWin.close();
		var strOptions="";
	if (strType=="popup")
		strOptions="location=0,menubar=1,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,height="+strHeight+",width="+strWidth;
	newWin = window.open(strURL, 'newWin', strOptions);
	newWin.focus();
}

function gotoURL(page) {
    if (page != '') {
       document.location.href = page;
    }
}

function expandColapse(trigger, icon, div) {
    var elDiv = document.getElementById(div);
    var elIcon = document.getElementById(icon);
     
    if (elDiv.style.display == 'none') {
        elDiv.style.display = 'block';
        elIcon.src = 'images/colapse.gif';
        trigger.title = 'Trykk for å lukke';
        trigger.style.color = '#FF0000';
    }
    else {
        elDiv.style.display = 'none';
        elIcon.src = 'images/expand.gif';
        trigger.title = 'Trykk for å åpne';
        trigger.style.color = '';
    }
    
}

function emAdr(_name,host) {
   document.location.href = 'mailto: '+_name+'@'+host;
}

// Skal brukes kun av Ettermarked
function go(selectElement, pageId) {
    if (selectElement.value !='') {
        document.location.href = 'page?id='+pageId+'&query=data/county=\''+selectElement.value+'\'&county='+selectElement.value;
    }
}