// FEATURED LISTINGS
var fl_src=[
[
"155 E. WILSON STREET #501",
"4 BEDROOM, 3.5 BATH",
"4,281 SQ.FT.",
"UNION TRANSFER CONDOMINIUMS",
"2 BLOCKS S.E. OF THE CAPITOL",
"$1,600,000",
"Spectacular 2-story condominium directly overlooking Lake Monona.  Light-filled rooms, ample storage and 3 parking spaces make this beautiful home an urban oasis.  Upscale finishes and special touches like a chef's kitchen, 20' floor-to-ceiling library and spacious master bath will satisfy the most discriminating buyers.  Is it time to leave your sprawling suburban estate?  This condo, the 7th largest downtown, will help make your transition enjoyable.",
"p1",
0
],

/*
[
"155 E. WILSON STREET #101",
"2 BEDROOM + STUDY, 3 BATH",
"2,506 SQ.FT.",
"UNION TRANSFER CONDOMINIUMS",
"2 BLOCKS S.E. OF THE CAPITOL",
"$880,000",
"Stark modern style, discriminating interior architecture and 14' floor-to-ceiling windows make this home a gem for aspiring urbanists and those who appreciate good design.  Spacious, open floor plan is perfect for entertaining.  Offered fully furnished at the asking price for someone looking for a turn-key move to downtown.",
"p2",
0
],
*/

/*
[
"137 E. WILSON STREET #210",
"2 BEDROOM + STUDY, 2.5 BATH",
"2,126 SQ.FT.",
"MARINA CONDOMINIUMS",
"2 BLOCKS S.E. OF THE CAPITOL",
"$662,975",
"Bold, modern architecture and professionally designed interiors make Marina one of Madison's best new developments.  This lakefront condo offers a spacious and open floor plan with Santos Mahogany floors, cherry cabinetry, granite kitchen counters and direct views of Lake Monona.  Perfectly located near the best restaurants, entertainment and downtown events.  Developer incentives available!",
"p8",
0
],
*/

[
"137 E. WILSON STREET #813",
"2 BEDROOM, 2.5 BATH",
"1,753 SQ.FT.",
"MARINA CONDOMINIUMS",
"2 BLOCKS S.E. OF THE CAPITOL",
"$619,900",
"Bold, modern architecture makes Marina one of Madison's best new downtown developments.  This model offers views of both lakes and the isthmus, as well as a custom-designed interior by Brownhouse Designs.  Finishes includes 5\” plank oak floors, cherry cabinetry, stainless appliances with gas cooktop, Kohler Waterhaven shower tower and many other special touches.  Developer incentives available!",
"p9",
0
],

[
"137 E. WILSON STREET #1213",
"2 BEDROOM, 2.5 BATH",
"1,753 SQ.FT.",
"MARINA CONDOMINIUMS",
"2 BLOCKS S.E. OF THE CAPITOL",
"$616,500",
"Bold, modern architecture and professionally designed interiors make Marina one of Madison's best new developments.  This 12th floor condo offers a spacious and open floor plan with cherry cabinetry, wood floors, granite kitchen counters and gorgeous views of Lake Mendota and Lake Monona.  Perfectly located near the best restaurants, entertainment and downtown events. Developer incentives available!",
"p16",
0
],

[
"137 E. WILSON STREET #712",
"2 BEDROOM PLUS STUDY, 2.5 BATH",
"1,803 SQ.FT.",
"MARINA CONDOMINIUMS",
"2 BLOCKS S.E. OF THE CAPITOL",
"$605,900",
"Bold, modern architecture, professionally designed interiors and amazing lake and city views from every room make this floor plan unique.  Beautiful custom finishes include white birch floors, granite counters, and stainless appliances with Sub Zero refrigerator.  Last unit left of this floor plan.  Walk to the best restaurants and downtown events.  Developer incentives available.",
"p10",
0
],

/*
[
"360 W. WASHINGTON #1410",
"2 BEDROOM + STUDY, 1.75 BATH",
"1,859 SQ.FT.",
"METROPOLITAN PLACE CONDOS",
"3 BLOCKS W. OF THE CAPITOL",
"$579,900",
"Stunning 2-story penthouse condominium overlooking Lake Mendota and the University.  Custom kitchen cabinetry, maple floors, built-in wall office system, 2 amazing outdoor terraces, and many other special touches abound in this beautiful home.  Comes with storage and 1 parking space (additional parking may be available).  Most furnishings are also available for purchase.",
"p4",
0
],
*/


[
"333 W. MIFFLIN ST. #1001",
"3 BEDROOM, 1.75 BATH",
"1,675 SQ.FT.",
"METROPOLITAN PLACE II",
"3 BLOCKS W. OF THE CAPITOL",
"$569,500",
"Beautiful new 3 bedroom condominium on the 10th floor of Metropolitan Place Phase II.  This unit offers lake &amp; University views, maple cabinetry, granite counters, wood floors, stainless appliances, fireplace, 2 balconies, 2 parking spaces &amp; storage. 3rd bedroom doubles as study/den off the master suite. Enjoy gorgeous sunsets from your home &amp; walk to the University of Wisconsin, the Kohl Center, Overture, grocery shopping &amp; all downtown events! Fitness center, on-site mgt, rooftop gardens too!",
"p15",
0
],

[
"360 W. WASHINGTON #1307",
"2 BEDROOM, 2.5 BATH",
"1,662 SQ.FT.",
"METROPOLITAN PLACE CONDOS",
"3 BLOCKS W. OF THE CAPITOL",
"$525,000",
"Live stylishly in this beautiful two bedroom penthouse condo loaded with upgrades.  Spacious, flowing floor plan is perfect for entertaining.  Custom kitchen offers maple cabinetry, stainless appliances, granite counters and wine storage.  Living space has hardwood floors, gas fireplace, wall-mounted plasma TV, designer shelving and spectacular views of Lake Mendota.  Large master bath has double vanity, whirlpool tub and steam shower.  Two private terraces, two parking spaces and storage too!",
"p17",
0
],


[
"137 E. WILSON STREET #313",
"2 BEDROOM, 1.75 BATH",
"1,577 SQ.FT.",
"MARINA CONDOMINIUMS",
"2 BLOCKS S.E. OF THE CAPITOL",
"$425,900",
"Bold modern architecture and large outdoor terraces make Marina Condominiums one of Madison's best new downtown projects.  The Capitol Northwest floor plan offers a unique layout with upscale interiors including hardwood floors, cherry cabinetry, granite countertops, GE Profile stainless appliances and Kohler fixtures.  Make this condo your home in downtown Madison.  Developer incentives available.",
"p11",
0
],

[
"360 W. WASHINGTON #1115",
"2 BEDROOM, 1.75 BATH",
"1,460 SQ.FT.",
"METROPOLITAN PLACE CONDOS",
"3 BLOCKS W. OF THE CAPITOL",
"$425,900",
"Beautiful and spacious 11th floor home offers attractive finishes and custom interior design.  Originally a model unit for the development, this two bedroom offers a custom maple kitchen, hardwood floors, and a large built-in entertainment center and wall unit in the living area.  Offered with one parking space and a storage unit (additional parking may be available).",
"p14",
0
],

[
"137 E. WILSON STREET #312",
"2 BEDROOM, 1.75 BATH",
"1,403 SQ.FT.",
"MARINA CONDOMINIUMS",
"2 BLOCKS S.E. OF THE CAPITOL",
"$406,900",
"Bold modern architecture and professional interior design make this unit one of the most popular floor plans in Marina.  Custom finishes include 5\" oak plank floors, cherry cabinetry, granite countertops, GE Profile stainless steel appliances and Kohler fixtures.  Walk to all the best restaurants and events.  Last unit of this floor plan.  Developer incentives available.",
"p12",
0
],

[
"360 W. WASHINGTON #715",
"2 BEDROOM, 1.75 BATH",
"1,460 SQ.FT.",
"METROPOLITAN PLACE CONDOS",
"3 BLOCKS W. OF THE CAPITOL",
"$399,900",
"High-end finishes and smart interior design make this striking, pristine condominium a wonderful downtown home.  Quiet corner unit offers maple cabinetry and hardwood floors, custom window treatments, cedar-lined closets, a large storage unit and 2 parking spaces.  Unique dual-entry study extends the living space and maximizes the beautiful views that this home offers.  Motivated seller.",
"p6",
0
],

[
"137 E. WILSON STREET #314",
"2 BEDROOM, 1.75 BATH",
"1,314 SQ.FT.",
"MARINA CONDOMINIUMS",
"2 BLOCKS S.E. OF THE CAPITOL",
"$382,900",
"Bold modern architecture and professional interior design make Marina one of Madison's best new projects.  This floor plan offers hardwood floors, cherry cabinetry, GE Profile stainless appliances, granite counters and a large master suite with lake views.  Enjoy the vibrance of downtown living!  Last unit of this floor plan.  Developer incentives available.",
"p13",
0
]

/*
[
"123 W. WASHINGTON #602",
"1 BEDROOM + STUDY, 1.5 BATH",
"960 SQ.FT.",
"THE LORAINE CONDOMINIUMS",
"1 BLOCK W. OF THE CAPITOL",
"$255,000",
"The best value downtown!  Stunning 1 bedroom + study home in the Loraine Condominiums is priced to sell now.  Home offers beautiful maple cabinetry, stainless appliance package with range and microwave/advantium oven, large master bath with double vanity, on-floor storage unit and 1 underground parking space.  Enjoy morning coffee or an after-work drink at Barriques on the first floor.",
"p7",
0
]
*/

];






