// Title: imggallery

<!--
function reloadpage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgw=innerWidth; document.pgh=innerHeight; onresize=reloadpage; }}
  else if (innerWidth!=document.pgw || innerHeight!=document.pgh) location.reload();
}
reloadpage(true);
//-->

function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function reloadpage(init) { 
  if (init==true) with (navigator) {if 
((appName=="Netscape")&&(parseInt(appVersion)==4)) { 
    document.pgw=innerWidth; document.pgh=innerHeight; 
onresize=reloadpage; }} 
  else if (innerWidth!=document.pgw || innerHeight!=document.pgh) 
location.reload(); 
} 
reloadpage(true); 
var obj,timer,stopObj,px,sf=navigator.userAgent.indexOf('Safari')!=-1;
function initObjects() {
  var a=initObjects.arguments,i;obj=new Array();d=(sf || document.all || document.getElementById);
  px=(d)?"px":"";for(i=0;i<a.length;i++){obj[i]=(d && !sf)?findObj(a[i]).style:findObj(a[i]);
	obj[i].hClip=(!d)?obj[i].clip.height:findObj(a[i]).offsetHeight
	obj[i].wClip=(!d)?obj[i].clip.width:findObj(a[i]).offsetWidth	
	obj[i].v=0;obj[i].h=0;
  }
}

function moveObject(v,a,o){
  if (v=='v' || v=='b') { 
    obj[o].v=((obj[o].v-a)>0)?0:obj[o].v-a;
	obj[o].v=(obj[o].v<-(obj[o].hClip-obj[0].hClip))?-(obj[o].hClip-obj[0].hClip):obj[o].v;
    if (sf) obj[o].style.top= obj[o].v+px; else obj[o].top=obj[o].v+px;}
  if (v=='h' || v=='b'){
    obj[o].h=((obj[o].h-a)>0)?0:obj[o].h-a;
	obj[o].h=(obj[o].h<-(obj[o].wClip-obj[0].wClip))?-(obj[o].wClip-obj[0].wClip):obj[o].h;
    if (sf) obj[o].style.left=obj[o].h+px; else obj[o].left=obj[o].h+px; }
  if (!stopObj) setTimeout("moveObject('"+v+"',"+a+","+o+")",30)
}
function hideIt2() {
	lObj = (document.layers)?findObj('img_scrlovr'):findObj('img_scrlovr').style;
	lObj.visibility='hidden'
}

function img_swap(photo,wdth,hght) {
	findObj('main_image').src=photo;
	findObj('main_image').height=hght;
	findObj('main_image').width=wdth; 
}

function img_loadarray() {
  var d=document; if(d.images){ if(!d.img_p) d.img_p=new Array();
    var i,j=d.img_p.length,a=img_loadarray.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.img_p[j]=new Image; d.img_p[j++].src=a[i];}}
}

// --------------------------------------------------------------------------------
// that's all folks

