var ad_type_blank = 0;
var ad_type_addotcom728x90 = 1;
var ad_type_addotcom468x60 = 3;
var ad_type_cpx468x60 = 4;
var ad_type_cpx300x250 = 5;
var ad_type_pulse160x600 = 6;
var ad_type_google160x600 = 7;
var ad_type_google120x240 = 8;
var ad_type_google125x125 = 9;
var ad_type_erdrct120x90 = 10;
var ad_type_freelotto120x90 = 12;
var ad_type_cpx300x2502 = 13;
var ad_type_cpx160x600 = 14;
var ad_type_textlinks4 = 15;
var ad_type_textlinks1 = 16;
var ad_type_mc_120x600 = 17;
var ad_type_mc_468x60 = 18;
var ad_type_mc_125x125 = 19;
stlcr_g8rr8y("stlad");
var stladtype = stll_gc00k1e("stlad");
if(stladtype == null){
	 stllcr_sc00k1e("stlad", "1");
	 stlcr_g8rr8y("stlad");
	 stladtype = stll_gc00k1e("stlad");
}
if(typeof(isTest) != "undefined"){
	document.write('<script type="text/javascript" src="http://www.tinbuserver.com/clients/sys/php/getstladType.php?chadfl=ad0"></script>');
}
else if(stladtype=="1"){
	document.write('<script type="text/javascript" src="http://www.tinbuserver.com/clients/sys/php/getstladType.php?chadfl=ad1"></script>');
	stllcr_sc00k1e("stlad", "2");
}
else{
	document.write('<script type="text/javascript" src="http://www.tinbuserver.com/clients/sys/php/getstladType.php?chadfl=ad2"></script>');
	stllcr_sc00k1e("stlad", "1");
}
stlcr_g8rr8y("stlad");
stladtype = stll_gc00k1e("stlad");
var TinbuSiteURL = "http://www.tinbuadserv.com/nav/notext/size2";
if(navigator.appName == "Microsoft Internet Explorer"){
	var ModuleArray = [
	["Lottery", "/modules/lottery.html", "-7", "-2", "stlnavicon0", "lottery"], //0
	["Horoscope", "/modules/horoscope.html", "-16", "12", "stlnavicon1", "horoscope"], //1
	["Weather", "/modules/weather.html", "-10", "-2", "stlnavicon2", "weather"], //2
	["Mortgages", "/modules/mortgage.html", "-16", "12", "stlnavicon3", "mortgage"], //3
	["Sudoku", "/modules/sudoku.html", "-6", "-2", "stlnavicon4", "sudoku"], //4
	["Models", "/modules/models.html", "-4", "12", "stlnavicon5", "models"], //5
	["Soccer", "/modules/soccer.html", "-4", "-2", "stlnavicon6", "soccer"], //6
	["Radio", "/modules/music.html", "0", "12", "stlnavicon7", "music"], //7
	["Movies", "/modules/boxoffice.html", "-14", "-2", "stlnavicon8", "boxoffice"], //8
	["Recipes", "/modules/recipes.html", "-6", "12", "stlnavicon9", "recipes"], //9
	["Stocks", "/modules/stocks.html", "-3", "-2", "stlnavicon10", "stocks"], //10
	["Jobs", "/modules/jobs.html", "4", "-2", "stlnavicon20", "jobs"], //11
	["Gas", "/modules/gasprice.html", "6", "-2", "stlnavicon12", "gasprice"], //12
	["MPG", "/modules/mpg.html", "4", "12", "stlnavicon13", "mpg"], //13
	["Flight", "/modules/flight.html", "0", "-2", "stlnavicon14", "flight"], //14
	["News", "/modules/news.html", "3", "12", "stlnavicon15", "news"], //15
	["Fitness", "/modules/fitness.html", "-6", "-2", "stlnavicon16", "fitness"], //16
	["Quotes", "/modules/quotes.html", "-4", "12", "stlnavicon17", "quotes"], //17
	["Sports", "/modules/sports.html", "-3", "-2", "stlnavicon18", "sports"], //18
	["Games", "/modules/games.html", "-2", "12", "stlnavicon19", "games"], //19
	["Entertainment", "/modules/entertainment.html", "-25", "12", "stlnavicon11", "entertainment"], //20
	["Schools", "/modules/schools.html", "-6", "12", "stlnavicon21", "schools"], //21
	["Shopping", "/modules/shopping.html", "-10", "-2", "stlnavicon22", "shopping"], //22
	["Crosswords", "/modules/crosswords.html", "-19", "12", "stlnavicon23", "crosswords"] //23
	];
}
else{
	var ModuleArray = [
	["Lottery", "/modules/lottery.html", "-7", "-2", "stlnavicon0", "lottery"], //0
	["Horoscope", "/modules/horoscope.html", "-16", "12", "stlnavicon1", "horoscope"], //1
	["Weather", "/modules/weather.html", "-10", "-2", "stlnavicon2", "weather"], //2
	["Mortgages", "/modules/mortgage.html", "-16", "12", "stlnavicon3", "mortgage"], //3
	["Sudoku", "/modules/sudoku.html", "-6", "-2", "stlnavicon4", "sudoku"], //4
	["Models", "/modules/models.html", "-4", "12", "stlnavicon5", "models"], //5
	["Soccer", "/modules/soccer.html", "-4", "-2", "stlnavicon6", "soccer"], //6
	["Radio", "/modules/music.html", "0", "12", "stlnavicon7", "music"], //7
	["Movies", "/modules/boxoffice.html", "-14", "-2", "stlnavicon8", "boxoffice"], //8
	["Recipes", "/modules/recipes.html", "-6", "12", "stlnavicon9", "recipes"], //9
	["Stocks", "/modules/stocks.html", "-3", "-2", "stlnavicon10", "stocks"], //10
	["Entertainment", "/modules/entertainment.html", "-25", "12", "stlnavicon11", "entertainment"], //11
	["Gas", "/modules/gasprice.html", "6", "-2", "stlnavicon12", "gasprice"], //12
	["MPG", "/modules/mpg.html", "4", "12", "stlnavicon13", "mpg"], //13
	["Flight", "/modules/flight.html", "0", "-2", "stlnavicon14", "flight"], //14
	["News", "/modules/news.html", "3", "12", "stlnavicon15", "news"], //15
	["Fitness", "/modules/fitness.html", "-6", "-2", "stlnavicon16", "fitness"], //16
	["Quotes", "/modules/quotes.html", "-4", "12", "stlnavicon17", "quotes"], //17
	["Sports", "/modules/sports.html", "-3", "-2", "stlnavicon18", "sports"], //18
	["Games", "/modules/games.html", "-2", "12", "stlnavicon19", "games"], //19
	["Jobs", "/modules/jobs.html", "4", "-2", "stlnavicon20", "jobs"], //20
	["Schools", "/modules/schools.html", "-6", "12", "stlnavicon21", "schools"], //21
	["Shopping", "/modules/shopping.html", "-10", "-2", "stlnavicon22", "shopping"], //22
	["Crosswords", "/modules/crosswords.html", "-19", "12", "stlnavicon23", "crosswords"] //23
	];
}


