// JavaScript Document
var imagesPath = "/skins/default/images/";
var photosPath = "";
var input = new Array();
// textes..
// Appends Get Vars into js Vars
var url = String(self.location);
tmp = url.split("?");
if (tmp[1]) {
var queryString = tmp[1];
vars = queryString.split('#');
vars = vars[0].split('&');
var _GET = new Array();
for (var i = 0 ; i < vars.length; ++i ) {
tmp = vars[i].split('=');
_GET[tmp[0]] = tmp[1];
}
}
// temoignages
var dx = 0;
var temHeight = 140;
var count = temHeight;
var nbTem = 0;
var curTem = 0;
function liftUp() {
count--;
if (count > 0) {
_Elem('temScroller').style.top = dx--;
setTimeout(liftUp, 1);
} else {setTimeout(showNext, 5000);
if ( curTem == (nbTem+1)) {
_Elem('temScroller').style.top = -temHeight+'px';
dx = -temHeight;
curTem = 1;
}
}
}
function showNext() {
count = temHeight;
curTem ++;
liftUp();
}
// partenaires
var partDx = 0;
var partHeight = 86;
var partCount = partHeight;
var nbPart = 0;
var curPart = 0;
function liftUpPart() {
partCount--;
if (partCount > 0) {
_Elem('partScroller').style.top = partDx--;
setTimeout(liftUpPart, 1);
} else {setTimeout(showNextPart, 7500);
if ( curPart == (nbPart+1)) {
_Elem('partScroller').style.top = -partHeight+'px';
partDx = -partHeight;
curPart = 1;
}
}
}
function showNextPart() {
partCount = partHeight;
curPart ++;
liftUpPart();
}
function getFlashAlert(id) {
str = '
';
return str;
}
function checkMessage() {
var test = new Array( 'ctc_nom','ctc_code_postal', 'ctc_telephone', 'ctc_email', 'ctc_message','akisi_captcha');
nbErr = 0;
for (i = 0 ; i< test.length; i++) {
if (_Elem(test[i]).value.length == 0) {
nbErr ++;
_Elem(test[i]).style.borderColor = "#FF0000";
} else {
_Elem(test[i]).style.borderColor = "#CECECE";
}
}
return (nbErr == 0);
}
function checkQuestion() {
var test = new Array( 'supportEmail', 'supportSujet','supportMessage');
nbErr = 0;
for (i = 0 ; i< test.length; i++) {
if (_Elem(test[i]).value.length == 0) {
nbErr ++;
_Elem(test[i]).style.borderColor = "#FF0000";
} else {
_Elem(test[i]).style.borderColor = "#CECECE";
}
}
return (nbErr == 0);
}
function checkNewsletter() {
nbErr = 0 ;
if (!checkMail(_Elem('nlMail').value)) {
nbErr ++;
_Elem('nlMail').style.borderColor = "#FF0000";
} else {
_Elem('nlMail').style.borderColor = "#CECECE";
}
return (nbErr == 0);
}
function checkCV() {
var test = new Array( 'cvNom','cvPrenom','cvAdresse','cvCodePostal','cvVille', 'cvTelephone', 'cvEmail', 'cvPjCv');
nbErr = 0;
for (i = 0 ; i< test.length; i++) {
if (_Elem(test[i]).value.length == 0) {
nbErr ++;
_Elem(test[i]).style.borderColor = "#FF0000";
} else {
_Elem(test[i]).style.borderColor = "#CECECE";
}
}
if (!checkMail(_Elem('cvEmail').value)) {
nbErr ++;
_Elem('cvEmail').style.borderColor = "#FF0000";
} else {
_Elem('cvEmail').style.borderColor = "#CECECE";
}
return (nbErr == 0);
}
function showHideContactPan(){
if (_Elem('iContactPann').src.indexOf('Close') != -1 ) {
Hide('contactPann');
_Elem('iContactPann').src = _Elem('iContactPann').src.replace(/Close/,'Open');
} else {
Show('contactPann');
_Elem('iContactPann').src = _Elem('iContactPann').src.replace(/Open/,'Close');
}
}
function showGrImage (obj) {
_Elem('iGrImage').src = obj.src.replace(/presse/,'large_presse');
_Elem('grImageLegende').innerHTML = obj.alt;
Show('grImage');
_Elem('grImage').style.top = document.body.scrollTop+10;
if (_Elem('grImage').style.top.replace(/px/,'') < 10) _Elem('grImage').style.top = 10 ;
}
function showGrImageEvent (obj) {
_Elem('iGrImage').src = obj.src.replace(/event/,'large_event');
_Elem('grImageLegende').innerHTML = obj.alt;
Show('grImage');
_Elem('grImage').style.top = document.body.scrollTop+10;
if (_Elem('grImage').style.top.replace(/px/,'') < 10) _Elem('grImage').style.top = 10 ;
}
function hideGrImage() {
_Elem('iGrImage').src = 'images/nopic.jpg';
Hide('grImage');
}
function swapArticle(id) {
showHide('mess'+id);
showHide('messfull'+id);
if (_Elem('photos'+id)) showHide('photos'+id);
if (_Elem('actu'+id).className == 'jobs1') {
_Elem('actu'+id).className = 'jobs2';
_Elem('esp'+id).innerHTML = 'réduire'
}
else {
_Elem('actu'+id).className = 'jobs1';
_Elem('esp'+id).innerHTML = 'en savoir plus';
}
}
function AfficheFacture(link){
self.location = 'viewFacture.php?q='+link;
}