src = ['http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins2.jpg', 
	   'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins3.jpg', 
	   'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins4.jpg', 
	   'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins5.jpg', 
	   'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins6.jpg'];
url = ['Layer2', 'http://nationalmap.gov/', 'http://nationalmap.gov/', 'http://sedac.ciesin.columbia.edu/plue/gpw/index.html?main.html&2', 'http://www.ciesin.columbia.edu/wild_areas/'];

duration = 4;
ads=[]; ct=0;
function switchAd() {
var n=(ct+1)%src.length;
 if (ads[n] && (ads[n].complete || ads[n].complete==null)) 
 {
 document['Ad_Image'].src = ads[ct=n].src;
 }
ads[n=(ct+1)%src.length] = new Image;
ads[n].src = src[n];
setTimeout('switchAd()',duration*1000);
}
function doLink(){
if(!getRe()){
var myLink = url[ct];
var myWin=window.open(myLink,'new','height=550,width=640,dependent=yes,resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes');
myWin.focus();
return;
 }
else{return;}
}
 
 
onload = function(){
if (document.images)switchAd();
MM_preloadImages('http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins2.jpg', 
				 'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins3.jpg', 
				 'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins4.jpg', 
				 'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins5.jpg', 
				 'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/homepageintro/nbiinins6.jpg');
return;
}

function getRe(){
var shortStr = 'Layer';
var longStr = url[ct];
var re = new RegExp(shortStr, 'g');
return re.exec(longStr);
 }
function overFn(){
 if(getRe()){
 window.status='View info';
 showBlock(url[ct]);
 return true;
 }
 else {
 window.status=url[ct];
 return true;
 }
}
function showBlock(id) {
 var obj = document.getElementById(id); 
 obj.style.height = 'auto';
 obj.style.display = 'inline';
 return;
}
function hideBlock() {
for (i = 0; i < src.length; i++){
var id = url[i];
 var obj = document.getElementById(id); 
 if(obj) obj.style.display = 'none'; 
 }
window.status='';
return true;
}

function MM_reloadPage(init) { 
  if (init==true) with (navigator) {if ((appName=='Netscape')&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf('#')!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

var ct=1;

function stopGif() {
if(ct%2==1){
    document['Ad_Image'].src = 'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/maps_and_geospatial_data/bluemarblejune2004.gif';
    ct++;
    return;}
if(ct%2==0){
    document['Ad_Image'].src = 'http://www.nbii.gov/portal/server.pt/gateway/PTARGS_0_2_3000_239_954_43/http%3B/public-content%3B7087/publishedcontent/publish/geographic/northeast/maps_and_geospatial_data/bluemarbleyear2004.gif';
    ct=1;
    return;}
}