function changepicture(pictid)
{
	var elements = document.getElementById('photodiv');
	if (elements)
		elements = elements.getElementsByTagName('img');
	if (elements)
	for (i=0;i<elements.length;i++)
	{
		if (elements[i].className=='bigpicture')
			elements[i].className = 'bigpicturehidden';
	}
	
	document.getElementById(pictid).className = 'bigpicture';
}

function targetBlank2()
{
	var oLinks = document.getElementsByTagName('a');
	for( var i=0; i < oLinks.length; i++ ) 
	{
		if( oLinks[i].className == 'smfont') 
		{
			oLinks[i].onclick = function()
				{
					window.open(this.href,"CartCode","menubar=no,width=600,toolbar=no");
					return false;
				};
		}
	}
}

function sendsearchform(url)
{
	var formu = document.getElementById('searchform');
	formu.action=url;
	formu.submit();
}

function orderchange(el)
{
	if (el)
	{
		var uri = location.href;
		wyrazy 	= uri.split("/");
		selecte = el.options[el.selectedIndex].value;
		output = uri;
		if (wyrazy.length >=5)
		{
			if (selecte != 'default')
			{
				output = wyrazy[0] +"/"+ wyrazy[1] +"/"+ wyrazy[2] +"/"+ wyrazy[3] +"/"+ wyrazy[4];
				output += "/"+"order"+"/"+selecte
				
			}
			else
			{
				output = wyrazy[0] +"/"+ wyrazy[1] +"/"+ wyrazy[2] +"/"+ wyrazy[3] +"/"+ wyrazy[4];
			}
		}
		
		document.location = output;
	}
}

function tabclick(tab)
{
	var tab1 = document.getElementById('tab1');
	var tab2 = document.getElementById('tab2');
	var tab3 = document.getElementById('tab3');
	
	var tab1c = document.getElementById('tab1conent');
	var tab2c = document.getElementById('tab2conent');
	var tab3c = document.getElementById('tab3conent');
	
	if (tab == 'tab1')
	{
		if (tab2)
		{
			tab2.className = 'tab2';
			tab2c.className = 'hiddenconttab';
		}
		if (tab3)
		{
			tab3.className = 'tab3';
			tab3c.className = 'hiddenconttab';
		}
		tab1.className  = 'tab1 selectedtab';
		tab1c.className = 'activeconttab';
	}
	
	if (tab == 'tab2')
	{
		if (tab1)
		{
			tab1.className = 'tab1';
			tab1c.className = 'hiddenconttab';
		}
		if (tab3)
		{
			tab3.className = 'tab3';
			tab3c.className = 'hiddenconttab';
		}
		tab2.className  = 'tab2 selectedtab';
		tab2c.className = 'activeconttab';
	}
	if (tab == 'tab3')
	{
		if (tab2)
		{
			tab2.className = 'tab2';
			tab2c.className = 'hiddenconttab';
		}
		if (tab1)
		{
			tab1.className = 'tab1';
			tab1c.className = 'hiddenconttab';
		}
		tab3.className  = 'tab3 selectedtab';
		tab3c.className = 'activeconttab';
	}
}