function openWindow(url){wasOpen=false;win=window.open(url);return (typeof(win)=='object')?true:false;}
function openwin(url,name,width,height){wasOpen=false;win=window.open(url,name,"width="+width+",height="+height+",scrollbars=no");return (typeof(win)=='object')?true:false;}
function openwin2(url,name,width,height){wasOpen=false;win=window.open(url,name,"width="+width+",height="+height+"");return (typeof(win)=='object')?true:false;}
function SetFocus(arg){objGet(arg).focus();}
function fitWinToContent(){
	
if(typeof(objGet('fotka'))=='object'){var rozmer_vyska;if(window.screen){rozmer_vyska=objGet('fotka').offsetHeight;if (rozmer_vyska>=screen.availHeight){rozmer_vyska=screen.availHeight;}else{rozmer_vyska=objGet('fotka').offsetHeight;window.focus();}window.resizeTo(objGet('fotka').offsetWidth+10,rozmer_vyska+27);window.focus();}}}
function fitWinToContent2(){if(typeof(objGet('fotografie-produkt'))=='object'){var rozmer_vyska;if(window.screen){rozmer_vyska=objGet('fotografie-produkt').offsetHeight;if (rozmer_vyska>=screen.availHeight){rozmer_vyska=screen.availHeight;}else{rozmer_vyska=objGet('fotografie-produkt').offsetHeight;window.focus();}if(objGet('fotka').offsetWidth<300){rozmer_sirka=300;}else{rozmer_sirka=objGet('fotka').offsetWidth+10;}window.resizeTo(rozmer_sirka,rozmer_vyska+27);window.focus();}}}
function objGet(x){if(typeof x!='string') return x;
else if(Boolean(document.getElementById))
return document.getElementById(x);
else if(Boolean(document.all))
return eval('document.all.'+x);
else if(Boolean(document.ids))
return eval('document.ids.'+x);
else
return null;}
