function CatalogSendRequestGo( lang, dbpath, use, level ) { f = document.forms["CATALOG_SEARCH_FORM"]; s = Trim( f.QUERY.value ); state = f.STATE.value; h = document.location.hostname.toLowerCase(); if ( ( h.indexOf( ".bvv.cz" ) != -1 ) && ( h.indexOf( "node" ) != -1 ) && ( h != "www.bvv.cz" ) ) { u = "http://www.bvv.cz"; } else { u = "http://" + h; } c = ""; if ( f.SELECT_SEARCH[0].checked == true ) { c = "N"; } else { if ( f.ONLY.checked == true ) { if ( f.ONLYTITLE[2].checked == true ) { c = "C~1~3~" + state; } else if ( f.ONLYTITLE[1].checked == true ) { c = "C~1~2~" + state; } else { c = "C~1~1~" + state; } } else { c = "C~0~~" + state; } } if ( h.indexOf( ".bvv.cz" ) == -1 ) { document.cookie="Catalog=" + c + "; path=/" + dbpath + ";" ; } else { document.cookie="Catalog=" + c + "; path=/" + dbpath + "; domain=bvv.cz;" ; } if ( s == "" || dbpath == "" ) { document.location.href = u + "/" + dbpath + "/WWW-HP1C?ReadForm&NAV=1&LANG=" + lang + "&USE=" + use; return false; } else { if ( use == "U" || use == "E" || use == "N" ) { if ( level == "L" ) { if ( f.SELECT_SEARCH[0].checked == true ) { view = "WWWFulltextNomenclatureByID-" + use; field = "%20AND%20%5BDocTitle%5D%20CONTAINS%20" + escape( s ); } else { view = "WWWFulltextCompanyByID-" + use; if ( f.ONLY.checked == true ) { if ( f.ONLYTITLE[2].checked == true ) { field = "%20AND%20%5BCity%5D%20CONTAINS%20" + escape( s ); } else if ( f.ONLYTITLE[1].checked == true ) { field = "%20AND%20%5BStreet%5D%20CONTAINS%20" + escape( s ); } else { field = "%20AND%20%5BDocTitle%5D%20CONTAINS%20" + escape( s ); } } else { field = ""; } if ( state != "" ) { field = field + "%20AND%20%5BState%5D%20CONTAINS%20" + state; } } } else { if ( f.SELECT_SEARCH[0].checked == true ) { view = "WWWFulltextNomenclatureByID-" + use; field = "%20AND%20%5BDocTitle%5D%20CONTAINS%20" + escape( s ); } else { view = "WWWFulltextCompanyTitleByID-" + use; if ( f.ONLY.checked == true ) { if ( f.ONLYTITLE[2].checked == true ) { field = "%20AND%20%5BCity%5D%20CONTAINS%20" + escape( s ); } else if ( f.ONLYTITLE[1].checked == true ) { field = "%20AND%20%5BStreet%5D%20CONTAINS%20" + escape( s ); } else { field = "%20AND%20%5BDocTitle%5D%20CONTAINS%20" + escape( s ); } } else { field = ""; } if ( state != "" ) { field = field + "%20AND%20%5BState%5D%20CONTAINS%20" + state; } } } searchURL = u + "/" + dbpath + "/" + view + "?SearchView&Query=(" + escape( s ) + ")%20AND%20(%5BLangLN%5D%20CONTAINS%20" + lang + field + ")&LANG=" + lang + "&USE=" + use + "&NAV=1&Start=1&Count=10&SearchOrder=1"; f.action = searchURL; document.location.href = searchURL; return true; } else { searchURL = u + "/" + dbpath + "/WWWFulltextNomenclatureByID" + "?SearchView&Query=(" + escape( s ) + ")%20AND%20(%5BLangLN%5D%20CONTAINS%20" + lang +"%20AND%20%5BDocTitle%5D%20CONTAINS%20" + escape( s ) + ")&LANG=" + lang + "&USE=" + use + "&NAV=1&Start=1&Count=10&SearchOrder=1"; f.action = searchURL; document.location.href = searchURL; return true; } } } function CatalogfullSendRequestGo( lang, dbpath ) { f = document.forms["CATALOG_SEARCH_FORM"]; s = Trim( f.QUERY.value ); state = f.STATE.value; h = document.location.hostname.toLowerCase(); if ( ( h.indexOf( ".bvv.cz" ) != -1 ) && ( h.indexOf( "node" ) != -1 ) && ( h != "www.bvv.cz" ) ) { u = "http://www.bvv.cz"; } else { u = "http://" + h; } c = ""; if ( f.SELECT_SEARCH[0].checked == true ) { c = "N"; } else { if ( f.ONLY.checked == true ) { if ( f.ONLYTITLE[2].checked == true ) { c = "C~1~3~" + state; } else if ( f.ONLYTITLE[1].checked == true ) { c = "C~1~2~" + state; } else { c = "C~1~1~" + state; } } else { c = "C~0~~" + state; } } if ( h.indexOf( ".bvv.cz" ) == -1 ) { document.cookie="EContact=" + c + "; path=/" + dbpath + ";"; } else { document.cookie="EContact=" + c + "; path=/" + dbpath + "; domain=bvv.cz;" ; } if ( s == "" || dbpath == "" ) { document.location.href = u + "/" + dbpath + "/WWW-HP1C?ReadForm&NAV=1&LANG=" + lang; return false; } else { if ( f.SELECT_SEARCH[0].checked == true ) { view = "WWWFulltextNomenclatureByID"; field = "%20AND%20%5BDocTitle%5D%20CONTAINS%20" + escape( s ); } else { view = "WWWFulltextCompanyByID"; if ( f.ONLY.checked == true ) { if ( f.ONLYTITLE[2].checked == true ) { field = "%20AND%20%5BCity%5D%20CONTAINS%20" + escape( s ); } else if ( f.ONLYTITLE[1].checked == true ) { field = "%20AND%20%5BStreet%5D%20CONTAINS%20" + escape( s ); } else { field = "%20AND%20%5BDocTitle%5D%20CONTAINS%20" + escape( s ); } } else { field = ""; } if ( state != "" ) { field = field + "%20AND%20%5BState%5D%20CONTAINS%20" + state; } } searchURL = u + "/" + dbpath + "/" + view + "?SearchView&Query=(" + escape( s ) + ")%20AND%20(%5BLangLN%5D%20CONTAINS%20" + lang + field + ")&LANG=" + lang + "&NAV=1&Start=1&Count=10&SearchOrder=1"; f.action = searchURL; document.location.href = searchURL; return true; } } function SetSelectedView( numSelection ) { f = document.forms["CHANGE_VIEW"]; if (numSelection == 1) { f.SELECT_VIEW[0].checked = true; f.SELECT_VIEW[1].checked = false; f.SELECT_VIEW[2].checked = false; } else if (numSelection == 2) { f.SELECT_VIEW[0].checked = false; f.SELECT_VIEW[1].checked = true; f.SELECT_VIEW[2].checked = false; } else if (numSelection == 3) { f.SELECT_VIEW[0].checked = false; f.SELECT_VIEW[1].checked = false; f.SELECT_VIEW[2].checked = true; } else { f.SELECT_VIEW[0].checked = false; f.SELECT_VIEW[1].checked = false; f.SELECT_VIEW[2].checked = false; } } function SetSelectedSearch( numSelection ) { f = document.forms["CATALOG_SEARCH_FORM"]; if (numSelection == 1) { f.SELECT_SEARCH[0].checked = true; f.SELECT_SEARCH[1].checked = false; hideOTitle( document.getElementById( 'OTITLE' ) ); hideOTitle( document.getElementById( 'OSTATE' ) ); } else if (numSelection == 2) { f.SELECT_SEARCH[0].checked = false; f.SELECT_SEARCH[1].checked = true; showOTitle( document.getElementById( 'OTITLE' ) ); showOTitle( document.getElementById( 'OSTATE' ) ); } } function SetSelectedSearchTitle( numSelection ) { f = document.forms["CATALOG_SEARCH_FORM"]; if (numSelection == 1) { f.ONLYTITLE[0].checked = true; f.ONLYTITLE[1].checked = false; f.ONLYTITLE[2].checked = false; } else if (numSelection == 2) { f.ONLYTITLE[0].checked = false; f.ONLYTITLE[1].checked = true; f.ONLYTITLE[2].checked = false; } else if (numSelection == 3) { f.ONLYTITLE[0].checked = false; f.ONLYTITLE[1].checked = false; f.ONLYTITLE[2].checked = true; } } function hideOTitle( e ) { if ( e ) e.style.visibility="hidden"; } function showOTitle( e ) { if ( e ) e.style.visibility="visible"; } function CatalogShowHideID( typ, id, show ) { switch ( typ ) { case "I": colortyp = "FE8900"; break; case "E": colortyp = "0074FE"; break; case "N": colortyp = "AF000B"; typ = "E"; break; default: colortyp = "000000"; break; } oid = document.getElementById( typ + "_" + id ); oidinfo = document.getElementById( "Info" + typ + id ); oidinfotd = document.getElementById( "InfoTd" + typ + id ); if (!oid || !oidinfo || !oidinfotd) return false; innerHTML = "
" + oid.innerHTML + "
"; innerHTMLNull = "" if (show == "1") { oidinfotd.innerHTML = innerHTML; oidinfo.style.display = ""; } else if (show == "0") { oidinfotd.innerHTML = innerHTMLNull; oidinfo.style.display = "none"; } else { if ( oidinfotd.innerHTML.toUpperCase() == innerHTMLNull.toUpperCase()) { oidinfotd.innerHTML = innerHTML; oidinfo.style.display = ""; } else { oidinfotd.innerHTML = innerHTMLNull; oidinfo.style.display = "none"; } } } function CatalogShowHideIDAll( show, dbpath ) { oidall = document.getElementsByName( "nomID" ); oother = document.getElementsByName( "nomOther" ); if (!oidall ) return false; if (oidall.length) { for ( i = 0; i < oidall.length; i++ ) { id = oidall[i].innerHTML; typ = "I"; if ( oother[i].innerHTML.search( typ ) != -1 ) { CatalogShowHideID( typ, id, show ); } typ = "E"; if ( oother[i].innerHTML.search( typ ) != -1 ) { CatalogShowHideID( typ, id, show ); } typ = "N"; if ( oother[i].innerHTML.search( typ ) != -1 ) { CatalogShowHideID( typ, id, show ); } } } else { id = oidall.innerHTML; typ = "I"; if ( oother.innerHTML.search( typ ) != -1 ) { CatalogShowHideID( typ, id, show ); } typ = "E"; if ( oother.innerHTML.search( typ ) != -1 ) { CatalogShowHideID( typ, id, show ); } typ = "N"; if ( oother.innerHTML.search( typ ) != -1 ) { CatalogShowHideID( typ, id, show ); } } if (show == "1") { c = "ALL"; } else { c = "NA"; } h = document.location.hostname.toLowerCase(); if ( h.indexOf( ".bvv.cz" ) == -1 ) { document.cookie="CatalogShow=" + c + "; path=/" + dbpath + ";" ; } else { document.cookie="CatalogShow=" + c + "; path=/" + dbpath + "; domain=bvv.cz;" ; } }