

killFlash = function(){

   	document.getElementById('toplayerflash').style.display = 'none';

}

$ = function ( val )
{

	var result;
	result = document.getElementById(val);

	return result;

}

$F = function ( val )
{

	var result;
	result = document.getElementById(val).value;

	return result;

}

var Try = {
  it: function() {
    var result;

    for (var i = 0; i < arguments.length; i++) {
      var lambda = arguments[i];
      try {
        result = lambda();
        break;
      } catch (e) {}
    }

    return result;
  }
}

doprint = function (id)
{

				toprint("ONEL", $(id).innerHTML);

}

toprint = function (title, content)
{
 
			content = content.replace('<img src="templates/gray/image/print.gif">', '');

				NewWindow=window.open("", "","width=800,height=600,toolbar=no,directories=no,menubar=no,locations=no,status=no,scrollbars=yes,resizable=no,fullscreen=no");
				NewWindow.document.open();

				NewWindow.document.writeln("<html>\n<head>\n</head>");
				NewWindow.document.writeln("<body leftmargin=0 topmargin=0 scroll=yes style=\"background-color:#ffffff; font-family: verdana; font-size: 11px;\" onload=\"print();\">");
				NewWindow.document.writeln("<title>ONEL - "+ title +"</title>");
				NewWindow.document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"../templates/gray/style/style.css\">")
				NewWindow.document.writeln("<style>");
				NewWindow.document.writeln("img { border: none; } table { font-family: verdana; font-size: 11px; }");
				NewWindow.document.writeln("</style>");
				NewWindow.document.writeln("<table width=\"100%\"><tr><td>");
				NewWindow.document.writeln(content);
				NewWindow.document.writeln("</td></tr></table>");
				NewWindow.document.writeln("</body>\n</HTML>\n");
				NewWindow.document.close();
				NewWindow.focus();


}
preview2 = function ( num ) {

		      window.open('fotki.php'+num , 'Fotogaleria', 'width=800,height=650,menubar=no,toolbar=no, scrollbars=yes, left=20, top=20');

}

preview = function ( num ) {

		      window.open('zoom.php?src='+num , 'PODGLĄD', 'width=100,height=100,menubar=no,toolbar=no, scrollbars=yes');

}

preview3 = function ( num ) {

		      window.open('fotki.php'+num , 'Fotogaleria', 'width=100,height=100,menubar=no,toolbar=no, scrollbars=yes,left=20, top=20');

}

function flash(w, h, path)
{

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">\n'
+'<param name="movie" value="'+path+'" />\n'
+'<param name="quality" value="high" />\n'
+'<param name="menu" value="0" />\n'
+'<param name="wmode" value="transparent" />\n'
+'<embed src="'+path+'" width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="0" wmode="transparent"></embed>\n'
+'</object>');

}


function flashWT(w, h, path)
{

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">\n'
+'<param name="movie" value="'+path+'" />\n'
+'<param name="quality" value="high" />\n'
+'<param name="menu" value="0" />\n'
+'<embed src="'+path+'" width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="0"></embed>\n'
+'</object>');

}

function rollON(id, clr)
{

 if (document.getElementById(id)) { document.getElementById(id).style.backgroundColor=clr; }

}
