var dbpath = location.href.substr(0, location.href.indexOf(".nsf") + 4); var webdbpath = "/iiWWW/cz/produkty110.nsf" var base_url=dbpath+"/web_show_category?readform&" //var search_url=dbpath+"/web_category_search?searchview&query=" //var search_url=dbpath+"/w?readform&query=" var search_url = webdbpath+"/w?readform&query=" $(document).ready(function(){ //alert("loading") $("#navigace").hide(); //$("#navigace").load(dbpath+"/web_create_tree?OpenAgent",create_tree); //alert($("#navigace_content").html()) $("#navigace").html($("#navigace_content").html()); create_tree(); }) function create_tree(){ //alert("tree loaded") $("#navigace").treeview({ persist: "location", collapsed: true, unique: true }); $("#navigace").show(); //alert($("#navigace").html()) //alert("tree stop") } function IsImageOk(img) { // During the onload event, IE correctly identifies //any images that // weren’t downloaded as not complete. Others should too. Gecko-based // browsers act like NS4 in that they report this incorrectly. if (!img.complete) { return false; } // However, they do have two very useful properties: // naturalWidth and // naturalHeight. These give the true size of the image. If it failed // to load, either of these should be zero. if (typeof img.naturalWidth != 'undefined' && img.naturalWidth == 0) { return false; } // No other way of checking: assume it’s ok. return true; } function checkImages() { for (var i = 0; i < document.images.length; i++) { if (!IsImageOk(document.images[i])) { document.images[i].src = dbpath+'/blank.gif?openImageResource'; } } } function search2(){ items=document.getElementsByName("search_field") res="" sign="" for (i=0;i/gi, ""); query=query.replace(/'); } } function load_params(){ v='ebv_parametry_web' category=$('#index').val(); var p='view='+v+'&category='+category; var url=dbpath+"/ajax_dblookup_form?readform&"+p; //alert(url); //new Ajax.Updater("",url,{onFailure: function(r){alert(r.reponseText);$('u1').toggle();}, onSuccess: function(r){update_params(r.responseText,'params')},asynchronous:true,evalScripts:true}) $.get(url,{},function(data){update_params(data,'params')}) } function load_search_params(){ v='ebv_parametry_web_search' if (get_value('p_categ2')==""){ return; } category=get_value('p_categ2')+"_"+get_value('p_categ3') var p='view='+v+'&category='+category; var url=dbpath+"/ajax_dblookup_form?readform&"+p; //alert(url) $.get(url,{},function(data){update_params(''+data+'
','enhanced_search')}) //new Ajax.Updater("",url,{onFailure: function(r){alert(r.reponseText);$('u1').toggle();}, onSuccess: function(r){update_params(''+r.responseText+'
','enhanced_search')},asynchronous:true,evalScripts:true}) } function o(docid){ url=dbpath+"/w/"+docid+"?opendocument" document.location.href=url; } // ### gather params for URL function get_params(){ //r=''; p=''; if ($('categ1').val()!=""){ //r=escape($('categ1').value) p="p_categ1="+escape($('#categ1').val()) } if ($('categ2').val()!=""){ //r=r+"_"+escape($('categ2').value) p=p+"&p_categ2="+escape($('#categ2').val()) } return p } // ### switch product function switch_product(){ //alert(get_params()); document.location.href=dbpath+"/web_show_category?readform&"+get_params() } // ################################################## function on_update1_done(html){ //alert(html); $('#categ2').innerHTML="<>"+html; $('#categ2_i').innerHTML=$('#categ2_i').innerHTML // alert($('c_ProdServChoices').innerHTML) } function update1(){ // for ProdServChoices $('u1').toggle(); v='web_category1_1' category=$('categ1').val(); var params='view='+v+'&category='+category; var url=dbpath+"/ajax_dblookup_form?readform&"+params; new Ajax.Updater("",url,{onFailure: function(r){alert(r.reponseText);$('u1').toggle();}, onSuccess: function(r){on_update1_done(r.responseText);$('u1').toggle();},asynchronous:true,evalScripts:true}) }