var theImages = new Array()

theImages[0] = 'http://www.post-gazette.com/images4/2010_photoday_01.jpg'
theImages[1] = 'http://www.post-gazette.com/images4/2010_photoday_02.jpg'
theImages[2] = 'http://www.post-gazette.com/images4/2010_photoday_03.jpg'
theImages[3] = 'http://www.post-gazette.com/images4/2010_photoday_04.jpg'
theImages[4] = 'http://www.post-gazette.com/images4/2010_photoday_05.jpg'
theImages[5] = 'http://www.post-gazette.com/images4/2010_photoday_06.jpg'
theImages[6] = 'http://www.post-gazette.com/images4/2010_photoday_07.jpg'
theImages[7] = 'http://www.post-gazette.com/images4/2010_photoday_08.jpg'
theImages[8] = 'http://www.post-gazette.com/images4/2010_photoday_09.jpg'
theImages[9] = 'http://www.post-gazette.com/images4/2010_photoday_10.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 showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}


var theImagesX = new Array()

theImagesX[0] = "<a href='/pg/03001/1108747-209.stm'><img src='http://www.post-gazette.com/images5/2011_multimedia_07_148x50.jpg' style='border:0px; margin-bottom:2px'></a><br clear=left/><a href='/pg/03001/1108747-209.stm'><strong>MAPPING MORTALITY &raquo;</strong></a><br clear=left><span style='color:#777777; font-size:95%;'>A PG series on air pollution</span>"

theImagesX[1] = "<a href='http://www.post-gazette.com/civilwar/'><img src='http://www.post-gazette.com/images5/2011_promo_civilwar_148x50.jpg' style='border:0px; margin-bottom:2px'></a><br clear=left/><a href='http://www.post-gazette.com/civilwar/'><b>THE CIVIL WAR &raquo;</b></a><br /><span style='color:#777777; font-size:95%;'>The 150th anniversary</span>"

theImagesX[2] = "<a href='/pg/10328/1105572-60.stm'><img src='http://www.post-gazette.com/images5/2011_promo_batman_148x50.jpg' style='border:0px; margin-bottom:2px'></a><br clear=left/><a href='/pg/10328/1105572-60.stm'><b>FILMED HERE &raquo;</b></a><br /><span style='color:#777777; font-size:95%;'>&#039;The Dark Knight&#039; and others</span>"

var k = 0
var q = theImagesX.length;
var preBuffer = new Array()
for (m = 0; m < q; m++){
   preBuffer[m] = new Image()
   preBuffer[m].src = theImagesX[m]
}
var whichImage1 = Math.round(Math.random()*(q-1));
function showImageX(){
document.write(theImagesX[whichImage1]);
}



var theImagesPromo = new Array()

theImagesPromo[0] = "<a href='/pg/11254/1175949-85.stm'><img src='http://www.post-gazette.com/images5/20110911_911_2_148x50.jpg' style='border:0px; margin-bottom:2px'></a><br clear=left/><a href='/pg/11254/1175949-85.stm'><strong>9/11 THEN AND NOW &raquo;</strong></a><br clear=left><span style='color:#777777; font-size:95%;'>The Shanksville memorial</span>"

theImagesPromo[1] = "<a target=_blank href='http://shale.sites.post-gazette.com/'><img src='http://www.post-gazette.com/images5/2011_pipeline_148x50.png' style='border:0px; margin-bottom:2px'></a><br clear=left/><a target=_blank href='http://shale.sites.post-gazette.com/'><b>MARCELLUS BOOM &raquo;</b></a><br /><span style='color:#777777; font-size:95%;'>Ongoing PG coverage</span>"

theImagesPromo[2] = "<a href='/pg/11226/1166781-53.stm'><img src='http://www.post-gazette.com/images5/2011_storefront_148x50.png' style='border:0px; margin-bottom:2px'></a><br clear=left/><a href='/pg/11226/1166781-53.stm'><b>STOREFRONT PROJECT &raquo;</b></a><br /><span style='color:#777777; font-size:95%;'>Changes in the city</span>"

theImagesPromo[3] = "<a href='http://blogs.sites.post-gazette.com/teenieHarris/index.php'><img src='http://www.post-gazette.com/images5/20111023harris-teenie_148x50.png' style='border:0px; margin-bottom:2px'></a><br clear=left/><a href='http://blogs.sites.post-gazette.com/teenieHarris/index.php'><b>'TEENIE' HARRIS &raquo;</b></a><br /><span style='color:#777777; font-size:95%;'>A PG interactive</span>"

var s = 0
var t = theImagesPromo.length;
var preBuffer = new Array()
for (u = 0; u < t; u++){
   preBuffer[u] = new Image()
   preBuffer[u].src = theImagesPromo[u]
}
var whichImage2 = Math.round(Math.random()*(t-1));
function showImagePromo(){
document.write(theImagesPromo[whichImage2]);
}
