catwalk_speed=0;catwalk_shift_interval=0;catwalk_speed_limit=7;function catwalk_over(event,idTable){catwalk_shift_interval=setInterval(« catwalk_shift(‘ »+idTable+ »‘) »,10);}
function catwalk_move(event,idContainer,idLeft,idRight,idTable){var el=event.srcElement;if(!el){el=event.target;}
var offsetCount=0;while(el.id!=idContainer){offsetCount+=el.offsetLeft;el=el.parentNode;}
var mouseX=event.offsetX+offsetCount;if(typeof event.offsetX== »undefined »){if(event.target.id.match(idLeft)){mouseX=event.layerX;}else{if(event.target.id.match(idRight)){mouseX=event.layerX;}else{mouseX=event.layerX+parseInt(document.getElementById(idTable).offsetLeft)+40;}}}
catwalk_speed=(mouseX-(487/2))/(487/2)*10;if(catwalk_speed>catwalk_speed_limit)catwalk_speed=catwalk_speed_limit;}
function catwalk_out(){clearInterval(catwalk_shift_interval);}
function catwalk_shift(idTable){var actual_speed=Math.abs(catwalk_speed)-2;if(actual_speed<0)actual_speed=0;if(catwalk_speed=0&&actual_speed<0){return;}
if(parseInt(mytable.offsetLeft)0){return;}
mytable.style.left=(parseInt(mytable.offsetLeft)-actual_speed)+ »px »;}}
catwalk_shift_interval_consultes=0;
function catwalk_over_consultes(event,idTable)
{
catwalk_shift_interval_consultes=setInterval(« catwalk_shift(‘ »+idTable+ »‘) »,10);
}
function catwalk_out_consultes(){clearInterval(catwalk_shift_interval_consultes);}
// Clic sur le bouton échanger
function loadPrime(pid,prime)
{
new Ajax.Request(
« ajax.php?page=fa »,
{
method: ‘get’,
parameters: {action:’loadPrime’,pid:pid,prime:prime},
onSuccess: function()
{
$(‘cart_quantity’).submit();
}
}
);
}
// Mise à jour du prix à la sélection d’une option
function updateFaPrice()
{
if($j(‘#fa_price’) != null)
{
$j.post(« ajax.php?page=fa »,{action:’updatePrice’,data:$(‘cart_quantity’).serialize(),pecotax:’0.0000′},function(data)
{
$j(‘#fa_price’).html(data);
}).complete(function()
{
$j(‘#mb_panier’).data(‘priceLock’,false);
});
}
}
// Mise à jour du stock
function updateFaStock()
{
if($j(‘#fa_stock’) != null)
{
$j.post(« ajax.php?page=fa »,{action:’updateStock’,data:$(‘cart_quantity’).serialize()},function(data)
{
$j(‘#fa_stock’).html(data);
// Mise à jour des options selon la quantité (pour les prix dégressifs)
function updateFaOptions()
{
if($j(‘#fa_options’).length>0)
{
$j(‘#mb_panier’).data(‘priceLock’,true);
$j(‘#mb_panier’).data(‘stockLock’,true);
$j(‘#fa_options’).load(« ajax.php?page=fa »,{action:’updateOptions’,data:$(‘cart_quantity’).serialize()},function()
{
updateFaPrice();
updateFaStock();
});
}
}
function load_onglet(onglet,pid)
{
var tt = $$(‘td.oda-onglet’);
tt.each( function(c) { c.className = ‘oda-onglet’; });
$(‘oda-‘+onglet).className = ‘oda-onglet oda-onglet-hover’;
// favicon
var css=Builder.node(« link »,{href: »template/images/favicon.ico »,rel:’SHORTCUT ICON’});$$(‘head’)[0].appendChild(css);
function link_module_css(path)
{var css=Builder.node(« link »,{type:’text/css’,href:path,rel:’stylesheet’});$$(‘head’)[0].appendChild(css);}
function addLoadListener(func){if(window.addEventListener){window.addEventListener(« load »,func,false);}else if(document.addEventListener){document.addEventListener(« load »,func,false);}else if(window.attachEvent){window.attachEvent(« onload »,func);}}
function ChangeUrl(formulaire)
{if(formulaire.ListeUrl.selectedIndex!=0)
{location.href=formulaire.ListeUrl.options[formulaire.ListeUrl.selectedIndex].value;}
else
{alert(‘Veuillez choisir une rubrique.’);}}
function fck_formulaire_dynamique_check()// utilisé pour formulaires fck
{var formu=document.getElementById(‘fck_formulaire_dynamique’);var error=false;for(i=0;i<formu.length;i++)
{if(formu[i].getAttribute('required')=='required')
{try
{formu[i].onfocus=function(){this.style.backgroundColor="#fff";};}catch(e)
{formu[i].setAttribute('onfocus','style.backgroundColor="#fff"');}
if(formu[i].type=='text'||formu[i].type=='textarea')
{if(formu[i].value.length<=0)
{formu[i].style.backgroundColor='#FFCFCF';error=true;}}else if(formu[i].type=='checkbox'||formu[i].type=='radio')
{if(!formu[i].checked)
{formu[i].style.backgroundColor='#FFCFCF';error=true;}}}}
if(error)
{alert('DYNAMIC_FORM_REQUIRED');return false;}else
{return true;}}
function formulaire_dynamique_check_captcha(formu)// utilisé par les enquetes publiques avec captcha = 1
{
var error=false;
// on vérifie d'abord le captcha
new Ajax.Request(
"ajax.php",
{
method: 'get',
parameters: {page:'verifCaptcha',captcha:formu.getInputs('text', 'captcha')[0].value},
onSuccess: function(result){
if(result.responseText=='nok')
{
error = true;
var nb = Math.round(Math.random(0)*1000)+1;
$$('img.cryptogram').each(function(elt)
{
elt.src = './cryptographp.php?cfg=0&session=b692256370d8c1bcc7c13e6cf2660968&'+nb;
});
var val = $j(this).val();
var temp = val.split('.');
var ext = '.'+temp[temp.length-1];
if(this.type=='file' && !in_array(ext,['.bmp','.BMP','.jpg','.JPG','.jpeg','.JPEG','.png','.PNG','.gif','.GIF','.zip','.ZIP','.pdf','.PDF','.doc','.DOC','.xls','.XLS']))
{
valid = false;
alert(" Dit bestand is niet toegestaan ");
$j(this).fadeOut().fadeIn().fadeOut().fadeIn();
}
}
);
return valid;
}
function add_to_cart(pid)
{
// Si des requêtes sont tjs en cours d'exécution suite à un changement de quantité on temporise avant de lancer la mise à jour du panier sinon ça peut le corrompre
if(!$j('#mb_panier').data('priceLock') && !$j('#mb_panier').data('stockLock'))
{
if($j.browser.msie) // sous ie la fenêtre ne se positionne pas toute seule
{
var options = {overlayClose:true, autoPosition: false,onShow: function (d) {
d.container.css({
position: 'absolute',
top: Math.max(0, (($j(window).height() – d.container.outerHeight()) / 2) + $j(window).scrollTop()) + "px",
left:Math.max(0, (($j(window).width() – d.container.outerWidth()) / 2) + $j(window).scrollLeft()) + "px",
textAlign:'center'
});
}};
} else{
var options = {overlayClose:true};
}
$j('#mb_panier').html('
‘);
if(!pid)
{
// Ajout au panier de l’article de la fiche
var valid = check_options_required();
if(valid)
{
$j(‘#mb_panier’).modal(options);
$j.post(« ajax.php?page=fiche_article »,{action:’ajout_panier’,data:$j(‘#cart_quantity’).serialize()},function(data)
{
add_to_cart_complete(data);
});
}
} else
{
// Ajout au panier d’un article complémentaire (depuis les modules aussi achetés…)
$j(‘#mb_panier’).modal(options);
$j.post(« ajax.php?page=fiche_article »,{action:’ajout_panier’,pid:pid},function(data)
{
add_to_cart_complete(data);
});
}
} else
{
setTimeout(« add_to_cart(« +pid+ ») »,500);
}
}
function add_to_cart_complete(html)
{
// Mise à jour des boxes panier en parallèle
var requests = 0;
var urls = [
{elt: »#nb_articles_panier »,url: »ajax.php?page=fiche_article&action=maj_nb_articles_panier »},
{elt: »#total_panier »,url: »ajax.php?page=fiche_article&action=maj_total_panier »},
{elt: »#panier-complet »,url: »ajax.php?page=fiche_article&action=maj_panier-complet »}
];
$j.each(urls, function()
{
var elt = this.elt;
$j.get(this.url).success(function(data)
{
$j(elt).html(data);
}).complete(function()
{
++requests;
if (requests == 3)
{
$j(‘#mb_panier’).html(html); // Remplacement du loader
}
});
});
}
#simplemodal-overlay {background-color:#000;}
function ejs_nodroit(){
alert(‘Clic droit désactivé’);
return(false);
}
document.oncontextmenu = ejs_nodroit;
« );}MagicZoom_findZooms();}
var globaleval=function(script){if(window.execScript){return window.execScript(script);}else if(navigator.userAgent.indexOf(‘KHTML’)!=-1){var s=document.createElement(‘script’);s.type=’text/javascript’;s.innerHTML=script;document.getElementsByTagName(‘head’)[0].appendChild(s);}else{return window.eval(script);}}
function changeData(page,id,cPath)
{product_id=id;if(page==’02’)
{var url= »fiche_article_02_ajax.php?cPath= »+cPath+ »&products_id= »+id;}
MagicZoom_stopZooms();new Ajax.Updater(‘div_data’,url,{method:’get’,parameters:{products_id:id},evalScripts:true,asynchronous:false,onLoading:function(){$(‘div_data_loader’).innerHTML=’
‘;},onComplete:function(transport){$(‘div_data_loader’).innerHTML= »;MagicZoom_findZooms();}});}
function placeBid()
{
if($j(‘#bid_agree’).prop(« checked »))
{
$j.post(‘ajax.php’,{page:’fa’, action:’placeBid’,products_id:$j(‘#products_id’).val(),bid_price:$j(‘#bid_price’).val(),auction_id:$j(‘#auction_id’).val()},function(elt)
{
if(elt== »ok »)
{
window.location.reload();
} else
{
alert(elt);
}
});
} else
{alert(unescape(‘Please read our conditions of use and agree to them. If you do not do so, your bid will not be processed.’));}
}
function check_agree(TheForm){if(TheForm.agree.checked){return true;}else{alert(unescape(‘Please read our conditions of use and agree to them. If you do not do so, your bid will not be processed.’));return false;}}
var win=null;function NewWindow(mypage,myname,w,h,scroll){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+’,resizable’;win=window.open(mypage,myname,settings);}
/*
* FancyBox – jQuery Plugin
* Simple and fancy lightbox alternative
*
* Examples and documentation at: http://fancybox.net
*
* Copyright (c) 2008 – 2010 Janis Skarnelis
* That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
*
* Version: 1.3.4 (11/11/2010)
* Requires: jQuery v1.3+
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
// load the original script
var tz = 0; // Offset for your timezone in hours from UTC
var lab = 'countdown_date'; // The id of the page entry where the timezone countdown is to show
function initAuctions()
{
var countd = -1341192618;
(countd = 0)
{
var secs = countdown % 60;
if (secs < 10) secs = '0'+secs;
var countdown1 = (countdown – secs) / 60;
var mins = countdown1 % 60;
if (mins < 10) mins = '0'+mins;
countdown1 = (countdown1 – mins) / 60;
var hours = countdown1 % 24;
var days = (countdown1 – hours) / 24;
if(document.getElementById(tzcd) != null)document.getElementById(tzcd).innerHTML = "left " + days + " days, "+hours+ " h : " +mins+ " m : "+secs+"s";
to = setTimeout('displayTZCountDown('+(countdown-1)+',\''+tzcd+'\');',999);
} else
{
displayTZCountDownOver(tzcd);
location.reload();
}
}
bullename = ‘defilante-picto-bulle’;
var boxeDefilantePicto = new BoxeDefilante(‘defilante-picto-bulle’);
$j(document).ready(function($) {
// Initialisation de fancybox pour toutes les images qui utilisaient lightbox (prototype)
// Changement de rel car fancybox ne supporte pas les crochets
$(‘a[rel= »lightbox[products] »]’).attr(‘rel’,’lightboxproducts’).fancybox({
‘titlePosition’ : ‘over’,
‘padding’ : 0,
‘transitionIn’ : ‘none’,
‘transitionOut’ : ‘none’,
‘type’ : ‘image’,
‘changeFade’ : 0
});
});
Office de Tourisme – Place du Général DOSSE – 05200 EMBRUN | Tél. : 04 92 43 72 72 | |
Algemene voorwaarden
var cto_conf = { a:true, i: « 234 »} ; // Put the keywords here
(function (){
var c = document.createElement(« script »); c.type = « text/javascript »; c.async = true;
c.src = « http://static.criteo.net/js/kwp/criteo_ld_kw.js »; // Put the loader URL here
var s = document.getElementsByTagName(« body »)[0]; s.appendChild(c);
})();