i_amapon = new Image
i_amapon.src = "/ob/icons/icoamap_on.gif"
i_bldgbon = new Image
i_bldgbon.src = "/ob/icons/icobldgb_on.gif"
i_contacton = new Image
i_contacton.src = "/ob/icons/icocontact_on.gif"
i_fpon = new Image
i_fpon.src = "/ob/icons/icofp_on.gif"
i_mapon = new Image
i_mapon.src = "/ob/icons/icomap_on.gif"
i_portfolioon = new Image
i_portfolioon.src = "/ob/icons/icoportfolio_on.gif"
i_touron = new Image
i_touron.src = "/ob/icons/icotour_on.gif"
i_webon = new Image
i_webon.src = "/ob/icons/icoweb_on.gif"
i_mailon = new Image
i_mailon.src = "/ob/icons/mail_yes_on.gif"

i_amapsmon = new Image
i_amapsmon.src = "/ob/icons/icoamap_sm_on.gif"
i_bldgbsmon = new Image
i_bldgbsmon.src = "/ob/icons/icobldgb_sm_on.gif"
i_contactsmon = new Image
i_contactsmon.src = "/ob/icons/icocontact_sm_on.gif"
i_fpsmon = new Image
i_fpsmon.src = "/ob/icons/icofp_sm_on.gif"
i_mapsmon = new Image
i_mapsmon.src = "/ob/icons/icomap_sm_on.gif"
i_portfoliosmon = new Image
i_portfoliosmon.src = "/ob/icons/icoportfolio_sm_on.gif"
i_toursmon = new Image
i_toursmon.src = "/ob/icons/icotour_sm_on.gif"
i_websmon = new Image
i_websmon.src = "/ob/icons/icolisting_sm_on.gif"
i_listingsmon = new Image
i_listingsmon.src = "/ob/icons/icolisting_sm_on.gif"
i_mailsmon = new Image
i_mailsmon.src = "/ob/icons/mail_yes_sm_on.gif"



var pixwin=null;
function pixwinopen(){
		if (pixwin && pixwin.open && !pixwin.closed) {		
			pixwin.close();
		}
		var pixwin = null 
		pixwin = window.open("",'pixwin','resizable=yes,menubar=no,toolbar=yes,scrollbars=yes,width=740,height=500,location=no,copyhistory=no');
		pixwin.focus()
		return true
}

	var sendwin = null;
      function sendspace() {
            if (sendwin && sendwin.open && !sendwin.closed) {                
                        sendwin.close();
            }               
            sendwin = window.open("","sendwin",
            'resizable=yes,menubar=no,toolbar=yes,scrollbars=yes,width=400,height=430,location=no,copyhistory=no,screenY=100,screenX=0');
            sendwin.focus();
            return true;
      }

  var to = null;
  var subject = null;
  var bodytxt =null;
  var doc=null;	
  var lcbodytxt=null;
  var lcmsgtxt=null;
function mailit(to,lcbldg) {
	lcmsgtxt= "Regarding: "+lcbldg+" Space Availabilities"
	lcbodytxt="I would like more information about available space at "+lcbldg
  	doc = "mailto:" + to + 
    "?subject=" + escape(lcmsgtxt) + 
    "&body=" + escape(lcbodytxt); 
    window.location = doc;
}

var spaceWin
function openSpaceWin(lcbldg_id, flag){
        if (spaceWin && spaceWin.open && !spaceWin.closed) {
                spaceWin.close();
        }
        spaceWin = window.open('','spaceWin','resizable=yes,menubar=no,toolbar=yes,scrollbars=yes,width=680,height=500,location=no,copyhistory=no');
        this.spaceWin.focus()
}

var winPrintWin=null;
function openPrintWin(sHref){
        if (winPrintWin && winPrintWin.open && !winPrintWin.closed) {
               winPrintWin.close();
        }
        var docPW =
'<html>'+
'<head>'+
'        <meta http-equiv="Content-Type" content="text/html" />'+
'        <meta http-equiv="Expires" content="Mon, 04 Dec 1887 23:00:00 GMT">'+
'        <title>Print Listings</title>'+
'</head>'+
'<frameset border="0" frameSpacing="0" rows="90,*" frameBorder="0">'+
'        <frame name="toolbar" marginwidth="0" marginheight="0" src="/spframes/printtoolbar.html" frameborder="0" noresize="" />'+
'        <frame name="printWinMain" src="'+ sHref +'" marginwidth="0" marginheight="0" frameborder="0" noresize="" />'+
'</frameset>'+
'</html>';

        winPrintWin = window.open('','winPrintWin','resizable=yes,width=740,height=525,location=no,copyhistory=no');
        winPrintWin.document.open();
        winPrintWin.document.write(docPW);
        winPrintWin.document.close();
        winPrintWin.focus();
        //winPrintWin.frames['printWinMain'].location=sHref;
        return false;
}

var aOpenWindows = new Array();
var aWindows = new Array();

aWindows["pixwin"]  = 'resizable=yes,menubar=no,toolbar=no,scrollbars=yes,width=740,height=500,location=no,copyhistory=no'
aWindows["mro_getbldg"] = 'resizable=yes,menubar=no,toolbar=no,scrollbars=yes,width=680,height=500,location=no,copyhistory=no';
aWindows["bldgpixwin"] = 'resizable=yes,menubar=no,toolbar=no,scrollbars=yes,width=680,height=500,location=no,copyhistory=no';
aWindows["mro_amapwin"] = 'resizable=yes,menubar=no,toolbar=no,scrollbars=yes,width=700,height=680,location=no,copyhistory=no';
function mro_openwin(sWinName, sWinURL){
    var newWin;
    
    if (aOpenWindows[sWinName] && aOpenWindows[sWinName].open && !aOpenWindows[sWinName].closed)
        aOpenWindows[sWinName].close();
    
    if ( sWinURL == null )
        sWinURL = '';

    newWin = window.open(sWinURL,sWinName,aWindows[sWinName]);
	newWin.focus();
    aOpenWindows[sWinName] = newWin;
}

function MROISwap(ref) { //v1.0 ;
   if(document.getElementById){
	var a,asrc_on,b,i,j;
	j=ref.childNodes.length;
	a=ref.childNodes;
	for (i=0; i<j; i++){ 
		if (ref.childNodes[i].nodeType==1){ 
		if (a[i].src.indexOf("gif")!=-1){a[i].src=a[i].src.replace(".gif","_on.gif")};
		if (a[i].src.indexOf("jpg")!=-1){a[i].src=a[i].src.replace(".jpg","_on.jpg")};
		}
 	}	
   }		
}

function MROIRestore(ref) { //v3.0
    if(document.getElementById){
      var a,i,j;
	j=ref.childNodes.length;
	a=ref.childNodes;
	for (i=0; i<j; i++){ 
		if (ref.childNodes[i].nodeType==1){ 		
 		a=ref.childNodes;
		if (a[i].src.indexOf("_on")!=-1){a[i].src=a[i].src.replace("_on","")};
		}
 	}	
    }
}

function attatchLinkBehavior(){
		if (document.getElementsByTagName) {
			var links = document.getElementsByTagName("a"); // Find all links in page
			for (var i=0; i <links.length; i++) {
				if (links[i].className.match("MrFtLnk")) { // find all links with class "progressive"
					links[i].onclick = function() {return false;};
				}
			}
		}
	}
