function mortgage(price,interest) {
	var s = '/search/includes/mortgagecalculator.aspx?Price='+price+'&int='+interest;
	mortWindow = window.open(s,"","width=440,height=400,status=no,toolbar=no,location=no,menu=no,scrollbars=no,resizable=yes");
}

function emailresults(nrtid,ab,agentid) {
	var s = '/search/includes/emailresults.aspx?nrtid='+nrtid+'&ab='+ab+'&agentid='+agentid;
	mortWindow = window.open(s,"","width=425,height=395,status=no,toolbar=no,location=no,menu=no,scrollbars=no,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;
	mapWindow = window.open(s,"","width=650,height=530,status=no,toolbar=yes,location=no,menu=no,scrollbars=no,resizable=no");
}

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=450,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=500,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=500,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=500,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?address='+parmAddress+'&city='+parmCity+'&state='+parmState;
	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 requestshowing(nrtid,ab,agentid) {
	var s = '/search/includes/requestshowing.aspx?nrtid='+nrtid+'&ab='+ab+'&aid='+agentid+'&agentid='+agentid;
	mortWindow = window.open(s,"","width=520,height=460,status=no,toolbar=no,location=no,menu=no,scrollbars=no,resizable=yes");
}

function requestinfo(nrtid,ab,agentid) {
	var s = '/search/includes/requestinfo.aspx?nrtid='+nrtid+'&ab='+ab+'&aid='+agentid+'&agentid='+agentid;
	mortWindow = window.open(s,"","width=550,height=560,status=no,toolbar=no,location=no,menu=no,scrollbars=no,resizable=yes");
}

currentpic = 0;
PicVar  = 0;
PicVal  = new Array();

function ShowPhoto(newpic) {
	PDC_imgPropertyPhoto.src = PicVal[newpic];
	currentpic = newpic;
}

function PreviousPhoto() {
	currentpic--;
	if(currentpic<0) currentpic = TotalImages - 1;
	ShowPhoto(currentpic);
}

function NextPhoto() {
	currentpic++;
	if (currentpic>=TotalImages) currentpic = 0;
	ShowPhoto(currentpic);
}

function popupphotobrowser(nrtpropertyid) {
	var s = '/search/includes/photobrowse.aspx?nrtpropertyid='+nrtpropertyid;
	photowin = window.open(s,"","width=450,height=385,status=no,toolbar=yes,location=no,menu=no,scrollbars=no,resizable=yes");
}

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];
		}
	}
}