<!--
	var w_mesg = 'Vitajte na stránkach To beriem!';
	var isLoaded =0;

	function MnOn(t) { t.style.backgroundColor=colM1;}
	function MnOf(t) { t.style.backgroundColor=colM2;}

	function rtb_ShowTime()
	{
		var message;
		var theTime = window.setTimeout("rtb_ShowTime()",1000);
		var now     = new Date();

		isLoaded=1;

		switch(now.getDay()) {
			case 0:
				message = "Nedeľa";
				break;
			case 1:
				message = "Pondelok";
				break;
			case 2:
				message = "Utorok";
				break;
			case 3:
				message = "Streda";
				break;
			case 4:
				message = "Štvrtok";
				break;
			case 5:
				message = "Piatok";
				break;
			case 6:
				message = "Sobota";
				break;
		}

		message += (", " + now.getDate() + ". ");

		switch (now.getMonth()) {
			case 0:
				message += "január";
				break;
			case 1:
				message += "február";
				break;
			case 2:
				message += "marec";
				break;
			case 3:
				message += "apríl";
				break;
			case 4:
				message += "máj";
				break;
			case 5:
				message += "jún";
				break;
			case 6:
				message += "júl";
				break;
			case 7:
				message += "august";
				break;
			case 8:
				message += "september";
				break;
			case 9:
				message += "október";
				break;
			case 10:
				message += "november";
				break;
			case 11:
				message += "december";
				break;
		}

		var year = now.getYear();
		if (year < 1000) {
			year += 1900;
		}

		var min  = now.getMinutes();
		var sec  = now.getSeconds();
		message += (" " + year + ", " + now.getHours() + ":" + (min < 10 ? "0" + min : min) + "." + (sec < 10 ? "0" + sec : sec));

		if (document.getElementById) {
			document.getElementById('time').innerHTML = '<nobr>' + message + '</nobr>';
		}
		else if (document.all) {
			document.all['time'].innerHTML = '<nobr>' + message + '</nobr>';
		}
	}

	function rtb_SetWelcomeMesg(mesg)
	{
		w_mesg = mesg;
	}

	function rtb_SwapLayers(id_old, id_new)
	{
		if (document.getElementById) {
			document.getElementById(id_old).style.display = 'none';
			document.getElementById(id_new).style.display = 'block';
		}
		else if (document.all) {
			document.all[id_old].style.display = 'none';
			document.all[id_new].style.display = 'block';
		}
	}

	function rtb_SetInfo(mesg){
	 if (isLoaded) {
		if (document.getElementById) {
			document.getElementById('info').innerHTML = '<nobr>' + mesg + '&nbsp;</nobr>';
		}
		else if (document.all) {
			document.all['info'].innerHTML = '<nobr>' + mesg + '&nbsp;</nobr>';
		}

		window.status = mesg;
	 }
	 return 1;
	}

	function rtb_ResetInfo(){
	 if (isLoaded) {
		if (document.getElementById) {
			document.getElementById('info').innerHTML = '<nobr>' + w_mesg + '&nbsp;</nobr>';
		}
		else if (document.all) {
			document.all['info'].innerHTML = '<nobr>' + w_mesg + '&nbsp;</nobr>';
		}

		window.status = 'To beriem!';
	 }
	 return 1;
	}

	function rtb_OpenWindow(url, name, width)
	{
		window.open(url, name, 'width=' + width + ',height=450,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');
	}

	function rtb_CheckLoginForm(frm)
	{
		if (frm.l_login.value.length < 6) {
			alert('Prihlasovacie meno (login) musí mať min. 6 znakov!');
			frm.l_login.focus();
		}
		else if (frm.l_passwd.value.length < 6) {
			alert('Heslo musí mať min. 6 znakov!');
			frm.l_passwd.focus();
		}
		else {
			return true;
		}

		return false;
	}

	function rtb_CheckMailingForm(frm)
	{
		if (frm.m_mail.value == '') {
			alert('Zadajte Váš e-mail!');
			frm.m_mail.focus();
		}
		else if (frm.m_mail.value.indexOf('@') == -1 || frm.m_mail.value.lastIndexOf('.') == -1 || frm.m_mail.value.indexOf('@') > frm.m_mail.value.lastIndexOf('.')) {
			alert('Chybne zadaný e-mail!');
			frm.m_mail.focus();
		}
		else {
			return true;
		}

		return false;
	}

	function rtb_PasswordForgotten(frm)
	{
		if (frm.l_login.value == '') {
			alert('Zadajte login!');
			frm.l_login.focus();
		}
		else {
			if (confirm('Zaslať zabudnuté heslo na Vašu e-mailovú adresu?')) {
				document.location = 'php/rtb_login.php?op=forget&l_login=' + frm.l_login.value + '&r=' + Math.random();
			}
		}
	}

	function rtb_Logout(id, session)
	{
		if (confirm('Odhlásiť Vás?')) {
			document.location = 'php/rtb_login.php?op=logout&id=' + id + '&session=' + session;
		}
	}

	function rtb_SearchReset(obj, value)
	{
		if (obj.value == value) {
			obj.value = '';
		}
	}

	function rtb_CheckSearchOfferForm(frm)
	{
		if (frm.sch_day.value == '' || isNaN(frm.sch_day.value) || parseInt(frm.sch_day.value) <= 0 || parseInt(frm.sch_day.value) > 31) {
			alert('Chybne zadaný dátum!');
			frm.sch_day.focus();
		}
		else if (frm.sch_month.value == '' || isNaN(frm.sch_month.value) || parseInt(frm.sch_month.value) <= 0 || parseInt(frm.sch_month.value) > 12) {
			alert('Chybne zadaný dátum!');
			frm.sch_month.focus();
		}
		else if (frm.sch_year.value == '' || isNaN(frm.sch_year.value) || parseInt(frm.sch_year.value) <= 1900) {
			alert('Chybne zadaný dátum!');
			frm.sch_year.focus();
		}
		else if (frm.sch_price.value != '-- maximálna cena --' && isNaN(frm.sch_price.value)) {
			alert('Chybne zadaná cena!');
			frm.sch_price.focus();
		}
		else {
			return true;
		}

		return false;
	}

	function rtb_CheckSearchHikingForm(frm)
	{
		if (frm.sch_hday.value == '' || isNaN(frm.sch_hday.value) || parseInt(frm.sch_hday.value) <= 0 || parseInt(frm.sch_hday.value) > 31) {
			alert('Chybne zadaný dátum!');
			frm.sch_hday.focus();
		}
		else if (frm.sch_hmonth.value == '' || isNaN(frm.sch_hmonth.value) || parseInt(frm.sch_hmonth.value) <= 0 || parseInt(frm.sch_hmonth.value) > 12) {
			alert('Chybne zadaný dátum!');
			frm.sch_hmonth.focus();
		}
		else if (frm.sch_hyear.value == '' || isNaN(frm.sch_hyear.value) || parseInt(frm.sch_hyear.value) <= 1900) {
			alert('Chybne zadaný dátum!');
			frm.sch_hyear.focus();
		}
		else {
			return true;
		}

		return false;
	}

	function rtb_Question(question, action)
	{
		if (confirm(question)) {
			document.location = action + '&r=' + Math.random();
		}
	}

	if (!(document.getElementById || document.all)) {
		if (document.cookie.indexOf('wrn=')==-1) {
				document.cookie='wrn=1'
				alert('Stránka bola optimalizovaná pre MS Internet explorer 5.0 a vyšší. Vo Vašom prehladači pravdepodobne nebude zobrazená správne!');
		}
	}

	function ColorProfile(value) {
		var exp = new Date(); 
		exp.setTime(exp.getTime() + (30*86400000));
		document.cookie = "colprof=" + escape (value) +"; expires=" + exp.toGMTString();
		//document.location=document.location;
		document.location.reload();
	}

<!-- End -->

