function _win(arg1, arg2, arg3) {window.open("http://www.gdansk.pl/zdj.php?file="+arg1,arg2, arg3)}
function _cam(arg1, arg2, arg3) {window.open(arg1,arg2, arg3)}


//document.writeln('<'+'scr'+'ipt type="text/javascript" src="http://s1.hit.stat24.com/_'+(new Date()).getTime()+'/script.js?id=zPean2svvwPKP2Ck2R0Rv4XD.F6dKcxp6olxwxPJOUP.V7/l=11"></'+'scr'+'ipt>');


//---- BEGIN ------ LoadFlashPicture ---------------------------------- [ANDRZEJ] -----

var LoadFlashPictureError = 0;

if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] &&
   navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
   LoadFlashPictureError = 1; else LoadFlashPictureError = 0;

function LoadFlashPicture(file_name, file_type, http_address, title, width, height) {

  if(LoadFlashPictureError) {

    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="' + width + '" height="' + height + '">');
    document.write('<PARAM name="movie" value="' + file_name + '.swf">');
    document.write('<PARAM name="quality" value="high">');
    document.write('<PARAM NAME=scale VALUE=exactfit>'); 
    document.write('<PARAM NAME=bgcolor VALUE=#FFFFFF>');   
    document.write('<embed src="' + file_name + '.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
    document.write('</OBJECT>');

 } else {
  	  document.write('<a href="'+ http_address + '" target="_parent">');
	  document.write('<img src="' + file_name + '.' + file_type + '" vspace="0" hspace="0" width="' + width + '" height="' + height + '" border="0" alt="" title="' + title + '">');
          document.write('</a>');
 	}

}//function LoadFlashPicture(file_name, width, height)

	
//---- END ------ LoadFlashPicture ---------------------------------- [ANDRZEJ] -----


//---- BEGIN ------ Big Picture ---------------------------------- [ANDRZEJ] -----

function Party(search_name, found_name, party_name){

	document.write('<form name="formsearch" action="cal.php" method="post">');
	document.write('<input type="submit" name="Submit" value="" width="1" height="1" style="display:none">');

	document.write('<input name="id" type="hidden" value="search">');
	document.write('<input name="nazwa" type="hidden" value="' + party_name + '" style="clear:both;">');

	document.write('<input name="from_day" type="hidden" value="' + DayToday + '">');
	document.write('<input name="from_month" type="hidden" value="' + (MonthToday + 1) + '">');
	document.write('<input name="from_year" type="hidden" value="' + YearToday + '">');
	document.write('<input name="to_day" type="hidden" value="31">');
	document.write('<input name="to_month" type="hidden" value="12">');
	document.write('<input name="to_year" type="hidden" value="' + (YearToday + 1) +'">');

	document.write('<input name="0" type="hidden" value="0">');
	document.write('</form>');

	if(search_name == "") document.write('Najbliższe spektakle: zobacz&nbsp;');
		else document.write(search_name + '&nbsp;');

	if(search_name == "") document.write('<a href="javascript:document.formsearch.Submit.click();"><b>kalendarz imprez</b></a>');
		else document.write('<a href="javascript:document.formsearch.Submit.click();">' + found_name + '</a>');

}


function ShowBigPicture(file_name, file_type, width_big, height_big)
{
	

	var picture_left = screen.width;
	var picture_top = screen.height;

	if((picture_left > width_big) && (picture_top > height_big))
	  {
		
		picture_left = (picture_left/2) - (width_big/2);
		picture_top = (picture_top/2) - (height_big/2);

	  }
	else
	    {
		picture_left = 0;
		picture_top = 0;
	    }
	
	PictureWindow = window.open('', '', 'toolbar=no, resizable=no, width=' + width_big + ', height=' + height_big + ', left=' + picture_left + ', top=' + picture_top);
	PictureWindow.document.open();
	PictureWindow.document.write('<HTML><HEAD><TITLE>Powiększenie...</TITLE></HEAD><BODY marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">');
	PictureWindow.document.write('<a href="javascript:window.close()"><img src="' + file_name + '_big.' + file_type + '" width=' +
				      			   width_big + ' height=' + height_big + ' vspace="0" hspace="0" border="0" alt="Zamknij okno..."></a>');
	PictureWindow.document.write('</BODY></HEAD>');
	PictureWindow.document.close();
	PictureWindow.focus();

}


function Show(file_name, file_type, width_small, height_small, width_big, height_big)
{
	
	document.write('<img src="' + file_name + '_small.' + file_type + '" width="' +
				width_small + '" height="' + height_small + '" vspace="0" hspace="0" border="0" alt="Powiększ obrazek..." style="cursor:pointer" onClick="ShowBigPicture(\'' + 
				file_name + '\', \'' + file_type + '\', ' + width_big + ', ' + height_big + ')">');
}



function Address(text, file_name, file_type, width_big, height_big)
{
	document.write('<a href="javascript:ShowBigPicture(\'' + file_name + '\', \'' + file_type + '\', ' + width_big + ', ' +
						 height_big + ')" style="cursor:pointer" alt="Zobacz...">' + text + '</a>');
}


//---- END ------ Big Picture ---------------------------------- [ANDRZEJ] -----


//---- BEGIN ---- MOVIE ---------------------------------------- [ANDRZEJ] -----


function _MovieBig(file_path, file_type, width_big, height_big) {

	var window_left = screen.width;
	var window_top = screen.height;
	
	if((window_left > width_big) && (window_top > height_big))  {
			window_left = (window_left/2) - (width_big/2);
			window_top = (window_top/2) - (height_big/2);
  } else {
						window_left = 0;
						window_top = 0;
		    }
	
	MovieWindow = window.open('', '', 'toolbar=no, resizable=no, width=' + width_big + ', height=' + (height_big + 30) +', left=' + window_left + ', top=' + window_top);
	MovieWindow.document.open();
	MovieWindow.document.write('<HTML><HEAD><TITLE>Krótki reportaż...</TITLE></HEAD><BODY marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">');
	MovieWindow.document.write('<EMBED src="' + file_path + '_big.' + file_type + '" width="' + width_big + '" height="' + (height_big + 30) + '" autostart="true" loop="false" align="left" valign="top"></EMBED>');
	MovieWindow.document.write('</BODY></HEAD>');
	MovieWindow.document.close();
	MovieWindow.focus();

}



function _Movie(file_path, file_type, width_small, height_small, width_big, height_big, align_movie) {

	document.write('<table width="' + (width_small + 10) + '" align="' + align_movie + '" border="0" cellspacing="0" cellpadding="0">' +
	'<tr>' +
	    '<td width="' + (width_small + 5) + '" align="center" valign="top"><EMBED src="' + file_path + '_small.' + file_type + '" width="' + width_small + '" height="' + (height_small + 30) + '" autostart="true" loop="false"></EMBED></td>' +
	    '<td width="5">&nbsp;</td>' +
  	'</tr>' +
	  '<tr>' +
    	'<td width="' + (width_small + 5) + '" align="center" valign="top" style="font-size:10px;">Zobacz reportaż w <a href="javascript:MovieBig(\'' + file_path + '\',\'' + file_type + '\',' + width_big + ',' + height_big + ')" style="cursor:pointer" title="Zobacz reportaż w nowym oknie..." style="font-size:10px;"><b>nowym oknie</b></a> lub <a href="' + file_path + '_big.' + file_type + '" style="cursor:pointer" target="_blank" title="Pobierz reportaż na dysk..." style="font-size:10px;"><b>pobierz na dysk</b></a>.</td>' +
	    '<td width="5">&nbsp;</td>' +
	  '</tr>' +
	'</table>');

}



function MovieBig(file_path, file_type, text, width_big, height_big) {

	var window_left = screen.width;
	var window_top = screen.height;
	
	path = "http://www.gdansk.pl/g2/img/player/";
	
	if((window_left > 606) && (window_top > height_big))  {
			window_left = (window_left/2) - (303);
			window_top = (window_top/2) - (height_big/2) - (235/2);
  } else {
						window_left = 0;
						window_top = 0;
		    }
	

	MovieWindow = window.open(path + 'player.php?&file_path=' + file_path + '&file_type=' + file_type + '&text=' + text + '&width_big=' + width_big + '&height_big=' + height_big, '', 'toolbar=no, resizable=no, width=606, height=' + (height_big + 235) +', left=' + window_left + ', top=' + window_top);

	MovieWindow.document.close();
	MovieWindow.focus();

}


function Movie(file_path, file_type, text, width_big, height_big, align_movie) {

	path = "http://www.gdansk.pl/g2/img/player/";

	document.write('<table width="160" align="' + align_movie + '" border="0" cellspacing="0" cellpadding="0">' +
	'<tr>' +
	    '<td width="3">&nbsp;</td>' +
	    '<td width="154" align="center" valign="top"><img src="' + path + 'reportaz.gif" width="150" height="80" vspace="0" hspace="0" border="0" alt="" title="Zobacz reportaż..." style="cursor:hand;" onClick="MovieBig(\'' + file_path + '\',\'' + file_type + '\',\'' + text + '\',' + width_big + ',' + height_big + ')"></td>' +
	    '<td width="3">&nbsp;</td>' +
  	'</tr>' +
	  '<tr>' +
	    '<td width="3">&nbsp;</td>' +	  
    	'<td width="154" align="center" valign="top" class="photo2">' + text + '</td>' +
	    '<td width="3">&nbsp;</td>' +
	  '</tr>' +
	'</table>');

}

//---- END ---- MOVIE ------------------------------------------- [ANDRZEJ] -----


//---- BEGIN ---- SOUND ---------------------------------------- [ANDRZEJ] -----


function Sound_MP3(adress, short_description) {


if((adress.charAt(0) == "o") && (adress.charAt(1) == "f")) {

adress = "files/other/0" + adress.charAt(2) + "/" + adress.charAt(3) + adress.charAt(4) + "/" + adress.charAt(5) + adress.charAt(6) + "_file.mp3";

}


document.write('<table width="100%"  border="0" cellspacing="0" cellpadding="0">' +
   '<tr>' +
    '<td width="45" align="center" valign="top"><a href="' + adress + '" target="_top"><img src="img/Sound/gdansk.gif" width="45" height="42" vspace="0" hspace="0" border="0" alt="Posłuchaj"></a></td>' +
    '<td width="5">&nbsp;</td>' +
    '<td align="left" valign="middle"><a href="' + adress + '" target="_top">' + short_description + '</a></td>' +
  '</tr>' +
'</table>');

}


//---- END ---- SOUND ------------------------------------------- [ANDRZEJ] -----