//Page Functions
headingInto();
function headingInto(){ 
	document.write('<link rel="stylesheet" href="http://www.newyorklotterylive.com/all/css/stlstyle.php" type="text/css" media="screen" />');
	
	document.write('<link rel="stylesheet" href="http://www.newyorklotterylive.com/all/css/stlstyle2.php?lotteryStatecss='+lotteryStateShortup+'" type="text/css" media="screen" />');

	document.write('<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />');
}
function displCopy(){
	var currYear = new Date();
	document.write(currYear.getFullYear());
}

function rez(){
	var frcsize = document.getElementById('stlcentercolumn'); 
	if(frcsize.offsetWidth < 542){
		frcsize.style.width="542px";
	}
	var flsize1 = document.getElementById('stlleftcolumn').offsetWidth+2;
	var flsize2 = document.getElementById('stlrightcolumn').offsetWidth+24;
	var fhsize = document.getElementById('stlrightcolumn').offsetHeight;
	var fhsize1 = document.getElementById('stlleftsidebar').offsetHeight;
	var fhsize2 = document.getElementById('stlrightsidebar').offsetHeight;
	fhsize1 = ((fhsize1 > fhsize2)?fhsize1:fhsize2);
	fhsize = ((fhsize > fhsize1)?fhsize : fhsize1);
	document.getElementById("stlleftcolumn").style.height=fhsize+"px";
	document.getElementById("stlbody").style.width=(flsize1+flsize2)+"px";
}


