$(document).ready(function(){
        flashMovie = $('#speedtest');
        flashMovie.flash({
            swf: url + 'speedtest/loader.swf',
			flashvars: { version: 2.0 },
            width: 800,
            height: 500,
            play: true,
            wmode: 'transparent',
            id: 'speedtest'
        });
});

function deletePL(str) 
{
	str = str.split("ą").join("a");
	str = str.split("Ą").join("A");
	str = str.split("ź").join("z");
	str = str.split("ż").join("z");
	str = str.split("Ź").join("Z");
	str = str.split("Ż").join("Z");
	str = str.split("ć").join("c");
	str = str.split("Ć").join("C");
	str = str.split("ń").join("n");
	str = str.split("Ń").join("N");
	str = str.split("ł").join("l");
	str = str.split("Ł").join("L");
	str = str.split("ś").join("s");
	str = str.split("Ś").join("S");
	str = str.split("ę").join("e");
	str = str.split("Ę").join("E");
	str = str.split("ó").join("o");
	str = str.split("Ó").join("O");
	
	return str;
} 

function generateLink(title, link) 
{
	var text = document.getElementById(title).value;
	
	if(text) {
		text = deletePL(text);
		text = text.toLowerCase(text);
		text = text.split(" ").join("_");
		text = text.replace(/[^0-9a-zA-Z_-]/g, "");
		document.getElementById(link).value = text;
	} else {
		document.getElementById(link).value = '';
	}

}