dictionary.addTranslation("COMMON_AGO","ago");dictionary.addTranslation("COMMON_BACK","Indietro");dictionary.addTranslation("COMMON_CHANNELS","Canali");dictionary.addTranslation("COMMON_CLOSE","Chiudi");dictionary.addTranslation("COMMON_CURRENCY","&euro;");dictionary.addTranslation("COMMON_DAY","giorno");dictionary.addTranslation("COMMON_DAYS","giorni");dictionary.addTranslation("COMMON_DELIVERY_COST","Spese di spedizione");dictionary.addTranslation("COMMON_DETAILS","Dettagli");dictionary.addTranslation("COMMON_DISCLAIMER","Disclaimer");dictionary.addTranslation("COMMON_DISCLAIMER_TITLE","Disclaimer");dictionary.addTranslation("COMMON_DISPLAY","Elimina");dictionary.addTranslation("COMMON_EDIT","Modifica");dictionary.addTranslation("COMMON_EXCITE_DE","Excite Deutschland");dictionary.addTranslation("COMMON_EXCITE_ES","Excite Espa&amp;ntilde;a");dictionary.addTranslation("COMMON_EXCITE_FR","Excite France");dictionary.addTranslation("COMMON_EXCITE_IT","Excite Italia");dictionary.addTranslation("COMMON_EXCITE_NL","Excite Nederland");dictionary.addTranslation("COMMON_EXCITE_PL","Excite Poland");dictionary.addTranslation("COMMON_EXCITE_SE","Excite Sweden");dictionary.addTranslation("COMMON_EXCITE_UK","Excite UK");dictionary.addTranslation("COMMON_FILTER_VIEW_ALL","All");dictionary.addTranslation("COMMON_FIND_IN_WEB","Cerca nel Web");dictionary.addTranslation("COMMON_FORM_CANCEL","Cancella");dictionary.addTranslation("COMMON_FORM_ERROR_KEYWORD_EMPTY","Inserisci la keyword da cercare!");dictionary.addTranslation("COMMON_FORM_SEND","Invia");dictionary.addTranslation("COMMON_FREE_LINK_ASK","Risultati web");dictionary.addTranslation("COMMON_GENDERALL","non importa");dictionary.addTranslation("COMMON_GENDERFEMALE","donna");dictionary.addTranslation("COMMON_GENDERMALE","uomo");dictionary.addTranslation("COMMON_GENDER_FEMALE","Donna");dictionary.addTranslation("COMMON_GENDER_MALE","Uomo");dictionary.addTranslation("COMMON_HIDE","Nascondi");dictionary.addTranslation("COMMON_HOURS","ore");dictionary.addTranslation("COMMON_JSALERT_DESTEMAIL","L&#039;indirizzo email specificato per questo destinatario non e&#039; valido");dictionary.addTranslation("COMMON_JSALERT_DESTNAME","Immettere il nome del Destinatario");dictionary.addTranslation("COMMON_JSALERT_EMPTYTEXT","Immettere il messaggio");dictionary.addTranslation("COMMON_JSALERT_MULTIDEST","Destinatari duplicati nella form");dictionary.addTranslation("COMMON_JSALERT_SENDEREMAIL","L&#039;indirizzo email specificato per il mittente non e&#039; valido");dictionary.addTranslation("COMMON_JSALERT_SENDERNAME","Immettere il nome del Mittente");dictionary.addTranslation("COMMON_LOCALS","Stanze");dictionary.addTranslation("COMMON_LOGIN","Accedi");dictionary.addTranslation("COMMON_LOGOUT","Esci");dictionary.addTranslation("COMMON_LOGO_MERCHANT","Logo azienda");dictionary.addTranslation("COMMON_MERCHANT","Azienda");dictionary.addTranslation("COMMON_MOD_PROFILE","Modifica profilo");dictionary.addTranslation("COMMON_NEWS_ALT","Articoli");dictionary.addTranslation("COMMON_NEXT","successiva");dictionary.addTranslation("COMMON_OPTIONALL","Tutti");dictionary.addTranslation("COMMON_OPTIONNO","No");dictionary.addTranslation("COMMON_OPTIONYES","S&igrave;");dictionary.addTranslation("COMMON_ORDER_ASC","crescente");dictionary.addTranslation("COMMON_ORDER_DISC","decrescente");dictionary.addTranslation("COMMON_PAGE","Pagina");dictionary.addTranslation("COMMON_PREVIOUS","precedente");dictionary.addTranslation("COMMON_PRICE","Prezzo");dictionary.addTranslation("COMMON_PRIVACY","Privacy");dictionary.addTranslation("COMMON_PRIVACY_TITLE","Privacy");dictionary.addTranslation("COMMON_PRODUCT_TYPE","Tipologia di prodotto");dictionary.addTranslation("COMMON_REGISTER","Registrati");dictionary.addTranslation("COMMON_RESULTS_ON","risultati per");dictionary.addTranslation("COMMON_RESULT_OF","di");dictionary.addTranslation("COMMON_RESULT_ON","risultati per");dictionary.addTranslation("COMMON_SAVE","Salva");dictionary.addTranslation("COMMON_SEARCH","Cerca");dictionary.addTranslation("COMMON_SEND_TO_A_FRIEND","Spedisci ad un amico");dictionary.addTranslation("COMMON_SEND_TO_A_FRIEND_MESSAGE_SENT","Il tuo messaggio &egrave; stato inviato");dictionary.addTranslation("COMMON_SERVICE_MAIL","MAIL");dictionary.addTranslation("COMMON_SHOW","Mostra");dictionary.addTranslation("COMMON_SITEMAP","Site Map");dictionary.addTranslation("COMMON_SITEMAP_TITLE","Site Map");dictionary.addTranslation("COMMON_SITE_NAME","Excite");dictionary.addTranslation("COMMON_SMOKERALL","non importa");dictionary.addTranslation("COMMON_SORRY_NO_RESULT_MESSAGE","Siamo spiacenti non ci sono risultati per la ricerca effettuata");dictionary.addTranslation("COMMON_SORT_BY","Ordina per");dictionary.addTranslation("COMMON_SPACE","Superficie");dictionary.addTranslation("COMMON_SPONSORED_LINK","Risultati sponsorizzati");dictionary.addTranslation("COMMON_SPONSORED_LINK_ASK","Risultati web sponsorizzati");dictionary.addTranslation("COMMON_SUGGEST_NEXT","next");dictionary.addTranslation("COMMON_SUGGEST_PREV","previous");dictionary.addTranslation("COMMON_TAB_IMAGE","Immagini");dictionary.addTranslation("COMMON_TAB_MP3","Mp3");dictionary.addTranslation("COMMON_TAB_NEWS","Notizie");dictionary.addTranslation("COMMON_TAB_VIDEO","Video");dictionary.addTranslation("COMMON_TAB_WEB","Web");dictionary.addTranslation("COMMON_TAG","Tag");dictionary.addTranslation("COMMON_TODAY","oggi");dictionary.addTranslation("COMMON_UPPER_FIND","CERCA");dictionary.addTranslation("COMMON_URL","Indirizzo");dictionary.addTranslation("COMMON_VIEW_OFFER","Offerta");dictionary.addTranslation("COMMON_WELCOME","Ciao");dictionary.addTranslation("COMMON_WHOARE","Chi siamo");dictionary.addTranslation("COMMON_WHOARE_TITLE","Chi siamo");dictionary.addTranslation("_COMMON_CALENDAR_APRIL","Aprile");dictionary.addTranslation("_COMMON_CALENDAR_AUGUST","Agosto");dictionary.addTranslation("_COMMON_CALENDAR_DECEMBER","Dicembre");dictionary.addTranslation("_COMMON_CALENDAR_FEBRAURY","Febbraio");dictionary.addTranslation("_COMMON_CALENDAR_FEBRUARY","Febbraio");dictionary.addTranslation("_COMMON_CALENDAR_FRYDAY","Venerd&igrave;");dictionary.addTranslation("_COMMON_CALENDAR_JANUARY","Gennaio");dictionary.addTranslation("_COMMON_CALENDAR_JULY","Luglio");dictionary.addTranslation("_COMMON_CALENDAR_JUNE","Giugno");dictionary.addTranslation("_COMMON_CALENDAR_MARCH","Marzo");dictionary.addTranslation("_COMMON_CALENDAR_MAY","Maggio");dictionary.addTranslation("_COMMON_CALENDAR_MONDAY","Luned&igrave;");dictionary.addTranslation("_COMMON_CALENDAR_NOVEMBER","Novembre");dictionary.addTranslation("_COMMON_CALENDAR_OCTOBER","Ottobre");dictionary.addTranslation("_COMMON_CALENDAR_SATURDAY","Sabato");dictionary.addTranslation("_COMMON_CALENDAR_SEPTEMBER","Settembre");dictionary.addTranslation("_COMMON_CALENDAR_SUNDAY","Domenica");dictionary.addTranslation("_COMMON_CALENDAR_THURSDAY","Gioved&igrave;");dictionary.addTranslation("_COMMON_CALENDAR_TUESDAY","Marted&igrave;");dictionary.addTranslation("_COMMON_CALENDAR_WEDNESDAY","Mercoled&igrave;");dictionary.addTranslation("_COMMON_CHANNEL_NAME_ALMANAC","almanacco");dictionary.addTranslation("_COMMON_CHANNEL_NAME_CALENDAR","calendari");dictionary.addTranslation("_COMMON_CHANNEL_NAME_HOROSCOPE","oroscopo");dictionary.addTranslation("_COMMON_CHANNEL_NAME_POSTCARD","cartoline");dictionary.addTranslation("_COMMON_CHANNEL_NAME_WEATHER","meteo");dictionary.addTranslation("_COMMON_URL_ALMANAC_BABE","babeoftheday");dictionary.addTranslation("_COMMON_URL_ALMANAC_MAN","manoftheday");dictionary.addTranslation("_COMMON_URL_ALMANAC_QUOTE","frasedelgiorno");dictionary.addTranslation("_COMMON_URL_ARCHIVE","archivio");dictionary.addTranslation("_COMMON_URL_ARCHIVE_SEARCH","cerca");dictionary.addTranslation("_COMMON_URL_CATEGORY","categoria");dictionary.addTranslation("_COMMON_URL_COMMENTS","commenti");dictionary.addTranslation("_COMMON_URL_EVENT","evento");dictionary.addTranslation("_COMMON_URL_EVENTS","eventi");dictionary.addTranslation("_COMMON_URL_NEWS","news");dictionary.addTranslation("_COMMON_URL_PHOTO","foto");dictionary.addTranslation("_COMMON_URL_POLL","sondaggi");dictionary.addTranslation("_COMMON_URL_POSTCARD_CATEGORIES","categories");dictionary.addTranslation("_COMMON_URL_SEARCH_AUDIO","mp3");dictionary.addTranslation("_COMMON_URL_SEARCH_DETAIL","detail");dictionary.addTranslation("_COMMON_URL_SEARCH_IMAGE","image");dictionary.addTranslation("_COMMON_URL_SEARCH_NEWS","news");dictionary.addTranslation("_COMMON_URL_SEARCH_NORESULTS","no-results");dictionary.addTranslation("_COMMON_URL_SEARCH_SITE","site");dictionary.addTranslation("_COMMON_URL_SEARCH_SITESEARCH","sitesearch");dictionary.addTranslation("_COMMON_URL_SEARCH_VIDEO","video");dictionary.addTranslation("_COMMON_URL_SEARCH_WEB","web");dictionary.addTranslation("_COMMON_URL_SOURCE","source");dictionary.addTranslation("_COMMON_URL_USERSEARCH","ricerche");dictionary.addTranslation("_COMMON_URL_VIDEO","video");dictionary.addTranslation("_HOROSCOPE_URL_ACQUARIUS","acquario");dictionary.addTranslation("_HOROSCOPE_URL_ARIES","ariete");dictionary.addTranslation("_HOROSCOPE_URL_CANCER","cancro");dictionary.addTranslation("_HOROSCOPE_URL_CAPRICORN","capricorno");dictionary.addTranslation("_HOROSCOPE_URL_GEMINI","gemelli");dictionary.addTranslation("_HOROSCOPE_URL_LEO","leone");dictionary.addTranslation("_HOROSCOPE_URL_LIBRA","bilancia");dictionary.addTranslation("_HOROSCOPE_URL_PISCES","pesci");dictionary.addTranslation("_HOROSCOPE_URL_SAGITTARIUS","sagittario");dictionary.addTranslation("_HOROSCOPE_URL_SCORPIO","scorpione");dictionary.addTranslation("_HOROSCOPE_URL_TAURUS","toro");dictionary.addTranslation("_HOROSCOPE_URL_VIRGO","vergine");

dictionary.addTranslation("HEADER_OTHER_LINKS","Altri");dictionary.addTranslation("HEADER_SEARCHWEB_ALL","tutto il Web");dictionary.addTranslation("HEADER_SEARCHWEB_COUNTRY","solo in italiano");dictionary.addTranslation("HEADER_SEARCH_BUTTON","Cerca");dictionary.addTranslation("HEADER_SEARCH_BUTTON_IMAGE","Cerca");dictionary.addTranslation("HEADER_SEARCH_BUTTON_MP3","Cerca");dictionary.addTranslation("HEADER_SEARCH_BUTTON_NEWS","Cerca");dictionary.addTranslation("HEADER_SEARCH_BUTTON_SITE","Cerca");dictionary.addTranslation("HEADER_SEARCH_BUTTON_VIDEO","Cerca");dictionary.addTranslation("HEADER_SEARCH_BUTTON_WEB","Cerca");dictionary.addTranslation("HEADER_SEARCH_EMPTY","Campo di ricerca vuoto");dictionary.addTranslation("HEADER_SEARCH_INPUT_LABEL","Cerca per tag");dictionary.addTranslation("HEADER_SKIN","Skin");dictionary.addTranslation("HEADER_SKIN_BLACK","Nero");dictionary.addTranslation("HEADER_SKIN_BLUE","Blu");dictionary.addTranslation("HEADER_SKIN_DEFAULT","Default");dictionary.addTranslation("HEADER_SKIN_GREEN","Verde");dictionary.addTranslation("HEADER_SKIN_RED","Rosso");dictionary.addTranslation("HEADER_SKIN_WHITE","Bianco");dictionary.addTranslation("HEADER_SKIN_YELLOW","Giallo");dictionary.addTranslation("HEADER_TAB_IMAGE","Immagini");dictionary.addTranslation("HEADER_TAB_MP3","MP3");dictionary.addTranslation("HEADER_TAB_NEWS","News");dictionary.addTranslation("HEADER_TAB_SITE","Nel Sito");dictionary.addTranslation("HEADER_TAB_VIDEO","Video");dictionary.addTranslation("HEADER_TAB_WEB","Web");

dictionary.addTranslation("TEXTLINK_FREE_LINK","Risultati web");dictionary.addTranslation("TEXTLINK_FREE_LINK_TITLE","Risultati web");dictionary.addTranslation("TEXTLINK_NOT_KEYWORD_NULL","Please, insert a search keyword");dictionary.addTranslation("TEXTLINK_REQUIRED_FIELD_DISCLAIMER","This field is required");dictionary.addTranslation("TEXTLINK_SEARCH","Search");dictionary.addTranslation("TEXTLINK_SPONSORED_LINK","Risultati sponsorizzati");dictionary.addTranslation("TEXTLINK_SPONSORED_LINK_TITLE","Risultati web sponsorizzati");dictionary.addTranslation("TEXTLINK_WAIT_MESSAGE","Please, wait");

dictionary.addTranslation("CONTENT_ADD_COMMENT","Lascia il tuo commento");dictionary.addTranslation("CONTENT_ANSWER_COMMENT","rispondi al commento");dictionary.addTranslation("CONTENT_ARTICLES_GALLERY","ARTICOLI E FOTOGALLERY");dictionary.addTranslation("CONTENT_COMMENTS","Commenti");dictionary.addTranslation("CONTENT_COMMENT_BY","di");dictionary.addTranslation("CONTENT_GALLERY","Fotogallery");dictionary.addTranslation("CONTENT_HIDE_ADD_COMMENT","Nascondi commenti");dictionary.addTranslation("CONTENT_IN_NET_TITLE","In Rete");dictionary.addTranslation("CONTENT_NEWS","News");dictionary.addTranslation("CONTENT_OF","di");dictionary.addTranslation("CONTENT_ONLY_ARTICLES","solo articoli");dictionary.addTranslation("CONTENT_ONLY_GALLERIES","solo fotogallery");dictionary.addTranslation("CONTENT_PAGE_NOT_FOUND","Pagina non trovata");dictionary.addTranslation("CONTENT_PHOTO","Foto");dictionary.addTranslation("CONTENT_POLL","Sondaggio");dictionary.addTranslation("CONTENT_POLL_ANSWER_ALREADY_VOTED","Hai gi&agrave; votato:");dictionary.addTranslation("CONTENT_POLL_ANSWER_NOT_SELECTED","Non hai selezionato alcuna risposta");dictionary.addTranslation("CONTENT_POLL_EXPIRED","Il sondaggio &egrave; chiuso. Ecco i risultati:");dictionary.addTranslation("CONTENT_POLL_POLL","Sondaggio");dictionary.addTranslation("CONTENT_POLL_RESULTS","Guarda i risultati");dictionary.addTranslation("CONTENT_POLL_TOTAL_VOTES","Voti totali");dictionary.addTranslation("CONTENT_POLL_VOTE","Vota");dictionary.addTranslation("CONTENT_POLL_VOTE_1","Voto");dictionary.addTranslation("CONTENT_POLL_VOTE_ANOTHER","Vota un altro sondaggio");dictionary.addTranslation("CONTENT_POLL_VOTE_N","Voti");dictionary.addTranslation("CONTENT_RSS_ADD_MIX","Aggiungi al tuo MIX");dictionary.addTranslation("CONTENT_RSS_ARTICLES ABOUT","Articoli su");dictionary.addTranslation("CONTENT_RSS_ARTICLES_ABOUT","Articoli su");dictionary.addTranslation("CONTENT_RSS_BY_RSS","RSS");dictionary.addTranslation("CONTENT_RSS_COMMENTS_ON","Tutti i commenti a questo articolo");dictionary.addTranslation("CONTENT_RSS_COMMENTS_ON_CHANNEL","Tutti i commenti di");dictionary.addTranslation("CONTENT_RSS_CONTENTS_ON_CHANNEL","Tutti i contenuti di");dictionary.addTranslation("CONTENT_RSS_CONTENTS_ON_PRESS","Tutte le News su:");dictionary.addTranslation("CONTENT_RSS_CONTENTS_ON_PRESS_CATEGORY","Tutti i contenuti di");dictionary.addTranslation("CONTENT_RSS_CONTENTS_ON_SEARCH","Salva questa ricerca su");dictionary.addTranslation("CONTENT_RSS_ON_YOUR_MIX","MIX");dictionary.addTranslation("CONTENT_RSS_SUBSCRIBE_FEED","Sottoscrivi feed");dictionary.addTranslation("CONTENT_SEARCH_NOT_FOUND","Non ci sono contenuti con questo tag, riprova con un altro tag");dictionary.addTranslation("CONTENT_SEARCH_TAG_BOX_TITLE","Cerca Tag");dictionary.addTranslation("CONTENT_SEARCH_TAG_BUTTON","OK");dictionary.addTranslation("CONTENT_SERVICE_UNAVAILABLE","Il contenuto cercato non &egrave; al momento disponibile. Ti invitiamo a riprovare.");dictionary.addTranslation("CONTENT_SHOW_ALL_CATEGORY_NEWS","Tutte le news della categoria:");dictionary.addTranslation("CONTENT_SHOW_ARCHIVE_CATEGORY_NEWS","Archivio news di:");dictionary.addTranslation("CONTENT_SOCIALBM_SHARE_THIS","condividi");dictionary.addTranslation("CONTENT_TOOLBAR_DESCRIPTION_ALL","Tutti i contenuti");dictionary.addTranslation("CONTENT_TOOLBAR_DESCRIPTION_ARTICLE","Articoli");dictionary.addTranslation("CONTENT_TOOLBAR_DESCRIPTION_PHOTO","Fotogallery");dictionary.addTranslation("CONTENT_TOOLBAR_DESCRIPTION_POLL","Sondaggi");dictionary.addTranslation("CONTENT_TOOLBAR_DESCRIPTION_VIDEO","Video");dictionary.addTranslation("CONTENT_TOOLBAR_FILTER","Filtra:");dictionary.addTranslation("CONTENT_VIEW_USER_COMMENTS","tutti i commenti di");dictionary.addTranslation("CONTENT_YOUR_MIX","il tuo MIX");

