//BROWSER DETECTION
var cw = ((document.all)&&(navigator.userAgent.indexOf("MSIE") != -1));
var ViaM_saf = ((navigator.userAgent.indexOf("Safari") != -1)&&(navigator.appVersion.indexOf("3.0") == -1));
var cJ = ((document.getElementById)&&(!document.all)&&(!ViaM_saf));
var ViaM_op = (navigator.appName == "Opera");
var _FwkRoot = "";
var cV = "";
var qD = "";
ihmGet = function(id)
{
return document.getElementById(id);
};
//INHERITANCE
Function.prototype.ir = function(np)
{
for (var item in np.prototype) this.prototype[item] = np.prototype[item];
};
Object.prototype.ci = function(tF)
{
tF.call(this);
};
//STRING PROTOTYPE AUGMENTATION
String.prototype.oQ = function(regExp,string)
{
var str = this;
while (str.search(regExp) != -1) str = str.replace(regExp,string);
return str;
};
//OBJECT VMOBJECT
function ck()
{
this.gq = new Array();
}
ck.prototype.xZ = function(wb)
{
this.gq[wb] = new Array();
};
ck.prototype.registerEvent = function(wb)
{
this.gq[wb] = new Array();
};
ck.prototype.dI = function(wb,uD,uY,wq)
{
var wp = false;
if (typeof(wq)=="boolean") wp = wq;
if (!this.gq[wb]) this.xZ(wb);
this.gq[wb].push(new Array(uD,uY,wp,false));
};
ck.prototype.addEventHandler = function(wb,hD,wq,thisObject)
{
var wp = false;
if (typeof(wq)=="boolean") wp = wq;
if (!this.gq[wb]) this.xZ(wb);
var newEventHandler = new Array(thisObject,hD,wp,true);
this.gq[wb].push(newEventHandler);
return newEventHandler;
};
ck.prototype.sa = function(wb,uD,uY)
{
if (this.gq[wb]) {
var wm = new Array();
for (var i=0;i";
return we;
}
else return "
";
}
Date.prototype.toVMString = function()
{
var fq = this.getDate();
var mv = this.getMonth() + 1;
var year = this.getFullYear();
if (fq < 10) fq = "0" + fq;
if (mv < 10) mv = "0" + mv;
return fq + "/" + mv + "/" + year;
};
//GESTION DES ERREURS
__VMErrors = 0;
function _VMErrorTrace(a,b,c)
{
if ((typeof(VMApiKey) == "undefined")||(VMApiKey == null)||(VMApiKey == "")) {
__VMErrors++;
if (__VMErrors < 6) {
var nu = document.createElement("SCRIPT");
nu.setAttribute("language", "JavaScript");
nu.setAttribute("type", "text/javascript");
var YMTC = "";
var cook = document.cookie;
if (cook.indexOf("yMTC=")!=-1) YMTC = "&" + cook.substring(cook.indexOf("yMTC="),cook.indexOf(";",cook.indexOf("yMTC=")));
var lang = "fra";
if (cV != "") lang = cV;
var sj = _FwkRoot.substring(0,_FwkRoot.indexOf("/vmw2"))+"/viamichelin/"+lang+"/dyn/controller/trace?";
sj += "currentURL="+escape(location.href);
sj += "&errorMsg=" + a;
sj += "&file=" + escape(b);
sj += "&line=" + c;
sj += "&YMTC=" + YMTC;
sj += "&rnd=" + (new Date()).getTime()+""+parseInt(Math.random()*1000000);
nu.setAttribute("src", sj);
try {
document.getElementsByTagName("head")[0].appendChild(nu);
} catch (e) {
}
}
}
return false;
}
window.onerror = _VMErrorTrace;