function setfuncs() {
	
	// Ustawiamy język
	
	lang = location.href.indexOf('/pl/') == -1 ? 'En' : 'Pl';
	
	// Ustawiamy teksty w dwóch językach
	
	teksty = {
		'Pl': {
			'h2asort' : 'Rodzaje przedmiotów',
			'noajax' : 'Niestety, nie udało się wyświetlić oferty, gdyż Twoja przeglądarka stron WWW nie pozwala na stosowanie AJAX',
			'oldie' : 'Twoja przeglądarka stron WWW może mieć kłopoty z wyświetlaniem tej strony. Zaktualizuj przeglądarkę Internet Explorer do najnowszej wersji, lub zainstaluj inną przeglądarkę.',
			'telmail' : 'Musisz podać telefon lub e-mail, inaczej nie będziemy mogli odpowiedzieć na Twoje pytanie.',
			'h2found' : 'Wyniki wyszukiwania',
			'nonefound' : 'Niestety, nie znaleziono żadnych pasujących przedmiotów.',
			'zapytthx' : 'Dziękujemy za zainteresowanie, skontaktujemy się',
			'parseemailerr' : 'Podany w formularzu adres E-mail był nieprawidłowy.',
			'parsenocontact' : 'Nie podano adresu E-mail ani numeru telefonu.',
			'noid' : 'Pozycja nie istnieje',
			'back2item' : 'Wróć na stronę przedmiotu',
			'askexpert' : 'Zapytaj naszych specjalistów o ten przedmiot'
		},
		'En': {
			'h2asort' : 'Stuff categories',
			'noajax' : "Sorry, but the offer cannot be displayed because your WWW browser doesn't allow AJAX",
			'oldie' : "Your WWW browser may have a problem displaying this site. Please upgrade Internet Explorer to the latest version or install another browser.",
			'telmail' : 'You must enter either phone or e-mail for us to contact you.',
			'h2found' : 'Search results',
			'nonefound' : 'Sorry, but no matching items are found.',
			'zapytthx' : "Thank you for interesting, we'll contact you",
			'parseemailerr' : 'E-mail given in the form is incorrect.',
			'parsenocontact' : "You didn't pass your E-mail or phone number.",
			'noid' : "Item does not exist",
			'back2item' : "Back to item description",
			'askexpert' : "Ask our experts about this item"
		}
	};
	
	// Ostrzegamy przed starym IE
	
	var ie = navigator.userAgent.indexOf( 'MSIE' );
	if( ie >= 0 ) {
		try {
			var v = parseInt( navigator.userAgent.charAt( ie+5 ) );
			if( v<7 && v>2 ) alert( teksty[ lang ].oldie );
		} catch(e) {};
	};
	
	// Parsujemy argumenty GET
	
	var adres = location.href;
	if( adres.indexOf('?') != -1 ) {
		var getstr = adres.substr(adres.indexOf('?') + 1);
		var pary = getstr.split('&');
		opts = {};
		for( i in pary ) {
			var dwa = pary[i].split('=');
			opts[ dwa[0] ] = dwa[1];
		};
	} else opts = {};
	
	// Wyświetlamy ewentualny komunikat
	
	if( opts.msg )
		alert( teksty[ lang ][ opts.msg ] );
	
	// Wyszukiwanie elementów wg klas
	
	document.getElementsByClassName = function(cl) {
		var retnode = [];
		var myclass = new RegExp('\\b'+cl+'\\b');
		var elem = this.getElementsByTagName('*');
		for (var i = 0; i < elem.length; i++) {
			var classes = elem[i].className;
			if (myclass.test(classes)) retnode.push(elem[i]);
		};
		return retnode;
	};
	
	// Uniwersalny odpowiednik document.importNode()
	
	if (!document.ELEMENT_NODE) {
		document.ELEMENT_NODE = 1;
		document.ATTRIBUTE_NODE = 2;
		document.TEXT_NODE = 3;
		document.CDATA_SECTION_NODE = 4;
		document.ENTITY_REFERENCE_NODE = 5;
		document.ENTITY_NODE = 6;
		document.PROCESSING_INSTRUCTION_NODE = 7;
		document.COMMENT_NODE = 8;
		document.DOCUMENT_NODE = 9;
		document.DOCUMENT_TYPE_NODE = 10;
		document.DOCUMENT_FRAGMENT_NODE = 11;
		document.NOTATION_NODE = 12;
	};
	
	document.__importNode = function(node, allChildren) {
		switch (node.nodeType) {
			case document.ELEMENT_NODE:
				if( node.nodeName == 'script' || node.nodeName == 'object' || node.nodeName == 'embed' )
					return null; // Nie kopiujemy potencjalnego syfu
				var newNode = document.createElement(node.nodeName);
				/* does the node have any attributes to add? */
				if (node.attributes && node.attributes.length > 0)
					for (var i = 0;  i < node.attributes.length; i++)
						newNode.setAttribute(node.attributes[i].nodeName, node.getAttribute(node.attributes[i].nodeName));
				/* are we going after children too, and does the node have any? */
				if (allChildren && node.childNodes && node.childNodes.length > 0)
					for (var i = 0; i < node.childNodes.length; i++)
						newNode.appendChild(document.__importNode(node.childNodes[i], allChildren));
				return newNode;
				break;
			case document.TEXT_NODE:
			case document.CDATA_SECTION_NODE:
			case document.COMMENT_NODE:
				return document.createTextNode(node.nodeValue);
				break;
		};
	};
	
	document._importNode = function(newNode, dest) {
		var importedNode = null;
		if (newNode) {
			importedNode = document.__importNode(newNode, true);
			dest.appendChild(importedNode);
			if (!document.importNode)
				dest.innerHTML = dest.innerHTML;
		};
		return importedNode;
	};
	
	/**
	* Returns true if 's' is contained in the array 'a'
	* @author Johan Känngård, http://dev.kanngard.net
	*/
	window.contains = function(a, e) {
		for(j=0;j<a.length;j++)if(a[j]==e)return true;
		return false;
	}
	
	/**
	* Removes duplicates in the array 'a'
	* @author Johan Känngård, http://dev.kanngard.net
	*/
	window.unique = function(a) {
		var tmp = new Array(0);
		for(i=0;i<a.length;i++){
			if(!window.contains(tmp, a[i])){
				tmp.length+=1;
				tmp[tmp.length-1]=a[i];
			}
		}
		return tmp;
	}
	
	// Ustawiamy pieczątkę z numerem telefonu
	
	var img = document.createElement('img');
	img.id = 'pieczatka';
	document.getElementById('h1').appendChild(img);
	// window.numery = ['tel56.png','tel509.png','tel728.png']; // auto-top
	numery = ['tel564.png', 'tel785.png']
	curtel = 0;
	var img = document.getElementById('pieczatka');
	img.src = '../current.style/'+numery[0];
	img.style.visibility = 'visible';
	setInterval( function() {
		if(++window.curtel >= window.numery.length) window.curtel = 0;
		var img = document.getElementById('pieczatka');
		img.style.visibility = 'hidden';
		img.src = '../current.style/'+window.numery[window.curtel];
		setTimeout("document.getElementById('pieczatka').style.visibility='visible';", 1500);
	}, 15000 );
	
};

