if (parent.frames.length!=0) 
{parent.location.href=location.href;}

for(imop=0;imop<2;imop++){
var coull=new Array("#b5d3f2","white")}
function change_coul(){
var champ=document.essai.natach.options[0];
champ.style.color=coull[imop];
if (imop>2){imop=0}
else {imop++}
setTimeout("change_coul()",200);
}

function resul(){
window.open('result.html','nouvl','width=300,height=375');
}
function reper(){
window.open('reperes.php','nouvi','width=350,height=360');
}
function lancera(){
var entree=document.formi.entree.value;
nounnu=window.open('moteur.php','nouveau','width=500,height=150,scrollbars=1')
}




function montre_source() {
window.location="view-source:"+window.location;
}

function inclure(){
a="<html>";
var b="</html>";
var c="<body>";
var d="</body>";



champ1=document.forme2.textee.value;


if (document.forme2.textee.value==""){
alert("Aucune instruction à executer !");
}
else if (champ1.indexOf("script")!=-1){alert("Pas de script SVP.\n");}
else if ((champ1.indexOf(a)==-1)||(champ1.indexOf(b)==-1)||(champ1.indexOf(c)==-1)||(champ1.indexOf(d)==-1)){
alert("Votre page HTML comporte des erreurs !");
}
else{
document.write(document.forme2.textee.value);
}
}

function limiter() {
var champ=document.quest.commentaire.value;
if (champ.length>60) {alert("Attention ! \n Vous êtes limité à 60 caractères... \n Votre commentaire sera détruit !");
document.quest.commentaire.value="Je suis trop bavard...";
}
}

var ligne1;
var ligne2;
var ligne3;
function additionner(){
alert("Votre total est de "+(ligne1+ligne2+ligne3));
}

function verif() {
champ=document.forme.mail.value;
if (champ.indexOf("@")==-1)
{alert("Votre e-mail est invalide");}
else alert("OK !")
}

function quoi() {
var d="mon_code";
if (document.forme.champ.value==d){alert("Bienvenue chez vous !")}
else {alert("Votre code est erroné !")}
}

function quoi2() 
{
var d=123456789;
if (document.forme2.champ2.value==d)
{
alert("Bienvenue chez vous !");
}
else
{
alert("Votre code est erroné !");
}
}

function quoi3() 
{
var d="le vélo de ma grand-mère";
if (document.forme3.champ3.value==d)
{
alert("Bienvenue chez vous !");
}
else
{
alert("Votre code est erroné !");
}
}

function affi1(sexe,age,nationalite){
alert("Vous êtes de sexe "+sexe+" , vous avez "+age+" ans et vous êtes "+nationalite+" !");
}

function longa() {
var ca=document.forme2.champ2.value;
if (ca.length>=3){
alert("Bienvenue chez vous !")}
else {
alert ("Votre code est erroné !")}
}

function longb() {
var cn=document.formeb.champb.value;
if (cn.length>=3){alert("Bienvenue chez vous !")}
else {alert("Votre code est erroné !")}
}

function montre(kk) {
var garage=new Array("renault","citroen","mercedes","seat","peugeot");
document.formea.champ.value="Cette voiture est une "+garage[kk]+" !";
}

var motc=new Array("Salut !","bonjour !","au revoir !","à bientôt...","Adieu !");
function feu(lmp){
document.getElementById('mon_div').innerHTML=motc[lmp];
}

if (navigator.appVersion.substring(0,1)>=3)
{
a1=new Image;
a1.src="thedice.gif";
a2=new Image;
a2.src="golf.gif";
a3= new Image;
a3.src="pausecafe.gif";
}

for (p=0;p<3;p++)
var lieudi=new Array("img/thedice.gif","img/golf.gif","img/pausecafe.gif","img/doublefete.gif");
function affiches(){

var NS4 = (document.layers)?1:0; 
var IE4 = (document.all)?1:0; 
var W3C = (document.getElementById)?1:0; 
if (W3C){var limag = document.getElementById('imagesi');}
else if (NS4){var limag = document.dimage.document.images['imagesi'];} 
else {var limag = document.images.imagesi;}

if (p>2){p=0}
else {p++}


if (W3C){limag.src=lieudi[p];}
if (IE4){limag.src=lieudi[p];}
if (NS4){limag.src=lieudi[p];}
setTimeout('affiches()',1000);
}

for(h=0;h<3;h++){
var mot=new Array("salut","bonjour","au revoir","à bientôt")}
function ecrit(){
var NS4 = (document.layers)?1:0; 
var IE4 = (document.all)?1:0; 
var W3C = (document.getElementById)?1:0; 
if (W3C){var baba = document.getElementById('blabla');}
else if (NS4){var baba = document.layers['blabla'];}
else {var baba = document.all['blabla'];} 
if (h>2){h=0}
else {h++}
if (W3C){baba.innerHTML=mot[h];}
if (IE4){baba.innerHTML=mot[h];}
if (NS4)
{baba.document.open();
baba.document.write(mot[h]);
baba.document.close();}
setTimeout('ecrit()',1000)
}