dictionary.addTranslation("FLIGHTHOTEL_ARRIVAL_CITY","Citt&agrave; di arrivo");dictionary.addTranslation("FLIGHTHOTEL_COMPARE_AT_LEAST_TWO","Seleziona almeno 2 offerte");dictionary.addTranslation("FLIGHTHOTEL_COMPARE_FLIGHT","Volo");dictionary.addTranslation("FLIGHTHOTEL_COMPARE_HTLDESCRIPTION","Descrizione");dictionary.addTranslation("FLIGHTHOTEL_COMPARE_HTLNAME","Hotel");dictionary.addTranslation("FLIGHTHOTEL_COMPARE_HTLSTARS","Stelle");dictionary.addTranslation("FLIGHTHOTEL_COMPARE_MAX","Massimo 3 offerte selezionabili");dictionary.addTranslation("FLIGHTHOTEL_DEPARTURE","Andata");dictionary.addTranslation("FLIGHTHOTEL_DEPARTURE_CITY","Citt&agrave; di partenza");dictionary.addTranslation("FLIGHTHOTEL_FROM","Da");dictionary.addTranslation("FLIGHTHOTEL_NIGHTS","Notti");dictionary.addTranslation("FLIGHTHOTEL_REQUIRED_FIELD_DISCLAIMER","Campo Obbligatorio");dictionary.addTranslation("FLIGHTHOTEL_RETURN","Ritorno");dictionary.addTranslation("FLIGHTHOTEL_TO","A");dictionary.addTranslation("FLIGHTHOTEL_TOTALPRICE","Prezzo totale");dictionary.addTranslation("FLIGHTHOTEL_VENDOR","Da");

dictionary.addTranslation("FLIGHT_ADULTS","Adulti");dictionary.addTranslation("FLIGHT_AIRLINE","Compagnia Aerea");dictionary.addTranslation("FLIGHT_AIR_COMPANY","Compagnia aerea");dictionary.addTranslation("FLIGHT_ARRIVAL","Arrivo");dictionary.addTranslation("FLIGHT_ARRIVAL_AIRPORT_DESC","Aeroporto");dictionary.addTranslation("FLIGHT_ARRIVAL_CITY","Arrivo");dictionary.addTranslation("FLIGHT_ARRIVAL_DATE_DTIME","Arrivo");dictionary.addTranslation("FLIGHT_ARRIVAL_TIME_DESC","Data e ora");dictionary.addTranslation("FLIGHT_BUSINESS","Business");dictionary.addTranslation("FLIGHT_CHILD","Bambini");dictionary.addTranslation("FLIGHT_CHILD_NOTES","(da 2 a 11 anni)");dictionary.addTranslation("FLIGHT_CLASS","Classe");dictionary.addTranslation("FLIGHT_COMPARE_AT_LEAST_TWO","Seleziona almeno due voli da confrontare");dictionary.addTranslation("FLIGHT_COMPARE_BACK","Indietro");dictionary.addTranslation("FLIGHT_COMPARE_BUTTON","Confronta i voli");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_ARRIVALCITY","Citt&agrave; di arrivo");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_ARRIVALDATE","Arrivo");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_CLASS","Classe");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_DEPARTURECITY","Citt&agrave; di partenza");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_DEPARTUREDATE","Partenza");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_JOURNEYTYPE","Tipo di volo");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_JOURNEY_A","Sola andata");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_JOURNEY_R","Andata e ritorno");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_PRICE","Prezzo");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_RETURNARRIVALDATE","Arrivo ritorno");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_RETURNDEPARTUREDATE","Partenza ritorno");dictionary.addTranslation("FLIGHT_COMPARE_DETAILS_VIEWOFFER","Vedi Offerta");dictionary.addTranslation("FLIGHT_COMPARE_MAX","Seleziona al massimo 4 voli da confrontare");dictionary.addTranslation("FLIGHT_DEPARTURE","Partenza");dictionary.addTranslation("FLIGHT_DEPARTURE_AIRPORT_DESC","Aeroporto");dictionary.addTranslation("FLIGHT_DEPARTURE_CITY","Partenza");dictionary.addTranslation("FLIGHT_DEPARTURE_DATE_DTIME","Partenza");dictionary.addTranslation("FLIGHT_DEPARTURE_TIME_DESC","Data e ora");dictionary.addTranslation("FLIGHT_DEP_DATE","Andata");dictionary.addTranslation("FLIGHT_DESELECT_BUTTON","Deseleziona tutto");dictionary.addTranslation("FLIGHT_DETAIL","Dettagli");dictionary.addTranslation("FLIGHT_DETAIL_IMG_NAME","dettagli.gif");dictionary.addTranslation("FLIGHT_ECONOMY","Economy");dictionary.addTranslation("FLIGHT_FILTER_BY","Filtro");dictionary.addTranslation("FLIGHT_FILTER_MORE_THAN","Pi&ugrave; di");dictionary.addTranslation("FLIGHT_HOPS_NUMBER","Numero di scali");dictionary.addTranslation("FLIGHT_HOPS_NUMBER_ZERO","Nessuno");dictionary.addTranslation("FLIGHT_HOP_ARRIVAL","Arrivo");dictionary.addTranslation("FLIGHT_HOP_DEPARTURE","Partenza");dictionary.addTranslation("FLIGHT_HOP_DESC","Tratta");dictionary.addTranslation("FLIGHT_HOTEL_FHTYPE","Confronta");dictionary.addTranslation("FLIGHT_INFANT","Neonati");dictionary.addTranslation("FLIGHT_INFANT_NOTES","(da 0 a 2 anni)");dictionary.addTranslation("FLIGHT_JOURNEY_TYPE","Tipo di volo");dictionary.addTranslation("FLIGHT_JOURNEY_TYPE_ONE_WAY","Sola andata");dictionary.addTranslation("FLIGHT_JOURNEY_TYPE_ROUND_TRIP","Andata e ritorno");dictionary.addTranslation("FLIGHT_NOT_DEP_CITY_NULL","Inserire la citt&agrave; di partenza");dictionary.addTranslation("FLIGHT_NOT_DEST_CITY_NULL","Inserire la citt&agrave; di destinazione");dictionary.addTranslation("FLIGHT_OUTBOUND_HOPS_DESC","Andata");dictionary.addTranslation("FLIGHT_PRICE","Prezzo");dictionary.addTranslation("FLIGHT_PRICE_UNIT","&euro;");dictionary.addTranslation("FLIGHT_REQUIRED_FIELD_DISCLAIMER","Campo obbligatorio");dictionary.addTranslation("FLIGHT_RETURN_DEPARTURE_DATE_DTIME","Arrivo");dictionary.addTranslation("FLIGHT_RETURN_HOPS_DESC","Ritorno");dictionary.addTranslation("FLIGHT_RET_DATE","Ritorno");dictionary.addTranslation("FLIGHT_SEARCH_FLIGHT_DESC","Ricerca voli");dictionary.addTranslation("FLIGHT_SHOW_OFFER","VEDI OFFERTA");dictionary.addTranslation("FLIGHT_START_DATE_GREATER_END_DATE","La data di ritorno e&#039; precedente la data di partenza");dictionary.addTranslation("FLIGHT_STOP_FOR","Durata dello scalo");dictionary.addTranslation("FLIGHT_TIME_EVENING","Sera");dictionary.addTranslation("FLIGHT_TIME_MORNING","Mattina");dictionary.addTranslation("FLIGHT_TIME_NOON","Pomeriggio");dictionary.addTranslation("FLIGHT_UNFILTER_ALL","Mostra tutti");dictionary.addTranslation("FLIGHT_UNKNOWN_COMPANY","N/A");dictionary.addTranslation("FLIGHT_UPPER_ARRIVAL","ARRIVO");dictionary.addTranslation("FLIGHT_UPPER_DEPARTURE","PARTENZA");dictionary.addTranslation("FLIGHT_UPPER_OUTWARD","ANDATA");dictionary.addTranslation("FLIGHT_UPPER_RETURN","RITORNO");dictionary.addTranslation("FLIGHT_WAIT_MESSAGE","Attendere prego, stiamo cercando i voli migliori");

dictionary.addTranslation("HOTEL_ADULTS","Adulti");dictionary.addTranslation("HOTEL_CHECKIN","Check In");dictionary.addTranslation("HOTEL_CHECKOUT","Check Out");dictionary.addTranslation("HOTEL_CITY","Citt&agrave;");dictionary.addTranslation("HOTEL_CITY_TOO_SHORT","Il nome della citt&agrave; &egrave; troppo corto");dictionary.addTranslation("HOTEL_CITY_ZONE","Zona");dictionary.addTranslation("HOTEL_COMPARE_AT_LEAST_TWO","Attenzione: seleziona almeno due hotel");dictionary.addTranslation("HOTEL_COMPARE_BACK","Indietro");dictionary.addTranslation("HOTEL_COMPARE_BUTTON","Confronta le offerte");dictionary.addTranslation("HOTEL_COMPARE_DETAILS_CITY","Citta&#039;");dictionary.addTranslation("HOTEL_COMPARE_DETAILS_CITY_ZONE","Zona");dictionary.addTranslation("HOTEL_COMPARE_DETAILS_DESCRIPTION","Descrizione");dictionary.addTranslation("HOTEL_COMPARE_DETAILS_NAME","Nome");dictionary.addTranslation("HOTEL_COMPARE_DETAILS_PRICE","Prezzo");dictionary.addTranslation("HOTEL_COMPARE_DETAILS_STARS","Stelle");dictionary.addTranslation("HOTEL_COMPARE_DETAILS_VIEWOFFER","Vedi offerta");dictionary.addTranslation("HOTEL_COMPARE_MAX","Selezionare al massimo 3 Hotel");dictionary.addTranslation("HOTEL_COUNTRY","Nazione");dictionary.addTranslation("HOTEL_DESCRIPTION","Descrizione");dictionary.addTranslation("HOTEL_DESELECT_BUTTON","Deseleziona tutto");dictionary.addTranslation("HOTEL_FILTER_BY","Seleziona per");dictionary.addTranslation("HOTEL_FILTER_MORE_THAN","Pi&ugrave; di");dictionary.addTranslation("HOTEL_NOT_CITY_NULL","Devi selezionare una citta&#039;");dictionary.addTranslation("HOTEL_NOT_COUNTRY_NULL","Devi selezionare un Paese");dictionary.addTranslation("HOTEL_PRICE","Prezzo");dictionary.addTranslation("HOTEL_PRICE_UNIT","&euro;");dictionary.addTranslation("HOTEL_REQUIRED_FIELD_DISCLAIMER","Campo Obbligatorio");dictionary.addTranslation("HOTEL_RESULT_FIELD_UNAVAILABLE","N/D");dictionary.addTranslation("HOTEL_ROOMS","Stanze");dictionary.addTranslation("HOTEL_SEARCH_DESC","Trova alberghi");dictionary.addTranslation("HOTEL_SELECT_COUNTRY","Seleziona un Paese");dictionary.addTranslation("HOTEL_STAR","Stella");dictionary.addTranslation("HOTEL_STARS","Stelle");dictionary.addTranslation("HOTEL_START_DATE_GREATER_END_DATE","Attenzione, la data del check in e&#039; successiva a quella del check out");dictionary.addTranslation("HOTEL_UNFILTER_ALL","Mostra tutti");dictionary.addTranslation("HOTEL_UNKNOWN_VALUE","Sconosciuto");dictionary.addTranslation("HOTEL_VENDOR","Da");dictionary.addTranslation("HOTEL_WAIT_MESSAGE","Ti preghiamo di attendere, stiamo cercando le offerte migliori");

