/*
 * Date Format 1.2.2
 * (c) 2007-2008 Steven Levithan <stevenlevithan.com>
 * MIT license
 * Includes enhancements by Scott Trenda <scott.trenda.net> and Kris Kowal <cixar.com/~kris.kowal/>
 *
 * Accepts a date, a mask, or a date and a mask.
 * Returns a formatted version of the given date.
 * The date defaults to the current date/time.
 * The mask defaults to dateFormat.masks.default.
 */
var dateFormat = function () {
	var	token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
		timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
		timezoneClip = /[^-+\dA-Z]/g,
		pad = function (val, len) {
			val = String(val);
			len = len || 2;
			while (val.length < len) val = "0" + val;
			return val;
		};

	// Regexes and supporting functions are cached through closure
	return function (date, mask, utc) {
		var dF = dateFormat;

		// You can't provide utc if you skip other args (use the "UTC:" mask prefix)
		if (arguments.length == 1 && (typeof date == "string" || date instanceof String) && !/\d/.test(date)) {
			mask = date;
			date = undefined;
		}

		// Passing date through Date applies Date.parse, if necessary
		date = date ? new Date(date) : new Date();
		if (isNaN(date)) throw new SyntaxError("invalid date");

		mask = String(dF.masks[mask] || mask || dF.masks["default"]);

		// Allow setting the utc argument via the mask
		if (mask.slice(0, 4) == "UTC:") {
			mask = mask.slice(4);
			utc = true;
		}

		var	_ = utc ? "getUTC" : "get",
			d = date[_ + "Date"](),
			D = date[_ + "Day"](),
			m = date[_ + "Month"](),
			y = date[_ + "FullYear"](),
			H = date[_ + "Hours"](),
			M = date[_ + "Minutes"](),
			s = date[_ + "Seconds"](),
			L = date[_ + "Milliseconds"](),
			o = utc ? 0 : date.getTimezoneOffset(),
			flags = {
				d:    d,
				dd:   pad(d),
				ddd:  dF.i18n.dayNames[D],
				dddd: dF.i18n.dayNames[D + 7],
				m:    m + 1,
				mm:   pad(m + 1),
				mmm:  dF.i18n.monthNames[m],
				mmmm: dF.i18n.monthNames[m + 12],
				yy:   String(y).slice(2),
				yyyy: y,
				h:    H % 12 || 12,
				hh:   pad(H % 12 || 12),
				H:    H,
				HH:   pad(H),
				M:    M,
				MM:   pad(M),
				s:    s,
				ss:   pad(s),
				l:    pad(L, 3),
				L:    pad(L > 99 ? Math.round(L / 10) : L),
				t:    H < 12 ? "a"  : "p",
				tt:   H < 12 ? "am" : "pm",
				T:    H < 12 ? "A"  : "P",
				TT:   H < 12 ? "AM" : "PM",
				Z:    utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
				o:    (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
				S:    ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
			};

		return mask.replace(token, function ($0) {
			return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
		});
	};
}();

// Some common format strings
dateFormat.masks = {
	"default":      "ddd mmm dd yyyy HH:MM:ss",
	shortDate:      "m/d/yy",
	mediumDate:     "mmm d, yyyy",
	longDate:       "mmmm d, yyyy",
	fullDate:       "dddd, mmmm d, yyyy",
	shortTime:      "h:MM TT",
	mediumTime:     "h:MM:ss TT",
	longTime:       "h:MM:ss TT Z",
	isoDate:        "yyyy-mm-dd",
	isoTime:        "HH:MM:ss",
	isoDateTime:    "yyyy-mm-dd'T'HH:MM:ss",
	isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};

// Internationalization strings
dateFormat.i18n = {
	dayNames: [
		"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
		"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
	],
	monthNames: [
		"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
		"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
	]
};

// For convenience...
Date.prototype.format = function (mask, utc) {
	return dateFormat(this, mask, utc);
};


function createHiddenFrame(url)
{
    return "<iframe scrolling='no' src='" + url + "' style='display: none; width: 1px height:1px; position: absolute; left: 0px; top: 0px;'></iframe>";
}

/*Allows the mail page feature (2 params)*/
function mailLink(lnk, title)
{
    var subject = "Adecco LinkSharing: " + title;
    var presetText = lnk;
    var mailto = "mailto:?Subject=" + escape(subject) + "&body=" + escape(presetText);
    
    window.open(mailto, "AdeccoLinkShare");
}

/*Allows the mail page feature (Usign current page settings)*/
function mailLink()
{
    var subject = "Adecco LinkSharing " + ((document.title == null && document.title.length != 0) ? "" : ": " + document.title);
    var presetText = window.location;
    var mailto = "mailto:?Subject=" + escape(subject) + "&body=" + escape(presetText);
    
    window.open(mailto, "AdeccoLinkShare");
}

function setCookie(c_name,value,expiredays)
{
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + expiredays);
    document.cookie = c_name + "=" + escape(value)+
    ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
}
function getCookie(c_name)
{
    if (document.cookie.length > 0)
    {
        c_start=document.cookie.indexOf(c_name + "=");
        if (c_start!= -1)
        { 
            c_start = c_start + c_name.length + 1; 
            c_end = document.cookie.indexOf(";", c_start);
            if (c_end == -1) c_end = document.cookie.length;
            return unescape(document.cookie.substring(c_start,c_end));
        } 
    }
    return "";
}