//Navigation Icons
function ShowTinbuModuleIcons(){
	document.write('<div id="stlnavicons" style="width:542px; font-size:9px;"><ul class=navbartbhead" style="padding-bottom:15px; padding-top:10px; width:512px; height:60px; margin:auto;">');
	document.write("<script type=\"text/javascript\" src=\"http://www.tinbuserver.com/clients/sys/js/wz_tooltip.js\"></script>");
	var modCount =0;
	var modbrCount = 0;
	for (var i=1; i < ModuleArray.length; i++){
		var extraStyle ="";
		if(navigator.appName == "Microsoft Internet Explorer"){
			switch(i){
				case 11:
					extraStyle ="style='position:relative; left: 0px;' ";
					break;
				case 3:
					extraStyle ="style='position:relative; left:-10px;' ";
					break;
				case 23:
					extraStyle ="style='position:relative; left:-10px;' ";
					break;
				case 1:
					extraStyle ="style='position:relative; left:4px;' ";
					break;
				default:
					extraStyle = "";
					break;
			}
		}
		else{
			switch(i){
				case 11:
					extraStyle ="style='position:relative; left:-17px;' ";
					break;
				case 3:
					extraStyle ="style='position:relative; left:-10px;' ";
					break;
				case 23:
					extraStyle ="style='position:relative; left:-10px;' ";
					break;
				case 1:
					extraStyle ="style='position:relative; left:-10px;' ";
					break;
				default:
					extraStyle = "";
					break;
			}
		}
		if(modbrCount ==1){
			document.write("<div style='float:left; width: 40px; height:60px;'><div><li class='navlihead' style='float:none;' onclick=\"window.location='"+ModuleArray[i][1]+"'\" onmouseover=\"Tip('<span class=tb_toolbar_textOptions>"+ModuleArray[i][0]+"</span>',SHADOW,false,BGCOLOR,'',BORDERWIDTH,0,FIX, [this,"+ModuleArray[i][2]+","+ModuleArray[i][3]+"]);this.style.backgroundColor='#"+TinbuNavCol+"';changeDisplayP('"+ModuleArray[i][4]+"');\" onmouseout=\"UnTip();this.style.backgroundColor='#FFFFFF';changeDisplayM('"+ModuleArray[i][4]+"', '"+ModuleArray[i][0]+"');\"><center><img class=navbarimghead src=\""+TinbuSiteURL+"/"+ModuleArray[i][5]+".png\" border=0 alt='"+ModuleArray[i][0]+"' height=24 width=24></center></li></div><div id='"+ModuleArray[i][4]+"' "+extraStyle+">"+ModuleArray[i][0]+"</div></div>");
			modbrCount = 0;
		}
		else{
			modbrCount = 1;
			document.write("<div style='float:left; width: 40px; height:60px;'><div><li class='navlihead' style='float:none;' onclick=\"window.location='"+ModuleArray[i][1]+"'\" onmouseover=\"Tip('<span class=tb_toolbar_textOptions>"+ModuleArray[i][0]+"</span>',SHADOW,false,BGCOLOR,'',BORDERWIDTH,0,FIX, [this,"+ModuleArray[i][2]+","+ModuleArray[i][3]+"]);this.style.backgroundColor='#"+TinbuNavCol+"';changeDisplayP('"+ModuleArray[i][4]+"');\" onmouseout=\"UnTip();this.style.backgroundColor='#FFFFFF';changeDisplayM('"+ModuleArray[i][4]+"', '<br>"+ModuleArray[i][0]+"');\"><center><img class=navbarimghead src=\""+TinbuSiteURL+"/"+ModuleArray[i][5]+".png\" border=0 alt='"+ModuleArray[i][0]+"' height=24 width=24></center></li></div><div id='"+ModuleArray[i][4]+"' "+extraStyle+"><br>"+ModuleArray[i][0]+"</div></div>");
		}
		if(navigator.appName == "Microsoft Internet Explorer"){
			if(modCount == 8){
				document.write('</ul><ul class=navbartbhead style="padding-bottom:15px; width:512px; height:60px; margin:auto;">');
			}
			else if(modCount == 17){
				document.write('</ul><ul class=navbartbhead style="padding-bottom:15px; width:320px; height:60px; margin:auto;">');
			}
			else if(modCount == 24){
				document.write('</ul><ul class=navbartbhead style="padding-bottom:15px; width:512px; height:60px; margin:auto;">');
			}
		}
		else{
			if(modCount == 11){
				document.write('</ul><ul class=navbartbhead style="padding-bottom:15px; width:470px; height:60px; margin:auto;">');
			}
			else if(modCount == 24){
				document.write('</ul><ul class=navbartbhead style="padding-bottom:15px; width:512px; height:60px; margin:auto;">');
			}
		}
		modCount++;
	}
	document.write("</ul><br></div>");
}