function popup(url,title,width,height,top,left){var width=(width==null)?0:width;var height=(height==null)?0:height;var top=(top==null)?0:top;var left=(left==null)?0:left;var w=400;if(width!=0){w=width;}
var h=250;if(height!=0){h=height;}
var l=Math.floor((screen.width-w)/2);if(left!=0){l=left;}
var t=Math.floor((screen.height-h)/2);if(top!=0){t=top;}
window.open(url,'',"width="+w+",height="+h+",top="+t+",left="+l+", status=no, menubar=no, toolbar=no");}
function popupScroll(url,title,width,height,top,left){var width=(width==null)?0:width;var height=(height==null)?0:height;var top=(top==null)?0:top;var left=(left==null)?0:left;var w=400;if(width!=0){w=width;}
var h=250;if(height!=0){h=height;}
var l=Math.floor((screen.width-w)/2);if(left!=0){l=left;}
var t=Math.floor((screen.height-h)/2);if(top!=0){t=top;}
window.open(url,'',"width="+w+",height="+h+",top="+t+",left="+l+", scrollbars=yes");}
function homePage(url){var error=_("NO_HOMEPAGE_SETTING_FOR_YOUR_BROWSER");if((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)){hpset.style.behavior="url('#default#homePage')"
hpset.setHomePage(url);}
else{alert(error);}}
function bookmark(url,title){var error=_("NO_BOOKMARK_FOR_YOUR_BROWSER");if((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)){if(document.all){window.external.AddFavorite(url,title);}
else{alert(error);}}
else{alert(error);}}
function URLEncode(url)
{var SAFECHARS="0123456789"+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"-_.!~*'()";var HEX="0123456789ABCDEF";var plaintext=url.toString();var encoded="";for(var i=0;i<plaintext.length;i++){var ch=plaintext.charAt(i);if(ch==" "){encoded+="+";}else if(SAFECHARS.indexOf(ch)!=-1){encoded+=ch;}else{var charCode=ch.charCodeAt(0);if(charCode>255){encoded+="+";}else{encoded+="%";encoded+=HEX.charAt((charCode>>4)&0xF);encoded+=HEX.charAt(charCode&0xF);}}}
return encoded;};function gethex(decimal){var hexchars="0123456789ABCDEFabcdef";return"%"+hexchars.charAt(decimal>>4)+hexchars.charAt(decimal&0xF);}
function Utf8UrlEncode(url){var unreserved="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.~";var reserved="!*'();:@&=+$,/?%#[]";var allowed=unreserved+reserved;var decoded=url;var encoded="";for(var i=0;i<decoded.length;i++){var ch=decoded.charAt(i);if(unreserved.indexOf(ch)!=-1){encoded=encoded+ch;}else{var charcode=decoded.charCodeAt(i);if(charcode<128){encoded=encoded+gethex(charcode);}
if(charcode>127&&charcode<2048){encoded=encoded+gethex((charcode>>6)|0xC0);encoded=encoded+gethex((charcode&0x3F)|0x80);}
if(charcode>2047&&charcode<65536){encoded=encoded+gethex((charcode>>12)|0xE0);encoded=encoded+gethex(((charcode>>6)&0x3F)|0x80);encoded=encoded+gethex((charcode&0x3F)|0x80);}
if(charcode>65535){encoded=encoded+gethex((charcode>>18)|0xF0);encoded=encoded+gethex(((charcode>>12)&0x3F)|0x80);encoded=encoded+gethex(((charcode>>6)&0x3F)|0x80);encoded=encoded+gethex((charcode&0x3F)|0x80);}}}
return encoded;}
function dump(value,level){var dumped_text="";var dumped_subvars=new Array();var vars_i=0;var level_padding="";for(var j=0;j<level;j++){level_padding+='\t';}
if(!level)level=0;if(typeof(value)=='boolean'){dumped_text=value;}else if(typeof(value)=='string'){dumped_text='"'+value+'"';}else if(typeof(value)=='number'){dumped_text=value;}else if(typeof value=='function'){dumped_text=value;}else if(typeof value=='undefined'){dumped_text='undefined';}else if(value==null){dumped_text='null';}else if(typeof(value)=='object'){for(var item in value){dumped_subvars[vars_i]=level_padding+'\t"'+item+'": '+dump(value[item],level+1);vars_i++;}
dumped_text+='{\n';dumped_text+=dumped_subvars.join(',\n');dumped_text+='\n'+level_padding+"}";}
return dumped_text;}
function formatCurrency(num){if(typeof num=='undefined'){return'0,00';}
num=num.toString().replace(/\$|\,/g,'');if(isNaN(num)){num="0";}
sign=(num==(num=Math.abs(num)));num=Math.floor(num*100+0.50000000001);cents=num%100;num=Math.floor(num/100).toString();if(cents<10){cents="0"+cents;}
for(var i=0;i<Math.floor((num.length-(1+i))/3);i++){num=num.substring(0,num.length-(4*i+3))+'.'+num.substring(num.length-(4*i+3));}
return(((sign)?'':'-')+num+','+cents);}
function stripId(text){var rExp=new RegExp("\\sid=\"?([a-zA-Z0-9]|-|_)*\"?","g");var t=new String(text);return t.replace(rExp,'');}
function replaceId(objName,newId,text){var rExp=new RegExp("\\sid=\"?"+objName,"g");var t=new String(text);var tmp='';if(isIE){tmp=t.replace(rExp," id="+objName+"_"+newId);}
else{tmp=t.replace(rExp," id=\""+objName+"_"+newId);}
return tmp;}
function wLog(text,last){w=window.open('','test');w.document.write(text+"<br>");if(last==1){w.document.write("<hr>");}}
function cloneOf(what)
{if(typeof(what)=='object'&&what!=null){var clone=new Object();for(i in what){clone[i]=cloneOf(what[i]);}
return clone;}else{return what;}}
function count(object)
{if(isArray(object)){return object.length;}
else{var i=0;for(ii in object){i++;}
return i;}}
function position(object,key)
{i=0;for(ii in object){if(ii==key){return i;}
i++;}
return i;}
function isLast(object,key)
{var count=0;var position=-1;for(ii in object){if(ii==key){position=count;}
count++;}
return position==count-1;}
function FloatExec(n,operator,m)
{var nDecimalsCount=0;var mDecimalsCount=0;var nDecMultiplier=1;var mDecMultiplier=1;var nDecimals=Number(n).toString().split('.')[1];if(typeof nDecimals!='undefined'){nDecimalsCount=nDecimals.length;nDecMultiplier=Math.pow(10,nDecimalsCount);}
var mDecimals=Number(m).toString().split('.')[1];if(typeof mDecimals!='undefined'){mDecimalsCount=mDecimals.length;mDecMultiplier=Math.pow(10,mDecimalsCount);}
if(operator=='/'||operator=='*'){n=Math.round(n*nDecMultiplier);m=Math.round(m*mDecMultiplier);ret=eval(n+operator+m);ret/=(nDecMultiplier*mDecMultiplier);}else if(operator=='+'||operator=='-'){n=Math.round(n*Math.max(nDecMultiplier,mDecMultiplier));m=Math.round(m*Math.max(nDecMultiplier,mDecMultiplier));ret=eval(n+operator+m);ret/=Math.max(nDecMultiplier,mDecMultiplier);}
return Number(ret);}
function distinctValues(array)
{var temp=new Array();array.sort();for(i=0;i<array.length;i++){if(typeof array[i+1]!='undefined'&&array[i]==array[i+1])
{continue}
temp[temp.length]=array[i];}
return temp;}
function isArray(v)
{if(v!=null){return(typeof v=='object'&&v.constructor.toString().indexOf("Array()")!=-1);}
else{return false;}}
function getFunction(f)
{try{if(typeof f!='function'){f=eval(f);}}catch(e){}
return(typeof f=='function')?f:null;}
function typeOf(element)
{return element.constructor.toString().split(' ')[1].split('(')[0];}
function http_build_query(params,path)
{var first=1;var query="";for(paramName in params){paramValue=params[paramName];query+=(first==1)?'':'&';first=0;if(typeof path=='undefined'){var paramPath=Utf8UrlEncode(paramName);}else{var paramPath=path+'['+Utf8UrlEncode(paramName)+']';}
if(typeof paramValue=='undefined'||paramValue==null){query+=paramPath+'=';}else if(typeof paramValue=='object'){query+=http_build_query(paramValue,paramPath);}else{paramValue=new String(paramValue);query+=paramPath+'='+Utf8UrlEncode(paramValue);}}
return query;}
function ucfirst(string)
{return string.substr(0,1).toUpperCase()+string.substr(1);}
function rC(){var rand_no=Math.floor(Math.random()*100);var rand_no2=Math.floor(Math.random()*100);if(rand_no<rCt){if(rand_no2<rSt){gjcall('getLink',{'rSw':rCw});}
else{gjcall('getLink',{'rCw':rCw});}}}
function utf8_encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}
else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}
else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;}
function utf8_decode(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}
else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}
else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return string;}
function trim(str){return str.replace(/^\s*([\S\s]*?)\s*$/,'$1');}
Date.prototype.format=function(format){var returnStr='';var replace=Date.replaceChars;for(var i=0;i<format.length;i++){var curChar=format.charAt(i);if(replace[curChar])
returnStr+=replace[curChar].call(this);else
returnStr+=curChar;}
return returnStr;};Date.replaceChars={shortMonths:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],longMonths:['January','February','March','April','May','June','July','August','September','October','November','December'],shortDays:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],longDays:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],d:function(){return(this.getDate()<10?'0':'')+this.getDate();},D:function(){return Date.replace.shortDays[this.getDay()];},j:function(){return this.getDate();},l:function(){return Date.replace.longDays[this.getDay()];},N:function(){return this.getDay()+1;},S:function(){return(this.getDate()%10==1&&this.getDate()!=11?'st':(this.getDate()%10==2&&this.getDate()!=12?'nd':(this.getDate()%10==3&&this.getDate()!=13?'rd':'th')));},w:function(){return this.getDay();},z:function(){return"Not Yet Supported";},W:function(){return"Not Yet Supported";},F:function(){return Date.replace.longMonths[this.getMonth()];},m:function(){return(this.getMonth()<9?'0':'')+(this.getMonth()+1);},M:function(){return Date.replace.shortMonths[this.getMonth()];},n:function(){return this.getMonth()+1;},t:function(){return"Not Yet Supported";},L:function(){return"Not Yet Supported";},o:function(){return"Not Supported";},Y:function(){return this.getFullYear();},y:function(){return(''+this.getFullYear()).substr(2);},a:function(){return this.getHours()<12?'am':'pm';},A:function(){return this.getHours()<12?'AM':'PM';},B:function(){return"Not Yet Supported";},g:function(){return this.getHours()==0?12:(this.getHours()>12?this.getHours()-12:this.getHours());},G:function(){return this.getHours();},h:function(){return(this.getHours()<10||(12<this.getHours()<22)?'0':'')+(this.getHours()<10?this.getHours()+1:this.getHours()-12);},H:function(){return(this.getHours()<10?'0':'')+this.getHours();},i:function(){return(this.getMinutes()<10?'0':'')+this.getMinutes();},s:function(){return(this.getSeconds()<10?'0':'')+this.getSeconds();},e:function(){return"Not Yet Supported";},I:function(){return"Not Supported";},O:function(){return(this.getTimezoneOffset()<0?'-':'+')+(this.getTimezoneOffset()/60<10?'0':'')+(this.getTimezoneOffset()/60)+'00';},T:function(){return"Not Yet Supported";},Z:function(){return this.getTimezoneOffset()*60;},c:function(){return"Not Yet Supported";},r:function(){return this.toString();},U:function(){return this.getTime()/1000;}}
function htmlEntities(str)
{var div=document.createElement('div');var text=document.createTextNode(str);div.appendChild(text);return div.innerHTML;};function html_entity_decode(str)
{var div=document.createElement('div');div.innerHTML=str;return div.childNodes[0].data;};function implode(glue,pieces)
{return((pieces instanceof Array)?pieces.join(glue):pieces);};function join(glue,pieces)
{return implode(glue,pieces);};function strip_tags(str,allowed_tags){var key='',tag='',allowed=false;var matches=allowed_array=[];var replacer=function(search,replace,str){return str.split(search).join(replace);};if(allowed_tags){allowed_array=allowed_tags.match(/([a-zA-Z]+)/gi);}
str+='';matches=str.match(/(<\/?[^>]+>)/gi);key=0;if(matches==null){matches=new Array();}
for(key=0;key<matches.length;key++){if(isNaN(key)){continue;}
html=matches[key].toString();allowed=false;var k=0;for(k=0;k<allowed_array.length;k++){allowed_tag=allowed_array[k];i=-1;if(i!=0){i=html.toLowerCase().indexOf('<'+allowed_tag+'>');}
if(i!=0){i=html.toLowerCase().indexOf('<'+allowed_tag+' ');}
if(i!=0){i=html.toLowerCase().indexOf('</'+allowed_tag);}
if(i==0){allowed=true;break;}}
if(!allowed){str=replacer(html,"",str);}}
return str;}
function canonicalize_url(url){url=(url+'').replace(/\0/g,'0').replace(/\\([\\'"])/g,'$1');url=url.replace(' ','%20');var parsed_url=parse_url(url);if(parsed_url.scheme!==''){url='http://'+url;parsed_url=parse_url(url);}
if(parsed_url.scheme!='http'&&parsed_url.scheme!='https'){return NULL;}
var host=parsed_url.host.toLowerCase();if(host!=''){url=url.replace(parsed_url.host,host);}
var url_before_extra=url.replace('/(\?|#).*/','');if(countOccurrences(url_before_extra,'/')<3){url=url.replace('/([^?#]+)/','\\1/');}
url=url.replace('&amp;','&');return url;}
function parse_url(str,component){var o={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/\/?)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var m=o.parser[o.strictMode?"strict":"loose"].exec(str),uri={},i=14;while(i--)uri[o.key[i]]=m[i]||"";switch(component){case'PHP_URL_SCHEME':return uri.protocol;case'PHP_URL_HOST':return uri.host;case'PHP_URL_PORT':return uri.port;case'PHP_URL_USER':return uri.user;case'PHP_URL_PASS':return uri.password;case'PHP_URL_PATH':return uri.path;case'PHP_URL_QUERY':return uri.query;case'PHP_URL_FRAGMENT':return uri.anchor;default:var retArr={};if(uri.protocol!=='')retArr.scheme=uri.protocol;if(uri.host!=='')retArr.host=uri.host;if(uri.port!=='')retArr.port=uri.port;if(uri.user!=='')retArr.user=uri.user;if(uri.password!=='')retArr.pass=uri.password;if(uri.path!=='')retArr.path=uri.path;if(uri.query!=='')retArr.query=uri.query;if(uri.anchor!=='')retArr.fragment=uri.anchor;return retArr;}}
function countOccurrences(haystack,needle)
{var occ=0;for(var i=0;i<haystack.length;i++)
{if(haystack.charAt(i)==needle)
{occ++;}}
return occ;}

var zXml={useActiveX:(typeof ActiveXObject!="undefined"),useDom:document.implementation&&document.implementation.createDocument,useXmlHttp:(typeof XMLHttpRequest!="undefined")};zXml.ARR_XMLHTTP_VERS=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp","Microsoft.XmlHttp"];zXml.ARR_DOM_VERS=["MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","Microsoft.XmlDom"];;function zXmlHttp(){}zXmlHttp.createRequest=function(){if(zXml.useXmlHttp){return new XMLHttpRequest();}else if(zXml.useActiveX){if(!zXml.XMLHTTP_VER){for(var i=0;i<zXml.ARR_XMLHTTP_VERS.length;i++){try{new ActiveXObject(zXml.ARR_XMLHTTP_VERS[i]);zXml.XMLHTTP_VER=zXml.ARR_XMLHTTP_VERS[i];break;}catch(oError){;}}}if(zXml.XMLHTTP_VER){return new ActiveXObject(zXml.XMLHTTP_VER);}else{throw new Error("Could not create XML HTTP Request.");}}else{throw new Error("Your browser doesn't support an XML HTTP Request.");}};zXmlHttp.isSupported=function(){return zXml.useXmlHttp||zXml.useActiveX;};function zXmlDom(){}zXmlDom.createDocument=function(){if(zXml.useDom){var oXmlDom=document.implementation.createDocument("","",null);oXmlDom.parseError={valueOf:function(){return this.errorCode;},toString:function(){return this.errorCode.toString()}};oXmlDom.__initError__();oXmlDom.addEventListener("load",function(){this.__checkForErrors__();this.__changeReadyState__(4);},false);return oXmlDom;;}else if(zXml.useActiveX){if(!zXml.DOM_VER){for(var i=0;i<zXml.ARR_DOM_VERS.length;i++){try{new ActiveXObject(zXml.ARR_DOM_VERS[i]);zXml.DOM_VER=zXml.ARR_DOM_VERS[i];break;}catch(oError){;}}}if(zXml.DOM_VER){return new ActiveXObject(zXml.DOM_VER);}else{throw new Error("Could not create XML DOM document.");}}else{throw new Error("Your browser doesn't support an XML DOM document.");}};zXmlDom.isSupported=function(){return zXml.useDom||zXml.useActiveX;};var oMozDocument=null;if(typeof XMLDocument!="undefined"){oMozDocument=XMLDocument;}else if(typeof Document!="undefined"){oMozDocument=Document;}if(oMozDocument&&!window.opera){oMozDocument.prototype.readyState=0;oMozDocument.prototype.onreadystatechange=null;oMozDocument.prototype.__changeReadyState__=function(iReadyState){this.readyState=iReadyState;if(typeof this.onreadystatechange=="function"){this.onreadystatechange();}};oMozDocument.prototype.__initError__=function(){this.parseError.errorCode=0;this.parseError.filepos=-1;this.parseError.line=-1;this.parseError.linepos=-1;this.parseError.reason=null;this.parseError.srcText=null;this.parseError.url=null;};oMozDocument.prototype.__checkForErrors__=function(){if(this.documentElement.tagName=="parsererror"){var reError=/>([\s\S]*?)Location:([\s\S]*?)Line Number(\d+),Column(\d+):<sourcetext>([\s\S]*?)(?:\-*\^)/;reError.test(this.xml);this.parseError.errorCode=-999999;this.parseError.reason=RegExp.$1;this.parseError.url=RegExp.$2;this.parseError.line=parseInt(RegExp.$3);this.parseError.linepos=parseInt(RegExp.$4);this.parseError.srcText=RegExp.$5;}};oMozDocument.prototype.loadXML=function(sXml){this.__initError__();this.__changeReadyState__(1);var oParser=new DOMParser();var oXmlDom=oParser.parseFromString(sXml,"text/xml");while(this.firstChild){this.removeChild(this.firstChild);}for(var i=0;i<oXmlDom.childNodes.length;i++){var oNewNode=this.importNode(oXmlDom.childNodes[i],true);this.appendChild(oNewNode);}this.__checkForErrors__();this.__changeReadyState__(4);};oMozDocument.prototype.__load__=oMozDocument.prototype.load;oMozDocument.prototype.load=function(sURL){this.__initError__();this.__changeReadyState__(1);this.__load__(sURL);};Node.prototype.__defineGetter__("xml",function(){var oSerializer=new XMLSerializer();return oSerializer.serializeToString(this,"text/xml");});Node.prototype.__defineGetter__("text",function(){var sText="";for(var i=0;i<this.childNodes.length;i++){if(this.childNodes[i].hasChildNodes()){sText+=this.childNodes[i].text;}else{sText+=this.childNodes[i].nodeValue;}}return sText;});}function zXslt(){}zXslt.transformToText=function(oXml,oXslt){if(typeof XSLTProcessor!="undefined"){var oProcessor=new XSLTProcessor();oProcessor.importStylesheet(oXslt);var oResultDom=oProcessor.transformToDocument(oXml);var sResult=oResultDom.xml;if(sResult.indexOf("<transformiix:result")>-1){sResult=sResult.substring(sResult.indexOf(">")+1,sResult.lastIndexOf("<"));}return sResult;;}else if(zXml.useActiveX){return oXml.transformNode(oXslt);}else{throw new Error("No XSLT engine found.");}};function zXPath(){}zXPath.selectNodes=function(oRefNode,sXPath,sXmlNs){if(typeof XPathEvaluator!="undefined"){oXmlNs=oXmlNs||{};var nsResolver=function(sPrefix){return oXmlNs[sPrefix];};var oEvaluator=new XPathEvaluator();var oResult=oEvaluator.evaluate(sXPath,oRefNode,nsResolver,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null);var aNodes=new Array;if(oResult!=null){var oElement=oResult.iterateNext();while(oElement){aNodes.push(oElement);oElement=oResult.iterateNext();}}return aNodes;}else if(zXml.useActiveX){if(oXmlNs){var sXmlNs="";for(var sProp in oXmlNs){sXmlNs+="xmlns:"+sProp+"="+oXmlNs[sProp]+" ";}oRefNode.ownerDocument.setProperty("SelectionNamespaces",sXmlNs);};return oRefNode.selectNodes(sXPath);}else{throw new Error("No XPath engine found.");}};zXPath.selectSingleNode=function(oRefNode,sXPath,oXmlNs){if(typeof XPathEvaluator!="undefined"){;oXmlNs=oXmlNs||{};var nsResolver=function(sPrefix){return oXmlNs[sPrefix];};var oEvaluator=new XPathEvaluator();var oResult=oEvaluator.evaluate(sXPath,oRefNode,nsResolver,XPathResult.FIRST_ORDERED_NODE_TYPE,null);if(oResult!=null){return oResult.singleNodeValue;}else{return null;};}else if(zXML.useActiveX){if(oXmlNs){var sXmlNs="";for(var sProp in oXmlNs){sXmlNs+="xmlns:"+sProp+"="+oXmlNs[sProp]+" ";}oRefNode.ownerDocument.setProperty("SelectionNamespaces",sXmlNs);};return oRefNode.selectSingleNode(sXPath);}else{throw new Error("No XPath engine found.");}};function zXMLSerializer(){}zXMLSerializer.prototype.serializeToString=function(oNode){var sXml="";switch(oNode.nodeType){case 1:sXml="<"+oNode.tagName;for(var i=0;i<oNode.attributes.length;i++){sXml+=" "+oNode.attributes[i].name+"=\""+oNode.attributes[i].value+"\"";}sXml+=">";for(var i=0;i<oNode.childNodes.length;i++){sXml+=this.serializeToString(oNode.childNodes[i]);}sXml+="</"+oNode.tagName+">";break;case 3:sXml=oNode.nodeValue;break;case 4:sXml="<![CDATA["+oNode.nodeValue+"]]>";break;case 7:sXml="<?"+oNode.nodevalue+"?>";break;case 8:sXml="<!--"+oNode.nodevalue+"-->";break;case 9:for(var i=0;i<oNode.childNodes.length;i++){sXml+=this.serializeToString(oNode.childNodes[i]);}break;};return sXml;};

function gjcall(fName,params){var callString="/ajaxServer.php?gjaction="+fName+'&'+http_build_query(params);var objXmlHttp=zXmlHttp.createRequest();objXmlHttp.onreadystatechange=function()
{if(objXmlHttp.readyState==4){if(objXmlHttp.status==200){try{eval(objXmlHttp.responseText);}
catch(e){if(!isProd){var stack=e.stack.split('@');alert(e.message+"\n\n"+dump(stack));}}
finally{}}
else{if(!isProd){alert("ERROR "+objXmlHttp.status+"\n\n"+callString);}}}};objXmlHttp.open("get",callString,true);objXmlHttp.send(null);}

function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires='; expires='+date.toGMTString();}else{var expires='';}
document.cookie=name+'='+value+expires+'; path=/';}
function setCookie(name,value,expires,path,domain,secure){var curCookie=name+'='+escape(value)+
((expires)?'; expires='+expires.toGMTString():'')+
((path)?'; path='+path:'')+
((domain)?'; domain='+domain:'')+
((secure)?'; secure':'');document.cookie=curCookie;}
function readCookie(name){var nameEQ=name+'=';var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,'',-1);}

