DynAPI.setLibraryPath('../dynapi/src/lib/');

DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.event.listeners');
DynAPI.include('dynapi.event.mouse');
DynAPI.include('dynapi.util.thread.js');
DynAPI.include('dynapi.util.pathanim.js');
DynAPI.include('ibs.gui.scrollwindow.js');

/*
    var xPos, minX;
	var strHTML;
    yPos = 476; 
	minX = 67;
    strHTML="<NOBR>";
	for (i=1; i< pops.length; i++) {
	  strHTML += "<a href=\"javascript:window.open('popup.html?num=" + pops[i].num + "', 'Popup', 'width=500,height=500,toolbar=no');void(0);\"><img src=\"" + pops[i].fsrc + "\" width=\"102\" height=\"83\" border=\"0\"></a><img src=\"pics/spacer013300.gif\" width=\"20\" height=\"83\">";
    }
    strHTML+="</NOBR>";
*/
function insideWindowHeight () {
   if  ((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==4)) {
     return window.innerHeight;
  }
  else {
      return window.document.body.clientHeight;
  }
}

function insideWindowWidth () {

  if  ((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==4)) {
     return window.innerWidth; 
  }
  else {

     return window.document.body.clientWidth;
  }
}

DynAPI.onLoad=function() {
//function OnLoadFunc (){
	setLayerPosition();
	mySW = new IbsScrollWindow();
	xPos = insideWindowWidth()/2 -300;
 //   if (insideWindowWidth() > 690) 	
 
 	if(document.layers){
		yPos=document.scrolling.y;
		xPos=document.scrolling.x;
	}else{
		yPos=getDim(document.images.scrolling).y;
		xPos=getDim(document.images.scrolling).x;
	}
    if (xPos > minX) {
	   mySW.moveTo(xPos,yPos);
    }
	else { 
	   mySW.moveTo(minX,yPos);
    }
	mySW.setSize(525,100);
	this.document.addChild(mySW);

	mySW.setHTML(strHTML);
    mySW.content.setBgColor("#00667D");
//	preloadBigImages();
}

DynAPI.onResize=function() {
	xPos = insideWindowWidth()/2 - 305;
    if (insideWindowWidth() > 690) 	mySW.moveTo(xPos,yPos);
	else mySW.moveTo(minX,yPos);
 //   mySW.scrollLeft();
}


function preloadBigImages() {
  var imgs = new Array();
  var i;
  for (i=1; i< pops.length; i++) {
    imgs[i] = new Image ();
	imgs[i].src = pops[i].fname;
  }
}
