
function mortgage(price,interest,url) {

var s = '/search/includes/mortgagecalculator.aspx?Price='+price+'&int='+interest+'&url='+url;
//Ray Yakobu. 8/26/05 made the windows scrollable.
mortWindow = window.open(s,"","width=578,height=435,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function emailresults(nrtid, propertyid) {

//var s = '/search/includes/emailresults.aspx?nrtid='+nrtid;
var s = '/search/includes/emailafriend.aspx?nrtid='+nrtid + '&propertyid=' + propertyid;
//Ray Yakobu. 8/29/05 made the windows scrollable.
mortWindow = window.open(s,"","width=650,height=400,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function propertyMap(lsPan, lsCust, lsA2, lsA3, lsAddrPickBest, lsAddrErrMinScale, lsW, lsH, lsS, lsC, lsI, lsIcon1, lsIcon2, lsRouteId, lsRouteArrow) {

var s = '../Maps/viewPropMap_02.aspx?lsPan='+lsPan+'&lsCust='+lsCust+'&lsA2='+lsA2+'&lsA3='+lsA3+'&lsAddrPickBest='+lsAddrPickBest+'&lsAddrErrMinScale='+lsAddrErrMinScale+'&lsW='+lsW+'&lsH='+lsH+'&lsS='+lsS+'&lsC='+lsC+'&lsI='+lsI+'&lsIcon1='+lsIcon1+'&lsIcon2='+lsIcon2+'&lsRouteId='+lsRouteId+'&lsRouteArrow='+lsRouteArrow;
//Ray Yakobu. 8/26/05 made the windows scrollable.
mapWindow = window.open(s,"","width=700,height=700,status=no,toolbar=yes,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function schoolinfo(strCity, strState, strZip) {
// obsolete.... 7/16/02
//http://www.homefair.com/homefair/servlet/ActionServlet?pid=40&cid=NRT&reportState=IL&countyid=9&to=%2Fservlet%2FActionServlet%3Fpid%3D40%26NRT&toOrig=&district1=9807&district2=&district3=&skipcontact=true
var s = '/ThirdParty/SchoolInformation.aspx?City='+strCity+'&State='+strState+'&Zip='+strZip;
//s = 'http://www.homefair.com/homefair/servlet/ActionServlet?pid=40&cid=NRT&reportState=IL&countyid=9&to=%2Fservlet%2FActionServlet%3Fpid%3D40%26NRT&toOrig=&district1=9807&district2=&district3=&skipcontact=true';
schoolWindow = window.open(s,"","width=550,height=480,status=no,toolbar=yes,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function citystatepopup(parmFrom) {
// used for school and neighboorhood info
var s = '../ThirdParty/ChooseLocation.aspx?fr='+parmFrom;
hoodWindow = window.open(s,"","width=600,height=520,status=no,toolbar=yes,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function citystatepopup2(parmFrom) {
// used for whats nearby info  width was 770
var s = '../ThirdParty/ChooseLocation.aspx?fr='+parmFrom;
hoodWindow = window.open(s,"","width=600,height=520,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function hoodinfo(strCity, strState, strZip) {
//var s = '../ThirdParty/viewNHoodInfo.aspx?City='+strCity+'&State='+strState+'&Zip='+strZip;
//hoodWindow = window.open(s,"","width=600,height=785,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");

// used for whats nearby info
var s = '../ThirdParty/viewChannelReports.aspx?fr=nhood&Street=&City='+strCity+'&State='+strState+'&Zip='+strZip;
hoodWindow = window.open(s,"","width=600,height=500,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function hoodinfo2(strCity, strState, strZip) {
//var s = '../ThirdParty/viewNHoodInfo.aspx?City='+strCity+'&State='+strState+'&Zip='+strZip;
//hoodWindow = window.open(s,"","width=600,height=785,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");

// used for whats nearby info
var s = '../ThirdParty/viewChannelReports.aspx?fr=nhood2&Street=&City='+strCity+'&State='+strState+'&Zip='+strZip;
hoodWindow = window.open(s,"","width=600,height=530,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function hoodinfo3(strCity, strState, strZip, strFrom) {
// used for whats nearby info
var s = '../ThirdParty/viewChannelReports.aspx?fr='+strFrom+'&Street=&City='+strCity+'&State='+strState+'&Zip='+strZip;
hoodWindow = window.open(s,"","width=600,height=530,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function whatsnearby(parmAddress, parmCity, parmState) {
var win = '';
var s = ''
win = '/ThirdParty/viewNearbyGroups.aspx?state='+parmState+'&city='+parmCity+'&address='+parmAddress;
mortWindow = window.open(win,"","width=600,height=500,status=no,toolbar=yes,location=no,menu=no,scrollbars=yes,resizable=yes");
}

function saveproperty(nrtid) {
var s = '/personalization/savesearchpopup.aspx?nrtid='+nrtid;
mortWindow = window.open(s,"","width=300,height=250,status=no,toolbar=no,location=no,menu=no,scrollbars=no,resizable=no");
}

function savesearch(currentsearchname,qs) {
var s = '/personalization/savesearchresultspopup.aspx?currentsearchname='+currentsearchname+'&qs='+qs;
mortWindow = window.open(s,"","width=350,height=350,status=no,toolbar=no,location=no,menu=no,scrollbars=no,resizable=no");
}

function requestshowing(propertyguid,nrtid,ab,agentid,officeid) {
var s = '/search/includes/requestshowing.aspx?propertyid='+propertyguid+'&nrtid='+nrtid+'&ab='+ab+'&aid='+agentid+'&agentid='+agentid+'&officeid='+officeid;
//Ray Yakobu. 8/26/05 made the windows scrollable.
mortWindow = window.open(s,"","width=650,height=765,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");
}


function requestinfo(propertyguid,nrtid,ab,agentid,officeid) {
var s = '/search/includes/requestinfo.aspx?propertyid='+propertyguid+'&nrtid='+nrtid+'&ab='+ab+'&aid='+agentid+'&agentid='+agentid+'&officeid='+officeid;
//Ray Yakobu. 8/29/05 made the windows scrollable and changed the height.
//mortWindow = window.open(s,"","width=550,height=675,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");

//mortWindow = window.open(s,"","width=550,height=460,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");
mortWindow = window.open(s,"","width=650,height=700,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");

}

function propertydocs(nrtid,ab,agentid,officeid) {
var s = '/search/propertydocuments.aspx?nrtid='+nrtid+'&ab='+ab+'&aid='+agentid+'&agentid='+agentid+'&officeid='+officeid;
mortWindow = window.open(s,"","width=560,height=650,status=no,toolbar=no,location=no,menu=no,scrollbars=yes,resizable=yes");
}


function popWin(URL,height,width) {
	if (height==null) height='700';
	if (width==null) width='700';
	
	var win = window.open('', '', 'height=' + height + ',width='+ width + ',location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes');
	win.location = URL;
	win.focus();
}
	

function MM_swapImgRestore() {
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() {
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) {
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() {
var i,j=0,x,a=MM_swapImage.arguments; 
document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function getObjectByID(id) {
   if (document.getElementById) { // DOM-compliant browsers (MSIE5, NSN6, O5)
       return document.getElementById(id);
   } else if (document.all) { // MSIE4
       return document.all[id];
   } else if (document.layers) { // NSN4
       return document.layers[id];
   } else { // Trap DHTML-impaired browsers 
       //alert("Your browser does not support DHTML!");
       return false;
   }
};

function chgMainPhoto(newPhoto){
	//change the picture
		var imgObj = getObjectByID('propertyPhoto');
	imgObj.src = newPhoto;
};

function propertyMap_MapPoint(mappointurl,propGuid, metroID) {
		var s = mappointurl + '?PropertyID=' + propGuid + '&VEEntityType=1&MetroID=' + metroID;
		//Ray Yakobu. 8/26/05 made the windows scrollable.
		mapWindow = window.open(s,"","width=650,height=530,status=no,toolbar=yes,location=no,menu=no,scrollbars=yes,resizable=no");
}

//function OfficeMap_MapPoint(OfficeID, metroID) {
//		var s ='http://maps.nrtwebservices.com/ViewMap.aspx	?OfficeID='+OfficeID+'&MetroID='+metroID;
//		mapWindow = window.open(s,"","width=650,height=530,status=no,toolbar=yes,location=no,menu=no,scrollbars=no,resizable=no");
//}