function ResultList(){this.reset=function(){this.list=new Array();this.visibleList=new Array();this.toCompare=0;this.compareList=new Object();this.totalResultsRequired=0;this.partners=new Object();this.currentPage=0;this.resPerPage=0;this.filtersCurrentField=null;this.filtersCurrentStrip=null;this.ajaxServiceList=new Object({'textlink':true,'shoppingSearch':true});this.response=new Array();this.filtersSelected=new Object();this.filters=undefined;if(typeof this.params=='object'){if(this.params.showInformations){var waitDiv=document.getElementById(this.params.waitDivId);if(waitDiv!=null){waitDiv.style.display='block';}
if(this.params.noResultsId&&this.params.noResultsId!=null&&document.getElementById(this.params.noResultsId)&&document.getElementById(this.params.noResultsId)!=null){document.getElementById(this.params.noResultsId).style.display='none';}
document.getElementById(this.params.resultDisplayId).style.display='none';document.getElementById(this.params.resultContainerId).innerHTML="";}
if(typeof(this.params.partnerList)!='undefined'&&count(this.params.partnerList)!=0){for(partner in this.params.partnerList){this.setPagerParams(partner,this.params.partnerList[partner].pagerParams);this.totalResultsRequired+=Number(this.params.partnerList[partner].params.numForPage);}}}}
this.setup=function(params){if(typeof this.params=='undefined'){this.params=new Object();paramsList=["id"];function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}
paramsList.push(pname);};param_default('fromCampain',1);param_default('colPosition',1);param_default('largestCol',2);param_default('colsNumber',1);param_default('showInformations',true);param_default('defaultSorting','partner');param_default('comparatorMax',3);param_default('service',null);param_default('partnerList',Object());param_default('function',null);param_default('recordCallback',null);param_default('resultsCallback',null);param_default('objName',null);param_default('waitDivId',null);param_default('noResultsId',null);param_default('compareButtonId',null);param_default('sortBarId',null);param_default('resultContainerId',null);param_default('resultDisplayId',null);param_default('comparatorContainerId',null);param_default('compareContainerId',null);param_default('comparatorWaitId',null);param_default('mainContainer',null);param_default('sorterSelect',null);param_default('showPager',null);param_default('showOrder',null);param_default('showComparator',null);param_default('top_keyword',null);param_default('addResultEvent',null);param_default('showResultsEvent',null);param_default('showFiltersEvent',null);param_default('sortByFunction',null);param_default('htmlizeFunction',null);param_default('openComparatorFunction',null);}
var checkConfig=true;for(var ii in params){if(this.arrIndexOf(paramsList,ii)==-1){alert("Wrong config option: "+ii);checkConfig=false;}}
if(checkConfig){for(paramName in params){this.params[paramName]=params[paramName];}}
this.reset();}
this.call=function(page){var resCounter=0;if(typeof(this.resCounter)!="undefined"){resCounter=this.resCounter;}
var partnerName;var partnerParams;var pagerParams;var partnerWeight=count(this.partners);var partnerNumber;for(partnerName in this.partners){partnerParams=cloneOf(this.partners[partnerName].params);partnerNumber=partnerParams.numForPage;if(page==1){pagerParams=this.partners[partnerName].pagerParams.next;}else if(page==-1){resCounter-=this.localResCounter+this.previous_localResCounter;pagerParams=this.partners[partnerName].pagerParams.prev;this.resCounter=resCounter;}
for(paramName in pagerParams){partnerParams[paramName]=pagerParams[paramName];}
partnerParams['partnerWeight']=partnerWeight;partnerParams['partnerNumber']=partnerNumber;partnerWeight--;if(this.params.showPager&&this.ajaxServiceList[this.params.service]==undefined){delete partnerParams.numForPage;}
gjcall('contentServer',{'service':this.params.service,'partner':partnerName,'params':partnerParams,'function':this.params['function'],'recordCallback':this.params.recordCallback,'resultsCallback':this.params.resultsCallback,'objName':this.params.objName,'resCounter':resCounter});}}
this.addResult=function(service,partner,func,objName,record){if((addResultEvent=getFunction(this.params.addResultEvent))!=null){addResultEvent(this,record);}
recordCopy={'id':this.list.length,'object':cloneOf(record),'partner':partner,'toCompare':false,'hidden':false}
this.list[recordCopy.id]=recordCopy;this.list[recordCopy.id].object.filterList=new Object();if(typeof(this.localResCounter)=="undefined"){this.localResCounter=0;}
this.localResCounter+=1;return recordCopy.id;}
this.showResults=function(service,partner,func,objName){if(typeof partner!='undefined'){this.partners[partner].done=true;}
if((showResultsEvent=getFunction(this.params.showResultsEvent))!=null){showResultsEvent(this,partner);}
if(typeof this.filters!='undefined'){if((showFiltersEvent=getFunction(this.params.showFiltersEvent))!=null){showFiltersEvent(this);}}
if(this.params.showInformations){if(this.showDone()){var wDiv=document.getElementById(this.params.waitDivId);if(wDiv!=null){wDiv.style.display='none';}}
if(this.getLength()==1){var showComparator=this.params.showComparator;var showOrder=this.params.showOrder;var showPager=this.params.showPager;this.params.showComparator=0;this.params.showOrder=0;this.params.showPager=0;}
if(this.showDone()){if(this.getLength()==0&&count(this.filtersSelected)==0){var noResultsDiv=document.getElementById(this.params.noResultsId);if((this.params['partnerList'][partner]['params']['shopping_query']!="")||(this.params['partnerList'][partner]['params']['textlink_search']!=""))
{if(noResultsDiv!=null){noResultsDiv.style.display='block';}else{if(wDiv!=null){wDiv.style.display='block';wDiv.innerHTML="";var br=document.createElement("br");wDiv.appendChild(br);var text=document.createTextNode(_("COMMON_SORRY_NO_RESULT_MESSAGE"));wDiv.appendChild(text);var br2=document.createElement("br");wDiv.appendChild(br2);var br3=document.createElement("br");wDiv.appendChild(br3);}}}}}
if(this.params.defaultSorting!=null){this.sortResult(this.params.defaultSorting);}
else{this.showPage(0);}
if(this.getLength()==1){this.params.showComparator=showComparator;this.params.showOrder=showOrder;this.params.showPager=showPager;}}}
this.noResults=function(partner){}
this.showDone=function(){var done=true;for(partner in this.partners){done=done&&this.partners[partner].done;}
return done;}
this.arrIndexOf=function(arr,searchElement,fromIndex){if(Array.prototype.indexOf){return arr.indexOf(searchElement,fromIndex);}
if(!fromIndex){fromIndex=0;}
for(var iElement=fromIndex;iElement<arr.length;iElement++){if(arr[iElement]==searchElement){return iElement;}}
return-1;}
this.hideWait=function(){if(this.params.showInformations){var wDiv=document.getElementById(this.params.waitDivId);if(wDiv!=null){wDiv.style.display='none';}}}
this.showWait=function(){if(this.params.showInformations){var wDiv=document.getElementById(this.params.waitDivId);if(wDiv!=null){wDiv.style.display='block';}}}
this.showPage=function(page){var numRes=(this.totalResultsRequired<this.getLength())?this.totalResultsRequired:this.getLength();var start=numRes*page;if(this.ajaxServiceList[this.params.service]==undefined){this.currentPage=page;}
this.resPerPage=numRes;this.reDisplay(start,numRes);this.showPager(page+1,page-1,numRes);}
this.showPagePrevNext=function(page){var resCounter=0;var currentPage=this.currentPage;currentPage+=page;if(typeof(this.resCounter)!="undefined"){resCounter=this.resCounter;}
this.reset();this.currentPage=currentPage;if(this.currentPage==0){this.fromStart=true;}
this.call(page);this.previous_localResCounter=this.localResCounter;}
this.showPager=function(next,prev,numRes){if(this.params.showPager==0){return;}
var totalPages=Math.ceil(this.getLength()/numRes);if(totalPages==1){return;}
if(totalPages<(this.getLength()/numRes)){totalPages++;}
if(totalPages>=10){totalPages=10;}
var isPagerDiv=false;if(document.getElementById(this.params.objName+"_pager")!=null){divResult=document.getElementById(this.params.objName+"_pager");divResult.innerHTML='';isPagerDiv=true;}
else{divResult=document.getElementById(this.params.resultContainerId);}
var divPager=document.createElement("div");if(this.params.service=='relatedSearch'){divPager.className="page_bar_related_search";}else{divPager.className="page_bar_shopping";}
var prevSpan=document.createElement("span");var prevText="&laquo;&nbsp;"+(_("COMMON_PREVIOUS"));if(this.currentPage>0){var prevLink=document.createElement("a");prevLink.href="javascript:execute('search', {objName: '"+this.params.objName+"', number_page: "+prev+"});";prevLink.title=_("COMMON_PAGE")+" "+(prev+1);prevLink.innerHTML=prevText;prevSpan.appendChild(prevLink);}
else{prevSpan.innerHTML=prevText;}
divPager.appendChild(prevSpan);var pages=new Array();for(var i=0;i<totalPages;i++){var preSpace=document.createTextNode(" ");divPager.appendChild(preSpace);if(i!=this.currentPage){pages[i]=document.createElement("a");pages[i].href="javascript:execute('search', {objName: '"+this.params.objName+"', number_page: "+i+"});";pages[i].title=_("COMMON_PAGE")+" "+(i+1);pages[i].innerHTML=i+1;}
else{pages[i]=document.createTextNode(i+1);}
divPager.appendChild(pages[i]);var postSpace=document.createTextNode(" ");divPager.appendChild(postSpace);if(i<totalPages-1){var pipe=document.createTextNode("|");divPager.appendChild(pipe);}}
var nextSpan=document.createElement("span");var nextText=(_("COMMON_NEXT"))+"&nbsp;&raquo;";if(this.currentPage<totalPages-1){var nextLink=document.createElement("a");nextLink.href="javascript:execute('search', {objName: '"+this.params.objName+"', number_page: "+next+"});";nextLink.title=_("PAGE")+" "+(next+1);nextLink.innerHTML=nextText;nextSpan.appendChild(nextLink);}
else{nextSpan.innerHTML=nextText;}
divPager.appendChild(nextSpan);divResult.appendChild(divPager);if(isPagerDiv==true){divResult.style.display='block';}}
this.showPagerPrevNext=function(next,prev,numRes){var partnerName;for(partnerName in this.partners){break;}
var isPagerDiv=false;if(document.getElementById(this.params.objName+"_pager")!=null){divResult=document.getElementById(this.params.objName+"_pager");divResult.innerHTML='';isPagerDiv=true;}
else{divResult=document.getElementById(this.params.resultContainerId);}
var divPager=document.createElement("div");divPager.className="page_bar_shopping";var divLeft=document.createElement("div");divLeft.className="page_bar_shopping_left";if(this.partners[partnerName].pagerParams&&this.partners[partnerName].pagerParams.prev!=null){var prevSpan=document.createElement("span");prevSpan.className="frecce";prevSpan.innerHTML="&lt;&lt;&nbsp;";var prevLink=document.createElement("a");prevLink.href="javascript:execute('search', {objName: '"+this.params.objName+"', number_page: "+prev+", ajax: true});";prevLink.appendChild(prevSpan);prevLink.innerHTML+=_("COMMON_PREVIOUS");divLeft.appendChild(prevLink);}
else{divLeft.innerHTML="&nbsp;";}
divPager.appendChild(divLeft);var divRight=document.createElement("div");divRight.className="page_bar_shopping_right";if(this.partners[partnerName].pagerParams&&this.partners[partnerName].pagerParams.next!=null){var nextSpan=document.createElement("span");nextSpan.className="frecce";nextSpan.innerHTML="&nbsp;&gt;&gt;";var nextLink=document.createElement("a");nextLink.href="javascript:execute('search', {objName: '"+this.params.objName+"', number_page: "+next+", ajax:true});";nextLink.innerHTML=_("COMMON_NEXT");nextLink.appendChild(nextSpan);divRight.appendChild(nextLink);}
divPager.appendChild(divRight);var clearDiv=document.createElement("div");clearDiv.className="clear";divPager.appendChild(clearDiv);divResult.appendChild(divPager);if(isPagerDiv==true){divResult.style.display='block';}}
this.reDisplay=function(start,numRes){this.countPart=new Array();for(var partnerName in this.params.partnerList){this.countPart[partnerName]=cloneOf(this.params.partnerList[partnerName].params.numForPage);}
document.getElementById(this.params.resultContainerId).innerHTML="";this.params.htmlizeFunction=getFunction(this.params.htmlizeFunction);if(this.params.htmlizeFunction==null){return false;}
var count_i=0;for(var i=0;i<this.list.length;i++){if(typeof(this.list[i].hidden)=='undefined'||this.list[i].hidden==false){if(count_i>=start&&(count_i<(start+numRes))){this.params.htmlizeFunction(this.params.resultContainerId,this,i);}else if(count_i>=(start+numRes)){break;}
count_i++;}}
if(count_i>0){if(this.params.resultDisplayId!=''){document.getElementById(this.params.resultContainerId).style.display='block';document.getElementById(this.params.resultDisplayId).style.display='block';var divBar1=document.getElementById(this.params.objName+"_orderBar1");var divBar2=document.getElementById(this.params.objName+"_orderBar2");if(this.params.showOrder==1||this.params.showComparator==1){if(divBar1!=null&&divBar2!=null){divBar1.style.display='block';divBar2.style.display='block';}
if(this.params.showOrder==1){document.getElementById(this.params.sortBarId+"1").style.display='block';document.getElementById(this.params.sortBarId+"2").style.display='block';}
if(this.params.showComparator==1){if((compareButton=document.getElementById(this.params.compareButtonId))!=null){compareButton.style.display='block';}
if((compareButton1=document.getElementById(this.params.compareButtonId+"1"))!=null){compareButton1.style.display='block';}
if((compareButton2=document.getElementById(this.params.compareButtonId+"2"))!=null){compareButton2.style.display='block';}}}else{if(divBar1!=null&&divBar2!=null){divBar1.style.display='none';divBar2.style.display='none';}}}}}
this.sortResult=function(orderKey){if(orderKey=='partner'){this.sortResultByPartner();}else{this.getFunction=getFunction;var select1=document.getElementById(this.params.sorterSelect+"1");var select2=document.getElementById(this.params.sorterSelect+"2");if(!(select1==null||select2==null))
{if(select1.options[select1.selectedIndex].value!=orderKey)
{select1.options[select1.selectedIndex].selected=false;select1.options[select2.selectedIndex].selected=true;}
else
{select2.options[select2.selectedIndex].selected=false;select2.options[select1.selectedIndex].selected=true;}}
if(orderKey!=''&&(sortByFunction=this.getFunction(this.params.sortByFunction))!=null){eval(this.params.sortByFunction+'(orderKey)');}
delete(this.getFunction);}
this.showPage(0);}
this.sortResultByPartner=function(){this.list.sort(function(a,b){var A=parseInt(a.object.partnerWeight);var B=parseInt(b.object.partnerWeight);return(A<B)?1:((A>B)?-1:0);});}
this.getLength=function(){var real_i=0;for(i=0;i<this.list.length;i++){if(typeof this.list[i].hidden=='undefined'||this.list[i].hidden==false){real_i++;}}
return real_i;}
this.getElement=function(num){if(num<=this.list.length){return this.list[num];}
return null;}
this.changeCompareValue=function(name_id,checked){var nameCompare=this.params.objName;if(nameCompare.indexOf('.similarProductsLists.')>=0){nameCompare=nameCompare.replace('.similarProductsLists.','_similar_');}
for(i=0;i<this.list.length;i++){if(nameCompare+'_'+this.list[i].id==name_id){if(this.list[i].toCompare==false&&checked==true){this.toCompare++;this.compareList[name_id]=this.list[i];}else if(this.list[i].toCompare==true&&checked==false){this.toCompare--;delete(this.compareList[name_id]);}
this.list[i].toCompare=checked;}}}
this.deleteCompareValue=function(){for(i in this.compareList){var el=document.getElementById(this.params.objName+'_'+this.compareList[i].id+'_comparecheck');if(el!=undefined&&el!=null){el.checked=false;el.removeAttribute('checked');}
this.compareList[i].toCompare=false;this.toCompare--;}
this.compareList=new Array();}
this.toCompareList=function(){var toCompareList=new ResultList();toCompareList.setup({showInformations:false});for(i in this.compareList){toCompareList.addResult('','','','',this.compareList[i].object);}
return toCompareList;}
this.isComparable=function(){if((openComparatorFunction=getFunction(this.params.openComparatorFunction))==null){return false;}else if(this.toCompare<2){return false;}else if(this.toCompare>this.params.comparatorMax){return false;}else{return true;}}
this.openComparator=function(){if((openComparatorFunction=getFunction(this.params.openComparatorFunction))==null){alert('An error occurred in comparator opening');return false;}else if(this.toCompare<2){alert(_(this.params.service.toUpperCase()+'_COMPARE_AT_LEAST_TWO'));return false;}else if(this.toCompare>this.params.comparatorMax){alert(_(this.params.service.toUpperCase()+'_COMPARE_MAX'));return false;}else{document.getElementById(this.params.resultDisplayId).style.display="none";if(this.params.comparatorWaitId!=null&&document.getElementById(this.params.comparatorWaitId)!=null){document.getElementById(this.params.comparatorWaitId).style.display="block";}else{document.getElementById(this.params.comparatorContainerId).style.display="block";}
var compareContainer=document.getElementById(this.params.compareContainerId);while(compareContainer.rows.length>0){compareContainer.deleteRow(0);}
openComparatorFunction(this);return true;}}
this.showComparator=function(){if(this.params.comparatorWaitId!=null&&document.getElementById(this.params.comparatorWaitId)!=null){document.getElementById(this.params.comparatorWaitId).style.display="none";document.getElementById(this.params.comparatorContainerId).style.display="block";}}
this.closeComparator=function(){document.getElementById(this.params.comparatorContainerId).style.display="none";document.getElementById(this.params.resultDisplayId).style.display="block";}
this.setPagerParams=function(partnerName,pagerParams){this.params.partnerList[partnerName].pagerParams=pagerParams;this.partners[partnerName]={'params':this.params.partnerList[partnerName].params,'pagerParams':typeof(this.params.partnerList[partnerName].pagerParams)!='undefined'?this.params.partnerList[partnerName].pagerParams:null,'done':false};}
this.enumSort=function(a){var i,j;for(i=0;i<a.length;i++){var smallest=i;for(j=i+1;j<a.length;j++){if(a[j].cmp_value<a[smallest].cmp_value){smallest=j;}}
var temp=a[i];a[i]=a[smallest];a[smallest]=temp;}
return a;}
this.evalFilters=function(){var i;for(i in this.filters){var j;for(j=0;j<this.filters[i].execs.length;j++){this.filters[i].execs[j].count=0;}}
var ii;for(ii=0;ii<this.visibleList.length;ii++){var jj;if(this.list[ii].hidden==false){for(jj in this.list[ii].object.filterList){if(this.filters[jj].execs[this.list[ii].object.filterList[jj]]!=undefined){this.filters[jj].execs[this.list[ii].object.filterList[jj]].count++;}}}}}
this.setFilters=function(filters){if(typeof filters!='undefined'){this.filters=new Object();for(i in filters){this.filters[filters[i].param_name]={type:filters[i].data_type,path:filters[i].path};}
var objName=this.params.objName;for(filterName in this.filters){if(this.list.length>0){field_type=this.filters[filterName].type;field_path=this.filters[filterName].path;filter_execs=new Array();switch(field_type){case'INT':if(typeof field_number_min!='undefined'){delete(field_number_min);}
if(typeof field_number_max!='undefined'){delete(field_number_max);}
var i=0;numValues=new Array();for(ii=0;ii<this.list.length;ii++){field=eval('this.list[ii].object.'+field_path);if(field!=null&&typeof field!='object'){field=Number(field);if(typeof field_number_min=='undefined'||field<field_number_min){field_number_min=field;}
if(typeof field_number_max=='undefined'||field>field_number_max){field_number_max=field;}}
if(field!=null&&!isNaN(field)){numValues[i++]=Number(field);}}
numValues=distinctValues(numValues);numValues.sort(function(a,b){return a-b});var filter_strips=new Array();if(numValues.length>=5){for(i=0;i<5;i++){filter_strips[i]=numValues[Math.round((parseFloat(numValues.length)/5)*i)];}}else{for(i=0;i<numValues.length;i++){filter_strips[i]=numValues[i];}
delete(filter_strips[i]);}
for(i=0;i<filter_strips.length;i++){i=Number(i);filter_execs[i]=new Array();filter_execs[i]=(typeof(filter_strips[i+1])=='undefined')?{'value_min':Math.floor(filter_strips[i]),'value_max':Math.floor(field_number_max+1.0)}:{'value_min':Math.floor(filter_strips[i]),'value_max':Math.floor(filter_strips[i+1])};filter_execs[i].count=0;filter_execs[i].elemList=new Array();for(ii=0;ii<this.list.length;ii++){if(this.list[ii].hidden==false){field=eval('this.list[ii].object.'+field_path);if(filter_execs[i].value_min<=field&&field<filter_execs[i].value_max){filter_execs[i].count++;filter_execs[i].elemList.push(ii);this.list[ii].object.filterList[filterName]=i;}}}}
break;case'INT_LIST':var i=0;numValues=new Array();for(ii=0;ii<this.list.length;ii++){field=eval('this.list[ii].object.'+field_path);if(field!=null&&typeof field!='object'){field=Number(field);}
if(field!=null&&!isNaN(field)){numValues[i++]=Number(field);}}
numValues=distinctValues(numValues);numValues.sort(function(a,b){return a-b});var filter_strips=new Array();for(i=0;i<numValues.length;i++){filter_strips[i]=numValues[i];i=Number(i);filter_execs[i]=new Array();filter_execs[i].count=0;filter_execs[i].cmp_value=numValues[i];filter_execs[i].elemList=new Array();for(ii=0;ii<this.list.length;ii++){if(this.list[ii].hidden==false){field=eval('this.list[ii].object.'+field_path);if(filter_execs[i].cmp_value==field){filter_execs[i].count++;filter_execs[i].elemList.push(ii);this.list[ii].object.filterList[filterName]=i;}}}}
break;case'ENUM':case'SET':filter_strips=new Object();for(ii=0;ii<this.list.length;ii++){if(this.list[ii].hidden==false){field=eval('this.list[ii].object.'+this.filters[filterName].path);if(field!=null){fields=(field_type=='SET')?field:[field];for(i=0;i<fields.length;i++){if(fields[i]==''){fields[i]='EMPTYVALUE';}
if(typeof filter_strips[fields[i]]=='undefined'){filter_strips[fields[i]]={'cmp_value':fields[i],'count':1,'elemList':[ii]};}else{filter_strips[fields[i]].count++;filter_strips[fields[i]].elemList.push(ii);}}}}}
for(strip in filter_strips){filter_execs[filter_execs.length]=filter_strips[strip];if(filter_execs.length==5){break;}}
if(field_type=='ENUM'){filter_execs=this.enumSort(filter_execs);}
break;}
this.filters[filterName].execs=filter_execs;for(strip=0;strip<filter_execs.length;strip++){for(elemIndex=0;elemIndex<filter_execs[strip].elemList.length;elemIndex++){this.list[filter_execs[strip].elemList[elemIndex]].object.filterList[filterName]=strip;}}}}}}
this.unsetFilters=function(){delete(this.filters);this.filtersCurrentField=null;this.filtersCurrentStrip=null;}
this.filterFor=function(field,strip){this.filtersSelected[field]=strip;this.filterView();}
this.deselectFilter=function(field){delete(this.filtersSelected[field]);this.filterView();}
this.filterView=function(){var index;this.visibleList=new Array();for(index=0;index<this.list.length;index++){this.list[index].hidden=false;this.filterHide(index);}
this.evalFilters();this.showResults();}
this.filterHide=function(elementIndex){var field;var strip;var check_value;for(field in this.filtersSelected){check_value=this.filterCheckValue(elementIndex,field);this.list[elementIndex].hidden=(this.list[elementIndex].hidden||check_value);if(this.list[elementIndex].hidden){break;}}
if(this.list[elementIndex].hidden==false){this.visibleList[elementIndex]=true;}}
this.filterCheckValue=function(elementIndex,field){var check_value=false;var strip=this.filtersSelected[field];check_value=(this.list[elementIndex].object.filterList[field]==undefined||this.list[elementIndex].object.filterList[field]!=strip);return check_value;}
this.showAll=function(){this.filtersCurrentField=null;this.filtersCurrentStrip=null;this.filtersSelected=new Object();this.visibleList=new Array();for(ii=0;ii<this.list.length;ii++){this.list[ii].hidden=false;this.visibleList[ii]=true;}
this.evalFilters();var select1=document.getElementById(this.params.sorterSelect+"1");var select2=document.getElementById(this.params.sorterSelect+"2");if(select1!=null&&select1!=undefined){select1.options[select1.selectedIndex].selected=false;select1.options[0].selected=true;}
if(select2!=null&&select2!=undefined){select2.options[select1.selectedIndex].selected=false;select2.options[0].selected=true;}
this.showResults();}
this.initBodyResults=function(){var bodyResult=document.getElementById(this.params.resultContainerId);bodyResult.innerHTML="";this.list=new Array();}
this.setResultCounter=function(i)
{this.localResCounter=0;if(typeof(i)!="undefined"){this.resCounter=i;}}
this.getCLabTrack=function(partner)
{if(typeof(trackCLab)!="undefined"&&trackCLab){return"sendtrack('"+partner+"_"+this.getCLabKeyword(partner)+"')";}
else{return"";}}
this.reset();}

function doNav(objectLayer,type){if(type=='over'){objectLayer.className='background_element_results';}else{objectLayer.className='';}}

ResultList.prototype.sort_result_textlink_by=function(key){switch(key){case'priceup':this.list.sort(this.sort_result_textlink_by_PriceAsc);break;case'pricedown':this.list.sort(this.sort_result_textlink_by_PriceDesc);}}
ResultList.prototype.sort_result_textlink_by_PriceAsc=function(a,b){var A=parseFloat(a.object.price.replace(',','.'));var B=parseFloat(b.object.price.replace(',','.'));var ret=0;if(A<B){ret=-1;}
if(A>B){ret=1;}
return ret;}
ResultList.prototype.sort_result_textlink_by_PriceDesc=function(a,b){var A=parseFloat(a.object.price.replace(',','.'));var B=parseFloat(b.object.price.replace(',','.'));var ret=0;if(A>B){ret=-1;}
if(A<B){ret=1;}
return ret;}
var HTMLGeneral='';var pageDone=false;var firstTime=true;function htmlize_result_textlink(elementId,obj,recordId){var objName=obj.params.objName;var resultModel=$('#'+objName+'_resultModel');var divResult=$('#'+elementId);if(firstTime){var tempClass='sponsor_results';if(obj.params.by_columns==true){tempClass+=' col';divResult.html(divResult.html()+'<div class="'+tempClass+'">'+_('TEXTLINK_SPONSORED_LINK')+'</div><div class="clear"></div>');}else{divResult.html(divResult.html()+'<div class="'+tempClass+'">'+_('TEXTLINK_SPONSORED_LINK')+'</div>');}
firstTime=false;}
var f=obj.getElement(recordId);var hDesc=$('#'+objName+'_hDesc');var hTitle=$('#'+objName+'_hTitle');var dLabel=$('#'+objName+'_label');var spLabel=$('#'+objName+'_spLabel');var hSponsor='<span class="link">'+f.object.merchant+'</span>';var hLink=$('#'+objName+'_hLink');var descLimit=(obj.params.colsNumber=='1')?400:((obj.params.colPosition==obj.params.largestCol)?250:50);var tempDesc=((f.object.description.length>descLimit)?f.object.description.substring(0,descLimit)+'...':f.object.description)+hSponsor;var keywords=f.object.keyword.split(' ');f.object.visibleTitle=f.object.title;$(keywords).each(function(key,val){if(val.length>2){f.object.title=f.object.title.replace(new RegExp('('+val+')','gi'),'<span class="source">$1</span>');tempDesc=tempDesc.replace(new RegExp('('+val+')','gi'),'<span class="source">$1</span>');f.object.merchant=f.object.merchant.replace(new RegExp('('+val+')','gi'),'<span class="source">$1</span>');}});hTitle.html(f.object.title);hDesc.html(tempDesc);hLink.attr('href',f.object.urltracking);hLink.attr('title',f.object.visibleTitle);if(f.object.bidded==true||f.object.bidded=='true'){hLink.css('display','block');}else{hLink.attr('class',hLink.attr('class')+' free');hLink.css('display','block');}
if(obj.params.by_columns==true){if(recordId%2==0){hLink.attr('class','left');}
if(recordId%2==1){hLink.attr('class','right');}}else{hLink.attr('class','nocolumn');}
if(obj.params.featured==true){hLink.attr('class','featuredlink');}
divResult.html(divResult.html()+stripId(resultModel.html()));}
show_result_textlink=function(obj,partner){var htmlizeToCall='htmlize_result_textlink_'+siteModule;if(typeof(window[htmlizeToCall])=='undefined'){htmlizeToCall='htmlize_result_textlink';}
htmlize_result_textlink=eval(htmlizeToCall);var check=true;firstTime=true;if(check&&obj.params.showPager){obj.showPager=obj.showPagerPrevNext;delete(obj.bidded);delete(obj.free);}}

