<!--
// Popup windows
var win = null;
function openWindow2(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
}
function newWindow(mypage, myname, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=0,scrollbars=1,status=0,menubar=0,location=0'
		win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function openWindow(sUrl,sWindowName,width,height) {
	windowToOpen=window.open('' + sUrl + ',' + sWindowName + ',top=' + (window.screen.availHeight/2-height/2) + ', left=' + (window.screen.availWidth/2-width/2)+ ', height=' + height + ', width=' + width + ', menubar=0, location=0, resizable=0, status=0, scrollbars=1');
	if(windowToOpen){
		windowToOpen.focus();
	}
	else{
		alert('Pop-ups are currently blocked.\nPlease add this site to your pop-up exception list.');
	}	
}

function rezisableWindow(sUrl,sTitle,iWidth,iHeight,sScroll,sResize) {
    var oWindow;
		iLeft = (screen.width/2)-(iWidth/2);
		iTop = (screen.height/2)-(iHeight/2);
		oWindow = window.open(sUrl,sTitle,'toolbar=0, scrollbars='+ sScroll +', menubar=0, resizable='+ sResize +', width=1, height=1, left='+ iLeft +', top='+ iTop +'');
		oWindow.resizeTo(iWidth,iHeight);
		oWindow.focus();
} 

// Printing
function printPage() {
	window.print();
}

// Messages
function requireSearchWord(sFieldName,sContent){ 
	if(sContent==''){
		alert('Du glömde att skriva in det du vill söka efter. Försök igen');
		return false;
	}
	else {
		frmSearch.submit();
		return true;
	}
}
//-->
