/** * MarilynBar * @version 1.0 * 2008. 04. 26. * @package JavaScripts * @subpackage Main JavaScripts * @author E-DOT Interactive Studio * @copyright Copyright (c) 2008, E-DOT */ /** * IE6-ban members only képernyőnél aktiválja a linket */ function showBlockA(o) { if (o.icoInserted) return; o.onmouseover = function () { event.srcElement.style.cursor='pointer'; } if (o.href) o.onclick = function () { window.location.href = event.srcElement.href; } o.icoInserted = 1; } /** * Autocompletetet inicializálja */ $(document).ready ( function () { /** * Dátum inicializálása */ if ($('#linkedDates').length > 0) { var calendartitle = $('#linkedDates').get(0).title; $.datepicker.setDefaults({showOn: 'both', buttonImageOnly: true, buttonImage: '../images/ico/vcalendar.png', buttonText: calendartitle}); $('#linkedDates').datepicker( { minDate: new Date(1930, 1 - 1, 1), maxDate: new Date(new Date().getYear()-18+1900, 12 - 1, 31), beforeShow: datePickerReadLinked, onSelect: datePickerUpdateLinked, yearRange: '-200:+200' }); /** * Dátum ellenőrzése */ $('#selectMonth, #selectYear').change(datePickerCheckLinkedDays); } autocompleteInit(); if ($('.partners').height() < $('.content').height()) $('.partners').height($('.content').height()); } ); /** * Autocompletehez paraméterező fv */ function getAutoCompleteAjaxFile(key) { if (key == "city") { return "ajax/autocomplete.php?country=" + document.getElementById("country").value; } else return "ajax/autocomplete.php"; } // Prepare to show a date picker linked to three select controls function datePickerReadLinked() { $('#linkedDates').val( $('#selectYear').val() + '-' + $('#selectMonth').val() + '-' + $('#selectDay').val() ); return {}; } // Update three select controls to match a date picker selection function datePickerUpdateLinked(date) { $('#selectMonth').val(date.substring(5, 7)); $('#selectDay').val(date.substring(8,10)); $('#selectYear').val(date.substring(0, 4)); } // Prevent selection of invalid dates through the select controls function datePickerCheckLinkedDays() { var daysInMonth = 32 - new Date($('#selectYear').val(), $('#selectMonth').val() - 1, 32).getDate(); $('#selectDay option').attr('disabled', ''); $('#selectDay option:gt(' + (daysInMonth - 1) +')').attr('disabled', 'disabled'); if ($('#selectDay').val() > daysInMonth) { $('#selectDay').val(daysInMonth); } }