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

function WinOpen( link )
{
  var w=820 // ширина окна
  var h=710 //высота окна

  if ( screen.availHeight <=h )
    h = screen.availHeight;

  var wc=parseInt((screen.availWidth-w)/2)
  var hc=parseInt((screen.availHeight-h)/2)
  window.open(link,'','width='+w+',height='+h+',top='+hc+',screenY='+hc+',left='+wc+',screenX='+wc+',toolbar=no,status=no,menubar=no,scrollbars=yes');
}

String.prototype.printAddr =
function (_hamper,_prefix,_postfix,_face)
{
  _hamper=
  _prefix+
  "@"+
  this+
  (_postfix || '')
  document.write((_face||_hamper).link("mailto:"+_hamper));
}

this.vtip = function() {    
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 10; // y distance from mouse       
    
    $(".vtip").unbind().hover(    
        function(e) {
            if ( this.title )
            {
              this.t = this.title;
              this.title = ''; 
              this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
            
              $('body').append( '<p id="vtip"><img id="vtipArrow" />' + this.t + '</p>' );
                        
              $('p#vtip #vtipArrow').attr("src", 'images/vtip_arrow.png');
             $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");
            }
        },
        function() {
            if ( this.t )
            {
              this.title = this.t;
              $("p#vtip").fadeOut("slow").remove();
            }
        }
    ).mousemove(
        function(e) {
            this.top = (e.pageY + yOffset);
            this.left = (e.pageX + xOffset);
                         
            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};
