function setCookie(name, value, expires, path, domaine, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domaine) ? "; domain=" + domaine : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function od18(wybor) {
	if(wybor=='tak'){
		setCookie('od18zgoda','zgoda','','/','','');
		location.reload();
	}
	if(wybor=='nie') {
		window.location.replace('http://www.alejahandlowa.pl')
	}
}


function homepage() {
	if (!document.all)
        	document.getElementById("HomepageLink").style.display = "none"; 
}

function postData(url, obj)  {
   var frm, ipt;
   frm = document.createElement('form');
   document.body.appendChild(frm);
   for (var v in obj) {
     with (ipt = document.createElement('input')) {
       type = 'hidden';
       name = v;
       value = obj[v];
     }
     frm.appendChild(ipt);
   }
   with(frm) {
     action = url;
     method = 'post';
     submit();
   }
  }

function branchSelect(){
	var frm, ipt;
	frm = document.getElementById('searchFormF');
	with(ipt = document.createElement('input')) {
		type = 'hidden';
		name = 'bp';
		value = '';
	}
	frm.appendChild(ipt);
	document.forms["searchFormF"].submit();
}


function bookmark() {
	var tytul = 'AlejaHandlowa'; 
	var adres = 'http://alejahandlowa.pl'; 

	if (window.sidebar) { 
		window.sidebar.addPanel(tytul, adres, '');  
	}else if(window.external){ 
		window.external.AddFavorite(adres, tytul); 
	}else if (window.opera && window.print) { 
		var a = document.createElement('a'); a.setAttribute('href', adres); a.setAttribute('title', tytul); a.setAttribute('rel','sidebar'); a.click(); 
	}
}
