// JavaScripts © 2008 Charles Houghton-Webb

var newWindow=''; brStrN="document."; brStrO="document.all.";
var colors= new Array('#ffffff','#ffff00');flip=0;TheBox='';ftimer='';ttimer='';stimer='';
var ripplebox="";initmsg="";ripplestyle="";rippleBackstyle="";defStyle="Wt_Bigger_BolItal";
var nav="x";Page=new Array();P=new Array();lastLayNo=1;lastLayNm="mem1";
var NextStep=1;StopIt=1;fadetimer='';TheMsgBox='';MsgStrg="";TagsNStr="";
//<<<<<<<<<<<<<<<<<---------------------------->>>>>>>>>>>>>>>>>>>
function rollover(nom, OverSrc) {
var img = eval((nav == 'N') ? brStrN+nom : brStrO+nom);

	if (img) {
		img.OrigSrc = img.src;
		img.src = OverSrc;
	}
}
//<<<<<<<<<<<<<<<<<---------------------------->>>>>>>>>>>>>>>>>>>
function rollout(nom) {
var img = eval((nav == 'N') ? brStrN+nom : brStrO+nom);
	if (img && img.OrigSrc) {
		img.src = img.OrigSrc;
		img.OrigSrc = null;
	}
}
//<<<<<<<<<<<<<<<<<---------------------------->>>>>>>>>>>>>>>>>>>
function quickwin(addr,winnom,w,h){
if (!newWindow || newWindow.closed) {
	var paramStr = "top=0,left=0,width=" + w + ",height=" + h + ",menubar=yes,scrollbars=yes,resizable=yes,location=yes,toolbar=yes" 
	newWindow=window.open(addr,winnom,paramStr);
	}
newWindow.focus();
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function movwin(addr,winnom,w,h){
if (!newWindow || newWindow.closed) {
	var paramStr = "top=250,left=250,width=" + w + ",height=" + h + ",menubar=no,scrollbars=no,resizable=no,location=no,toolbar=no" 
	newWindow=window.open(addr,winnom,paramStr);
	}
newWindow.focus();
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function docwin(capn, pth, wdth, hght) {
paramstr="window.open('','','top=0,left=0,width=" + String(wdth) + ",height=" + String(hght) + ",menubar=no,scrollbars=yes,resizable=yes,location=no,alwaysRaised=yes')";
initstr="<!DOCTYPE html public '-//W3C//DTD HTML 4.01 Transitional//EN'><html><head><title>Le CIM</title></head><body  background='Images/papier.jpg' onClick='window.close();'>";
textstr="<br><object type='text/html' data=" + pth + " width='160px' height='600px'></object>";
closestr='</body></html>'
newwin = eval(paramstr);
if (nav=="N"){
	newwin.captureEvents(Event.RESIZE);
	newwin.onresize=reinit;}
if (!newwin.opener) newwin.opener = self;
with (newwin.document) {
open();
write(initstr);
write(textstr);
write(closestr);
close();
   }
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function checkbrowser(){
docstr="document."
if(document.getElementById) {
	nav="N";
	}else if(document.all) {
		nav="E";
		docstr="document.all."
		}else {
			nav="x"
			}
return nav;
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function reinit(){
this.window.captureEvents(Event.CLICK);
this.window.onclick = window.close;
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function change() {
var Address = window.location.href;
var splitStr=Address.split("#");
if(splitStr.length == 1) {
	clearTimeout();
	return;
}
var anch = splitStr.pop();
flip = Math.abs(flip-1);
	if (document.layers) {
		window.document.layers[anch].bgColor = colors[flip];
	} else {
		document.getElementById(anch).style.background = colors[flip];
	}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function loop() {
  change();
  setTimeout('loop()',1000);
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function initPage(Tot) {
docstr="document."
	if(document.getElementById) {
		for (var i = 0; i < Tot; i++) {
			P[i]="P"+ (i+1);
			Page[i]=document.getElementById(P[i]);
		}
		nav="N";
	}
	if(document.all) {
		for (var i = 0; i < Tot; i++) {
			P[i]="P"+ (i+1);
			Page[i]=P[i];
		}		
			docstr="document.all.";
			nav="E";
	}

doLayer(1);
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function doLayer(thisOne) {
var currLayNo = thisOne;
var currLayNm = "mem" + thisOne;

	if((document.getElementById)&&(document.getElementById(currLayNm)!=null)) {
		document.getElementById(lastLayNm).style.visibility="hidden";
		document.getElementById(currLayNm).style.visibility="visible";
	}
	Page[lastLayNo-1].innerHTML='<FONT color="#345488">'+lastLayNo+'.</FONT>';
	Page[currLayNo-1].innerHTML='<FONT color="#FF0000">'+currLayNo+'.</FONT>';
	
	lastLayNm = currLayNm;
	lastLayNo = currLayNo;
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function Dofade() {
size += 1;
sizeStr = size + "px";
theArea.style.fontSize = sizeStr;
	if(size<limit) {
		fadetimer=window.setTimeout("Dofade()",50);
	} else {
		NextStep += 1;
		clearTimeout(fadetimer);
		seq(NextStep,StopIt);
	}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function fade(thatbit,TagsNStr) {
	if((document.getElementById)&&(document.getElementById(thatbit)!=null)) {
		theArea=document.getElementById(thatbit);
		theArea.style.visibility="visible";
		clearTimeout(fadetimer);
		size=0;
		if(document.getElementById||document.all) {
			TheMsgBox.innerHTML=TagsNStr;
		}else{
			ns4tw.document.write(TagsNStr);ns4tw.document.close();
			}
		Dofade();
	}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
function seq1(NextStep,end) {
	StopIt = end;
	seq(NextStep);
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function seq(NextStep) {
	if (NextStep > StopIt) return;
var NextDiv = "Box" + NextStep
	if(nav=='N') {
		TheMsgBox=document.getElementById(NextDiv);
	} else {
		TheMsgBox=NextDiv;
	}
	
	switch (NextStep) 
	{ 
	case 1: 
		limit = 48;
		TagsNStr='<div align=Center style="text-decoration:none; color:#FFFFFF">Bienvenue sur le site du</div>'
		fade(NextDiv,TagsNStr);
	break; 
	case 2: 
		limit = 36;
		TagsNStr='<div  style="text-decoration:none; color:#FFCC00"><a href="index1.htm" onClick="if(this.blur)this.blur()" onMouseOver="this.style.color=\'#CC66CC\';return true" onMouseOut="this.style.color=\'#FFCC00\';">Entrer</a></div>'
		fade(NextDiv,TagsNStr);
	break; 
	case 3: 
		limit = 24;
		fade(NextDiv,'CIM');
	break; 
	case 4: 
		limit = 24;
		fade(NextDiv,'Centre'); 
	break; 
	case 5: 
		limit = 24;
		fade(NextDiv,'International de');
	break; 
	default: 
		limit = 36;
		fade(NextDiv,'Musicoth&eacute;rapie');
	break; 
	}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function show(thisbit) {
	for (var i = 1; i <= infoli; i++) {
		var cur = "infoli" + i;
		var wot = document.getElementById(cur);
		if(i==thisbit) {
			wot.className='vis'
		}else{
			wot.className='hid';
		}
	}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function hide(thisbit) {
thebit = "infoli" + thisbit;
  var wot = document.getElementById(thebit);
  if (wot) {
    wot.className='hid';
  }
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function sweep(){
	if(curr<=themsg.length){
	strg='';
	for(var lp=0;lp<themsg.length;lp++){
	if(lp==curr) strg+='<font color="#FF6600">'+themsg.charAt(curr)+'</font>';
	else strg+=themsg.charAt(lp);
	}
	if(document.getElementById||document.all)TheBox.innerHTML='<div class='+ripplestyle+'><b>'+strg+'</b></div>';
	else{
	ns4tw.document.write('<div class='+ripplestyle+'><b>'+strg+'</b></div>');ns4tw.document.close();
	}
	if(curr<themsg.length)curr++;
	else{
		rippleBack();
		}
	}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function sweepBack(){
if(curr>=0){
	strg='';
	for(var lp=0;lp<themsg.length;lp++){
	if(lp==curr) strg+='<font color="#FF6600">'+themsg.charAt(curr)+'</font>';
	else strg+=themsg.charAt(lp);
	}
	if(document.getElementById||document.all)TheBox.innerHTML='<div class='+rippleBackstyle+'><b>'+strg+'</b></div>';
	else{
	ns4tw.document.write('<div class='+rippleBackstyle+'><b>'+strg+'</b></div>');ns4tw.document.close();
	}
	if(curr>0)curr--;
	else{
		rippleThere();
		}
	}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function rippleBack(){
clearInterval(ttimer);
curr=themsg.length-1;
ttimer=setInterval("sweepBack();",30);
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function rippleThere(){
clearInterval(ttimer);
curr=themsg.length;
curr=0;
ttimer=setInterval("sweep();",30);
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function ripple(n,b,r,rb){
clearInterval(stimer);
themsg=n;
if (r){ripplestyle=r;}else{ripplestyle=defStyle;}
if (rb){rippleBackstyle=rb;}else{rippleBackstyle=ripplestyle;}
ripplebox=browserise(b);
rippleThere();
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function browserise(boxID){
TheBox=document.getElementById(boxID);
if(document.getElementById) {
	nav="N";
	}else if(document.all) {
		nav="E";
		docstr="document.all."
		TheBox=boxID;
		}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<