function bookmark(){
   var title="Êëóá31"
   var url="http://www.klub31.ru"

   if (window.sidebar) window.sidebar.addPanel(title, url,"");

   else if( window.opera && window.print )
   {
   var mbm = document.createElement('a');
   mbm.setAttribute('rel','sidebar');
   mbm.setAttribute('href',url);
   mbm.setAttribute('title',title);
   mbm.click();
   }

   else if( document.all ) window.external.AddFavorite( url, title);

}

function setHome() {

  if (document.all) 
  {
    document.body.style.behavior='url(#default#homepage)'; 
    document.body.setHomePage('http://www.klub31.ru/') 
  } 
}

function photo(url){
    window.open(url,'photo','scrollers=no,toolbar=no,resizable=no,height=400,width=300');
    return false;
}


function sendUrlByPost(url) 
{
   var params = url.split('?'); 
   var form = document.createElement("form"); 
   form.action = params[0]; 
   form.method = 'POST'; 
   var params = params[1].split('&'); 
   for (var i=0; i<params.length; i++) 
   {
      var pos = params[i].indexOf('='); 
      if (pos > 0) 
      {
      var key = params[i].substring(0,pos); 
      var val = params[i].substring(pos+1); 
      var elem = document.createElement("input"); 
      elem.name = key;  
      elem.type = 'hidden'; 
      elem.value = val; 
      form.appendChild(elem);
      }
   } 
   document.getElementsByTagName('body')[0].appendChild(form); 
   form.submit();
}


/*
function autologin (flag)
{
    if (flag == 1)
    {
       var username = document.getElementById("login").value;
       var passwd = document.getElementById("password").value; 
    }
    else {
       var username = document.getElementById("login1").value;
       var passwd = document.getElementById("password1").value;
    }
    
    var url = "http://www.klub31.ru/forum/login.php?login=âõîä&username="+username+"&password="+passwd+"&autologin=";
    sendUrlByPost(url);
    
    return true;
}
*/

function setTestimonial (flag)
{
    if (flag == 1)
    {
        document.getElementById("testimonialFORM").style.display = "block";
		document.getElementById("firstElFoc").focus();
    }
    
    if (flag == 2){
        document.getElementById("testimonialTABLE").style.display = "block";
        document.getElementById("testimonialFORM").style.display = "block";
		document.getElementById("firstElFoc").focus();
    }
    
}

