﻿var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
wincounter=0;
// Handle all the FSCommand messages in a Flash movie.
function index_DoFSCommand(command, args) {
	var amObj = isInternetExplorer ? document.all.am : document.am;
	//args do songHTMLWindow: szerokość&wysokość&url&nazwa_okna&nazwa_piosenki&rozmiar&czas&kompozytor&autor
	if (command=="songHTMLWindow") {
		wincounter++;
		params=args.split("&");
		var winX=(screen.width-Number(params[0]))/2;
		var winY=(screen.height-Number(params[1]))/2-18;
		var win1=window.open("",wincounter,'toolbar=no,menubar=no,location=no,personalbar=no,scrollbars=yes,directories=no,status=no,resizable=no,width='+params[0]+',height='+params[1]);
		win1.moveTo(winX,winY);
		win1.document.open();
		win1.document.write("<HTML><HEAD>");
		win1.document.write("<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>");
		win1.document.write("<TITLE>"+params[3]+"</TITLE></head><html><body><p align='center'>");
		win1.document.write("<a href='"+params[2]+"'><font size='5'><b>"+params[3]+"</b></font></a><br>")
		win1.document.write("<br><br><font size='2'><U>JEŚLI CHCESZ POSŁUCHAĆ PIOSENKI</U><br><br>KLIKNIJ LEWYM PRZYCISKIEM NA LINKU (TYTULE PIOSENKI)")
		win1.document.write("<br><br><br><U>JEŚLI CHCESZ ZAPISAĆ PIOSENKĘ NA SWOIM DYSKU</U><br><br>KLIKNIJ PRAWYM PRZYCISKIEM NA LINKU (TYTULE PIOSENKI), WYBIERZ Z MENU OPCJĘ 'ZAPISZ ELEMENT DOCELOWY JAKO...' I WSKAŻ MIEJSCE ZAPISU</font></p>");
		win1.document.write("</body><html>");
		win1.document.close();	
		win1.document.focus();	
	}
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub index_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call index_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

