function OppnaFonster(inFile, width, height) {
	winwidth	= width;		// width of the new window 
	winheight	= height;		// height of the new window 
	winleft		= 200;			// just dummie values
	wintop		= 200;			// just dummie values
	  
	if(parseInt(navigator.appVersion)>=4) {
		winleft = (screen.width / 2) - (winwidth / 2); // center the window right to left 
		wintop	= (screen.height / 2) - (winheight / 2); // center the window top to bottom 
	}
	window.open(inFile, '', 'scrollbars=no,top=' + wintop + ',left=' + winleft + ',height=' + winheight + ',width=' + winwidth);  
}
function OppnaScroll(inFile, width, height) {
	winwidth	= width;		// width of the new window 
	winheight	= height;		// height of the new window 
	winleft		= 200;			// just dummie values
	wintop		= 200;			// just dummie values
	  
	if(parseInt(navigator.appVersion)>=4) {
		winleft = (screen.width / 2) - (winwidth / 2); // center the window right to left 
		wintop	= (screen.height / 2) - (winheight / 2); // center the window top to bottom 
	}
	window.open(inFile, '', 'scrollbars=yes,top=' + wintop + ',left=' + winleft + ',height=' + winheight + ',width=' + winwidth);  
}

function KollaDatum() {
	if (document.sokledigabilar.Pickupadress.value == "-1" && document.sokledigabilar.Pickupadress_annan.value == "") {
		alert('Du måste ange en leveransadress i menyn eller manuellt skriva in en.');
		return;
	}
	if (document.sokledigabilar.frandatum.value == '') {alert('Du måste ange ett fråndatum');return;}
	if (document.sokledigabilar.tilldatum.value == '') {alert('Du måste ange ett tilldatum');return;}
	if (document.sokledigabilar.frandatum.value > document.sokledigabilar.tilldatum.value) {
		alert("Du måste ange ett fråndatum som är innan återlämningsdatumet.");
		return;
	}
	else
	{
	document.sokledigabilar.submit();
	}
}

function KollaDatumWeek() {
	if (document.sokledigabilar.Pickupadress.value == "-1" && document.sokledigabilar.Pickupadress_annan.value == "") {
		alert('Du måste ange en leveransadress i menyn eller manuellt skriva in en.');
		return;
	}
	if (document.sokledigabilar.frandatum.value == '') {
		alert("Du måste ange ett leveransdatum (Fredag)");
		return;
	}else{
	document.sokledigabilar.submit();
	}
}




