function getLang(type) {
    var lang;
    if (typeof navigator.userLanguage != "undefined") {
        lang = navigator.userLanguage.toUpperCase();
    } else if (typeof navigator.language != "undefined") {
        lang = navigator.language.toUpperCase();
    }
    return (lang && lang.indexOf(type.toUpperCase()) == 0)
}

text = new Array();

if (getLang('pl'))
{
	url = 'http://www.web-album.org/pl/index';
	text[0]='Za&#322;&#243;&#380; bezp&#322;atnie w&#322;asny album w wybranej domenie.';
	text[1]='Za&#322;&#243;&#380; w&#322;asn&#261; stron&#281; ze zdj&#281;ciami.';
	text[2]='Publikuj bezp&#322;atnie w&#322;asne zdj&#281;cia w internecie.';
	text[3]='Publikuj i udost&#281;pniaj zdj&#281;cia znajomym na w&#322;asnej stronie.';
	text[4]='Za&#322;&#243;&#380; w&#322;asne portfolio fotograficzne. Za darmo!';
	text[5]='Czy masz ju&#380; w&#322;asny album w sieci?';
}
else
{
	url = 'http://www.web-album.org/pl/language-change/en';
	text[0]='Create a free online photo album.';
	text[1]='Create your own page with photos.';
	text[2]='Build your own photo galleries.';
	text[3]='Publish and show your photos on the web.';
	text[4]='Start your own photo albums.';
	text[5]='Build your Photography Portfolio. For free!';	
	text[5]='Do you already have your own photo\'s album on the web?';	
}

if (document.location.href.indexOf("setka.pl") < 0) {
	r = '';
	r += '<div style="font-weight:bold;cursor:pointer;border:1px solid #D5D5D5;padding:5px;width:350;font-family:Verdana,Arial,Tahoma,sans-serif;font-size:11px;background-color:#F6F6F6;color:#F00000;text-align:left" onclick="document.location=\'' + url + '\';">';
	r += text[Math.floor(Math.random() * text.length)];
	r += '<div style="text-align:right;margin-top:3px;"><a style="color:#006699" href="' + url + '" target="_blank" onclick="return false;">web-album.org</a></div>';
	r += '</div>';
	document.write(r);
}