function ShowTinbuModuleIcons1(){
	if(typeof(p) != "undefined"){
		if(p=="modules"){
			return;
		}
	}
	var totalCount = 14;
	var numMod = 0;
	var dousemod_Arr = new Array();
	var randomnumber=Math.floor(Math.random()*ModuleArray.length);
	for (index in ModuleArray){
		dousemod_Arr[index] = new Array( ModuleArray[index][0], ModuleArray[index][1], ModuleArray[index][2], ModuleArray[index][3], ModuleArray[index][4], ModuleArray[index][5]);
	}
	dousemod_Arr.splice(0, 1);
	dousemod_Arr.splice(2, 1);
	dousemod_Arr.splice(18, 1);
	dousemod_Arr.splice(18, 1);
	numMod++;
	document.write('<div id="stlnavicons">');
	while (numMod != totalCount){		
		document.write('<div style="float:left; text-align:center; width:70px;"><a target="content" href='+dousemod_Arr[0][1]+' style="padding: 0px;"><img class=navbarimghead src='+TinbuSiteURL+'/'+dousemod_Arr[0][5]+'.png border=0 alt='+dousemod_Arr[0][0]+' height=24 width=24><br><span style="text-align:center;">'+dousemod_Arr[0][0]+'</span></a></div>');
		dousemod_Arr.shift();
		dousemod_Arr.sort(function() {return 0.5 - Math.random()});	
		numMod++;
	}
	document.write('</div><br><br><br>');
}

function changeDisplayP(whereTo){
	if(typeof(document.getElementById(whereTo)) != "null" && typeof(document.getElementById(whereTo)) != "undefined"){
		if(document.getElementById(whereTo).innerHTML !=""){
			document.getElementById(whereTo).innerHTML = "";
		}
	}
}
function changeDisplayM(whereTo, addMe){
	if(typeof(document.getElementById(whereTo)) != "null" && typeof(document.getElementById(whereTo)) != "undefined"){
		if(document.getElementById(whereTo).innerHTML ==""){
			document.getElementById(whereTo).innerHTML = addMe;
		}
	}
}

//Cookie Information
var stll_crcookieArray = new Array(null);
 //Set Cookie
function stllcr_sc00k1e(cookie_name,cookie_value){ 
	document.cookie = cookie_name + '=' + escape(cookie_value);
}

//Get Cookie
function stll_gc00k1e(cookie_name) {
	var stlcrdcookie = document.cookie;
	var stlcrcname = cookie_name + "=";
	var stlcrclen = stlcrdcookie.length;
	var stlcrcbegin = 0;
		while (stlcrcbegin < stlcrclen)
		{
			var stlcrvbegin = stlcrcbegin + stlcrcname.length;
			if (stlcrdcookie.substring(stlcrcbegin, stlcrvbegin) == stlcrcname) {
				var stlcrvend = stlcrdcookie.indexOf (";", stlcrvbegin);
			if (stlcrvend == -1) stlcrvend = stlcrclen;
				return unescape(stlcrdcookie.substring(stlcrvbegin, stlcrvend));
		}
			stlcrcbegin = stlcrdcookie.indexOf(" ", stlcrcbegin) + 1;
			if (stlcrcbegin == 0) break;
		}
	return null;
} 