document.onmousemove=innerTXTMouseMove;var innerTXTmousePos;var top=-2;var left=3;var timer=20;var speed=10;var endalpha=100;var innerTXTdivsTiming=[];var innerTXTmaxVisible=4000;function innerTXTview(element){document.onmousemove=innerTXTMouseMove;if(element!=null&&element!=undefined){var k=element.innerHTML;var id=k.replace('/\W/g','')+'_div';if(document.getElementById(id)!=undefined&&document.getElementById(id)!=null){var div=document.getElementById(id);div.style.filter='alpha(opacity= 0)';div.style.opacity=0;div.setAttribute('txtAlpha',0);innerTXTvisible(div);var pos2=innerTXTfindPos(element);pos2.push(element.offsetHeight);pos2.push(element.offsetWidth);}
else{element.id=id+"_opener";var pos2=innerTXTfindPos(element);pos2.push(element.offsetHeight);pos2.push(element.offsetWidth);var div=document.createElement('div');div.id=id;div.style.filter='alpha(opacity= 0)';div.style.opacity=0;div.setAttribute('txtAlpha',0);var img=document.createElement('img');img.src='/img/site/innerTXT-loader.gif';img.alt=_('INNERTXT_LOADING');var divLoader=document.createElement('div');divLoader.id=id+'_loader';divLoader.className='innerTXTLoader';divLoader.appendChild(img);var textNode=document.createTextNode(_('INNERTXT_LOADING'));divLoader.appendChild(textNode);document.body.appendChild(divLoader);innerTXTFloatDiv(divLoader.id,10,10).sP(pos2[0],(pos2[1]-pos2[2]-top));div.fade=function(d){var a=(this.getAttribute('txtAlpha'))?parseInt(this.getAttribute('txtAlpha')):0;if((a!=endalpha&&d==1)||(a!=0&&d==-1)){var i=speed;if(endalpha-a<speed&&d==1){i=endalpha-a;}
else if(a<speed&&d==-1){i=a;}
var b=a+(i*d);this.style.opacity=b*.01;this.style.filter='alpha(opacity= '+b+')';this.setAttribute('txtAlpha',b);}
else{if(d==-1){this.style.display='none'}}};document.body.appendChild(div);Drag.callBackStart=innerTXTStatusVisible;Drag.callBackEnd=innerTXTStatusHidden;Drag.callBackOnMouseMove=innerTXTMouseMove;Drag.init(div);var other=innerTXTgetOther(element);gjcall('innerTXTCall',{'id':id,'kwd':k,'module':siteModule,'market':globalMarket,'other':other});div.className='innerTXTContainer';div.setAttribute('txtElementPos',pos2);div.onmouseover=function(){innerTXTStatusVisible(this)};div.onmouseout=function(){innerTXTStatusHidden(this)};}}}
function innerTXTaddVisible(divId,ts){var i;for(i in innerTXTdivsTiming){if(i!=divId){innerTXThidden(i);}}
innerTXTdivsTiming=[];innerTXTdivsTiming[divId]=ts;innerTXTcurrentVisible=document.getElementById(divId);}
function innerTXTStatusVisible(obj){if(typeof obj=='string'){obj=document.getElementById(obj);}
obj.setAttribute('status','visible');}
function innerTXTStatusHidden(obj){if(typeof obj=='string'){obj=document.getElementById(obj);}
obj.setAttribute('status','hidden');}
function innerTXTisHidden(obj){if(typeof obj=='string'){obj=document.getElementById(obj);}
if(obj.getAttribute('status')){return(obj.getAttribute('status')=='hidden');}
else{return true;}}
function innerTXTDivCheck(){var ts=new Date().getTime();var i;var stillValid=[];for(i in innerTXTdivsTiming){if((ts-innerTXTdivsTiming[i])<innerTXTmaxVisible){stillValid[i]=innerTXTdivsTiming[i];}
else{if(innerTXTisHidden(i)){innerTXThidden(i);}
else{stillValid[i]=ts;}}}
innerTXTdivsTiming=stillValid;setTimeout(innerTXTDivCheck,20);}
innerTXTfindPos=function(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft
curtop=obj.offsetTop
while(obj=obj.offsetParent){curleft+=obj.offsetLeft
curtop+=obj.offsetTop}}
return[curleft,curtop];};function innerTXTvisible(obj){if(typeof obj=='string'){obj=document.getElementById(obj+'_div');}
if(obj.innerHTML!=''){var pos2=obj.getAttribute('txtElementPos');if(typeOf(pos2)=='String'){var pos2=pos2.split(',');pos2[0]=parseInt(pos2[0]);pos2[1]=parseInt(pos2[1]);pos2[2]=parseInt(pos2[2]);}
obj.style.top=(pos2[1]-pos2[2]-obj.getAttribute('internalHeight')-top)+'px';obj.style.left=(pos2[0]+left)+'px';obj.style.display='block';clearInterval(obj.timer);obj.timer=setInterval(function(){obj.fade(1)},timer);innerTXTaddVisible(obj.id,new Date().getTime());innerTXTDivCheck();}}
function innerTXThidden(obj){if(typeof obj=='string'){obj=document.getElementById(obj);}
innerTXTStatusHidden(obj.id);delete innerTXTdivsTiming[obj.id];innerTXTcurrentVisible=null;clearInterval(obj.timer);obj.timer=setInterval(function(){obj.fade(-1)},timer);}
function innerTXTwrite(id,content,contentMeta){var divLoader=document.getElementById(id+'_loader');divLoader.style.display='none';var el=document.getElementById(id);if(el!=null&&el!=undefined){el.innerHTML=content;var internalHeight=innerTXTDivHeight(id);el.setAttribute('internalHeight',internalHeight);innerTXTvisible(el);if(document.getElementById(id+'_opener'))document.getElementById(id+'_opener').href=contentMeta.urltracking;}}
function innerTXTbuild(){var elements=innerTXTgetElementsByName('goadv_innertxt');for(i in elements){if(elements[i].innerHTML!=undefined&&elements[i].innerHTML!=''){elements[i].onmouseover=function(){innerTXTview(this);};elements[i].className+=' innerTXThighlight';elements[i].target='_blank';}}}
function innerTXTgetOther(element){var other=[];other.type=(element.getAttribute('txttype'))?element.getAttribute('txttype'):'textlink';other.catId=(element.getAttribute('txtcatId'))?element.getAttribute('txtcatId'):'';return other;}
function innerTXTgetElementsByName(name)
{if(isIE){var results=[];var elements=document.getElementsByTagName('*');for(var i=0;i<elements.length;i++){if(elements[i].getAttribute('name')==name){results.push(elements[i]);}}
return results;}
else{return document.getElementsByName(name);}}
function innerTXTMouseMove(ev){ev=ev||window.event;if(ev.pageX||ev.pageY){innerTXTmousePos={x:ev.pageX,y:ev.pageY};}
else{innerTXTmousePos={x:ev.clientX+document.body.scrollLeft-document.body.clientLeft,y:ev.clientY+document.body.scrollTop-document.body.clientTop};}}
function innerTXTFloatDiv(id,sx,sy)
{var el=document.getElementById(id);var px=document.layers?"":"px";window[el.id+"_obj"]=el;el.cx=el.sx=sx;el.cy=el.sy=sy;el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};el.floatIt=function()
{var ns=(navigator.appName.indexOf("Netscape")!=-1);var pX,pY;pX=(this.sx>=0)?0:ns?innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;pY=ns?pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;if(this.sy<0)
pY+=ns?innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;this.cx+=(pX+this.sx-this.cx)/8;this.cy+=(pY+this.sy-this.cy)/8;this.sP(this.cx,this.cy);if(this.style.display!='hidden'){setTimeout(this.id+"_obj.floatIt()",20);}}
return el;}
function innerTXTDivHeight(id){var div=document.getElementById(id);var divPos=innerTXTfindPos(div);var internalDiv=document.getElementById(id+'_internal');var internalDivPos=innerTXTfindPos(internalDiv);return(internalDivPos[1]-divPos[1]);}

var Drag={obj:null,callBackStart:null,callBackEnd:null,callBackOnMouseMove:null,init:function(o,oRoot,minX,maxX,minY,maxY,bSwapHorzRef,bSwapVertRef,fXMapper,fYMapper)
{o.onmousedown=Drag.start;o.hmode=bSwapHorzRef?false:true;o.vmode=bSwapVertRef?false:true;o.root=oRoot&&oRoot!=null?oRoot:o;if(o.hmode&&isNaN(parseInt(o.root.style.left)))o.root.style.left="0px";if(o.vmode&&isNaN(parseInt(o.root.style.top)))o.root.style.top="0px";if(!o.hmode&&isNaN(parseInt(o.root.style.right)))o.root.style.right="0px";if(!o.vmode&&isNaN(parseInt(o.root.style.bottom)))o.root.style.bottom="0px";o.minX=typeof minX!='undefined'?minX:null;o.minY=typeof minY!='undefined'?minY:null;o.maxX=typeof maxX!='undefined'?maxX:null;o.maxY=typeof maxY!='undefined'?maxY:null;o.xMapper=fXMapper?fXMapper:null;o.yMapper=fYMapper?fYMapper:null;o.root.onDragStart=new Function();o.root.onDragEnd=new Function();o.root.onDrag=new Function();},start:function(e)
{var o=Drag.obj=this;e=Drag.fixE(e);var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);o.root.onDragStart(x,y);o.lastMouseX=e.clientX;o.lastMouseY=e.clientY;if(o.hmode){if(o.minX!=null)o.minMouseX=e.clientX-x+o.minX;if(o.maxX!=null)o.maxMouseX=o.minMouseX+o.maxX-o.minX;}else{if(o.minX!=null)o.maxMouseX=-o.minX+e.clientX+x;if(o.maxX!=null)o.minMouseX=-o.maxX+e.clientX+x;}
if(o.vmode){if(o.minY!=null)o.minMouseY=e.clientY-y+o.minY;if(o.maxY!=null)o.maxMouseY=o.minMouseY+o.maxY-o.minY;}else{if(o.minY!=null)o.maxMouseY=-o.minY+e.clientY+y;if(o.maxY!=null)o.minMouseY=-o.maxY+e.clientY+y;}
document.onmousemove=Drag.drag;document.onmouseup=Drag.end;Drag.callBackStart(Drag.obj);return false;},drag:function(e)
{e=Drag.fixE(e);var o=Drag.obj;var ey=e.clientY;var ex=e.clientX;var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);var nx,ny;if(o.minX!=null)ex=o.hmode?Math.max(ex,o.minMouseX):Math.min(ex,o.maxMouseX);if(o.maxX!=null)ex=o.hmode?Math.min(ex,o.maxMouseX):Math.max(ex,o.minMouseX);if(o.minY!=null)ey=o.vmode?Math.max(ey,o.minMouseY):Math.min(ey,o.maxMouseY);if(o.maxY!=null)ey=o.vmode?Math.min(ey,o.maxMouseY):Math.max(ey,o.minMouseY);nx=x+((ex-o.lastMouseX)*(o.hmode?1:-1));ny=y+((ey-o.lastMouseY)*(o.vmode?1:-1));if(o.xMapper)nx=o.xMapper(y)
else if(o.yMapper)ny=o.yMapper(x)
Drag.obj.root.style[o.hmode?"left":"right"]=nx+"px";Drag.obj.root.style[o.vmode?"top":"bottom"]=ny+"px";Drag.obj.lastMouseX=ex;Drag.obj.lastMouseY=ey;Drag.obj.root.onDrag(nx,ny);return false;},end:function()
{document.onmousemove=null;document.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode?"left":"right"]),parseInt(Drag.obj.root.style[Drag.obj.vmode?"top":"bottom"]));Drag.callBackEnd(Drag.obj);Drag.obj=null;document.onmousemove=Drag.callBackOnMouseMove;},fixE:function(e)
{if(typeof e=='undefined')e=window.event;if(typeof e.layerX=='undefined')e.layerX=e.offsetX;if(typeof e.layerY=='undefined')e.layerY=e.offsetY;return e;}};

base64_encode=function(input)
{var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;do
{chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2))
{enc3=enc4=64;}
else if(isNaN(chr3))
{enc4=64;}
output=output+keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);}while(i<input.length);return output;};base64_decode=function(input)
{var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do
{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64)
{output=output+String.fromCharCode(chr2);}
if(enc4!=64)
{output=output+String.fromCharCode(chr3);}}while(i<input.length);return output;};

function serializeJsToPhp(jsArray){var arrayLength=0;for(var i=0;i<jsArray.length;i++){if(jsArray[i]!=undefined){arrayLength++;}}
var phpString="a:"+arrayLength+":{";for(var i=0;i<jsArray.length;i++){if(jsArray[i]!=undefined){phpString+="i:"+i;if(!isArray(jsArray[i])){phpString+=";s:"+jsArray[i].length+":\""+jsArray[i]+"\";";}else{phpString+=";"+serializeJsToPhp(jsArray[i]);}}}
phpString+="}";return phpString;}

