if (!YWCAPI)
{
var YWCAPI = new Object();
YWCAPI.datas = new Object();
YWCAPI.prefs = new Object();
YWCAPI.docToDatas = new Object();
}
YWCAPI.docToDatas[1] = new Object();
YWCAPI.docToDatas[1].ids = '7';
YWCAPI.docToDatas[1].ida = '7';
YWCAPI.docToDatas[1].d = 'YWC';
YWCAPI.prefs['YWC'] = new Object();
YWCAPI.prefs['YWC'].uridata = true;
YWCAPI.prefs['YWC'].getDatas = function(){return false;};
YWCAPI.$ = function(d)
{
return document.getElementById(d);
}
YWCAPI.send = function(q)
{
var s = document.createElement('script');
s.src = 'http://apiywc.net/check.php?' + q;
document.getElementById('YWC_divForScript').appendChild(s);
}
YWCAPI.submitForm = function(idd, datas)
{
var t = YWCAPI.docToDatas[idd];
YWCAPI._submitForm(idd, t.ids, t.ida, t.d, t.datas);
}
YWCAPI._submitForm = function(idd, ids, ida, d, datas)
{
if (!d)
d = '';
var q = 'idd=' + escape(idd) + '&d=' + escape(d) + '&is=' + escape(ids) + '&a=' + escape(ida) + '&';
var c;
for (var a = 0; c = this.$(d+'_codes['+a+']'); a++)
{
q += 'c[]=' + escape(c.value) + '&';
this.$(d+'_res['+a+']').innerHTML = '
';
}
if (this.$(d + '_button'))
{
this.$(d + '_button').value = 'Vérification de vos codes en cours...';
this.$(d + '_button').disabled = true;
}
if (datas)
this.datas[d] = datas;
else
this.datas[d] = datas = YWCAPI.prefs[d].getDatas();
this.send(q + 'datas=' + escape(datas));
}
YWCAPI.errorCode = function(o)
{
var d = o.d;
if (this.$(d + '_button'))
{
this.$(d + '_button').value = 'Valider';
this.$(d + '_button').disabled = false;
}
var c;
for (var a in o.codes)
{
if (c = this.$(d+'_res[' + a + ']'))
{
c.innerHTML = '
';
}
}
if (o.alert)
alert(o.alert);
}
YWCAPI.go = function(o)
{
var d = o.d;
if (this.$(d + '_button'))
{
this.$(d + '_button').value = 'Redirection en cours...';
this.$(d + '_button').disabled = false;
}
var c;
for (var a in o.codes)
{
if (c = this.$(d+'_res[' + a + ']'))
{
c.innerHTML = '
';
}
}
if (o.alert)
alert(o.alert);
document.location.href = o.url + (this.prefs[d].uridata ? '&' + this.datas[d] : '');
}
YWCAPI.getDatas = function(x)
{
var datas = '';
var d;
var types = Array('input', 'textarea', 'select');
for (var a in types)
{
var type = types[a];
var e = document.getElementsByTagName(type);
if (e.length)
{
for (var b = 0; d = e[b]; b++)
{
var test = ' ' + d.className + ' ';
if (test.indexOf(' ' + x + ' ') != -1)
{
var n = d.name;
var i = 0;
if ((i = n.indexOf('[')) != -1)
{
n = 'YWCDATAS[' + n.substr(0, i) + ']' + n.substr(i) + '';
}
else
n = 'YWCDATAS[' + d.name + ']';
datas += escape(n) + '=' + escape(d.value) + '&';
}
}
}
}
return datas;
}
document.write('');
document.write('
| "); document.write(" | ");
document.write(" ");
document.write(" Suivez les instructions ci-dessus afin d\'obtenir un code puis saisissez le ci-dessous. Renouvelez cette opération plusieurs fois afin d\'obtenir 2 codes différents.
");
document.write(" ");
document.write(" ");
document.write(" | ");
document.write(" "); document.write(" |