// FEATURED DEVELOPMENTS
// 0 -> name
// 1 -> address
// 2 -> established
// 3 -> number of units
// 4 -> number of stories
// 5 -> size 
// 6 -> distance from capitol
// 7 -> price
// 8 -> pic
// 9 -> select flag

var fp_src=[

[
"THE BASKERVILLE",
"121 S. HAMILTON ST.",
"2006",
"21",
"4 STORIES",
"313-696 SQ.FT., 4,366 SQ.FT. PENTHOUSE",
"1 BLOCK S.W.",
"STARTING AT $119,900",
"Baskerville",
0],

[
"BEDFORD COURT",
"530 W. DOTY ST., 533 W. MAIN ST.",
"2001",
"54",
"3 STORIES",
"852-2,346 SQ.FT.",
"6 BLOCKS S.W.",
"CALL FOR AVAILABILTY",
"Bedford-Court",
0],

[
"BLAIR HOUSE",
"201 N. BLAIR ST.",
"2002",
"24",
"3 STORIES",
"832-1,733 SQ.FT.",
"5 BLOCKS N.E.",
"CALL FOR AVAILABILTY",
"Blair-House",
0],

[
"CAPITOL POINT",
"125 N. HAMILTON ST.",
"2002",
"64",
"14 STORIES",
"1,000-5,957 SQ.FT.",
"1 BLOCK N.E.",
"CALL FOR AVAILABILTY",
"Capitol-Point",
0],

[
"CAPITOL-WEST",
"300 BLOCK BETWEEN W. WASHINGTON & W. MAIN.",
"2008",
"400",
"TBD",
"572-2,223 SQ.FT.",
"3 BLOCKS W.",
"CALL FOR AVAILABILTY",
"Capitol-West",
0],

[
"COACHYARD SQUARE",
"617-641 E. DAYTON, 618-630 E. MIFFLIN",
"2000",
"23",
"3 STORIES",
"713-1,120 SQ.FT.",
"6 BLOCKS N.E.",
"CALL FOR AVAILABILITY",
"Coachyard-Square",
0],

[
"THE COLONY",
"626 E. MIFFLIN ST.",
"2008",
"66",
"5 STORIES",
"600-1,454 SQ.FT.",
"6 BLOCKS E.",
"FROM $120,000-$393,000",
"The-Colony",
0],

[
"DAS KRONENBERG",
"123 N. BLOUNT ST.",
"2004",
"43",
"6 STORIES",
"429-1,589 SQ.FT.",
"8 BLOCKS N.E.",
"CALL FOR AVAILABILTY",
"Das-Kronenberg1",
0],

[
"DAYTON ROW TOWNHOMES",
"101-153 DAYTON ROW",
"1994",
"17",
"TOWNHOMES",
"1326-1680 SQ.FT.",
"7 BLOCKS N.E.",
"CALL FOR AVAILABILITY",
"Dayton-Row",
0],

[
"DOTY SCHOOL",
"351 W. WILSON ST.",
"1983",
"17",
"3 STORIES",
"677-1,385 SQ.FT.",
"4 BLOCKS S.W.",
"CALL FOR AVAILABILITY",
"Doty-School-new",
0],

[
"THE FAUERBACH", 
"404-428 S. BLOUNT ST.",
"1980",
"37",
"3 STORIES",
"826-2540 SQ.FT.",
"6 BLOCKS S.E.",
"CALL FOR AVAILABILITY",
"Fauerbach---front",
0],

[
"FRANKLIN STREET CONDOS",
"115 S. FRANKLIN ST.",
"1996",
"13",
"3 STORIES",
"692 -1,818 SQ.FT.",
"3 BLOCKS S.E.",
"CALL FOR AVAILABILTY",
"Franklin-St-Condos",
0],

[
"4TH WARD LOFTS",
"614 W. DOTY ST., 615 W. MAIN ST.",
"2004",
"67",
"4 STORIES",
"634-1,954 SQ.FT.",
"7 BLOCKS S.W.",
"CALL FOR AVAILABILTY",
"4th-Ward-Lofts",
0],

[
"GERMANIA",
"125-145 S. FRANKLIN ST.",
"1998",
"11",
"TOWNHOMES",
"1,270-1,555 SQ.FT.",
"3 BLOCKS S.W.",
"CALL FOR AVAILABILTY",
"Germania",
0],

[
"LIVINGSTON",
"802-808 WILLLIAMSON ST.",
"2006",
"36",
"4 STORIES",
"687-1,350 SQ.FT.",
"8 BLOCKS S.E.",
"CALL FOR AVAILABILTY",
"Livingston",
0],

[
"THE LORAINE",
"123 W. WASHINGTON AVE.",
"2004",
"84",
"10 STORIES",
"942-4,326 SQ.FT.",
"1 BLOCK W.",
"$255,000-$1,840,000",
"Loraine",
0],

[
"MARINA",
"137 E. WILSON ST.",
"2005",
"53",
"14 STORIES",
"1,314-3,556 SQ.FT.",
"2 BLOCKS S.E.",
"CALL FOR AVAILABILITY",
"Marina.Capitol",
0],

[
"METROPOLITAN PLACE",
"360 W. WASHINGTON, 333 W. MIFFLIN",
"2003",
"338",
"14 STORIES",
"502-2,655 SQ.FT.",
"3 BLOCKS W.",
"$229,900-$1MM+",
"Metropolitan-Place",
0],

[
"NICHOLS STATION",
"311 N. HANCOCK ST.",
"2006",
"45",
"3 STORIES",
"670-1,278 SQ.FT.",
"5 BLOCKS N.E.",
"$179,900-$339,900", 
"Nichols-Station",
0],

[
"NOLEN SHORE",
"350 S. HAMILTON ST., 329-343 W. WILSON ST.",
"2006",
"64",
"GARDEN STYLE &amp; TOWNHOMES",
"1,043-4,000+ SQ.FT.",
"4 BLOCKS S.W.",
"$374,000-$1.3MM+",
"Nolen-Shore---side",
0],

[
"100 WISCONSIN",
"100 WISCONSIN AVE.",
"2004",
"42",
"12 STORIES",
"1,103-5,926 SQ.FT.",
"ON THE SQUARE",
"CALL FOR AVAILABILTY",
"100-Wisconsin.horizontal",
0],

[
"3RD LAKE RIDGE",
"1037 WILLIAMSON ST.",
"2003",
"20",
"3 STORIES",
"792-1,769 SQ.FT.",
"10 BLOCKS S.E.",
"CALL FOR AVAILABILTY",
"3rd-Lake-Ridge",
0],

[
"350 WEST",
"350 W. WILSON ST.",
"1998",
"15",
"4 STORIES",
"660-1,306 SQ.FT.",  
"4 BLOCKS S.W.",
"CALL FOR AVAILABILTY",
"350-West",
0],

[
"UNION TRANSFER",
"155 E. WILSON ST.",
"1999",
"27",
"7 STORIES",
"1,880-5,465 SQ.FT.",
"2 BLOCKS S.E.",
"CALL FOR AVAILABILITY",
"Union-Transfer.lake",
0],

[
"VICTORIAN HILL CONDOMINIUMS",
"301-309 N. BLOUNT",
"1995",
"10",
"3 STORIES",
"1,066-1,453 SQ.FT.",
"10 BLOCKS N.E.",
"CALL FOR AVAILABILITY",
"Victorian-Hills",
0],

[
"WILSON STREET STATION CONDOMIINUMS",
"404 E. WILSON STREET.",
"2006",
"15",
"4 STORIES",
"669 SQ.FT.+",
"3 BLOCKS S.E.",
"FROM $184,900",
"Wilson-St.-Station",
0]

];









