// 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.close();}
var paramStr = "top=40,left=40,width=" + w + ",height=" + h + ",menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no";
newWindow=window.open(addr,winnom,paramStr);
newWindow.focus();
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function webwin(addr,winnom,w,h){
if (newWindow) {newWindow.close();}
var paramStr = "top=40,left=40,width=" + w + ",height=" + h + ",menubar=yes,scrollbars=yes,resizable=yes,location=yes,toolbar=no"; 
newWindow=window.open(addr,winnom,paramStr);
newWindow.focus();
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function movwin(addr,winnom,w,h){
if (newWindow && newWindow.open && !newWindow.closed) newWindow.close();	
//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 show(thisbit,divname) {
	for (var i = 1; i <= masked; i++) {
		var cur = divname + i;
		var wot = document.getElementById(cur);
		if(i==thisbit) {
			var dowot=wot;
		}else{
			wot.className='hid';
		}
	}
	dowot.style.opacity=0;
	dowot.className='vis';
	fadeEffect.init(dowot.id, 1);
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function hide(thisbit,divname) {
thebit = divname + thisbit;
  var wot = document.getElementById(thebit);
  if (wot) {
	fadeEffect.init(wot.id, 0);
  }
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
var fadeEffect=function(){
	return{
		init:function(nm, flag, target){
			hd=flag;
			id=nm;
			this.elem = document.getElementById(id);
			clearInterval(this.elem.si);
			this.target = target ? target : flag ? 100 : 0;
			this.flag = flag || -1;
			this.alpha = this.elem.style.opacity ? parseFloat(this.elem.style.opacity) * 100 : 0;
			this.si = setInterval(function(){fadeEffect.tween()}, 20);
		},
		tween:function(){
			if(this.alpha == this.target){
				clearInterval(this.si);
					if(this.alpha == 0) this.elem.className='hid';
			}else{
				var value = Math.round(this.alpha + ((this.target - this.alpha) * .02)) + (1 * this.flag);
				this.elem.style.opacity = value / 100;
				this.elem.style.filter = 'alpha(opacity=' + value + ')';
				this.alpha = value
			}
		}
	}
}();
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
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;
		}
}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
function Logo(){
var fade=0,logo=document.getElementById("film4").style,ms=(logo.opacity==0)?0:1,pace=setInterval(Fade,20);
  function Fade(){
	  if(fade<100){fade+=1;
		if(ms)logo.filter="alpha(opacity="+fade+")";else logo.opacity=(fade/100)
	  }else clearInterval(pace)
  }
};
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

