
function setCookie(c_name,value,expiredays)
{
var myDomain = document.domain.split('.');


myDomain.reverse();

var domena = '.'+myDomain[1]+'.'+myDomain[0];

var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);


document.cookie = c_name+"="+escape(value)+";expires="+exdate.toGMTString()+";domain="+domena;

}

  function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}


function chowaj_zyczenia() {
    document.getElementById('zyczenia').style.display = "none";
    document.getElementById('zyczenia_ster').style.display = "none";
    setCookie('ukryj_zyczenia', 'tak', 1000);
}

function chowaj() {
    document.getElementById('b_corp').style.height = "20px";
    setCookie('b_corp_c', 'nie', 1000);
    pokazywanie = 'nie';
}

function pokaz() {
    document.getElementById('b_corp').style.height = "50px";
    setCookie('b_corp_c', 'tak', 1000);
    pokazywanie = 'tak';
}

function przelacz() {
    if(pokazywanie == 'tak') {
	chowaj();
    } else {
	pokaz();
    }
}


var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;




 function getWidth()

 {

         var x = 0;

         if (self.innerHeight)

         {

                 x = self.innerWidth;

         }

         else if (document.documentElement && document.documentElement.clientHeight)

         {

                 x = document.documentElement.clientWidth;

         }

         else if (document.body)

         {

                 x = document.body.clientWidth;

         }

         return x;

 }



 function getHeight()

 {
         var y = 0;
         if (self.innerHeight)
         {
                 y = self.innerHeight;
         }
         else if (document.documentElement && document.documentElement.clientHeight)
         {
                 y = document.documentElement.clientHeight;
         }
         else if (document.body)
         {
                 y = document.body.clientHeight;
         }
         return y;

 }



  var szerokosc = getWidth();
  var wysokosc = getHeight();

  var szerokosc_ster = getWidth() - 200;
  var wysokosc_ster = getHeight() - 80;

var pokazywanie = getCookie('b_corp_c') == 'nie';


var wyswietl =
'<style type="text/css">'
+ 'body {margin-bottom: 30px}'
+ '#b_corp {z-index: 100000;position: absolute; left: 0; bottom: 0; width: 100%; background: url(http://tuwy.pl/js/pozostale.png) top center no-repeat}'
+ 'body > div#b_corp {position: fixed;}'
+ '#b_corp_top {height: 17px; width: 180px; margin: 0 auto; cursor: pointer}'
+ '#b_corp_ster {position: absolute; top: 24px; right: 5px; cursor: pointer;}'
+ '#b_corp_body {text-align: left; color: #d4d4d4; font: 11px/100% verdana; padding: 8px 0 5px 0; height: 20px;}'
+ '#b_corp_body ul {margin: 0; padding: 0;}'
+ '#b_corp_body ul li {position: relative; list-style: none; background: none; float: left; border-right: 1px solid #505050; padding: 2px 8px 0 8px; height: 15px !important;}'
+ '#b_corp_body a:link {color: white; text-decoration: none;}'
+ '#b_corp_body a:visited {color: white; text-decoration: none;}'
+ '#b_corp_body a:hover {color: green; text-decoration: none; border: none;}'
+ '#b_corp_body .last {border: none}'
+ '#b_corp_body ul li ul li {float: none;}'
+ '#m2 {border: 1px solid red; visibility: hidden; position: absolute; bottom: 25px; left: 0px; background: white; color: black;}'
+ '#zyczenia_ster {font-size: 1.5em; background: white; color: red; border: 2px solid black; padding: 5px; text-align: center; line-height: 90%; height: 40px; width: 80px; position: absolute; z-index: 100000000; bottom: '+wysokosc_ster+'px; left: '+szerokosc_ster+'px; font-weight: bold; cursor: pointer;  }'
+ '#zyczenia_link {border: 2px solid black; text-align: center;height: 60px; width: 150px; position: absolute; z-index: 1000; bottom: 25px; right: 40px; font-weight: bold; cursor: pointer;  }'
+ '</style>'
+ '<!--[if gte IE 5.5]><![if lt IE 7]><style type="text/css">'
+ 'div#b_corp {'
+ 'background: url(http://tuwy.pl/js/pozostale.gif) top center no-repeat;'
+ 'left: expression( ( 0 - b_corp.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + \\\'px\\\' );'
+ 'top: expression( ( 0 - b_corp.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + \\\'px\\\' );}'
+ '</style>'
+ '<![endif]><![endif]-->'
+ '<div id="b_corp"><div id="b_corp_top" onclick="przelacz()"></div><div id="b_corp_body">'
+ '  <ul>'
+ '  <li><a href="http://gry-strategiczne.org" title="Gry Strategiczne" rel="nofollow">gry-strategiczne.org</a></li>'
+ '  <li><a href="http://paski.org" title="Paski komiksowe" rel="nofollow">paski.org</a></li>'
+ '  <li><a href="http://ogry.org" title="Gry online" rel="nofollow">ogry.org</a></li>'
+ '  <li><a href="http://gry-escape.pl" title="Gry typu escape i point&click" rel="nofollow">gry-escape.pl</a></li>'
+ '  <li><a href="http://gdzieco.pl" title="Informator kulturalny" rel="nofollow">gdzieco.pl</a></li>'
+ '  <li><a href="http://zwiedzaj-polske.pl" title="Tursytyczna baza wiedzy o Polsce" rel="nofollow">zwiedzaj-polske.pl</a></li>'
+ '  <li><a href="http://antidotum.org" title="Ogólnotematyczne forum dyskusyjne" rel="nofollow">antidotum.org</a></li>'
+ '  <li><a href="http://kurde.pl" title="Humor na Kurde.pl!" rel="nofollow">kurde.pl</a></li>'
+ '  <li><a href="http://pogodzinach.kurde.pl" title="Rozrywkowy newsletter" rel="nofollow">pogodzinach.kurde.pl</a></li>'
+ '  <li class="last"><a href="http://humor.kurde.pl" title="Dowcipy i kawały" rel="nofollow">humor.kurde.pl</a>'
+ '</li>'
  + '</ul>';
  wyswietl += '</div></div>';

document.write(wyswietl);

if(getCookie('b_corp_c') == 'nie') {
    chowaj();
}