function pressGo()
{
	if (document.getElementById('pressArchive').value != "")
	{
		pdfWin = window.open(document.getElementById('pressArchive').value);
	}
}

var sourceArray = new Array("01","02","03","04","05","06","07","08","09","10","11");
var imageArray=buildArray();

function buildArray() {
   
   var outputArray=new Array();

   for(i=0;i<5;i++) {
      outputArray[outputArray.length]=sourceArray[Math.round((sourceArray.length-1)*Math.random())];
      var temp=outputArray[outputArray.length-1];

      for(j=0;j<sourceArray.length;j++) {

         if(sourceArray[j]==temp) {
            sourceArray[j]=null;
            var sourceArray2=new Array();
            
            for(k=0;k<sourceArray.length;k++) {
               
               if(sourceArray[k]!=null) {
                  sourceArray2[sourceArray2.length]=sourceArray[k];
               }
            }

         sourceArray=sourceArray2;
         break;
         }
      }
   }
   return outputArray;
}


function showPopUp(which) {
   
   var thePage;
   switch (which) {
      case 'wr_unit01' :
         thePage='floorplans_wre013.html?page=unit01';
         theTitle='Washington Rich Floorplans';
         theWidth='605';
         theHeight='448';
         break
      case 'wr_unit02' :
         thePage='floorplans_wrfeb4.html?page=unit02';
         theTitle='Washington Rich Floorplans';
         theWidth='605';
         theHeight='448';
         break
      case 'wr_unit03' :
         thePage='floorplans_wrb8b7.html?page=unit03';
         theTitle='Washington Rich Floorplans';
         theWidth='605';
         theHeight='448';
         break
      case 'wr_unit04' :
         thePage='floorplans_wr2312.html?page=unit04';
         theTitle='Washington Rich Floorplans';
         theWidth='605';
         theHeight='448';
         break
      case 'heights_gallery' :
         thePage='gallery_heights.html';
         theTitle='The Heights Image Gallery';
         theWidth='700';
         theHeight='393';
         break
      case 'jeffrey_gallery' :
         thePage='gallery_jeffrey.html';
         theTitle='The Jeffrey Image Gallery';
         theWidth='700';
         theHeight='393';
         break
      case 'heights_floorplans2a' :
         thePage='floorplans_heights2bfe4.html?page=a';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_floorplans2b1' :
         thePage='floorplans_heights2659b.html?page=b1';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_floorplans2b2' :
         thePage='floorplans_heights26e8c.html?page=b2';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_floorplans2c' :
         thePage='floorplans_heights250fa.html?page=c';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_floorplans2d' :
         thePage='floorplans_heights27620.html?page=d';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_floorplans3a' :
         thePage='floorplans_heights3bfe4.html?page=a';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_floorplans3b1' :
         thePage='floorplans_heights3659b.html?page=b1';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_floorplans3b2' :
         thePage='floorplans_heights36e8c.html?page=b2';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_floorplans3c' :
         thePage='floorplans_heights350fa.html?page=c';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_floorplans3d' :
         thePage='floorplans_heights37620.html?page=d';
         theTitle='The Heights Floorplans';
         theWidth='605';
         theHeight='465';
		 break
      case 'sixty_apartment' :
         thePage='pop_apartments.html';
         theTitle='Which Neighborhood';
         theWidth='265';
         theHeight='475';
		 break
      case 'sixty_condo' :
         thePage='pop_condominiums.html';
         theTitle='Which Neighborhood';
         theWidth='265';
         theHeight='440';
		 break
      case 'heights_garage' :
         thePage='floorplans_heights_garage.html';
         theTitle='The Heights Garage Plan';
         theWidth='605';
         theHeight='465';
         break
      case 'heights_model' :
         thePage='heights_pop_model.html';
         theTitle='The Heights Model';
         theWidth='519';
         theHeight='396';
         break
      case 'mxd_detail1' :
         thePage='market_printable4bdb.html?BuildingID=1';
         theTitle='Building 1';
         theWidth='454';
         theHeight='756';
       break
      case 'mxd_detail2' :
         thePage='market_printablee0e6.html?BuildingID=2';
         theTitle='Building 2';
         theWidth='454';
         theHeight='756';
       break
      case 'mxd_detail3' :
         thePage='market_printable4ab2.html?BuildingID=3';
         theTitle='Building 3';
         theWidth='454';
         theHeight='756';
       break
      case 'mxd_detail4' :
         thePage='market_printable6cbd.html?BuildingID=4';
         theTitle='Building 4';
         theWidth='454';
         theHeight='756';
       break
      case 'mxd_detail5' :
         thePage='market_printable239c.html?BuildingID=5';
         theTitle='Building 5';
         theWidth='454';
         theHeight='756';
       break
      case 'mxd_detail8' :
         thePage='market_printablee25f.html?BuildingID=8';
         theTitle='Building 8';
         theWidth='454';
         theHeight='756';
       break

   }   
   var theOptions = 'resizeable=0,scrollbars=0,width='+theWidth+',height='+theHeight;
   winpops=window.open(thePage,"popup",theOptions)
}

function prevImage(theImage) {

   theSrc = theImage.src;
   if (theSrc.indexOf("heights1") > 0) {
      theImage.src = "images/heights/content_heights3.jpg";
   } else if (theSrc.indexOf("heights2") > 0) {
      theImage.src = "images/heights/content_heights1.jpg";
   } else {
      theImage.src = "images/heights/content_heights2.jpg";
   }
}

function nextImage(theImage) {

   theSrc = theImage.src;
   if (theSrc.indexOf("heights1") > 0) {
      theImage.src = "images/heights/content_heights2.jpg";
   } else if (theSrc.indexOf("heights2") > 0) {
      theImage.src = "images/heights/content_heights3.jpg";
   } else {
      theImage.src = "images/heights/content_heights1.jpg";
   }
}

function imgSwap(theImage) {
	var theImg = document.getElementById(theImage);
	theImg.src = (theImg.src.indexOf("-off.html") > -1) ? "images/"+theImage+"-on.gif" : "images/"+theImage+"-off.gif";
}