//
// javascript for RITMA
//

group = "";

function Retreive_Group()
{
	var query = window.location.search.substring(1);
	var parms = query.split('&');

	for (var i=0; i<parms.length; i++)
	{
		var pos = parms[i].indexOf('=');
		if (pos > 0)
		{
			var key = parms[i].substring(0,pos);
			var val = parms[i].substring(pos+1);

			if ( key == "group" )
			{
				group = val;
			}
		}
	}
}

function Show_Logo()
{
	if ( group == "1" )
	{
		document.write( '<img src="../images/RITMA_Massotherapeutes.jpg" width="624" height="119" border="0" alt="Regroupement des Intervenants et Therapeutes en Medecine Alternative">' );
	}
	else if ( group == "2" )
	{
		document.write( '<img src="../images/RITMA_Naturotherapeutes.jpg" width="624" height="119" border="0" alt="Regroupement des Intervenants et Therapeutes en Medecine Alternative">' );
	}
	else if ( group == "3" )
	{
		document.write( '<img src="../images/RITMA_Naturopathes.jpg" width="624" height="119" border="0" alt="Regroupement des Intervenants et Therapeutes en Medecine Alternative">' );
	}
	else if ( group == "4" )
	{
		document.write( '<img src="../images/RITMA_Osteopathes.jpg" width="624" height="119" border="0" alt="Regroupement des Intervenants et Therapeutes en Medecine Alternative">' );
	}
	else if ( group == "5" )
	{
		document.write( '<img src="../images/RITMA_Hypnotherapeutes.jpg" width="624" height="119" border="0" alt="Regroupement des Intervenants et Therapeutes en Medecine Alternative">' );
	}
	else
	{
		document.write( '<img src="../images/i_C1R1_0.jpg" width="624" height="119" border="0" alt="Regroupement des Intervenants et Therapeutes en Medecine Alternative">' );
	}
}

function Links_To(page_value)
{ 
	window.location.replace('http://' + window.location.hostname + '/' + page_value + '?group=' + group );
//	window.location.replace('file:///C:/Design/Ritma/Site/' + page_value + '?group=' + group );
}


function Criteres_Link()
{
	if ( group == "1" )
	{
		window.location.replace('http://' + window.location.hostname + '/Masso_criteres.pdf' );
		//document.write( 'Masso_criteres.pdf' );
	}
	else if ( group == "2" )
	{
		window.location.replace('http://' + window.location.hostname + '/Naturothe_criteres.pdf' );
		//document.write( 'Naturothe_criteres.pdf' );
	}
	else if ( group == "3" )
	{
		window.location.replace('http://' + window.location.hostname + '/Naturo_criteres.pdf' );
		//document.write( 'Naturo_criteres.pdf' );
	}
	else if ( group == "4" )
	{
		window.location.replace('http://' + window.location.hostname + '/Osteo_criteres.pdf' );
		//document.write( 'Osteo_criteres.pdf' );
	}
	else if ( group == "5" )
	{
		window.location.replace('http://' + window.location.hostname + '/Criteres.htm?group=' + group );
		//document.write( 'Criteres.htm' );
	}
	else
	{
		window.location.replace('http://' + window.location.hostname + '/Criteres.htm?group=' + group );
		//document.write( 'Criteres.htm' );
	}
}



function Codes_Link()
{
	if ( group == "1" )
	{
		window.location.replace('http://' + window.location.hostname + '/CodeDeontologie_masso_ritma.pdf' );
		//document.write( 'Masso_criteres.pdf' );
	}
	else if ( group == "2" )
	{
		window.location.replace('http://' + window.location.hostname + '/CodeDeontologie_naturothe_ritma.pdf' );
		//document.write( 'Naturothe_criteres.pdf' );
	}
	else if ( group == "3" )
	{
		window.location.replace('http://' + window.location.hostname + '/CodeDeontologie_naturo_ritma.pdf' );
		//document.write( 'Naturo_criteres.pdf' );
	}
	else if ( group == "4" )
	{
		window.location.replace('http://' + window.location.hostname + '/CodeDeontologie_osteo_ritma.pdf' );
		//document.write( 'Osteo_criteres.pdf' );
	}
	else if ( group == "5" )
	{
		window.location.replace('http://' + window.location.hostname + '/Codes.htm?group=' + group );
		//document.write( 'Criteres.htm' );
	}
	else
	{
		window.location.replace('http://' + window.location.hostname + '/Codes.htm?group=' + group );
		//document.write( 'Criteres.htm' );
	}
}



//
// Barre de defilement
//

msg = "Bienvenue sur le site de l'association RITMA";

timeID = 10;
stcnt = 16;
wmsg = new Array(33);
        wmsg[0]=msg;
        blnk = "                                                               ";
        for (i=1; i<32; i++)
        {
                b = blnk.substring(0,i);
                wmsg[i]="";
                for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
        }

function wiper()
{
        if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
        if (stcnt-- < -40) stcnt=31;
        status = str;
        clearTimeout(timeID);
        timeID = setTimeout("wiper()",100);
}


//
// Always run these function when page load.
//

Retreive_Group()
wiper()

////////////////
// End of File