// WRITE INTO DOCUMENT ( HTML )
function dw(t){document.write(t);}

// LOOKUP ELEMENT ( ID )
function id2e(i){return document.getElementById(i);}

// ARRAY MAP ( FUNCTION, START, END ) 
Array.prototype.m=function(f,s,e){var r=[],i=(s==null)?0:s,e=(e==null)?this.length-1:e; for(;i<=e;i++){r[i]=f(this[i],i,e);}return r;};

// ARRAY REMOVE ( INDEX )
Array.prototype.r=function(i){var n=this.length;for(;i<n;i++){this[i]=this[i+1];}this.length--;};

// ARRAY APPLY ( FUNCTION, START, END ) 
Array.prototype.a=function(f,s,e){var i=(s==null)?0:s,e=(e==null)?this.length-1:e;for(;i<=e;i++){f(this[i],i,e);}};

// ARRAY APPLY WITH ADDED RETURN ( FUNCTION )
Array.prototype.ap=function(f){var s=0,n=this.length;if(s>=n)return null;var r=f(this[s],s,n-1);for(var i=s+1;i<n;i++){r+=f(this[i],i,n-1);}return r;};

// ARRAY PUSH ( VALUE )
Array.prototype.p=function(v){this[this.length]=v;};

// ARRAY FIND ( VALUE ) RETURNS INDEX
Array.prototype.f=function(v){var i=0,n=this.length;for(;i<n;i++){if(this[i][0]==v)return i;}return -1;};

