//COLLET Manuel


//	Force le bouton precedent a revenir sur la page d'acceuil si la page est arrivée depuis l'exterieur

function history_back() 
{
	if (window == top) 
		top.location.href="http://www.gscenario.com/index.htm";
	else 
		history.back();
}


//	si la page est appelée sans la frame la page d'acceuil est chargée


function framectrl()
{
	if(!(parent.frames["main_frame"] && parent.frames["menu"]))
		location.replace("http://www.gscenario.com");	
}



//	Fonction permettant de faire defiler un texte dans la barre de statut

function monscroll(longueur,letexte)
{
	var texte=" ";
	var ik,jk;

	for(ik=0;ik<letexte.length;ik++)
	{
		if (texte.length<200) {
			for(jk=0;jk<longueur;jk++) texte += " ";
			texte += letexte.substring(ik,ik+1);
		}
	}
	window.status=texte;
	longueur--;
	if (longueur==0) {
		longueur=50;
		var cmd="monscroll("+longueur+",\'"+letexte+"\')";
		timerTwo=window.setTimeout(cmd,5000);
	}
	else {
		var cmd="monscroll("+longueur+",\'"+letexte+"\')";
		timerTwo=window.setTimeout(cmd,70);
	}

}




//	Fonction qui change la couleur des barres de scroll

function chgcouleurbarre() 
{
	if(document.all)
	{
	if (document.body.clientwidth<event.clientX) with(document.body.style)
		{}
	else with(document.body.style) 
		{
		scrollbarDarkShadowColor="#FFFFF7";
		scrollbar3dLightColor="#FFFFF7";
		scrollbarArrowColor="#FF9900";
		scrollbarBaseColor="#000000";
		scrollbarFaceColor="#FFFFF7";
		scrollbarHighlightColor="#FF9900";
		scrollbarShadowColor="#FF9900";
		scrollbarTrackColor="#FFFFF7";
		}
	}
}


//	Instruction declenchant différents scripts

if (document.all) 
{
	document.onmousemove=framectrl;

}



//	Fonction permettant de changer la taille de la frame

function Frame_resizor()
{
	if(window.parent.document.body.cols!="0,*")	
		setTimeout('bouge(254,1)',10);
	else	
		setTimeout('bouge(0,0)',10);
		
}

function bouge(taille,sens)	//1 : gauche 0:Droite
{

	if(sens==0)
	{
		taille=taille+15;
		if(taille>=254) 
			taille=254;
		window.parent.document.body.cols=taille+",*"; 
		if(taille<254)
			setTimeout('bouge('+taille+',0)',10);	 
	}
	else
	{
		taille=taille-15;
		if(taille<=0) 
			taille=0;
		window.parent.document.body.cols=taille+",*";
		if(taille>0)
			setTimeout('bouge('+taille+',1)',10); 
	
	}
	
}



/* Fin des fonctions générales de présentation */
