function sign_switch_on() {
if (document.getElementById('sign_img').src==r_url+"images/"+s_off) {
document.getElementById('sign_img').src=r_url+"images/"+s_on1;
}
}

function sign_switch_off() {
if (document.getElementById('sign_img').src==r_url+"images/"+s_on1) {
document.getElementById('sign_img').src=r_url+"images/"+s_off;
}
}

function sign_switch() {
if (document.getElementById('sign_img').src==r_url+"images/"+s_on2) {
document.getElementById('sign_img').src=r_url+"images/"+s_off;
} else {
document.getElementById('sign_img').src=r_url+"images/"+s_on2;
}
}

function sign() {
if (document.getElementById("sign").style.display=="block") {
document.getElementById("sign").style.display="none";
} else {
document.getElementById("sign").style.display="block";
}
}

function book(day) {
var td = "td_"+day;
if (document.getElementById(td).className=="calendar_free" && document.getElementById(td).className!="calendar_disabled") {
document.getElementById(td).className="calendar_picked";
// disable others
var td_ids2 = td_ids.substring(0, td_ids.length-1);
var others= td_ids2.split(",");
for (var td_id in others) {
if (others[td_id]!=td) {
document.getElementById(others[td_id]).className="calendar_disabled";
}
}
// disable links
if (m_p!=="") {
document.getElementById("a_m_p").href="#calendar";
}
if (m_n!=="") {
document.getElementById("a_m_n").href="#calendar";
}
// view div
document.getElementById("div_book").style.display="block";
// change day
var daydate = day.substr(0,4)+"."+day.substr(4,2)+"."+day.substr(6,2);
document.getElementById("bf_from").value=daydate;
// div
document.getElementById("book_result").innerHTML = "<p class=\"bf_status\">"+mes07+"</p>";
} else 
if (document.getElementById(td).className!="calendar_disabled") {
document.getElementById(td).className="calendar_free";
// enable others
var td_ids2 = td_ids.substring(0, td_ids.length-1);
var others= td_ids2.split(",");
for (var td_id in others) {
if (others[td_id]!=td) {
document.getElementById(others[td_id]).className="calendar_free";
}
}
// disable links
if (m_p!=="") {
document.getElementById("a_m_p").href=m_p;
}
if (m_n!=="") {
document.getElementById("a_m_n").href=m_n;
}
// hide div
document.getElementById("div_book").style.display="none";
// clear day
document.getElementById("bf_from").value="";
// clear div
document.getElementById("book_result").innerHTML = "&nbsp;";
}
}

function check_book_form() {
if (document.bf.bf_booker.value.length<5) {
alert(mes08);
return false;
} else 
if (document.bf.bf_email.value.length<5) {
alert(mes09);
return false;
} else 
if (document.bf.bf_address.value.length<10) {
alert(mes10);
return false;
} else 
if (document.bf.bf_phone.value.length<5) {
alert(mes11);
return false;
} else {
return true;
}
}

function disableSelection(target){
if (typeof target.onselectstart!="undefined")
target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined")
target.style.MozUserSelect="none"
else
target.onmousedown=function(){return false}
target.style.cursor = "default"
}

