function popup_writedoc(href,doc,alt) {
  doc.open();
  doc.write('<?xml version="1.0" encoding="ISO-8859-2" ?>');
  doc.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">');
  doc.write('<html xmlns="http://www.w3.org/1999/xhtml">');
  doc.write('<head><title>'+alt+'</title>');
  doc.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />');
  doc.write('<style type="text/css">body {margin: 0; padding: 0; overflow: hidden; background: #fff; cursor: pointer; font-family: verdana,arial,sans-serif; font-size: 12px; text-align: center; font-weight: bold; color: #990304}');
  doc.write('img {display: none}')
  doc.write('li {float: left; margin: 0; padding: 0 4px}');
  doc.write('li#web {float: right}');
  doc.write('ul {list-style: none; margin: 0; padding: 0; display: block; padding-top: 6px; display: none}</style>');
  doc.write('</head><body onclick="window.close()" onload="obrazek(\'img1\')"><div style="padding-top: 40px">£adujê...</div>');
  doc.write('<script src="http://www.miss.studentek.pl/js/resize.js"></script><img id="img1" src="'+href+'" alt="'+alt+'" title="Kliknij, aby zamkn±æ okno" /><ul><li>'+alt+'</li><li id="web">Konkurs Miss Foto Studentek 2006</li></ul></body></html>');
  doc.close();
}

function poplink(obj) {
  var alt = obj.getElementsByTagName('img')[0].getAttribute('alt');
  var winopts = "dependent=yes,resizable=no,toolbar=no,scrollbars=yes,width=1,height=1";
  if (win = window.open(obj.href,'_blank',winopts)) {
     popup_writedoc(obj.href,win.document,alt);
     return false;
  }
  return true;
}

function popup_flat_writedoc(href,doc,alt,width,height) {
  doc.open();
  doc.write('<?xml version="1.0" encoding="ISO-8859-2" ?>');
  doc.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">');
  doc.write('<html xmlns="http://www.w3.org/1999/xhtml">');
  doc.write('<head><title>'+alt+'</title>');
  doc.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />');
  doc.write('<style type="text/css">body {margin: 0; padding: 0; background: #fff; cursor: pointer}</style>');
  doc.write('</head><body onclick="window.close()">');
  if (href.substring(href.lastIndexOf('.')+1)=='swf')
        popup_swf(doc,href,width,height)
  else
        popup_jpg(doc,href,alt);
  doc.write('</body></html>');
  doc.close();
}

function popup_jpg(doc,href,alt) {
  doc.write('<img src="'+href+'" alt="'+alt+'" title="Kliknij, aby zamkn±æ okno" />');
}

function popup_swf(doc,href,width,height) {
  doc.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'" align="middle">');
  doc.write('<param name="allowScriptAccess" value="sameDomain" />');
  doc.write('<param name="movie" value="'+href+'" />');
  doc.write('<param name="quality" value="high" />');
  doc.write('<embed src="'+href+'" quality="high" width="'+width+'" height="'+height+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
  doc.write('</object>')
}


function popup(obj,width,height) {
  var winopts = "dependent=yes,toolbar=no,resizable=no,width="+width+",height="+height;
  var alt = obj.getElementsByTagName('img')[0];
  if (alt) {
          alt = alt.getAttribute('alt')
          win = window.open('about:blank','_blank',winopts)
          if (!win)
                 return true
          popup_flat_writedoc(obj.href,win.document,alt,width,height);
          return false
  }
  if (window.open(obj.href,'_blank',winopts))
    return false
  return true;
}


function disableButtons(arg) {
if (arg!=1)
window.setTimeout("disableButtons(1)", 0)
else {
for (var i=0; i<document.forms.length; i++) {
var form=document.forms[i]
for (var j=0; j<form.elements.length; j++) {
var type=form.elements[j].type.toLowerCase()
if (type=="submit"||type=="reset"||type=="file")
form.elements[j].disabled=true
}}}}

/*
window.onload = function() {with(document.body.style) {border='1px'; border='0'}}
window.onload = function() {with(document.getElementsByTagName('html')[0].style) {border='1px'; border='0'}}
*/


function addFav(o) {
	if (window.external) {
		window.external.AddFavorite(o.href, o.title);
		return false
	}
	return true
}

function setHomepage(o) {
	o.style.behavior='url(#default#homepage)'
	o.sethomepage(o.href);
	return false
}

