// custom javascript site functions
function openRegisterWin(link,width,height) { 
// other window options... 
// toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes 
// this eg opens a window in the top left, with no window features that you can't resize. 
// left and top can be left out 

if (typeof width == "undefined") width = 300
if (typeof height == "undefined") height = 300

window.open (link, "registerwin", "left=0,top=0,width="+width+",height="+height); 

}


// h's cooke code
// cookie code for legal notice on homepage
var bikky = document.cookie;
function getCookie(name) { // use: getCookie("name");
	var index = bikky.indexOf(name + "=");
	if (index == -1) return null;
	index = bikky.indexOf("=", index) + 1; // first character
	var endstr = bikky.indexOf(";", index);
	if (endstr == -1) endstr = bikky.length; // last character
	return unescape(bikky.substring(index, endstr));
}

function setCookie(NameOfCookie, value, expiredays) {
// Three variables are used to set the new cookie. 
// The name of the cookie, the value to be stored,
// and finally the number of days until the cookie expires.
// The first lines in the function convert 
// the number of days to a valid date.
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
// The next line stores the cookie, simply by assigning 
// the values to the "document.cookie" object.
// Note the date is converted to Greenwich Mean time using
// the "toGMTstring()" function.
document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
} 

function openBrWindow(theURL,winName,features) { 
	var w;
	if(window.name=='Zlate_mince'){
		//if(w.name='Zlate_mince'){
		//	alert("w exists");
		}
		else{
			w = window.open(theURL,winName,features);//alert(w.name);
			w.focus();
		}
	//}
	return false;
}
