// JavaScript Document
function byttSide (nyLokasjon) {
	nySide = "?id=forhandlere&fylke=" + nyLokasjon.options[nyLokasjon.selectedIndex].value;
	
	if (nySide !="") {
		window.location = nySide;
	}

}






function byttBilde (linken, infoNumber) {
	//overskrift = new Array ("Info barnehagesekk", "Ny overskrift");
	if (document.getElementById("bilde_wrapper")) {
		document.getElementById("bilde_wrapper").innerHTML = '<img src="'+linken+'" width="440" height="400" id="stortBilde">';
	} else {
		document.getElementById("stortBilde").src = linken;	
	}
	document.getElementById("overskrift").innerHTML = overskrift[infoNumber];
	document.getElementById("infoTekst").innerHTML = infotekst [infoNumber];
	
	
}






/*
var urlAddress = "http://www.beckmann.no"; 
var pageName = "Beckmann"; 
function addToFavorites() { 
	if (window.external) { 
		window.external.AddFavorite(urlAddress,pageName); 
	} else { 
		alert("Sorry! Your browser doesn't support this function."); 
	} 
}

*/

function addtofavorites()  
{  
    var newT = document.createTextNode('Add to Favorites');  
    var s = document.getElementById('addtofavorites');  
    var url = 'http://www.beckmann.no';  
    var title = 'Beckmann';  
    if (window.sidebar)  
    {  
        s.appendChild(newT);  
        s.onclick = function() {window.sidebar.addPanel(title, url,'');}  
    }  
    else if (window.external)  
    {  
        s.appendChild(newT);  
        s.onclick = function() {  
            window.external.AddFavorite(url, title);}  
    }  
    else if (window.opera)  
    {  
        s.appendChild(newT);  
        s.onclick = function() {  
            var e = document.createElement('a');  
            e.setAttribute(url, self.location);  
            e.setAttribute(title, document.title);  
            e.setAttribute('rel','sidebar');  
            e.click();  
        }  
    }  
    else  
    {  
        s.appendChild(newT);  
        s.onclick = function() {  
            var e = document.createElement("A");  
            e.setAttribute('href', self.location);      
            e.setAttribute('title',document.title);     
            e.setAttribute('rel','sidebar');      
            document.location.href = self.location;  
            return true;  
        }  
    }  
}
