Верхняя панель новостей сайта.

Верхняя панель новостей сайта.
Блок новостей сайта в верху вашей страницы.

В Страницы сайта:
Code

<div id="site-news-panel"><div id="site-news-cont-img"></div><div id="site-news-cont">Авторские скрипты для ucoz - "ucodes.ru" сайт направлен на написание как платных так и бесплатных скриптов для системы uCoz //.</div><a href="#" onclick="showHide();" id="site-news-cont-close"></a></div>


В CSS:
Code

#site-news-panel {background:#507c96;width:100%;min-height:30px;color:#fff;box-shadow: 0 4px 10px #444;positon:absolute !important;}
#site-news-cont {padding: 7px 0px 7px 5px;text-align:left;float:left;}
#site-news-cont-img {background: url(/images/b.png) no-repeat -17px 0px;width:11px;height:9px;float:left;margin: 5px 0px 0px 7px;}
#site-news-cont-close {background: url(/images/b.png) no-repeat;width:16px;height:18px;float:right;margin: 6px 10px 0px 0px;display:block}


Куда угодно:
Code

<script type="text/javascript">
var elementId = 'site-news-panel';
  function setCk (a,b,c) {
  if (a) {
  var date = new Date();
  date.setTime(date.getTime() + (c * 24 * 60 * 60 * 1000));
  document.cookie = a + '=' + escape(b) + '; expires="' + (date.toGMTString()) + '"; path="/"';
  }
  else  
  return null;
  }
   
  function getCk(a) {
  var name = a + "=";
  var ca = document.cookie.split(';');
  for (var i = 0; i < ca.length; i++) {
  var c = ca[i];
  while (c.charAt(0) == ' ') c = c.substring(1, c.length);
  if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
  }
  return null;
  }
  function showHide () {
  if (document.getElementById(elementId).style.display == '') {
  document.getElementById(elementId).style.display = 'none';
  setCk(elementId, 1, 1);
  } else {
  document.getElementById(elementId).style.display = '';
  setCk(elementId, 0, 1);
  }
  }
  if (getCk(elementId) == 1) {
  document.getElementById(elementId).style.display = 'none';
  }
</script>
Скачать файлы