/*	(c) Copyright 2004-2005 Studio Prima Inc.
	1108 19th Ave. East
	Seattle, WA 98112
	206 325-9037
	info@studioprima.com
	http://studioprima.com/
*/
function imagePopUp(page) 
	{OpenWin = this.open(page, "SmallWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height=634,width=926");}

function BigImagePopUp(page) 
	{OpenWin = this.open(page, "BigWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height=534,width=526");}

	
function highlight() {
	for(i=0;i<document.links.length;i++) {
	elem = document.links[i];
		if(elem.style) {
			if( (elem.href == location.href) | (elem.name == '<?=$sec?>')  ) {
			elem.style.fontWeight = "bold";
			}
		}
	}
}
	
function showPhoto() {
offset 	= 485;
imagey	= 75;
layname = "zoom";

// pesky layout issues force exception of mac browsers
browser = navigator.userAgent.toLowerCase();
if( browser.indexOf('mac') !== -1 ) return false;

if(document.layers) 	width = window.innerWidth;
if(document.all)        width = document.body.clientWidth;
if(!document.all && document.getElementById) width = window.innerWidth;

        if(document.getElementById) {
			document.getElementById(layname).style.left = ( (width - 760 )/2 ) + offset;
			document.getElementById(layname).style.top 	= imagey;
			document.getElementById(layname).style.visibility = "visible";		
        } else if(document.layers) {
			document.layers[layname].left 		= ( (width - 760 )/2 ) + offset;
			document.layers[layname].top 		= imagey;
			document.layers[layname].visibility = 'visible';
		} else if(document.all) {
			 document.all[layname].style.left 	= ( (width - 760 )/2 ) + offset;
			 document.all[layname].style.top 	= imagey;
			 document.all[layname].visibility 	= 'visible';	
		} 

}

function hidePhoto() {
offset 	= -300;
imagey	= -300;
layname = "zoom";

// pesky layout issues force exception of mac browsers
browser = navigator.userAgent.toLowerCase();
if( browser.indexOf('mac') !== -1 ) return false;

if(document.layers) 	width = window.innerWidth;
if(document.all)        width = document.body.clientWidth;
if(!document.all && document.getElementById) width = window.innerWidth;

		 if(document.getElementById) {
			document.getElementById(layname).style.left = (width - 760 )/2 + offset;
			document.getElementById(layname).style.top 	= imagey;
			document.getElementById(layname).style.visibility = 'hidden';			
        } if(document.layers) {
			document.layers[layname].left 		= (width - 760 )/2 + offset - 8;
			document.layers[layname].top 		= imagey;
			document.layers[layname].visibility = 'hidden';
		}  else if(document.all) {
			 document.all[layname].style.left 	= (width - 760 )/2 + offset;
			 document.all[layname].style.top 	= imagey;
			 document.all[layname].visibility 	= 'hidden';
		}

}


function swap(img) {
if (document["photo"].src == eval("photo3.src"))
	{document["photo"].src = eval("photo1.src");}
else
	{document["photo"].src = eval("photo"+((parseInt(document["photo"].src.charAt(document["photo"].src.indexOf("/residences/")+17)))+1)+".src");}
}


function imgOn(imgName) 
    {if (rollovers) {document[imgName].src = eval(imgName + "_on.src");}}    
function imgOff(imgName) 
    {if (rollovers) {document[imgName].src = eval(imgName + "_off.src");}}
