function showDiv(div,Y,X,r) {

    $('#blackfon').height($(document).height()).width($(document).width());

    var q = document.documentElement.scrollTop;
    var C = getClientHeight();

    $('#'+div).css('display','block');

    $('#blackfon').css('display','block');

    $('#'+div+' .output').html("");
}

function defPosition(event) {
      var x = y = 0;
      if (document.attachEvent != null) { // Internet Explorer & Opera
            x = window.event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
            y = window.event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
      } else if (!document.attachEvent && document.addEventListener) { // Gecko
            x = event.clientX + window.scrollX;
            y = event.clientY + window.scrollY;
      } else {
            // Do nothing
      }
      return {x:x, y:y};
}

function ClodeDialog(){
    $('#blackfon').css('display','none');
    $('#div_friend').css('display','none');
    $('#div_rate').css('display','none');
}

function getClientHeight(){
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}

