var windowDefaultStatus = "Léčebné lázně Mariánské Lázně, a.s."

// wallpapers
function getCenterW(width) {
	return parseInt( eval( (screen.width-parseInt(width))/2 ) );
}
function getCenterH(height) {
	return parseInt( eval( (screen.height-parseInt(height))/2 ) );
}
function popupwin(src,w,h) {
	var defaultStatusBarText = "Mariánské Lázně, a.s.";
	window.defaultStatus = defaultStatusBarText;
	var txtl = 'Close window by click left button.';
	var txtr = 'Save picture by click right button and &quot;Save Picture As...&quot;';
	winpopup = window.open('','popup','width='+w+',height='+h+',menubar=no,resizable=no,scrollbars=no,status=yes,toolbar=no,locationbar=no,directories=no,screenX='+getCenterW(w)+',screenY='+getCenterH(h)+',top='+getCenterH(h)+',left='+getCenterW(w));
	winpopup.document.open();
	winpopup.document.write('<html>\n');
	winpopup.document.write('<html>\n<head>\n');
	winpopup.document.write('<title>&nbsp;Mariánské Lázně, a.s.</title>\n');
	winpopup.document.write('</head>\n');
	winpopup.document.write('<body style="margin: 0px; padding: 0px;">\n');
	winpopup.document.write('<a href="#" onclick="window.close(); return false;" onmouseover="window.status = \''+txtl+' '+txtr+'\'; return true;" onmouseout="window.status = \''+defaultStatusBarText+'\'; return true;" title="'+txtl+'\n'+txtr+'"><img src="'+src+'" width="'+w+'" height="'+h+'" border="0" alt="'+txtl+'\n'+txtr+'"></a>\n');
	winpopup.document.write('</body>\n</html>\n');
	winpopup.document.close();
}

function calcInit() {
	var frm = document.forms['frmCalculator'];
	var eHotel = frm.elements['hotel'];
	eHotel.disabled = true;

	saveHotelNames();
	
	calc_program['klassische-heilkur'] 			= 'but;vlt;cl;pac;svo;hve;lab;nl';
	calc_program['hotelunterkunft'] 			= 'but;vlt;cl;pac;svo;hve;lab;nl';
	calc_program['mini-kur'] 					= 'but;vlt;cl;pac;svo;hve;lab;nl';
	calc_program['minirelax'] 					= 'but;vlt;cl;pac;svo;hve;lab;nl';
	calc_program['season-package'] 				= 'but';
	calc_program['entspannungskur'] 			= 'but;vlt;cl;pac;svo;hve;lab';
	calc_program['beauty-relax'] 				= 'but';
	calc_program['rheuma-gelenke'] 				= 'vlt;cl;pac;svo;hve;lab;nl';
	calc_program['nordic-walking'] 				= 'but;vlt;cl;pac;svo;hve;lab;nl';
	calc_program['welness-woche'] 				= 'but;vlt;cl;pac;svo;hve;lab;nl';
	calc_program['regenerationskur'] 			= 'vlt;cl;pac;svo;hve;lab;nl';
	calc_program['wirbelsaule-gelenke'] 		= 'vlt;cl;pac;svo;hve;lab;nl';
	calc_program['aqua-entspannung'] 			= 'vlt';
	calc_program['anti-stress'] 				= 'cl';
	calc_program['revitalisierungsprogramm'] 	= 'pac';
	calc_program['shiatzu'] 					= 'pac';
	calc_program['schlank-fit'] 				= 'pac';
	calc_program['kraft-natur-heilquellen'] 	= 'nl';
	calc_program['wohlfuhlwoche-intensiv'] 		= 'nl';
	calc_program['konigliche-impressionen'] 	= 'nl';
	calc_program['schlankheitskur-intensiv'] 	= 'hve';
	calc_program['oxygenotherapie'] 			= 'hve';
	calc_program['entgiftungskur'] 				= 'hve;nl';
}

function checkCalculator(form) {
	var stayValue = form.stay.value;
	var hotelValue = form.hotel.value;

	if(stayValue=="" && hotelValue=="") {
		alert("Chyba, zvolte typ pobytu a hotel");
		return false;
	}
	else if(stayValue=="" && hotelValue!="") {
		alert("Chyba, zvolte typ pobytu");
		return false;
	}
	else if(stayValue!="" && hotelValue=="") {
		alert("Chyba, zvolte hotel");
		return false;
	}
	else {
		return true;
	}
}