// HTML FILE NAME
var me=document.URL.match(/\w+\.htm/);if(me==null)me='index.htm';else me=me[0];
var gme=me;

// HTML FILE NAME WITHOUT EXTENSION
var mep=me.slice(0,-4);

// HTML FILE NAME PRE UNDERSCORE
var meu=(mep.split('_'))[0];

// DOCUMENT WRITE ( STRING )
function dw(s){document.write(s);}

// WRITE MAIL LINK ( NAME, ADDRESS ) 
function mail(n,a){var t=n+'@'+a;return '<a href="mailto:'+t+'">'+t+'</a>';}

// MENU OR BUTTON ON ( IMAGE )
function mon(i){if(i!=meu)document.images[i].src='img/'+i+'_.gif';}

// MENU OR BUTTON OFF ( IMAGE )
function moff(i){var t=i;if(i==meu)t+='__';document.images[i].src='img/'+t+'.gif';}

// MENU MARK CURRENT PAGE AS ACTIVE
function mfix(i){moff(meu);}













// ARRAY
Array.prototype.P=function(v){this[this.length]=v;}; // PUSH ( ITEM )
Array.prototype.M=function(f,v){var a=[],j,i=0,n=this.length;if(n<0)return a;for(;i<n;i++){j=f(this[i],i,v);if(j){a.P(j);}}return a;}; // MAP ( FUNCTION )


