function fnScreenResolution(){var browser=navigator.appName
var verze=parseInt(navigator.appVersion)
var scrSirka=1024
var scrVyska=768
scrSirka=screen.width;scrVyska=screen.height;document.getElementById("scr_sirka").value=scrSirka;document.getElementById("scr_vyska").value=scrVyska;}
function fnSaveScroll()
{if(document.getElementById('id_scroll')){var sScroll;if(document.documentElement&&document.documentElement.scrollTop)
{sScroll=document.documentElement.scrollTop;}
else if(document.body)
{sScroll=document.body.scrollTop;}
else
{sScroll=0;}
document.getElementById('id_scroll').value=sScroll;}}
function fnRestoreScroll()
{if(document.getElementById('id_scroll')){var sScroll=document.getElementById('id_scroll').value;if(sScroll>0)
{if(document.documentElement&&document.documentElement.scrollTop)
{document.documentElement.scrollTop=sScroll;}
else if(document.body)
{if(window.navigator.appName=='Netscape')
window.scroll(0,sScroll);else
{document.body.scrollTop=sScroll;}}
else
{window.scroll(0,sScroll);}}}}
function fnDetail(cislo){var detail_window2
detail_window2=window.open('tituly_detail.asp?cislo='+cislo,'TitulDetail','scrollbars,resizable,width=400,height=400,top=0,left=0');detail_window2.focus();}
function fnRecenze(cislo){var detail_window2
detail_window2=window.open('tipy_recenze_detail.asp?cislo='+cislo,'TitulDetail','scrollbars,resizable,width=400,height=400,top=0,left=0');detail_window2.focus();}
function fnZapsatPouze(id){var fTituly=document.getElementById('id_formTituly');document.getElementById('pouze_cislo').value=id;fTituly.sub_akce.value='Zapsat';fnSaveScroll();fTituly.submit();}
function fSetPouzeTitul(iTitul,oCaller){var fTituly=document.getElementById('id_formTituly');var oInput=document.getElementById('pouze_cislo');var iObjednat;if(oInput){oInput.value=iTitul;iObjednat=oCaller.parentNode.getElementsByTagName('input')[1].value;if(trim(iObjednat)==''){iObjednat=0;}
if(document.getElementById('pouze_objednat')){document.getElementById('pouze_objednat').value=iObjednat;}}
fTituly.sub_akce.value='Zapsat';fnSaveScroll();fTituly.submit();}
function fnEnterSubmit(event,id,is_seznam,oCaller){if(event&&event.which==13){if(is_seznam==false){fnSaveScroll();fSetPouzeTitul(id,oCaller);}
else{fnSaveScroll();var fTituly=document.getElementById('id_formTituly');fTituly.submit();}}
else{if(window.event&&window.event.keyCode==13){if(is_seznam==false){fnSaveScroll();fSetPouzeTitul(id,oCaller);}
else{fnSaveScroll();var fTituly=document.getElementById('id_formTituly');fTituly.submit();}}
else
return true;}}
function fnZobrazVarovani(sAkce){var bConfirmResult=true;switch(sAkce){case"DEL-OBJ":bConfirmResult=confirm("Opravdu si přejete zrušit objednávku?\n\nDosud nevyexpedované zboží v objednávce bude zrušeno a nebude Vám dodáno.");break;case"DEL-KOS":bConfirmResult=confirm("Opravdu si přejete odstranit všechny tituly z objednávky?");break;case"DEL-TIT":bConfirmResult=confirm("Opravdu si přejete zrušit všechny objednané tituly kromě připravovaných?");break;}
return bConfirmResult;}
function trim(str){return str.replace(/^\s*|\s*$/g,"");}
function fCookiesRead(sCookNazev){var aCookies=document.cookie.split(";");var oCookValue,oCookie,oCookCount;for(oCookCount in aCookies){oCookie=aCookies[oCookCount].split("=");if(trim(oCookie[0].toString())==sCookNazev.toString()){oCookValue=oCookie[1];return oCookValue;}}
return false;}
function fCookiesWrite(sCookNazev,oCookValue,sCookExp){var iExpire=60000;if(sCookExp=="1r")iExprire=30758400000;if(sCookExp=="1n")iExprire=60000;var theDate=new Date();var dExpire=new Date(theDate.getTime()+iExprire);var expiryDate=dExpire.toGMTString();document.cookie=sCookNazev+"="+oCookValue+";expires="+expiryDate;}
