//********************************************************************************************
// Method:	ShowXHMTL
// Author:	Erik Mau
// Date:	10/16/2001
//********************************************************************************************
function ShowXHMTL()
{
	if (document.location.href.indexOf('?') != -1)
	{
		window.open(document.location.href + '&validate=1');
	}
	else
	{
		window.open(document.location.href + '?validate=1');
	}
}


//*********************************************************************************************
//HOME PAGE IMAGE ROLLOVER
//*********************************************************************************************
function changeimages(name, src)
{
	if (document.images && (preloadFlag == true))
	{
	var img;
	img = eval('document.' + name);
	
	img.src = src;
	}
}

var preloadFlag = false;


if (document.images)
{
	var property = new Image();
	property.src = 'images/building_shots/missabe_front.jpg';'images/building_shots/holidaycenter.jpg';'images/building_shots/plaza.jpg';
	var notes = new Image();
	notes.src = 'images/js_images/building_note_missabe.gif';'images/building_note_holiday.gif';'images/building_note_plaza';
	preloadFlag = true;
	
}

//*********************************************************************************************
//OPENS SLIDE SHOW WINDOW
//*********************************************************************************************

function openWindow(sURL)
{
	
	win1 = open(sURL, 'NewWindow', "width=650,height=540,scrollbars=yes,toolbar=no,reszieable=no,left=05,top=05");
}

//*********************************************************************************************
//PROPERTIES IMAGE SLIDE SHOW
//*********************************************************************************************
//MISSABE BUILDING

//Populate this array with
//the pictures you want in this slide show.

var thisPic = 0;  //the counter for the image array
var lastPic = 1;  //the last cell in our array = (number of pictures - 1)

cnnPix = new Array(lastPic)

for(var i=0;i<=lastPic;i++){
cnnPix[i] = new Image()}

cnnPix[0].src='http://www.firstpropertiesduluth.com/images/slideshow/miss2.jpg';
cnnPix[1].src='http://www.firstpropertiesduluth.com/images/slideshow/miss3.jpg';
//cnnPix[2].src='http://www.firstpropertiesduluth.com/images/elements/image4.gif';
//cnnPix[3].src='http://www.firstpropertiesduluth.com/images/building_shots/missabe_front_155.jpg';

/* above is the array that holds our images, it is indexed from 0 to 
   (number of elements - 1) */
  
   

function processPrevious() {
        if (document.images) {
                if (thisPic==0) //if at the very beginning of array
                {
                    thisPic=lastPic; //goto the last cell in the array
                 }
                 else 
                 {
                    thisPic--; //else simply decrement the counter                    
                 }
                  document.missabePicture.src=cnnPix[thisPic].src;
                 
        }
}

function processNext() {
        if (document.images) {
                if (thisPic==lastPic) //if at the very end of the array
                {
                    thisPic=0; //goto the first cell of the array
                 }
                 else 
                 {
                thisPic++; //else simply increment the counter
                }
                document.missabePicture.src=cnnPix[thisPic].src;
                                
        }
}

//*********************************************************************************************
//HOLIDAY CENTER

var thisPic1 = 0;
var lastPic1 = 2;

fpPix = new Array(lastPic1)

for(var i=0;i<=lastPic1;i++){
fpPix[i] = new Image()}

fpPix[0].src='http://www.firstpropertiesduluth.com/images/slideshow/holiday1.jpg';
fpPix[1].src='http://www.firstpropertiesduluth.com/images/slideshow/hc_02.jpg';
fpPix[2].src='http://www.firstpropertiesduluth.com/images/slideshow/hc_03.jpg';  

function processPrevious1() {
        if (document.images) {
                if (thisPic1==0)
                {
                    thisPic1=lastPic1;
                 }
                 else 
                 {
                    thisPic1--;                    
                 }
                  document.holidayPicture.src=fpPix[thisPic1].src;
                 
        }
}

function processNext1() {
        if (document.images) {
                if (thisPic1==lastPic1)
                {
                    thisPic1=0;
                 }
                 else 
                 {
                thisPic1++;
                }
                document.holidayPicture.src=fpPix[thisPic1].src;
                                
        }
}


//*********************************************************************************************
//PLAZA SHOPPING CENTER

var thisPic2 = 0;
var lastPic2 = 3;

plazaPix = new Array(lastPic2)

for(var i=0;i<=lastPic2;i++){
plazaPix[i] = new Image()}

plazaPix[0].src='http://www.firstpropertiesduluth.com/images/slideshow/Plaza08_1.jpg';
plazaPix[1].src='http://www.firstpropertiesduluth.com/images/slideshow/Plaza08_2.jpg';
plazaPix[2].src='http://www.firstpropertiesduluth.com/images/slideshow/Plaza08_3.jpg';
plazaPix[3].src='http://www.firstpropertiesduluth.com/images/slideshow/Plaza08_4.jpg';

function processPrevious2() {
        if (document.images) {
                if (thisPic2==0)
                {
                    thisPic2=lastPic2;
                 }
                 else 
                 {
                    thisPic2--;                    
                 }
                  document.plazaPicture.src=plazaPix[thisPic2].src;
                 
        }
}

function processNext2() {
        if (document.images) {
                if (thisPic2==lastPic2)
                {
                    thisPic2=0;
                 }
                 else 
                 {
                thisPic2++;
                }
                document.plazaPicture.src=plazaPix[thisPic2].src;
                                
        }
}