var modele_lcd=0;
var main_lcd=0;
var menu_lcd=0;
var i=-1;
var currentcss;
var actfield=true;


function clearField()
{
if (actfield && document.email.elements['visitor_email'].value=="Adresse e-mail")
{
document.email.elements['visitor_email'].value="";
actfield=false;
}
}

function checkEnter(e, formnum){
var characterCode;
if(e && e.which){
e = e;
characterCode = e.which;
}
else{
e = event;
characterCode = e.keyCode;
}

if(characterCode == 13){
if (formnum==0) send_mail();
return false;
}
else{
return true;
}
}


function send_mail() {
 if (!xmlhttp) alert("NO");
 xmlhttp.open("GET", host+"/dyn/send_mail.php?visitor_email="+document.email.elements['visitor_email'].value,true);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   if(xmlhttp.responseText=="0") {document.getElementById("astucetxt").innerHTML ="L'identifiant et le password que vous avez reçu vous permettent de revenir au site en cours de création.";
document.getElementById("email").style.visibility = "hidden";
}
   if(xmlhttp.responseText=="1") alert("L\'adresse email saisie n\'est pas valable.");
   if(xmlhttp.responseText=="2") alert("L\'adresse email saisie existe déjà !");
   if(xmlhttp.responseText=="3") alert("Une erreur est survenue, veuillez réessayer plus tard.");
  }
 }
 xmlhttp.send(null)
}

function modele(k) {
    i=i+k;
    if (i<0) i=galeries.length-1;
}
function show(css)
{
document.getElementById("ok").style.visibility = "visible";
document.getElementById("seehome").style.visibility = "visible";
document.getElementById("seehome").style.background = "url(img/sitici2005/etape1/home.gif) 0px -36px no-repeat";
document.getElementById("seeother").style.visibility = "visible";
document.getElementById("seeother").style.background = "url(img/sitici2005/etape1/other.gif) 0px -18px";
 if (!xmlhttp) alert("NO");
 xmlhttp.open("GET", host+"/dyn/showcss.php?css="+css,true);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
        WriteLayer("content",null,"<img src='/img/models/"+css+"/accueil.jpg'>");
        currentcss=css;
  }
 }
 xmlhttp.send(null)
}
function showother(css)
{
    document.getElementById("seeother").style.background = "url(img/sitici2005/etape1/other.gif) 0px -36px no-repeat";
    document.getElementById("seehome").style.background = "url(img/sitici2005/etape1/home.gif) 0px -18px";
    WriteLayer("content",null,"<img src='/img/models/"+css+"/other.jpg'>");
}

function WriteLayer(ID,parentID,sText) { 
    if (document.layers) { 
        var oLayer; 
        if(parentID){ 
            oLayer = eval('document.' + parentID + '.document.' + ID + '.document'); 
        }else{ 
            oLayer = document.layers[ID].document; 
        } 
        oLayer.open(); 
        oLayer.write(sText); 
        oLayer.close(); 
    } 
    else if (parseInt(navigator.appVersion)>=5&&navigator.appName=="Netscape") { 
        document.getElementById(ID).innerHTML = sText; 
    } 
    else if (document.all) document.all[ID].innerHTML = sText 
} 
// Before you reuse this script you may want to have your head examined
// 
// Copyright 1999 InsideDHTML.com, LLC.  

function doBlink() {
  // Blink, Blink, Blink...
  var blink = document.all.tags("BLINK")
  for (var i=0; i < blink.length; i++)
    blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" 
}

function startBlink() {
  // Make sure it is IE4
  if (document.all)
    setInterval("doBlink()",500)
}

function startTask()
{
startBlink();
//setTimeout('checkalldomain(\'aaaa\')',1250);
}

window.onload=startTask;