//Delete Cookie
function stlcr_dc00k1e(cookie_name){
	document.cookie = cookie_name + '=' + '; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/';
}

//Get Array
function stlcr_g8rr8y(cookie_name){
	var stlcrentry = stll_gc00k1e(cookie_name);
	if (stlcrentry) {
		arr_idx = 1;
		while (stlcrentry.indexOf('¬') != '-1')
		{    
			stll_crcookieArray[arr_idx] = stlcrentry.substring(0,stlcrentry.indexOf('¬'));
			arr_idx++;
			stlcrentry = stlcrentry.substring(stlcrentry.indexOf('¬')+1, stlcrentry.length);
		}
	}
}

//Set array
function stlcr_s8rr8y(cookie_name, cookie_expires)
{
	var cookie_value = '';
	for (var arr_idx = 1; stll_crcookieArray[arr_idx]; arr_idx++){
		cookie_value += stll_crcookieArray[arr_idx] + '¬';
	}
	stllcr_sc00k1e(cookie_name, cookie_value);
}

//Delete Entry  
function stlcrdentry(cookie_name, cookie_pos, cookie_expires)
{
	var cookie_value = '';
		stlcr_g8rr8y(cookie_name);
	for (var arr_idx = 1; arr_idx < cookie_pos; arr_idx++){
		cookie_value += stll_crcookieArray[arr_idx] + '¬';
	}
	for (var array_idx = cookie_pos + 1; stll_crcookieArray[array_idx]; array_idx++){
		cookie_value += stll_crcookieArray[array_idx] + '¬';
	}
		stlcr_dc00k1e(cookie_name);
}

//Next Entry
function stlcrnentry() 
{
	var arr_idx = 0;
	for (var array_idx = 1; stll_crcookieArray[array_idx]; array_idx++)
	{
		arr_idx = array_idx
	}
	return arr_idx + 1;
}

//Winning Numbers
function checkFormAction(theForm){
	var checkVal = "";
	var error = "";
	checkVal = makecheckBoxed();
	if(checkVal == ""){
		error = "No Game has been selected. \n";
	}
	else{
		document.getElementById('whatschecked').value=checkVal;
	}
	error += ((document.getElementById('sdate').value=="")?"Start Date has not been selected.\n":"");
	error += ((document.getElementById('edate').value=="")?"End Date has not been selected.\n":"");
	if(error ==""){
		return true;
	}
	else{
		//alert(error);
		return false;
	}
}
function removeAllO(){
	if(document.getElementById('all_games').checked==true){
		for(var i = 1; i< idArr.length; i++){
			((document.getElementById(idArr[i]).checked==true)?document.getElementById(idArr[i]).checked=false:"");
		}
	}
}
function removeAllC(aId){
	if(document.getElementById(aId).checked==true){
			((document.getElementById("all_games").checked==true)?document.getElementById("all_games").checked=false:"");
	}
}
function makecheckBoxed(){
	var whatischecked = "";
	if(document.getElementById('all_games').checked==true){
		whatischecked = "0";
	}
	else{
		for(var i = 1; i< idArr.length; i++){
			if(document.getElementById('winnum_'+idArr[i]).checked==true){
				whatischecked +=((whatischecked=="")?"":",");
				whatischecked +=document.getElementById('winnum_'+idArr[i]).value;
			}
		}
	}
	return whatischecked;
}

