function changeCategory() {
	var temp=location.href,temp2;
	if (temp.indexOf('?')) temp=temp.substr(0,temp.indexOf('?'));

	temp+="../";
	if (this.options[this.selectedIndex].value) temp+=escape(this.options[this.selectedIndex].value);
	else temp+=escape(this.options[this.selectedIndex].firstChild.nodeValue);
	temp+="/";
	if (document.getElementById("sortBy")) temp2=document.getElementById("sortBy").options[document.getElementById("sortBy").selectedIndex].value;
	if (temp2) temp+="?sortBy="+escape(temp2);
	location.href=temp;
}

function changeSort() {
	var temp=location.href,temp2;
	if (temp.indexOf('?')) temp=temp.substr(0,temp.indexOf('?'));

	temp2=document.getElementById("sortBy").options[document.getElementById("sortBy").selectedIndex].value;
	if (temp2) temp+="?sortBy="+escape(temp2);
	location.href=temp;
}


function featuredHomeEvents() {
	var temp;
	if (!document.getElementById("category")) return;
	document.getElementById("category").onchange=changeCategory;
	if (document.getElementById("sortBy")) document.getElementById("sortBy").onchange=changeSort;
}


if (window.addEventListener) window.addEventListener("load",featuredHomeEvents,false);
else window.attachEvent("onload",featuredHomeEvents);