<!--
// Popup windows
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,scrollbars=yes,status=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=yes');
	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;
	}
}

//Table OnMouseOver
function changeTDColorOn(sContainer, iAltRow){
	if (iAltRow=='1') {
		document.getElementById(sContainer).style.backgroundColor = '#D3E5FA';
		}
	else {
		document.getElementById(sContainer).style.backgroundColor = '#D3E5FA';
		}
}
function changeTDColorOff(sContainer, iAltRow){
	if (iAltRow=='1') {
		document.getElementById(sContainer).style.backgroundColor = '#EEEEEE';
		}
	else {
		document.getElementById(sContainer).style.backgroundColor = '#DDDDDD';
		}
}
//-->