﻿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)
{
	var Element=document.getElementById(ID);
	var PropertyPath=Property.split('.');
	if (!Element.animatedProperties)
		Element.animatedProperties=new Object();
	var PropertyValue=Element[PropertyPath[0]];
	for (var Index=1; Index<PropertyPath.length-1; Index++)
		PropertyValue=PropertyValue[PropertyPath[Index]];
	if (InitialValue!=undefined)
	{
		if ((Transformation==undefined)||(Transformation==null))
			Transformation=Renault.Animation.NullTransformation;
		Element.animatedProperties[Property.replace(".","_")]=new Object();
		Element.animatedProperties[Property.replace(".","_")].animationParameters=new Object();
		Element.animatedProperties[Property.replace(".","_")].animationParameters.t=0;
		Element.animatedProperties[Property.replace(".","_")].animationParameters.b=InitialValue;
		Element.animatedProperties[Property.replace(".","_")].animationParameters.c=StopValue;
		Element.animatedProperties[Property.replace(".","_")].animationParameters.b=InitialValue;
		Element.animatedProperties[Property.replace(".","_")].animationParameters.c=StopValue;
		Element.animatedProperties[Property.replace(".","_")].animationParameters.d=Steps;
		Element.animatedProperties[Property.replace(".","_")].animationParameters.i=Interval;
		Element.animatedProperties[Property.replace(".","_")].animationParameters.transformation=Transformation;
		Element.animatedProperties[Property.replace(".","_")].animationParameters.oncompleted=OnCompleted;
	}
	if (Element.animatedProperties[Property.replace(".","_")]!=null)
	{
		if (Element.animatedProperties[Property.replace(".","_")].animationParameters.t<=
			Element.animatedProperties[Property.replace(".","_")].animationParameters.d)
		{
			try
			{
				PropertyValue[PropertyPath[PropertyPath.length-1]]=Format.replace("{0}",
					(Direction=='Out'?Element.animatedProperties[Property.replace(".","_")].animationParameters.c:0)+
					(Direction=='Out'?-1:1)*Element.animatedProperties[Property.replace(".","_")].animationParameters.transformation(
						Renault.Animation[Type+'Ease'+Direction](
						Element.animatedProperties[Property.replace(".","_")].animationParameters.t,
						Element.animatedProperties[Property.replace(".","_")].animationParameters.b,
						Element.animatedProperties[Property.replace(".","_")].animationParameters.c,
						Element.animatedProperties[Property.replace(".","_")].animationParameters.d)));
			}
			catch (Exception)
			{
			}
			if (Renault.Animation.debug)
				window.status=Format.replace("{0}",
					(Direction=='Out'?Element.animatedProperties[Property.replace(".","_")].animationParameters.c:0)+
					(Direction=='Out'?-1:1)*Element.animatedProperties[Property.replace(".","_")].animationParameters.transformation(
						Renault.Animation[Type+'Ease'+Direction](
						Element.animatedProperties[Property.replace(".","_")].animationParameters.t,
						Element.animatedProperties[Property.replace(".","_")].animationParameters.b,
						Element.animatedProperties[Property.replace(".","_")].animationParameters.c,
						Element.animatedProperties[Property.replace(".","_")].animationParameters.d)));
			Element.animatedProperties[Property.replace(".","_")].animationParameters.t+=1;
			setTimeout("Renault.Animation.Animate(\""+ID+"\",\""+Property+"\",'"+Type+"','"+Direction+"','"+Format+"',"+Interval+")",Interval);
		}
		else
		{
			var OnCompleted=Element.animatedProperties[Property.replace(".","_")].animationParameters.oncompleted;
			Element.animatedProperties[Property.replace(".","_")]=null;
			delete Element.animatedProperties[Property.replace(".","_")];
			if ((OnCompleted!=undefined)&&(OnCompleted!=null))
				OnCompleted({target:Element});
		}
	}
}

if (!window.Renault.Web) Renault.Web=new Object();
window.Renault.Web.__namespace=new Boolean(true);
if (!window.Renault.Web.HttpRequest) Renault.Web.HttpRequest=new Object();
if (!window.Renault.Web.HttpRequest.Browser) Renault.Web.HttpRequest.Browser=new Object();
Renault.Web.HttpRequest.IsSecuredPage=(window.location.protocol.indexOf("https")!=-1?true:false);
Renault.Web.HttpRequest.Protocol=(Renault.Web.HttpRequest.IsSecuredPage==true?"https://":"http://");
if (navigator.appName=="Microsoft Internet Explorer")
{
	Renault.Web.HttpRequest.Browser.IsIE=true;
}
else
{
	Renault.Web.HttpRequest.Browser.IsIE=false;
	HTMLElement.prototype.contains=function(oElement) {
		if (oElement==this) return true;
		if (oElement==null) return false;
		return this.contains(oElement.parentNode);		
	};
	HTMLElement.prototype.click=function() {
		var evt=this.ownerDocument.createEvent("MouseEvents");
		evt.initMouseEvent("click",true,true,this.ownerDocument.defaultView,1,0,0,0,0,false,false,false,false,0,null);
		this.dispatchEvent(evt);
	};
}