function correctDate(dateType){
	var oldYear = "";
	var oldMonth = "";
	var oldDay = "";
	var newYear = "";
	var newMonth = "";
	var newDay = "";

	var achangeDate = "";
	var newdate = "";
	if(dateType == "0"){
		achangeDate = ((dateType=="0")?document.getElementById('sdate').value:document.getElementById('edate').value);
		achangeDate = achangeDate.split("-");
		oldYear = achangeDate[0];
		var isten = "no";
		oldMonth = achangeDate[1];
		oldDay = achangeDate[2];			
		if(oldMonth=="12"){
			oldMonth ="0";
			oldYear++;
		}
		else if(oldMonth=="11"){
		}
		else if(oldMonth=="10"){
			isten = "yes";
			oldMonth--;
		}
		else{
			oldMonth = ((oldMonth.charAt(0) == "0")?oldMonth = oldMonth.substr(1,1):oldMonth);
			oldMonth++;
		}
		oldDay = ((oldDay.charAt(0) == "0")?oldDay = oldDay.substr(1,1):oldDay);
		var dateMade = new Date(oldYear, oldMonth, oldDay);
		newYear = dateMade.getFullYear();
		newMonth = dateMade.getMonth();
		newMonth = newMonth.toString();
		newDay = dateMade.getDate();
		newDay = newDay.toString();
		if(newMonth=="12"){
			newYear++;
			newMonth = "01";
		}
		else if(newMonth=="11"){
			newMonth = "12";
		}
		if(isten=="yes"){
			newMonth = "11";
		}
		if(newMonth == "0"){
			newMonth = "1";
		}
		else{
			newMonth = ((newMonth.charAt(0) == "0")?newMonth = newMonth.substr(1,1):newMonth);
		}		
		newMonth = ((newMonth < 10)?"0"+newMonth:newMonth);
		newDay = ((newDay.charAt(0)!= "0" && newDay < 10)?newDay = "0"+newDay:newDay);
		newdate = newYear+"-"+newMonth+"-"+newDay;
	}
	else{
		achangeDate = ((dateType=="0")?document.getElementById('sdate').value:document.getElementById('edate').value);
		achangeDate = achangeDate.split("-");
		oldYear = achangeDate[0];
		var isten = "no";
		oldMonth = achangeDate[1];
		oldDay = achangeDate[2];
		if(oldMonth=="12" || oldMonth=="11" || oldMonth=="10"){
			oldMonth--;
		}
		else if(oldMonth == "01"){
			oldYear--;
			isten = "yes";
			oldMonth = "11";
		}
		else{
			oldMonth = ((oldMonth.charAt(0) == "0")?oldMonth = oldMonth.substr(1,1):oldMonth);
		}
		oldDay = ((oldDay.charAt(0) == "0")?oldDay = oldDay.substr(1,1):oldDay);
		var dateMade = new Date(oldYear, oldMonth, oldDay);
		newYear = dateMade.getFullYear();
		newMonth = dateMade.getMonth();
		newMonth = newMonth.toString();
		newDay = dateMade.getDate();
		newDay = newDay.toString();
		if(isten == "yes"){
			newMonth = "12";
		}
		else if(newMonth == "11"){
			newMonth = "11";
		}
		else if(newMonth =="10"){
			newMonth ="10";
		}
		else if(newMonth =="9"){
			newMonth ="08";
		}
		else{
			newMonth = ((newMonth.charAt(0) == "0")?newMonth = newMonth.substr(1,1):newMonth);
			newMonth--;
			newMonth = ((newMonth < 10)?"0"+newMonth:newMonth);
		}		
		newDay = ((newDay.charAt(0)!= "0" && newDay < 10)?newDay = "0"+newDay:newDay);
		newdate = newYear+"-"+newMonth+"-"+newDay;
	}
	if(dateType == "0"){
		document.getElementById('edate').value = newdate;
	}
	else{
		document.getElementById('sdate').value = newdate;
	}
}





// Ads
function showTop1(){
	switch (top1_ad){
		case ad_type_blank:
		showBlankAd();
		break;
		case ad_type_addotcom728x90:
		showAdDotCom728x90();
		break;
		default:
		showBlankAd();
		break;
	}
}

function showTop2(){
	switch (top2_ad){
		case ad_type_blank:
		showBlankAd();
		break;
		case ad_type_textlinks1:
		showTextLinksTop();
		break;
		default:
		showBlankAd();
		break;
	}
}

