if (!window.Renault) window.Renault=new Object(); window.Renault.__namespace=new Boolean(true); if (!window.Renault.Animation) window.Renault.Animation=new Object(); Renault.Animation.NullTransformation=function(Value) { return Value; } Renault.Animation.LinearEaseOut= Renault.Animation.LinearEaseIn= Renault.Animation.LinearEaseInOut=function(t,b,c,d) { return c*t/d+b; } Renault.Animation.QuadEaseIn=function(t,b,c,d) { return c*(t/=d)*t+b; } Renault.Animation.QuadEaseOut=function(t,b,c,d) { return -c*(t/=d)*(t-2)+b; } Renault.Animation.QuadEaseInOut=function(t,b,c,d) { if ((t/=d/2)<1) return c/2*t*t+b; return -c/2*((--t)*(t-2)-1)+b; } Renault.Animation.CubicEaseIn=function(t,b,c,d) { var Result=c*(t/=d)*t*t+b; return Result; } Renault.Animation.CubicEaseOut=function(t,b,c,d) { var Result=c*((t=t/d-1)*t*t+1)+b; return Result; } Renault.Animation.CubicEaseInOut=function(t,b,c,d) { if ((t/=d/2)<1) return c/2*t*t*t+b; return c/2*((t-=2)*t*t+2)+b; } Renault.Animation.QuarticEaseIn=function(t,b,c,d) { return c*(t/=d)*t*t*t+b; } Renault.Animation.QuarticEaseOut=function(t,b,c,d) { return -c*((t=t/d-1)*t*t*t-1)+b; } Renault.Animation.QuarticEaseInOut=function(t,b,c,d) { if ((t/=d/2)<1) return c/2*t*t*t*t+b; return -c/2*((t-=2)*t*t*t-2)+b; } Renault.Animation.QuinticEaseIn=function(t,b,c,d) { return c*(t/=d)*t*t*t*t+b; } Renault.Animation.QuinticEaseOut=function(t,b,c,d) { return c*((t=t/d-1)*t*t*t*t+1)+b; } Renault.Animation.QuinticEaseInOut=function(t,b,c,d) { if ((t/=d/2)<1) return c/2*t*t*t*t*t+b; return c/2*((t-=2)*t*t*t*t+2)+b; } Renault.Animation.SinEaseIn=function(t,b,c,d) { return -c*Math.cos(t/d*(Math.PI/2))+c+b; } Renault.Animation.SinEaseOut=function(t,b,c,d) { return c*Math.sin(t/d*(Math.PI/2))+b; } Renault.Animation.SinEaseInOut=function(t,b,c,d) { return -c/2*(Math.cos(Math.PI*t/d)-1)+b; } Renault.Animation.ExpEaseIn=function(t,b,c,d) { return (t==0?b:c)*Math.pow(2,10*(t/d-1))+b; } Renault.Animation.ExpEaseOut=function(t,b,c,d) { return (t==d?b+c:c)*(-Math.pow(2,-10*t/d)+1)+b; } Renault.Animation.ExpEaseInOut=function(t,b,c,d) { if (t==0) return b; if (t==d) return b+c; if ((t/=d/2)<1) return c/2*Math.pow(2,10*(t-1))+b; return c/2*(-Math.pow(2,-10*--t)+2)+b; } Renault.Animation.CircularEaseIn=function(t,b,c,d) { return -c*(Math.sqrt(1-(t/=d)*t)-1)+b; } Renault.Animation.CircularEaseOut=function(t,b,c,d) { return c*Math.sqrt(1-(t=t/d-1)*t)+b; } Renault.Animation.CircularEaseInOutCirc=function(t,b,c,d) { if ((t/=d/2)<1) return -c/2*(Math.sqrt(1-t*t)-1)+b; return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b; } Renault.Animation.Animate=function(ID,Property,Type,Direction,Format,Interval,InitialValue,StopValue,Steps,OnCompleted,Transformation) { if ((window.document.readyState==undefined)||(window.document.readyState==false)) return; var Element=document.getElementById(ID); //var debugDiv = document.getElementById('flashcontent'); var PropertyPath=Property.split('.'); if (!Element.animatedProperties) Element.animatedProperties=new Object(); var PropertyValue=Element[PropertyPath[0]]; for (var Index=1; Index=0;Index--) { try { var Flash=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+Index); Renault.Web.HttpRequest.Browser.isFlash=Index; break; } catch(e) { } } } Renault.Web.HttpRequest.absoluteLeft=function(element) { var Left=0; if (element.offsetParent) { do { Left+=element.offsetLeft; } while (element=element.offsetParent); } return Left; } Renault.Web.HttpRequest.absoluteTop=function(element) { var Top=0; if (element.offsetParent) { do { Top+=element.offsetTop; } while (element=element.offsetParent); } return Top; } Renault.Web.HttpRequest.getElementsByClassName=function(ClassName,UseStrictName) { if (UseStrictName==undefined) UseStrictName=false; var Result=new Array(); var Elements=document.getElementsByTagName("BODY")[0].getElementsByTagName("*"); for (var Index=0; Index0) Submit=Submit[0]; else return true; } if (Submit==null) return true; if (Submit.click) Submit.click(); else __doPostBack(Submit.name,""); return false; } return true; } Renault.Web.HttpRequest.Window=new Object() Renault.Web.HttpRequest.Window.ClientSize=function() { var Client=document.createElement("div"); Client.style.position="absolute"; Client.style.width="0px"; Client.style.height="0px"; Client.style.right="0px"; Client.style.bottom="0px"; document.body.appendChild(Client); var Width=Client.offsetLeft+16; var Height=Client.offsetTop+14; document.body.removeChild(Client); return {width:Width,height:Height}; } Renault.Web.HttpRequest.BuildFlash=function(Url,Width,Height,WMode,Scalling,StaticReplacement) { if ((Width=="auto")||(Height=="auto")) { if (Url.match(/viewSize=(\d+),(\d+)/gi)!=null) { var Match=Url.match(/viewSize=(\d+),(\d+)/gi); Match=Match[0].toLowerCase().replace("viewsize=","").split(","); Width=parseInt(Match[0]); Height=parseInt(Match[1]); } else { Client=Renault.Web.HttpRequest.Window.ClientSize(); if (Width=="auto") Width=Client.width-16; if (Height=="auto") Height=Client.height-16; } } if ((Scalling==undefined)||(Scalling==null)) Scalling="default"; if (StaticReplacement==undefined) StaticReplacement="gif"; var Result=""+ ""+ ""+ ""; if ((Renault.Web.HttpRequest.Browser.isFlash==0)&&(StaticReplacement!=null)) Result=""; return Result; } Renault.Web.HttpRequest.InsertFlash=function(Url,Width,Height,WMode,Scalling,StaticReplacement) { document.write(Renault.Web.HttpRequest.BuildFlash(Url,Width,Height,WMode,Scalling,StaticReplacement)); } Renault.Web.HttpRequest.ShowImportant=function(Url,Width,Height,ScrollBars) { if (Width==undefined) Width=600; if (Height==undefined) Height=500; if (ScrollBars==undefined) ScrollBars="1"; else { switch (typeof(ScrollBars)) { case "boolean": { ScrollBars=(ScrollBars==true?"yes":"no"); break; } case "number": { ScrollBars=(ScrollBars>1?"yes":"no"); break; } default: { ScrollBars=((ScrollBars.toString().toLowerCase()=="yes")||(ScriptEngine.toLowerCase().toString()=="true")?"yes":"no"); break; } } } if (Url==undefined) { if (window.location.href.substr(window.location.href.indexOf(window.location.host)+window.location.host.length).match(/.*cars\/.*/gi)!=null) Url=Renault.Web.HttpRequest.Protocol+Renault.Web.HttpRequest.HomeUrl+"cars/finance/importantinformation.aspx"; else Url=Renault.Web.HttpRequest.Protocol+Renault.Web.HttpRequest.HomeUrl+"vans/ownerservices/ewaboutinsurance.aspx"; } window.open(Url,"_blank","menubar=no,status=no,location=no,resizable=no,toolbar=no,scrollbars="+ScrollBars+",width="+Width+",height="+Height+",top=10,left=10"); } Renault.Web.HttpRequest.CurrencyFormat=function(Amount,DecimalDigits,GroupSeparator,DecimalSeparator,Symbol) { if (DecimalDigits==undefined) DecimalDigits=Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalDigits; if (GroupSeparator==undefined) GroupSeparator=Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyGroupSeparator; if (DecimalSeparator==undefined) DecimalSeparator=Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator; if (Symbol==undefined) Symbol=Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol; var Buffer=Amount.toString().split('.',2); if (Buffer.length==1) Buffer.push("00"); var Fractional=Buffer[1]; var Integer=parseInt(Buffer[0]); if (isNaN(Integer)) return ""; var Sign=(Integer<0?"-":""); Integer=Math.abs(Integer); var Result=new String(Integer); var Buffer=new Array(); while (Result.length>3) { var Group=Result.substr(Result.length-3); Buffer.unshift(Group); Result=Result.substr(0,Result.length-3); } if (Result.length>0) Buffer.unshift(Result); Result=Buffer.join(GroupSeparator); Amount=Sign+Result+DecimalSeparator; switch (Fractional.length) { case 0: { Amount+="00"; break; } case 1: { Amount+=Fractional+"0"; break; } default: { Amount+=Fractional.substr(0,DecimalDigits); break; } } return Symbol.replace("{0}",Amount); } if (!window.Renault) window.Renault=new Object(); if (!window.Renault.Modules) window.Renault.Modules=new Object(); if (!window.Renault.Modules.CommonControls) window.Renault.Modules.CommonControls=new Object(); if (!window.Renault.Modules.CommonControls.Section) window.Renault.Modules.CommonControls.Section=new Object(); Renault.Modules.CommonControls.Section.OnMouseOver=function(evt) { if (!evt) evt=window.event; var Source=(evt.srcElement?evt.srcElement:evt.target); while ((Source.nodeName.toLowerCase()!="table")&& (Source.getAttribute("label")==null)) Source=Source.parentNode; if (Source.nodeName.toLowerCase()=="table") return; Source.style.cursor="pointer"; } Renault.Modules.CommonControls.Section.OnMouseOut=function(evt) { if (!evt) evt=window.event; var Source=(evt.srcElement?evt.srcElement:evt.target); while ((Source.nodeName.toLowerCase()!="table")&& (Source.getAttribute("label")==null)) Source=Source.parentNode; if (Source.nodeName.toLowerCase()=="table") return; Source.style.cursor="auto"; } Renault.Modules.CommonControls.Section.OnClick=function(evt) { if (!evt) evt=window.event; var Source=(evt.srcElement?evt.srcElement:evt.target); while ((Source.nodeName.toLowerCase()!="table")&& (Source.getAttribute("label")==null)) Source=Source.parentNode; if (Source.nodeName.toLowerCase()=="table") return; while (Source.nodeName.toLowerCase()!="tr") Source=Source.parentNode; var Container=Source; while (Container.nodeName.toLowerCase()!="table") Container=Container.parentNode; var Cover=null; if ((!Container.parentNode.id)||(Container.parentNode.id!=Container.id+"_Cover")) { var Parent=Container.parentNode; var Cover=document.createElement("div"); Parent.replaceChild(Cover,Container); Cover.className="Section"; Cover.appendChild(Container); Cover.id=Container.id+"_Cover"; Cover.initialValue=Container.scrollHeight; Cover.targetValue=Container.rows[0].scrollHeight; Cover.style.overflow="hidden"; Cover.style.height=Container.scrollHeight+"px"; } else { Cover=Container.parentNode; Cover.style.overflow="hidden"; } var InitialValue=Cover.initialValue; if ((parseInt(Cover.style.height.replace(/\D/gi,""))>Cover.targetValue)||(Cover.style.height=="auto")) { Renault.Animation.Animate(Cover.id,"style.height","Cubic","Out","{0}px",10,-Cover.targetValue,Cover.initialValue,50, Renault.Modules.CommonControls.Section.OnHideComplete,function(Value) { return Math.round((Value<0?0:Value)); }); } else { Renault.Animation.Animate(Cover.id,"style.height","Cubic","In","{0}px",10,Cover.targetValue,Cover.initialValue-Cover.targetValue,50, Renault.Modules.CommonControls.Section.OnShowComplete,function(Value) { return Math.round((Value<0?0:Value)); }); } } Renault.Modules.CommonControls.Section.OnHideComplete=function(evt) { var Headers=evt.target.getElementsByTagName("div"); for (var Index=0; Index/gi,"").replace("é","é").replace("É","É").replace(" & ","_and_")+"&subColor="+SubTitleColor; if (Title!=null) Title=Title.innerHTML; if ((Title==null)||(Title=="")) Title=SubTitle; if ((Title!=null)&&(Title!="")) { Title="&title="+Title.replace(/<(.|\n)*?>/gi,"").replace("é","é").replace("É","É").replace(" & ","_and_")+"&color="+TitleColor; //while (Target.childNodes.length>0) // Target.removeChild(Target.childNodes[0]); //Target.innerHTML=Renault.Web.HttpRequest.BuildFlash(Renault.Web.HttpRequest.Protocol+Renault.Web.HttpRequest.HomeUrl+ // "Resources/Flash/title.swf?textTransform=uppercase"+Title+SubTitle,745,((SubTitle!=null)&&(SubTitle!="")?50:30),"transparent"); for(i = 0;i" + Renault.Web.HttpRequest.BuildFlash(Renault.Web.HttpRequest.Protocol+Renault.Web.HttpRequest.HomeUrl+ "Resources/Flash/title.swf?textTransform=uppercase"+Title+SubTitle,745,((SubTitle!=null)&&(SubTitle!="")?50:30),"transparent") + ""; // } } if (!window.Renault.Web.HttpCookie) Renault.Web.HttpCookie=new Object(); Renault.Web.HttpCookie.Create=function(Name,Value,Days) { var Expires="" if (Days) { var CookieDate=new Date(); CookieDate.setTime(CookieDate.getTime()+(Days*24*60*60*1000)); var Expires="; expires="+CookieDate.toGMTString(); } document.cookie=Name+"="+Value+Expires+"; path=/"; } Renault.Web.HttpCookie.Read=function(Name) { var NameEQ=Name+"="; var Cookies=document.cookie.split(';'); for (var Index=0;Index