window.defaultStatus='Bienvenue sur Taekwon-do Drummondville-Sud';

// --------------------------------------------------------------------------------

domok = document.getElementById;
deplaceX = 60;
deplaceY = 20;
zoom = "100%";

if (domok)
	{
	skn = document.getElementById("topdecklink").style;

	if(navigator.appName.substring(0,3) == "Net")
		document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = get_mouse;
}
// --------------------------------------------------------------------------------
function poptext(msg)
	{
	var content ="<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1><TR><TD BGCOLOR=#ffffff class=paragraphe>"+msg+"</TD></TR></TABLE>";
	if (domok)
		{
	  	document.getElementById("topdecklink").innerHTML = content;
	  	skn.visibility = "visible";
  		}
}
// --------------------------------------------------------------------------------
function popmusic(msg)
	{
	var content = "<table border=0 cellpadding=0 cellspacing=0 bgcolor=#000000><tr><td>";
//<bgsound src=" +msg+ " loop=1>
    if (navigator.appName=="Microsoft Internet Explorer"){
    	content += "<bgsound src=" +msg+ " loop=1></bgsound>";}
    else {
	content += "<embed src=" +msg+ " hidden=true border=0 width=20 height=20 autostart=true loop=false>";}

	content += "</td></tr></table>";

	if (domok)
		{
	  	document.getElementById("popmusic").innerHTML = content;
  		}
}
// --------------------------------------------------------------------------------
function popChat(){
//alert("Désolé, ce service sera rétablie vers 20h00-3/3/2006");
	var fen = window.open("chat-asp2/conquerchat/default.asp","windowChat","width=595,height=560px,toolbar=0,menubar=0,scrollbars=1,resizable=0,status=0,location=0,left=30,top=20");
	fen.focus()
}
// --------------------------------------------------------------------------------
function popForum(){
//alert("Désolé, ce service sera rétablie vers le 16 mars 2006");
	var fenetre = window.open("http://taekwon-do.virtuaboard.com","windowForum","toolbar=1,menubar=1,scrollbars=1,resizable=1,status=1,location=1,left=30,top=20");
	fenetre.focus()
}
// --------------------------------------------------------------------------------
function get_mouse(e)
	{
	var x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
	var y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
	skn.left = x - deplaceX;
	skn.top = y + deplaceY;
}
// --------------------------------------------------------------------------------
function poplink(msg,bougerX,bougerY,zoom)
	{
	if (typeof(zoom) == "undefined") {zoom="100%"}

	deplaceX=bougerX;
	deplaceY=bougerY;
	var content ="<TABLE WIDTH="+zoom+" BORDER=0 CELLPADDING=2 CELLSPACING=1><TR><TD BGCOLOR=#000000><CENTER><img border=0 src="+msg+" width="+zoom+"></CENTER></TD></TR></TABLE>";
	if (domok)
		{
	  	document.getElementById("topdecklink").innerHTML = content;
	  	skn.visibility = "visible";
  		}
}
// --------------------------------------------------------------------------------
function killlink()
	{
	if (domok)
  		skn.visibility = "hidden";
	}
// --------------------------------------------------------------------------------
function popwindow(page,hauteur,large){
	if (typeof(large) == "undefined") {large=497}
	if (typeof(hauteur) == "undefined") {hauteur=400}
	var fenetre = window.open(page,"awindow","width="+large+",height=" + hauteur + "px,toolbar=0,menubar=0,scrollbars=0,resizable=0,status=0,location=0,left=30,top=0");
	fenetre.focus()
}
// --------------------------------------------------------------------------------
function toggleCode(i) {
	var a;
	var d = document.getElementById("code_"+i);
	var s = document.getElementById("s_code_"+i);
	if (i<30){
		for (a=1;a<25;a++){
			if(document.getElementById("code_"+a).style.display != "none" && a != i) {
				document.getElementById("code_"+a).style.display = "none";
				document.getElementById("s_code_"+a).innerHTML = document.getElementById("s_code_"+a).innerHTML.replace("-", "+");
			}
		}
	}else{
		for (a=30;a<49;a++){
			if(document.getElementById("code_"+a).style.display != "none" && a != i) {
				document.getElementById("code_"+a).style.display = "none";
				document.getElementById("s_code_"+a).innerHTML = document.getElementById("s_code_"+a).innerHTML.replace("-", "+");
			}
		}
	}

    if(d.style.display == "none") {
		s.innerHTML     = s.innerHTML.replace("+", "-");
        d.style.display = "block";
    }
    else {
		s.innerHTML     = s.innerHTML.replace("-", "+");
        d.style.display = "none";
    }
}
// --------------------------------------------------------------------------------

function rotateimage(){
	if (curindex1==(tempindex1=Math.floor(Math.random()*(randomimages.length)))){
		curindex1=curindex1==0? 1 : curindex1-1
	}
	else{
		curindex1=tempindex1
		document.images.defaultimage.src=randomimages[curindex1]
	}
}
//function imagerotate(){
//	if (curindex2==(tempindex2=Math.floor(Math.random()*(imagesrandom.length)))){
//		curindex2=curindex2==0? 1 : curindex2-1
//	}
//	else{
//		curindex2=tempindex2
//		document.images.imagedefault.src=imagesrandom[curindex2]
//	}
//}
// --------------------------------------------------------------------------------
function AjoutFavo() {
	if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {
		window.external.AddFavorite("http://www.tkdrummond.com","TaeKwon-Do Drummondville-Sud" );
	} else {
		alert("Cette fonctionnalité n'est proposée que par Internet Explorer 4+.\nUtilisez le menu Signets du navigateur.")
	}
}
