
document.write('<script type="text/javascript" src="js/jquery-1.2.1.min.js"></script>');
document.write('<script type="text/javascript" src="js/jquery.flash.js"></script>');

//document.write('<script type="text/javascript" src="js/swfobject.js"></script>');
//document.write('<script type="text/javascript" src="js/md5.js"></script>');

function swf(swf, width, height) {
  var date = new Date();
  var id = hex_md5(swf + date.getUTCSeconds() + Math.random());
  document.write('<div id="' + id + '"></div>');
  
  var swfo = new SWFObject(swf, id + 'movie', width, height, "9", "#FFFFFF");
  swfo.write(id);  
}

function startup()
{
  fixanchors();
}

function fixanchors()
{
  base = document.location.href;
  pos = base.indexOf('#');
  if (pos > -1) {
    base = base.substring(0, pos);
  }
  
  anchors = document.getElementsByTagName('a');
  log = '';
  for (x in anchors) {
    log += anchors[x] + "\r\n";
    href = new String(anchors[x].href);
    pos = href.indexOf('#');
    if (pos > -1) {
      log += 'anchor: ' + href.substring(pos) + "\r\n";
      anchors[x].href = base + href.substring(pos);
    }
  }
  //alert(log);
}


function popup(url, width, height)
{
  if (width == undefined) width = 500;
  if (height == undefined) height = 500;
  var base = document.getElementsByTagName('base')[0].href;
  var left =  (screen.availWidth - width) / 2;
  var top =  (screen.availHeight - height) / 2;
  window.open(base + url, '', 'width='+width+',height='+height+',left='+left+',top='+top
                              +',resizable,scrollbars=auto');
}

var hob_imgs = ['', 'strony_www.gif', 'sklepy_internetowe.gif', 'prezentacje_flash.gif', 'poligrafia.gif'];
var hobov_imgs = ['', 'strony_www_ov.gif', 'sklepy_internetowe_ov.gif', 'prezentacje_flash_ov.gif', 'poligrafia_ov.gif'];

var home_current_tab = 'hot1';

function home_show(no)
{
  var tab = 'hot' + no;
  if (home_current_tab != tab) {
    $('#'+home_current_tab).hide('normal', function(){$('#'+tab).show('normal');});
    home_current_tab=tab;
    
  }
  for (i=1; i<5; i++) {
    img = document.getElementById('hob'+i);
    info = document.getElementById('hot'+i);
    if (no == i) {
      img.src = 'images/home/' + hobov_imgs[i];
      //info.style.display = 'block';
    }
    else {
      img.src = 'images/home/' + hob_imgs[i];
      //info.style.display = 'none';
      //$('#hot'+i).fadeOut();
    }
  }
  //blur();*/
  return false;
}
