//========= =========
// javascript for ads
// file: rotated_top_ad.js
// called from any or all softwareqatest.com pages
// copyright 2011 Digital Media Group Inc. 
//=============== ===============
// Setup for anywhere from 1 to 4 ads
MaxAds = 4;

Ad1 = 0;
Ad2 = 1;
Ad3 = 2;
Ad4 = 3;

//============== ===============

var Ad = new Array(MaxAds);
//Note: Ad 'length' now = 4;  Ad[0], Ad[1], etc each with value of NULL

var AdHTMLcode = new Array(MaxAds);


//=============== ===============

// Set up an array for holding lines of HTML code for each ad (up to
// MaxAds # of ads, set above) allowing up to 12 lines of HTML code 
// for each ad, which should be more than enough lines in all cases
var CounterA = 0;
var CounterB = 0;
for(CounterA = 0; CounterA < MaxAds; CounterA++)
{
	Ad[CounterA] = new Array;
  	for (CounterB = 0; CounterB < 12; CounterB++)
  	{
  		Ad[CounterA][CounterB] = "";
  	}
}

// enumerate these values as a reminder of numbering details.
Line1 = 0;
Line2 = 1;
Line3 = 2;
Line4 = 3;
Line5 = 4;
Line6 = 5;
Line7 = 6;
Line8 = 7;
Line9 = 8;
Line10 = 9;
Line11 = 10;
Line12 = 11;

//=============== =============== 
//Setup templates for 4 ads and fill in as needed
//Any lines not specified here are defaulted
//as having a NULL value - set previously 
//NOTE - NEED \ in front of "quote" chars
//===================== ==================



//<div class="ad_Header"> <img src="banners/468x60.gif" style="margin-bottom: -30px; margin-top: 15px" />
//	width: 730px;
//	float: left;
//	padding-left: 15px;
//}

//------- Start Ad1_1 ----------
Ad[Ad1][Line1] = '';
Ad[Ad1][Line2] = '<img src=\"banners/468x60a.gif\">';
Ad[Ad1][Line3] = '';
Ad[Ad1][Line4] = '';
Ad[Ad1][Line5] = '';
Ad[Ad1][Line6] = '';

//--------- End Ad1_1 ----------	

//--------- Start Ad1_2 ----------
Ad[Ad2][Line1] = '';
Ad[Ad2][Line2] = '<img src=\"banners/468x60a.gif\">';
Ad[Ad2][Line3] = '';
Ad[Ad2][Line4] = '';
Ad[Ad2][Line5] = '';
Ad[Ad2][Line6] = '';
//--------- End Ad1_2 ----------	

//------- Start Ad1_3 ----------
Ad[Ad3][Line1] = '';
Ad[Ad3][Line2] = '<img src=\"banners/468x60a.gif\">';
Ad[Ad3][Line3] = '';
Ad[Ad3][Line4] = '';
Ad[Ad3][Line5] = '';
Ad[Ad3][Line6] = '';
//--------- End Ad1_3 ----------	

//------- Start Ad1_4 ----------
Ad[Ad4][Line1] = '';
Ad[Ad4][Line2] = '<img src=\"banners/468x60a.gif\">';
Ad[Ad4][Line3] = '';
Ad[Ad4][Line4] = '';
Ad[Ad4][Line5] = '';
Ad[Ad4][Line6] = '';
//--------- End Ad1_4 ----------
	




//=============== =============== 

// These next few lines will concatenate the lines 
// for an ad into 1 string, with spaces between each line.
// old browsers mentioned 256 char limit as best; no longer an issue

//?chg this to only join the chosen ad?

CounterA = 0;
for (CounterA = 0; CounterA < MaxAds; CounterA++)
{
	AdHTMLcode[CounterA] = Ad[CounterA].join("");
}


// Set up a random Ad chooser  

var ran_unrounded=Math.random()*4;
var ChosenAdNum=Math.floor(ran_unrounded);
document.write(AdHTMLcode[ChosenAdNum]);


// End of rotated_top_ads.js 
// =============================== ==========================


