function runClock()
{
	var autoupdate	= 1;	// 0 = STATIC CLOCK, 1 = DYNAMIC CLOCK
	var timesystem	= 1;	// 0 = USER'S TIME, 1 = UNIVERSAL TIME (GMT/UTC)
	var twelvehour	= 0;	// 0 = 24 HOUR CLOCK, 1 = 12 HOUR CLOCK
	var padhours	= 1;	// 0 = DO NOT ZERO-PAD HOURS (EG. 6), 1 = ZERO PAD HOURS (EG. 06)
	var offset		=  -4;	// NUMBER OF HOURS TO OFFSET THE TIME
	
	// DISPLAY TEXT FOR WEEKDAYS AND MONTHS:
	var days		= new Array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi");
	var months		= new Array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre");

	// TEMPLATE FOR THE DATE AND TIME DISPLAY:
	// {day} {date} {suffix} {month} {year} {hours} {minutes} {seconds} {ampm}
	var template	= "{day}, {date} {month} {year} &nbsp;&nbsp;&nbsp; {hours}:{minutes}:{seconds} (heure locale de Montréal)&nbsp;&nbsp;&nbsp;";



	// NO CONFIGURATION OPTIONS BELOW THIS POINT
	
	var currentTime = new Date((new Date()).valueOf() + (offset*60*60*1000))
	if (timesystem)
	{
		var hours	= currentTime.getUTCHours();
		var minutes	= currentTime.getUTCMinutes();
		var seconds	= currentTime.getUTCSeconds();
		
		var day		= days[currentTime.getUTCDay()];
		var date	= currentTime.getUTCDate();
		var month	= months[currentTime.getUTCMonth()];
		var year	= currentTime.getUTCFullYear();
	} else {
		var hours	= currentTime.getHours();
		var minutes	= currentTime.getMinutes();
		var seconds	= currentTime.getSeconds();
		var day		= days[currentTime.getDay()];
		var date	= currentTime.getDate();
		var month	= months[currentTime.getMonth()];
		var year	= currentTime.getFullYear();
	}
	if (hours > 12 && twelvehour) { hours = hours - 12; }
	template = template.replace(/\{hours\}/g, padhours ? padder(hours) : hours);
	template = template.replace(/\{minutes\}/g, padder(minutes));
	template = template.replace(/\{seconds\}/g, padder(seconds));
	template = template.replace(/\{day\}/g, day);
	template = template.replace(/\{date\}/g, date);
	template = template.replace(/\{month\}/g, month);
	template = template.replace(/\{year\}/g, year);
	document.getElementById('itronclock').innerHTML = template;
	if (autoupdate) { setTimeout("runClock()",1000); }
}

