browserName = navigator.appName; browserVer = parseInt(navigator.appVersion); // Image Overload var imageoff = new Image(); var imageon = new Image(); imageoff.src = "images/arrow_n.gif"; imageon.src = "images/arrow_a.gif"; function onImageOn(img) { img.src = imageon.src; } function onImageOff(img) { img.src = imageoff.src; } function viewform(m) { var w = 600; var h = 600; var scroll = 'no'; var settings; var LeftPosition; var TopPosition; var win; LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll; settings = settings + ',resizable=no,maximize=no,status=no,toolbar=no,directories=no,menubar=no,location=no'; win = window.open(m, 'pre', settings); win.name = 'name'; win.focus(); } function viewformscr(m, w, h) { alter=(settings); var scroll = 'no'; var settings; var LeftPosition; var TopPosition; var win; LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+', width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll; settings = settings + ', resizable=yes, maximize=no, status=no,toolbar=no,directories=no,menubar=no,location=no, copyhistory=no'; if (document.inviteform) { if (document.inviteform.friend_email) m = m + "?friend_email="+document.inviteform.friend_email.value; } win = window.open(m, 'pre', settings); win.name = 'name'; win.focus(); } function resize(dw, dh, name) { var i=0; var j=0; var LeftPosition; var TopPosition; var w; var h; if (!dw) {dw=16} var BrowserName = navigator.appName; dh= dh + 90; if (document.getElementById('view_link')){ j = 25;} if (document.images[0]) { w = eval('document.'+name+'.width') +dw; h = eval('document.'+name+'.height') + dh+j-i; window.resizeTo(w, h); LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; window.moveTo(LeftPosition, TopPosition); } self.focus(); } function popup2(m) { var scroll = 'yes'; var settings; var win; settings = 'scrollbars='+scroll; settings = settings + ',resizable=yes,maximize=yes,status=no,toolbar=no,directories=no,menubar=no,location=no'; win = window.open(m, 'pre', settings); win.name = 'name'; win.focus(); } function checkPostalCode(obj, country) { format = ''; zip = obj.value; if (!zip) { alert('מיקוד (מידע להתקשרות)'); return false; } switch(country){ case'226' : zipRegExp = /^\d{5}$|^\d{5}-\d{4}$/; zipRegExp_alert = ' XXXXX '+ 'או' +' XXXXX-XXXX'; break; //US case'38' : zipRegExp = /^[A-Z]{1}[0-9]{1}[A-Z]{1}[-|\s*]{0,1}[0-9]{1}[A-Z]{1}[0-9]{1}$/; zipRegExp_alert = ' A0A-0A0, A0A0A0, A0A 0A0'; format = zip; break; //CA case'104': zipRegExp = /^\d{5}$/; zipRegExp_alert = ' XXXXX'; break; //IL } reZip = new RegExp(zipRegExp); if (!reZip.test(zip)) { alert('אנא הזן את המיקוד בפורמט'+zipRegExp_alert); return false; } if(format){ format = format.replace(/\s/, ""); if(format.length == 6) obj.value = format.substr(0,3)+'-'+format.substr(3); } return true; } function checkUserInfoStep1() { if (!document.UserForm.get_fname.value) { alert('שם פרטי'); document.UserForm.get_fname.focus(); return false; } if (!document.UserForm.get_lname.value) { alert('שם משפחה'); document.UserForm.get_lname.focus(); return false; } if (!document.UserForm.get_address.value) { alert('כתובת'); document.UserForm.get_address.focus(); return false; } if (!document.UserForm.get_city.value) { alert('אנא הזינו את שם העיר שלכם'); document.UserForm.get_city.focus(); return false; } /* if (!document.UserForm.get_ref_state.value) { alert('בחר/י מדינה/מחוז'); document.UserForm.get_ref_state.focus(); return false; } */ if (!checkPostalCode(document.UserForm.get_postal_code, document.UserForm.get_ref_country.value)) { document.UserForm.get_postal_code.focus(); return false; } if (!document.UserForm.get_phone.value) { alert('אנא הזינו את מספר הטלפון'); document.UserForm.get_phone.focus(); return false; } if (!document.UserForm.get_shipping_address.value) { alert('אנא הזינו את כתובתכם'); document.UserForm.get_shipping_address.focus(); return false; } if (!document.UserForm.get_shipping_city.value) { alert('אנא הזינו את שם העיר'); document.UserForm.get_shipping_city.focus(); return false; } /* if (!document.UserForm.get_shipping_ref_state.value) { alert('בחר/י מדינה/מחוז'); document.UserForm.get_shipping_ref_state.focus(); return false; } */ if (!checkPostalCode(document.UserForm.get_shipping_postal_code, document.UserForm.get_shipping_ref_country.value)) { document.UserForm.get_shipping_postal_code.focus(); return false; } if (!document.UserForm.get_email.value) { alert('נא להזין את כתובת הדוא\"ל'); document.UserForm.get_email.focus(); return false; } adresse = document.UserForm.get_email.value; var place = adresse.indexOf("@",1); var point = adresse.indexOf(".",place+1); if ((place > -1)&&(adresse.length >2)&&(point > 1)) { } else { alert('כתובת הדוא\"ל איננה חוקית'); document.UserForm.get_email.focus(); return false; } if (!document.UserForm.get_name.value) { alert('נא להזין שם משתמש!'); document.UserForm.get_name.focus(); return false; } if (!document.UserForm.get_pasw_1.value) { alert('סיסמה'); document.UserForm.get_pasw_1.focus(); return false; } if (!document.UserForm.get_pasw_2.value) { alert('אנא אמתי את הסיסמה'); document.UserForm.get_pasw_2.focus(); return false; } if (document.UserForm.get_pasw_1.value != document.UserForm.get_pasw_2.value) { alert('סיסמת האימות אינה זהה לסיסמה שנבחרה'); document.UserForm.get_pasw_1.focus(); return false; } if (document.UserForm.get_pasw_1.value.length < 6) { alert('על הסיסמה להכיל 6 תווים ומעלה'); document.UserForm.get_pasw_1.focus(); return false; } if (document.UserForm.get_phone.value.length < 7 || document.UserForm.get_phone.value.length > 32 ) { alert('מספר הטלפון חייב להיות בין 7 ל-32 ספרות'); document.UserForm.get_phone.focus(); return false; } if (document.UserForm.get_en_queue_notify.checked) { if (!document.UserForm.get_notify_item_count.value) { alert('אנא צייןי כמות'); document.UserForm.get_notify_item_count.focus(); return false; } var notify_item_count = Math.round(parseFloat(document.UserForm.get_notify_item_count.value)); if ((document.UserForm.get_notify_item_count.value.indexOf(".") != -1) || (document.UserForm.get_notify_item_count.value.indexOf(",") != -1) || isNaN(notify_item_count)) { alert('אנא הזןי ספרות בלבד!'); document.UserForm.get_notify_item_count.focus(); return false; } else { if ((notify_item_count <= 0) || (notify_item_count > 99)) { alert('Invalid range! Please enter value between 0 and 100'); document.UserForm.get_notify_item_count.focus(); return false; } } } else { document.UserForm.get_notify_item_count.value = "0"; } return true; } function checkUserInfoStep2() { if (!document.UserForm.get_address.value) { alert('כתובת'); document.UserForm.get_address.focus(); return false; } if (!document.UserForm.get_city.value) { alert('אנא הזינו את שם העיר שלכם'); document.UserForm.get_city.focus(); return false; } if (!document.UserForm.get_ref_state.value) { alert('בחר/י מדינה/מחוז'); document.UserForm.get_ref_state.focus(); return false; } if (!document.UserForm.get_postal_code.value) { alert('מיקוד (מידע להתקשרות)'); document.UserForm.get_postal_code.focus(); return false; } if (!document.UserForm.get_phone.value) { alert('אנא הזינו את מספר הטלפון'); document.UserForm.get_phone.focus(); return false; } if (!document.UserForm.get_shipping_address.value) { alert('אנא הזינו את כתובתכם'); document.UserForm.get_shipping_address.focus(); return false; } if (!document.UserForm.get_shipping_city.value) { alert('אנא הזינו את שם העיר'); document.UserForm.get_shipping_city.focus(); return false; } if (!document.UserForm.get_shipping_ref_state.value) { alert('בחר/י מדינה/מחוז'); document.UserForm.get_shipping_ref_state.focus(); return false; } if (!document.UserForm.get_shipping_postal_code.value) { alert('מיקוד (מידע למשלוח)'); document.UserForm.get_shipping_postal_code.focus(); return false; } return true; } function checkUserInfoStep3(freeTrialAccountId) { var flag = false; if (!document.UserForm.get_ref_member_gender.value) { alert('אנא בחרו ערך בשדה המין'); document.UserForm.get_ref_member_gender.focus(); return false; } if (!document.UserForm.get_ref_question.value) { alert('אנא מלא את השדה \"היכן שמעת עלינו\"!'); document.UserForm.get_tos.focus(); return false; } if (document.UserForm.get_books_per_month.value) { if (isNaN(parseInt(document.UserForm.get_books_per_month.value))) { alert('אנא הזןי ספרות בלבד!'); document.UserForm.get_books_per_month.focus(); return false; } if (document.UserForm.get_books_per_month.value.length > 2) { alert('אנא הזןי מספר בן 2 ספרות!'); document.UserForm.get_books_per_month.focus(); return false; } } if (!document.UserForm.get_ref_member_library_activity.value) { alert('אנא בחרי תשובה לשאלה \"מהו מקור הספרים העיקרי שלך\"'); document.UserForm.get_ref_member_library_activity.focus(); return false; } if (!document.UserForm.get_tos.checked) { alert('קראתי ואני מסכים לתקנון האתר ולתנאי השימוש בו'); document.UserForm.get_tos.focus(); return false; } var get_ref_package = 0; for (var i = 0; i <= document.UserForm.get_ref_package.length - 1; i++) { if (document.UserForm.get_ref_package[i].checked) { get_ref_package = document.UserForm.get_ref_package[i].value; } } if ((get_ref_package == freeTrialAccountId) && (document.UserForm.confirm_free_account.value != '1')) { viewform2('register.php?act=confirm_free_account', 500, 300); return false; } return true; } function QuickLogin() { if (!document.loginform.username.value) { alert('נא להזין שם משתמש!'); document.loginform.username.focus(); return false; } if (!document.loginform.password.value) { alert('סיסמה'); document.loginform.password.focus(); return false; } return true; } function SelectWishList(form, mark) { Form = eval('document.'+form); for (i = 0; i < Form.elements.length; i++) { var item = Form.elements[i]; if (item.name.indexOf('return_items') == 0 && item.disabled != true) { item.checked = mark; }; } } function InputUserInfo() { if (!document.UserForm.get_name.value) { alert('נא להזין שם משתמש!'); document.UserForm.get_name.focus(); return false; } return true; } function checkUserInfo() { if (!document.UserForm.get_name.value) { alert('נא להזין שם משתמש!'); document.UserForm.get_name.focus(); return false; } if (!document.UserForm.get_pasw_1.value) { alert('סיסמה'); document.UserForm.get_pasw_1.focus(); return false; } if (!document.UserForm.get_pasw_2.value) { alert('אנא אמתי את הסיסמה'); document.UserForm.get_pasw_2.focus(); return false; } if (document.UserForm.get_pasw_1.value != document.UserForm.get_pasw_2.value) { alert('סיסמת האימות אינה זהה לסיסמה שנבחרה'); document.UserForm.get_pasw_1.focus(); return false; } if (document.UserForm.get_pasw_1.value.length < 6) { alert('על הסיסמה להכיל 6 תווים ומעלה'); document.UserForm.get_pasw_1.focus(); return false; } if (!document.UserForm.get_fname.value) { alert('שם פרטי'); document.UserForm.get_fname.focus(); return false; } if (!document.UserForm.get_lname.value) { alert('שם משפחה'); document.UserForm.get_lname.focus(); return false; } if (!document.UserForm.get_address.value) { alert('כתובת'); document.UserForm.get_address.focus(); return false; } if (!document.UserForm.get_city.value) { alert('אנא הזינו את שם העיר שלכם'); document.UserForm.get_city.focus(); return false; } if (!document.UserForm.get_ref_state.value) { alert('בחר/י מדינה/מחוז'); document.UserForm.get_ref_state.focus(); return false; } if (!document.UserForm.get_postal_code.value) { alert('מיקוד (מידע להתקשרות)'); document.UserForm.get_postal_code.focus(); return false; } if (!document.UserForm.get_phone.value) { alert('אנא הזינו את מספר הטלפון'); document.UserForm.get_phone.focus(); return false; } if (!document.UserForm.get_email.value) { alert('נא להזין את כתובת הדוא\"ל'); document.UserForm.get_email.focus(); return false; } adresse = document.UserForm.get_email.value; var place = adresse.indexOf("@",1); var point = adresse.indexOf(".",place+1); if ((place > -1)&&(adresse.length >2)&&(point > 1)) { } else { alert('כתובת הדוא\"ל איננה חוקית'); document.UserForm.get_email.focus(); return false; } if (!document.UserForm.get_shipping_address.value) { alert('אנא הזינו את כתובתכם'); document.UserForm.get_shipping_address.focus(); return false; } if (!document.UserForm.get_shipping_city.value) { alert('אנא הזינו את שם העיר'); document.UserForm.get_shipping_city.focus(); return false; } if (!document.UserForm.get_shipping_ref_state.value) { alert('בחר/י מדינה/מחוז'); document.UserForm.get_shipping_ref_state.focus(); return false; } if (!document.UserForm.get_shipping_postal_code.value) { alert('מיקוד (מידע למשלוח)'); document.UserForm.get_shipping_postal_code.focus(); return false; } if (!document.UserForm.get_tos.checked) { alert('קראתי ואני מסכים לתקנון האתר ולתנאי השימוש בו'); document.UserForm.get_tos.focus(); return false; } return true; } function checkGiftUserInfo() { for (i = 0; i < document.GiftUserForm.elements.length; i++) { var item = document.GiftUserForm.elements[i]; if (item.name == "get_pay_name" && item.checked) { send_by = item.value; }; } if(!check_sum(document.GiftUserForm.get_amount, 20)) { return false; } if (!document.GiftUserForm.get_email_from.value) { alert('אנא הזינו את כתובת הדוא\"ל של השולח'); document.GiftUserForm.get_email_from.focus(); return false; } if (!document.GiftUserForm.get_confirm_email_from.value) { alert('אישור כתובת:'); document.GiftUserForm.get_confirm_email_from.focus(); return false; } adresse = document.GiftUserForm.get_email_from.value; var place = adresse.indexOf("@",1); var point = adresse.indexOf(".",place+1); if (!((place > -1)&&(adresse.length >2)&&(point > 1))){ alert('כתובת הדוא\"ל איננה חוקית'); document.GiftUserForm.get_email_from.focus(); return false; } if (document.GiftUserForm.get_email_from.value != document.GiftUserForm.get_confirm_email_from.value) { alert('E-mail and confirmation of the e-mail does not match!'); document.GiftUserForm.get_email_from.focus(); return false; } if(send_by == "email"){ if (!document.GiftUserForm.get_email_to.value) { alert('אנא הזינו את כתובת הדוא\"ל למשלוח'); document.GiftUserForm.get_email_to.focus(); return false; } if (!document.GiftUserForm.get_confirm_email_to.value) { alert('אישור כתובת:'); document.GiftUserForm.get_confirm_email_to.focus(); return false; } if (document.GiftUserForm.get_email_to.value != document.GiftUserForm.get_confirm_email_to.value) { alert('E-mail and confirmation of the e-mail does not match!'); document.GiftUserForm.get_email_to.focus(); return false; } adresse = document.GiftUserForm.get_email_to.value; var place = adresse.indexOf("@",1); var point = adresse.indexOf(".",place+1); if (!((place > -1)&&(adresse.length >2)&&(point > 1))){ alert('כתובת הדוא\"ל איננה חוקית'); document.GiftUserForm.get_email_to.focus(); return false; } }else if(send_by == "post"){ if (!document.GiftUserForm.get_address.value) { alert('כתובת'); document.GiftUserForm.get_address.focus(); return false; } if (!document.GiftUserForm.get_postal_code.value) { alert('מיקוד (מידע להתקשרות)'); document.GiftUserForm.get_postal_code.focus(); return false; } if (!document.GiftUserForm.get_city.value) { alert('אנא הזינו את שם העיר שלכם'); document.GiftUserForm.get_city.focus(); return false; } if (!checkPostalCode(document.GiftUserForm.get_postal_code, document.GiftUserForm.get_ref_country.value)) { document.GiftUserForm.get_postal_code.focus(); return false; } } return true; } function confirm_del() { var reply = confirm('This will permanently delete this record!'); if(reply) { return true; } else { return false; } } function onSubaccountMaster(act) { if ( document.UserForm.get_master.checked) { flag = 1; } else { flag = ""; } window.location="subaccount.php?act=" + act + "&get_master="+flag; } function NothingSend(act) { document.sent_item_form.act.value=act; document.sent_item_form.submit(); return true; } function SelectAuto(act) { if ( document.UserForm.get_auto_fill_shipping.checked) { document.UserForm.get_shipping_address.value = document.UserForm.get_address.value; document.UserForm.get_shipping_address2.value = document.UserForm.get_address2.value; document.UserForm.get_shipping_city.value = document.UserForm.get_city.value; document.UserForm.get_shipping_ref_country.value = document.UserForm.get_ref_country.value; document.UserForm.get_shipping_ref_state.options.length = 0; states = document.UserForm.get_ref_state.options; states_count = document.UserForm.get_ref_state.options.length; for (i=0;i= 0)? true : false; ie = (document.all && !opera)? true : false; dom = (document.getElementById && !ie && !opera)? true : false; var expiration = new Date(); expiration.setTime(expiration.getTime() + 3600*3600*3600); function showtranscript(elemId,displayValue) { if (dom) { if (displayValue) { document.getElementById(elemId).style.display = displayValue; return 0; } if (document.getElementById(elemId).style.display == "none") { document.getElementById(elemId).style.display = "block"; } else if (document.getElementById(elemId).style.display == "block") { document.getElementById(elemId).style.display = "none"; } } else if (ie) { if (displayValue) { window.document.all[elemId].style.display = displayValue; return 0; } if (document.all[elemId].style.display == "block") { document.all[elemId].style.display = "none"; } else if (document.all[elemId].style.display == "none") { document.all[elemId].style.display = "block"; } } } function display(cookie_name, id) { var template_category_cookie; template_category_cookie = GetCookie(cookie_name); if (template_category_cookie) { SetCookie(cookie_name, "1", expiration, "", "","") showtranscript(id, 'block'); } else { SetCookie(cookie_name, "", expiration, "", "","") showtranscript(id, 'none'); } return true; } function onCookieChange(cookie_name, id) { if (dom) { if (document.getElementById(id).style.display == "none") { SetCookie(cookie_name, "", expiration, "", "","") } else if (document.getElementById(id).style.display == "block") { SetCookie(cookie_name, "1", expiration, "", "","") } } else if (ie) { if (document.all[id].style.display == "block") { SetCookie(cookie_name, "1", expiration, "", "","") } else if (document.all[id].style.display == "none") { SetCookie(cookie_name, "", expiration, "", "","") } } } function SetCookie(name, value, expires, path, domain, secure) { var mycookie = name + "=" + escape(value); var myexpires = new Date(); myexpires.setTime(myexpires.getTime() + 5000); mycookie = mycookie + "; myexpires=" + myexpires.toGMTString(); document.cookie = mycookie; } function GetCookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function checkTellaFriend() { if (!document.TellaFriendForm.get_sender.value) { alert("Please enter your email!"); document.TellaFriendForm.get_sender.focus(); return false; } if (!document.TellaFriendForm.get_email1.value && !document.TellaFriendForm.get_email2.value && !document.TellaFriendForm.get_email3.value ) { alert("Please enter friend email!"); document.TellaFriendForm.get_email1.focus(); return false; } if (!document.TellaFriendForm.get_subject.value) { alert("Please enter subject!"); document.TellaFriendForm.get_subject.focus(); return false; } if (!document.TellaFriendForm.get_body.value) { alert("Please enter message!"); document.TellaFriendForm.get_body.focus(); return false; } } function TrimString(sInString) { sInString = sInString.replace( /^\s+/g, "" );// strip leading return sInString.replace( /\s+$/g, "" );// strip trailing } var preloadFlag = false; function preloadImages() { if (document.images) { preloadFlag = true; } } function changeImages() { if (document.images && (preloadFlag == true)) { for (var i=0; i < changeImages.arguments.length; i+=2) { document[changeImages.arguments[i]].src = changeImages.arguments[i+1]; } } } function checkBasket() { for(var i = 0; i <= document.basket.elements.length - 1; i++){ if (document.basket.elements[i].className == "formfields"){ if (isNaN(parseInt(document.basket.elements[i].value))){ alert('אנא הזינו ערך מספרי בלבד'); document.basket.elements[i].focus(); return false; } } } //document.basket.submit(); return true; } function left_advanced_search_form_clear() { document.left_advanced_search_form.get_name.value = ""; document.left_advanced_search_form.get_keyword.value = ""; //document.left_advanced_search_form.get_ref_actor.value = ""; document.left_advanced_search_form.get_actor_name.value = ""; //document.left_advanced_search_form.get_ref_studio.value = ""; document.left_advanced_search_form.get_ref_action.value = ""; //document.left_advanced_search_form.get_actor_initial.value = ""; document.left_advanced_search_form.get_isbn.value = ""; } function CheckAdvancedSearch(form) { if(form.get_ref_category && form.get_ref_category.value){ if(form.get_search_by_value.value){ return true; } document.location = form.get_ref_category.value; return false; }else{ if(!form.get_search_by_value.value){ alert('בחרו קריטריונים לחיפוש'); return false; } } return true; } function AdvancedSearchFormClear() { document.advanced_search_form.get_name.value = ""; document.advanced_search_form.get_keyword.value = ""; document.advanced_search_form.get_actor_name.value = ""; document.advanced_search_form.get_ref_action.value = ""; document.advanced_search_form.get_isbn.value = ""; } function CheckAdvancedSearchPage() { if ( !document.advanced_search_form.get_name.value && !document.advanced_search_form.get_keyword.value && !document.advanced_search_form.get_actor_name.value && !document.advanced_search_form.get_ref_action.value && !document.advanced_search_form.get_isbn.value ) { alert('בחרו קריטריונים לחיפוש'); document.advanced_search_form.get_isbn.focus(); return false; } if (document.advanced_search_form.get_name.value.indexOf("%") != -1) { alert('מחקי סמל % משורת ההזנה'); document.advanced_search_form.get_name.focus(); return false; } if (document.advanced_search_form.get_keyword.value.indexOf("%") != -1) { alert('מחקי סמל % משורת ההזנה'); document.advanced_search_form.get_keyword.focus(); return false; } if (document.advanced_search_form.get_actor_name.value.indexOf("%") != -1) { alert('מחקי סמל % משורת ההזנה'); document.advanced_search_form.get_actor_name.focus(); return false; } return true; } function checkEmailNotification() { if (document.emailNotificationForm.get_en_queue_notify.checked) { if (!document.emailNotificationForm.get_notify_item_count.value) { alert('אנא צייןי כמות'); document.emailNotificationForm.get_notify_item_count.focus(); return false; } var notify_item_count = Math.round(parseFloat(document.emailNotificationForm.get_notify_item_count.value)); if ((document.emailNotificationForm.get_notify_item_count.value.indexOf(".") != -1) || (document.emailNotificationForm.get_notify_item_count.value.indexOf(",") != -1) || isNaN(notify_item_count)) { alert('אנא הזןי ספרות בלבד!'); document.emailNotificationForm.get_notify_item_count.focus(); return false; } else { if ((notify_item_count <= 0) || (notify_item_count > 99)) { alert('Invalid range! Please enter value between 0 and 100'); document.emailNotificationForm.get_notify_item_count.focus(); return false; } } } else { document.emailNotificationForm.get_notify_item_count.value = "0"; } return true; } function LeftMenuItemClick(id, cookie_name, link) { showtranscript(id, ''); onCookieChange(cookie_name, id); window.open(link, '_self'); } function ContactFormSubmit() { /* if (MemberLogin == 0) { var reply = confirm('אינך מחובר/ת לחשבון ברגע זה. אנא התחברי לחשבון. האם להמשיך?'); if (!reply) { return false; } } */ if (!document.contact_form.get_name.value) { alert('שם משתמש'); document.contact_form.get_name.focus(); return false; } if (!document.contact_form.get_sender.value) { alert('סיסמה'); document.contact_form.get_sender.focus(); return false; } else { if (!ValidateEmailAddress(document.contact_form.get_sender.value)) { return false; } } if (!document.contact_form.get_subject.value) { alert('אנא הוסיפו נושא להודעה'); document.contact_form.get_subject.focus(); return false; } if (!document.contact_form.get_body.value) { alert('אנא כתבו את הודעתכם'); document.contact_form.get_body.focus(); return false; } if (parseInt(document.contact_form.check_code.value) == 0) { alert('אנא הכנס ערכים ידנית!'); return false; } return true; } function CheckContactForm() { var key = 1093452362; var code = 0; str_sender = new String(document.contact_form.get_sender.value); for (var i = 0; i <= str_sender.length - 1; i++) { code += str_sender.charCodeAt(i) ^ key; } document.contact_form.check_code.value = code; return true; } function BuyBookOutOfStock() { var reply = confirm("Sorry, this book is currently out of stock. Buy anyway?"); if (reply) { return true; } else { return false; } } function RentBookCheck(freeAccount, outOfStock) { if (freeAccount) { alert("With the Free Account, this book will not be sent."); } if (outOfStock) { var reply = confirm("Sorry, this book is currently out of stock. Rent anyway?"); if (!reply) { return false; } } return true; } function AddAuthorToFavorites(authorName, alreadyAdded) { if (alreadyAdded) { alert(authorName + " was already added to your Favorites."); return false; } else { var reply = confirm("Would you like to add " + authorName + " to your Favorites?"); if (reply) { alert(authorName + " has been added to your Favorites."); return true; } else { return false; } } } function onmenuover(img) { img.src = img.src.replace(/\.gif/, "_a.gif") return false; } function onmenuout(img) { img.src = img.src.replace(/\_\a\.gif/, ".gif") return false; } function checkCCInfo(name) { Form = eval('document.'+name); if(!Form.get_trnCardNumber) return true; if (!Form.get_trnCardOwner.value) { alert("Please enter Card Owner!"); Form.get_trnCardOwner.focus(); return false; } if (!Form.get_trnCardType.value) { alert("Please enter Card Type!"); Form.get_trnCardType.focus(); return false; } if (!Form.get_trnCardNumber.value) { alert("Please enter Card #!"); Form.get_trnCardNumber.focus(); return false; } if (!Form.get_trnExpMonth.value) { alert("Please enter Card Expire Date!"); Form.get_trnExpMonth.focus(); return false; } if (!Form.get_trnExpYear.value) { alert("Please enter Card Expire Date!"); Form.get_trnExpYear.focus(); return false; } if (!Form.get_trnCardCvd.value) { alert("Please enter Verification Code!"); Form.get_trnCardCvd.focus(); return false; } if (PositiveInteger(Form.get_trnCardNumber) == false) { return false; } if (PositiveInteger(Form.get_trnCardCvd) == false) { return false; } if(document.getElementById('continue')) document.getElementById('continue').style.visibility = 'hidden'; return true; } function disable(checked, id, package_item_count){ if(checked == 'damage_items'){ checked2 = 'return_items'; }else{ checked2 = 'damage_items'; } count_ = 0; if(document.getElementById(checked+id) && document.getElementById(checked+id).checked){ if(checked == 'return_items'){ for (i = 0; i < document.wish_list.elements.length; i++) { var item = document.wish_list.elements[i]; if (item.name.indexOf('return_items') == 0 && item.checked && item.value != id){ count_= count_+ 1; } } } if(document.getElementById(checked2+id) && !count_){ document.getElementById(checked2+id).disabled = 'disabled'; // document.wish_list.all_wish_count.value = eval(document.wish_list.all_wish_count.value) - 1; }else{ if(count_ >= package_item_count){ alert(package_item_count+ ' ספרים בהחזרה מהירה בלבד!'); document.getElementById(checked+id).checked = false; } } }else{ if(document.getElementById(checked2+id)) document.getElementById(checked2+id).disabled = ''; // document.wish_list.all_wish_count.value = eval(document.wish_list.all_wish_count.value) + 1; // all_wish_count = document.wish_list.all_wish_count.value; count_ = 0; for (i = 0; i < document.wish_list.elements.length; i++) { var item = document.wish_list.elements[i]; if (item.name.indexOf('wish_id') == 0 && item.checked){ count_= count_+ 1; if (count_ > (package_item_count/* - all_wish_count*/)) { item.checked = ''; count_= count_- 1; } } } } return true; } function check_returning(){ count_ = 0; for (i = 0; i < document.wish_list.elements.length; i++) { var item = document.wish_list.elements[i]; if (item.name.indexOf('return_items') == 0 && item.checked){ count_= count_+ 1; } } if(count_ <= 1){ alert('עליך להחזיר יותר מפריט אחד בפעם!'); return false; }else{ return confirm('האם אתם בטוחים שברצונכם להחזיר את הפריטים שנבחרו? לאחר שתלחצו על כפתור האישור תונפק עבורכם תעודת משלוח אשר אינה ניתנת לשינוי. אנא ודאו כי לא שכחתם להוסיף/להוריד פריט מן הרשימה.'); } } function check_key_input(e){ if (!e) var e = window.event; if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; if(e.which > 125){ alert('הזן כאן רק נתונים באנגלית!'); return false; } } function check_key_input_onblur(obj){ check_str = obj.value; id = obj.id; for(i=0; i <= check_str.length; i++){ if(check_str.charCodeAt(i) > 125){ alert('הזן כאן רק נתונים באנגלית!'); setTimeout("document.getElementById(id).focus();",1); // to fix a browser bug return false; } } return true; } function check_field_type(nObj, type){ sNumber = nObj.value; if(sNumber.length == 0){ nObj.old_digit = sNumber; return false; } if(type == "integer"){ if(!IsNumeric(sNumber)){ alert('אנא הזינו ערך מספרי בלבד'); nObj.value = (isNaN(nObj.old_digit))?"":nObj.old_digit; return false; } } if(type == "digital"){ if(isNaN(sNumber)){ alert('אנא הזינו ערך מספרי בלבד'); nObj.value = (isNaN(nObj.old_digit))?"":nObj.old_digit; return false; } } nObj.old_digit = sNumber; return true; } function IsNumeric(sNumber) { // Checks that a number is numeric if (sNumber.length == 0) return false; for (x = 0; x < sNumber.length; x++) { if(isNaN(sNumber.charAt(x))){ return false; break; } } return true; } function check_sum(obj, min){ if(obj.value < min){ alert('הסכום חייב להיות גבוה מ- '+min+' $'); return false; } return true; }