﻿// JScript File
function externallinks()
{
    var c=document.getElementById('contentsub');
    //alert(c);
    if(c)
    {
        //alert("Found content id");
        var ls=c.getElementsByTagName('a');
        for(var i=0;i<ls.length;i++){
            if(ls[i].getAttribute('rel')=='external')
            {
                //alert("Found 1!");
                ls[i].className+=ls[i].className?' extlink':'extlink';
                ls[i].title+='';
                ls[i].onclick=function(){return !window.open(this.getAttribute('href')); return false;}
            }
            
        }
    }
    else
    {
        //alert("no content id");
    }
}
window.onload=function(){
    if(!document.getElementById && !document.createTextNode){return;}
    externallinks();
}

function Hitta() {
	var thisurl;
	var thistarget;
	var thisWithOwnerid
	//var thisvalue = document.snabblankar-form.snabblankar.options[document.snabblankar-form.snabblankar.selectedIndex].value;
	var thisSelect = document.getElementById("snabblankar");
	var thisvalue = thisSelect.options[thisSelect.selectedIndex].value;
	if (thisvalue != "0") {
		thistarget = thisvalue.substr(0,1);
		thisurl = thisvalue.substr(2);
		if (thistarget == "1") { //nytt fönster
			window.open(thisurl + "?newwin=true");
		} else {
			location = thisurl;
		}
		
	}
}