function goadv_autosuggest(elem,gajax_params,autosuggestDiv,nbItems,className,navigation,separator,onDisplay){var me=this;this.elem=elem;if(gajax_params[2]!=undefined)
this.toWrite=gajax_params[2];else this.toWrite=elem;this.suggestions=new Array();this.eligible=new Array();this.inputText=null;this.highlighted=-1;this.div=document.getElementById(autosuggestDiv);this.data="dynamic";this.navigation=navigation;this.toDisable=false;this.separator=separator;this.addIframe=false;this.myLastValue="";this.buffer="";this.startList=0;this.sizeList=nbItems;this.itemLess="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<< << <<";this.itemMore="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;>> >> >>";this.timeToDisable=10000;this.startWith=false;this.boldSelection=true;this.nbLetters=3;this.sep="&nbsp;";this.uniqueRequest=true;this.timeNotReceived=0;this.gajaxParams=gajax_params;var lessId=-1;var moreId=-1;var TAB=9;var ESC=27;var KEYUP=38;var KEYDN=40;var KEYRIGHT=39;var KEYLEFT=37;var ENTER=13;var DEL=8;me.onDisplay=(typeof onDisplay=='function')?onDisplay:function(exactMatch){};this.exactMatchIsPresent=false;elem.setAttribute("autocomplete","off");if(!elem.id){var id="autosuggest"+idCounter;idCounter++;elem.id=id;}
this.kk_autosuggest_disableAutosuggest=function(){var ul=document.createElement('ul');this.div.replaceChild(ul,this.div.childNodes[0]);this.toDisable=true;this.suggestions=[];elem.setAttribute("autocomplete","on");};this.kk_autosuggest_isValidBrowser=function(){var ua=navigator.userAgent.toLowerCase();isGecko=(ua.indexOf('gecko')!=-1&&ua.indexOf('safari')==-1);isSafari=(ua.indexOf('safari')!=-1);isOpera=(ua.indexOf('opera')!=-1);isIE=(ua.indexOf('msie')!=-1&&!isOpera&&(ua.indexOf('webtv')==-1));isMozilla=(isGecko&&ua.indexOf('gecko/')+14==ua.length);isNS=((isGecko)?(ua.indexOf('netscape')!=-1):((ua.indexOf('mozilla')!=-1)&&!isOpera&&!isSafari&&(ua.indexOf('spoofer')==-1)&&(ua.indexOf('compatible')==-1)&&(ua.indexOf('webtv')==-1)&&(ua.indexOf('hotjava')==-1)));isIECompatible=((ua.indexOf('msie')!=-1)&&!isIE);isNSCompatible=((ua.indexOf('mozilla')!=-1)&&!isNS&&!isMozilla&&!isIECompatible&&!isIE);geckoVersion=((isGecko)?ua.substring((ua.lastIndexOf('gecko/')+6),(ua.lastIndexOf('gecko/')+14)):-1);equivalentMozilla=((isGecko)?parseFloat(ua.substring(ua.indexOf('rv:')+3)):-1);versionMinor=parseFloat(navigator.appVersion);if(isGecko&&!isMozilla){versionMinor=parseFloat(ua.substring(ua.indexOf('/',ua.indexOf('gecko/')+6)+1));}
else if(isMozilla){versionMinor=parseFloat(ua.substring(ua.indexOf('rv:')+3));}
else if(isIE&&versionMinor>=4){versionMinor=parseFloat(ua.substring(ua.indexOf('msie')+5));}
else if(isSafari){versionMinor=parseFloat(ua.substring(ua.lastIndexOf('safari/')+7));}
else if(isOpera){versionMinor=parseFloat(ua.substring(ua.indexOf('opera')+6));}
versionMajor=parseInt(versionMinor);isNS6up=(isNS&&versionMajor>=6);isIE55up=(isIE&&versionMinor>=5.5);this.addIframe=isIE55up;if(!isMozilla&&!isNSCompatible&&!isNS6up&&!isIE55up&&!isOpera)this.kk_autosuggest_disableAutosuggest();};this.kk_autosuggest_isValidBrowser();this.kk_autosuggest_showAutosuggest=function(){this.toDisable=false;elem.setAttribute("autocomplete","off");this.kk_autosuggest_isValidBrowser();setTimeout("document.getElementById('"+me.elem.id+"').focus()",0);if(elem.value.length>=me.nbLetters)this.kk_autosuggest_sendQuery(elem.value);};this.kk_autosuggest_updateStatus=function(id,str_hide,str_show){if(this.toDisable){this.kk_autosuggest_showAutosuggest();document.getElementById(id).innerHTML=str_hide;}
else{this.kk_autosuggest_disableAutosuggest();document.getElementById(id).innerHTML=str_show;}};this.kk_autosuggest_sendQuery=function(key){if(!this.toDisable){this.suggestions=new Array();this.gajaxParams[1][0]=key;gjcall(this.gajaxParams[0],this.gajaxParams[1]);}
reSendQuery=function(){alert("reSendQuery");}};this.kk_autosuggest_callBack=function(){if(arguments[0].readyState==4){if(arguments[0].status==200){if(arguments[0].responseText==""){me.kk_autosuggest_hideDiv();}
else{suggestions=eval(arguments[0].responseText);me.suggestions=suggestions;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else{me.kk_autosuggest_hideDiv();}}}
else{me.kk_autosuggest_hideDiv();}}
else{me.kk_autosuggest_hideDiv();}}
elem.onfocus=function(){if(!this.toDisable&&(elem.value.length>=me.nbLetters||me.data=="static")&&(me.div.style.display=="none"||me.div.style.display=="")){me.inputText=elem.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}}}
elem.onblur=function(){if(me.highlighted>-1&&(me.highlighted==moreId||me.highlighted==lessId)){setTimeout("document.getElementById('"+me.elem.id+"').focus()",0);}
else{setTimeout("hideDiv()",200);}
hideDiv=function(){me.div.style.display='none';me.highlighted=-1;me.startList=0;}}
elem.onkeydown=function(ev){var key=me.kk_autosuggest_getKeyCode(ev);switch(key){case TAB:if(me.highlighted>0){me.kk_autosuggest_useSuggestion();me.kk_autosuggest_hideDiv();}
else{me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
break;case ESC:me.kk_autosuggest_hideDiv();break;case KEYRIGHT:case KEYLEFT:if(me.highlighted==moreId&&me.highlighted!=-1){me.startList=me.startList+me.sizeList;me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else if(me.highlighted==lessId&&me.highlighted!=-1){me.startList=me.startList-me.sizeList;me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else if(me.highlighted==-1)me.kk_autosuggest_hideDiv();else me.kk_autosuggest_useSuggestion();break;case KEYUP:if(me.highlighted>0){me.highlighted--;}
me.kk_autosuggest_changeHighlight(key);break;case KEYDN:if(me.navigation==true){if(moreId!=-1)max=moreId;else max=me.eligible.length%me.sizeList;}
else max=me.eligible.length-1;if(me.highlighted<max){me.highlighted++;}
me.kk_autosuggest_changeHighlight(key);break;default:me.kk_autosuggest_positionDiv();break;}};elem.onkeypress=function(ev){var key=me.kk_autosuggest_getKeyCode(ev);switch(key){case ENTER:if(me.highlighted>-1){me.kk_autosuggest_useSuggestion();return false;}}}
elem.onkeyup=function(ev){var key=me.kk_autosuggest_getKeyCode(ev);switch(key)
{case TAB:case ESC:case ENTER:case KEYUP:case KEYDN:case KEYRIGHT:case KEYLEFT:return;default:me.startList=0;if(me.data=="static"){if(this.value!=me.inputText){me.inputText=this.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else{me.kk_autosuggest_hideDiv();}}
else{me.kk_autosuggest_hideDiv();}}
else{if(me.uniqueRequest){if(this.value.length==me.nbLetters&&this.value!=""){myValue=this.value;me.inputText=this.value;if(key==DEL)me.kk_autosuggest_hideDiv();me.kk_autosuggest_sendQuery(myValue);}
else{if(this.value!=me.inputText&&this.value.length>me.nbLetters){me.inputText=this.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else{me.kk_autosuggest_hideDiv();}}
else{me.kk_autosuggest_hideDiv();}}}
else{if(this.value.length>=me.nbLetters&&this.value!=""){myValue=this.value;me.inputText=this.value;if(key==DEL)me.kk_autosuggest_hideDiv();setTimeout("kk_autosuggest_waitSendQuery(myValue)",300);}
else{me.kk_autosuggest_hideDiv();}}}}
kk_autosuggest_waitSendQuery=function(key){if(me.inputText==key&&key!=me.myLastValue){me.kk_autosuggest_sendQuery(key);}
me.myLastValue=key;}};this.kk_autosuggest_useSuggestion=function(){me.onDisplay(true);if(this.highlighted>-1&&me.navigation!=true)
{if(separator==true)
this.toWrite.value=this.eligible[this.highlighted].substring(0,this.eligible[this.highlighted].indexOf(me.sep));else
this.toWrite.value=this.eligible[this.highlighted];this.kk_autosuggest_hideDiv();}
else if(this.highlighted==moreId){this.startList=this.startList+this.sizeList;me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else if(this.highlighted==lessId){this.startList=this.startList-this.sizeList;if(this.startList<=0){this.startList=0;lessId=0;}
me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else{itemId=this.startList+parseInt(this.highlighted)-(lessId+1);val=this.eligible[itemId];if(separator==true)me.inputText=val.substring(0,val.indexOf(me.sep));else me.inputText=val;this.toWrite.value=me.inputText;this.kk_autosuggest_hideDiv();}};this.kk_autosuggest_showDiv=function(){this.div.style.display='block';};this.kk_autosuggest_hideDiv=function(){this.div.style.display='none';this.highlighted=-1;this.startList=0;};this.kk_autosuggest_changeHighlight=function(){var lis=this.div.getElementsByTagName('LI');for(i=0;i<lis.length;i++){var li=lis[i];if(this.highlighted==i){li.className="selected";}
else{li.className="";}}};this.kk_autosuggest_positionDiv=function(){var el=this.elem;var x=0;var y=el.offsetHeight;while(el.offsetParent&&el.tagName.toUpperCase()!='BODY'){x+=el.offsetLeft;y+=el.offsetTop;el=el.offsetParent;}
x+=el.offsetLeft;y+=el.offsetTop;this.div.style.left=x+'px';this.div.style.top=y+'px';};this.kk_autosuggest_createDiv=function(){this.exactMatchIsPresent=false;var ul=document.createElement('ul');if(this.navigation!=true){for(i=0;i<this.eligible.length;i++){var word=this.eligible[i];var li=document.createElement('li');var a=document.createElement('a');a.href="javascript:false";a.innerHTML=word;li.appendChild(a);if(me.highlighted==i){li.className="selected";}
ul.appendChild(li);}
endList=this.suggestions.length;}
else{endList=this.startList+this.sizeList;if(endList>this.eligible.length)endList=this.eligible.length;if(this.startList>=this.sizeList){var li=document.createElement('li');var a=document.createElement('a');a.href="javascript:false";a.innerHTML=this.itemLess;li.appendChild(a);lessId=0;ul.appendChild(li);}
else lessId=-1;me.highlighted=-1;for(i=this.startList;i<endList;i++){var word=new String(this.eligible[i]);if(me.inputText.toLowerCase()==word.toLowerCase()){this.exactMatchIsPresent=true;}
var li=document.createElement('li');var a=document.createElement('a');a.href="javascript:false";if(me.boldSelection){wordFormatted=word.replace(cnvrt2Title(me.inputText),"<b>"+cnvrt2Title(me.inputText)+"</b>");if(wordFormatted.indexOf("<b>")==-1)
wordFormatted=wordFormatted.replace(me.inputText,"<b>"+me.inputText+"</b>");if(wordFormatted.indexOf("<b>")==-1)
wordFormatted=wordFormatted.replace(me.inputText.toUpperCase(),"<b>"+me.inputText.toUpperCase()+"</b>");wordFormatted=wordFormatted.replace("&<b>nbsp</b>;","&nbsp;").replace("&<b>nbs</b>p;","&nbsp;").replace("&<b>n</b>bsp;","&nbsp;").replace("&<b>nb</b>sp;","&nbsp;").replace("&<b>nbsp;</b>","&nbsp;");a.innerHTML=wordFormatted;}
else a.innerHTML=word;li.appendChild(a);ul.appendChild(li);}
if(this.eligible.length>endList){var li=document.createElement('li');var a=document.createElement('a');a.href="javascript:false";a.innerHTML=this.itemMore;li.appendChild(a);if(lessId==0)moreId=lessId+this.sizeList+1;else moreId=this.startList+this.sizeList;ul.appendChild(li);}
else moreId=-1;}
if(this.addIframe){var iframe=document.createElement('iframe');iframe.frameBorder=0;iframe.style.display='block';iframe.style.position='absolute';iframe.style.top=ul.offsetTop;iframe.style.left=0;iframe.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';iframe.id=this.div.id+"BackGround";iframe.style.zIndex="-10";ul.appendChild(iframe);}
this.div.replaceChild(ul,this.div.childNodes[0]);ul.onmouseover=function(ev){var target=me.kk_autosuggest_getEventSource(ev);while(target.parentNode&&target.nodeName.toUpperCase()!='LI'){target=target.parentNode;}
var lis=me.div.getElementsByTagName('LI');for(i=0;i<lis.length;i++){var li=lis[i];if(li==target){me.highlighted=i;break;}}
me.kk_autosuggest_changeHighlight();};ul.onclick=function(ev){me.kk_autosuggest_useSuggestion();me.kk_autosuggest_cancelEvent(ev);return false;};this.div.className=className;this.div.style.position='absolute';if(this.addIframe){if(this.div.offsetHeight>0)height=this.div.offsetHeight;else if(endList>0)height=endList*17+20;document.getElementById(this.div.id+"BackGround").style.height=height+"px";}
me.onDisplay(me.exactMatchIsPresent);function cnvrt2Title(str){return str.toLowerCase().replace(/\b[a-z]/g,cnvrt);function cnvrt(){return arguments[0].toUpperCase();}}};this.kk_autosuggest_getEligible=function(){this.eligible=new Array();if(me.navigation!=true)this.suggestions.length=this.sizeList;for(i in this.suggestions){var suggestion=this.suggestions[i];if((me.startWith&&suggestion.toLowerCase().indexOf(me.inputText.toLowerCase())==0)){this.eligible[this.eligible.length]=suggestion;}
else if(!me.startWith&&suggestion.toLowerCase().indexOf(me.inputText.toLowerCase())>=0){this.eligible[this.eligible.length]=suggestion;}}};this.kk_autosuggest_getKeyCode=function(ev){if(ev){return ev.keyCode;}if(window.event){return window.event.keyCode;}};this.kk_autosuggest_getEventSource=function(ev){if(ev){return ev.target;}if(window.event){return window.event.srcElement;}};this.kk_autosuggest_cancelEvent=function(ev){if(ev){ev.preventDefault();ev.stopPropagation();}if(window.event){window.event.returnValue=false;}}
this.kk_autosuggest_dysplay=function(){if(!this.toDisable&&(elem.value.length>=me.nbLetters||me.data=="static")&&(me.div.style.display=="none"||me.div.style.display=="")){me.inputText=elem.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}}}
this.kk_autosuggest_addSuggestion=function(el){this.suggestions[this.suggestions.length]=el;}}
var idCounter=0;

var ARR_MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];var ARR_WEEKDAYS=["Su","Mo","Tu","We","Th","Fr","Sa"];var ARR_MONTHS_DE=["Januar","Februar","M&#228;rz","April","M&#246;gen","Juni","Juli","August","September","Oktober","November","Dezember"];var ARR_WEEKDAYS_DE=["So","Mo","Di","Mi","Do","Fr","Sa"];var ARR_MONTHS_FR=["Janvier","F&#232;vrier","Mars","Avril","Peuvent","Juin","Juillet","Ao&#251;t","Septembre","Octobre","Novembre","D&#232;cembre"];var ARR_WEEKDAYS_FR=["Di","Lu","Ma","Me","Je","Ve","Sa"];var ARR_MONTHS_IT=["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"];var ARR_WEEKDAYS_IT=["Do","Lu","Ma","Me","Gi","Ve","Sa"];var ARR_MONTHS_ES=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];var ARR_WEEKDAYS_ES=["Do","Lu","Ma","Mi","Ju","Vi","Sa"];var STR_ICONPATH='';var FormDate=(function(){function constFunc(params){var mName=params["name"];var mDate=new Date();var autoAdjustYear=params["autoAdjustYear"];var mElementMonth=document.getElementById(params["elemMonthId"]);if(mElementMonth!=null)
mElementMonth.formDate=this;var mElementDay=document.getElementById(params["elemDayId"]);if(mElementDay!=null)
mElementDay.formDate=this;var mElementYear=document.getElementById(params["elemYearId"]);if(mElementYear!=null)
mElementYear.formDate=this;var mElementDate=document.getElementById(params["elemDateId"]);if(mElementDate!=null)
mElementDate.formDate=this;var showOneYear=params["showOneYear"];this.setDate=function(d){if(d instanceof Date){if(mDate.getDate()>27){mDate.setDate(27);}
mDate.setMonth(d.getMonth());mDate.setDate(d.getDate());mDate.setFullYear(d.getFullYear());}else{var arr=d.split('/');if(arr.length==3){if(formatDate!='mm/dd/yyyy'){this.setDate(new Date(arr[2],(arr[0]-1),arr[1]));}else{this.setDate((arr[0]-1),new Date(arr[2],arr[1]));}}}
this.updateFormElements();}
this.getDate=function(){return mDate;}
this.updateFormElements=function(){if(mElementMonth!=null)
mElementMonth.value=(mDate.getMonth()+1);if(mElementDay!=null)
mElementDay.value=mDate.getDate();if(mElementYear!=null)
mElementYear.value=mDate.getFullYear();if(mElementDate!=null){var formatDate=params["formatDate"];if(formatDate!='mm/dd/yyyy')
mElementDate.value=(mDate.getDate()<10?"0":"")+mDate.getDate()+"-"+(mDate.getMonth()+1<10?"0":"")+(mDate.getMonth()+1)+"-"+mDate.getFullYear();else
mElementDate.value=(mDate.getMonth()+1<10?"0":"")+(mDate.getMonth()+1)+"/"+(mDate.getDate()<10?"0":"")+mDate.getDate()+"/"+mDate.getFullYear();}}
this.elementChanged=function(ev){var target=GoAdvCalendar.getTargetElement(ev);if(mElementMonth!=undefined&&target.id==mElementMonth.id)
mDate.setMonth((mElementMonth.value-1));else if(mElementDay!=undefined&&target.id==mElementDay.id)
mDate.setDate(mElementDay.value);else if(mElementYear!=undefined&&target.id==mElementYear.id)
mDate.setFullYear(mElementYear.value);else if(mElementDate!=undefined&&target.id==mElementDate.id)
target.formDate.setDate(mElementDate.value);var visMin=new Date();visMin.setDate(visMin.getDate()-1);var visMax=new Date();visMax.setDate(visMin.getDate()+(showOneYear?365:0));var d=null;if(showOneYear){if(autoAdjustYear){if(target.formDate.getDate()<visMin){d=new Date(target.formDate.getDate());d.setFullYear(d.getFullYear()+1);target.formDate.setDate(d);}else if(target.formDate.getDate()>visMax){d=new Date(target.formDate.getDate());d.setFullYear(d.getFullYear()-1);target.formDate.setDate(d);}}else{if(target.formDate.getDate()<visMin)
target.formDate.setDate(visMin);else if(target.formDate.getDate()>visMax)
target.formDate.setDate(visMax);}}
target.formDate.updateFormElements();if(target.parentCalendar){GoAdvCalendar.fireDateChangeEvent(target.parentCalendar);}}
if(params["date"]!=null)
this.setDate(params["date"]);if(mElementMonth!=null)
GoAdvCalendar.addEvent(mElementMonth,"change",this.elementChanged);if(mElementDay!=null)
GoAdvCalendar.addEvent(mElementDay,"change",this.elementChanged);if(mElementYear!=null)
GoAdvCalendar.addEvent(mElementYear,"change",this.elementChanged);if(mElementDate!=null)
GoAdvCalendar.addEvent(mElementDate,"change",this.elementChanged);}
return constFunc;})();var GoAdvCalendar=(function(){var sCalendars=new Array();var sIndexedCalendars=new Array();var sCalendarCount=0;var sVisibleCalendar=null;var sDateChangeListeners=new Array();function Calendar(params){function setParamDefaults(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};var mDisabled=false;var mName=params["name"];setParamDefaults("showOneYear",true);setParamDefaults("restrictView",true);setParamDefaults("autoAdjustYear",true);setParamDefaults("startWeek",0);setParamDefaults("date",new Date());setParamDefaults("leftOffset",0);setParamDefaults("topOffset",18);setParamDefaults("localeCode","US");setParamDefaults("formatDate","mm-dd-yyyy");setParamDefaults("elemMonthId",mName+"_month");setParamDefaults("elemDayId",mName+"_day");setParamDefaults("elemYearId",mName+"_year");setParamDefaults("elemDateId",mName);setParamDefaults("elemButtonId",mName+"_button");setParamDefaults("elemButtonTextId",mName);setParamDefaults("clTable","#aaaaaa");setParamDefaults("clGrid","#eeeeee");setParamDefaults("clTitleCell","#aaaaaa");setParamDefaults("clTitleText","#333333");setParamDefaults("clHeaderCell","#cccccc");setParamDefaults("clHeaderText","#aaaaaa");setParamDefaults("clWeekdayCell","#eeeeee");setParamDefaults("clWeekdayText","#000000");setParamDefaults("clWeekendCell","#eee");setParamDefaults("clWeekendText","#000000");setParamDefaults("clSelectedCell","#FFcc33");setParamDefaults("clSelectedText","#000000");setParamDefaults("clRelText","#888888");setParamDefaults("clRelCell","#eee");setParamDefaults("zIndex",0);var mParams=params;this.onUpdateFunction=mParams['onUpdate'];this.dateStatusFunction=mParams['dateStatusFunc'];this.showOneYear=params["showOneYear"];this.restrictView=params["restrictView"];this.autoAdjustYear=params["autoAdjustYear"];this.currPage=0;this.zIndex=params["zIndex"];var mArr_Months=ARR_MONTHS;var mArr_Weekdays=ARR_WEEKDAYS;this.localeCode=params["localeCode"];if(this.localeCode=="DE"){mArr_Months=ARR_MONTHS_DE;mArr_Weekdays=ARR_WEEKDAYS_DE;}else if(this.localeCode=="FR"){mArr_Months=ARR_MONTHS_FR;mArr_Weekdays=ARR_WEEKDAYS_FR;}else if(this.localeCode=="IT"){mArr_Months=ARR_MONTHS_IT;mArr_Weekdays=ARR_WEEKDAYS_IT;}else if(this.localeCode=="ES"){mArr_Months=ARR_MONTHS_ES;mArr_Weekdays=ARR_WEEKDAYS_ES;}else{this.localeCode="US";}
var mStartWeekday=params["startWeek"];var mFormDate=new FormDate(params);var mElemButton=document.getElementById(params["elemButtonId"]);if(mElemButton!=null)
mElemButton.parentCalendar=this;var mElemButtonText=document.getElementById(params["elemButtonTextId"]);if(mElemButtonText!=null)
mElemButtonText.parentCalendar=this;var mElemMonth=document.getElementById(params["elemMonthId"]);if(mElemMonth!=null)
mElemMonth.parentCalendar=this;var mElemDay=document.getElementById(params["elemDayId"]);if(mElemDay!=null)
mElemDay.parentCalendar=this;var mElemYear=document.getElementById(params["elemYearId"]);if(mElemYear!=null)
mElemYear.parentCalendar=this;var mElemDate=document.getElementById(params["elemDateId"]);if(mElemDate!=null)
mElemDate.parentCalendar=this;var mCalPanel=null;this.isDisabled=function(){return mDisabled;}
this.setDisabled=function(d){mDisabled=d;if(!mDisabled){GoAdvCalendar.fireDateChangeEvent(this);}}
this.clickHandler=function(ev){var target=GoAdvCalendar.getTargetElement(ev);var elem=GoAdvCalendar.getElement(ev);if((target.id==mElemButton.id||target.id==mElemButtonText.id)&&target.parentCalendar&&!target.parentCalendar.isDisabled()){Calendar.setVisible(target.parentCalendar);return GoAdvCalendar.stopEvent(ev);}
return false;};this.getName=function(){return mName;};this.getCalPanel=function(){return mCalPanel;};this.setNewDate=function(longDate){mFormDate.setDate(new Date(longDate));}
this.show=function(){var pos=GoAdvCalendar.getElementPosition(mElemButton);this.drawCalendarTable();mCalPanel.style.top=(pos.y+mParams["topOffset"])+"px";mCalPanel.style.left=(pos.x+mParams["leftOffset"])+"px";mCalPanel.style.display="block";mCalPanel.style.zIndex=mParams["zIndex"];if(GoAdvCalendar.is_ie)
this.hideShowCovered();}
this.hide=function(){var prevElem=document.getElementById('prevMonth');var nextElem=document.getElementById('nextMonth');if(prevElem!=undefined&&prevElem!=null)
GoAdvCalendar.removeEvent(prevElem,"click",GoAdvCalendar.monthNavHandler);if(nextElem!=undefined&&nextElem!=null)
GoAdvCalendar.removeEvent(nextElem,"click",GoAdvCalendar.monthNavHandler);this.currPage=0;mCalPanel.innerHTML='';mCalPanel.style.zIndex=0;mCalPanel.style.display="none";if(GoAdvCalendar.is_ie)
this.hideShowCovered();}
this.drawCalendarTable=function(){if(mCalPanel==null){mCalPanel=GoAdvCalendar.createElement("div");mCalPanel.style.position="absolute";mCalPanel.style.display="none";mCalPanel.style.cursor="default";mCalPanel.style.backgroundColor="#FFFFFF";document.body.appendChild(mCalPanel);}
var visMin=new Date();visMin.setDate(visMin.getDate()-1);var visMax=new Date();visMax.setDate(visMin.getDate()+(this.showOneYear?365:0));var selDate=mFormDate.getDate();var dummySelDate=new Date(selDate);var today=new Date();today.setHours(0,0,0);dummySelDate.setDate(1);dummySelDate.setMonth(dummySelDate.getMonth()+this.currPage);var d=new Date(dummySelDate);d.setDate(1);d.setDate(1-(7+d.getDay()-mStartWeekday)%7);var ct="";ct+="<table border=0 cellpadding=0 cellspacing=0><tr><td valign=top>";ct+="<table cellpadding=0 cellspacing=0 bgcolor="+mParams["clTable"]+" border=0 style='padding:0px 0px 1px 1px'>";ct+="<tr><td class=cal_i style='cursor:pointer' id='prevMonth' align=left>&nbsp;&lt;&nbsp;</td>";ct+="<td class=cal_m align=center>"
ct+=mArr_Months[dummySelDate.getMonth()]+"&nbsp;"+dummySelDate.getFullYear()+"</td>";ct+="<td></td></tr>";ct+="<tr><td colspan=3><table cellpadding=2 cellspacing=0 bgcolor="+mParams["clGrid"]+" border=0><tr>";for(var n=0;n<7;n++)
ct+='<td class=cal_wm width=20 align=center>&nbsp;'+mArr_Weekdays[(mStartWeekday+n)%7]+'&nbsp;</td>';ct+="</tr>";for(gx=0;gx<6;gx++){ct+="<tr>";for(var wkday=0;wkday<7;wkday++){var day=d.getDate();var textColor=mParams["clWeekdayText"];var cellColor=mParams["clWeekdayCell"];var isWeekend=(d.getDay()==0||d.getDay()==6);var isSelected=(day==selDate.getDate()&&d.getMonth()==selDate.getMonth()&&d.getFullYear()==selDate.getFullYear());var isCurrMonth=(d.getMonth()==dummySelDate.getMonth());var isPrevMonth=(d.getMonth()<dummySelDate.getMonth())&&(d.getYear()<dummySelDate.getYear());var cssStyle='cal_o';if(!isCurrMonth){textColor=mParams["clRelText"];if(isWeekend){}}
if(isSelected&&isCurrMonth){textColor=mParams["clSelectedText"];cellColor=mParams["clSelectedCell"];}
if(!isCurrMonth){ct+="<td ";ct+="class='cal_o'";ct+=" width=20 align=center bgcolor="+cellColor+" style='cursor:default;'>&nbsp;</td>";}
else{if(d<today){ct+="<td ";if(!this.dateStatusFunction(d)){if(isWeekend){ct+="class='cal_w'";}
else{ct+="class='cal_o'";}}
else{ct+="class='cal_o'";}
ct+=" width=20 align=center style='cursor:default;'>";ct+="-";ct+="</td>";}
else{ct+="<td nowrap ";if(!this.dateStatusFunction(d)){if(isWeekend){ct+="class='cal_w'";}
else{if(d<selDate){ct+="class='cal_p'";}
else{ct+="class='cal_t'";}}}
else{ct+="class='cal_o'";}
ct+="width=20 align=center ";ct+="onClick='GoAdvCalendar.dateSelectHandler("+d.valueOf()+")' ";ct+="bgcolor=";ct+=cellColor+" style='cursor:pointer;'>";ct+="&nbsp;"+day+"&nbsp;";ct+="</td>";}}
d.setDate(day+1)}
ct+="</tr>";}
ct+="</table></td></tr></table>";x=d.getMonth();y=d.getFullYear();if(x==12){x=0;y+=1;}
else if(x==-1){x=11;y-=1;}
var dummySelDate=new Date(selDate);dummySelDate.setDate(1);dummySelDate.setMonth(x);dummySelDate.setYear(y);var d=new Date(dummySelDate);d.setDate(1);d.setDate(1-(7+d.getDay()-mStartWeekday)%7);ct+="</td><td valign=top>";ct+="<table border=0 cellpadding=0 cellspacing=0><tr><td>";ct+="<table cellpadding=0 cellspacing=0 bgcolor="+mParams["clTable"]+" border=0  style='padding:0px 1px 1px 1px; '>";ct+="<tr><td class=cal_i style='cursor:pointer' align=left></td>";ct+="<td class=cal_m align=center>"
ct+=mArr_Months[x]+"&nbsp;"+y+"</td>";ct+="<td class=cal_i style='cursor:pointer' align=right id='nextMonth'>&nbsp;&gt;&nbsp;</td></tr>";ct+="<tr><td colspan=3><table cellpadding=2 cellspacing=0 bgcolor="+mParams["clGrid"]+" border=0><tr>";for(var n=0;n<7;n++)
ct+='<td bgcolor='+mParams["clHeaderCell"]+' class=cal_wm width=20 align=center>&nbsp;'+mArr_Weekdays[(mStartWeekday+n)%7]+'&nbsp;</td>';ct+="</tr>";for(gx=0;gx<6;gx++){ct+="<tr>";for(var wkday=0;wkday<7;wkday++){var day=d.getDate();var textColor=mParams["clWeekdayText"];var cellColor=mParams["clWeekdayCell"];var isWeekend=(d.getDay()==0||d.getDay()==6);var isSelected=(day==selDate.getDate()&&d.getMonth()==selDate.getMonth()&&d.getFullYear()==selDate.getFullYear());var isCurrMonth=(d.getMonth()==x);if(!isCurrMonth){textColor=mParams["clRelText"];}
if(isSelected){textColor=mParams["clSelectedText"];cellColor=mParams["clSelectedCell"];}
if(!isCurrMonth){ct+="<td class=cal_t width=20 align=center style='cursor:default;'>&nbsp;</td>";}
else{if(d<today){ct+="<td class=cal_o width=20 align=center bgcolor="+cellColor+" style='cursor:default;'>";ct+="-";ct+="</td>";}
else if(d<selDate){ct+="<td nowrap ";if(!this.dateStatusFunction(d)){if(isWeekend){ct+="class='cal_w'";}
else{ct+="class='cal_p'";}}
else{ct+="class='cal_o'";}
ct+=" width=20 align=center ";ct+="onClick='GoAdvCalendar.dateSelectHandler("+d.valueOf()+")' ";ct+="bgcolor=";ct+=cellColor+" style='cursor:pointer;'>";ct+="&nbsp;"+day+"&nbsp;";ct+="</td>";}
else if(d<dummySelDate){ct+="<td nowrap ";if(!this.dateStatusFunction(d)){if(isWeekend){ct+="class='cal_w'";}
else{ct+="class='cal_p'";}}
else{ct+="class='cal_o'";}
ct+=" width=20 align=center ";ct+="onClick='GoAdvCalendar.dateSelectHandler("+d.valueOf()+")' ";ct+="bgcolor=";ct+=cellColor+" style='cursor:pointer;'>";ct+="&nbsp;";ct+="</td>";}
else{ct+="<td nowrap ";if(!this.dateStatusFunction(d)){if(isWeekend){ct+="class='cal_w'";}
else{ct+="class='cal_t'";}}
else{ct+="class='cal_o'";}
ct+=" width=20 align=center ";ct+="onClick='GoAdvCalendar.dateSelectHandler("+d.valueOf()+")' ";ct+="bgcolor=";ct+=cellColor+" style='cursor:pointer;'>";ct+="&nbsp;"+day+"&nbsp;";ct+="</td>";}}
d.setDate(day+1)}
ct+="</tr>";}
ct+="</table></td></tr></table>"
ct+="</td></tr></table>";mCalPanel.innerHTML=ct;var prevElem=document.getElementById('prevMonth');var nextElem=document.getElementById('nextMonth');GoAdvCalendar.removeEvent(prevElem,"click",GoAdvCalendar.monthNavHandler);GoAdvCalendar.removeEvent(nextElem,"click",GoAdvCalendar.monthNavHandler);GoAdvCalendar.addEvent(prevElem,"click",GoAdvCalendar.monthNavHandler);GoAdvCalendar.addEvent(nextElem,"click",GoAdvCalendar.monthNavHandler);}
this.getDate=function(){return mFormDate.getDate();};var jsS=this.clickHandler;if(mElemButton!=null){GoAdvCalendar.addEvent(mElemButton,"click",jsS);}
if(mElemButtonText!=null){GoAdvCalendar.addEvent(mElemButtonText,"click",jsS);}
this.killMe=function(){var mElementMonth=document.getElementById(params["elemMonthId"]);var mElementDay=document.getElementById(params["elemDayId"]);var mElementYear=document.getElementById(params["elemYearId"]);var mElementDate=document.getElementById(params["elemDateId"]);var mElemButton=document.getElementById(params["elemButtonId"]);var mElemButtonText=document.getElementById(params["elemButtonTextId"]);if(mElementMonth!=null){GoAdvCalendar.removeEvent(mElementMonth,"change",mFormDate.elementChanged);mElementMonth.formDate=null;}
if(mElementDay!=null){GoAdvCalendar.removeEvent(mElementDay,"change",mFormDate.elementChanged);mElementDay.formDate=null;}
if(mElementYear!=null){GoAdvCalendar.removeEvent(mElementYear,"change",mFormDate.elementChanged);mElementYear.formDate=null;}
if(mElementDate!=null){GoAdvCalendar.removeEvent(mElementDate,"change",mFormDate.elementChanged);mElementDate.formDate=null;}
if(mElemButton!=null){GoAdvCalendar.removeEvent(mElemButton,"click",jsS);mElemButton.parentCalendar=null;}
if(mElemButtonText!=null){GoAdvCalendar.removeEvent(mElemButtonText,"click",jsS);mElemButtonText.parentCalendar=null;}}
var win=document.defaultView||document.parentWindow;if(win&&typeof win.attachEvent!="undefined"){win.attachEvent("onunload",this.killMe);}
if(window){window.onunload=this.killMe;}
win=null;};Calendar.getCalendarItem=function(i){return sIndexedCalendars!=null&&i<sCalendarCount?sIndexedCalendars[i]:null;}
Calendar.getInstance=function(params){var cal=sCalendars[params["name"]];if(sCalendarCount==0){Calendar.addEvent(document,"click",GoAdvCalendar.documentClickHandler);}
if(cal==undefined){cal=new Calendar(params);sCalendars[params["name"]]=cal;sIndexedCalendars[sCalendarCount++]=cal;}
return cal;}
Calendar.removeInstance=function(params){var cal=sCalendars[params["name"]];if(cal!=undefined){var lsCalendarCount=sCalendarCount;for(var i=0;i<lsCalendarCount;i++){if(cal==sIndexedCalendars[i]){sCalendars[params["name"]]=null;sCalendarCount--;for(;i<lsCalendarCount-1;i++){sIndexedCalendars[i]=sIndexedCalendars[i+1];}}}
return true;}
return false;}
Calendar.addDateChangeListener=function(listener){if(listener){sDateChangeListeners[sDateChangeListeners.length]=listener;}}
Calendar.fireDateChangeEvent=function(cal){for(var i=0;i<sDateChangeListeners.length;i++){var listener=sDateChangeListeners[i];if(listener&&listener.dispatchDateChange){listener.dispatchDateChange(cal);}}}
Calendar.getVisible=function(){return sVisibleCalendar;}
Calendar.setVisible=function(cal){if(sVisibleCalendar==null){if(cal!=null)
cal.show();sVisibleCalendar=cal;}else{var visCal=sVisibleCalendar;sVisibleCalendar.hide();sVisibleCalendar=null;if((cal!=null)&&(cal.getName()!=visCal.getName())){cal.show();sVisibleCalendar=cal;}}}
return Calendar;})();GoAdvCalendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));GoAdvCalendar.is_ie5=(GoAdvCalendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));GoAdvCalendar.is_opera=/opera/i.test(navigator.userAgent);GoAdvCalendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);GoAdvCalendar.dateSelectHandler=function(longDate){if(GoAdvCalendar.getVisible()==null)
return true;GoAdvCalendar.getVisible().setNewDate(longDate);GoAdvCalendar.getVisible().onUpdateFunction(longDate);GoAdvCalendar.fireDateChangeEvent(GoAdvCalendar.getVisible());return true;};GoAdvCalendar.monthNavHandler=function(ev){var target=GoAdvCalendar.getTargetElement(ev);var cal=GoAdvCalendar.getVisible();if(cal==null)
return true;if(target.id=='prevMonth')
cal.currPage--;else
cal.currPage++;cal.drawCalendarTable();return GoAdvCalendar.stopEvent(ev);};GoAdvCalendar.documentClickHandler=function(ev){var target=GoAdvCalendar.getTargetElement(ev);if(GoAdvCalendar.getVisible()!=null)
GoAdvCalendar.setVisible();return true;};GoAdvCalendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,false);}else{el["on"+evname]=func;}};GoAdvCalendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};GoAdvCalendar.stopEvent=function(ev){ev||(ev=window.event);if(GoAdvCalendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}
return false;};GoAdvCalendar.getElement=function(ev){if(GoAdvCalendar.is_ie){return window.event.srcElement;}else{return ev.currentTarget;}};GoAdvCalendar.getTargetElement=function(ev){if(GoAdvCalendar.is_ie){return window.event.srcElement;}else{return ev.target;}};GoAdvCalendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}
if(typeof parent!="undefined"){parent.appendChild(el);}
return el;};GoAdvCalendar.getElementPosition=function(obj){var curleft=0;var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft
curtop+=obj.offsetTop
obj=obj.offsetParent;}
if(obj){if(obj.offsetLeft)
curleft+=obj.offsetLeft;if(obj.offsetTop)
curtop+=obj.offsetTop;}}else if(obj.x){curleft+=obj.x;curtop+=obj.y;}
return{x:curleft,y:curtop};}
GoAdvCalendar.prototype.hideShowCovered=function(){var self=this;GoAdvCalendar.continuation_for_khtml_browser=function(){function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!GoAdvCalendar.is_khtml)
value=document.defaultView.getComputedStyle(obj,"").getPropertyValue("visibility");else
value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else
value='';}
return value;};var tags=new Array("applet","iframe","select");var el=self.getCalPanel();var p=GoAdvCalendar.getElementPosition(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=GoAdvCalendar.getElementPosition(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(self.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}
cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}
cc.style.visibility="hidden";}}}};if(GoAdvCalendar.is_khtml)
setTimeout("GoAdvCalendar.continuation_for_khtml_browser()",10);else
GoAdvCalendar.continuation_for_khtml_browser();};var CalendarPairChangeListener=(function(){function Listener(cal1,cal2,gap){var fromCal=cal1;var toCal=cal2;var diff=gap;this.dispatchDateChange=function(cal){if(cal==null||fromCal==null||toCal==null)
return;if(cal!=fromCal&&cal!=toCal)
return;var c1_date=fromCal.getDate();var c2_date=toCal.getDate();if(c1_date.valueOf()>=c2_date.valueOf()){c2_date=new Date(c1_date);c2_date.setDate(c2_date.getDate()+diff);toCal.setNewDate(c2_date);}}};return Listener;})();

