// JavaScript Document
var uptime;
function initGallery ( tempgallery, count, first_id, startwidth, startheight ) {
imggallery = tempgallery;
if (preloadimg=="yes"){
for (x=0; x";
$('imgloader').setHTML(newHTML);
var firsttitle=document.getElementById('imgtitle');
firsttitle.innerHTML=""+tempgallery[0][4]+" "+tempgallery[0][7];
fadefirst.start(0,1);
//firsttitlefade.start(0,1);
currentheight=imggallery[0][2];
currentwidth=imggallery[0][1];
}
new Asset.image(imggallery[0][0], {onload: setfirstimage});
uptime=self.setInterval("nextimage(current_imgid)",autodelay*1000);
}
function nextimage(current_imgid){
newimgid = Number(current_imgid)+1;
if (newimgid>total){
newimgid = 0;
}
newwidth =imggallery[newimgid][1]
newheight =imggallery[newimgid][2]
newimgindex =imggallery[newimgid][8]
newimgid = imggallery[newimgid][8]
cwidth=imggallery[current_imgid][1]
cheight=imggallery[current_imgid][2]
checknext(newimgid);
nextorprev=1;
getstarted(Number(newwidth), Number(newheight), 'imgloader',Number(newimgindex) ,Number(newimgid) , Number(current_imgid), Number(cwidth), Number(cheight))
}
function resetInterval(newval) {
clearInterval(uptime);
uptime=self.setInterval("nextimage(current_imgid)",newval*1000);
}
function previmage(current_imgid){
newimgid = Number(current_imgid)-1;
newwidth =imggallery[newimgid][1]
newheight =imggallery[newimgid][2]
newimgindex =imggallery[newimgid][8]
newimgid = imggallery[newimgid][8]
cwidth=imggallery[current_imgid][1]
cheight=imggallery[current_imgid][2]
checknext(newimgid);
nextorprev=1;
getstarted(Number(newwidth), Number(newheight), 'imgloader',Number(newimgindex) ,Number(newimgid) , Number(current_imgid), Number(cwidth), Number(cheight))
}