// DOM SET CLASS NAME ( ELEMENT, CLASS )
function DomClass(e,c){if(e)e.className=c;}

// DOM SCROLL BAR OFFSET [ X, Y ]
function DomSO() { var x,y; if (window.pageYOffset || window.pageXOffset) { x=window.pageXOffset; y=window.pageYOffset; } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) { x=document.documentElement.scrollLeft; y=document.documentElement.scrollTop; } else if (document.body) { x=document.body.scrollLeft; y=document.body.scrollTop; } return [x,y]; }

// LOOKUP ELEMENT ( ID ) 
function DomL(i) { return document.getElementById(i); }

// PRINT INTO ELEMENT ( ID, STRING )
function DomP(i,s) { DomL(i).innerHTML=s; } 

// PRINT INTO ELEMENT VALUE ( ID, STRING )
function DomPV(i,s) { DomL(i).value=s; } 

// GET VALUE ( ID )
function DomV(i) { return DomL(i).value; }

// GET ABSOLUTE POSITION [x,y] OF ( ELEMENT )
function DomPxy(e) { var t=[0,0]; if(e.offsetParent) { while(e.offsetParent) { t[0]+=e.offsetLeft; t[1]+=e.offsetTop; e=e.offsetParent; } } else if(e.x||e.y) { t[0]=e.x; t[1]=e.y; } return t; }

