function applyFilter(id){
			if(document.faceted_search_form.fq==null){
				document.faceted_search_form.fq.value=id;
			}else{
		   		var temp =document.faceted_search_form.fq.value;
			   	document.faceted_search_form.fq.value=temp+'|'+ id;
			}	
			document.faceted_search_form.submit();
}

function applyProductProjectFilter(id){

		if(document.faceted_search_form.fq==null || document.faceted_search_form.fq.value == ''){
			document.faceted_search_form.fq.value='|'+id;
		}
		document.faceted_search_form.submit();
}

function project(id, strUrl){
	document.faceted_search_form.nextUrl.value=strUrl;
	applyFilter(id);

}
		
function removeItem(id){
			var temp =document.faceted_search_form.fq.value;
			if(temp.length>1){
			 var newStr =temp.replace("|"+id,"");
				document.faceted_search_form.fq.value=newStr;
			}
				document.faceted_search_form.submit();
}
function toggle(id){
		
			if(document.getElementById(id)!=null){
			
				var disp =document.getElementById(id).style.display;
				if(disp=='none'){
					document.getElementById(id).style.display='inline';
				}else{
					document.getElementById(id).style.display='none';
				}
			}
		
}
		
		function nextPage(pageNo,start){
			document.faceted_search_form.start.value=start;
			document.faceted_search_form.submit();
		}
		
		function viewPerPage(noOfItems){
			 var selObj=document.frmItemsPerPage.NoitemsPerPage;
			 var selIndex = selObj.selectedIndex;
			 var noOfItems = selObj.options[selIndex].value;
				 document.faceted_search_form.page.value=noOfItems;
				 document.faceted_search_form.submit();
		}
		
		
		function clearFilter(){
			document.faceted_search_form.fq.value='';
			document.faceted_search_form.submit();
		}



