// JavaScript Document
var currentpos=0;
var currentthumbpos=0;
var moveamount=136;
var thumbnailnum;
var maxthumbvisible = 3; //Define how many thumbnails will be visible at one time in the thumbbox--for now this should only be 3 since it's actually the css that controls the size of the viewable box
var current_imgid=0;
var moving = false;
var finishedsizing=0;
var preloadimg="no"//Preload images ("yes" or "no"):
var myloadedimage = new Array();
myloadedimage[0]=1;
var imggallery=new Array()
var firstimagestart=1;
var nextorprev=0;
var fadeout=1;
function loadinfo(){
if(fadeout==0){
var fademe = new Fx.Style('iptc_info','opacity', {duration:transspeed });
fademe.set(0);
fadeout=1;
}else{
var fademe = new Fx.Style('iptc_info','opacity', {duration:transspeed });
fademe.set(.75,0);
fadeout=0;
}
}
function areweready(loadarea, imgindex, img_id){
if ( finishedsizing++ ) {
modifyimage(loadarea, imgindex, img_id);
finishedsizing = 0;
}
}
function modifyimage(loadarea, imgindex, img_id ){
function loadimagenow(){
//alert("Load Image Now Called");
if (document.getElementById) {
if(current_imgid!=img_id){
var imgobj=document.getElementById(loadarea);
var iptch=document.getElementById('iptc_info');
var photonum=document.getElementById('photocount');
var phototitle=document.getElementById('imgtitle');
imgobj.innerHTML=returnimgcode(imggallery[imgindex]);
iptch.innerHTML=returniptc(imggallery[imgindex]);
photonum.innerHTML=(Number(imgindex)+1)+" of "+imggallery.length+" Photos";
phototitle.innerHTML=""+Gallery[img_id][4]+" - "+img_id+" ";
initImage(loadarea);
current_imgid=img_id;
myloadedimage[imgindex]=1;
}
}
return false
}
if(myloadedimage[imgindex]==null){
new Asset.image(imggallery[imgindex][0], {onload: loadimagenow});
}else{
loadimagenow();
}
}
function returnimgcode(theimg){
var imghtml=""
if (theimg[1]!="")
imghtml=''
imghtml+=''
if (theimg[1]!="")
imghtml+=''
return imghtml
}
function returniptc(theimg){
var iptchtml = ''+
'