
var imgwidth=400

// The height of your images (pixels). All pictures should have the same height.
var imgheight=300

// Your images. You may add as many images as you like.
var imgname=new Array()


imgname[0]="news/photo/01.jpg"

imgname[1]="news/photo/02.jpg"

imgname[2]="news/photo/03.jpg"

imgname[3]="news/photo/04.jpg"

imgname[4]="news/photo/05.jpg"

imgname[5]="news/photo/06.jpg"

imgname[6]="news/photo/07.jpg"

imgname[7]="news/photo/08.jpg"

imgname[8]="news/photo/09.jpg"

imgname[9]="news/photo/10.jpg"




// The links of your images. Each image may have a link of its own. 
// If you don not want to link an image just use a "#" instead of an URL (see last sample).
var imgurl=new Array()
imgurl[0]="allstud.htm"
imgurl[1]="allstud.htm"
imgurl[2]="allstud.htm"
imgurl[3]="allstud.htm"
imgurl[4]="allstud.htm"
imgurl[5]="allstud.htm"
imgurl[6]="allstud.htm"
imgurl[7]="allstud.htm"
// The color of your lamellas. You may use as may different colors as you like.
var imglamellarcolor=new Array()



// Do not edit this block.
var imgpreload=new Array()
for (i=0;i<=imgname.length-1;i++) {
imgpreload[i]=new Image()
imgpreload[i].src=imgname[i]
}

// Final horizontal position of the image: distance to the left margin of the window
var x_finalpos=10

// Final vertical position of the image: distance to the top margin of the window
var y_finalpos=-5

// Number of sliced cells (the higher this value the slower the script)
var x_slices=50

// Speed of the reassembling effect. More means slower.
var pause=40000

// Do not change the variables below
var i_loop=0
var i_image=0
var i_color=0
var width_slice=Math.ceil(imgwidth/x_slices)
var cliptop=0
var clipbottom=imgheight
var i_clipright=1

function initiate() {
if (document.all) {
for (i=0;i<=x_slices-1;i++) {
var thisinnerspan=eval("span"+i)
thisinnerspan.innerHTML="<img src='"+imgname[i_image]+"' border='0'>"
var thisspan=eval("document.all.span"+i+".style")
thisspan.posLeft=x_finalpos
thisspan.posTop=y_finalpos
document.all.imgbgcolor.style.posLeft=x_finalpos+width_slice
document.all.imgbgcolor.style.posTop=y_finalpos
}
i_image++
openlamellar()
}
}

function openlamellar() {
clipleft=0
clipright=0
if (i_clipright<=width_slice) {
for (i=0;i<=x_slices-1;i++) {
var thisspan=eval("document.all.span"+i+".style")
thisspan.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
clipleft+=width_slice
clipright=clipleft+i_clipright
}
i_clipright++
var timer=setTimeout("openlamellar()",150)
}
else {
clearTimeout(timer)
i_color++
if (i_color>=imglamellarcolor.length-1) {i_color=0}
document.all.imgbgcolor.style.backgroundColor=imglamellarcolor[i_color]
var timer=setTimeout("closelamellar()",5000)
}
}

function closelamellar() {
clipleft=0
clipright=0
if (i_clipright>=0) {
for (i=0;i<=x_slices-1;i++) {
var thisspan=eval("document.all.span"+i+".style")
thisspan.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
clipleft+=width_slice
clipright=clipleft+i_clipright
}
i_clipright--
var timer=setTimeout("closelamellar()",150)

}
else {
clearTimeout(timer)
var timer=setTimeout("changeimage()",2000)
}
}

function changeimage() {
if (i_image>imgname.length-1) {i_image=0}

for (i=0;i<=x_slices-1;i++) {
var thisinnerspan=eval("span"+i)
thisinnerspan.innerHTML="<img src='"+imgname[i_image]+"' border='0'>"

}
i_image++
openlamellar()
}
