
/***********************************************
* OO_CMotion Image Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for source code
* This copyright notice must stay intact for legal use
* Modified for autowidth and optional starting positions in
* http://www.dynamicdrive.com/forums/showthread.php?t=11839 by jschuer1 8/5/06
* Object Oriented update 9/19/06
***********************************************/

// With:

/***********************************************
* Thumbnail Viewer III modified from
* Ultimate Fade-In Slideshow (v1.5) & Thumbnail Viewer II:
* both © Dynamic Drive (http://www.dynamicdrive.com)
* modified by jscheuer1 in http://www.dynamicdrive.com/forums
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

// Combination Modifications by jscheuer1 6/30/07

 // Set message to show at end of gallery(s). Enter "" to disable message.
var endofgallerymsg="";


var dynimages=new Array()
dynimages.usespace=1;
dynimages.capid='cap1';
//SET IMAGE PATHS. Extend or contract array as needed
//"Thumnail for Gallery", "Large Image", "optional_link", "optional_target"
//link and target are for large image
dynimages[0]=["P_Zacchary.jpg", "G_Zacchary.jpg", "http://www.leniamajor.com/zacchary.htm", "", "Zacchary, l'ourson précoce", "Un album pour expliquer aux enfants précoces leur différence. A commander en ligne !"] //plain image syntax
dynimages[1]=["P_lalettre.jpg", "G_lalettre.jpg", "http://ad.zanox.com/ppc/?12853443C644602487T&ULP=[[http://livre.fnac.com/a1829754/Lenia-Major-La-lettre-mysterieuse?]]", "blank","La lettre mystérieuse", "Dans son casier, Eva découvre une lettre d'amour anonyme. Elle doit en retrouver l'auteur. Un roman à partir de 8 ans, aux éditions Rageot."] //image with link syntax
dynimages[2]=["P_couvoree.jpg", "G_couvoree.jpg", "http://leniamajor.com/livre_enfant_les_portes_des_fees.htm", "", "A l'orée des fées", "Les fées commandent à chaque chose, à chaque élément. Nous vous ouvrons les portes de leur monde. A commander en ligne !"] //image with link and target syntax
dynimages[3]=["P_Ittuq.jpg", "G_Ittuq.jpg", "http://www.amazon.fr/Ittuq-No%C3%A9-Saanan-d%C3%A9veloppement-durable/dp/2910222241", "", "Ittuq", "Ce conte inuit aborde les conséquences du réchauffement climatique dans le Grand Nord. Un recueil de trois contes à lire et écouter aux éditions du GRAD." ] //plain image syntax
dynimages[4]=["P_ascenseur.jpg", "G_ascenseur.jpg", "http://leniamajor.com/ascenseur.htm", "", "Le petit homme dans l'ascenseur", "Il se passe de drôles de choses dans cet ascenseur ! Grimpez-vite, un petit bonhomme vous y attend... A commander en ligne !"] //plain image syntax
dynimages[5]=["P_mieuxfees.jpg", "G_mieuxfees.jpg", "http://leniamajor.com/Boutique/Mieux_que_dix_fees.htm", "blank","Mieux que dix fées", "Nous allons vous présenter dix fées. Chacune d'elle a un don particulier, mais la dernière réserve une surprise !"] //plain image syntax
dynimages[6]=["P_mieuxjouet.jpg", "G_mieuxjouet.jpg", "http://leniamajor.com/Boutique/Mieux_qu_un_jouet.htm", "blank","Mieux qu'un jouet", "Venez découvrir ce jouet magique, mieux, ce jouet UNIQUE. A commander en ligne !"] //image with link syntax
dynimages[7]=["P_lito.jpg", "G_lito.jpg", "http://ad.zanox.com/ppc/?12853443C644602487T&ULP=[[http://livre.fnac.com/a2002295/Collectif-24-histoires-de-Noel?]]", "blank","24 Histoires de Noël", "Pataud, l'oublié de Noël, un petit conte parmi 24 pour attendre Noël, aux éditions Lito."] //image with link syntax
dynimages[8]=["P_Magie.jpg", "G_Magie.jpg", "http://www.leniamajor.com/magie.htm", "", "Magie à l'hôpital", "Un recueil offert aux enfants hospitalisés par l'association Magie à l'hôpital."] //image with link syntax
dynimages[9]=["P_Ipopott.jpg", "G_Ipopott.jpg", "", "", "Ipopott", "Ipopott, un petit doudou maladroit, sous forme d'un livre contenant 6 PUZZLES !"] //image with link syntax
dynimages[10]=["P_Ipopottnoel.jpg", "G_Ipopottnoel.jpg", "http://ad.zanox.com/ppc/?12853443C644602487T&ULP=[[http://livre.fnac.com/a2004383/Lenia-Major-Album-Ipopott?]]", "blank","Ipopott, le Noël enchanté !", "Ipopott part dans la forêt à la recherche des lutins du Père Noël. Après d'inquiétantes aventures, il y trouvera le plus beau des cadeaux, l'amitié ! Un grand livre toucher !"] //image with link syntax
dynimages[11]=["P_PourHanae.jpg", "G_PourHanae.jpg", "http://ad.zanox.com/ppc/?12853443C644602487T&ULP=[[http://livre.fnac.com/a2070969/Lenia-Major-Pour-Hanae?]]", "blank","Pour Hanaé", "Comment attirer l'attention de sa jolie voisine ? Pêcheur d'étoiles filantes ou dompteur de cheval, Rémi Petit sème au fil des pages les lettres qui composent son doux message."] //image with link syntax
dynimages[12]=["P_Devantchezmoi.jpg", "G_Devantchezmoi.jpg", "http://www.leniamajor.com/Devant_chez_moi.htm", "", "Devant chez moi", "Devant chez moi, il n'y a rien que des murs gris et des voitures pourries. Et aussi une jardinière, nid d'une belle histoire d'oiseau perdu et d'espoir retrouvé. "] //image with link syntax
dynimages[13]=["P_princes.jpg", "G_princes.jpg", "http://ad.zanox.com/ppc/?12853443C644602487T&ULP=[[http://livre.fnac.com/a2408474/Lenia-Major-Deux-princes-un-royaume?]]", "blank","Deux princes, UN royaume", "Alex et Axel sont des princes jumeaux. Deux princes unis pour un royaume uni. Mais un royaume n'a qu'un roi... "] //image with link syntax
dynimages[14]=["P_domaine.jpg", "G_domaine.jpg", "http://ad.zanox.com/ppc/?12853443C644602487T&ULP=[[http://livre.fnac.com/a2457633/Lenia-Major-Le-domaine-des-dragons?]]", "blank","Le domaine des dragons", "Flaia, la magnifique et tendre dragonne de Joanna, a disparu. Pour la délivrer, Joanna accepte d'affronter en duel le dangereux et séduisant Ténor, chef des Black Knights ! "] //image with link syntax
dynimages[15]=["P_noye.jpg", "G_noye.jpg", "", "", "Le noyé du moulin", "Martin découvre une carte aux trésors sous les lattes du plancher du grenier, chez ses grands-parents. C'est parti pour une chasse aux trésors avec ses copains du clan des rosiers griffus !"] //plain image syntax
dynimages[16]=["P_tigregris.jpg", "G_tigregris.jpg", "http://www.leniamajor.com/Un_vrai_chat.htm", "", "Un vrai chat", "Chaque enfant trouve un jour SON doudou. Celui qu'il promène partout. Voici comment Tigregris est devenu le VRAI chat de Sidonie. "] //image with link syntax
dynimages[17]=["P_Dumerle.jpg", "G_Dumerle.jpg", "http://ad.zanox.com/ppc/?12853443C644602487T&ULP=[[http://livre.fnac.com/a2716512/Lenia-Major-Les-du-Merle-et-les-Youyou?]]", "blank","Les du Merle et les Youyou", "Lorsque Noirel du Merle rencontre Bijou Youyou, l'amour est au rendez-vous. Mais un du Merle et un Youyou ! Pensez-donc... c'est impossible ! "] //image with link syntax
dynimages[18]=["P_Dissi.jpg", "G_Dissi.jpg", "", "", "Les Dissi, les Dlaba et la rivière !", "Jérémy Dissi a reçu des jumelles pour son anniversaire. Et il est très intéressé par ce qui se passe, de l'autre côté de la rivière, chez les Dlaba..."] //image with link syntax
dynimages[19]=["P_Don.jpg", "G_Don.jpg", "http://ad.zanox.com/ppc/?12853443C644602487T&ULP=[[http://livre.fnac.com/a2720603/Lenia-Major-Le-don-maudit?]]", "blank","Le don maudit", "Sean possède le don de lire le passé des objets qu'il touche. Pourra-t-il, grâce à ce don, sauver Sylvia des griffes de ses ravisseurs ?"] //image with link syntax
dynimages[20]=["P_bouilloire.jpg", "G_bouilloire.jpg", "http://livre.fnac.com/a2775355/Lenia-Major-La-bouilloire-cantatrice?PID=1&Fr=0&To=0&Nu=13&from=1&Mn=-1&Ra=-1", "blank","La bouilloire cantatrice", "Une vieille bouilloire bosselée rêvait jour et nuit. Elle rêvait d'être cantatrice. Mais dans sa cuisine, personne ne l'écoutait..."] //image with link syntax
dynimages[21]=["P_edmond.jpg", "G_edmond.jpg", "http://livre.fnac.com/a2870317/Lenia-Major-Edmond-et-Clara?PID=1&Fr=0&To=0&Nu=15&from=1&Mn=-1&Ra=-1", "blank","Edmond et Clara", "Emile et Julie sont deux enfants, qu'une stupide histoire de voisinage empêche d'être amis. Heureusement, Edmond et Clara, deux ours en peluche seront là pour changer tout ça !"] //image with link syntax
dynimages[22]=["P_KenOtt.jpg", "G_KenOtt.jpg", "http://livre.fnac.com/a2868276/Lenia-Major-Les-missions-de-Lord-Ken-Ott?Fr=0&To=0&Mu=-13&Nu=1&from=1&Mn=-1&Ra=-1", "blank","Les missions de Lord ken Ott", "Lord Ken Ott est un agent de la MORDFOR, l'organisation qui récolte les dents de lait dans les situations périlleuses. Sa première aventure l'entraîne sur l'océan, un jour de tempête."] //image with link syntax
dynimages[23]=["P_clownballerine.jpg", "G_clownballerine.jpg", "http://livre.fnac.com/a2992156/Lenia-Major-Le-clown-et-la-ballerine", "blank","Le clown et la Ballerine", "'Le clown sut qu'il était amoureux à jamais lorsque le cirque accueillit la ballerine. Mais une ballerine peut-elle tomber amoureuse d'un comique ?"] //image with link syntax
dynimages[24]=["P_histoiresdusoir.jpg", "G_histoiresdusoir.jpg", "http://livre.fnac.com/a2998635/Collectif-Histoires-du-soir-meme-pas-peur-du-noir", "blank","Ted et le Crokzours", "Ted est un vieil ours abandonné. Le Crokzours rôde, va-t-il le capturer et le croquer ?"] //image with link syntax
dynimages[25]=["P_Alexine.jpg", "G_Alexine.jpg", "http://livre.fnac.com/a2998669/Lenia-Major-Alexine-l-apprentie-magicienne", "blank","Alexine, l'apprentie magicienne", "Alexine découvre qu'elle est une sorcière le jour où sa tante Zita lui offre un cadeau magique. En avant pour sept aventures qui conduiront Alexine dans des mondes étranges et   merveilleux !"] //image with link syntax
dynimages[26]=["P_Araignee.jpg", "G_Araignee.jpg", "http://livre.fnac.com/a3002277/Lenia-Major-La-fille-de-l-araignee", "blank","La fille de l'Araignée, tome 1, Le prince des Maudits", "Avec la fille de l'Araignée viendra le danger. Suivez-la pour vivre encore demain. Hors d'elle point de chemin !"] //image with link syntax
dynimages[27]=["P_Menteur.jpg", "G_Menteur.jpg", "http://livre.fnac.com/a2868286/Lenia-Major-Menteur-menteuse", "blank","Menteur, Menteuse", "L'archiduc Archibald de Soulgranduc et Jasminella, Princesse des Mille et deux nuits s'adressent des lettres enflammées. Quand un menteur écrit à une menteuse, leurs échanges prennent un tour étonnant... et les surprises ne sont pas loin."] //image with link syntax
dynimages[28]=["P_voler.jpg", "G_voler.jpg", "http://livre.fnac.com/a3096053/Collectif-Voler-c-est-pas-sorcier", "blank","Voler, c'est pas sorcier", "Petite chauve-souris ne sait pas voler. Elle garde ses ailes fermement repliées. Pour la faire décoller, sa tribu est décidée à tout essayer. Comment vaincre ses peurs et prendre confiance en soi ?"] //image with link syntax
dynimages[29]=["P_chevaliers.jpg", "G_chevaliers.jpg", "http://livre.fnac.com/a3402345/Lenia-Major-Les-justiciers-de-quatre-heure-et-demie", "blank","Les justiciers de quatre heures et demie", "Emile et Martin achètent tous les soirs des pains au chocolat. Un soir,la boulangère se fâche après une mémé qui a oublié son porte-monnaie. Tels deux preux chevaliers, Emile et Martin volent au secours de la vieille dame."] //image with link syntax
dynimages[30]=["P_Fantomes1.jpg", "G_Fantomes1.jpg", "http://www.amazon.fr/CLUB-FANTOMES-1-L%C3%A9nia-Major/dp/2917460644/ref=sr_1_2?ie=UTF8&s=books&qid=1307122513&sr=8-2", "blank","L'école des Fantômes, Dans de beaux draps", "Le 1er tome des fantômes très déjantés du manoir de Brougépeur ! Il y a un nouveau dans l'école et quel nouveau..."] //image with link syntax
dynimages[31]=["P_Fantomes2.jpg", "G_Fantomes2.jpg", "http://www.amazon.fr/club-fant%C3%B4mes-T2-Sauvez-murs/dp/2917460954/ref=sr_1_1?ie=UTF8&s=books&qid=1307122513&sr=8-1", "blank","L'école des Fantômes, Sauvez les murs", "Les fantômes sont de retour. Un promoteur immoblier veut raser leur manoir. Hors de question que nos ectoplasmes préférés le laissent faire ! "] //image with link syntax
dynimages[32]=["P_loucherie.jpg", "G_loucherie.jpg", "http://www.amazon.fr/Lou-Ch%C3%A9rie-veut-pas-lunettes/dp/2364730104/ref=sr_1_1?ie=UTF8&qid=1318095902&sr=8-1", "blank","Lou Chérie ne veut pas de lunettes", "Le monde autour de Lou est tou flou. Un album pour expliquer que les lunettes, c'est chouette ! "] //image with link syntax
dynimages[33]=["P_licornes.jpg", "G_licornes.jpg", "http://www.amazon.fr/fille-aux-licornes-rencontre/dp/236266032X/ref=sr_1_sc_1?ie=UTF8&qid=1318096173&sr=8-1-spell", "blank","La fille aux licornes, la rencontre", "Ascane a été choisie pour devenir licornière du roi d'Ampleterre. Mais le maître licornier ne veut pas apprendre son art à une fille. Il lui confie un mâle blessé et sauvage... "] //image with link syntax
dynimages[34]=["P_Emil.jpg", "G_Emil.jpg", "http://www.amazon.fr/prince-Maudits-Emil-clairvoyant/dp/2350670627/ref=ntt_at_ep_dpt_2", "blank","Le prince des Maudits, Emil le Clairvoyant", "Eva et Emil sont de retour. Le temps de la fuite est fini. Il faut regagner le fief du prince de Bade ! "] //image with link syntax

var dynimages2=new Array()
dynimages2.usespace=1;
dynimages2.capid='cap2';
//SET IMAGE PATHS. Extend or contract array as needed
//"Thumnail for Gallery", "Large Image", "optional_link", "optional_target"
//link and target are for large image
dynimages2[0]=["P_Pif.jpg", "G_Pif.jpg", "", "", "Formule pour un chien", "Charline, une jeune sorcière est prête à tout pour avoir un chien. Même à utiliser la magie, et ce n'est pas toujours sans danger !"] //plain image syntax
dynimages2[1]=["P_rouzigmai05.jpg", "G_rouzigmai05.jpg", "http://www.leniamajor.com/oreilles.htm", "", "Oreilles", "La star du cirque Bellini a disparu, sans lui, le spectacle ne peut commencer..."] //image with link syntax
dynimages2[2]=["P_rouzigdec05.jpg", "G_rouzigdec05.jpg", "http://www.leniamajor.com/hiver.htm", "", "Monsieur l'Hiver", "Celui que petits et grands attendent est sur son chemin !"] //image with link and target syntax
dynimages2[3]=["P_CFmai06.jpg", "G_CFmai06.jpg", "", "", "Zélie et Dessinelle", "La fée Dessinelle va aider Zélie a fabriquer le plus beau des cadeaux pour la fête des mères"] //plain image syntax
dynimages2[4]=["P_rouzigmai06.jpg", "G_rouzigmai06.jpg", "", "", "Kossinel", "Une jolie coccinelle cherche une rose jaune. Malheureusement, elle a perdu ses lunettes !"] //plain image syntax
dynimages2[5]=["P_CFjuillet06.jpg", "G_CFjuillet06.jpg", "", "", "Un chateau pour le Roi du rivage", "A quoi, ou plutôt à qui servent les chateaux de sable ?"] //plain image syntax
dynimages2[6]=["P_CFoctobre06.jpg", "G_CFoctobre06.jpg", "", "", "Le bal d'Halloween", "Ratafia la sorcière organise le bal d'Halloween. Elle a tout prévu pour qu'il se passe parfaitement. Sauf que..."] //image with link syntax
dynimages2[7]=["P_rouzignov06.jpg", "G_rouzignov06.jpg", "http://leniamajor.com/sorciere.htm", "", "La maison verte", " Encore une sombre histoire de sorcière !"] //image with link and target syntax
dynimages2[8]=["P_rouzigmars07.jpg", "G_rouzigmars07.jpg", "http://www.leniamajor.com/printemps.htm", "", "Le printemps est arrivé", "La balade d'un écureuil..."] //plain image syntax
dynimages2[9]=["P_bouletbill.jpg", "G_bouletbill.jpg", "", "", "Sylvain le vilain", "Un drôle de petit pirate !"] //plain image syntax
dynimages2[10]=["P_rouzigjuil07.jpg", "G_rouzigjuil07.jpg", "", "", "La plage de Léon le poisson", "Mariel invente des vacances pour son poisson rouge Léon !"] //plain image syntax
dynimages2[11]=["P_CFnovembre07.jpg", "G_CFnovembre07.jpg", "", "", "L'habit ne fait pas la sorcière", "Une sorcière, une princesse, un bal et un chaudron sont les ingrédients de ce conte dans Charlotte aux fraises, novembre 2007."] //plain image syntax
var fadebgcolor="white"
dynimages2[12]=["P_winnie07.jpg", "G_winnie07.jpg", "", "", "Aelle et le dragon", "Aelle est une sorcière catastrophique, mais elle possède un autre talent, dans Winnie, novembre 2007."] //plain image syntax
var fadebgcolor="white"
dynimages2[13]=["P_Pirouettenov07.jpg", "G_Pirouettenov07.jpg", "", "", "Un joyeux tintamarre", "Barbant 1er règne en tyran sur le royaume de Tournebrise. Il suffit parfois d'un petit air pour que la révolte souffle ! Dans Pirouette, novembre 2007."] //plain image syntax
var fadebgcolor="white"
dynimages2[14]=["P_CFdec07.jpg", "G_CFdec07.jpg", "", "", "Chiffonette", "Lorsqu'une poupée de chiffon, une fée, quelques lutins et le Père Noël se rencontrent, un conte se dessine, grâce à Elodie Coudray, dans Charlotte aux Fraises, décembre 2007."] //plain image syntax
var fadebgcolor="white"
dynimages2[15]=["P_bouletbilljan08.jpg", "G_bouletbilljan08.jpg", "", "", "Le chevalier Horace", "Un chevalier et son cheval, Vaillant, sont prêts à tout pour gagner le coeur d'une princesse nommé Caprice. Enfin, presque..."] //plain image syntax
var fadebgcolor="white"
dynimages2[16]=["P_rouzigjan08.jpg", "G_rouzigjan08.jpg", "", "", "Panique sur la savane", "Le petit hippopotame ouvre les yeux. L'herbe est devenue toute blanche ! "] //plain image syntax
var fadebgcolor="white"
dynimages2[17]=["P_abricot.jpg", "G_abricot.jpg", "", "", "Petite chauve souris vole toute seule !", "Petite chauve-souris ne sait pas voler, sa famille va tout essayer !"] //plain image syntax
var fadebgcolor="white"
dynimages2[17]=["P_Pommeapiaout08.jpg", "G_Pommeapiaout08.jpg", "", "", "La longue balade de Muso.", "L'incroyable périple de Muso, un ours en peluche, à travers les différents continents."] //plain image syntax
var fadebgcolor="white"
dynimages2[18]=["P_CFsep08.jpg", "G_CFsep08.jpg", "", "", "Rentrée à l'école des poupées.", "C'est la rentrée à l'école des  poupées. Paprika, la petite poupée russe à disparu !"] //plain image syntax
var fadebgcolor="white"
dynimages2[19]=["P_MPJL.jpg", "G_MPJL.jpg", "", "", "Les justiciers de quatre heures et demie.", "Comment Emile et Martin sont devenus des Chevaliers des Mémés ! "] //plain image syntax
var fadebgcolor="white"
dynimages2[20]=["P_PAoct08.jpg", "G_PAoct08.jpg", "", "", "Léandre le rêveur", "Léandre aime rêver devant de sa maison de terre cuite. Sa famille se moque de lui, mais... "] //plain image syntax
var fadebgcolor="white"
dynimages2[21]=["P_winnie08.jpg", "G_winnie08.jpg", "", "", "Drôle de traîneau pour le Père Noël", "Le traîneau du Père Noël tombe sur le chapiteau du cirque Fantastico. Comment continuer la distribution des cadeaux ? dans Winnie, décembre 2008."] //plain image syntax
var fadebgcolor="white"
dynimages2[22]=["P_moijelis.jpg", "G_moijelis.jpg", "", "", "Amour, sorcièreet confiture de fée", "L'ogre Trôlé est amoureux de l'infâme sorcière Crapote Labarbichue. Jusqu'où est-il prêt à aller pour gagner son coeur ?"] //plain image syntax
var fadebgcolor="white"
dynimages2[23]=["P_winnie09.jpg", "G_winnie09.jpg", "", "", "Barbant, le roi du silence", "Lorsque l'on est suffisamment astucieux et unis, on peut vaincre le pire des tyrans ! dans Winnie, juin 2009."] //plain image syntax
var fadebgcolor="white"
dynimages2[24]=["P_dauphin.jpg", "G_dauphin.jpg", "", "", "Le coffret magique de Madeleine", "Lorsqu'un homme mystérieux dépose un coffret étrange dans la boutique d'antiquités du père de Madeleine, sa curiosité la pousse à bien des imprudences...dans Dauphin, novembre 2009."] //plain image syntax
var fadebgcolor="white"
dynimages2[25]=["P_Bambi.jpg", "G_Bambi.jpg", "", "", "Un étrange traîneau", "Le traîneau du Père Noël tombe sur le chapiteau du cirque Fantastico. Marco le magicien a la solution! dans Bambi, décembre 2009."] //plain image syntax
var fadebgcolor="white"
dynimages2[26]=["P_Toupie.jpg", "G_Toupie.jpg", "", "", "Un chat très maladroit", " Texmex est un chaton qui cumule bêtises et maladresses. Peut-être a-t-il une bonne raison pour cela... dans Toupie, mars2010."] //plain image syntax
var fadebgcolor="white"
dynimages2[27]=["P_Cadeau.jpg", "G_Cadeau.jpg", "", "", "Pas de cadeau pour moi !", " Guénolé écrit une longue lettre au père Noël pour lui expliquer que, cette année, il a fait tellement de bêtises qu’il ne peut décemment pas recevoir de cadeau pour Noël. Dans Tirelire, décembre 2010."] //plain image syntax
dynimages2[28]=["P_hellokitty.jpg", "G_hellokitty.jpg", "", "", "L'arbre à tétines", " Dans le numéro d'octobre d'Hello kitty, rencontrez Coline, dont on ne savait pas si elle était jolie ou laide, avant le Grand Jour de l'Arbre !"] //plain image syntax
var fadebgcolor="white"
////NO need to edit beyond here/////////////


function displayarea(theimages, fadewidth, fadeheight, borderwidth){
if(!displayarea.fadearray){
displayarea.fadearray=new Array() //array to cache displayarea instances
displayarea.fadeclear=new Array() //array to cache corresponding clearinterval pointers
}
this.flag=1
this.capid=theimages.capid;
this.dom=(document.getElementById) //modern dom browsers
this.iebrowser=document.all
this.pausecheck=0
this.degree=10 //initial opacity degree (10%)
this.curimageindex=theimages.length-1;
this.nextimageindex=0
displayarea.fadearray[displayarea.fadearray.length]=this
this.slideshowid=displayarea.fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][1]
}

var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2

if (this.iebrowser&&this.dom||this.dom) {//if IE5+ or modern browsers (ie: Firefox)
var opacity_string=document.body.filters? 'filter:progid:DXImageTransform.Microsoft.alpha(opacity=100);' : typeof document.body.style.opacity=='string'? 'opacity:1;' : typeof document.body.style.MozOpacity=='string'? '-moz-opacity:1;' : typeof document.body.style.KhtmlOpacity=='string'? '-khtml-opacity:1;' : '';
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;'+opacity_string+'background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;'+opacity_string+'background-color:'+fadebgcolor+'"></div></div>');
if(this.capid){
document.write('<div id="'+this.capid+'">'+(theimages[this.curimageindex][5]? theimages[this.curimageindex][5] : '&nbsp;')+'</div>');
this.caparea=document.getElementById(this.capid);
}
}
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')

if (this.iebrowser&&this.dom||this.dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("displayarea.fadearray["+this.slideshowid+"].rotateimage()", 100)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=5
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(displayarea.fadeclear[obj.slideshowid])
obj.pausecheck=obj.flag=1;
}
}

displayarea.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][2]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][2]+'" target="'+this.theimages[picindex][3]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][2]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}


displayarea.prototype.rotateimage=function(){
var cacheobj=this
if (this.pausecheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (this.iebrowser&&this.dom||this.dom){
this.resetit()
var crossobj=this.tempobj=this.iebrowser? this.iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
displayarea.fadeclear[this.slideshowid]=setInterval("fadepic(displayarea.fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}

displayarea.prototype.resetit=function(){
this.degree=10
var crossobj=this.iebrowser? this.iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}


displayarea.prototype.startit=function(){
var crossobj=this.iebrowser? this.iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
var cacheobj=this
this.rotateimage()
}

function switchFade(iNum, slideId){
var slideIdNum
if (typeof slideId=='number')
slideIdNum=slideId
else
for (var i_tem = 0; i_tem < displayarea.fadearray.length; i_tem++)
if (displayarea.fadearray[i_tem].theimages==slideId)
slideIdNum=i_tem
if (displayarea.fadearray[slideIdNum].flag){
clearInterval(displayarea.fadearray[slideIdNum].wait)
displayarea.fadearray[slideIdNum].flag=0
clearInterval(displayarea.fadeclear[slideIdNum])
displayarea.fadearray[slideIdNum].pausecheck=0
displayarea.fadearray[slideIdNum].nextimageindex=iNum
displayarea.fadearray[slideIdNum].nextcanvas=(displayarea.fadearray[slideIdNum].curcanvas==displayarea.fadearray[slideIdNum].canvasbase+"_0")? displayarea.fadearray[slideIdNum].canvasbase+"_0" : displayarea.fadearray[slideIdNum].canvasbase+"_1"
displayarea.fadearray[slideIdNum].tempobj=document.all? document.all[displayarea.fadearray[slideIdNum].nextcanvas] : document.getElementById(displayarea.fadearray[slideIdNum].nextcanvas)
displayarea.fadearray[slideIdNum].populateslide(displayarea.fadearray[slideIdNum].tempobj, displayarea.fadearray[slideIdNum].nextimageindex)
setTimeout("displayarea.fadearray["+slideIdNum+"].rotateimage()", 100)
if(displayarea.fadearray[slideIdNum].caparea)
displayarea.fadearray[slideIdNum].caparea.innerHTML=displayarea.fadearray[slideIdNum].theimages[iNum][5]? displayarea.fadearray[slideIdNum].theimages[iNum][5] : '&nbsp;';
}
else{
clearInterval(displayarea.fadearray[slideIdNum].wait)
displayarea.fadearray[slideIdNum].wait=setInterval("switchFade("+iNum+", "+slideIdNum+");", 100)
}
}

function cmotiongallery(gallery, rest, maxs, maxw, startp, width, height, c){
this.iedom=document.all||document.getElementById;
if(!cmotiongallery.cgals)
cmotiongallery.cgals=[];
if(!this.iedom)
return;
this.galid=cmotiongallery.cgals.length;
cmotiongallery.cgals[cmotiongallery.cgals.length]=this;
this.gallery=[];
this.dgallery=gallery
for (var i = 0; i < gallery.length; i++)
this.gallery[i]='<a href="javascript:view('+[i+1]+')" onclick="switchFade('+i+', cmotiongallery.cgals['+this.galid+'].dgallery);return false;"><img src="'+gallery[i][0]+'" title="'+(gallery[i][4]? gallery[i][4] : '')+'"border="1"></a>';
this.usespace=gallery.usespace? ' ' : '';
this.width=/%/.test(width)? width : parseInt(width)+'px';
this.height=height;
this.c=c? 'margin:0 auto;' : '';
this.loadedyes=0;
this.movestate='';
this.scrollspeed=0;
this.rest=rest;
this.maxs=maxs;
this.maxw=maxw;
this.startpos=startp;

for (var i_tem = 0; i_tem < this.gallery.length; i_tem++)
this.gallery[i_tem]=!/on[cC]lick/.test(this.gallery[i_tem])? this.gallery[i_tem].replace(/href="#"/, 'href="#" onclick="return false;"') : this.gallery[i_tem];

document.write('<div class="motioncontainer" id="motioncontainer'+this.galid+'" style="'+this.c+'width:'+this.width+';height:'+this.height+'px;position:relative;left:0;top:0;overflow:hidden;">\n'+
'<div id="motiongallery'+this.galid+'" style="position:absolute;left:0;top:0;white-space: nowrap;">\n'+
'\n'+
'<nobr id="trueContainer'+this.galid+'">'+this.gallery.join(this.usespace)+'<\/nobr>\n'+
'\n'+
'<\/div>\n'+
'<\/div>')
this.fillup();
}

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

cmotiongallery.prototype.creatediv=function(){
this.statusdiv=document.createElement("div")
this.statusdiv.setAttribute("id","statusdiv"+this.galid)
this.statusdiv.className="statusdiv";
document.body.appendChild(this.statusdiv)
this.statusdiv=document.getElementById("statusdiv"+this.galid)
this.statusdiv.innerHTML=endofgallerymsg
}

cmotiongallery.prototype.positiondiv=function(){
this.mainobjoffset=getposOffset(this.crossmain, "left"),
this.menuheight=parseInt(this.crossmain.offsetHeight),
this.mainobjoffsetH=getposOffset(this.crossmain, "top");
this.statusdiv.style.left=this.mainobjoffset+(this.menuwidth/2)-(this.statusdiv.offsetWidth/2)+"px";
this.statusdiv.style.top=this.menuheight+this.mainobjoffsetH+"px";
}

cmotiongallery.prototype.showhidediv=function(what){
if (endofgallerymsg!="") {
this.positiondiv();
this.statusdiv.style.visibility=what;
}
}

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft: what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


cmotiongallery.prototype.moveleft=function(){
if (this.loadedyes){
this.movestate="left";
if (this.iedom&&parseInt(this.cross_scroll.style.left)>(this.menuwidth-this.actualwidth)){
this.cross_scroll.style.left=parseInt(this.cross_scroll.style.left)-this.scrollspeed+"px";
this.showhidediv("hidden");
}
else
this.showhidediv("visible");
}
this.lefttime=setTimeout("cmotiongallery.cgals["+this.galid+"].moveleft()",10);
}

cmotiongallery.prototype.moveright=function(){
if (this.loadedyes){
this.movestate="right";
if (this.iedom&&parseInt(this.cross_scroll.style.left)<0){
this.cross_scroll.style.left=parseInt(this.cross_scroll.style.left)+this.scrollspeed+"px";
this.showhidediv("hidden");
}
else
this.showhidediv("visible");
}
this.righttime=setTimeout("cmotiongallery.cgals["+this.galid+"].moveright()",10);
}

cmotiongallery.prototype.motionengine=function(e){
this.mainobjoffset=getposOffset(this.crossmain, "left"),
dsocx=(window.pageXOffset)? pageXOffset: ietruebody().scrollLeft,
dsocy=(window.pageYOffset)? pageYOffset : ietruebody().scrollTop,
curposy=window.event? event.clientX : e.clientX? e.clientX: "";
curposy-=this.mainobjoffset-dsocx;
this.leftbound=(this.menuwidth-this.rest)/2;
this.rightbound=(this.menuwidth+this.rest)/2;
if (curposy>this.rightbound){
this.scrollspeed=(curposy-this.rightbound)/((this.menuwidth-this.rest)/2) * this.maxs;
clearTimeout(this.righttime);
if (this.movestate!="left") this.moveleft();
}
else if (curposy<this.leftbound){
this.scrollspeed=(this.leftbound-curposy)/((this.menuwidth-this.rest)/2) * this.maxs;
clearTimeout(this.lefttime);
if (this.movestate!="right") this.moveright();
}
else
this.scrollspeed=0;
}

function contains_ns6(a, b) {
if (b!==null)
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

cmotiongallery.prototype.stopmotion=function(e){
if (!window.opera||(window.opera&&e.relatedTarget!==null))
if ((window.event&&!this.crossmain.contains(event.toElement)) || (e && e.currentTarget && e.currentTarget!= e.relatedTarget && !contains_ns6(e.currentTarget, e.relatedTarget))){
clearTimeout(this.lefttime);
clearTimeout(this.righttime);
this.movestate="";
}
}

cmotiongallery.prototype.fillup=function(){
if (this.iedom){
this.crossmain=document.getElementById? document.getElementById("motioncontainer"+this.galid) : document.all["motioncontainer"+this.galid];
if(typeof this.crossmain.style.maxWidth!=='undefined')
this.crossmain.style.maxWidth=this.maxw+'px';
this.menuwidth=this.crossmain.offsetWidth;
this.cross_scroll=document.getElementById? document.getElementById("motiongallery"+this.galid) : document.all["motiongallery"+this.galid];
this.loading=document.getElementsByTagName? document.getElementById('trueContainer'+this.galid).getElementsByTagName('img') : document.all['trueContainer'+this.galid].all.tags('img');
for (var i_tem = 0; i_tem < this.loading.length; i_tem++)
if(typeof this.loading[i_tem].complete=='boolean'&&this.loading[i_tem].complete==false){
setTimeout("cmotiongallery.cgals["+this.galid+"].fillup()", 500);
return;
}
this.actualwidth=document.getElementById? document.getElementById("trueContainer"+this.galid).offsetWidth : document.all['trueContainer'+this.galid].offsetWidth;
if (this.startpos)
this.cross_scroll.style.left=(this.menuwidth-this.actualwidth)/this.startpos+'px';
this.crossmain.onmousemove=new Function("e", "cmotiongallery.cgals["+this.galid+"].motionengine(e)");

this.crossmain.onmouseout=new Function("e", "cmotiongallery.cgals["+this.galid+"].stopmotion(e);cmotiongallery.cgals["+this.galid+"].showhidediv('hidden')");
}
this.loadedyes=1
if (endofgallerymsg!=""){
this.creatediv();
this.positiondiv();
}
}


function cmotionresize(){
for (var i_tem = 0; i_tem < cmotiongallery.cgals.length; i_tem++){
if (document.all&&document.all['motioncontainer'+i_tem]&&document.all['motioncontainer'+i_tem].filters){
document.all['motioncontainer'+i_tem].style.width="0";
document.all['motioncontainer'+i_tem].style.width=cmotiongallery.cgals[i_tem].width;
document.all['motioncontainer'+i_tem].style.width=Math.min(document.all['motioncontainer'+i_tem].offsetWidth, cmotiongallery.cgals[i_tem].maxw)+'px';
}
cmotiongallery.cgals[i_tem].menuwidth=cmotiongallery.cgals[i_tem].crossmain.offsetWidth;

cmotiongallery.cgals[i_tem].cross_scroll.style.left=cmotiongallery.cgals[i_tem].startpos? (cmotiongallery.cgals[i_tem].menuwidth-cmotiongallery.cgals[i_tem].actualwidth)/cmotiongallery.cgals[i_tem].startpos+'px' : 0;
}
}

if ( typeof window.addEventListener != "undefined" )
    window.addEventListener( "resize", cmotionresize, false );
else if ( typeof window.attachEvent != "undefined" )
    window.attachEvent( "onresize", cmotionresize );
else {
    if ( window.onresize != null ) {
        var oldOnresize = window.onresize;
        window.onresize = function ( e ) {
            oldOnresize( e );
            cmotionresize();
        };
    }
    else
        window.onresize = cmotionresize;
}
