/* LINESCORT  24/04/2007
**fonction permettant de charger via la balise <a>
** de nouvelles informations en specifiant l'onglet de destination
* 	CIBLE: nom de l'onglet		 -		 LIEN: url
*/
function read(cible,lien){
var o = document.getElementById(cible);
var a = o.getElementsByTagName('a');
a[0].href = lien;
expandtab('maintab', 1); // 'maintab'  est l'ID de l'UL des onglets
var s = document.getElementById("myScrollerContent"); //myScrollerContent est la div cible pour le contenu
s.style.top = "0px";
}
function readEdition(ID){
var o = document.getElementById('onglet2');
a     = o.getElementsByTagName('a');
a[0].href = "edition_texte.asp?numedition=" + ID;
a[0].rev  = "slideList_edition.asp?numedition=" + ID;
expandtab('maintab', 1); // 'maintab'  est l'ID de l'UL des onglets
var s = document.getElementById("myScrollerContent"); //myScrollerContent est la div cible pour le contenu
s.style.top = "0px";
}
function readSerie(ID){
var o = document.getElementById('onglet4');
a     = o.getElementsByTagName('a');
a[0].href = "galerie_texte.asp?numserie=" + ID;
a[0].rev  = "slideList_galerie.asp?numserie=" + ID;
expandtab('maintab', 3); // 'maintab'  est l'ID de l'UL des onglets
var s = document.getElementById("myScrollerContent"); //myScrollerContent est la div cible pour le contenu
s.style.top = "0px";
}
function readThemes(ID){
var o = document.getElementById('onglets');
a     = o.getElementsByTagName('a');
a[0].rev  = "slideList_themes.asp?numserie=" + ID;

loadobjs(document.getElementById('onglets').getElementsByTagName("a")[0].getAttribute("rev"))	

}

/*fonction permettant de replacer le bouton de scroll
* et de redimensionner (auto) la div contenant le texte
*/
function resetScroll(){
var s = document.getElementById("myScrollerContent");
var t = document.getElementById("thumb0");
typeof myScroller != "undefined" ? myScroller.load() : null;
typeof myScroller != "undefined" ? myScroller.jumpTo(null,0) : null;//this.myScroller.scrollTop = "0px";//s.style.top;
t.style.top = "0px";
typeof initDragger != "undefined" ? initDragger() : null;
}
/*
function resetScroll(){
var s = document.getElementById("myScrollerContent");
this.myScroller.scrollTop = s.style.top;
this.myScroller.load();
var t = document.getElementById("thumb0");
t.style.top = "0px";
initDragger();
}
*/
/*
*demarre /arrete smoothGallery
*/
var myGallery,gEtat = false; // myGallery doit etre déclaré avant d'être initialisé par " body onload='' "
function toggleSlide(){
	myGallery.options.timed = true; // timed doit être a true pour que "cleatTimer" ou "startSlideshow" fonctionnent
	gEtat ? myGallery.clearTimer() : myGallery.startSlideShow();//"clearTimer" + "timed=false" arretent le diaporama
	myGallery.options.timed = !gEtat; 
	gEtat = !gEtat;
}
/*******/
function popUp(strURL,strType,strHeight,strWidth) {
var strOptions="";
if (strType=="console") strOptions="scrollbars,resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
window.open(strURL, 'newWin', strOptions);
}

function cherche(n){
	if (document.getElementById) {
		obj=document.getElementById(n);
	}
	else if(document.all) {
		obj=document.all[n];
	}
	return obj;
}

function rollover(img,newSrc){
	imgroll=cherche(img);
	imgroll.src=newSrc;
}

function twAller(_url) {
	alert(_url);
	window.location.href = _url;
}

function openContact(){
	alert("la carte de visite");	
}