var info_offset = -100; function tryi18() { alert("Ceci est mon premier texte de I18 js.") } try { jQuery = jQuery.noConflict(); } catch (e) { jQuery = null; } var lastItem = null; var domII=document.getElementById var ieII=document.all var crossobj; var refobj; var largeViewCounter=0; var master_asset_number=0; var image_number=0; var creditcard=-11; var state = ""; var country = ""; var xmlHttp=GetXmlHttpObject(); var usa_shipping_time; var international_shipping_time; var usa_shipping_options; var international_shipping_options; var LOWEST_SHIPPING_SERVICE; var LOWEST_SHIPPING_PRICE; var tmp=""; var uspsfreeamount=0; var ship_rates = new Array(); var detect = navigator.userAgent.toLowerCase(); var OS,browser,version,total,thestring; var shoppingAmount; var shippByUSPS; var fedexPON; var fedexSON; var ownFedexPON; var ownFedexSON; var max_char_limit=0; var max_char_obj; var lighboxInvokedFrom = ""; var currentLighbox = ""; var tmpVar = ""; var maxhightForP2 = 0; var hightForP2 = 0; var loggedIn = 0; var birth_day_history_search = 0; var is_guest = 0; var load_more_images = 1; try { var Config = {"system_languages":[{"Language":{"id":"1","language":"English","locale_name":"English","lang_code":"en","active":"1"}},{"Language":{"id":"2","language":"French","locale_name":"Francais","lang_code":"fr","active":"1"}},{"Language":{"id":"3","language":"German","locale_name":"Deutsch","lang_code":"de","active":"1"}}],"language_prefix_exists_in_url":1,"language_code":"fr","language_name":"French"}; } catch (e){ var Config = {}; } var language_code = 'en'; if(Config.language_code != undefined) { language_code = Config.language_code; } /* This fusntion runs when any page loads */ startUp(); function startUp() { document.observe("dom:loaded", function() { getBrowserInfo(); //if(browser == "Internet Explorer 6.0" || browser == "Internet Explorer 7.0" || browser == "Internet Explorer 8.0") //{ //keepsessionalive(); //} //var t = document.getElementsByClassName('myclassname'); }); } function keepsessionalive() { setInterval(function(){var args="";var f="keepalivesession";args+= Math.random() + "0|";args+= Math.random() + "0|";args+= Math.random() + "2|";args+= Math.random() + "251|"; args=Base64.encode(args);f=Base64.encode(f);var str=f+"__"+args;url=SITE_URL+'user/wrapperF/'+str;custome_requester(url)}, 5000); } function custome_requester(urlGC) { new Ajax.Request(urlGC, { method: 'get', onSuccess: function(transport) { //alert("Logged out successfullly"); } }); } function changeAmount(me,servicename) { jQuery('#Frecipient, #Fthirdparty').prop("checked", false); var tr = eval(me); if(tr>0) { var newnum=shoppingAmount+eval(me); } else{ var newnum=shoppingAmount; } //alert(eval(me)); $('PAYPALAMT').value=newnum.toFixed(2) setsession(servicename, eval(me)) // alert($('PAYPALAMT').value); } function setsession(shippingservice, amt) { var url=SITE_URL_LAN+'shopping/setshipserviceinsession/?srvice='+shippingservice+'&amount='+amt; new Ajax.Updater( "", url, {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', ""]} ); } function getBrowserInfo() { if (checkIt('konqueror')) { browser = "Konqueror"; OS = "Linux"; } else if (checkIt('safari')) browser = "Safari" else if (checkIt('omniweb')) browser = "OmniWeb" else if (checkIt('opera')) browser = "Opera" else if (checkIt('webtv')) browser = "WebTV"; else if (checkIt('icab')) browser = "iCab" else if (checkIt('msie 6.0')) browser = "Internet Explorer 6.0" else if (checkIt('msie 7.0')) browser = "Internet Explorer 7.0" else if (checkIt('msie 8.0')) browser = "Internet Explorer 8.0" else if (checkIt('msie 9.0')) browser = "Internet Explorer 9.0" else if (!checkIt('compatible')) { browser = "Netscape Navigator" version = detect.charAt(8); } else browser = "An unknown browser"; if (!version) version = detect.charAt(place + thestring.length); if (!OS) { if (checkIt('linux')) OS = "Linux"; else if (checkIt('x11')) OS = "Unix"; else if (checkIt('mac')) OS = "Mac" else if (checkIt('win')) OS = "Windows" else OS = "an unknown operating system"; } } function checkIt(string) { place = detect.indexOf(string) + 1; thestring = string; return place; } /*-----------------------------------------------------------------------------------------------*/ var Base64 = { // private property _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", // public method for encoding encode : function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = Base64._utf8_encode(input); while (i < input.length) { 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 + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); } return output; }, // public method for decoding decode : function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._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); } } output = Base64._utf8_decode(output); return output; }, // private method for UTF-8 encoding _utf8_encode : function (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; }, // private method for UTF-8 decoding _utf8_decode : function (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; } } getargs=function(){ var state=document.getElementById('UsercreditcardsState').value; var country=document.getElementById('UsercreditcardsCountry').value; document.getElementById('UsercreditcardsCity').className='txtbox03'; var field='Usercreditcards'; new Ajax.Autocompleter('UsercreditcardsCity', 'UsercreditcardsCity_autoComplete', SITE_URL+'user/autocity/'+country+'/'+state+'/'+field,{}); } function submitForm(frm) { if((typeof( frm ) == "string" ) ) { var frm = $(frm); } else { var frm = frm; } frm.submit(); } function confirm_and_submitForm(frm, msg) { jSetButtonLbl("Ok", "Annuler"); jConfirm(msg, 'Confirmation', function(r) { if (r == true) { if((typeof( frm ) == "string" ) ) { var frm = $(frm); } else { var frm = frm; } frm.submit(); } else { return false; } }); } function confirm_and_send(url, msg) { jSetButtonLbl("Ok", "Annuler"); jConfirm(msg, 'Confirmation', function(r) { if (r == true) { window.location.href=url; } else { return false; } }); } function onlyNumbers(e) { var keynum; var keychar; var numcheck; if(e.keyCode == 8 || e.keyCode == 13 || e.keyCode == 37 || e.keyCode == 39 || e.keyCode == 46 || e.keyCode == 116 ) { return String.fromCharCode(keynum); } if(window.event) // IE { keynum = e.keyCode; } else if(e.which) // Netscape/Firefox/Opera { keynum = e.which; } keychar = String.fromCharCode(keynum); numcheck = /\d/; return numcheck.test(keychar); } function updateshipservice(ctr,qty) { if(isNaN($('printsizeqty_'+ctr).value)) { $('printsizeqty_'+ctr).value = 0; } if(parseInt(qty)>0 ) { var url=SITE_URL_LAN+'shopping/changeinqty/'+ctr+'/'+qty; new Ajax.Updater( "", url, {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', ""]} ); } } function updateTotal4Item(e, ctr, qty, price) { var ttl = qty * price; ttl = ttl.toFixed(2); $('total4Item_'+ctr).innerHTML = ttl; if(isNaN($('printsizeqty_'+ctr).value)) { $('printsizeqty_'+ctr).value = 0; } if($('printsizeqty_'+ctr).value<=0) { $('removeChk'+ctr).checked=true; }else { $('removeChk'+ctr).checked=false; } //alert(parseInt(qty)); if(parseInt(qty)>0 ) { var url=SITE_URL_LAN+'shopping/changeinqty/'+ctr+'/'+qty; new Ajax.Updater( "", url, {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', ""]} ); updateShoppingCartTotals(); } } function uncheckRemoveChk( ctr ) { if($('printsizeqty_'+ctr)!=null) { if($('printsizeqty_'+ctr).value<=0) { $('removeChk'+ctr).checked=true; } } } function updateShoppingCartTotals() { var subTotal = new Number(0); var totalitems = $('totalitems').value; for(i=1;i<=totalitems;i++) { var t = $('total4Item_'+i).innerHTML var myNum=new Number(t); subTotal = subTotal + myNum; } $('subTotal').innerHTML=subTotal.toFixed(2); var srv = $('shippingservice') if (srv!==null && srv !='undefined' ) { if (srv.selectedIndex>=0) { var s=srv.options[srv.selectedIndex].text; } } var DCTotal = $('DCAmount') if (DCTotal!==null && DCTotal !='undefined' ) { var DCAmount = new Number(DCTotal.innerHTML).toFixed(2); } else { var DCAmount = new Number(0); } //LOWEST_SHIPPING_PRICE = s.substr(s.indexOf("|") + 1); LOWEST_SHIPPING_PRICE = ship_rates[ $('shippingservice').value ]; if(LOWEST_SHIPPING_PRICE<0) { LOWEST_SHIPPING_PRICE=0; } //$('fedexTotal').innerHTML = $('fedexTotalHidden').value; //$('totalwithfedex').innerHTML = (subTotal + new Number($('fedexTotal').innerHTML)).toFixed(2) if($('shippingservice').value=='') { LOWEST_SHIPPING_PRICE = 0; }else { //setsession($('shippingservice').value); } //if(LOWEST_SHIPPING_PRICE) $('totalwithfedex').innerHTML = ((subTotal - DCAmount) + new Number(LOWEST_SHIPPING_PRICE) ).toFixed(2) var url=SITE_URL_LAN+'shopping/shipserviceinsessionCart/?srvice='+$('shippingservice').value+'&amount='+LOWEST_SHIPPING_PRICE; new Ajax.Updater( "", url, {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', ""]} ); } function checkShoppinfCartForm(redirectTo) { var totalitems = $('totalitems').value; var itemsRemoved = 0; for(i=1;i<=totalitems;i++) { if ($('removeChk'+i).checked==true) { itemsRemoved++; } } if (itemsRemoved > 0 ) { if ( itemsRemoved == totalitems ) { itemsRemoved = "Tous"; } jSetButtonLbl("Ok", "Annuler"); jConfirm("Êtes-vous sûr de vouloir supprimer "+itemsRemoved+" articles à partir du panier?", 'Confirmation', function(r) { if (r == true) { $('redirectTo').value = redirectTo; $('shoppingCart').submit(); } else { jQuery(".checkbox").attr("checked", false); return false; } }); jQuery("#popup_message").first().addClass('cp-dialog'); } else { $('redirectTo').value = redirectTo; $('shoppingCart').submit(); } } function startLoading() { jQuery(".ajaxCallBackLoader").show(); } function stopLoading() { jQuery(".ajaxCallBackLoader").hide(); } function updatewithformobserve(update, url, frmtoObserv) { if( url=='shopping/shippingrates/' || url=='shopping/fedexrate/') { $(update).innerHTML = ''; } var a = new Ajax.Updater( update, url, {asynchronous:true, evalScripts:true, parameters:Form.serialize(frmtoObserv), requestHeaders:['X-Update', update], onCreate: startLoading, onComplete: stopLoading} ); } function custome_updater(update, url) { new Ajax.Updater( update, url, { asynchronous:true, evalScripts:true, requestHeaders:['X-Update', update], onSuccess: function(transport) { if(update == '') { alert("Member Type has been updated!"); } } } ); } function getFedexRates(update, url, frmtoObserv) { //SITE_URL_LAN=SITE_URL.replace("http:","https:"); //alert(SITE_URL); if($('fedexCountry').value == '') { window.location.href = SITE_URL_LAN+'shopping/cart/?msg=3&c='+$('fedexCountry').value+'&z='+$('zipcode').value; //alert("Please Select destination country.") return false; } //if($('zipcode').value == '') //{ // window.location.href=SITE_URL_LAN+'shopping/cart/?msg=4&c='+$('fedexCountry').value+'&z='+$('zipcode').value; //alert("Please enter Zip?Postal code.") // return false; //} //if($('fedexCountry').value!="" && $('zipcode').value!="") $('totalwithfedex').innerHTML = preloader(); if($('fedexCountry').value!="") { xmlHttp1=GetXmlHttpObject(); if($('zipcode').value!="") { var zp = $('zipcode').value; }else{ var zp = 0; } var url1=SITE_URL_LAN+"shopping/checkpostalcode/"+zp+"/"+$('fedexCountry').value; //alert(url1); xmlHttp1.open("GET",url1,false); xmlHttp1.send(null); if(parseInt(xmlHttp1.responseText)==0) { window.location.href = SITE_URL_LAN+'shopping/cart/?msg=2&c='+$('fedexCountry').value+'&z='+$('zipcode').value; } if(parseInt(xmlHttp1.responseText)==20) // 20 means fedex failed to provide rates. { window.location.href = SITE_URL_LAN+'shopping/cart/?msg=20&c='+$('fedexCountry').value+'&z='+$('zipcode').value; } } var v=$('shippingservice').value; s='Détails de lexpédition'; if($('fedexCountry').value == 'US') { //$('shippingservicescontainer').innerHTML = usa_shipping_options; /* Changes for Task 4392*/ //s=s+'FREE shipping on US orders of $'+uspsfreeamount+' or more'; } else { //$('shippingservicescontainer').innerHTML = international_shipping_options; } $('shippingservice').value=v; $('shippingservicescontainer').style.display=""; $('shippingdetailslinkcontainer').innerHTML=s; //$('uspsfree').innerHTML='FREE shipping on US orders of $'+uspsfreeamount;+' or more'; $('shippingservicescontainerbeforetext').style.display="none"; if($('shippingservice').value == '' || true) { url = SITE_URL_LAN + 'shopping/shippingrates/'; updatewithformobserve(update, url, frmtoObserv); //alert("Please select carrier service.") return false; } else { updatewithformobserve(update, url, frmtoObserv); } _body_onunload(); } function changefedexTotalText() { if($("shippingservice").value=='USPS') { $('fedexTotalText').innerHTML = "USPS Rate"; } else { $('fedexTotalText').innerHTML = "Fedex Rate"; } } function updateLowestShippingCost() { $('shippingservice').value = LOWEST_SHIPPING_SERVICE; $('fedexTotal').innerHTML = LOWEST_SHIPPING_PRICE; } function showhippingdetails(self, show) { lastItem = false; if(show==true) { lastItem = self; if($('fedexCountry').value == '') { alert("Please Select destination country.") return false; } $('lightBox').style.display=''; if($('fedexCountry').value == 'US') { $('shiptime').innerHTML = usa_shipping_time; } else { $('shiptime').innerHTML = international_shipping_time; } //alert(document.body.clientHeight); //$('lightBox').style.top=(document.body.clientHeight-255) +"px"; $('lightBox').style.top=(679) +"px"; $('lightBox').style.left=(336) +"px"; if(jQuery( window ).width() <768 || true){ if(typeof $('shipping-method-link') !='undefined'){ try{ $('lightBox').style.left="0.5%"; var pos = jQuery(self).offset(); jQuery('#lightBox').css('top',pos.top+20); }catch(e){ } } } } else { $('lightBox').style.display='none'; } } jQuery(window).resize(function (){ if(jQuery('#lightBox').is(":visible")){ if(typeof lastItem !='undefined' && typeof lastItem !=null && lastItem!=false){ jQuery('#lightBox').css("left","0.5%"); var pos = jQuery(lastItem).offset(); jQuery('#lightBox').css('top',pos.top+20); } } if(jQuery('.lightboxes_div').is(":visible")){ if(typeof lastItem !='undefined' && typeof lastItem !=null && lastItem!=false){ var pos = jQuery(lastItem).offset(); jQuery('#lightBox').css('top',pos.top+20); } } }); function showcheckoutbox(show) { if(show==true) { $('lightBox01').style.display='' $('lightBox01').style.top=(document.body.clientHeight-505) +"px"; } else { $('lightBox01').style.display='none' } } function largeView(crsobj, obj, view, c, man, imgn) { var paras = $A(document.getElementsByClassName('pcNormalBig01')); paras.each(Element.hide); getBrowserInfo(); if(obj!='' && obj != null){refobj=obj}else{obj=refobj} if(c!=0 && c != null){largeViewCounter=c} if(man!='' && man != null){master_asset_number=man} if(imgn!='' && imgn != null){image_number=imgn} if(crsobj!='' && crsobj != null){crossobj=crsobj} var scrld = Number(document.getElementById("t").innerHTML); //crossobj=(domII)?document.getElementById("largeImage").style : ieII? document.all.largeImage : document.largeImage; var offsetLeft=0; var offsetTop=0; //alert(obj.offsetParent.offsetLeft); var extra_pixels_for_higher_resolutions=0; if(view!='none') { if(browser == "Internet Explorer 7.0" || browser == "Internet Explorer 6.0") { if(window.screen.availWidth>1024){ extra_pixels_for_higher_resolutions=124; } offsetLeft = (obj.offsetParent.offsetLeft + obj.parentNode.offsetLeft)+extra_pixels_for_higher_resolutions + 'px'; offsetTop = (obj.offsetParent.offsetTop + obj.parentNode.offsetTop)+585 - scrld + 'px'; } else { offsetLeft = (obj.offsetLeft )-10 + 'px'; offsetTop = (obj.offsetTop )-(10+scrld ) + 'px'; } //alert("left = "+offsetLeft+" \ top = "+offsetTop) crossobj.style.left = offsetLeft; crossobj.style.top = offsetTop; } crossobj.style.display = view; //document.getElementById('bigviewlnkI').href = document.getElementById('bigviewlnk'+c).href; //$('bigviewlnkI').href = '/criticalpast/products/bigview/'+master_asset_number+'/'+image_number; //$('bigviewlnkII').href = '/criticalpast/products/bigview/'+master_asset_number+'/'+image_number; //$('thumbimgI').src = $('thumbimg'+c).src; //$('photobuylnkI').href = '/criticalpast/products/photobuydetails/'+master_asset_number+'/'+image_number; // } function scrollTheScroller2() { pollID = setInterval("scrollTheScroller2()",500); } var tm; var flag=0; var mainscrld = 0; function scrollTheScroller(r) { var min1=0; var max1=0; var mod1=29; var mod2=130; var min1=0; var min11=1; var max1=0; var max11=20; //$('picContainer').style.overflow = 'auto'; document.getElementById("t").innerHTML = document.getElementById("picContainer").scrollTop; var scrld = Number(document.getElementById("t").innerHTML); if (scrld==0){$('count').innerHTML="1-20";return;} if (scrld>0 && scrldparseInt(parseInt(scrld / mod2) * 5 +20)) { if ((scrld % mod1) > 0 && scrld>mod1) { min1=parseInt(parseInt(scrld / mod1) * 5+1 ); max1=parseInt(parseInt(scrld / mod1) * 5+20); min11=parseInt(parseInt(scrld / mod2) * 5+1 ); max11=parseInt(parseInt(scrld / mod2) * 5+25); $('scrolldetails').innerHTML += "
in ---[ SECOND COND ] --- " ; } } else { //alert(imagePageTotal) //alert(parseInt(parseInt(scrld / mod1) * 5 +20)) $('scrolldetails').innerHTML += "
in ---[ ELSE of SECOND COND ] --- " ; if ((scrld % mod1) > 0 && scrld>mod1) { min1=parseInt(parseInt(scrld / mod1) * 5+1 ); min11=parseInt(parseInt(scrld / mod2) * 5 - 4 ); max1=imagePageTotal; max11=imagePageTotal; $('scrolldetails').innerHTML += "
in ---[ ELSE of SECOND COND IN SUB CONDITION ] --- " ; } } if(max11>imagePageTotal) { max11=imagePageTotal; } $('count').innerHTML=min11+'-'+max11; $('scrolldetails').innerHTML += "
Min1 = " + min1 +" = Max1 = " + max1 ; $('scrolldetails').innerHTML += "
Min11 = " + min11 +" = max11 = " + max11 ; //alert(flag); //if(flag==0) //{ //$('picContainer').style.overflow='hidden'; update_container(min11, max11, scrld); //update_container(min11, min11+15, scrld); //check_all_loding_images(min11, min11); flag=1; //mainscrld = scrld //alert("request sent"); //} //else //{ // document.getElementById("picContainer").scrollTop = mainscrld; //} //setTimeout(function(){flag=0; }, 2000); //update_container(min1, max1); //check_all_loding_images(min1, min1+30); } function update_container(min1, max1, scrld) { var start = 0; if(imagePageTotal0 ) { //if(mainscrld==100) /// this was used for testing purpose for loading image issue [not loaaded at all] //{ var url=SITE_URL_LAN+'products/loadimages/?master_asset_number='+master_asset_number+'&start='+start+'&end='+end+'&scrld='+scrld; setTimeout("updatewithformobserve('picContainer2', '" + url + "','dumform')", 1000); //updatewithformobserve('picContainer2', url,'dumform'); //} } } function update_all_image_container(min1, max1) { var added = 0; flag = 0; for(min1;min1<=max1;min1++) { if ($('image_container_'+min1) != null && $('image_container_new_'+min1) != null) { if($('loader_image_'+min1).alt=='loading') { $('image_container_'+min1).innerHTML = $('image_container_new_'+min1).innerHTML; added++; } } } if(added>0) { //initialize(); } check_all_loding_images(min1, max1); // picContainer } function check_all_loding_images(min1, max1) { check_all_loding_images1(); return false; var added=0; for(min1;min1<=max1;min1++) { if ($('loader_image_'+min1) != null) { if($('loader_image_'+min1).alt=='loading') { var url=SITE_URL_LAN+'products/loadimages/?master_asset_number='+master_asset_number+'&start='+min1+'&end='+max1; updatewithformobserve('picContainer2', url,'dumform'); return false; } } } return false; } function check_all_loding_images1() { var scrld = Number(document.getElementById("t").innerHTML); if (scrld>30) { var min1=scrld/30; var max1=min1+50; }else { return false; } if(imagePageTotal
 
'; $('errormessage').innerHTML=str; scroll(0,0); return false; }**/ /** else if($('UsercreditcardsYearYear').value < d.getUTCFullYear() ) { str='
 

Il y a eu un problème avec votre saisie:

Spécifiez une date d\'expiration valide.

 
'; $('errormessage').innerHTML=str; scroll(0,0); return false; }**/ /**else if($('UsercreditcardsYearYear').value <= d.getUTCFullYear() && $('UsercreditcardsMonth').value < ( d.getMonth() + 1) ) { str='
 

Il y a eu un problème avec votre saisie:

Spécifiez une date d\'expiration valide.

 
'; $('errormessage').innerHTML=str; scroll(0,0); return false; }**/ /** else if($('UsercreditcardsCcSecurityCode') != null && $('UsercreditcardsCcSecurityCode').value=="") { str='
 

Il y a eu un problème avec votre saisie:

Le code de sécurité de la carte doit être renseigné.

 
'; $('errormessage').innerHTML=str; scroll(0,0); //alert('Credit Card Security Code Field Cannot be left blank'); return false; }**/ if($('UsercreditcardsCcOwner').value=="") { console.log($('UsercreditcardsCcOwner').value); var str = ''; //str='
 

Il y a eu un problème avec votre saisie:

Le champ Nom du titulaire de la carte doit être renseigné.

 
'; //$('errormessage').innerHTML=str; HFMessageOwner = 'Le champ Nom du titulaire de la carte doit être renseigné.'; //$('UsercreditcardsCcOwner').focus; jQuery('#UsercreditcardsCcOwner').css('border-color', '#D0041D'); jQuery('#UsercreditcardsCcOwner').focus(); showError4BT( str ); scroll(0,0); //alert('Credit Card Owner name Field Cannot be left blank'); return false; } else { var str = ''; HFMessageOwner = ''; jQuery('#UsercreditcardsCcOwner').css('border-color', ''); showError4BT(str); //jQuery('#UsercreditcardsCcOwner').removeClass("error"); } } //if($('UsercreditcardsCcSecurityCode') != null && $('UsercreditcardsCcSecurityCode').value=="") //{ //str='
 

Il y a eu un problème avec votre saisie:

Le code de sécurité de la carte doit être renseigné.

 
'; // $('errormessage').innerHTML=str; //scroll(0,0); //alert('Credit Card Security Code Field Cannot be left blank'); //return false; // } // If Guest Users..... if($('GuestusersEmail')!=null && $('GuestusersCemail')!=null) { if($('GuestusersEmail').value != $('GuestusersCemail').value ) { str = 'Vos deux entrées pour l\' adresse électronique ne correspondent pas. Veuillez réessayer.'; //var str='
 

Il y a eu un problème avec votre saisie:

Vos deux entrées pour l\' adresse électronique ne correspondent pas. Veuillez réessayer.

 
'; //$('errormessage').innerHTML=str; showError4BT( str ); scroll(0,0); //alert('Credit Card Owner name Field Cannot be left blank'); return false; } if (xmlHttp==null) { alert ("Your browser does not support AJAX"); return false; } str=$('GuestusersEmail').value+","+$('GuestusersCemail').value; var vGuestusersEmail = $('GuestusersEmail').value; str=Base64.encode(str); // Vinod Changed jsforeditview.ctp line # 1366, 1370-1403 var url=SITE_URL_LAN+"user/guestemailvalidation/"+str + "/braintree"; //var retVar = 0; //console.log(url); new Ajax.Request(url, { method: 'get', onSuccess: function(transport) { //alert(transport.responseText); if(transport.responseText == "1" || transport.responseText == 1) { //notice.value = transport.responseText; //$("checkout2").submit(); document.getElementById('payment_method_nonce').value = nonce; $("checkout2").submit(); //$(formname).submit(); // return true; // returning for bt url submit // *** code commented by nikita to implement hosted field method *** // /**var urlGC = SITE_URL_LAN+"shopping/bturl/"; new Ajax.Request(urlGC, { method: 'get', onSuccess: function(transport) { var notice = $('tr_dataID'); //alert(notice.value); notice.value = transport.responseText; //alert(notice.value); $("checkout2").submit(); return true; // returning for bt url submit $(formname).submit(); return true; // returning for bt url submit } });**/ //hosted_field(); document.getElementById("cpaDetail").style.display = 'none'; document.getElementById("cpAccountdisplay").style.display = 'block'; document.getElementById("gustemailid").innerHTML = vGuestusersEmail; document.getElementById("cpAccountinput").style.display = 'none'; document.getElementById("cpAccountinput").innerHTML = vGuestusersEmail; } else { //alert("ERROR of guestemailvalidation"); //alert('correct'); //str = '
 

Il y a eu un problème avec votre saisie:

' + transport.responseText.replace("|","
")+'

 
'; str = transport.responseText.replace("|","
"); //alert(str); showError4BT( str ); jQuery('#GuestusersEmail').focus(); //$('errormessage').innerHTML = str; //alert(str); scroll(0,0); //retVar = 0; return false; } } }); return false; } else { // $("checkout2").submit(); return true; // returning for bt url submit //$(formname).submit(); //return true; // returning for bt url submit //return true; } } function shipping_copy() { if($('ship_copy').checked==true) { $('OrderbillingdetailsFname').value=$('OrderbillingdetailsFname1').value; $('OrderbillingdetailsLname').value=$('OrderbillingdetailsLname1').value; $('OrderbillingdetailsCompany').value=$('OrderbillingdetailsCompany1').value; $('OrderbillingdetailsAddress1').value=$('OrderbillingdetailsAddress11').value; $('OrderbillingdetailsAddress2').value=$('OrderbillingdetailsAddress21').value; $('OrderbillingdetailsCity').value=$('OrderbillingdetailsCity1').value; $('OrderbillingdetailsCountry').value=$('OrderbillingdetailsCountry1').value; $('OrderbillingdetailsState').value=$('OrderbillingdetailsState1').value; $('OrderbillingdetailsZip').value=$('OrderbillingdetailsZip1').value; $('OrderbillingdetailsAddressType').value='shipping'; $('OrderbillingdetailsPhoneNo').value=$('OrderbillingdetailsPhoneNo1').value; } else if($('ship_copy').checked==false) { $('OrderbillingdetailsFname').value=''; $('OrderbillingdetailsLname').value=''; $('OrderbillingdetailsCompany').value=''; $('OrderbillingdetailsAddress1').value=''; $('OrderbillingdetailsAddress2').value=''; $('OrderbillingdetailsCity').value=''; $('OrderbillingdetailsCountry').value=''; $('OrderbillingdetailsState').value=''; $('OrderbillingdetailsZip').value=''; $('OrderbillingdetailsAddressType').value='shipping'; $('OrderbillingdetailsPhoneNo').value=''; } } function licensee_copy() { if($('licens_copy').checked==true) { $('OrderbillingdetailsFnameLicensee').value=$('OrderbillingdetailsFname1').value; $('OrderbillingdetailsLnameLicensee').value=$('OrderbillingdetailsLname1').value; $('OrderbillingdetailsCompanyLicensee').value=$('OrderbillingdetailsCompany1').value; $('OrderbillingdetailsAddress1Licensee').value=$('OrderbillingdetailsAddress11').value; $('OrderbillingdetailsAddress2Licensee').value=$('OrderbillingdetailsAddress21').value; $('OrderbillingdetailsCityLicensee').value=$('OrderbillingdetailsCity1').value; $('OrderbillingdetailsCountryLicensee').value=$('OrderbillingdetailsCountry1').value; $('OrderbillingdetailsStateLicensee').value=$('OrderbillingdetailsState1').value; $('OrderbillingdetailsZipLicensee').value=$('OrderbillingdetailsZip1').value; } else if($('licens_copy').checked==false) { $('OrderbillingdetailsFnameLicensee').value=''; $('OrderbillingdetailsLnameLicensee').value=''; $('OrderbillingdetailsCompanyLicensee').value=''; $('OrderbillingdetailsAddress1Licensee').value=''; $('OrderbillingdetailsAddress2Licensee').value=''; $('OrderbillingdetailsCityLicensee').value=''; $('OrderbillingdetailsCountryLicensee').value=''; $('OrderbillingdetailsStateLicensee').value=''; $('OrderbillingdetailsZipLicensee').value=''; } } function countit(keycode) { var wordLimit = 500; var formcontent=document.getElementById('TellMessage').value; var count=formcontent.length; if(count >499) { alert('You cannot write more then '+wordLimit+' characters!') document.getElementById('TellMessage').value=(formcontent.substr(0,499)) } document.getElementById('totalChar').value=count; return true; } function charcount(keycode) { var wordLimit = 2500; var formcontent=document.getElementById('ContactMessage').value; var count=formcontent.length; if(count >2499) { alert('Please limit your message to '+wordLimit+' characters.') document.getElementById('ContactMessage').value=(formcontent.substr(0,2499)) } //document.getElementById('totalChar').value=count; return true; } function charcount2(keycode) { var wordLimit = 500; var formcontent=document.getElementById('UserAboutme').value; var count=formcontent.length; if(count >499) { alert('You cannot write more then '+wordLimit+' characters!') document.getElementById('UserAboutme').value=(formcontent.substr(0,499)) } //document.getElementById('totalChar').value=count; return true; } function charcount3(keycode) { var wordLimit = 50; var formcontent=document.getElementById('UserCity').value; var count=formcontent.length; if(count >49) { alert('You cannot write more then '+wordLimit+' characters!') document.getElementById('UserCity').value=(formcontent.substr(0,499)) } //document.getElementById('totalChar').value=count; return true; } function charcount4(keycode) { var wordLimit = 50; var formcontent=document.getElementById('UserCountry').value; var count=formcontent.length; if(count >49) { alert('You cannot write more then '+wordLimit+' characters!') document.getElementById('UserCountry').value=(formcontent.substr(0,499)) } //document.getElementById('totalChar').value=count; return true; } function charcount5(keycode) { var wordLimit = 50; var formcontent=document.getElementById('UserForumemail').value; var count=formcontent.length; if(count >49) { alert('You cannot write more then '+wordLimit+' characters!') document.getElementById('UserForumemail').value=(formcontent.substr(0,499)) } //document.getElementById('totalChar').value=count; return true; } function charcountDynamic(elmnt, wl) { var wordLimit = wl; var formcontent=$(elmnt).value; var count=formcontent.length; if(count >wl) { alert('You cannot write more then '+wordLimit+' characters!') $(elmnt).value=(formcontent.substr(0,wl)) } //document.getElementById('totalChar').value=count; return true; } function max_chars_limit(e, limit, ctrl) { if(window.event) // IE { keynum = e.keyCode; } else if(e.which) // Netscape/Firefox/Opera { keynum = e.which; } //alert(keynum); if(keynum == 8 || keynum == 13 || keynum == 27 || keynum == 33 || keynum == 34 || keynum == 35 || keynum == 37 || keynum == 38 || keynum == 39 || keynum == 40 || keynum == 45 || keynum == 46 || keynum == 116 || keynum == 16 || keynum == 17 || keynum == 18 ) { return String.fromCharCode(keynum); } var wordLimit = limit; var formcontent=document.getElementById(ctrl).value; var count=formcontent.length; if(count >limit-1) { alert('You cannot write more then '+wordLimit+' characters!') document.getElementById(ctrl).value=(formcontent.substr(0,limit-1)) return false; } //document.getElementById(ctrl).value=count; return true; } function dimessage(n) { url = SITE_URL+'admin/download_instruction/' + n; jSetButtonLbl("Ok", "Annuler"); jConfirm("Are you sure you want to send 'Download Instruction' email?", 'Confirmation', function(r) { if (r == true) { open_window2(url, 900, 200, 'center'); } else { return false; } }); } function open_window(url,w,h) { var testwindow=window.open (url, "mywindow", "toolbar=1,menubar=1,location=1,status=1,scrollbars=1,width="+w+",height="+h+""); try { testwindow.focus(); testwindow.moveTo(window.screen.availWidth-w,window.screen.availHeight-h); }catch(e){ } } function open_window2(url,w,h, position) { //var testwindow= window.open (url, "mywindow", "toolbar=1,menubar=1,location=1,status=1,scrollbars=1,width="+w+",height="+h+",resizable=1"); var testwindow= window.open (url, "mywindow", "resizable=1, toolbar=1,menubar=1,location=1,status=1,scrollbars=1,width="+w+",height="+h+""); if(position=='rightbottom' || position=='bottomright') { testwindow.moveTo(window.screen.availWidth-w,window.screen.availHeight-h); } else if(position=='center') { try { testwindow.moveTo(window.screen.availWidth/2-w/2,window.screen.availHeight/2-h/2); }catch(e){ } } testwindow.focus(); } function open_window22(url,w,h, position) { var testwindow= window.open (url, "mywindow", "width=800,height=600,toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1"); if(position=='rightbottom' || position=='bottomright') { testwindow.moveTo(window.screen.availWidth-w,window.screen.availHeight-h); } else if(position=='center') { try { testwindow.moveTo(window.screen.availWidth/2-w/2,window.screen.availHeight/2-h/2); }catch(e){ } } } function checkPhotoBuyForm(frm) { var ttl=0; var total_photo_product_chk=$('total_photo_product_chk').value; for(i=1;i<=total_photo_product_chk;i++) { if($('photo_product_chk_'+i)!=null && $('photo_product_chk_'+i).checked == true ) { ttl++; } } if(ttl<=0) { alert('Veuillez sélectionner un produit avant de cliquer sur Ajouter au panier.') return false; } else { return true; } } function birth_day_history(frm) { if (birth_day_history_search != 1) { frm.action = frm.action.replace("month","mn1") frm.action = frm.action.replace("day","dy1") // alert(frm.action) try { $('day').value = ""; $('month').value = ""; } catch (e) { } } } /*******SEARCH VALIDATION********/ function searchterm(t) { if(document.getElementById('q').value=="Search over 583 videos and 81 thousand images." || document.getElementById('q').value=="") { alert("Veuillez saisir les termes de la recherche"); document.getElementById('q').focus(); return false; } else { return true; } } function showhide(url) { if(document.getElementById('zemanta').style.display=='none') { document.getElementById('zemanta').style.display='block'; document.getElementById('more').innerHTML="
  •   Moins
  • "; } else if(document.getElementById('zemanta').style.display=='block') { document.getElementById('zemanta').style.display='none'; document.getElementById('more').innerHTML="
  •   Plus
  • "; } } function showhidelink(url) { if(document.getElementById('zemantalink').style.display=='none') { document.getElementById('zemantalink').style.display='block'; document.getElementById('morelink').innerHTML="
  •   Moins
  • "; } else if(document.getElementById('zemantalink').style.display=='block') { document.getElementById('zemantalink').style.display='none'; document.getElementById('morelink').innerHTML="
  •   Plus
  • "; } } function showhideElement(ctrl, obj) { if($(ctrl).style.display=="") { $(ctrl).style.display = "none"; } else { $(ctrl).style.display = ""; } if(obj != null) { $(ctrl).style.top = parseInt(obj.offsetTop) + 200 + "px"; if(jQuery(obj).width() <768){ $(ctrl).style.left = "0.5%"; } } } function keyPressed(obj, e) { if(e.keycode==46 || e.keycode==8) { obj.value=''; } } function checkDates(biggerObj, smallerObj) { if(document.search.dateRange.checked==true) { bigd=$(biggerObj).value; smalld=$(smallerObj).value; if(isDate(bigd) && isDate(smalld)) { if(bigd=='' || smalld=='') return true; bigd=bigd.split('-') smalld=smalld.split('-') var bigDate=new Date(); var smallDate=new Date(); bigDate.setFullYear(bigd[0],bigd[1],bigd[2]); smallDate.setFullYear(smalld[0],smalld[1],smalld[2]); var today = new Date(); if (smallDate>=bigDate) { }else { alert("End date must be greater tha Start date"); return false; } return true; } else { return false; } } } function isInteger(s) { var i; for (i = 0; i < s.length; i++){ // Check that current character is number. var c = s.charAt(i); if (((c < "0") || (c > "9"))) return false; } // All characters are numbers. return true; } function stripCharsInBag(s, bag) { var i; var returnString = ""; // Search through string's characters one by one. // If character is not in bag, append to returnString. for (i = 0; i < s.length; i++){ var c = s.charAt(i); if (bag.indexOf(c) == -1) returnString += c; } return returnString; } function daysInFebruary (year) { // February has 29 days in any year evenly divisible by four, // EXCEPT for centurial years which are not also divisible by 400. return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 ); } function DaysArray(n) { for (var i = 1; i <= n; i++) { this[i] = 31 if (i==4 || i==6 || i==9 || i==11) {this[i] = 30} if (i==2) {this[i] = 29} } return this } var dtCh= "-"; function isDate(dtStr) { //alert(dtStr); var daysInMonth = DaysArray(12) var pos1=dtStr.indexOf(dtCh) var pos2=dtStr.indexOf(dtCh,pos1+1) var strYear=dtStr.substring(0,pos1) var strMonth=dtStr.substring(pos1+1,pos2) var strDay=dtStr.substring(pos2+1) strYr=strYear //alert(strYear+'-'+strMonth+'-'+strDay); if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1) if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1) for (var i = 1; i <= 3; i++) { if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1) } month=parseInt(strMonth) day=parseInt(strDay) year=parseInt(strYr) if (pos1==-1 || pos2==-1){ alert("The date format should be : yyyy-mm-dd") return false } if (strMonth.length<1 || month<1 || month>12){ alert("Veuillez saisir un mois valide") return false } if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){ alert("Veuillez saisir un jour valide") return false } if (strYear.length != 4 || year==0 ){ alert("Veuillez saisir une année à 4 chiffres valide"); return false } if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){ alert("Veuillez saisir une date valide") return false } return true } function checkme(id,no) { //alert("Befor: id=" + id + "-no=" + no); if(no=='plus') id=parseInt(id)+1; if(no=='minus') id=parseInt(id)-1; //alert("Befor: id=" + id + "-no=" + no); if(document.getElementById('photo_product_chk_'+id)!=null) { if(document.getElementById('photo_product_chk_'+id).checked) { document.getElementById('photo_product_chk_'+id).checked=false; } } } function uncheck_compete(id,no) { //alert("Befor: id=" + id + "-no=" + no); if(no == 'pro') id2 = parseInt(id)+1; if(no == 'personal') id2 = parseInt(id)-1; //alert("Befor: id=" + id + "-no=" + no); if(document.getElementById('photo_product_chk_'+id) != null && document.getElementById('photo_product_chk_'+id2) != null) { if(document.getElementById('photo_product_chk_'+id).checked == true) document.getElementById('photo_product_chk_'+id2).checked = false; } } function submitFedexRateForm(event) { if (event.keyCode==13) { getFedexRates('fedexTotal', SITE_URL_LAN+'shopping/fedexrate/', 'frmFedexRate'); return false; } return false; } function getFlashMovie(movieName) { var isIE = navigator.appName.indexOf("Microsoft") != -1; return (isIE) ? window[movieName] : document[movieName]; } function pauseVideo() { try { if(jwplayer('player3_1').getState() == 'PLAYING') { jwplayer('player3_1').pause(); } }catch (e){} var fplayer = getFlashMovie("flaMovie"); //alert(fplayer); if (fplayer != 'undefined' && fplayer!= null ) { try { fplayer.pausePlayer(); } catch (e) { } } } function playVideo() { try { if(jwplayer('player3_1').getState() == 'PAUSED') { jwplayer('player3_1').play(); } }catch (e){} var fplayer = getFlashMovie("flaMovie"); if (fplayer != 'undefined' && fplayer!= null ) { try { fplayer.playPlayer(); } catch (e) { } } } function call() { $('proText').innerHTML=$('professionalOptions').style.display=='none'?'Click on the "+" button to see Professional Options':'Click on the "-" button to close Professional Options'; } function checkcomment1(id,edit) { if(FCKeditorAPI.GetInstance('comment'+id).GetXHTML()=="") { alert("Please Enter Message"); return false; } else { if(edit==0) url=SITE_URL_LAN+'forums/postcommentsave/0/'+id+'/null/'+base64_encode(FCKeditorAPI.GetInstance('comment'+id).GetXHTML()); else url=SITE_URL_LAN+'forums/postcommentsave/0/'+id+'/'+edit+'/'+base64_encode(FCKeditorAPI.GetInstance('comment'+id).GetXHTML()); //alert(url); custome_updater('test_'+id, url) //new Ajax.Updater('test_'+id,url,{asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'test_'+id]}); //new Ajax.Updater('test_231',url, {asynchronous:true, evalScripts:true, parameters:Form.serialize(Event.element(event).form), requestHeaders:['X-Update', 'test_231']}) return false; } } function base64_encode (data) { // http://kevin.vanzonneveld.net // + original by: Tyler Akins (http://rumkin.com) // + improved by: Bayron Guevara // + improved by: Thunder.m // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Pellentesque Malesuada // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // - depends on: utf8_encode // * example 1: base64_encode('Kevin van Zonneveld'); // * returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA==' // mozilla has this native // - but breaks in 2.0.0.12! //if (typeof this.window['atob'] == 'function') { // return atob(data); //} var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc="", tmp_arr = []; if (!data) { return data; } data = this.utf8_encode(data+''); do { // pack three octets into four hexets o1 = data.charCodeAt(i++); o2 = data.charCodeAt(i++); o3 = data.charCodeAt(i++); bits = o1<<16 | o2<<8 | o3; h1 = bits>>18 & 0x3f; h2 = bits>>12 & 0x3f; h3 = bits>>6 & 0x3f; h4 = bits & 0x3f; // use hexets to index into b64, and append result to encoded string tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); } while (i < data.length); enc = tmp_arr.join(''); switch (data.length % 3) { case 1: enc = enc.slice(0, -2) + '=='; break; case 2: enc = enc.slice(0, -1) + '='; break; } return enc; } function utf8_encode ( argString ) { // http://kevin.vanzonneveld.net // + original by: Webtoolkit.info (http://www.webtoolkit.info/) // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: sowberry // + tweaked by: Jack // + bugfixed by: Onno Marsman // + improved by: Yves Sucaet // + bugfixed by: Onno Marsman // * example 1: utf8_encode('Kevin van Zonneveld'); // * returns 1: 'Kevin van Zonneveld' var string = (argString+'').replace(/\r\n/g, "\n").replace(/\r/g, "\n"); var utftext = ""; var start, end; var stringl = 0; start = end = 0; stringl = string.length; for (var n = 0; n < stringl; n++) { var c1 = string.charCodeAt(n); var enc = null; if (c1 < 128) { end++; } else if (c1 > 127 && c1 < 2048) { enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128); } else { enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128); } if (enc !== null) { if (end > start) { utftext += string.substring(start, end); } utftext += enc; start = end = n+1; } } if (end > start) { utftext += string.substring(start, string.length); } return utftext; } function catchevent(event,formname) { if(event.keyCode==13) { submitForm(formname); } } function lightIE8(event,formname, action) { //alert(detect) place = detect.indexOf('msie') //alert(place) if(place>=0) { if(event.keyCode==13) { new Ajax.Updater('login',SITE_URL_LAN+'user/'+action, {asynchronous:true, evalScripts:true, parameters:Form.serialize(Event.element(event).form), requestHeaders:['X-Update', 'login']}); } } } /////// T H E S E F U N C T I O N S A R E F O R S H I P P I N G S E R V I C E S \\\\\\\\\\ function onmiceout(ths) { if($(ths).title!='1'){ $(ths).className = 'miceOut'; } return true; } function onmicemove(ths) { var dmarr = $$('miceMove') var cntr=0; for(i=0;i1)) { $(dmarr[i]).className = 'miceOut'; }else{cntr++;} } $(ths).className = 'miceMove'; return true; } function onmiceclick(ths) { var dmarr = $$('div[title="1"]') for(i=0;i=0) { $('temp').value = 1; }else{ $('temp').value = 0; } } function stpxession(sessionvar, sessionval) { setunsetphpsession(sessionvar, sessionval); } function setunsetphpsession(sessionvar, sessionval) { var args = ""; var f = "setunsetsession"; args+=sessionvar+"|"; args+=sessionval+"|"; args=Base64.encode(args); f=Base64.encode(f); var str=f+"__"+args; url = SITE_URL_LAN+'shopping/wrapperF/'+str; //alert(url); //var url=SITE_URL_LAN+'user/setunsetphpsession/?sessionvar='+sessionvar+"&sessionval="+sessionval; url=SITE_URL_LAN+'shopping/wrapperF/'+str; new Ajax.Updater( "", url, {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', ""]} ); } function _body_onload() { setScrollInIE(); turnAutocompleteOff(); loff(); var std_context = 'login_up'; SetHelpPrefix(''); SetContext(std_context, ''); //setFocus(); try { if (top && top.leftFrame) { SetExpandLeftFrame(); } } catch (e) { } } function _body_resize() { setScrollInIE(); lresize(); } function _body_onunload() { lon(); } function preloader() { str='

    loading...Veuillez patienter pendant le chargement

    '; return str; } function updateuspsfree() { $('uspsfree').innerHTML="test"; } var opt_no_frames = false; var opt_integrated_mode = false; var videoplay=false; function hello(val) { videoplay=val; } function setText(ctrl, str) { if((typeof( ctrl ) == "string" ) ) { var obj = $(ctrl); } else { var obj = ctrl; } try{ if (obj.value == str) { obj.value = ""; } } catch(e){} } function removeText(ctrl, str) { if((typeof( ctrl ) == "string" ) ) { var obj = $(ctrl); } else { var obj = ctrl; } if (obj.value == "") { obj.value = str; } } function submitForm1(frm) { //var frm; if((typeof( frm ) == "string" ) ) { frm = $(frm); } else { frm = frm; } frm.submit(); } function loadAmazonCloud() { var args=""; var f="loadAmazonCloud"; args+="0|0|0|"; args=Base64.encode(args); f=Base64.encode(f); var str=f+"__"+args; url=SITE_URL_LAN+'products/wrapperF/'+str; custome_updater("amazon", url); } function OnUrlChange2(elmnt) { var oRegex = new Object() ; oRegex.UriProtocol = /^(((http|https|ftp|news):\/\/)|mailto:)/gi ; oRegex.UrlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/gi ; oRegex.UrlOnChangeTestOther = /^((javascript:)|[#\/\.])/gi ; oRegex.ReserveTarget = /^_(blank|self|top|parent)$/i ; oRegex.PopupUri = /^javascript:void\(\s*window.open\(\s*'([^']+)'\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*\)\s*$/ ; // Accessible popups oRegex.OnClickPopup = /^\s*on[cC]lick="\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*"$/ ; oRegex.PopupFeatures = /(?:^|,)([^=]+)=(\d+|yes|no)/gi ; var sUrl = $(elmnt).value ; var sProtocol = oRegex.UrlOnChangeProtocol.exec( sUrl ) ; if ( sProtocol ) { sUrl = sUrl.substr( sProtocol[0].length ) ; $(elmnt).value = sUrl ; } } function submitCCListForm(vl) { if(vl.value == -11 ) { window.location.href = SITE_URL_LAN + "user/add_cc"; } else if(vl.value == 0 ) { window.location.href = SITE_URL_LAN + "user/ccinfo"; } else { window.location.href = SITE_URL_LAN + "user/edit_cc/" + vl.value; } }; //--> /** JQUERY CODE**/ if(jQuery != null) { var total_images_in_current_lightbox = 0; var total_videos_in_current_lightbox = 0; var notification_timeout = null; var track_notes_changes = 0; var hover_delay = 1000; var cTimer = 0; /* Timer variable to control the Hover Delay of left floating menu "Menu1"*/ var cShowOverlay = 0; /* Variable to control visibility of the Popup division */ var tmpObj = null; /* Temporary object to represent the current Hoverd Anchor element of the left floating menu "Menu1"*/ jQuery(document).ready(function($) { jQuery('body').append('
    '); jQuery('body').append('
    '); jQuery('body').append('
    '); open_add_to_lightbox(); check_all_checkboxes_bindings(); lightbox_addtocart_bindings(); track_notes_changes_bindings(); jToolTip(); magnify_jq_bindings(); //bindHideTip(); jQuery(".btnCancel").click(function($){ jQuery(".lightboxes_div").slideUp(200); }); jQuery(".lblSelAll").click(function($){ if(jQuery(jQuery(this).parent().find(".checkbox_main")).is(':checked')) { jQuery(this).parent().find(".checkbox_main").attr("checked", false); jQuery(".checkbox_child").attr("checked", false); } else { jQuery(this).parent().find(".checkbox_main").attr("checked", true); jQuery(".checkbox_child").attr("checked", true); } }); }); var keep_magnify = 0; function magnify_jq_bindings() { jQuery(".magnify_jq").unbind(); //jQuery(".magnify_jq").each(function($){ jQuery(".magnify_jq").hover(function() { var i=0; for(i=1;i<=imagePageTotal;i++) { if(jQuery('#largeImage'+i) == null ) return; jQuery('#largeImage'+i).hide(); } keep_magnify = 1; var rel = jQuery(this).attr("rel"); var obj = this; jQuery(rel).css("top",parseInt(jQuery(obj).offset().top - 10 ) + "px"); jQuery(rel).css("left",parseInt(jQuery(obj).offset().left - 10 ) + "px"); jQuery(rel).show(); }, function() { var rel = jQuery(this).attr("rel"); console.log("keep_magnify = " + keep_magnify) jQuery(rel).hide(); }); //}); jQuery(".magnify_child_jq").hover(function() { jQuery(this).show(); }, function() { jQuery(this).hide(); }); jQuery(".magnify_button_jq").hover(function() { //console.log("keep_magnify2 = " + keep_magnify) var rel = jQuery(this).closest(".magnify_child_jq"); }); } function track_notes_changes_bindings() { jQuery(".tAreaLong").unbind(); jQuery(this).each(function($){ jQuery(this).change(function($){ track_notes_changes = 1; }); }); } function lightbox_addtocart_bindings() { jQuery(".lightbox_addtocart").unbind(); jQuery(".lightbox_addtocart").each(function($){ jQuery(this).click(function($){ total_videos_in_current_lightbox = 0; total_images_in_current_lightbox = 0; var total_checked_items = 0; var video_item_ids = ""; var image_item_ids = ""; jQuery(".checkbox_child").each(function($) { //alert(jQuery(this).attr("checked")) if(jQuery(this).attr("checked") == 'checked') { //alert(jQuery("#item_type_" + jQuery(this).attr("value")).val()); if(jQuery("#item_type_" + jQuery(this).attr("value")).val() == 'video' ) { //alert("#item_type_" + jQuery(this).attr("value")); total_videos_in_current_lightbox++; if(jQuery.trim(video_item_ids) != "" ) video_item_ids = video_item_ids + ","; video_item_ids += jQuery(this).attr("value"); //console.log(jQuery(this).attr("value")); } else { total_images_in_current_lightbox++; if(jQuery.trim(image_item_ids) != "" ) image_item_ids = image_item_ids + "," ; image_item_ids += jQuery(this).attr("value"); //console.log(jQuery(this).attr("value")); } total_checked_items++; } }); video_item_ids = Base64.encode(video_item_ids); image_item_ids = Base64.encode(image_item_ids); //alert(total_images_in_current_lightbox + "-" + total_videos_in_current_lightbox); item_types = ''; var mthd = ''; if(total_images_in_current_lightbox > 0 && total_videos_in_current_lightbox > 0) { item_types = 'both'; mthd = 'videobuydetails_new'; } if(total_images_in_current_lightbox <= 0 && total_videos_in_current_lightbox > 0) { item_types = 'videos'; mthd = 'videobuydetails_new'; } if(total_images_in_current_lightbox > 0 && total_videos_in_current_lightbox <= 0) { item_types = 'images'; mthd = 'photobuydetails_new'; } if(total_checked_items >0 ) { if(mthd != '') { url = SITE_URL_LAN + "products/"+mthd+"/?item_type=" + item_types + "&video_items=" + video_item_ids + "&image_items=" + image_item_ids; //alert(url); Modalbox.show(url, {title: "", width: 890}); return false; } } else { alert("Veuillez d'abord sélectionner un ou des articles à l'aide des cases à cocher à gauche."); } return false; }); }); return false; } function load_saved_lightboxes_for_lightbox(obj) { var total_checked_items = 0; var item_ids = ""; jQuery(".checkbox_child").each(function($){ //if(jQuery(this).is(':checked')) if(jQuery(this).attr("checked") == 'checked') { if(jQuery.trim(item_ids) != "" ) item_ids = item_ids + "," ; total_checked_items++; item_ids += jQuery(this).attr("value"); } }); item_ids = Base64.encode(item_ids); if(total_checked_items >0 ) { var current_view_lightbox_id = parseInt(jQuery("#curr_lightbox_view_id").val()); jQuery.ajax( { url: SITE_URL_LAN + "lightbox/small_addto_lightbox?multiple_items=" + item_ids + "¤t_view_lightbox_id="+current_view_lightbox_id, success: function(response) { jQuery('.lightboxes_div').html(response); jQuery(".lightboxes_div").css("top",parseInt(jQuery(obj).offset().top - jQuery(obj).height() - 210) + "px"); jQuery(".lightboxes_div").css("left",parseInt(jQuery(obj).offset().left + jQuery(obj).width() - 175 ) + "px"); jQuery('.lightboxes_div').show(); isBoxSet = 0; lastItem = obj; small_create_new_lightbox_bindings(); } }); } else { alert("Veuillez d'abord sélectionner un ou des articles à l'aide des cases à cocher à gauche."); } return false; } function get_any_fade_message(gUrl) { if(typeof(gUrl) == 'undefined') { gUrl = SITE_URL_LAN + "lightbox/get_any_fade_message"; } jQuery.ajax( { url: gUrl, cache:false, success: function(response) { eval('data = ' + response); if(jQuery.trim(data.msg) != "") { keep_show_notification( data.msg ); } } }); } function submit_lightbox_form(act) { var total_items = 0; var total_checked_items = 0; jQuery(".checkbox_child").each(function($){ total_items++; if(jQuery(this).attr("checked") == 'checked') { total_checked_items++; } }); if(total_checked_items <= 0 && act != 'savenotes') { alert("Veuillez d'abord sélectionner un ou des articles à l'aide des cases à cocher à gauche."); return false; } if(act == 'delete') { var del_items = total_checked_items; var user_msg_some_items = "Êtes-vous sûr de vouloir supprimer "+del_items+" articles de la visionneuse?"; var user_msg_all_items = "Êtes-vous sûr de vouloir supprimer tous les articles de la visionneuse?"; var user_msg_display = user_msg_some_items; if(total_items == total_checked_items){ del_items = 'tous'; user_msg_display = user_msg_all_items; } jSetButtonLbl("Ok", "Annuler"); jConfirm(user_msg_display, 'Confirmation', function(r) { if (r == true) { if(act == 'savenotes') { window.onbeforeunload = null; } jQuery(".lightbox_submit_action").val(act); jQuery('#lightbox').submit(); } else { return false; } }); } else { if(act == 'savenotes') { window.onbeforeunload = null; } jQuery(".lightbox_submit_action").val(act); jQuery('#lightbox').submit(); } } function submit_guestlightbox_form(act) { var total_items = 0; var total_checked_items = 0; jQuery(".checkbox_child").each(function($){ total_items++; if(jQuery(this).attr("checked") == 'checked') { total_checked_items++; } }); if(total_checked_items <= 0 ) { alert("Veuillez d'abord sélectionner un ou des articles à l'aide des cases à cocher à gauche."); return false; } if(act == 'delete') { var del_items = total_checked_items; var user_msg_some_items = "Êtes-vous sûr de vouloir supprimer "+del_items+" articles de la visionneuse?"; var user_msg_all_items = "Êtes-vous sûr de vouloir supprimer tous les articles de la visionneuse?"; var user_msg_display = user_msg_some_items; if(total_items == total_checked_items){ del_items = 'all'; user_msg_display = user_msg_all_items; } jSetButtonLbl("Ok", "Annuler"); jConfirm(user_msg_display, 'Confirmation', function(r) { if (r == true) { jQuery(".lightbox_submit_action").val(act); jQuery('#lightbox').submit(); } else { return false; } }); } else { jQuery(".lightbox_submit_action").val(act); jQuery('#lightbox').submit(); } } function load_saved_lightboxes(obj, rel) { jQuery("#loader0").css("top",parseInt(jQuery(obj).offset().top - jQuery(obj).height() - 125 ) + "px"); jQuery("#loader0").show(); eval(rel); var item_type = options.item_type; var master_asset_number= options.master_asset_number; var audience = options.audience; if(item_type == 'image') { var image_number = options.image_number; } else { var image_number = 0; audience = 'KP'; } if(item_type != 'image' && item_type != 'video') { return false; } isBoxSet = 0; jQuery.ajax( { url: SITE_URL_LAN + "lightbox/small_addto_lightbox?item_type=" + item_type + "&image_number=" + image_number + "&master_asset_number=" + master_asset_number+ "&audience=" + audience, success: function(response) { jQuery("#loader0").hide(); jQuery('.lightboxes_div').html(response); jQuery(".lightboxes_div").css("width",'275px'); if(audience == 'KP' || language_code != 'en' ) { jQuery(".adSeprator").css("width",'256px'); } else { //jQuery(".lightboxes_div").css("width",'579px'); } jQuery(".lightboxes_div").css("top",parseInt(jQuery(obj).offset().top - jQuery(obj).height() - 125 ) + "px"); jQuery(".lightboxes_div").css("left",parseInt(jQuery(obj).offset().left + jQuery(obj).width() - 150 ) + "px"); jQuery('.lightboxes_div').show(); small_create_new_lightbox_bindings(); } }); return false; } function jToolTip() { jQuery('.jToolTip_js').each(function(){ jQuery(this).hover(function(){ cTimer = setTimeout(c, hover_delay); cShowOverlay = 1; tmpObj = this; function c() { if(cShowOverlay == 1) { var rel = jQuery(tmpObj).attr("rel"); jQuery('.jToolTipDiv').html(jQuery(rel).html()); jQuery(".jToolTipDiv").css("top",parseInt(jQuery(tmpObj).offset().top - (jQuery('.jToolTipDiv').height()/2) ) + 150 + "px"); jQuery(".jToolTipDiv").css("left",parseInt(jQuery(tmpObj).offset().left - (jQuery(rel).width() / 2)-info_offset ) + "px"); jQuery('.jToolTipDiv').css('width','710px'); jQuery('.jToolTipDiv').show(); bindHideTip(); } } },function(){ cShowOverlay = 0; jQuery('.jToolTipDiv').hide(); }); try{ jQuery(this).touchstart(function(){ cTimer = setTimeout(c, hover_delay); cShowOverlay = 1; tmpObj = this; function c() { if(cShowOverlay == 1) { var rel = jQuery(tmpObj).attr("rel"); jQuery('.jToolTipDiv').html(jQuery(rel).html()); jQuery(".jToolTipDiv").css("top",parseInt(jQuery(tmpObj).offset().top - (jQuery('.jToolTipDiv').height()/2) ) + 150 + "px"); jQuery(".jToolTipDiv").css("left",parseInt(jQuery(tmpObj).offset().left - (jQuery(rel).width() / 2) ) + "px"); jQuery('.jToolTipDiv').show(); bindHideTip(); } } },function(){ cShowOverlay = 0; jQuery('.jToolTipDiv').hide(); }); }catch(e){ } }); jQuery('.jToolTipDiv').each(function(){ jQuery(this).hover(function(){ jQuery('.jToolTipDiv').show(); },function(){ jQuery('.jToolTipDiv').hide(); }); }); } function load_guest_lightboxes(obj, rel) { jQuery('#loader0').show(); eval(rel); var item_type = options.item_type; var master_asset_number= options.master_asset_number; var audience = options.audience; //console.log(audience); if(item_type == 'image') { var image_number = options.image_number; } else { var image_number = 0; } if(item_type != 'image' && item_type != 'video') { return false; } jQuery.ajax( { url: SITE_URL_LAN + "lightbox/addto_guestlightbox?item_type=" + item_type + "&image_number=" + image_number + "&master_asset_number=" + master_asset_number+ "&audience=" + audience, success: function(response) { jQuery('#loader0').hide(); show_notification(response); } }); return false; } /** added by nikita **/ function load_guest_lightboxes_new(obj, rel) { jQuery('#loader0').show(); eval(rel); var item_type = options.item_type; var master_asset_number= options.master_asset_number; var audience = options.audience; //console.log(options); if(item_type == 'image') { var image_number = options.image_number; } else { var image_number = 0; } if(item_type != 'image' && item_type != 'video') { return false; } jQuery.ajax( { url: SITE_URL_LAN + "lightbox/small_addto_lightbox_guest?item_type=" + item_type + "&image_number=" + image_number + "&master_asset_number=" + master_asset_number+ "&audience=" + audience, success: function(response) { jQuery("#loader0").hide(); jQuery('.lightboxes_div').html(response); jQuery(".lightboxes_div").css("top",parseInt(jQuery(obj).offset().top - jQuery(obj).height() - 125 ) + "px"); jQuery(".lightboxes_div").css("left",parseInt(jQuery(obj).offset().left + jQuery(obj).width() - 150 ) + "px"); jQuery('.lightboxes_div').show(); } }); return false; } /** function guestlight box ends here **/ /** function to add to lightbox for guest users**/ function guest_users_lightbox() { // added by nikita for inner button jQuery(".add_to_guestlightbox_inner").unbind(); jQuery(".add_to_guestlightbox_inner").each(function($){ jQuery(this).click(function($){ //console.log('nikita'); load_guest_lightboxes(this, jQuery(this).attr("rel")) return false; }); }); } function open_add_to_lightbox() { jQuery(".add_to_lightbox").unbind(); jQuery(".add_to_lightbox").each(function($){ isBoxSet = 0; jQuery(this).click(function($){ load_saved_lightboxes(this, jQuery(this).attr("rel")) return false; }); }); jQuery(".add_to_guestlightbox").unbind(); jQuery(".add_to_guestlightbox").each(function($){ jQuery(this).click(function($){ var relattr = jQuery(this).attr("rel"); eval(jQuery(this).attr("rel")); var audience = options.audience; var imageType = options.item_type; if(audience == 'OK' && imageType == 'image') { //load_guest_lightboxes_new(this, relattr) load_guest_lightboxes(this, relattr) } else { load_guest_lightboxes(this, relattr) } return false; }); }); jQuery(".add_to_different_lightbox").unbind(); jQuery(".add_to_different_lightbox").each(function($){ jQuery(this).click(function($){ load_saved_lightboxes_for_lightbox(this) return false; }); }); return false; } var isBoxSet = 1; function small_create_new_lightbox_bindings() { /* jQuery(".small_create_new_lightbox").toggle(function(){ jQuery(this).parent().addClass("upCNLB"); jQuery(".saved_lightbox_form_buttons").hide(); jQuery(jQuery(this).attr("rel")).slideDown(200,function(){jQuery("#lightboxesName").focus()}); jQuery(".small_create_new_lightbox").html('Créer une visionneuse'); },function(){ jQuery(".saved_lightbox_form_buttons").show(); jQuery(this).parent().removeClass("upCNLB"); jQuery(jQuery(this).attr("rel")).slideUp(200); jQuery(".small_create_new_lightbox").html('Créer une visionneuse'); }); */ if(isBoxSet == 0){ jQuery(".small_create_new_lightbox").unbind(); jQuery(".small_create_new_lightbox").click(function (){ if(jQuery(".small_create_new_lightbox_div").css("display") == "none"){ jQuery(this).parent().addClass("upCNLB"); jQuery(".saved_lightbox_form_buttons").hide(); jQuery(jQuery(this).attr("rel")).slideDown(200,function(){jQuery("#lightboxesName").focus()}); jQuery(".small_create_new_lightbox").html('Créer une visionneuse'); }else{ jQuery(".saved_lightbox_form_buttons").show(); jQuery(this).parent().removeClass("upCNLB"); jQuery(jQuery(this).attr("rel")).slideUp(200); jQuery(".small_create_new_lightbox").html('Créer une visionneuse'); } }); isBoxSet = 1; } return false; } function check_all_checkboxes_bindings() { jQuery("input.checkbox_main").click(function() { if(jQuery(this).is(':checked')) { jQuery(".checkbox_child").prop("checked",true); jQuery(".checkbox_child").attr("checked",true); } else { jQuery(".checkbox_child").prop("checked",false); jQuery(".checkbox_child").attr("checked",false); } }); jQuery(".checkbox_child").each(function($){ jQuery(this).click(function($){ if(jQuery(this).is(':checked')) { jQuery(this).attr("checked",true); } else { jQuery(this).attr("checked",false); } }); }); } function show_notification(message) { //jQuery("html, body").animate({ scrollTop: 0 }, "slow"); var left = parseInt( (jQuery(window).width() / 2) - (jQuery(".lightboxes_notifications").width() / 2) ); jQuery(".lightboxes_notifications").css("left",parseInt( left ) + "px"); clearTimeout(notification_timeout); jQuery(".lightboxes_notifications").find(".notification_detail").html(message); jQuery(".lightboxes_notifications").fadeIn('slow'); notification_timeout = setTimeout(hide_notification, 4000); jQuery(".lightboxes_div").hide(); } function keep_show_notification(message) { var left = parseInt( (jQuery(window).width() / 2) - (jQuery(".lightboxes_notifications").width() / 2) ); jQuery(".lightboxes_notifications").css("left",parseInt( left ) + "px"); clearTimeout(notification_timeout); jQuery(".lightboxes_notifications").find(".notification_detail").html(message); jQuery(".lightboxes_notifications").fadeIn('slow'); notification_timeout = setTimeout(hide_notification, 4000); } function hide_notification() { jQuery(".lightboxes_notifications").fadeOut('slow'); } function make_api_call(params, callback_mehtod) { var param_str = ""; for (var i = 2; i < arguments.length; ++i) { param_str += ", '"+ arguments[i]+"' "; } //alert(params.url) //alert(callback_mehtod) var url = params.url; jQuery.ajax({ url: url, type: "POST", data: params.data, dataType: 'html', complete: function(jqXHR, textStatus ) { //console.log(textStatus); jQuery("#loader5").hide(); }, success : function( data, textStatus, jqXHR ) { if (typeof(callback_mehtod) != "undefined") { eval(callback_mehtod + "(data, jqXHR "+param_str+")"); } }, error : function( jqXHR, textStatus, errorThrown) { }, crossDomain: false /// IMPORTANT IMPORTANT IMPORTANT Please dont make this true because true is not working in IE browsers. }); } function make_api_call_simple(params, callback_mehtod) { var param_str = ""; for (var i = 2; i < arguments.length; ++i) { param_str += ", '"+ arguments[i]+"' "; } //alert(params.url) //alert(callback_mehtod) var url = params.url; jQuery.ajax({ url: url, type: "POST", data: params.data, //dataType: 'json', complete: function(jqXHR, textStatus ) { jQuery("#loader5").hide(); }, success : function( data, textStatus, jqXHR ) { jQuery("#loader5").hide(); if (typeof(callback_mehtod) != "undefined") { eval(callback_mehtod+"(data, jqXHR "+param_str+")"); } }, error : function( jqXHR, textStatus, errorThrown){ jQuery("#loader5").hide(); alert(textStatus) }, crossDomain: false /// IMPORTANT IMPORTANT IMPORTANT Please dont make this true because true is not working in IE browsers. }) } } /** JQUERY CODE**/ function ajax_submitform(url, form_object, call_back, update_element) { jQuery("#loader5").show(); params = new Object(); params.url = url; params.data = jQuery(form_object).serialize(); make_api_call_simple(params, call_back); } function small_addto_lightbox_callback(result, textStatus, errorThrown) { if (typeof(result) != "undefined") { if (result != "") { jQuery('.lightboxes_div').html(result); } } } function lightboxlogin_submitform(url) { jQuery("#loader5").show(); params = new Object(); params.url = url; params.data = jQuery("#frmList").serialize(); make_api_call(params, "lightboxlogin_submitform_login_done"); } function lightboxlogin_submitform_login_done(data, jqXHR) { jQuery("#loader5").hide(); jQuery("#login").html(data); } function lightboxlogin_new_submitform(url) { jQuery("#loader5").show(); params = new Object(); params.url = url; params.data = jQuery("#frmList").serialize(); make_api_call(params, "lightboxlogin_new_submitform_login_done"); } function lightboxlogin_new_submitform_login_done(data, jqXHR) { jQuery("#loader5").hide(); var data = jQuery.parseJSON(data) if(data.status == "failed") { var html = '
    \
    \
    \
     
    \
    \
    \
    \

    '+data.error_msg_heading+':

    \

    '; html += data.error; html += '

    \
    \
    \
    \
     
    \
    \
    \
    '; jQuery("#error_report").html(html); } else { console.log(data); window.location.href = data.url; } } function lightboxTellFriend(form_id) { jQuery("#loader5").show(); params = new Object(); params.url = jQuery("#"+form_id).attr('action'); params.data = jQuery("#"+form_id).serialize(); make_api_call_simple(params, "updatelightboxTellFriend"); } function updatelightboxTellFriend(data, jqXHR) { jQuery("#loader5").hide(); jQuery("#tell").html(data); //alert(data); } // added by ajit for admin search form submit function SearchFormSubmit(frmid,obj) { var link_href = obj.attributes["href"].nodeValue; link_href = link_href.replace("/en/","/"); document.getElementById(frmid).action = link_href; document.getElementById(frmid).submit(); return false; } function lbCorrectionForm(url) { jQuery("#loader5").show(); params = new Object(); params.url = url; params.data = jQuery("#correctionFrm").serialize(); make_api_call(params, "lbCorrectionFormCallBack"); } function lbCorrectionFormCallBack(data, jqXHR) { jQuery("#loader5").hide(); var data = jQuery.parseJSON(data) if(data.status == "failed") { jQuery(".jscorrectionSuccessbox").hide(); jQuery(".jscorrectionErrorbox").show(); javascript: window.scrollTo(0,0); var html_error = ''; jQuery.each( jQuery.parseJSON(data.error_message), function( key, val ){ html_error += "

    "+val+"

    "; }); jQuery("#jscorrection_error").html(html_error); } else { jQuery(".jscorrectionErrorbox").hide(); jQuery("#correctionFormBlock").hide(); jQuery(".jscorrectionSuccessbox").show(); window.scrollTo(0,0); window.scrollTop = 0 Modalbox.resizeToContent(); jQuery(".jscorrection_success p").html(data.success_message); } } var HFMessageCard = ''; var HFMessageDate = ''; var HFMessageCVV = ''; var HFMessageOwner = ''; function showError4BT (msg) { //msg = ''; if(HFMessageCard != '') { msg = msg + HFMessageCard; } if(msg != '') { msg = msg + '
    '; } if(HFMessageDate != '') { msg = msg + HFMessageDate; } if(msg != '') { msg = msg + '
    '; } if(HFMessageCVV != '') { msg = msg + HFMessageCVV; } if(msg != '') { msg = msg + '
    '; } if(HFMessageOwner != '') { msg = msg + HFMessageOwner; } if(msg != '') { msg = msg + '
    '; } //alert(msg); //console.log(msg); if(msg != '' && msg != null ) { var errHTML = '
    \
    \
    \
     
    \
    \
    \
    \

    Il y a eu un problème avec votre saisie.

    '; errHTML += '

    '; errHTML += msg ; errHTML += '

    '; errHTML += '
    \
    \
    \
     
    \
    \
    \
    '; jQuery("#errormessage").html(""); jQuery("#errormessage").show(); jQuery("#errormessage").html(errHTML); } else { hideError4BT(); } } function hideError4BT ( ) { jQuery("#errormessage").html(""); jQuery("#errormessage").hide(); } function BTHFValidate(event) { var msg = ''; var ownermsg; if(jQuery('#UsercreditcardsCcOwner').length > 0) { ownermsg = document.getElementById('UsercreditcardsCcOwner').value; } if(!event.isValid && (!event.isPotentiallyValid || event.card == null) ) { if(ownermsg=='') { HFMessageOwner = 'Le champ Nom du titulaire de la carte doit être renseigné.'; jQuery('#UsercreditcardsCcOwner').css('border-color', '#D0041D'); } //console.log(event); if (event.target.fieldKey == "expirationDate" ) { HFMessageDate = "Veuillez saisir une date d'expiration valide."; //showError4BT(); } if (event.target.fieldKey == "number" ) { HFMessageCard = "Veuillez saisir un numéro de carte de crédit valide."; //showError4BT('Please enter a valid credit card number.'); } if (event.target.fieldKey == "cvv" ) { HFMessageCVV = "Veuillez saisir un code de sécurité pour la carte valide."; //showError4BT('Please enter a valid cvv number.'); } showError4BT(msg); } else if(event.isValid) { if (event.target.fieldKey == "expirationDate" ) { HFMessageDate = ''; } if (event.target.fieldKey == "number" ) { HFMessageCard = ''; } if (event.target.fieldKey == "cvv" ) { HFMessageCVV = ''; } //var msg = ''; showError4BT(msg); } if(jQuery('#UsercreditcardsCcOwner').length > 0){ if(document.getElementById('UsercreditcardsCcOwner').value!='') { HFMessageOwner = ''; showError4BT(msg); }} } function hideTip(){ jQuery('.jToolTipDiv').hide(); } function bindHideTip(){ jQuery('.close-jtip').bind( "click touchend", function(e) { setTimeout(function (){ hideTip(); }, 300); //e.stopPropagation(); //return false; }); } var verifyCallback = function(response) { jQuery('').attr({ type: 'hidden', id: 'grcVResponse', name: 'grcVResponse' }).prependTo('#gReCaptchaDiv'); jQuery('#gReCaptchaDiv').closest("form").find(':submit').removeAttr("disabled"); //console.log(response); }; var onloadCallbackAuto = function() { //console.log("...onloadCallbackAuto calling ...."); onloadCallback(); } var onloadCallback = function() { if( typeof grecaptcha == 'undefined' || grecaptcha == undefined) { //console.log("...grecaptcha is undefined loading api.js...."); jQuery.ajax({ url: 'https://www.google.com/recaptcha/api.js?onload=onloadCallback', dataType: "script", success: onloadCallback }); } else { if ( jQuery('#gReCaptchaDiv').length ) { //console.log("...all looks good rendering grecaptcha...."); jQuery('#gReCaptchaDiv').html(""); grecaptcha.render('gReCaptchaDiv', { 'sitekey' : '6LcRoCsUAAAAAHUvgqiT_ppfYYI7CUT_-oUM2rYj', 'callback' : verifyCallback, //'data-size' : 'compact', //'data-type' : 'image', 'theme' : 'light' }); } else { //console.log("...gReCaptchaDiv is missing...."); } return false; } };