function padder(num)
{
	return (num < 10) ? "0" + num : num;
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



// button code


/*** SET BUTTON'S FOLDER HERE ***/
var buttonFolder2 = "http://www.labibleparle.com/buttons2/";
/*** SET BUTTONS' FILENAMES HERE ***/
upSources2 = new Array("button1up.png","button2up.png","button3up.png","button4up.png","button5up.png","button6up.png");

overSources2 = new Array("button1over.png","button2over.png","button3over.png","button4over.png","button5over.png","button6over.png");

// SUB MENUS DECLARATION, YOU DONT NEED TO EDIT THIS
subInfoA = new Array();
subInfoA[1] = new Array();
subInfoA[2] = new Array();
subInfoA[3] = new Array();
subInfoA[4] = new Array();
subInfoA[5] = new Array();
subInfoA[6] = new Array();


//*** SET SUB MENUS TEXT LINKS AND TARGETS HERE ***//

subInfoA[4][1] = new Array("Audio","http://www.labibleparle.com/predications/audio.html","_self");
subInfoA[4][2] = new Array("Vidéo","http://www.labibleparle.com/predications/video.html","_self");


//*** SET SUB MENU POSITION ( RELATIVE TO BUTTON ) ***//
var xSubOffset2 = 1;
var ySubOffset2 = 31;



//*** NO MORE SETTINGS BEYOND THIS POINT ***//
var overSub2 = false;
var delay2 = 1000;
totalButtons2 = upSources2.length;

// GENERATE SUB MENUS
for ( x=0; x<totalButtons2; x++) {
	// SET EMPTY DIV FOR BUTTONS WITHOUT SUBMENU
	if ( subInfoA[x+1].length < 1 ) { 
		document.write('<div id="submenu_' + (x+1) + '">');
	// SET DIV FOR BUTTONS WITH SUBMENU
	} else {
		document.write('<div id="submenu_' + (x+1) + '" class="dropmenu" ');
		document.write('onMouseOver="overSub2=true;');
		document.write('setOverImg_(\'' + (x+1) + '\',\'\');"');
		document.write('onMouseOut="overSub2=false;');
		document.write('setTimeout(\'hideSubmenu2(\\\'submenu_' + (x+1) + '\\\')\',delay2);');
		document.write('setOutImg_(\'' + (x+1) + '\',\'\');">');


		document.write('<ul>');
		for ( k=0; k<subInfoA[x+1].length-1; k++ ) {
			document.write('<li>');
			document.write('<a href="' + subInfoA[x+1][k+1][1] + '" ');
			document.write('target="' + subInfoA[x+1][k+1][2] + '">');
			document.write( subInfoA[x+1][k+1][0] + '</a>');
			document.write('</li>');
		}
		document.write('</ul>');
	}
	document.write('</div>');
}

document.write('<link rel="stylesheet" type="text/css" href="http://www.labibleparle.com/menustyle.css" media="screen, print">'); 

//*** MAIN BUTTONS FUNCTIONS ***//
// PRELOAD MAIN MENU BUTTON IMAGES
function preload() {
	for ( x=0; x<totalButtons2; x++ ) {
		buttonUp = new Image();
		buttonUp.src = buttonFolder2 + upSources2[x];
		buttonOver = new Image();
		buttonOver.src = buttonFolder2 + overSources2[x];
	}
}

// SET MOUSEOVER BUTTON
function setOverImg_(But, ID) {
	document.getElementById('button_' + But + ID).src = buttonFolder2 + overSources2[But-1];
}

// SET MOUSEOUT BUTTON
function setOutImg_(But, ID) {
	document.getElementById('button_' + But + ID).src = buttonFolder2 + upSources2[But-1];
}



//*** SUB MENU FUNCTIONS ***//
// GET ELEMENT ID MULTI BROWSER
function getElement2(id) {
	return document.getElementById ? document.getElementById(id) : document.all ? document.all(id) : null; 
}

// GET X COORDINATE

function getRealLeft_(id) { 
	var el = getElement2(id);
	if (el) { 
		xPos = el.offsetLeft;
		tempEl = el.offsetParent;
		while (tempEl != null) {
			xPos += tempEl.offsetLeft;
			tempEl = tempEl.offsetParent;
		} 
		return xPos;
	} 
} 

// GET Y COORDINATE
function getRealTop_(id) {
	var el = getElement2(id);
	if (el) { 
		yPos = el.offsetTop;
		tempEl = el.offsetParent;
		while (tempEl != null) {
			yPos += tempEl.offsetTop;
			tempEl = tempEl.offsetParent;
		}
		return yPos;
	}
}

// MOVE OBJECT TO COORDINATE
function moveObjectTo_(objectID,x,y) {
	var el = getElement2(objectID);
	el.style.left = x;
	el.style.top = y;
}

// MOVE SUBMENU TO CORRESPONDING BUTTON
function showSubMenu2(subID, buttonID) {
	hideAllSubMenus2();
	butX = getRealLeft_(buttonID);
	butY = getRealTop_(buttonID);
	moveObjectTo_(subID,butX+xSubOffset2, butY+ySubOffset2);
}

// HIDE ALL SUB MENUS
function hideAllSubMenus2() {
	for ( x=0; x<totalButtons2; x++) {
		moveObjectTo_("submenu_" + (x+1) + "",-500, -500 );
	}
}

// HIDE ONE SUB MENU
function hideSubmenu2(subID) {
	if ( overSub2 == false ) {
		moveObjectTo_(subID,-500, -500);
	}
}



//preload();



//end of button code begining of menu

document.write("<body onLoad=\"runClock()\">");


document.write("<table width=\"1005\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
document.write("<tr>");
document.write("<td height=\"124\" colspan=\"15\" valign=\"bottom\" background=\"http://www.labibleparle.com/images/bibleparle_entete.gif\"> <FONT COLOR=\"#FFFFFF\"> <span style=\"font-size: 12px; color: #ffffff; font-family: Arial, Helvetica, sans-serif\"><div align=\"right\" id=\"itronclock\"></span>");
document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
	
document.write("</div></td>");
document.write("</tr>");
document.write("<tr>");

document.write("<td width=\"5\" height=\"50\" valign=\"top\" bgcolor=\"#000066\"></td>");

document.write("<td width=\"7\" bgcolor=\"#FFFFFF\">&nbsp;</td>");

document.write("</td>");
document.write("<td>");

document.write("<a href=\"http://www.labibleparle.com/index.html\" onMouseOver=\"setOverImg_(\'1\',\'\');overSub2=true;showSubMenu2(\'submenu_1\',\'button_1\');\" onMouseOut=\"setOutImg_(\'1\',\'\');overSub2=false;setTimeout(\'hideSubmenu2(\\'submenu_1\\')\',delay2);\" target=\"\"><img src=\"http://www.labibleparle.com/buttons2/button1up.png\" border=\"1\" id=\"button_1\" vspace=\"0\" hspace=\"0\"></a><br>");
document.write("</td>");
document.write("<td>");
document.write("<a href=\"http://www.labibleparle.com/mot_pasteur.html\" onMouseOver=\"setOverImg_(\'2\',\'\');overSub2=true;showSubMenu2(\'submenu_2\',\'button_2\');\" onMouseOut=\"setOutImg_(\'2\',\'\');overSub2=false;setTimeout(\'hideSubmenu2(\\'submenu_2\\')\',delay2);\" target=\"\"><img src=\"http://www.labibleparle.com/buttons2/button2up.png\" border=\"1\" id=\"button_2\" vspace=\"0\" hspace=\"0\"></a><br>");
document.write("</td>");
document.write("<td>");
document.write("<a href=\"http://www.labibleparle.com/semainier/Semainier.pdf\" onMouseOver=\"setOverImg_(\'3\',\'\');overSub2=true;showSubMenu2(\'submenu_3\',\'button_3\');\" onMouseOut=\"setOutImg_(\'3\',\'\');overSub2=false;setTimeout(\'hideSubmenu2(\\'submenu_3\\')\',delay2);\" target=\"blank\"><img src=\"http://www.labibleparle.com/buttons2/button3up.png\" border=\"1\" id=\"button_3\" vspace=\"0\" hspace=\"0\"></a><br>");
document.write("</td>");
document.write("<td>");
document.write("<a href=\"#\" onMouseOver=\"setOverImg_(\'4\',\'\');overSub2=true;showSubMenu2(\'submenu_4\',\'button_4\');\" onMouseOut=\"setOutImg_(\'4\',\'\');overSub2=false;setTimeout(\'hideSubmenu2(\\'submenu_4\\')\',delay2);\" target=\"\"><img src=\"http://www.labibleparle.com/buttons2/button4up.png\" border=\"1\" id=\"button_4\" vspace=\"0\" hspace=\"0\"></a><br>");
document.write("</td>");
document.write("<td>");
document.write("<a href=\"http://www.labibleparle.com/liens/liens.html\" onMouseOver=\"setOverImg_(\'5\',\'\');overSub2=true;showSubMenu2(\'submenu_5\',\'button_5\');\" onMouseOut=\"setOutImg_(\'5\',\'\');overSub2=false;setTimeout(\'hideSubmenu2(\\'submenu_5\\')\',delay2);\" target=\"\"><img src=\"http://www.labibleparle.com/buttons2/button5up.png\" border=\"1\" id=\"button_5\" vspace=\"0\" hspace=\"0\"></a><br>");
document.write("</td>");
document.write("<td>");
document.write("<a href=\"http://www.labibleparle.com/evenements/evenements.html\" onMouseOver=\"setOverImg_(\'6\',\'\');overSub2=true;showSubMenu2(\'submenu_6\',\'button_6\');\" onMouseOut=\"setOutImg_(\'6\',\'\');overSub2=false;setTimeout(\'hideSubmenu2(\\'submenu_6\\')\',delay2);\" target=\"\"><img src=\"http://www.labibleparle.com/buttons2/button6up.png\" border=\"1\" id=\"button_6\" vspace=\"0\" hspace=\"0\"></a><br>");
document.write("</td>");



document.write("<td width=\"7\" bgcolor=\"#FFFFFF\">&nbsp;</td>");

document.write("<td width=\"5\" height=\"50\" valign=\"top\" bgcolor=\"#000066\">&nbsp;</td>");

document.write("</tr>");
document.write("</table>");

