/* javascript component called 07-AUG-2007 11:26:24 with id apps_satreg */ // ensures same ad can't display in two slots of the same size function removeFromAdList(alist, html) { var tmp = new Array(); var j = 0; for (var i = 0; i < alist.length; i++) { if (alist[i] != html) { tmp[j] = alist[i] ; j++ } } return tmp; } // gets a random member of the array for that slot function getAds(pos) { if (eval('window.' + pos)) { var adLength = eval(pos + '.length'); var rndNum = Math.floor(Math.random() * adLength); var html = eval(pos + '[rndNum]'); if (adLength > 0) { if (pos == 'top' || pos == 'bottom') { document.write(html); if (window.bottom) { bottom = removeFromAdList(bottom, html); } else if (window.bottom_left) { bottom_left = removeFromAdList(bottom_left, html); bottom_right = removeFromAdList(bottom_right, html); } } else if (pos == 'bottom_left') { document.write(html); bottom_right = removeFromAdList(bottom_right, html); } else { document.write(html); } } } } function getDoubleAds(pos) { ad_ar = eval('window.' + pos); if (ad_ar && ad_ar.length > 0) { document.write('
| ' ); if (window.bottom) { getAds('bottom'); } else { getAds('bottom_left'); } document.write( ' | ' + '' ); if (window.bottom) { getAds('bottom'); } else { getAds('bottom_right'); } document.write( ' |
';
var left_square = new Array();
left_square[0] = '
';
var left_wide = new Array();
var left_wide2 = new Array();
left_wide2[0] = '
';
var bottom_left = new Array();
bottom_left[0] = '
';
var bottom_right = new Array();
bottom_right[0] = '
';
var url = window.location.toString();
var left = new Array();
if ((url.indexOf('www.') != -1 && url.indexOf('/student/testing') != -1) ||
(url.indexOf('apps.') != -1 && url.indexOf('cbsearch') != -1) ||
url.indexOf('qotd') != -1 ||
'top left_wide2 bottom_left bottom_right'.indexOf('wide') != -1) {
left = left_wide;
} else {
left = left_square;
}