// GET SIZE [x,y] OF ( ELEMENT )
function DomSxy(e) { return [e.offsetWidth,e.offsetHeight]; }

// GET WINDOW [ WIDTH, HEIGHT ]
function DomWxy() { var x,y; if(self.innerWidth) { x=self.innerWidth; y=self.innerHeight; } else { t=document.documentElement; if(t.clientWidth) { x=t.clientWidth; y=t.clientHeight; } else { t=document.body; x=t.clientWidth; y=t.clientHeight;} } return [x,y]; }

// NO BUBBLE ( EVENT )
function DomNB(e) { if(window.event) { var a=window.event; a.cancelBubble=true; a.returnValue=false; } if(e&&e.stopPropagation&&e.preventDefault) { e.stopPropagation(); e.preventDefault(); } }

// 0=HIDE|1=SHOW ELEMENT BY ID
function DomS(e,s) { DomL(e).style.display=(["none","block"])[s]; }

// DOM FIX INPUT FOCUS MODEL
function DomFH(e) { e.setAttribute("autocomplete","OFF"); } 
// HACK! - BUG FIX FOR FIREFOX
function DomFB() { this.blur(); }
function DomFF() { this.focus(); }
function DomF(e) { var i=0,n=e.nodeName.toLowerCase(); if(n=='input' || n=='textarea') { DomFH(e); e.onmouseover=DomFF; e.onmouseout=DomFB; } for(;i<e.childNodes.length;i++) { DomF(e.childNodes[i]); } }

// DO NOTHING 
function Nop(){}










 


// POPUP IMAGE LIBRARY


var imageI; // IMAGE USED FOR LOADING
var imageXS=1,imageYS=1; // IMAGE SIZE
var imageX=0,imageY=0; // MOUSE POSITION
var imageOB=[0,0,0,0]; // IMAGE OUT OF BOUNDS
var imageP=""; // IMAGE URL PATH
var imageD=0; // 0=HIDDEN, 1=VISABLE
var imagePP=""; // LOADED IMAGE PATH
var imageOF=[0,0]; // CUSTOM OFFSET

// IMAGE OUT (WAS) DELAYED EVENT
function ImageOD() { ImageUC(); DomS("Image",0); DomS("ImageLoading",0); imageD=0; } 

var imageU; // IMAGE IN TIMER

// IMAGE IN DELAYED EVENT
function ImageUD() { imageD=1; ImageI(); DomS("ImageLoading",1); imageI=new Image(); imageI.onload=ImageL; imageI.src=imageP; var i=DomL("ImageImg"); i.src=imageP; } 

// CLEAR TIMEOUT
function ImageUC() { if(imageU) clearTimeout(imageU); imageU=null; }

// SIZE/SHOW IMAGE
function ImageSS(x,y) { var e=DomL("Image").style; e.width=x+"px"; e.height=y+"px"; e.display="block"; imageD=1; } 

// IMAGE ALLREADY LOADED 
function ImageAL() { DomS("Image",1); imageD=1; }

// IMAGE ON LOAD
function ImageL() { imagePP=imageP; var x=imageI.width, y=imageI.height, i=DomL("ImageImg"); imageXS=x; imageYS=y; i.width=x; i.height=y; imageD=1; ImageI(); ImageSS(x,y); } 

// MOUSE MOVE
function ImageP(e) { var x=0,y=0;
if(!e) var e=window.event;
if(e.pageX || e.pageY) { x=e.pageX; y=e.pageY; }
else if (e.clientX || e.clientY) {
x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop; }
imageX=x; imageY=y; }

// IMAGE TOOLTIP SETUP
function ImageS() { var d=document; d.onmousemove=ImageP; setInterval("ImageI();",1000/10); } 

// TIMER INTERRUPT BOUNDS CHECK
function ImageBC() { if((imageX < imageOB[0]) || (imageX > imageOB[2]) ||
(imageY < imageOB[1]) || (imageY > imageOB[3])) { ImageOD(); } }

