function show_optional(list_name){
	if(window.location.hash.substring(1)==list_name){
		document.getElementById(list_name+'_list').style.display='block'
	};
	if(window.location.hash.substring(1)=='reply'){
		document.getElementById('testimonial_reply').style.display='block'
	}
}

function bookmark(self, host, title) {
  try {// Internet Explorer
    window.external.AddFavorite(host, title);
  }
  catch (e) {
    try {// Mozilla
      window.sidebar.addPanel(title, host, "");
    }
    catch (e) {// Opera
      if (typeof(opera)=="object") {
        self.rel="sidebar";
        self.title=title;
        self.url=host;
        return true;
      }
      else {// Unknown
        alert('Нажмите Ctrl-D чтобы добавить страницу в закладки');
      }
    }
  }
  return false;
} 

//feedback protection
function buildL (login, sc){
	eml = login +  "@" + sc;
	return eml;
}

function printL (sc, login){
	document.write (buildL(login, sc));
}

function feedback(subj, sc, login){
	eml = "mailto:" + buildL(login, sc);
	if (subj != "") eml += "?subject=" + subj;
	window.location.href = eml;
}

function login(){
//	this->submit() = false;
//	if(empty(is_match)){
		alert("Проверьте, пожалуйста, правильность ввода логина и пароля");
//	}

	return false;
}

var is_match;

function switch_overlay(state){
	var IE='\v'=='v';

	if(state){
		if($('#hotlist').length){//if hotlist olready loaded
			$('#hotlist').fadeIn(750, null);
			if($("#hotlist").css("position")=="static"){//if hotlist already rendered
				//$('#hotlist-overlay').fadeIn(500, null);
				if(IE){
					$('#hotlist-overlay').css('display', 'block');
				}else{
					$('#hotlist-overlay').fadeIn(500, null);
				}
			}//else overlay will block hotlist rendering
		}
	}else{
		if($('#hotlist').length){//if hotlist olready loaded
			$('#hotlist').fadeOut(500, null);
			//$('#hotlist-overlay').fadeOut(750, null);
			if(IE){
				$('#hotlist-overlay').css('display', 'none');
			}else{
				$('#hotlist-overlay').fadeOut(750, null);
			}
		}
	}
}