function show_props(obj, obj_name) {
    var result = ""
    for (var i in obj)
        result += obj_name + "." + i + " = " + obj[i] + "\n"
    return result;
} 

function zvetsit(objekt) {
	alert(this.name);
}

function foto(soubor) {
	window.open('open_image.html?img='+soubor, 'foto', 'toolbar=0,location=0,directories=0,statusbar=0,menubar=0,scrollbars=1,resizable=0');
}


function foto_href(soubor, href) {
	window.open('open_image_href.html?img='+soubor, 'foto', 'toolbar=0,location=0,directories=0,statusbar=0,menubar=0,scrollbars=1,resizable=0');
}

function SetCookie(name, value, den, mesic, rok) {
//	alert(name);
	var expires = new Date(rok, mesic, den);
	document.cookie=name+"="+value+"; expires=" + expires.toUTCString();
//	alert(name+"="+value+"; EXPIRES=" + expires.toUTCString());
//	alert(name+"="+value);
}

function readCookie(name) {
	if (document.cookie == '') { 
		// there's no cookie, so go no further
		return false;
	} else {
	   // there is a cookie
		var firstChar, lastChar;
		var theBigCookie = document.cookie;
		firstChar = theBigCookie.indexOf(name);
	   // find the start of 'name'
		if(firstChar != -1)  {
	   // if you found the cookie
		firstChar += name.length + 1;
	   // skip 'name' and '='
		lastChar = theBigCookie.indexOf(';', firstChar);
	   // Find the end of the value string (i.e. the next ';').
		if(lastChar == -1) lastChar = theBigCookie.length;
			return unescape(theBigCookie.substring(firstChar, lastChar));
		} else {
		   // If there was no cookie of that name, return false.
			return false;
		}
    }
}
