var HisotrySearch = new Array() ; var SearchPhrase = '' ; function ShowSearchColumnLeft( Cats ){ var ColumnLeft = '
Kategorie
"; if( IterCats > Max ) ColumnLeft += '
Pokaż wszystkie
' ; if( IterCats == 0) ColumnLeft += "
Brak wyników.
"; ColumnLeft += '
'; ColumnLeft += '
Opcje
Cena:
od: do:

Sortowanie:



'; ColumnLeft += '
'; return ColumnLeft ; } function ShowSearchProducts( Products, Categories, Autor ){ var NoFilterSearchPhrase = document.getElementById('SearchBarInput').value; var Content = '
'; if( Categories != undefined ) { var Cats = ShowSearchCategories( Categories ) ; if( Cats ) Content += Cats ; } if( Autor ) { Content += '
Produkty
Książki autora:

' + NoFilterSearchPhrase + '

' ; } else { Content += '
Produkty
Wyniki wyszukiwania dla:

' + NoFilterSearchPhrase + '

' ; } Content += '' ; var iter = 0 ; var ClassRow ; var Clouds = new Array() ; for( i in Products ){ var p = Products[i] ; p.ShortDesc = Products[i].ShortDesc.substr( 0, 150 ) ; if( Products[i].Reviews > 0 ) { p.AvgReviews = "Średnia ocen:" + Math.ceil( Products[i].Reviews * 10 ) / 10 ; } else { p.AvgReviews = "Brak ocen." ; } p.Reviews = 15 * Products[i].Reviews ; p.Price = RoundPrice( Products[i].Price ) ; if( p.Title.split( " - " ).length > 1 ){ p.Title = p.Title.split( " - " ) p.Title.pop(); p.Title = p.Title.join( " - " ) ; } if( p.Autor == undefined ) p.Autor = '' ; if( p.Autor ) { var Autors = p.AutorUrl.split( "%2C" ) ; var AutorsTxt= p.Autor.split( "," ) ; p.Autor = "" ; for( i in Autors ) { p.Autor += '' + AutorsTxt[i] + '' ; } } if( iter++ % 2 == 0 ){ ClassRow = 'RowResultsWhite' ; } else { ClassRow = 'RowResultsBrown' ; } p.Url = p.Url + ( ( p.Url.split('?').length > 1 ) ? "&" : "?" ) + "spos=" + iter ; Content += '' ; } if( !Products.length ) { Content += '' ; } Content += '
Cena: od: do:
Sortowanie:

' ; if( p.PromoOn ) { Content += '' + p.PromoOn + '' ; Clouds[i] = '
Kliknij aby przejść do promocji.
' ; } Clouds[201] = '
Kliknij aby zobaczyć książki tego autora.
' ; Content += '
' + p.Title + '' + p.Autor + '
' ; Content += '
' + p.ShortDesc + '...
' ; Content += '
  • 1
  • 2
  • 3
  • 4
  • 5
' ; var IterStars = 300 + iter ; Clouds[ IterStars ] = '
' + p.AvgReviews + '
' ; if( p.RokWydania ){ p.Name = 'Rok wydania' ; p.Value = p.RokWydania ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Oprawa ){ p.Name = 'Oprawa' ; p.Value = p.Oprawa ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Material ){ p.Name = 'Materiał' ; p.Value = p.Material ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Wysokosc ){ p.Name = 'Wysokość' ; p.Value = p.Wysokosc ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Szerkosc ){ p.Name = 'Szerkość' ; p.Value = p.Szerkosc ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Nosnik ){ p.Name = 'Nośnik' ; p.Value = p.Nosnik ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.RodzajGry ){ p.Name = 'Rodzaj gry' ; p.Value = p.RodzajGry ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.QtyOnMag > 0 ) { Content += 'Wysyłka w 24 godziny.  '; Clouds[200] = '
Towar na magazynie. Wysyłka w przeciągu 24 godzin.
' ; } else { p.Value = p.AvailabName ; Content += '
' + p.Value + '
' ; } Content += '
Nasza cena:
' + p.Price + 'zł' ; if( p.HighPrice > 0.1 ) Content += '
Cena rynkowa: ' + p.HighPrice + ' zł' ; Content += '
dodaj do koszyka
Brak wyników.
' ; document.getElementsByTagName('body')[0].innerHTML += Clouds.join('') ; return Content ; } function ShowSearchCategories( Categories ) { if( Categories.length ) { var Content = '
Kategorie
' ; for( i in Categories ) { var c = Categories[i] ; Content += '' + c.Title + ' ' ; } Content += '
' ; return Content ; } return false ; } function ShowSuggestProducts( Products, SuggestPhrase ) { var ClassRow ; var Content = ''; var CountProd = 0; var SuggestPhraseUrl = window.location.href.replace(/q-(.*)\/pc/, "q-" + encodeURI( Trim(SuggestPhrase).replace( / /gi, "_" ) ) + "/pc") ; var Clouds = new Array() ; Content += '
Czy chodziło Ci o: ' + SuggestPhrase + '
' ; var iter = 0 ; for( i in Products ){ var p = Products[i] ; p.ShortDesc = Products[i].ShortDesc.substr( 0, 150 ) ; if( Products[i].Reviews > 0 ) { p.AvgReviews = "Średnia ocen:" + Math.ceil( Products[i].Reviews * 10 ) / 10 ; } else { p.AvgReviews = "Brak ocen." ; } p.Reviews = 15 * Products[i].Reviews ; p.Price = RoundPrice( Products[i].Price ) ; if( p.Title.split( " - " ).length > 1 ){ p.Title = p.Title.split( " - " ) p.Title.pop(); p.Title = p.Title.join( " - " ) ; } if( p.Autor == undefined ) p.Autor = '' ; var AutorsTxt= p.Autor.split( "," ) ; if( p.Autor ) { var Autors = p.AutorUrl.split( "%2C" ) ; p.Autor = "" ; for( i in Autors ) { p.Autor += '' + AutorsTxt[i] + '' ; } } if( iter++ % 2 == 0 ){ ClassRow = 'RowResultsWhite' ; } else { ClassRow = 'RowResultsBrown' ; } p.Url = p.Url + ( ( p.Url.split('?').length > 1 ) ? "&" : "?" ) + "spos=" + iter ; Content += '' ; CountProd++; } if( CountProd == 0 && ActualLimitFrom == 0 ) { Content += '' ; } else if( CountProd == 0 ) { Content += '
Koniec wyników.
' ; NoMoreProducts = true ; } if( Products.length > 0 ) Content += '
Nazwa / Opis Cena

' ; if( p.PromoOn ) { Content += '' + p.PromoOn + '' ; Clouds[i] = '
Kliknij aby przejść do promocji.
' ; } Clouds[201] = '
Kliknij aby zobaczyć książki tego autora.
' ; Content += '
' + p.Title + '' + p.Autor + '
' ; Content += '
' + p.ShortDesc + '...
' ; Content += '
  • 1
  • 2
  • 3
  • 4
  • 5
' ; var IterStars = 300 + iter ; Clouds[ IterStars ] = '
' + p.AvgReviews + '
' ; if( p.RokWydania ){ p.Name = 'Rok wydania' ; p.Value = p.RokWydania ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Oprawa ){ p.Name = 'Oprawa' ; p.Value = p.Oprawa ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Material ){ p.Name = 'Materiał' ; p.Value = p.Material ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Wysokosc ){ p.Name = 'Wysokość' ; p.Value = p.Wysokosc ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Szerkosc ){ p.Name = 'Szerkość' ; p.Value = p.Szerkosc ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Nosnik ){ p.Name = 'Nośnik' ; p.Value = p.Nosnik ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.RodzajGry ){ p.Name = 'Rodzaj gry' ; p.Value = p.RodzajGry ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.QtyOnMag > 0 ) { Content += 'Wysyłka w 24 godziny.  '; Clouds[200] = '
Towar na magazynie. Wysyłka w przeciągu 24 godzin.
' ; } else { p.Value = p.AvailabName ; Content += '
' + p.Value + '
' ; } Content += '
Nasza cena:
' + p.Price + 'zł' ; if( Products[i] != undefined && Products[i].HighPrice > 0.1 ) Content += '
Cena rynkowa: ' + p.HighPrice + ' zł' ; Content += '
dodaj do koszyka
Brak wyników.
'; document.getElementsByTagName('body')[0].innerHTML += Clouds.join('') ; return Content ; } function ShowMoreSearchProducts( Products ) { var ClassRow ; var Content = ''; var CountProd = 0; var Clouds = new Array() ; if( Products == undefined ) Products = new Array(); if( Products.length > 0 ) { Content += ''; } var iter = 0 ; for( i in Products ){ var p = Products[i] ; p.ShortDesc = Products[i].ShortDesc.substr( 0, 150 ) ; if( Products[i].Reviews > 0 ) { p.AvgReviews = "Średnia ocen:" + Math.ceil( Products[i].Reviews * 10 ) / 10 ; } else { p.AvgReviews = "Brak ocen." ; } p.Reviews = 15 * Products[i].Reviews ; p.Price = RoundPrice( Products[i].Price ) ; if( p.Title.split( " - " ).length > 1 ){ p.Title = p.Title.split( " - " ) p.Title.pop(); p.Title = p.Title.join( " - " ) ; } if( p.Autor == undefined ) p.Autor = '' ; if( p.Autor ) { var Autors = p.AutorUrl.split( "%2C" ) ; var AutorsTxt= p.Autor.split( "," ) ; p.Autor = "" ; for( i in Autors ) { p.Autor += '' + AutorsTxt[i] + '' ; } } if( iter++ % 2 == 0 ){ ClassRow = 'RowResultsWhite' ; } else { ClassRow = 'RowResultsBrown' ; } p.Url = p.Url + ( ( p.Url.split('?').length > 1 ) ? "&" : "?" ) + "spos=" + ( iter + ( 15 * ActualLimitFrom ) ) ; Content += '' ; CountProd++; } if( CountProd == 0 && ActualLimitFrom == 0 ) { Content += '' ; } else if( CountProd == 0 ) { Content += '
Koniec wyników.
' ; NoMoreProducts = true ; } if( Products.length > 0 ) Content += '

' ; if( p.PromoOn ) { Content += '' + p.PromoOn + '' ; Clouds[i] = '
Kliknij aby przejść do promocji.
' ; } Clouds[201] = '
Kliknij aby zobaczyć książki tego autora.
' ; Content += '
' + p.Title + '' + p.Autor + '
' ; Content += '
' + p.ShortDesc + '...
' ; Content += '
  • 1
  • 2
  • 3
  • 4
  • 5
' ; var IterStars = 300 + iter ; Clouds[ IterStars ] = '
' + p.AvgReviews + '
' ; if( p.RokWydania ){ p.Name = 'Rok wydania' ; p.Value = p.RokWydania ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Oprawa ){ p.Name = 'Oprawa' ; p.Value = p.Oprawa ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Material ){ p.Name = 'Materiał' ; p.Value = p.Material ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Wysokosc ){ p.Name = 'Wysokość' ; p.Value = p.Wysokosc ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Szerkosc ){ p.Name = 'Szerkość' ; p.Value = p.Szerkosc ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.Nosnik ){ p.Name = 'Nośnik' ; p.Value = p.Nosnik ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.RodzajGry ){ p.Name = 'Rodzaj gry' ; p.Value = p.RodzajGry ; Content += '
' + p.Name + ': ' + p.Value + '
' ; } if( p.QtyOnMag > 0 ) { Content += 'Wysyłka w 24 godziny.  '; Clouds[200] = '
Towar na magazynie. Wysyłka w przeciągu 24 godzin.
' ; } else { p.Value = p.AvailabName ; Content += '
' + p.Value + '
' ; } Content += '
Nasza cena:
' + p.Price + 'zł' ; if( Products[i] != undefined && Products[i].HighPrice > 0.1 ) Content += '
Cena rynkowa: ' + p.HighPrice + ' zł' ; Content += '
dodaj do koszyka
Brak wyników.
'; document.getElementById('CloudsKontener').innerHTML += Clouds.join('') ; return Content ; } // Wyswietalnie Tagów . var MatchedFound = false ; function SortTab( A, B ){ var ALength = A['Key1'].length + A['Key2'].length + A['Key3'].length + A['Rest'].length ; var BLength = B['Key1'].length + B['Key2'].length + B['Key3'].length + B['Rest'].length ; if( ALength > BLength ) return 1 ; if( ALength < BLength ) return -1 ; return 0 ; } function SortMatchedLettersTab( A, B ){ if( A[1] > B[1] ) return -1 ; if( A[1] < B[1] ) return 1 ; return 0 ; } function ShowHints( Hints, ShowProd, ReturnBestHint ) { var SearchDiv = document.getElementById('SearchHints') ; var Content = "" ; } function MatchPhrases( Filtered, Phrase, NoFilter, Name ){ var Key = NoFilter[Name].substr(0, Filtered.indexOf( Phrase ) ) + ""; Key += NoFilter[Name].substr( Filtered.indexOf( Phrase ), Phrase.length ) + ""; Key += NoFilter[Name].substr( Filtered.indexOf( Phrase ) + Phrase.length ) ; MatchedFound = true ; return Key ; }