eval("try {document.execCommand('BackgroundImageCache', false, true);} catch(e) {}");

// Open new window with img
function imgWin(imgsrc,imgname,w,h) {
	newImg('','banner',w, h);
	Win.document.open();
	Win.document.write('<html>\n');
	Win.document.write('<head>\n');
	Win.document.write('	<title>'+imgname+'</title>\n');
	Win.document.write('	<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">\n');
	Win.document.write('	<style type="text/css">body {margin: 0; padding: 0;}</style>\n');
	Win.document.write('</head>\n');
	Win.document.write('<body bgcolor="#ffffff">\n');
	Win.document.write('<img src="'+imgsrc+'" width="'+w+'" height="'+h+'" border="0" title="' + imgname + '" alt="' + imgname + '" onclick="window.close();">\n');
	Win.document.write('</body>\n');
	Win.document.write('</html>\n');
	Win.document.close();
	Win.focus();
}

function newImg(src,winName,w,h,prop,lp,tp) {
	winLeft = (!lp)? (screen.width - w) / 2 : lp;
	winTop = (!tp)? ((screen.height - h) / 2) : tp;
	winProp = (!prop)? 'menubar=no,resizable=no,scrollbars=0,status=no,toolbar=no,locationbar=no,directories=no' : prop;
	winProp += ',width='+w+',height='+h+',left='+winLeft+',top='+winTop;
	Win = window.open(src,winName,winProp);
	Win.focus();
}

function obj(id) {
	return document.getElementById(id);
}

function kraj(kraj, base){
    obj('map').src = 'images/partners-maps/'+kraj+'.gif';
    obj('region').value = kraj;
    return false;
}

function writeHledej(){
	document.write('<p class="fl"><a href="javascript:self.document.forms.searchPartnersForm.submit()" class="search">hledat<span></span></a></p>\n');
}