function showLeft(adType){
	document.write('<br><center>');
	var newCase = 0;
	if(adType == 1){
		newCase = left1_ad;
	}
	else if(adType == 2){
		newCase = left2_ad;
	}
	else if(adType == 3){
		newCase = left3_ad;
	}
	switch (newCase){
		case ad_type_blank:
		showBlankAd();
		break;
		case ad_type_pulse160x600:
		showPulse160x600();
		break;
		case ad_type_google160x600:
		google_160x600();
		break;
		case ad_type_cpx160x600:
		cpx160x600();
		break;
		case ad_type_mc_120x600:
		showMC120x600();
		break;
		case ad_type_google120x240:
		showGoogle120x240();
		break;
		case ad_type_google125x125:
		showGoogle125x125();
		break;
		case ad_type_mc_125x125:
		showMC125x125();
		break;
		case ad_type_erdrct120x90:
		showErdrct120x90();
		break;
		case ad_type_freelotto120x90:
		showFreeLotto120x90();
		break;
		case ad_type_textlinks4:
		showTextLinks4();
		break;
		default:
		showBlankAd();
		break;
	}
	document.write('</center>');
}

function showMid1(){
	document.write('<br><center>');
	switch (mid1_ad){
		case ad_type_blank:
		showBlankAd();
		break;
		case ad_type_addotcom468x60:
		showAdDotCom468x60();
		break;
		case ad_type_cpx468x60:
		showCPX468x60();
		break;
		case ad_type_mc_468x60:
		showMC468x60();
		break;
		case ad_type_cpx300x250:
		showCPX300x250(1);
		break;
		case ad_type_cpx300x2502:
		showCPX300x250(2);
		break;
		default:
		showBlankAd();
		break;
	}
	document.write('</center>');
}

function showRight(adType){
	document.write('<br><center>');
	var newCase = 0;
	if(adType == 1){
		newCase = right1_ad;
	}
	else if(adType == 2){
		newCase = right2_ad;
	}
	else if(adType == 3){
		newCase = right3_ad;
	}
	switch (newCase){
		case ad_type_blank:
		showBlankAd();
		break;
		case ad_type_pulse160x600:
		showPulse160x600();
		break;
		case ad_type_google160x600:
		google_160x600();
		break;
		case ad_type_cpx160x600:
		cpx160x600();
		break;
		case ad_type_mc_120x600:
		showMC120x600();
		break;
		case ad_type_google120x240:
		showGoogle120x240();
		break;
		case ad_type_google125x125:
		showGoogle125x125();
		break;
		case ad_type_mc_125x125:
		showMC125x125();
		break;
		case ad_type_erdrct120x90:
		showErdrct120x90();
		break;
		case ad_type_freelotto120x90:
		showFreeLotto120x90();
		break;
		case ad_type_textlinks4:
		showTextLinks4();
		break;
		default:
		showBlankAd();
		break;
	}
	document.write('</center>');
}

function showBottom1(){
	document.write('<br><center>');
	switch (bottom1_ad){
		case ad_type_blank:
		showBlankAd();
		break;
		case ad_type_cpx300x250:
		showCPX300x250(1);
		break;
		case ad_type_cpx300x2502:
		showCPX300x250(2);
		break;
		case ad_type_cpx468x60:
		showCPX468x60();
		break;
		case ad_type_addotcom468x60:
		showAdDotCom468x60();
		break;
		case ad_type_mc_468x60:
		showMC468x60();
		break;
		default:
		showBlankAd();
		break;
	}
	document.write('</center>');
}



// 720x90
//Ad.com
function showAdDotCom728x90(){
	document.write('<!-- -------------- Advertising.com ------ Tinbu, LLC - LotteryLive 728x90 - 784127 - (728x90) ------------ -->');
	document.write("<script type='text/javascript'>");
	document.write("var ACE_AR = {site: '784127', size: '728090'};");
	document.write("</script>");
	document.write("<script type='text/javascript' SRC='http://uac.advertising.com/wrapper/aceUAC.js'></script>");
	document.write("<!-- ---------- Copyright 2009, Advertising.com ---------- -->");
}

