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;
      }

function write(mail)
{
        window.location.href = 'mailto:' + mail.substring(mail.indexOf('!')+1,mail.indexOf('$')) + '@' + mail.substring(mail.indexOf('?')+1, mail.indexOf('#')) + '.' + mail.substring(mail.indexOf('*')+1, mail.length) + '?subject=Incapital.ru';
}

function PopUp(PopUpUrl)
   {
    var ScreenWidth=window.screen.width;
    var ScreenHeight=window.screen.height;
    var movefromedge=0;
    placementx=(ScreenWidth/2)-((300)/2);
    placementy=(ScreenHeight/2)-((400)/2);
    WinPop=window.open(PopUpUrl,"","width=320,height=300,toolbar=0,location=0,directories=0,status=0,scrollbars=0,menubar=0,resizable=0,left="+placementx+",top="+placementy+",screenX="+placementx+",screenY="+placementy+",");
   }

function check_form()
   {	
  if  ( document.mailform.uname.value == "" )
	{
	  document.mailform.uname.focus();
	  document.mailform.uname.select();
		alert("Необходимо указать Контактное лицо");
		return false;
	}
  if  ( document.mailform.uemail.value == "" )
	{
	  document.mailform.uemail.focus();
	  document.mailform.uemail.select();
		alert("Необходимо указать E-mail");
		return false;
	}
  if  ( document.mailform.umsg.value == "" )
	{
	  document.mailform.umsg.focus();
	  document.mailform.umsg.select();
		alert("Необходимо написать Текст письма");
		return false;
	}
	return true;
   }