var getAdPhoenix;
var Ad1
var Ad2
var Ad3

harness = new Array
harness[1]="0173"
harness[2]="0132"
harness[3]="0127"
harness[4]="0158"
harness[5]="0182"

west = new Array
west[1]="0277"
west[2]="0219"
west[3]="0208"
west[4]="0203"
west[5]="0291"

hamilton = new Array
hamilton[1]="0332"
hamilton[2]="0373"
hamilton[3]="0331"
hamilton[4]="0323"
hamilton[5]="0321"

random_num = (Math.round((Math.random()*4)+1))

var hamilton_num = hamilton[random_num]
var harness_num = harness[random_num]
var west_num = west[random_num]

Ad1 = "<TABLE width='415' border='1' cellpadding='0' cellspacing='0' bordercolor='CC9966'>"
Ad1 += "<TR>" 
Ad1 += "<TD width='85'><IMG src='gfx/homesmart-real-estate.jpg' width='85' height='85'></TD>"
Ad1 += "<TD bgcolor='#CC9966'><TABLE width='100%' border='0' cellpadding='0' cellspacing='0'>"
Ad1 += "<TR>"
Ad1 += "<TD height='30'><TABLE width='310' border='0' align='center' cellpadding='0' cellspacing='0'>"
Ad1 += "<TR>" 
Ad1 += "<TD class='realitorhdr'><STRONG>Young Team at HomeSmart</STRONG></TD>"
Ad1 += "<TD><DIV align='right'><A href='mailto:ayhomesmart@yahoo.com?subject=Best Phoenix Real Estate' class='realitorhdr'><STRONG>email</STRONG></A>"
Ad1 += "<SPAN class='realitorhdr'> <STRONG>|</STRONG></SPAN> <A href='http://www.ayhomesmart.com' target='_blank' class='realitorhdr''rel= 'nofollow'><STRONG>visit" 
Ad1 += " website</STRONG></A></DIV></TD>"
Ad1 += "</TR>"
Ad1 += "</TABLE></TD>"
Ad1 += "</TR>"
Ad1 += "<TR>" 
Ad1 += "<TD height='55' bgcolor='#CCCCCC'><TABLE width='310' border='0' align='center' cellpadding='0' cellspacing='0'>"
Ad1 += "<TR>" 
Ad1 += "<TD valign='top' class='realitortxt'><STRONG>602.432.7288 or 480.794.0087<BR>"
Ad1 += "10601 N. Hayden Rd. # I-104<BR>"
Ad1 += "Scottsdale&#44; Arizona 85260</STRONG></TD>"
Ad1 += "</TR>"
Ad1 += "</TABLE></TD>"
Ad1 += "</TR>"
Ad1 += "<TR>" 
Ad1 += "<TD bgcolor='#CCCCCC'><IMG src='gfx/spacer.gif' width='330' height='1'></TD>"
Ad1 += "</TR>"
Ad1 += "</TABLE></TD>"
Ad1 += "</TR>"
Ad1 += "<TR>" 
Ad1 += "<TD><IMG src='gfx/homesmart-real-estate-logo.jpg' width='85' height='57'></TD>"
Ad1 += "<TD bgcolor='#CCCCCC'><TABLE width='310' border='0' align='center' cellpadding='0' cellspacing='0'>"
Ad1 += "<TR>" 
Ad1 += "<TD valign='top' class='realitortxt'>The Young Team serves Scottsdale&#44; Phoenix and surrounding areas." 
Ad1 += " Whether you're buying or selling a home&#44;" 
Ad1 += " contact us and we'll put our energy and diligence to work for you.</TD>"
Ad1 += "</TR>"
Ad1 += "</TABLE></TD>"
Ad1 += "</TR>"
Ad1 += "</TABLE>"

Ad2 = "<TABLE width='415' border='1' cellpadding='0' cellspacing='0' bordercolor='CC9966'>"
Ad2 += "<TR>" 
Ad2 += "<TD width='85'><IMG src='gfx/"+harness_num+".jpg' width='85' height='85'></TD>"
Ad2 += "<TD bgcolor='#CC9966'><TABLE width='100%' border='0' cellpadding='0' cellspacing='0'>"
Ad2 += "<TR>"
Ad2 += "<TD height='30'><TABLE width='310' border='0' align='center' cellpadding='0' cellspacing='0'>"
Ad2 += "<TR>" 
Ad2 += "<TD width='50%' class='realitorhdr'><STRONG>Pamela Harness</STRONG></TD>"
Ad2 += "<TD width='50%'><DIV align='right'><A href='mailto:pharness@cox.net' class='realitorhdr'><STRONG>email</STRONG></A>"
Ad2 += "<SPAN class='realitorhdr'> <STRONG>|</STRONG></SPAN> <A href='http://www.tourchandlerhomes.com' target='_blank' class='realitorhdr' 'rel= 'nofollow'><STRONG>visit" 
Ad2 += " website</STRONG></A></DIV></TD>"
Ad2 += "</TR>"
Ad2 += "</TABLE></TD>"
Ad2 += "</TR>"
Ad2 += "<TR>" 
Ad2 += "<TD height='55' bgcolor='#CCCCCC'><TABLE width='310' border='0' align='center' cellpadding='0' cellspacing='0'>"
Ad2 += "<TR>" 
Ad2 += "<TD valign='top' class='realitortxt'><STRONG>480.820.3333<BR>"
Ad2 += "2266 S. Dobson Road<BR>"
Ad2 += "Mesa&#44; Arizona 85202</STRONG></TD>"
Ad2 += "</TR>"
Ad2 += "</TABLE></TD>"
Ad2 += "</TR>"
Ad2 += "<TR>" 
Ad2 += "<TD bgcolor='#CCCCCC'><IMG src='gfx/spacer.gif' width='330' height='1'></TD>"
Ad2 += "</TR>"
Ad2 += "</TABLE></TD>"
Ad2 += "</TR>"
Ad2 += "<TR>" 
Ad2 += "<TD><IMG src='gfx/"+harness_num+"-logo.gif' width='85' height='57'></TD>"
Ad2 += "<TD bgcolor='#CCCCCC'> <TABLE width='310' border='0' align='center' cellpadding='0' cellspacing='0'>"
Ad2 += "<TR>" 
Ad2 += "<TD valign='top' class='realitortxt'>A home is often a family's most significant" 
Ad2 += " asset. Protect your real estate investment by entrusting a professional real estate" 
Ad2 += " agent. Contact me today! Your Phoenix area specialist!</TD>"
Ad2 += "</TR>"
Ad2 += "</TABLE></TD>"
Ad2 += "</TR>"
Ad2 += "</TABLE>"



//Array of Ads
AdsListPhoenix = new Array();
AdsListPhoenix[0]=Ad1;
AdsListPhoenix[1]=Ad3;
//AdsListPhoenix[2]=Ad1;

//Randomly Sort Ads
var AdsSortPhoenix = AdsListPhoenix.sort(randomSort);

//Change Value to String
AdsSortPhoenix = AdsSortPhoenix+"";

//Split Ads Into Individual Elements
getAdPhoenix = AdsSortPhoenix.split(",");

//Ransom Value
function randomSort() {
	return Math.floor(Math.random()*AdsListPhoenix.length)-1;
}