function ouvre(){
window.open('golf.jpg','fenetre','width=650,height=500');
} 
function ouvre2(){
window.open('golf.jpg','fenêtre2','width=650,height=500,toolbar=1,location=1,directories=1,menuBar=1,scrollbars=1,resizable=1'); 
}
function ouvre3(){
corail=window.open('golf.gif','fenetre3','width=150,height=120');
} 
function ouvre4(){
coraux=window.open('golf.gif','fenetre3','width=150,height=120,top=400,left=400');
} 

var pop=new Array("img/golf.gif","img/pausecafe.gif","img/thedice.gif","img/doublefete.gif");
function nesepa(){
var numero=Math.floor(Math.random()*4);
surprise=window.open(pop[numero],'ouvert','width=150,height=120,left=300');
}

function diri(){
var choix=document.formulaire.pourquoi.selectedIndex;
switch (choix)
{case 0:location.href="hono.html";break;
case 1:location.href="golf.html";break;
default:location.href="lacarte.html";break;
}
}

function etmoi(){
var choixb=document.monfor.selecta.options.value;
switch(choixb)
{case "moi":location.href="hono.html";break;
case "toi":location.href="golf.html";break;
default:location.href="lacarte.html";break;
}
}

function nouva(){
var indi=document.formo.select1.selectedIndex;
var choixa=document.formo.select1.options[indi].value;
switch(choixa)
{case "vache":
document.formo.selectb.options[0].text="lait";
document.formo.selectb.options[1].text="viande";
document.formo.selectb.options[2].text="beurre";
break;
case "homme":
document.formo.selectb.options[0].text="détruire";
document.formo.selectb.options[1].text="apprendre";
document.formo.selectb.options[2].text="construire";
break;
case "chien":
document.formo.selectb.options[0].text="mordre";
document.formo.selectb.options[1].text="aboyer";
document.formo.selectb.options[2].text="manger";
break;
default:document.formo.selectb.options[0].text="----------------------";break;
}
}

function savoir(){
var indi=document.pige.compris.selectedIndex;
var finala=document.pige.compris.options[indi].value;
switch(finala){
case "ni":document.pige.texterc.value="et voilà, c'est reparti !";break;
case "na":document.pige.texterc.value="toujours dur de travailler...";break;
case "ne":document.pige.texterc.value="quand cela va-t'il finir ?";break;
case "nu":document.pige.texterc.value="hum, l'odeur du week-end !!!";break;
case "nov":document.pige.texterc.value="encore un jour et c'est bon !";break;
case "ny":document.pige.texterc.value="Waoow ! On y est...";break;
default:document.pige.texterc.value="Pourvu que ça dure...";break;
}
}
for(yop=0;yop<2;yop++){
var couleur=new Array("black","red")}
function ma_coul(){
var champ=document.rega.gare.options[0];
champ.style.color=couleur[yop];
if (yop>2){yop=0}
else {yop++}
setTimeout("ma_coul()",200);
}

var mon_mot="Je vEuX un SiTE suPeR...";
function minu(){
var devient=mon_mot.toLowerCase();
alert(devient);
}
function maju(){
var devi=mon_mot.toUpperCase();
alert(devi);
}
function comb(){
var comb=mon_mot.length;
alert("Cette chaîne contient "+comb+" caractères...");
}
function oudonc(){
var oudonc=mon_mot.substring(0,6);
alert("Les 5 caractères à partir de l\'indice 0 sont : \'"+oudonc+" \'");
}
function quece(){
var quece=mon_mot.charAt(11);
alert("L\'indice 11 correspond à la lettre "+quece);
}
function endroi(){
var endroi=mon_mot.indexOf("un");
alert("La sous-chaîne 'un' commence à l\'indice "+endroi);
}
function expliq(commen){
var expliq=new Array
("style=\"width:100%;filter:Glow(color=red,strength=9)\"",
"style=\"width:100%;filter:DropShadow(color=black,offx=3,offy=3)\"",
"style=\"width:100%;filter:Wave(freq=3,light=30,phase=40,strength=4)\"",
"style=\"width:100%;filter:Blur(direction=90,strength=90)\"",
"style=\"width:100%;filter:Shadow(color=black,direction=225)\"",
"Attention ici, style=\"filter:Invert()\" est inséré dans la balise même de l'image et non dans le &lt;span&gt;",
"Attention ici, style=\"filter:Chroma(color=00b5ef)\" est inséré dans la balise même de l'image et non dans le &lt;span&gt;<br>Ce filtre rend transparent la couleur spécifiée entre parenthèses... <br>Cette couleur pouvant être désignée par sa référence hexadécimale (sans le #)",
"Ici aussi, style=\"filter:XRay()\" est inséré dans la balise même de l'image et non dans le &lt;span&gt;");
document.write("<html><body bgcolor='white'><blockquote><br><br><br><br><br><br><br><br><center><font face='verdana' size='2' color='#009999'><b>Le code qui suit posséde des paramètres que vous pouvez modifier à loisir...<br>Note : certains de ces filtres sont applicables aux images...<br><br>"+expliq[commen]+"</b></font><br><br><a href='javascript:history.go(-1);'><font color='#009999' face='verdana' size='2'>Retour</font></a></center></blockquote></body></html>");
}
function allez(){
var indi=document.formidable.natach.selectedIndex;
var choixa=document.formidable.natach.options[indi].value;
if (choixa!='rien'){
document.formidable.submit();
}
}