1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
| var klog={
regul:0,
quit:function(){
clearInterval(klog.regul);
document.getElementById('divco').parentNode.removeChild(document.getElementById('divco'));
document.getElementById('cadre').parentNode.removeChild(document.getElementById('cadre'));
},
sscro:function(){
var dde=document.documentElement;
var ddl=(navigator.vendor) ? document.body : document.documentElement;
if(parseInt(navigator.userAgent.substring(30,31))<=7){
var dico=document.getElementById('divco');
dico.style.height=dde.clientHeight+ddl.scrollTop+"px";
dico.style.width=dde.clientWidth+ddl.scrollLeft+"px";
}
var adi=document.getElementById('cadre');
adi.style.left=((dde.clientWidth-adi.offsetWidth)/2)+ddl.scrollLeft+'px';
adi.style.top=(dde.clientHeight-adi.offsetHeight)/2+ddl.scrollTop+"px";
},
logdial:function(){
if(arguments.length==0){
klog.creation('div','body','id','divco');
var dico=document.getElementById('divco');
var dde=document.documentElement;
var ddl=(navigator.vendor) ? document.body : document.documentElement;
dico.onclick=klog.quit;
dico.style.height=dde.clientHeight+ddl.scrollTop+"px";
dico.style.width=dde.clientWidth+ddl.scrollLeft+"px";
var hou=0;
}
else{
var hou=arguments[0];
}
if(hou<=0.5){
hou+=0.1;
if(parseInt(navigator.userAgent.substring(30,31))<=8){
document.getElementById('divco').style.filter = 'alpha(opacity='+(hou*50)+')';
}
else{
document.getElementById('divco').style.opacity=hou;
}
}
else{
klog.boite();
return false
}
setTimeout('klog.logdial('+hou+')',30);
},
raz:function(){
document.getElementById('cadre').getElementsByTagName('input')[0].value='';
document.getElementById('cadre').getElementsByTagName('input')[1].value='';
document.getElementById('cadre').getElementsByTagName('input')[2].value='';
document.getElementById('cadre').getElementsByTagName('input')[3].value='';
},
creation:function(elem,parent){
var ddc=(arguments[1]=='body') ? document.body : document.getElementById(parent)
var constrution=document.createElement(elem);
if((arguments.length>2)){
var arle=2
while (arle<arguments.length){
if((arguments[arle]=='txt')){
constrution.appendChild(document.createTextNode(arguments[arle+1]))
}
else if((arguments[arle]=='class')){
constrution.className=arguments[arle+1]
}
else{
constrution.setAttribute(arguments[arle],arguments[arle+1]);
}
arle+=2
}
}
return ddc.appendChild(constrution)
},
boite:function(){
klog.creation('form','body','id','cadre',"method",'POST','action','index.php'); //la page de redirection//
klog.creation('span','cadre','class','textelog','txt','FIRST NAME : ');
klog.creation('input','cadre','name','log','class','log');
klog.creation('span','cadre','class','textelog','txt','SURNAME : ');
klog.creation('input','cadre','name','log','class','log');
klog.creation('span','cadre','class','textelog','txt','EMAIL : ');
klog.creation('input','cadre','name','log','class','log');
klog.creation('span','cadre','class','textelog','txt','PHONE : ');
klog.creation('input','cadre','name','log','class','log');
klog.creation('div','cadre','id','texte2');
klog.creation('span','texte2','class','txt1','txt','Cancel').onclick=klog.raz;
klog.creation('span','texte2','class','txt2','txt','Send').onclick=gestion_pass;
klog.regul=setInterval(klog.sscro,50);
}
} |
Partager