var Mac_OS = (navigator.userAgent.indexOf("mac") != -1) || (navigator.userAgent.indexOf("Mac") != -1); 
var Linux_OS = (navigator.userAgent.indexOf("Linux") != -1); 
var Win_OS = (navigator.userAgent.indexOf("Win") != -1); 
var Other_OS = (!Win_OS && !Linux_OS && !Mac_OS != -1); 
var Opera = (navigator.userAgent.indexOf('Opera') != -1); 
var MSIE = (navigator.userAgent.indexOf('MSIE') != -1); 
var Moz = (navigator.userAgent.indexOf('Gecko') != -1); 
var NS = (navigator.userAgent.indexOf('Netscape') != -1 && navigator.userAgent.indexOf('Gecko') != -1); 
if(document.layers){var Nav4="true";};  
var Konqueror = (navigator.userAgent.indexOf('Konqueror') != -1);  
if (Opera && MSIE || Opera){var Opera="true"; MSIE="false";}  
if (MSIE && !Opera){MSIE="true";} 
var Other_Browser = (!Opera && !MSIE && !Moz && !NS && !Nav4 && !Konqueror != -1); 


var theImages = new Array() 
theImages[0] = 'images/hdr_trash_tier1.jpg'
theImages[1] = 'images/hdr_trash_tier2.jpg'
theImages[2] = 'images/hdr_trash_tier3.jpg'
theImages[3] = 'images/hdr_trash_tier4.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function pop_taf(sEmail){
	window.open("tell_friend.htm?email="+sEmail,"","directories = no,height =440,left=100,top=100,menubar=no,status=no,toolbar = no,location=no,width=440");

}
function showImage(){
document.write('<img alt="Picture of trash in California" title="Picture of trash in California" width="560" height="98" src="'+theImages[whichImage]+'">');
}

function popOnlineAd(theURL) 
{
  window.open(theURL,"","height=110,width=728,scrollbars=no,resizable=yes,screenX=140,left=140,screenY=50,top=10");
}
