// JavaScript Document

// preload images

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

// Kod till dropdown
function formHandler(form) {
var windowprops = "height=500,width=500,location=yes,"
+ "status=yes,scrollbar=yes,menubar=yes,toolbar=yes,resizable=yes";

var URL = form.site.options[form.site.selectedIndex].value;
popup = window.open(URL,"MenuPopup",windowprops);
}

// Kod till print
function printNews() {
			if(window.print) {window.print()}
			else {alert('Välj "Skriv ut" i Arkiv-menyn för att skriva ut.')}
		}
		
// Kod till popup
var win=null;
function NewWindow1(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=100;TopPosition=100}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=yes,status=yes,menubar=no,toolbar=yes,resizable=yes';
win=window.open(mypage,myname,settings);}
