<!--

function checkmail(email)
{
 var reg = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]{2,}[.][a-zA-Z]{2,4}$/;
 return (reg.exec(email) != null);
}

function checkform(name, mail, noname, nomail)
{
 if (name.value == "")
 {
  alert(noname);
  name.focus(); 
  return false;
 }
 else if (!checkmail(mail.value)) 
 {
  alert(nomail);
  mail.focus(); 
  return false;
 }
 return true;
}

function dofavorite(title, unavailable)
{
 if (navigator.appName.substring(0,3) == "Mic" && navigator.appVersion.substring(0,1) >= 4)
 {
  window.external.AddFavorite('http://www.bains-de-dorres.com/', title);
 }
 else
 {
  alert(unavailable);
 }
}

function writefavorites(text, title, unavailable)
{
 document.write("<a href=\"javascript:dofavorite('");
 document.write(title);
 document.write("', '");
 document.write(unavailable);
 document.write("');\">")
 document.write(text);
 document.write("</a>");
}

function writeprint(text, resPath)
{
 if (typeof(window.print) != 'undefined') 
 { 
  document.write("<a class='gotop' href='javascript:window.print();' title='");
  document.write(text);
  document.write("'>");
  document.write(text);
  document.write("<img class='noprint' src='");
  document.write(resPath);
  document.write("/print.gif' alt='");
  document.write(text);
  document.write("'/></a>");
 }
}

function writemaillinks(subject, altInfo, altWebmaster, textInfo, textWebmaster, resPath)
{
 writemaillink("info@bains-de-dorres.com", subject, altInfo, textInfo, resPath);
 writemaillink("webmaster@bains-de-dorres.com", subject, altWebmaster, textWebmaster, resPath);
}

function writemaillink(mail, subject, alt, text, resPath)
{
 document.write("<a href='mailto:");
 document.write(mail);
 document.write("?subject=");
 document.write(subject);
 document.write("' title='");
 document.write(mail);
 document.write("'><img class='noprint' src='");
 document.write(resPath);
 document.write("/mail.gif' alt='");
 document.write(alt);
 document.write("'/>");
 document.write(text);
 document.write("</a><br/>");
}

function writecontact(title)
{
 document.write("e-mail&nbsp;: <a href='contact.php' title='");
 document.write(title);
 document.write("'>info@bains-de-dorres.com</a><br/>");
}

// -->