function checkname(){
	var name=_$('clientName').value;
	if (name) {
		_$('clientName').value='';
		sh(_$('golink'));
		var url = 'add.php?name='+encodeURI(name);
		//alert (url);
		tb_remove();
		$("#nameList").load(url, {}, 
			function(){
				loadCounter();
			//hi(_$('Loading1')); 
			//sh(_$('CalcRes'));
			}
		);
	}
	return(false);
}

function loadCounter(){
	var url = 'add.php?getCounter=1';
	$("#nameCounter").load(url, {}, 
				function(){
				}
			);	
}

function _$(id) {
        return document.getElementById(id);
}

function hi(id) {
	id.style.display = 'none';
}

function sh(id) {
	id.style.display = '';
}

function addBookmark(url, title)
{
  if (!url) url = location.href;
  if (!title) title = document.title;
  
  //Gecko
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel (title, url, "");
  //IE4+
  else if (typeof window.external == "object") window.external.AddFavorite(url, title);
  //Opera7+
  else if (window.opera && document.createElement)
  {
    var a = document.createElement('A');
    if (!a) return false; //IF Opera 6
    a.setAttribute('rel','sidebar');
    a.setAttribute('href',url);
    a.setAttribute('title',title);
    a.click();
  }
  else return false;
  
  return true;
}