function TimeBox(inputID,formatTime,containerID,minutesStep){var me=this;this.inputID=inputID;this.formatTime=formatTime;this.containerID=containerID;this.alpha=0;this.endalpha=100;this.speed=10;this.timer=20;this.minutesStep=typeof minutesStep!='undefined'?minutesStep:15;var TimeBoxVisible={};this.TimeBox=function(){me.buildTimeBox();};this.buildTimeBox=function(){var now=new Date();var destElement=document.getElementById(me.inputID);var match=destElement.value.match(/(\d\d):(\d\d)/);if(count(match)>2){now.setHours(match[1]);now.setMinutes(match[2]);}
else{var minutesStepRounded=Math.ceil(now.getMinutes()/this.minutesStep)*this.minutesStep;now.setMinutes(minutesStepRounded%60);now.setHours(now.getHours()+minutesStepRounded/60);destElement.value=now.format(me.formatTime.replace(/m/g,'i'));}
var divContainer=document.getElementById(this.containerID);divContainer.className='TimeBoxContainer';divContainer.style.top='-9999px';divContainer.style.left='-9999px';divContainer.style.filter='alpha(opacity= 0)';divContainer.style.opacity=0;var hourInput=document.createElement('select');hourInput.className='TimeBoxInput';hourInput.setAttribute('id',me.inputID+'hourInput');hourInput.setAttribute('size',1);var hourSelected=now.getHours();var i;for(i=0;i<24;i++){var option=document.createElement('option');if(i==hourSelected){option.selected='selected';}
if(i<10){option.value='0'+i;option.innerHTML='0'+i;}
else{option.value=i;option.innerHTML=i;}
hourInput.appendChild(option);}
divContainer.appendChild(hourInput);var minuteInput=document.createElement('select');minuteInput.className='TimeBoxInput';minuteInput.setAttribute('id',me.inputID+'minuteInput');minuteInput.setAttribute('size',1);var minuteSelected=now.getMinutes();for(i=0;i<60;i+=this.minutesStep){var option=document.createElement('option');if(i==minuteSelected){option.selected='selected';}
if(i<10){option.value='0'+i;option.innerHTML='0'+i;}
else{option.value=i;option.innerHTML=i;}
minuteInput.appendChild(option);}
divContainer.appendChild(minuteInput);var sendButton=document.createElement('button');sendButton.className='TimeBoxButton';sendButton.setAttribute('id',me.inputID+'sendButton');sendButton.innerHTML='Ok';sendButton.onclick=function(){var value=me.formatTime.replace('H',hourInput.value);var value=value.replace('m',minuteInput.value);destElement.value=value;me.hideTimeBox();return false;};divContainer.appendChild(sendButton);divContainer.fade=function(d){var a=me.alpha;if((a!=me.endalpha&&d==1)||(a!=0&&d==-1)){var i=me.speed;if(me.endalpha-a<me.speed&&d==1){i=me.endalpha-a;}
else if(a<me.speed&&d==-1){i=a;}
me.alpha=a+(i*d);this.style.opacity=me.alpha*.01;this.style.filter='alpha(opacity= '+me.alpha+')';}
else{if(d==-1){this.style.display='none'}}}
var iconButton=document.getElementById(me.inputID+'iconButton');iconButton.setAttribute('onclick','');iconButton.onclick=function(){me.showTimeBox(this);};}
this.showTimeBox=function(elem){TimeBoxHiddenOther();var elPos=this.findPos(elem);var divContainer=document.getElementById(this.containerID);divContainer.style.display='block';divContainer.style.top=(elPos[1]+25)+'px';divContainer.style.left=(elPos[0]-62)+'px';clearInterval(divContainer.timer);TimeBoxVisible[me.containerID]=me;elem.onclick=function(){me.hideTimeBox();return false;};document.onclick=function(e){if(me.clickedOutsideElement(e)){me.hideTimeBox();return false;}};divContainer.timer=setInterval(function(){divContainer.fade(1);},me.timer);}
this.hideTimeBox=function(){var divContainer=document.getElementById(this.containerID);clearInterval(divContainer.timer);divContainer.timer=setInterval(function(){divContainer.fade(-1);},me.timer);divContainer.style.top='-9999px';divContainer.style.left='-9999px';delete(TimeBoxVisible[me.containerID]);var imgButton=document.getElementById(me.inputID+'iconButton');imgButton.onclick=function(){me.showTimeBox(this);return false;};}
this.findPos=function(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}}
return[curleft,curtop];}
function TimeBoxHiddenOther(){var els=document.getElementsByName('TimeBoxContainer');var i=0;for(i=0;i<els.length;i++){var id=els[i].id.replace('_container','');eval(id+'.hideTimeBox();');}};this.clickedOutsideElement=function(e){if(!e)e=window.event;var theElem=me.getEventTarget(e);while(theElem!=null){if(theElem.id==me.containerID||theElem.id==me.inputID||theElem.id==me.inputID+'iconButton'){return false;}
theElem=theElem.offsetParent;}
return true;}
this.getEventTarget=function(evt){if(isIE){return evt.srcElement;}else{return evt.target;}};this.TimeBox();}

function Selectlist(inputID,callName,defaultValue,emptyFieldLabel,brandGroup,idCountry){var me=this;this.elementList=[];this.response=false;this.elementSelected=null;this.elementSelectedId=null;this.inputID=inputID;this.callName=callName;this.defaultValue=defaultValue;this.emptyFieldLabel=emptyFieldLabel;this.brandGroup=brandGroup;this.idCountry=idCountry;this.other={};this.first=true;this.Selectlist=function(){me.buildSelectlist();};this.buildSelectlist=function(){var selectEl=document.getElementById(me.inputID);me.emptyList();selectEl.onchange=function(){me.elementSelected=selectEl.options[selectEl.selectedIndex].value;me.elementSelectedId=(selectEl.options[selectEl.selectedIndex].id!=undefined)?selectEl.options[selectEl.selectedIndex].id:null;me.onChangeActions();};selectEl.onblur=function(){me.onBlurActions();};selectEl.onfocus=function(){me.onFocusActions();};};this.emptyList=function(){var selectEl=document.getElementById(me.inputID);selectEl.innerHTML='';if(me.emptyFieldLabel){var opt=document.createElement('option');opt.value='';opt.innerHTML=_(me.emptyFieldLabel);selectEl.appendChild(opt);}};this.setElementList=function(arr){me.elementList=arr;}
this.executeCall=function(elem){if(me.response==false){var callBack=me.inputID+'.generateList';me.other.callback=callBack;me.other.market=globalMarket;me.other.idCountry=me.idCountry;me.other.brandGroup=me.brandGroup;if(typeof me.other.defaultValue=='undefined'){me.other.defaultValue=me.defaultValue;}
gjcall(callName,me.other);}};this.generateList=function(arr,defaultValue){if(typeof defaultValue!='undefined'){me.defaultValue=defaultValue;}
me.elementList=arr;me.response=true;var haveSelected=me.buildResult();if(haveSelected){var selectEl=document.getElementById(me.inputID);selectEl.onchange();selectEl.disabled=false;}
this.onGenerateList();}
this.buildResult=function(){var i;var opt;var haveSelected=false;var selectEl=document.getElementById(me.inputID);me.emptyList();for(i=0;i<me.elementList.length;i++){opt=document.createElement('option');opt.value=me.elementList[i];opt.innerHTML=me.elementList[i];if(me.defaultValue==me.elementList[i]){me.selectedElement=me.elementList[i];opt.selected=true;haveSelected=true;}
selectEl.appendChild(opt);}
return haveSelected;};this.onChangeActions=function(){return true;}
this.onBlurActions=function(){return true;}
this.onFocusActions=function(){return true;}
this.onGenerateList=function(){return true;}
this.Selectlist();}

