// --------------------------------------------------------
function SwitchMenu(obj){
    if(document.getElementById){
    var el = document.getElementById(obj);
    var ar = document.getElementById("masterdiv").getElementsByTagName("span"); 
        if(el.style.display != "block"){ 
            for (var i=0; i<ar.length; i++){
                if (ar[i].className=="submenu") 
                ar[i].style.display = "none";
            }
            el.style.display = "block";
        }else{
            el.style.display = "none";
        }
    }
}

function SwitchMenu1(){SwitchMenu("sub1");}
function SwitchMenu2(){SwitchMenu("sub2");}
function SwitchMenu3(){SwitchMenu("sub3");}
function SwitchMenu4(){SwitchMenu("sub4");}
function SwitchMenu5(){SwitchMenu("sub5");}
function SwitchMenu6(){SwitchMenu("sub6");}
function SwitchMenu7(){SwitchMenu("sub7");}
function SwitchMenu8(){SwitchMenu("sub8");}
function SwitchMenu9(){SwitchMenu("sub9");}

function mkcore(jmeno, domena, tld){
  var ret=jmeno;
  ret += String.fromCharCode(63+1);
  if(typeof(domena)=="undefined") ret += 'alchymisthotel.com ';
  else if(typeof(tld)=="undefined") ret += domena+'.cz';
  else ret += domena+'.'+tld;
  return (ret);
}

function mke(jmeno, domena, tld) {
  document.write(mkcore(jmeno, domena, tld));
}

function mkm(jmeno, domena, tld) {
  document.write('mai');
  document.write('lto'+String.fromCharCode(58));
  mke(jmeno, domena, tld);
}

function gom(jmeno, domena, tld) {
  var dst='mai';
  dst += 'lto'+String.fromCharCode(58);
  dst += mkcore(jmeno,domena,tld);
  w1=window.open(dst);
  if (w1) w1.close();
}

function mkhref(jmeno, domena, tld, atr) {
  document.write('<a href="javascript:gom(\''+jmeno+'\'');
  if(typeof(domena)!="undefined") {
   document.write(', \''+domena+'\'');
   if(typeof(tld)!="undefined") document.write(', \''+tld+'\'');
  }
  document.write(')"');
  if(typeof(atr)!="undefined") document.write(' '+atr);
  document.write('>');
  document.write(mkcore(jmeno, domena, tld));
  document.write('</a>');
}

function mkhrefnopen(jmeno, domena, tld, atr) {
  document.write('<a href="');
  mkm(jmeno, domena, tld);
  document.write('"');
  if(typeof(atr)!="undefined") document.write(' '+atr);
  document.write('>');
  document.write(mkcore(jmeno, domena, tld));
  document.write('</a>');
}

function mk_form_to (form_name, jmeno)
 {
   var F = MM_findObj ( form_name );

   F.To.value=mkcore(jmeno);
 }

// --------------------------------------------------------------------

// --------------------------------------------------------
