			
			function isEmpty(str){
				if (str == ""){ return true;} return false;
				
			}
			
			
			
			function archive_find(s){
				
				//siteurl = 'http://localhost/beta-wp';
				//siteurl = 'http://holdingsincubatrices.yellowasp-demo.com/beta-wp';
				siteurl = 'http://holdingsincubatrices.com';
				//clear errors
				
				errorDivMsgID = document.getElementById("search-msg");	
				errorDivMsgID.style.display = 'none';
				errorDivMsgID.innerHTML = '';		

				
				//company/cat
				archive_company = document.getElementById('archiveby_company');			
				cat = archive_company.options[archive_company.selectedIndex].value;
				
				
				//split cat
				var cat_ar = cat.split(",");
				//cat_ar[0] - ID
				//cat_ar[1] - SLUG
				
				if (isEmpty(cat)){
					//both empty ask search field
					
					errorDivMsgID.style.display = '';
//					errorDivMsgID.innerHTML = 'Please select year or company to search';
                                        errorDivMsgID.innerHTML = 'Please select company to search';
					
				} 
				
				if (cat){
					//category
					document.location.href= siteurl + '/archive?cat=' + cat_ar[0] + '&serie=' + s ;
//                                        document.location.href= siteurl + '/archive?cat=' + cat_ar[0];
				}
			
			}//end of function archive_presse
			
		