Renault.Web.HttpRequest.Browser.isFlash=new Number(0);
if ((navigator.plugins) && (navigator.plugins.length))
{
	if (navigator.plugins["Shockwave Flash"])
	{
		Renault.Web.HttpRequest.Browser.isFlash=1;
		if (navigator.plugins["Shockwave Flash"].description)
		{
			var description=navigator.plugins["Shockwave Flash"].description;
			Renault.Web.HttpRequest.Browser.isFlash=parseInt(description.charAt(description.indexOf('.')-1));
		}
	}
	if (navigator.plugins["Shockwave Flash 2.0"])
		Renault.Web.HttpRequest.Browser.isFlash=2
}
else if ((navigator.mimeTypes) && (navigator.mimeTypes.length))
{
	if ((navigator.mimeTypes['application/x-shockwave-flash']) && (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin))
		Renault.Web.HttpRequest.Browser.isFlash=1;
}
else
{
	for(var Index=9;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; Index<Elements.length; Index++)
	{   
		var Element=Elements[Index];  
		if (((UseStrictName==false)&&(Element.className.indexOf(ClassName)!=-1))||
			((UseStrictName==true)&&(Element.className==ClassName)))
			Result.push(Element);
	}
	return Result;
}
document.getElementsByClassName=Renault.Web.HttpRequest.getElementsByClassName;

if (!window.Renault.Web.UI) Renault.Web.UI=new Object();
if (!window.Renault.Web.UI.WebControls) Renault.Web.UI.WebControls=new Object();
if (!window.Renault.Web.UI.CssStyleCollection) Renault.Web.UI.CssStyleCollection=new Object();

Renault.Web.UI.CssStyleCollection.GetStyleByClassName=function(name,UseStrictName)
{
	if (UseStrictName==undefined)
		UseStrictName=false;
	var Result=null;
	for (var StyleSheet=0;StyleSheet<document.styleSheets.length;StyleSheet++)
	{
		if (Renault.Web.HttpRequest.Browser.IsIE==true)
		{
			try
			{
				for (var Rule=0;Rule<document.styleSheets[StyleSheet].rules.length;Rule++)
				{
					if (((UseStrictName==true)&&(document.styleSheets[StyleSheet].rules[Rule].selectorText==name))||
						((UseStrictName==false)&&(document.styleSheets[StyleSheet].rules[Rule].selectorText.indexOf(name)!=-1)))
						Result=document.styleSheets[StyleSheet].rules[Rule].style;
				}
			}
			catch (Exception)
			{
			}
		}
		else
		{
			try
			{
				for (var Rule=0;Rule<document.styleSheets[StyleSheet].cssRules.length;Rule++)
				{
					if (((UseStrictName==true)&&(document.styleSheets[StyleSheet].cssRules[Rule].selectorText==name))||
						((UseStrictName==false)&&(document.styleSheets[StyleSheet].cssRules[Rule].selectorText.indexOf(name)!=-1)))
						Result=document.styleSheets[StyleSheet].cssRules[Rule].style;
				}
			}
			catch (Exception)
			{
			}
		}
	}
	return Result;
}

Renault.Web.HttpRequest.Browser.OnSectionClick=function(evt,ChangeValidatorsState)
{
	if (!evt) evt=window.event;
	var Source=(evt.srcElement?evt.srcElement:evt.target);
	var Row=Source;
	while (Row.getAttribute("isHeader")==null)
		Row=Row.parentNode;
	if (Row.style.backgroundImage.lastIndexOf("show")!=-1)
		Row.style.backgroundImage=Row.style.backgroundImage.replace("show","hide");
	else
		Row.style.backgroundImage=Row.style.backgroundImage.replace("hide","show");
	var Container=Row;
	while (Container.nodeName.toLowerCase()!="table")
		Container=Container.parentNode;
	while ((Row.rowIndex+1<Container.rows.length)&&(Container.rows[Row.rowIndex+1].getAttribute("isHeader")==null))
	{
		Row=Container.rows[Row.rowIndex+1];
		var RowState=true;
		if (Row.style.display=="")
		{
			Row.style.display="none";
			RowState=false;
		}
		else
		{
			Row.style.display="";
			RowState=true;
		}
		if ((ChangeValidatorsState)&&(ChangeValidatorsState==true))
		{
			var Validators=Row.getElementsByTagName("span");
			for (var Index=0; Index<Validators.length; Index++)
			{
				if (Validators[Index].controltovalidate)
				{
					ValidatorEnable(Validators[Index],RowState);
				}
			}
		}
	}
}

