function replaceTitlesInit()
{
	/* Check for DOM support */
	if (!(document && document.implementation && document.implementation.hasFeature))
		return;
		
	/* Check for image support */
	if (!document.images)
		return;
		
	/* Tags to be replaced */
	replaceTitles(document.getElementsByTagName('h1'));
}

function replaceTitles(tags)
{
	for (var i = 0; i < tags.length; i++)
	{
		if (tags[i].id)
		{
			var image = document.createElement('img');
			image.className = tags[i].className;
			image.id = tags[i].id;
			image.src = 'images/' + tags[i].id + '.png';;
			image.alt = tags[i].firstChild.nodeValue;
			image.title = tags[i].firstChild.nodeValue;
			tags[i].replaceChild(image,tags[i].firstChild);
		}
	}
}

function open_win(url) {
	window.open(url,'mywin','left=20,top=20,width=720,height=650,toolbar=0,resizable=0');
}


function test_product(){
	if(  DepSelectOne.inst['level_1'].validate()  ){ //note the use of the name of the first SELECT Element in the chain to reference the object instance.
		this.submit();
	}else{
		alert('Wybór jest niekomplety i nieważny');
	}
}

