// JavaScript Document
						var MaxsPic= new Array(10)
						var Play
						var MainPicHolder = new Array(10)
						var LastPicIndex = new Array(10)
						var tmLineChangePics = new Array(10)
						
						function initPic(varMaxsPics,varPlay,startFrom,SlideIndex) {
							LastPicIndex[SlideIndex] = startFrom
							MainPicHolder[SlideIndex] = new Fx.Style('imgMainLayerPic'+SlideIndex, 'opacity', {duration:500,transition: Fx.Transitions.linear,onComplete: function() {
								$("imgMainLayerPic"+SlideIndex).src = $("imgLowerLayerPic"+SlideIndex).src
								MainPicHolder[SlideIndex].set(1)
							}});
							MaxsPic[SlideIndex] = varMaxsPics
							if (MaxsPic>0) {
								LoadPic(LastPicIndex[SlideIndex],SlideIndex)
							}
							Play = varPlay;
							if (Play) {
								tmLineChangePics[SlideIndex] = setTimeout('changeNextPic('+SlideIndex+')',1000)
							}
						}

						// slide show of pics
						function changeNextPic(SlideIndex) {
							NewPicIndex = parseInt(LastPicIndex[SlideIndex]) + 1
							LoadPic(NewPicIndex,SlideIndex)
						}
											
						function LoadPic(PicIndex,SlideIndex) {
							// load pic in the lower pic layer
							if (PicIndex>MaxsPic[SlideIndex]) {
								PicIndex = 1
							} else {
								if (PicIndex == 0) {
									PicIndex = MaxsPic [SlideIndex]
								}
							}
							LastPicIndex[SlideIndex] = PicIndex
							$("imgLowerLayerPic"+SlideIndex).src = "images/users/"+$("BigPic"+SlideIndex+LastPicIndex[SlideIndex]).value
							SwichPics(SlideIndex)
							// restart time and load next pic
							if (tmLineChangePics[SlideIndex]>0) {
								clearTimeout(tmLineChangePics[SlideIndex])
								tmLineChangePics[SlideIndex] = 0
								tmLineChangePics[SlideIndex] = setTimeout('changeNextPic('+SlideIndex+')',2000)
							}
						}
						
						function SwichPics(SlideIndex) {
							if ($("imgMainLayerPic"+SlideIndex).src!="") {
								MainPicHolder[SlideIndex].start(1,0)
							} else {
								MainPicHolder[SlideIndex].start(0,0)
							}
						}