// TIMER INTERRUPT
function ImageI() { ImageBC(); if(imageD==0) return; var xy=DomWxy(); var sxy=DomSO(); xy[0]+=sxy[0]; xy[1]+=sxy[1]; var x=imageOF[0]+imageX-Math.floor(imageXS/2), y=imageOF[1]+imageY-Math.floor(imageYS/2); if(x<sxy[0]) x=sxy[0]; if((x+imageXS)>xy[0]) x=xy[0]-=imageXS; if(y<sxy[1]) y=sxy[1]; if((y+imageYS)>xy[1]) y=xy[1]-=imageYS; var e=DomL("Image").style; e.left=x+"px"; e.top=y+"px"; e=DomL("ImageLoading").style; e.left=(imageOF[0]+imageX-50)+"px"; e.top=(imageOF[1]+imageY-25)+"px"; }

// MOUSEOVER, UPDATE IMAGE ( OBJECT FOR BOUNDS, IMAGE URL )
function ImageU(o,i) { var pxy=DomPxy(o),sxy=DomSxy(o); imageOB=[pxy[0],pxy[1],pxy[0]+sxy[0],pxy[1]+sxy[1]];
if((imageP==i)&&imageU) return; 
if(imagePP==i) { ImageUC(); ImageAL(); return; }
imageP=i; ImageUC(); imageU=setTimeout("ImageUD();",1000/2); } 


// CHECK FOR PHONE OR EMAIL
function phone_or_email() {
 if((document.frm.email.value=='')||(document.frm.name.value=='')) {
  alert("Please fill in your contact information: name and email. Thanks!");
  return 1; }
 return 0; }



// FEATURED LISTINGS NUMBER OF SELECTED
function fl_ns() { var i=0,n=fl_src.length; for(i=0;i<n;i++) { if(fl_src[i][8]) return 1; } return 0; }

 
// FEATURED LISTING MOUSE CLICK
function fl_mc(t,i) { fl_src[i][8]=(fl_src[i][8]+1)&1; DomClass(t,((fl_src[i][8])?"FeaturedIn":"FeaturedOut")); }


// FEATURED LISTINGS DRAW ITEM
function fl_item(e,i) {
return '<div style="position:relative; width=972px;" class="FeaturedOut" onClick="fl_mc(this,'+i+');" title="Click to Toggle Listing Selection">'+
'<img src="img/b.gif" width=972 height=1><br>'+
'<table cellpadding=0 cellspacing=0><tr><td valign="top">'+
'<div class="Featured2a"><div>' +
'<em>'+e[0]+'</em><br>'+
e[1]+'<br>'+
e[2]+'<br>'+
e[3]+'<br>'+
e[4]+'<br>'+
'<strong>'+e[5]+'</strong><br>'+
'</div></div></td><td valign="top">'+
'<table cellpadding=0 cellspacing=0><tr><td valign="top" align="left">'+
'<div class="Featured2b"><div>' +

'<img src="img/a/'+e[7]+'a.jpg" height=45 onMouseOver="ImageU(this,\'img/b/'+e[7]+'a.jpg\');" title=" " alt=" ">'+

'<img src="img/p.gif" width=8 height=1>'+

'<img src="img/a/'+e[7]+'b.jpg" height=45 onMouseOver="ImageU(this,\'img/b/'+e[7]+'b.jpg\');" title=" " alt=" ">'+

'<img src="img/p.gif" width=8 height=1>'+

'<img src="img/a/'+e[7]+'c.jpg" height=45 onMouseOver="ImageU(this,\'img/b/'+e[7]+'c.jpg\');" title=" " alt=" ">'+

'<img src="img/p.gif" width=8 height=1>'+

'<img src="img/a/'+e[7]+'d.jpg" height=45 onMouseOver="ImageU(this,\'img/b/'+e[7]+'d.jpg\');" title=" " alt=" ">'+

'<img src="img/p.gif" width=8 height=1>'+

'<img src="img/a/'+e[7]+'e.jpg" height=45 onMouseOver="ImageU(this,\'img/b/'+e[7]+'e.jpg\');" title=" " alt=" ">'+

'<img src="img/p.gif" width=8 height=1>'+

'<img src="img/a/'+e[7]+'f.jpg" height=45 onMouseOver="ImageU(this,\'img/b/'+e[7]+'f.jpg\');" title=" " alt=" ">'+

'<img src="img/p.gif" width=8 height=1>'+

'<img src="img/a/'+e[7]+'g.jpg" height=45 onMouseOver="ImageU(this,\'img/b/'+e[7]+'g.jpg\');" title=" " alt=" ">'+

'<img src="img/p.gif" width=8 height=1>'+

'<img src="img/a/'+e[7]+'h.jpg" height=45 onMouseOver="ImageU(this,\'img/b/'+e[7]+'h.jpg\');" title=" " alt=" ">'+

'<img src="img/p.gif" width=8 height=1>'+

'<img src="img/a/'+e[7]+'i.jpg" height=45 onMouseOver="ImageU(this,\'img/b/'+e[7]+'i.jpg\');" title=" " alt=" ">'+

'</div></div></td></tr><tr valign="top"><td>'+
'<div class="Featured2c"><div>' +
e[6]+
'</div></div></td></tr></table>'+
'</td></tr></table></div>';}

