function VK_DShared () {

      var params = { url: 'http://steech.ru/' + socurl,
                     title: $("#input_theme").attr("value"),
                     description: $("#input_textarea").attr("value"),
                     image: socimage,
                     noparse: true
                   };

      var popupName = '_blank';
      var popup = false;
      var width = 554;
      var height = 349;
      var left = (screen.width - width) / 2;
      var top = (screen.height - height) / 2;
      var url = 'http://vkontakte.ru/share.php';      
      var popupParams = 'scrollbars=0, resizable=1, menubar=0, left=' + left + ', top=' + top + ', width=' + width + ', height=' + height + ', toolbar=0, status=0';
      
      try {
          
        var doc_dom = '', loc_hos = '';
        try {
          doc_dom = document.domain;
          loc_hos = location.host;
        } catch (e) { }

        if (doc_dom != loc_hos) {
          var ua = navigator.userAgent.toLowerCase();
          if (!/opera/i.test(ua) && /msie/i.test(ua)) { throw 'wont work'; }
        }

        popup = window.open('', popupName, popupParams);
        var text = '<form accept-charset="UTF-8" action="' + url + '" method="POST" id="share_form">';
        for (var i in params) {
          text += '<input type="hidden" name="' + i + '" value="' + params[i].toString().replace(/"/g, '&myquot;').replace(/&quot/ig, '&myquot') + '" />';
        }
        
        text += '</form>';
        text += '<script type="text/javascript">document.getElementById("share_form").submit()</script>';

        text = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' +
               '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">' +
               '<head><meta http-equiv="content-type" content="text/html; charset=windows-1251" /></head>' +
               '<body>' + text + '</body></html>';

        popup.document.write(text);
        popup.blur();
        popup.focus();
        
      } catch (e) { // ie with changed domain.
        try {
          if (popup) {
            popup.close();
          }
          url += '?';
          for (var i in params) { url += encodeURIComponent(i) + '=' + encodeURIComponent(params[i]) + '&'; }
          popup = window.open(url, popupName, popupParams);
          popup.focus();
        } catch (e) { }
      }

}

function Commmon_Shared( url ) {

      var popupName = '_blank';
      var popup = false;
      var width = 554;
      var height = 349;
      var left = (screen.width - width) / 2;
      var top = (screen.height - height) / 2;
      var popupParams = 'scrollbars=0, resizable=1, menubar=0, left=' + left + ', top=' + top + ', width=' + width + ', height=' + height + ', toolbar=0, status=0';

      try {

        var doc_dom = '', loc_hos = '';
        try { doc_dom = document.domain; loc_hos = location.host; } catch (e) { }
        if (doc_dom != loc_hos) {
          var ua = navigator.userAgent.toLowerCase();
          if (!/opera/i.test(ua) && /msie/i.test(ua)) { throw 'wont work'; }
        }

        popup = window.open(url, popupName, popupParams);
        popup.blur();
        popup.focus();

      } catch (e) { // ie with changed domain.
        try {
          if (popup) { popup.close(); }
          popup = window.open(url, popupName, popupParams);
          popup.focus();
        } catch (e) { }
      }

}

