		
ID = [0,42,56,60,62,65,66,67,68,69]
Type = [0,2,2,2,2,2,2,2,2,2]
M_ID = [0,1,1,1,1,1,1,1,1,1]
M_N_A =['0','gif','jpg']
function WhichAd()  {
		if (typeof (GoogleAdComp) != "undefined")	{
				GoogleAd = Math.round(Math.random())
				GoogleAdComp = 1	// has <TD> 
		}else {
				GoogleAd = 0
				GoogleAdComp = 0
		}
		if (GoogleAd)	{
				text = '<script type="text/javascript">'
				text += 'google_ad_client = "pub-5472874956653074";'
				text += 'google_ad_width = 468;'
				text += 'google_ad_height = 60;'
				text += 'google_ad_format = "468x60_as";'
				text += '</script>'
				text += '<script type="text/javascript"'
				text += ' src="http://pagead2.googlesyndication.com/pagead/show_ads.js">'
				text += '</script>'
				document.write(text)
		}else{
				Advert_Number = Math.round(Math.random() * 5) + 1
				if (!GoogleAdComp)	{text = '<td align=center>'}else{text = ''}
				text += '<a href=http://www.dieselenginetrader.com/det_cfm/Advert-CFM-code_1.cfm?location=' + ID[Advert_Number] + ' target="_blank" ><img src="/clearpixel.gif" HEIGHT='
				if (Type[Advert_Number] ==1)  {
					text += '50 WIDTH=500'
				}else if (Type[Advert_Number] ==2) {
					text += '60 WIDTH=466'
				}
				text += ' border="0" alt="" name="advert"></a>'
				if (!GoogleAdComp)	{text += '</td>'}
				document.write(text)
		}
}

 function Init()  {
 		if (!GoogleAd)	{
				Junk_Number = Math.round(Math.random() * 999999) + 1
				img1 = new Image()
				img1.src="/det_cfm/Advert-CFM-code_1.cfm?number=" + ID[Advert_Number] + "&flush=" + Junk_Number
				document.advert.src="/det_cfm/DET-advert-" + ID[Advert_Number] + "." + M_N_A[M_ID[Advert_Number]]
		}
}