//468
//Ad.com
function showAdDotCom468x60(){
	document.write("<!-- -------------- Advertising.com ------ Tinbu, LLC - LotteryLive 468x60 - 784128 - (468x60) ------------ -->");
	document.write("<script type='text/javascript'>");
	document.write("var ACE_AR = {site: '784128', size: '468060'};");
	document.write("</script>");
	document.write("<script type='text/javascript' SRC='http://uac.advertising.com/wrapper/aceUAC.js'></script>");
	document.write("<!-- ---------- Copyright 2009, Advertising.com ---------- -->");
}
//CPX
function showCPX468x60(){
	document.write("<center><IFRAME FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=468 HEIGHT=60 SRC=\"http://adserving.cpxinteractive.com/st?ad_type=iframe&ad_size=468x60&section=660320\"></IFRAME></center>");
}
//MC
function showMC468x60(){
	document.write('<a href="http://mikecaruana.com/lottostrategies/"><img src="http://www.tinbuserver.com/ads/mc/mc_468x60.gif"></a>');
}

//300x250
//CPX
function showCPX300x250(which){
	if(which ==1){
		document.write('<IFRAME FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=300 HEIGHT=250 SRC="http://adserving.cpxinteractive.com/st?ad_type=iframe&ad_size=300x250&section=660320"></IFRAME>');
	}
	else{
		document.write('<SCRIPT TYPE="text/javascript"SRC="http://adserving.cpxadroit.com/tags/2-1002608.js"></SCRIPT>');
	}
}

//160x600
//Pulse
function showPulse160x600(){
	document.write('<iframe src="http://content.pulse360.com/D12A19D0-98B0-11DE-B794-106AEDADD848" width="160" height="600" frameborder="0" scrolling="no" allowtransparency="true"></iframe>');
}
//Google
function google_160x600(){
google_ad_client = "pub-2939340252455583";
/* 160x600, created 7/20/09 */
google_ad_slot = "8860798130";
google_ad_width = 160;
google_ad_height = 600;
document.write('<script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
}
//CPX
function cpx160x600(){
	document.write('<SCRIPT TYPE="text/javascript"SRC="http://adserving.cpxadroit.com/tags/5-1002608.js"></SCRIPT>');
}
//MC
function showMC120x600(){
	document.write('<a href="http://mikecaruana.com/lottostrategies/"><img src="http://www.tinbuserver.com/ads/mc/mc_120x600.gif"></a>');
}

//120x240
//Google
function showGoogle120x240(){
google_ad_client = "pub-2939340252455583";
/* 120x240, created 2/8/10 */
google_ad_slot = "7228082141";
google_ad_width = 120;
google_ad_height = 240;
document.write('<script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
}

//125x125
//Google
function showGoogle125x125(){
	google_ad_client = "pub-2939340252455583";
	/* 125x125, created 7/22/09 */
	google_ad_slot = "2212949249";
	google_ad_width = 125;
	google_ad_height = 125;
	//-->
	document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
}
//MC
function showMC125x125(){
	document.write('<a href="http://mikecaruana.com/lottostrategies/"><img src="http://www.tinbuserver.com/ads/mc/mc_125x125.gif"></a>');
}

//Buttons
//120x90
function showErdrct120x90(){
	document.write('<a href="http://www.erdrct.com/?azq=100&bid=762&aid=CD1904&dp=59607&cid=167&land=0&opt" target="_top"><img src="http://www.tinbu.com/wwl_creative/cap120x90.gif" width= "120" height= "90" border= "0" alt="" onMouseOver="window.status=\'\'; return true;" onMouseOut="window.status=\'\'; return true;"></a>');
}
//FreeLotto
function showFreeLotto120x90(){
	document.write('<a href="http://worldwidelotto.com/free_lottery/"><img src="http://www.tinbuserver.com/ads/ls/freelotto120.gif"></a>');
}

//Text Links
function showTextLinksTop(){
	document.write('<span style="padding-left:20px; width:33%;color:#000000; display:inline;">');
	document.write('<strong><a style="color:#000000;" href="http://worldwidelotto.com/free_lottery/" target="_blank" title="World Wide Lotto - Play Free Lottery">Free $100,000 Lottery</a></strong> - Play now online and win every day');
	document.write('</span>');
}
function showTextLinks4(){	
	document.write('<br>');
	document.write('<div><strong><a style="color:#000000;" href="http://worldwidelotto.com/free_lottery/" title="World Wide Lotto - Play Free Lottery" target="_blank">Free $100,000 Lottery</a></strong><br />Play now online and win every day</div>');
	document.write('<br>');
}

//Blank Ad
function showBlankAd(){
}