/* Javascript Trim Functions 
Usage
- myStringVal.trim();
- myStringVal.ltrim();
- myStringVal.rtrim();
*/
String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}

/*Usage
- trim(myStringVal);
- ltrim(myStringVal);
- rtrim(myStringVal);
*/
function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function ltrim(stringToTrim) {
	return stringToTrim.replace(/^\s+/,"");
}
function rtrim(stringToTrim) {
	return stringToTrim.replace(/\s+$/,"");
}
/*End of Javascript Trim Functions*/

/* This part defines the sIFR stuff */
$().ready(function()
{
	if(typeof sIFR == "function")
	{
									
		bodyh1=named({
						sSelector:"body h1",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#000000",
						sBgColor:"#FFFFFF",
						sHoverColor:"#CCCCCC",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(bodyh1);
									
		homePageH2=named({
						sSelector:".homePage .hero h2",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#000000",
						sBgColor:"#FFFFFF",
						sHoverColor:"#CCCCCC",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(homePageH2);									
		
		// Add DSC
		homeH2=named({
						sSelector:".homePage #contentArea h2",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#000000",
						sBgColor:"#FFFFFF",
						sHoverColor:"#CCCCCC",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(homeH2);	
		// End. Add DSC
		
		// Add DGS
		searchH3=named({
						sSelector:".B01_jobSearch #jobSearch h3",													
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#ffffff",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(searchH3);	
		// End. Add DGS
		
		// Add DGS
		quickSearchH3=named({
						sSelector:".B01_jobSearch h3",													
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#ffffff",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(quickSearchH3);	
		// End. Add DGS
											
		landingSubHeading=named({
						sSelector:".textContainer h3",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#000000",
						sBgColor:"#FFFFFF",
						sHoverColor:"#CCCCCC",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(landingSubHeading);
		
		
		
		
		searchFormH3=named({
						sSelector:"#searchPage h3",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#ffffff",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});	
		sIFR.replaceElement(searchFormH3);									
		
		roundedPanel=named({
						sSelector:".roundedPanel p",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#ffffff",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});										
		sIFR.replaceElement(roundedPanel);						
		
		faqH4=named({
						sSelector:".faqPage h4",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});	
		sIFR.replaceElement(faqH4);				
									
		miniPanelsH3=named({
						sSelector:".miniPanels h3",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});	
		sIFR.replaceElement(miniPanelsH3);													
	};	
								
});

/* initialize the Ajax handler */
$().ready(function(){
				   		Adecco.init();
						//Adecco.dynamicInputText();
						Adecco.footerDropDownLinks();
						Adecco.faqPanelsInit();
						Adecco.miniPanelsInit();
					})




Adecco={
	
	//used by the firstPage / lastPage buttons	
	currentPage:1,		
	pagesCount:0,
	sortBy:null,
	newsCollection:null,
	currentNews:-1,
	rotatorHandler:null,
	
	init:function(){			
            
			$(document.body).addClass("hasJs");
			
			// defining the news rotator behaviours			
			Adecco.newsCollection=$(".newsRotator .news");
			$("#stopRotationBtn").click(function(){
												 		clearInterval(Adecco.rotatorHandler);
														$(this).hide(0)
														$("#startRotationBtn").show(0);
														return false;
													});
			
			$("#startRotationBtn").click(function(){												 		
														$(this).hide(0)
														$("#stopRotationBtn").show(0);
														newsAnimation();
														startNews();
														return false;
													});
													
			$(".newsRotator").mouseover(function(){
	                                                clearInterval(Adecco.rotatorHandler);
	                                            });
	                                            
	        $(".newsRotator").mouseout(function(){
	                                                startNews();
	                                            });
			
			if ($(document.body).hasClass("homePage hasJs")){
				newsAnimation();
				startNews();
			}
			
			
			// set up the calendar
			try{
				$(".datePicker").datepicker();
			}
			catch(e){};
			
			/*
			//defining the searchPage dropDown behaviour
			var dropDownBoxes=$("#searchPage select").not($(".optional select"));
			dropDownBoxes.change(function()	{
												optDiv=$(this.parentNode).children(".optional");
												optSelect=optDiv.children("select")[0];
												
												if(this.options[this.selectedIndex].value.length>0){
													optDiv.animate({opacity:1},500);
													optSelect.disabled=false;													
												}else{
													optSelect.disabled=true;
													optDiv.animate({opacity:0.3},500);
													optSelect.selectedIndex=0;
												}										  
											})
			
			//updating the status
			dropDownBoxes.change();
			
			
			//defining the resultsPage dropDown behaviour
			var dropDownBoxes=$("#jobSearch select").not($(".optional select"));
			dropDownBoxes.change(function()	{
												optDiv=$(this.parentNode).children(".optional");
												optSelect=optDiv.children("select");
												
												if(this.options[this.selectedIndex].value.length>0){
													optDiv.show(500);													
												}else{
													optDiv.hide(500);
													optSelect[0].selectedIndex=0;
												}
										  
											})
			
			//updating the status
			dropDownBoxes.change();			
			
			//defining the resultsPage checkBoxes behaviour
			$('.searchParameters .edit').click(function(){
																   		if ($(this).hasClass("open")){
																			$('.searchParameters .contractType label input[checked=""]').parent("label").hide(500);
																			$(this).removeClass("open");
																		}else{
																			$('.searchParameters .contractType label input[checked=""]').parent("label").show(500);
																			$(this).addClass("open");																			
																		}
																   		
																   
																   })
			$('.searchParameters .contractType label input[checked=""]').parent("label").hide(0);*/
			
			//traping the pagination button click
			Adecco.Ajax.buttonsInit();
			
			/* traping the submit button click event (searchPage) 
			$("#searchPage button[type='submit']").click(function(){	
																$('<input type="hidden" name="reqType" id="reqType" value="json" />').appendTo($("form"))
														});				
			
			
			/* traping the submit button click event (results page)*/
			$(".searchParameters button[type='submit']").click(function(){	
															//start a new search from the first page
															Adecco.currentPage=1;
														});				
			
			/* trapping the submit event */
			$("#searchForm").submit(function(){
											 	// clear the results container and append the LOADING icon//
											 	$("<img>").attr("src","/asset/images/loading.gif").prependTo($('<p class="loading">').text("loading...").appendTo($(".recordsContainer").empty()))
												
												formObj=$(this);
												
												var queryString = formObj.serialize();
												var url = formObj.attr("action");												
												
												queryString="sortBy=" + Adecco.sortBy + "&requestType=json&currentPage=" + Adecco.currentPage + "&" + queryString
																								
												//this timer is used just to simulate the normal client/server communication delay
												//please remove the following line!!!	* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *												
												setTimeout(function(){$.getJSON(url,queryString,Adecco.Ajax.onAjaxResponse)},500);
												//                              * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
												
												//just leave this one
												//$.getJSON(url,queryString,Adecco.Ajax.onAjaxResponse);	
												
												return false													
											});		
			
			//send the first request;
			if($("#searchForm").length>0) $(".searchParameters #searchForm").submit();
	},
	
	Ajax:{
			buttonsInit:function(){
				
					var myForm=$(".searchParameters #searchForm");
					
					/* traping the "sortBy" buttons click events */					
					$(".sortBy a").click(function(){
												  
													  Adecco.sortBy=$(this).text();
													  Adecco.currentPage=1;
													  myForm.submit();
													  
												  });
												  
												  
				
					/* traping the "page number" buttons click events */
					$(".pagination .pageNum").click(function(){
																pageBtn=$(this);
																if(pageBtn.parent(1).hasClass("selected")) return false;		
																
																Adecco.currentPage=parseInt(pageBtn.text());
																
																myForm.submit();
														 });
					
					/* traping the first/previous/next/last pagination buttons */
					$(".pagination li a").not(".pageNum").click(function(){
																		
																			var btnClass=this.className;
																			switch (btnClass){
																				case "firstPage":
																					Adecco.currentPage=1;
																				break;
																				
																				case "previousPage":
																					Adecco.currentPage--;
																				break;
																				
																				case "nextPage":
																					Adecco.currentPage++;
																				break;
																				
																				case "lastPage":
																					Adecco.currentPage=Adecco.pagesCount;
																				break;																		
																			}
																			
																			myForm.submit();
																		
																		})
				
				},
				
				
				
			onAjaxResponse:function (jsonObj){
								
				var recordsList=$("<ul>").appendTo($(".searchResultsPanel .recordsContainer").empty());
				var paginationDivs=$(".searchResultsPanel .pagination");
				var header=$(".searchResultsPanel .header");
				
				//updating some variables
				Adecco.pagesCount=jsonObj.searchDetails.pagesCount;
				Adecco.currentPage=jsonObj.searchDetails.currentPage
				Adecco.sortBy=myUnescape(jsonObj.searchDetails.sortBy.current);



				// rendering the header html
				header.empty();
				$("<h3>").text(myUnescape(jsonObj.searchDetails.title)).appendTo(header);
				$('<span class="subTitle">').text(jsonObj.searchDetails.to + " offres d’emploi correspondent à votre recherche").appendTo(header);
				var sortBy=$('<div class="sortBy">').appendTo(header);
				$("<h3>Trier vos résultants par</h3>").appendTo(sortBy);
				
				var ul=$("<ul>").appendTo(sortBy);
				for (var x=0;x<jsonObj.searchDetails.sortBy.options.length;x++){					
					var newLi=$('<li><a href="#' + myUnescape(jsonObj.searchDetails.sortBy.options[x]) + '">' + myUnescape(jsonObj.searchDetails.sortBy.options[x]) + '</a></li>').appendTo(ul);
					if(myUnescape(jsonObj.searchDetails.sortBy.options[x])==Adecco.sortBy){
						newLi.addClass("selected");
					}
				}
				


				// rendering the pagination html
				paginationDivs.empty();
				$('<span class="results">').text("Résultats " + jsonObj.searchDetails.from + " - " + jsonObj.searchDetails.to + " sur" + jsonObj.searchDetails.recordsCount).appendTo(paginationDivs);				
				
				paginationDivs.each(function(){



													var ul=$("<ul>").appendTo(this); 
													
													if(Adecco.currentPage>1){
														$('<li><a class="firstPage" title="première page" href="#first"><span class="hidden">première page</span></a></li>').appendTo(ul);
														$('<li><a class="previousPage" title="précédent page" href="#previous">Précédent</a></li>').appendTo(ul);
													}
																  
													
													var firstPage=(Adecco.currentPage-3)>0?Adecco.currentPage-3:1
													var lastPage=(firstPage+4<Adecco.pagesCount)?firstPage+4:Adecco.pagesCount;
													for (var x=firstPage;x<lastPage+1;x++){
																			
														var newLi=$('<li>').appendTo(ul);
														$("<a>").addClass("pageNum").attr("title","page " + x ).attr("href","#" + x).text(x).appendTo(newLi)
														if(Adecco.currentPage==x){
															newLi.addClass("selected");
														}
									
													}
									
													if(Adecco.currentPage<Adecco.pagesCount){
														$('<li><a class="nextPage" title="suivant page" href="#next">Suivant</a></li>').appendTo(ul);
														$('<li><a class="lastPage" title="dernier page" href="#last"><span class="hidden">dernier page</span></a></li>').appendTo(ul);				
													}

											 });

				//redifining the buttons events
				Adecco.Ajax.buttonsInit();



				//rendering the records html
				$.each(jsonObj.records,function(i,item){
													var newLi=$("<li>").appendTo(recordsList);
													//creating the record header
													$("<a>").attr("href",item.link).text(item.jobtitle).appendTo($('<p class="jobTitle">').appendTo(newLi));
													
													//creating the table with the job specs
													var jobTable=$("<table>").attr("summary","job description").appendTo(newLi);
													for (prop in item.specs){
														var newTr=$("<tr>").appendTo(jobTable);
														$("<span>").text(prop).appendTo($("<th>").appendTo(newTr));
														$("<span>").text(item.specs[prop]).appendTo($("<td>").appendTo(newTr));														
													}
													
													$('<p class="description">').text(myUnescape(item.description)).appendTo(newLi);
													$('<a class="details">').attr("href",item.link).text(myUnescape(item.details)).appendTo(newLi);

												})				
			}
			
	},
	
	/* Input field text population
	 * Takes current value of form INPUTS and handles clearing and repopulating on focus
	-------------------------------------------------------------------------------------*/
	/*
	dynamicInputText: function() {
		$('input[type="text"]').not($(".hasDatepicker")).each(function(){
											  		target=this;
													target.savedText = target.value; // keep track of the original input value
													target.onfocus=function(){
														this.value = $.trim(this.value);
														if (this.value == this.savedText) {
															this.value = "";
														}
													}
													target.onblur=function(){
														this.value = $.trim(this.value);
														if (this.value == "") {
															this.value = this.savedText;
														}
													}											  
											  
											  })
	},
	*/
	
	footerDropDownLinks:function(){
		$(".footer fieldset").each(function(){
												var btnGo=$(this).children(".btnGo");
												var selectTag=$(this).find("select")[0];												
												
												btnGo.click(function(){												
																	 var url=selectTag.options[selectTag.selectedIndex].value;
																	 if (url.length>1){
																		 //location.href=url;
																		 window.open(url);
																	 }
																	 })
										  
										  
										  
										  
										  })
	},
	
	faqPanelsInit:function(){
		var panelsHead=$(".faqContainer .faqHeader");
		panelsHead.each(function()	{
										var thisObj=$(this);	
										var li=thisObj.parent("li");								 		
								 		if (!li.hasClass("opened")){
																		li.find(".faqBody").hide(0);
																	}
								 	});
		
		panelsHead.click(function()	{
										var thisObj=$(this);
										var li=thisObj.parent("li");
										if (li.hasClass("opened")){
											li.removeClass("opened");
											li.find(".faqBody").slideUp(200);
											//thisObj.next().slideUp(200);
										}else{
											li.addClass("opened");
											li.find(".faqBody").slideDown(200);
											//thisObj.next().slideDown(200);																
										}
										
										return false;
									})

	},
	
	miniPanelsInit:function(){
		var panelsHead=$(".miniPanels .panHeader");
		panelsHead.each(function()	{
										var thisObj=$(this);	
										var li=thisObj.parent("li");								 		
								 		if (!li.hasClass("opened")){
																		li.find(".panBody").hide(0);
																	}
								 	});
		
		panelsHead.click(function()	{
										var thisObj=$(this);
										var li=thisObj.parent("li");
										if (li.hasClass("opened")){
											li.removeClass("opened");
											li.find(".panBody").slideUp(200);
											//thisObj.next().slideUp(200);
										}else{
											li.addClass("opened");
											li.find(".panBody").slideDown(200);
											//thisObj.next().slideDown(200);																
										}
										
										return false;
									})

	}	
}

function myUnescape(str){
	return unescape(str).replace(/\+/g," ");
}

function startNews(){
	newsDuration=7000;
	
	if (Adecco.newsCollection.length>0){
		Adecco.rotatorHandler=setInterval(newsAnimation,newsDuration)
	}		
}

function newsAnimation(){
	
	if(Adecco.currentNews>-1){
		$(Adecco.newsCollection[Adecco.currentNews]).animate({																						 
																opacity:0,
																fontSize:"0em",
																height:"0px",
																paddingBottom:"0px"
															 },1000,"swing",function(){this.style.display="none"})
	}
	
	Adecco.currentNews++;
	if (Adecco.currentNews>Adecco.newsCollection.length-1) Adecco.currentNews=0;
	
	if (Adecco.newsCollection[Adecco.currentNews]){ // Add DSC
		$(Adecco.newsCollection[Adecco.currentNews]).css({
																opacity:0,
																fontSize:"0em",
																height:"0px",
																paddingBottom:"0px"																					 
														 })									
		
		Adecco.newsCollection[Adecco.currentNews].style.display="block";
		$(Adecco.newsCollection[Adecco.currentNews]).animate({																						 
																opacity:1,
																fontSize:"1em",
																height:"160px",
																paddingBottom:"10px"
															 },1000,"swing",function(){this.style.filter=""})			
		}
	} // End. Add DSC

/* French initialisation for the jQuery UI date picker plugin. */
/* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */

	// LBI
	/*
	jQuery(function($){
		try{
			$.datepicker.regional['fr'] = {clearText: 'Effacer', clearStatus: '',
				closeText: 'Fermer', closeStatus: 'Fermer sans modifier',
				prevText: '&lt;Préc', prevStatus: 'Voir le mois précédent',
				nextText: 'Suiv&gt;', nextStatus: 'Voir le mois suivant',
				currentText: 'Courant', currentStatus: 'Voir le mois courant',
				monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
				'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
				monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
				'Jul','Aoû','Sep','Oct','Nov','Déc'],
				monthStatus: 'Voir un autre mois', yearStatus: 'Voir un autre année',
				weekHeader: 'Sm', weekStatus: '',
				dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
				dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
				dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
				dayStatus: 'Utiliser DD comme premier jour de la semaine', dateStatus: 'Choisir le DD, MM d',
				dateFormat: 'dd/mm/yy', firstDay: 0, 
				initStatus: 'Choisir la date', isRTL: false};
			$.datepicker.setDefaults($.datepicker.regional['fr']);
		}
		catch(e){};
	});
	*/
	// End. LBI
	
		$().ready(function(){
		try{
			$.datepicker.regional['fr'] = {clearText: 'Effacer', clearStatus: '',
				closeText: 'Fermer', closeStatus: 'Fermer sans modifier',
				prevText: '&lt;Pr&eacute;c', prevStatus: 'Voir le mois pr&eacute;c&eacute;dent',
				nextText: 'Suiv&gt;', nextStatus: 'Voir le mois suivant',
				currentText: 'Courant', currentStatus: 'Voir le mois courant',
				monthNames: ['Janvier','F&eacute;vrier','Mars','Avril','Mai','Juin',
				'Juillet','Ao&ucirc;t','Septembre','Octobre','Novembre','D&eacute;cembre'],
				monthNamesShort: ['Jan','F&eacute;v','Mar','Avr','Mai','Jun',
				'Jul','Ao&ucirc;','Sep','Oct','Nov','D&eacute;c'],
				monthStatus: 'Voir un autre mois', yearStatus: 'Voir un autre ann&eacute;e',
				weekHeader: 'Sm', weekStatus: '',
				dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
				dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
				dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
				dayStatus: 'Utiliser DD comme premier jour de la semaine', dateStatus: 'Choisir le DD, MM d',
				dateFormat: 'dd/mm/yy', firstDay: 0, 
				initStatus: 'Choisir la date', isRTL: false};
			$.datepicker.setDefaults($.datepicker.regional['fr']);
		}
		catch(e){};
	});
