

var ads = new Array();
var urls = new Array();
var text = new Array();

ads[0] = '/images/headings/advancedsearch_w_icon.gif';
urls[0] = '/ps.jsp';
text[0] = 'Narrow product searches to find specific units.  Get started!';


ads[1] = '/images/headings/ordertracking_w_icon.gif';
urls[1] = '/mymetric.jsp';
text[1] = 'Track orders online! Create a MyMetric account today.'

ads[2] = '/images/headings/configureaunit_w_icon.gif';
urls[2] = '/configunit_about.jsp';
text[2] = 'Customize your test equipment!';

ads[3] = '/images/headings/promotions_w_icon.gif';
urls[3] = '/catalog/promotion/promo_menu.jsp';
text[3] = 'Don’t miss these great deals!';


ads[4] = '/images/headings/catalog_w_icon.gif';
urls[4] = '/CatalogServlet?object=CATALOG_REQUEST_FORM&action=GET';
text[4] = 'Request a catalog today!'


ads[5] = '/images/headings/wishlist_w_icon.gif';
urls[5] = '/mymetric.jsp';
text[5] = 'Organize test equipment plans and purchases.'


ads[6] = '/images/headings/myoffer_w_icon.gif';
urls[6] = '/catalog/offers/myoffer.jsp';
text[6] = 'Give us Your Best Price.  Make an offer today!';


var j = 0
var adsLength = ads.length;

var preBuffer = new Array()
for (i = 0; i < adsLength; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = ads[i]
}



var adSelection = Math.round(Math.random()*(adsLength-1));

var adSelection2 = adSelection;

while (adSelection2 == adSelection)
{
	adSelection2 = Math.round(Math.random()*(adsLength-1));
}


function displayAd(){
document.write('<a href="'+urls[adSelection]+'" class=f><img src="'+ads[adSelection]+'" border=0><br>'+text[adSelection]+'</a><br><br>');
document.write('</td></tr><tr><td class="hruleleftnav"><img src="/images/shim.gif" width="1" height="1"></td></tr>');
document.write('<tr><td class="leftmenu"><br>');
document.write('<a href="'+urls[adSelection2]+'" class=f><img src="'+ads[adSelection2]+'" border=0><br>'+text[adSelection2]+'</a>');

}


function displaySingleAd(){
document.write('<a href="'+urls[adSelection]+'" class=f><img src="'+ads[adSelection]+'" border=0><br>'+text[adSelection]+'</a><br>');

}









