// Определяем браузер пользователя

isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;



function getelementbyid(myid) {
   if (isNS4){
        objElement = document.layers[myid];
     }else if (isIE4) {
        objElement = document.all[myid];
     }else if (isIE5 || isNS6) {
             objElement = document.getElementById(myid);
     }
return(objElement);
}



function mail(user,domain,subject)
{
  if (subject == '')
  {
    loc = "mailto:" + user + "@" + domain;
  }
  else
  {
    loc = "mailto:" + user + "@" + domain + "?subject=" + subject + "";
  }
  
  window.location = loc;
}

function confirmation(text, loc)
{
  if (confirm(text))
  {
    location.replace(loc)
  }
}

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