function search() {
	var pointure = document.getElementsByName(pointure);
	var price = document.getElementByName('price');
	var ref = document.getElementByName('ref');
	if ( pointure.value == 'POINTURE_SEARCH_ALL' &&
		 price.value == 'PRICE_SEARCH_ALL' &&
		 ref.value == 'ref'  ) return false;
	document.forms['SearchForm'].submit();
}

function searchCategory(catId,fromCat) {
	document.forms['SearchForm'].fromCat.value = fromCat;
	document.forms['SearchForm'].catId.value = catId;
	document.forms['SearchForm'].submit();
}

var top = '';
var ns4=document.layers;
var ie4=document.all;
var ns6=document.getElementById&&!document.all;

function changeTop(category) {
	var oldcat = 'top_'+top;
	var newcat = 'top_'+category;
	
	if (ie4) {
		if (top != '')
			document.all[oldcat].style.display='none';
		document.all[newcat].style.display='block';
	}
	if (ns4) {
		if (top != '')
			eval("document.scroll.document.scroll2.document."+oldcat+".display='none'");
		eval("document.scroll.document.scroll2.document."+newcat+".display='block'");
	}
	if (ns6) {
		if (top != '')
			document.getElementById(oldcat).style.display='none';
		document.getElementById(newcat).style.display='block';
	}	
	
	top = category;
}

function changeSort(sortName, sortForm) {
	document.location.href = document.forms[sortForm].action + "?sort=" + sortName.value;
}

function changeSearchSort(sortName, sortForm) {
	var pointure = document.forms[sortForm].pointure.value;
	var price = document.forms[sortForm].price.value;
	var ref = document.forms[sortForm].ref.value;
	var catId = document.forms[sortForm].catId.value;
	var fromCat = document.forms[sortForm].fromCat.value;
	
	var param = "?sort="+sortName.value+"&pointure="+pointure+"&price="+price+"&ref="+ref+"&catId="+catId+"&fromCat="+fromCat;
	
	document.location.href = document.forms[sortForm].action + param;
}

function advancedSearch(women) {
	document.forms['SearchForm'].searchWomen.value = women;
}

//Function to show or hide a DIV
function showHide(ObjectId, classCSS){
	var btId = "bt_" + ObjectId;
	var DivRef = document.getElementById(ObjectId);
	var IfrRef = document.getElementById('DivShim');
	
	if(DivRef){
		if(DivRef.style.display=="none"){
			classCSS = classCSS + "_active";
			document.getElementById(btId).className = classCSS;
			
			Nom = navigator.appName;
			if(Nom == 'Microsoft Internet Explorer')
			{
			DivRef.style.display = "block";
			IfrRef.style.width = DivRef.offsetWidth;
			IfrRef.style.height = DivRef.offsetHeight;
			IfrRef.style.zIndex = DivRef.style.zIndex - 1;
			IfrRef.style.display = "block";
			}
			else
			{
			DivRef.style.display = "block";
			IfrRef.style.width = DivRef.offsetWidth+"px";
			IfrRef.style.height = DivRef.offsetHeight+"px";
			IfrRef.style.top = "106px";
			IfrRef.style.left = "196px";
			IfrRef.style.zIndex = DivRef.style.zIndex - 1;
			IfrRef.style.display = "block";
			}
			
			
			
		}
		else if(DivRef.style.display=="block"){
			document.getElementById(btId).className = classCSS;
			DivRef.style.display="none";
			IfrRef.style.display="none";
		}
	}
}

//Function to hide a DIV
function hide(ObjectId){
	if(document.getElementById(ObjectId)){
		document.getElementById(ObjectId).style.display="none";
	}
}


