
if(getCookie('block1')=='0')
{
    document.getElementById('rp1').style.display='none';
}

if(getCookie('block2')=='0')
{
    collapseBox('apps2', document.getElementById('rp2'), 0.65, 0.30);
}

function getCookie(name) {
   var cookie = " " + document.cookie;
   var search = " " + name + "=";
   var setStr = null;
   var offset = 0;
   var end = 0;
   if (cookie.length > 0) {
      offset = cookie.indexOf(search);
      if (offset != -1) {
         offset += search.length;
         end = cookie.indexOf(";", offset)
         if (end == -1) {
            end = cookie.length;
         }
         setStr = unescape(cookie.substring(offset, end));
      }
   }
   return setStr;
}

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

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


function getAbsolutePosition(el) 
{
    var r = { x: el.offsetLeft, y: el.offsetTop };
    if (el.offsetParent) {
        var tmp = getAbsolutePosition(el.offsetParent);
        r.x += tmp.x;
        r.y += tmp.y;
    }
    return r;
}


//отрисока флешки
function showFlash(name,h,w)
{
    var str='<OBJECT classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000;z-index:0\' style=\'z-index:0\' codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\' WIDTH=\''+w+'\' HEIGHT=\''+h+'\'><PARAM NAME=\'movie\' VALUE=\''+name+'\'><PARAM NAME=\'menu\' VALUE=\'false\'><param name=\'FlashVars\' value=\'city=26179\'><PARAM NAME=\'quality\' VALUE=\'high\'><PARAM NAME=\'menu\' VALUE=\'false\'><PARAM NAME=\'bgcolor\' VALUE=\'#ffffff\'><EMBED src=\''+name+'\' menu=\'false\' quality=\'high\' bgcolor=\'#FFFFFF\'  WIDTH=\''+w+'\' HEIGHT=\''+h+'\' TYPE=\'application/x-shockwave-flash\' PLUGINSPAGE=\'http://www.macromedia.com/go/getflashplayer\'></EMBED><param name="wmode" value="transparent" /></OBJECT>';
    document.writeln(str);
}