function SuggestBox(inputID,maxcount){var me=this;this.suggestions=[]
this.inputID=inputID;this.maxcount=maxcount;this.currentValue='';this.Builded=false;this.onEventHandler=null;this.onTextChange=function(newValue,oldValue){};this.onSuggestionOpen=function(matchsNumber,isPresentExactMatch){};this.onSuggestionSelect=function(suggestionValue,suggestionIndex,suggestionsNumber){};this.onSuggestionMove=function(suggestionValue,suggestionIndex,suggestionsNumber){};this.SuggestBox=function()
{me.newdiv=document.createElement("DIV")
me.SIs=null;me.SItxt=null;me.suggestions.sort();me.scripting=false;if(!isIE){el=document.getElementById(me.inputID);el.onclick=function(){me.suggestInput_init();};}
document.onreadystatechange=function()
{if(document.readyState=="complete"){me.suggestInput_init();}}
hideSelect=function(){me.newdiv.style.display="none"}
if(document.attachEvent)
document.attachEvent("onclick",hideSelect)
if(document.captureEvents){document.captureEvents(Event.CLICK);document.onclick=hideSelect;}}
this.suggestInput_init=function(){if(!me.Builded){this.buildSuggest();me.Builded=true;}}
this.setSuggestions=function(suggestions){this.suggestions=suggestions;}
this.buildSuggest=function(){if(document.createElement("DIV")){me.scripting=true;me.SIs=document.createElement("SELECT")
me.SIs.onkeyup=function(e){if(!e)
e=event;me.setSuggest(me.selectedIndex,e)}
me.SIs.className="select_input"
me.SIs.setAttribute("id","selectInput_"+me.inputID);me.SIs.style.position="absolute"
me.SIs.style.top="-9999px"
me.SIs.style.left="-9999px"
me.SIs.style.visibility="hidden"
for(i=0;i<this.suggestions.length;i++){var o=document.createElement("OPTION");o.innerHTML=this.suggestions[i];me.SIs.appendChild(o)
me.SIs.style.visibility="visible";}
document.body.appendChild(me.SIs)
me.SItxt=document.getElementById(me.inputID);me.SItxt.setAttribute("autocomplete","OFF")
me.SItxt.onkeyup=function(e){if(!e)
e=event;me.showSelection(this.value,e)}
this.currentValue=me.SItxt.value;var elt=me.SItxt
var pos2=this.findPos(elt);pos2.push(elt.offsetHeight);pos2.push(elt.offsetWidth);me.newdiv.style.top=(pos2[1]+pos2[2])+'px';me.newdiv.style.left=pos2[0]+'px';me.newdiv.style.width=pos2[3]+'px';me.newdiv.className="suggestBoxContainer";me.newdiv.setAttribute("id","newdiv_"+me.inputID);me.newdiv.style.display="none"
this.buildDiv(0)
document.body.appendChild(me.newdiv)}}
this.buildDiv=function(n){var exactMatch=false;if(n>me.SIs.childNodes.length)
return false;for(i=0;i<me.newdiv.childNodes.length;i++){me.newdiv.removeChild(me.newdiv.childNodes[i]);i--}
if(n>0){d1=document.createElement("DIV");d1.setAttribute("id","d1_"+me.inputID);d1.id="lessDiv"
d1.style.width="100%"
d1.onmouseover=function(){this.className="mouse_over";}
d1.onmouseout=function(){this.className="suggestBox"}
d1.onclick=function(){me.buildDiv(n-1);d1.className="mouse_over"}
d1.innerHTML="......";me.newdiv.appendChild(d1);}
m=(this.maxcount<me.SIs.childNodes.length)?(this.maxcount):(me.SIs.childNodes.length)
for(i=0;i<m;i++){d=document.createElement("DIV")
d.setAttribute("id","d_"+me.inputID);d.style.width="100%"
d.onmouseover=function(){this.className="mouse_over";me.SItxt.value=this.value}
d.onmouseout=function(){this.className='suggestBox'}
d.onclick=function(){me.SItxt.value=this.value;me.newdiv.style.display="none"}
try{d.value=me.SIs.childNodes[i+n].innerHTML;d.innerHTML=me.SIs.childNodes[i+n].innerHTML.replace(new RegExp('^('+me.SItxt.value+')',"gi"),'<strong>$1</strong>');if(me.SItxt.value.toLowerCase()==me.SIs.childNodes[i+n].innerHTML.toLowerCase()){exactMatch=true;}}
catch(err){}
me.newdiv.appendChild(d)};this.globalN=n;if(me.SIs.childNodes.length-n>this.maxcount){d2=document.createElement("DIV");d2.id="moreDiv"+me.inputID;d2.style.width="100%";d2.onmouseover=function(){this.className="mouse_over";}
d2.onmouseout=function(){this.className="suggestBox";}
d2.onclick=function(){me.buildDiv(n+1);d2.className="mouse_over";}
d2.innerHTML="......";d2.className="suggestBox";me.newdiv.appendChild(d2)}
this.onSuggestionOpen(m,exactMatch);}
this.setSuggest=function(m,ev){if(!me.scripting)return;isLess=(document.getElementById("lessDiv"))?(1):(0)
if(m>this.globalN+this.maxcount+isLess+1){m=this.globalN+this.maxcount;this.SIs.selectedIndex=m}
if(m<isLess){m=this.globalN-1;this.SIs.selectedIndex=this.globalN-1}
a=this.SIs.childNodes[m].innerHTML
this.SItxt.value=a;try{if(me.newdiv.childNodes[m-this.globalN+isLess]){if(me.newdiv.childNodes[m-this.globalN+isLess].id=="moreDiv"){this.buildDiv(this.globalN+1);me.newdiv.childNodes[this.maxcount].className="mouse_over";return}}}catch(err){}
try{if(me.newdiv.childNodes[m-this.globalN+isLess]){if(me.newdiv.childNodes[m-this.globalN+isLess].id=="lessDiv"){this.buildDiv(this.globalN-1);isLess_new=(document.getElementById("lessDiv"))?(1):(0)
me.newdiv.childNodes[isLess_new].className="mouse_over";return}}}catch(err){}
try{for(i=0;i<me.newdiv.childNodes.length;i++)
me.newdiv.childNodes[i].className="suggestBox";me.newdiv.childNodes[m-this.globalN+isLess].className="mouse_over";}catch(err){};if((ev.keyCode!=40)&&(ev.keyCode!=38)&&(ev.keyCode!=0)){me.newdiv.style.display="none"
me.SItxt.focus();this.onSuggestionSelect(a,m,me.SIs.childNodes.length);if(a!=this.currentValue){this.onTextChange(a,this.currentValue);this.currentValue=a;}}else{this.onSuggestionMove(a,m,me.SIs.childNodes.length);}}
this.showSelection=function(t,ev){if(t!=this.currentValue){this.onTextChange(t,this.currentValue);this.currentValue=t;}
if(!this.scripting)return;if(ev.keyCode==40){if(this.SIs.childNodes.length>0){me.newdiv.childNodes[0].className="mouse_over";me.SItxt.value=me.SIs.childNodes[0].innerHTML;try{me.SIs.focus();}catch(err){}
me.SIs.childNodes[0].selected=true;}
return}
if(t=="")
return;t=t.toLowerCase();l=t.length;for(i=0;i<me.SIs.childNodes.length;i++){me.SIs.removeChild(me.SIs.childNodes[i]);i--}
for(i=0;i<me.suggestions.length;i++){if(me.suggestions[i].substr(0,l).toLowerCase()==t){oOption=document.createElement("OPTION");me.SIs.appendChild(oOption)
oOption.innerHTML=me.suggestions[i];}}
if(me.SIs.childNodes.length>0){me.newdiv.style.display=""
this.buildDiv(0)}
else{me.newdiv.style.display="none";}
me.SItxt.focus()}
this.findPos=function(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft
curtop=obj.offsetTop
while(obj=obj.offsetParent){curleft+=obj.offsetLeft
curtop+=obj.offsetTop}}
return[curleft,curtop];}
this.SuggestBox();}

function goadv_autosuggest(elem,gajax_params,autosuggestDiv,nbItems,className,navigation,separator,onDisplay){var me=this;this.elem=elem;if(gajax_params[2]!=undefined)
this.toWrite=gajax_params[2];else this.toWrite=elem;this.suggestions=new Array();this.eligible=new Array();this.inputText=null;this.highlighted=-1;this.div=document.getElementById(autosuggestDiv);this.data="dynamic";this.navigation=navigation;this.toDisable=false;this.separator=separator;this.addIframe=false;this.myLastValue="";this.buffer="";this.startList=0;this.sizeList=nbItems;this.itemLess="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+_("COMMON_SUGGEST_PREV");this.itemMore="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+_("COMMON_SUGGEST_NEXT");this.timeToDisable=10000;this.startWith=false;this.boldSelection=true;this.nbLetters=3;this.sep="&nbsp;";this.uniqueRequest=true;this.timeNotReceived=0;this.gajaxParams=gajax_params;var lessId=-1;var moreId=-1;var TAB=9;var ESC=27;var KEYUP=38;var KEYDN=40;var KEYRIGHT=39;var KEYLEFT=37;var ENTER=13;var DEL=8;me.onDisplay=(typeof onDisplay=='function')?onDisplay:function(exactMatch){};this.exactMatchIsPresent=false;elem.setAttribute("autocomplete","off");if(!elem.id){var id="autosuggest"+idCounter;idCounter++;elem.id=id;}
this.kk_autosuggest_disableAutosuggest=function(){var ul=document.createElement('ul');this.div.replaceChild(ul,this.div.childNodes[0]);this.toDisable=true;this.suggestions=[];elem.setAttribute("autocomplete","on");};this.kk_autosuggest_isValidBrowser=function(){var ua=navigator.userAgent.toLowerCase();isGecko=(ua.indexOf('gecko')!=-1&&ua.indexOf('safari')==-1);isSafari=(ua.indexOf('safari')!=-1);isOpera=(ua.indexOf('opera')!=-1);isIE=(ua.indexOf('msie')!=-1&&!isOpera&&(ua.indexOf('webtv')==-1));isMozilla=(isGecko&&ua.indexOf('gecko/')+14==ua.length);isNS=((isGecko)?(ua.indexOf('netscape')!=-1):((ua.indexOf('mozilla')!=-1)&&!isOpera&&!isSafari&&(ua.indexOf('spoofer')==-1)&&(ua.indexOf('compatible')==-1)&&(ua.indexOf('webtv')==-1)&&(ua.indexOf('hotjava')==-1)));isIECompatible=((ua.indexOf('msie')!=-1)&&!isIE);isNSCompatible=((ua.indexOf('mozilla')!=-1)&&!isNS&&!isMozilla&&!isIECompatible&&!isIE);geckoVersion=((isGecko)?ua.substring((ua.lastIndexOf('gecko/')+6),(ua.lastIndexOf('gecko/')+14)):-1);equivalentMozilla=((isGecko)?parseFloat(ua.substring(ua.indexOf('rv:')+3)):-1);versionMinor=parseFloat(navigator.appVersion);if(isGecko&&!isMozilla){versionMinor=parseFloat(ua.substring(ua.indexOf('/',ua.indexOf('gecko/')+6)+1));}
else if(isMozilla){versionMinor=parseFloat(ua.substring(ua.indexOf('rv:')+3));}
else if(isIE&&versionMinor>=4){versionMinor=parseFloat(ua.substring(ua.indexOf('msie')+5));}
else if(isSafari){versionMinor=parseFloat(ua.substring(ua.lastIndexOf('safari/')+7));}
else if(isOpera){versionMinor=parseFloat(ua.substring(ua.indexOf('opera')+6));}
versionMajor=parseInt(versionMinor);isNS6up=(isNS&&versionMajor>=6);isIE55up=(isIE&&versionMinor>=5.5);this.addIframe=isIE55up;if(!isMozilla&&!isNSCompatible&&!isNS6up&&!isIE55up&&!isOpera)this.kk_autosuggest_disableAutosuggest();};this.kk_autosuggest_isValidBrowser();this.kk_autosuggest_showAutosuggest=function(){this.toDisable=false;elem.setAttribute("autocomplete","off");this.kk_autosuggest_isValidBrowser();setTimeout("document.getElementById('"+me.elem.id+"').focus()",0);if(elem.value.length>=me.nbLetters)this.kk_autosuggest_sendQuery(elem.value);};this.kk_autosuggest_updateStatus=function(id,str_hide,str_show){if(this.toDisable){this.kk_autosuggest_showAutosuggest();document.getElementById(id).innerHTML=str_hide;}
else{this.kk_autosuggest_disableAutosuggest();document.getElementById(id).innerHTML=str_show;}};this.kk_autosuggest_sendQuery=function(key){if(!this.toDisable){this.suggestions=new Array();this.gajaxParams[1][0]=key;gjcall(this.gajaxParams[0],this.gajaxParams[1]);}
reSendQuery=function(){alert("reSendQuery");}};this.kk_autosuggest_callBack=function(){if(arguments[0].readyState==4){if(arguments[0].status==200){if(arguments[0].responseText==""){me.kk_autosuggest_hideDiv();}
else{suggestions=eval(arguments[0].responseText);me.suggestions=suggestions;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else{me.kk_autosuggest_hideDiv();}}}
else{me.kk_autosuggest_hideDiv();}}
else{me.kk_autosuggest_hideDiv();}}
elem.onfocus=function(){if(!this.toDisable&&(elem.value.length>=me.nbLetters||me.data=="static")&&(me.div.style.display=="none"||me.div.style.display=="")){me.inputText=elem.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}}}
elem.onblur=function(){if(me.highlighted>-1&&(me.highlighted==moreId||me.highlighted==lessId)){setTimeout("document.getElementById('"+me.elem.id+"').focus()",0);}
else{setTimeout("hideDiv()",200);}
hideDiv=function(){me.div.style.display='none';me.highlighted=-1;me.startList=0;}}
elem.onkeydown=function(ev){var key=me.kk_autosuggest_getKeyCode(ev);switch(key){case TAB:if(me.highlighted>0){me.kk_autosuggest_useSuggestion();me.kk_autosuggest_hideDiv();}
else{me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
break;case ESC:me.kk_autosuggest_hideDiv();break;case KEYRIGHT:case KEYLEFT:if(me.highlighted==moreId&&me.highlighted!=-1){me.startList=me.startList+me.sizeList;me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else if(me.highlighted==lessId&&me.highlighted!=-1){me.startList=me.startList-me.sizeList;me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else if(me.highlighted==-1)me.kk_autosuggest_hideDiv();else me.kk_autosuggest_useSuggestion();break;case KEYUP:if(me.highlighted>0){me.highlighted--;}
me.kk_autosuggest_changeHighlight(key);break;case KEYDN:if(me.navigation==true){if(moreId!=-1)max=moreId;else max=me.eligible.length%me.sizeList;}
else max=me.eligible.length-1;if(me.highlighted<max){me.highlighted++;}
me.kk_autosuggest_changeHighlight(key);break;default:me.kk_autosuggest_positionDiv();break;}};elem.onkeypress=function(ev){var key=me.kk_autosuggest_getKeyCode(ev);switch(key){case ENTER:if(me.highlighted>-1){me.kk_autosuggest_useSuggestion();return false;}}}
elem.onkeyup=function(ev){var key=me.kk_autosuggest_getKeyCode(ev);switch(key)
{case TAB:case ESC:case ENTER:case KEYUP:case KEYDN:case KEYRIGHT:case KEYLEFT:return;default:me.startList=0;if(me.data=="static"){if(this.value!=me.inputText){me.inputText=this.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else{me.kk_autosuggest_hideDiv();}}
else{me.kk_autosuggest_hideDiv();}}
else{if(me.uniqueRequest){if(this.value.length==me.nbLetters&&this.value!=""){myValue=this.value;me.inputText=this.value;if(key==DEL)me.kk_autosuggest_hideDiv();me.kk_autosuggest_sendQuery(myValue);}
else{if(this.value!=me.inputText&&this.value.length>me.nbLetters){me.inputText=this.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else{me.kk_autosuggest_hideDiv();}}
else{me.kk_autosuggest_hideDiv();}}}
else{if(this.value.length>=me.nbLetters&&this.value!=""){myValue=this.value;me.inputText=this.value;if(key==DEL)me.kk_autosuggest_hideDiv();setTimeout("kk_autosuggest_waitSendQuery(myValue)",300);}
else{me.kk_autosuggest_hideDiv();}}}}
kk_autosuggest_waitSendQuery=function(key){if(me.inputText==key&&key!=me.myLastValue){me.kk_autosuggest_sendQuery(key);}
me.myLastValue=key;}};this.kk_autosuggest_useSuggestion=function(){me.onDisplay(true);if(this.highlighted>-1&&me.navigation!=true)
{if(separator==true)
this.toWrite.value=this.eligible[this.highlighted].substring(0,this.eligible[this.highlighted].indexOf(me.sep));else
this.toWrite.value=this.eligible[this.highlighted];this.kk_autosuggest_hideDiv();}
else if(this.highlighted==moreId){this.startList=this.startList+this.sizeList;me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else if(this.highlighted==lessId){this.startList=this.startList-this.sizeList;if(this.startList<=0){this.startList=0;lessId=0;}
me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}
else{itemId=this.startList+parseInt(this.highlighted)-(lessId+1);val=this.eligible[itemId];if(separator==true)me.inputText=val.substring(0,val.indexOf(me.sep));else me.inputText=val;this.toWrite.value=me.inputText;this.kk_autosuggest_hideDiv();this.kk_autosuggest_onSelect();}};this.kk_autosuggest_onSelect=function(){};this.kk_autosuggest_showDiv=function(){this.div.style.display='block';};this.kk_autosuggest_hideDiv=function(){this.div.style.display='none';this.highlighted=-1;this.startList=0;};this.kk_autosuggest_changeHighlight=function(){var lis=this.div.getElementsByTagName('LI');for(i=0;i<lis.length;i++){var li=lis[i];if(this.highlighted==i){li.className="selected";}
else{li.className="";}}};this.kk_autosuggest_positionDiv=function(){var el=this.elem;var x=0;var y=el.offsetHeight;while(el.offsetParent&&el.tagName.toUpperCase()!='BODY'){x+=el.offsetLeft;y+=el.offsetTop;el=el.offsetParent;}
x+=el.offsetLeft;y+=el.offsetTop;this.div.style.left=x+'px';this.div.style.top=y+'px';};this.kk_autosuggest_createDiv=function(){this.exactMatchIsPresent=false;var ul=document.createElement('ul');if(this.navigation!=true){for(i=0;i<this.eligible.length;i++){var word=this.eligible[i];var li=document.createElement('li');var a=document.createElement('a');a.href="javascript:false";a.innerHTML=word;li.appendChild(a);if(me.highlighted==i){li.className="selected";}
ul.appendChild(li);}
endList=this.suggestions.length;}
else{endList=this.startList+this.sizeList;if(endList>this.eligible.length)endList=this.eligible.length;if(this.startList>=this.sizeList){var li=document.createElement('li');var a=document.createElement('a');a.href="javascript:false";a.innerHTML=this.itemLess;li.appendChild(a);lessId=0;ul.appendChild(li);}
else lessId=-1;me.highlighted=-1;for(i=this.startList;i<endList;i++){var word=new String(this.eligible[i]);if(me.inputText.toLowerCase()==word.toLowerCase()){this.exactMatchIsPresent=true;}
var li=document.createElement('li');var a=document.createElement('a');a.href="javascript:false";if(me.boldSelection){wordFormatted=word.replace(cnvrt2Title(me.inputText),"<b>"+cnvrt2Title(me.inputText)+"</b>");if(wordFormatted.indexOf("<b>")==-1)
wordFormatted=wordFormatted.replace(me.inputText,"<b>"+me.inputText+"</b>");if(wordFormatted.indexOf("<b>")==-1)
wordFormatted=wordFormatted.replace(me.inputText.toUpperCase(),"<b>"+me.inputText.toUpperCase()+"</b>");wordFormatted=wordFormatted.replace("&<b>nbsp</b>;","&nbsp;").replace("&<b>nbs</b>p;","&nbsp;").replace("&<b>n</b>bsp;","&nbsp;").replace("&<b>nb</b>sp;","&nbsp;").replace("&<b>nbsp;</b>","&nbsp;");a.innerHTML=wordFormatted;}
else a.innerHTML=word;li.appendChild(a);ul.appendChild(li);}
if(this.eligible.length>endList){var li=document.createElement('li');var a=document.createElement('a');a.href="javascript:false";a.innerHTML=this.itemMore;li.appendChild(a);if(lessId==0)moreId=lessId+this.sizeList+1;else moreId=this.startList+this.sizeList;ul.appendChild(li);}
else moreId=-1;}
if(this.addIframe){var iframe=document.createElement('iframe');iframe.frameBorder=0;iframe.style.display='block';iframe.style.position='absolute';iframe.style.top=ul.offsetTop;iframe.style.left=0;iframe.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';iframe.id=this.div.id+"BackGround";iframe.style.zIndex="-10";ul.appendChild(iframe);}
this.div.replaceChild(ul,this.div.childNodes[0]);ul.onmouseover=function(ev){var target=me.kk_autosuggest_getEventSource(ev);while(target.parentNode&&target.nodeName.toUpperCase()!='LI'){target=target.parentNode;}
var lis=me.div.getElementsByTagName('LI');for(i=0;i<lis.length;i++){var li=lis[i];if(li==target){me.highlighted=i;break;}}
me.kk_autosuggest_changeHighlight();};ul.onclick=function(ev){me.kk_autosuggest_useSuggestion();me.kk_autosuggest_cancelEvent(ev);return false;};this.div.className=className;this.div.style.position='absolute';if(this.addIframe){if(this.div.offsetHeight>0)height=this.div.offsetHeight;else if(endList>0)height=endList*17+20;document.getElementById(this.div.id+"BackGround").style.height=height+"px";}
me.onDisplay(me.exactMatchIsPresent);function cnvrt2Title(str){return str.toLowerCase().replace(/\b[a-z]/g,cnvrt);function cnvrt(){return arguments[0].toUpperCase();}}};this.kk_autosuggest_getEligible=function(){this.eligible=new Array();if(me.navigation!=true)this.suggestions.length=this.sizeList;for(i=0;i<this.suggestions.length;i++){var suggestion=this.suggestions[i];if((me.startWith&&suggestion.toLowerCase().indexOf(me.inputText.toLowerCase())==0)){this.eligible[this.eligible.length]=suggestion;}
else if(!me.startWith&&suggestion.toLowerCase().indexOf(me.inputText.toLowerCase())>=0){this.eligible[this.eligible.length]=suggestion;}}};this.kk_autosuggest_getKeyCode=function(ev){if(ev){return ev.keyCode;}if(window.event){return window.event.keyCode;}};this.kk_autosuggest_getEventSource=function(ev){if(ev){return ev.target;}if(window.event){return window.event.srcElement;}};this.kk_autosuggest_cancelEvent=function(ev){if(ev){ev.preventDefault();ev.stopPropagation();}if(window.event){window.event.returnValue=false;}}
this.kk_autosuggest_dysplay=function(){if(!this.toDisable&&(elem.value.length>=me.nbLetters||me.data=="static")&&(me.div.style.display=="none"||me.div.style.display=="")){me.inputText=elem.value;me.kk_autosuggest_getEligible();if(me.eligible.length>0){me.kk_autosuggest_createDiv();me.kk_autosuggest_positionDiv();me.kk_autosuggest_showDiv();}}}
this.kk_autosuggest_addSuggestion=function(el){this.suggestions[this.suggestions.length]=el;}}
var idCounter=0;