
function set_cookie(name,value,expires,path,domain,secure) {
   var today=new Date();
   today.setTime(today.getTime());

if (expires) {
  expires = expires;
}

var expires_date = new Date( today.getTime() + (expires));

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
 
} 
function zpracuj_stranku(kamzpatky){

set_cookie('flt_znacka', '', -3600, '/', '', '');  
set_cookie('flt_znacka', 'all', 8000*1000*60*60*24, '/', '', '');  

set_cookie('flt_rok', '', -3600, '/', '', '');  
set_cookie('flt_rok', 'all', 8000*1000*60*60*24, '/', '', ''); 

set_cookie('flt_auto', '', -3600, '/', '', '');  
set_cookie('flt_auto', 'all', 8000*1000*60*60*24, '/', '', '');  

window.location.replace(kamzpatky); 
}

function razeni(kamzpatky){

stavik = document.getElementById('razenicko').value;
 
set_cookie('radit', '', -3600, '/', '', '');  
set_cookie('radit', stavik, 8000*1000*60*60*24, '/', '', '');  

window.location.replace(kamzpatky); 
}


function zpracuj_filtr(kamzpatky){
				
				stav = document.getElementById('urjedna').value;
				set_cookie('flt_znacka', '', -3600, '/', '', '');  
				set_cookie('flt_znacka', stav, 8000*1000*60*60*24, '/', '', '');  
	 
	 
	 			stav2 = document.getElementById('urdva').value;
				set_cookie('flt_rok', '', -3600, '/', '', '');  
				set_cookie('flt_rok', stav2, 8000*1000*60*60*24, '/', '', '');  
				
				stav3 = document.getElementById('urtri').value;
				set_cookie('flt_auto', '', -3600, '/', '', '');  
				set_cookie('flt_auto', stav3, 8000*1000*60*60*24, '/', '', '');  
	 
				window.location.replace(kamzpatky); 
}
 
 function getWindowsSize(){
 
 var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}
	
	arrayWindowsSize = new Array(windowWidth,windowHeight);
	return arrayWindowsSize;
}

function closeSB(){
document.getElementById('slide-box').style.display="none";
set_cookie('slideSBclosed', 1, 0, '/', '', '');
}
 
