/* NI V UPORABI (25.8.2010)
function setOpacity(aObj, newOpacity) {
	if (aObj == null || aObj.style == null) return false;
	aObj.style.opacity = (newOpacity / 100);
	aObj.style.MozOpacity = (newOpacity / 100);
	aObj.style.KhtmlOpacity = (newOpacity / 100);
	aObj.style.filter = 'alpha(opacity=' + newOpacity + ')';
}

function TPopupFader() {
	this.step = 20;
	this.fadeTimer = null;
	this.popupHandle = null;
	this.textContainerHandle = null;
	this.currentOpacity = 80;
	
	this.fade = function() {
		this.currentOpacity -= this.step;
		if (this.currentOpacity < this.step) {
			this.currentOpacity = 0;
			if (this.popupHandle != null) this.popupHandle.style.display = 'none';
			clearTimeout(this.fadeTimer);
		}
		setOpacity(this.popupHandle, this.currentOpacity);
		setOpacity(this.textContainerHandle, 100 - this.currentOpacity);
	}
	
	this.startToFade = function() {
		clearTimeout(this.fadeTimer);
		this.popupHandle = document.getElementById('dobra_vila_popup');
		this.textContainerHandle = document.getElementById('dostava_hrana');
		this.fadeTimer = setInterval('popupFader.fade()', 100);
	}
}

var popupFader = new TPopupFader();
*/

function setCookie(name, value, days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = '; expires='+date.toGMTString();
	}
	 else var expires = '';		// prazen expires pomeni, da cookie expires takoj, ko zapremo browser...
	document.cookie = name+'='+value+expires+'; path=/';
}


/* NI V UPORABI (25.8.2010)
function closePopup(cookieName) {
	cookieName = 'popup_'+cookieName;
	setCookie(cookieName, 'no', 1);
	var objPopupWindow = document.getElementById('dobra_vila_popup');
	if (!objPopupWindow) return false;
	objPopupWindow.style.display = 'none';
	popupFader.startToFade();
}
*/

/*
function closePopup() {
	var objPopupWindow = document.getElementById('dobra_vila_popup');
	if (!objPopupWindow) return false;
	objPopupWindow.style.display = 'none';
	setOpacity(document.getElementById('dostava_hrana'), 100);
}
*/
