var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

//old code...can be deleted if everything seems to be working correctly
//theImages[0] = '/HIWMain/Flash/highwoods_RBC-2.swf'
//theImages[1] = '/HIWMain/Flash/bay_center.swf'
//theImages[2] = '/HIWMain/Flash/highwoods_berkshire.swf'
//theImages[3] = '/HIWMain/Flash/cool_springs.swf'

theImages[0] = '/HIWMain/Flash/highwoods_RBC-2.swf'
theImages[1] = '/HIWMain/Flash/TriadCentreMemphisLeed.swf'
theImages[2] = '/HIWMain/Flash/cool_springs.swf'


// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
var strImage = theImages[whichImage];
return strImage;
//document.write(theImages[whichImage]);

}

//////////////////////////////////////////////////////////////////////////
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;
var hasFlash3 = false;
var hasFlash4 = false;
var hasFlash5 = false;
var hasFlash6 = false;
var pluginVersion = 0;
if (isIE && isWin) {
	document.writeln('<SCRIPT language="VBScript">');
	document.writeln('on error resume next');
	document.writeln('hasFlash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))');
	document.writeln('hasFlash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))');
	document.writeln('hasFlash4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))');
	document.writeln('hasFlash3 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))');
	document.writeln('</SCR'+'IPT\>');
	if (hasFlash6) {
		pluginVersion = 6;
	} else if (hasFlash5) {
		pluginVersion = 5;
	} else if (hasFlash4) {
		pluginVersion = 4;
	} else if (hasFlash3) {
		pluginVersion = 3;
	}
} else if (navigator && navigator.plugins && navigator.plugins.length>0) {
	if(navigator.plugins["Shockwave Flash"]) {
		var flashDescriptor = navigator.plugins["Shockwave Flash"].description;
		pluginVersion = parseInt(flashDescriptor.charAt(flashDescriptor.indexOf('.') - 1));
		switch(pluginVersion) {
			case 6: hasFlash6 = true;
			case 5: hasFlash5 = true;
			case 4: hasFlash4 = true;
			case 3: hasFlash3 = true;
		}
	}	
} else {
	// This will catch msie 4.5 on mac as well as other non-ns/ie browsers.
	// Assume mac msie has flash since detection is broken on 4.5.
	pluginVersion = 6;	
}
function writeFlashCodeRandom(width,height,path, html,version_req) {
	var movie = showImage();
	if (pluginVersion >= version_req) {
		document.writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.writeln('		codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"');
		document.writeln(' 		WIDTH='+width);
		document.writeln(' 		HEIGHT='+height+'\>');
		document.writeln(' <PARAM NAME="movie" VALUE='+movie+'\>');
		document.writeln(' <PARAM NAME="quality" VALUE="high"\>');
		document.writeln(' <PARAM NAME="bgcolor" VALUE="#FFFFFF"\>');
		document.writeln(' <EMBED');
		document.writeln('	 SRC='+movie);
		document.writeln('	 WIDTH='+width);
		document.writeln('	 HEIGHT='+height);
		document.writeln('	 QUALITY="high"');
		document.writeln('	 BGCOLOR="#FFFFFF"');
		document.writeln('	 TYPE="application/x-shockwave-flash"');
		document.writeln('	 PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"\>');
		document.writeln(' \</EMBED\>');
		document.writeln('\</OBJECT\>');
	} else {
		document.writeln(html);
	}
}
function writeFlashCode(width,height,movie, html,version_req) {
	//var movie = showImage();
	if (pluginVersion >= version_req) {
		document.writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.writeln('		codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"');
		document.writeln(' 		WIDTH='+width);
		document.writeln(' 		HEIGHT='+height+'\>');
		document.writeln(' <PARAM NAME="movie" VALUE='+movie+'\>');
		document.writeln(' <PARAM NAME="quality" VALUE="high"\>');
		document.writeln(' <PARAM NAME="bgcolor" VALUE="#FFFFFF"\>');
		document.writeln(' <EMBED');
		document.writeln('	 SRC='+movie);
		document.writeln('	 WIDTH='+width);
		document.writeln('	 HEIGHT='+height);
		document.writeln('	 QUALITY="high"');
		document.writeln('	 BGCOLOR="#FFFFFF"');
		document.writeln('	 TYPE="application/x-shockwave-flash"');
		document.writeln('	 PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"\>');
		document.writeln(' \</EMBED\>');
		document.writeln('\</OBJECT\>');
	} else {
		document.writeln(html);
	}
}