// FEATURED LISTINGS DRAW
function fl_draw() { 
imageOF=[0,-200];
dw((fl_src.m(fl_item)).join("")); }

// SUBMIT FEATURED FORM MAP
function fl_form(e) { return (e[8])?e[0]+'\n':''; }

// SUBMIT FEATURED FORM
function SubmitFeatured() { 
 if(fl_ns()==0) { alert("Please select one or more listings first."); return; }
if(phone_or_email()==1) return;
var t=document.frm.comments.value;
document.frm.comments.value=''+
'Name: '+document.frm.name.value+'\n'+
'Phone: '+document.frm.phone.value+'\n'+
'Email: '+document.frm.email.value+'\n'+
'\n'+
'Request Info On:\n'+
(fl_src.m(fl_form)).join('')+
'\n'+
'Comments:\n'+t;
document.frm.submit(); }






// FEATURED DEVELOPMENTS
// 0 -> name
// 1 -> address
// 2 -> established
// 3 -> number of units
// 4 -> number of stories
// 5 -> size 
// 6 -> distance from capitol
// 7 -> price
// 8 -> pic
// 9 -> select flag

// FEATURED LISTINGS NUMBER OF SELECTED
function fp_ns() { var i=0,n=fp_src.length; for(i=0;i<n;i++) { if(fp_src[i][9]) return 1; } return 0; }

 
// FEATURED PROJECTS MOUSE CLICK
function fp_mc(t,i) { fp_src[i][9]=(fp_src[i][9]+1)&1; DomClass(t,((fp_src[i][9])?"FeaturedIn":"FeaturedOut")); }


// FEATURED PROJECTS DRAW ITEM
function fp_item(e,i) { return '<div style="position:relative; width=972px;" class="FeaturedOut" onClick="fp_mc(this,'+i+');" title="Click to Toggle Listing Selection">'+
'<img src="img/b.gif" width=972 height=1><br>'+
'<table cellpadding=0 cellspacing=0><tr><td align="right" valign="top" width=158>'+

'<img src="img/a/'+e[8]+'.jpg" style="cursor:crosshair;" height=45 onMouseOver="ImageU(this,\'img/b/'+e[8]+'.jpg\');" title=" " atl=" ">'+

'</td><td valign="top">'+

'<div class="FeaturedPb"><div>' +

'<em>'+e[0]+'</em> &mdash; '+
'<i>'+e[1]+'</i> &mdash; <strong>'+e[7]+'</strong><br>'+
'ESTABLISHED:'+e[2]+' &mdash; '+
e[3]+' UNITS &mdash; '+
e[4]+' &mdash; '+
e[5]+' &mdash; '+
e[6]+' OF CAPITOL<br>'+

'</div></div>'+

'</td></tr></table></div>';}


// FEATURED LISTINGS DRAW
function fp_draw() { 
imageOF=[500,0];
dw((fp_src.m(fp_item)).join("")); }

// SUBMIT FEATURED FORM MAP
function fp_form(e) { return (e[9])?e[0]+' - '+e[1]+'\n':''; }

// SUBMIT  FORM
function SubmitProjects() { 
 if(fp_ns()==0) { alert("Please select one or more listings first."); return; }
if(phone_or_email()==1) return;
var t=document.frm.comments.value;
document.frm.comments.value=''+
'Name: '+document.frm.name.value+'\n'+
'Phone: '+document.frm.phone.value+'\n'+
'Email: '+document.frm.email.value+'\n'+
'\n'+
'Request Info On:\n'+
(fp_src.m(fp_form)).join('')+
'\n'+
'Comments:\n'+t;
document.frm.submit(); }