Renault.Web.HttpRequest.OnKeyUp=function(evt)
{
	if (!evt) evt=window.event;
	var Source=(evt.srcElement?evt.srcElement:evt.target);
	var Key=(evt.keyCode?evt.keyCode:evt.which);
	if ((Key==13)&&(Source.getAttribute("associatedIButtonControl")!=null)&&(Source.getAttribute("associatedIButtonControl")!=""))
	{
		var Submit=document.getElementById(Source.getAttribute("associatedIButtonControl"));
		if (Submit==null)
		{
			Submit=document.getElementsByIdName(Source.getAttribute("associatedIButtonControl"));
			if (Submit.length>0)
				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.BuildFlash=function(Url,Width,Height,WMode)
{
	return "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\""+Renault.Web.HttpRequest.Protocol+"download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" "+
		"width=\""+Width+"\" height=\""+Height+"\" id=\"flashmov\"><param name=\"allowScriptAccess\" value=\"always\" />"+
		"<param name=\"movie\" value=\""+Url.replace("&amp;","&")+"\" /><param name=\"WMode\" value=\""+
		((WMode!=undefined)&&(WMode!=null)&&(WMode!="")?WMode:"opaque")+"\"><param name=\"quality\" value=\"high\" />"+
		"<embed src=\""+Url+"\" allowScriptAccess=\"always\" quality=\"high\" pluginspage=\""+Renault.Web.HttpRequest.Protocol+"www.macromedia.com/go/getflashplayer\" "+
		"type=\"application/x-shockwave-flash\" width=\""+Width+"\" height=\""+Height+"\" wmode=\""+
		((WMode!=undefined)&&(WMode!=null)&&(WMode!="")?WMode:"opaque")+"\" name=\"flashmov\"></embed></object>";
}

Renault.Web.HttpRequest.InsertFlash=function(Url,Width,Height,WMode)
{
	document.write(Renault.Web.HttpRequest.BuildFlash(Url,Width,Height,WMode));
}

Renault.Web.HttpRequest.ShowImportant=function(Url,Width,Height,Name)
{
	if (Name==undefined)
		Name="Renault UK";
	if (Width==undefined)
		Width=600;
	if (Height==undefined)
		Height=500;
	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","scrollbars=1,width="+Width+",height="+Height);
}

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<Headers.length; Index++)
	{
		if (Headers[Index].getAttribute("label")!=null)
		{
			Headers[Index].className="Show";
			break;
		}
	}
}

Renault.Modules.CommonControls.Section.OnShowComplete=function(evt)
{
	var Headers=evt.target.getElementsByTagName("div");
	for (var Index=0; Index<Headers.length; Index++)
	{
		if (Headers[Index].getAttribute("label")!=null)
		{
			Headers[Index].className="Hide";
			break;
		}
	}
	evt.target.style.overflow="visible";
	evt.target.style.height="auto";
}

if (!window.Renault) window.Renault=new Object();
if (!window.Renault.Web) window.Renault.Web=new Object();
if (!window.Renault.Web.UI) window.Renault.Web.UI=new Object();
if (!window.Renault.Web.UI.WebControls) window.Renault.Web.UI.WebControls=new Object();
if (!window.Renault.Web.UI.WebControls.DataGrid) window.Renault.Web.UI.WebControls.DataGrid=new Object();

Renault.Web.UI.WebControls.DataGrid.SetUniqueRadioButton=function(evt,NameTemplate)
{
	if (!evt) evt=window.event;
	var Source=(evt.srcElement?evt.srcElement:evt.target);
	if (Source.nodeName.toLowerCase()=="label")
		Source=document.getElementById(Source.getAttribute("for"));
	if (Source==null)
		return;
	Regex=new RegExp(NameTemplate);
	for (var Index=0; Index<document.forms[0].elements.length; Index++)
	{
		Element=document.forms[0].elements[Index];
		if ((Element.type=="radio")&&(Element.name!=Source.name))
			if (Regex.test(Element.name))
				Element.checked=false;
	}
}

Renault.Web.UI.WebControls.DataGrid.ValidateRadioButton=function(evt,NameTemplate,ErrorMessage)
{
	if (!evt) evt=window.event;
	var Source=(evt.srcElement?evt.srcElement:evt.target);
	Regex=new RegExp(NameTemplate);
	for (var Index=0; Index<document.forms[0].elements.length; Index++)
	{
		Element=document.forms[0].elements[Index];
		if ((Element.type=="radio")&&(Regex.test(Element.name))&&(Element.checked==true))
			return true;
	}
	alert(ErrorMessage);
	return false;
}

if (!window.Renault.Globalization) window.Renault.Globalization=new Object();
if (!window.Renault.Globalization.CultureInfo) window.Renault.Globalization.CultureInfo=new Object();
if (!window.Renault.Globalization.CultureInfo.CurrentCulture) window.Renault.Globalization.CultureInfo.CurrentCulture=new Object();
if (!window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat) window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat=new Object();
if (!window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalDigits) window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalDigits=new Number(2);
if (!window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator) window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator=new String(".");
if (!window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyGroupSeparator) window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyGroupSeparator=new String(",");
if (!window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol) window.Renault.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol=new String("&pound;{0}");

if (!window.Renault.Web.HttpRequest.Flash) window.Renault.Web.HttpRequest.Flash=new Object();
Renault.Web.HttpRequest.Flash.LoadTitle=function(Target)
{
	if (Renault.Web.HttpRequest.Browser.isFlash<=0)
		return;
	Target=document.getElementById(Target);
	var Index=1;
	var Title=null;
	var Elements=null;
	while (((Title==undefined)||(Title==null))&&(Index<7))
	{
		Elements=Target.getElementsByTagName("h"+Index.toString());
		for (var Item=0; Item<Elements.length; Item++)
		{
			Title=Elements[Item];
			if (Title.innerHTML!="")
				break;
			else
				Title=null;
		}
		Index++;
	}
	Index=1;
	var SubTitle=null;
	while (((SubTitle==undefined)||(SubTitle==null))&&(Index<7))
	{
		Elements=Target.getElementsByTagName("h"+Index.toString())
		for (var Item=0; Item<Elements.length; Item++)
		{
			SubTitle=Elements[Item];
			if (SubTitle==Title)
				SubTitle=null;
			if ((SubTitle!=null)&&(SubTitle.innerHTML!=""))
				break;
			else
				SubTitle=null;
		}
		Index++;
	}
	var SubTitleColor=null;
	if (SubTitle!=null)
	{
		SubTitleColor=Renault.Web.UI.CssStyleCollection.GetStyleByClassName((SubTitle.className!=""?SubTitle.className:".PageSubTitle"));
		if (SubTitleColor!=null)
		{
			if (SubTitleColor.color!="")
			{
				if (SubTitleColor.color.indexOf("#")==0)
					SubTitleColor=SubTitleColor.color.replace("#","").toUpperCase();
				else
				{
					SubTitleColor=SubTitleColor.color.replace(/[^0-9,]/gi,"");
					var R=parseInt(SubTitleColor.split(',')[0]).toString(16).toUpperCase();
					var G=parseInt(SubTitleColor.split(',')[1]).toString(16).toUpperCase();
					var B=parseInt(SubTitleColor.split(',')[2]).toString(16).toUpperCase();
					SubTitleColor=(R.length==1?"0"+R:R)+(G.length==1?"0"+G:G)+(B.length==1?"0"+B:B);
				}
			}
			else
				SubTitleColor=null;
		}
	}
	if (SubTitleColor==null)
		SubTitleColor="E5E5E5";
	var TitleColor=null;
	if (Title!=null)
	{
		TitleColor=Renault.Web.UI.CssStyleCollection.GetStyleByClassName((Title.className!=""?Title.className:".ModelColor"));
		if (TitleColor!=null)
		{
			if (TitleColor.color!="")
			{
				if (TitleColor.color.indexOf("#")==0)
					TitleColor=TitleColor.color.replace("#","").toUpperCase();
				else
				{
					TitleColor=TitleColor.color.replace(/[^0-9,]/gi,"");
					var R=parseInt(TitleColor.split(',')[0]).toString(16).toUpperCase();
					var G=parseInt(TitleColor.split(',')[1]).toString(16).toUpperCase();
					var B=parseInt(TitleColor.split(',')[2]).toString(16).toUpperCase();
					TitleColor=(R.length==1?"0"+R:R)+(G.length==1?"0"+G:G)+(B.length==1?"0"+B:B);
				}
			}
			else
				TitleColor=null;
		}
	}
	if (TitleColor==null)
		TitleColor="F7B100";
	if ((SubTitle==undefined)||(SubTitle==null)||(SubTitle==Title))
		SubTitle="";
	else
		SubTitle="&subTitle="+SubTitle.innerHTML.replace(/<(.|\n)*?>/gi,"").replace("é","&#233;").replace("É","&#201;").replace(" &amp; ","_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("é","&#233;").replace("É","&#201;").replace(" &amp; ","_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");
	}
}