
function PageUpdateForLogin()
{
GetPropertyDetails(false);
getPropertyContentForLoggedInUser();
var mlsdb = getCurMlsDb();
if(mlsdb == 300)
{
if(isNowInSearchDetailPage == true)
LoadMapPropertyPage("ifmPMap",0);
}
}
function showIndl(VSPid)
{
var ID = document.getElementById(VSPid);
ID.className = "notesStyle";	
ID.style.margin = "20px 0px 0 0";
ID.style.width = "310px";
ID.innerHTML = "<p align=left>This is likely to be the school for this property, as indicated by the MLS information.</p>";
}
function getPropertyContentForLoggedInUser()
{
var strIGEN_KEY = GetIGEN_KEY();
iGen.WebServices.Common.GetPropertyContentForLoggedInUser(strIGEN_KEY, onGetPropertyContentSucceed);
}
function onGetPropertyContentSucceed(res)
{
if(res!= null)
{
var rowCount = res.Tables[0].Rows.length;
for(var i = 0; i < rowCount; i ++)
{
var elementId = res.Tables[0].Rows[i].ElementId;
var elementContent = res.Tables[0].Rows[i].Content;
var currentElement = document.getElementById(elementId);
if(elementId == "spPropertyMainAddress")
{
var address = document.getElementById( "hidPropertyAddress" ).value;
document.getElementById( "hidPropertyAddress" ).value = elementContent + ", " + address;
}
if(currentElement)
{
currentElement.style.visibility = "";
currentElement.innerHTML = elementContent;
}
}
}
}
function HiddenIndl(VSPid)
{
var ID=document.getElementById(VSPid);
ID.className="notesStyleHidden";
}
function LoadMapPropertyPage(ifmID,sizeType)
{
var	isLoggedIn = checkUserIsLoggedIn('css');
if(isLoggedIn == false)
SetDetailPage(null,isLoggedIn);
var strIGEN_KEY = GetIGEN_KEY();
if(sizeType == null)
sizeType = 0;
var ifmPMap = document.getElementById(ifmID);
var webPath = document.getElementById("pHeader_hdRPath").value;
ifmPMap.src = webPath + "mapproperty.aspx?IGEN_KEY=" + strIGEN_KEY + "&sizeType=" + sizeType;
if(isLoggedIn == true)
GetPropertyDetails(true);
}
function GetPropertyDetails(isLoad)
{
var strIGEN_KEY = GetIGEN_KEY();	
iGen.WebServices.Common.GetMarker(strIGEN_KEY,isLoad,onGetMarkerSucceed);
}
function GetIGEN_KEY()
{
return document.getElementById("tbIGEN_KEY").value;
}
function getCurMlsDb()
{
return document.getElementById("tbCurMlsDb").value;
}
function getCurMlsNum()
{
return document.getElementById("tbCurMlsNum").value;
}
function onGetMarkerSucceed(res)
{	
if(res!= null && res.Tables[0]!=null)
SetDetailPage(res.Tables[0]);
}
function LoadCDSL(cdscode)
{
var isC = "";
var cdsList=document.getElementById("cdsList");
if(cdsList!=null)
if(cdsList.value!="")
{
var cdsListv = ","+cdsList.value+",";
if(cdsListv.indexOf(","+cdscode+",")!=-1)
isC = "checked";	
}	
return isC;	
}
function LoadSchoolInfo(res)
{
var isCheck = "";
var dt = res.value;
var markerCount = dt.Rows.length;
var cdscode = "";
var distance = "0";	
var APIScore = "";	
var SchoolInfo = "<table cellspacing=\"0\" cellpadding=\"0\" rules=\"all\" border=\"1\" id=\"DGSchoolInfo\" style=\"color:DimGray;font-size:9pt;width:100%;border-collapse:collapse;\">";
SchoolInfo += "<tr align=\"Center\" style=\"font-weight:bold;\" height=\"20px\"><td class=\"hideForPrint\"><img src=\"images/arrow.gif\"/></td><td>School Name</td><td>Type</td><td>Address</td><td>City</td><td>Distance</td><td>API Score</td><td class=\"hideForPrint\" style=\"width:100px\">Homes Near this School</td></tr>";
for(var i =0;i<markerCount;i++)
{
cdscode = dt.Rows[i].CDS_CODE;
distance = Trim(dt.Rows[i].distance);
distance = distance.substring(0,distance.indexOf('.')+3);	
APIScore = dt.Rows[i].API_This_Year;
if(APIScore == null)
APIScore = "";
isCheck = LoadCDSL(cdscode);
SchoolInfo += "<tr align=\"Center\"><td class=\"hideForPrint\"><INPUT type=\"checkbox\" onclick=\"getCDSList('"+cdscode+"','"+dt.Rows[i].SCH_TYPE+"')\" id='"+cdscode+"' value='"+cdscode+"'"+isCheck+"></td>";
SchoolInfo += "<td><a href='detailedschool.aspx?cds_code="+cdscode+"'><u>"+dt.Rows[i].school+"</u></a></td>";
SchoolInfo += "<td>"+dt.Rows[i].sch_type+"</td><td>"+dt.Rows[i].str_addr+"</td><td>"+dt.Rows[i].str_city +"</td><td><span>"+distance+"</span></td><td>"+APIScore+"</td><td class=\"hideForPrint\"><input type=\"button\" class=\"btnSource\" onmouseover=\"className='btnOver'\" onmouseout=\"className='btnSource'\" value=\"Search\" onclick=\"HomesNearby_Click('"+cdscode +"')\"</td></tr>";
}
SchoolInfo += "</table>";
document.getElementById("displayResults").innerHTML = SchoolInfo;	
}
function SetDetailPage(res,isLoggedIn)
{
if(isLoggedIn == null)
isLoggedIn = checkUserIsLoggedIn('css');
try{
if(isLoggedIn)
{
var isSave;
if(res != null && res.Rows != null)
isSave = res.Rows[0].USER_ID;
if(document.getElementById("imgFavorite")!=null)
{
if(isSave =="" || isSave==null)
document.getElementById("imgFavorite").innerHTML="<img border=0 src='" + gWebPath + "images/favorite_off.gif'> <a href='javascript:AddFav();' rel=\"nofollow\">add to favorites</a>";
else
document.getElementById("imgFavorite").innerHTML="<img border=0 src='" + gWebPath + "images/favorite_on.gif'> <a href='javascript:DelFav();' rel=\"nofollow\">remove favorite</a>";
}	
}
else if(document.getElementById("imgFavorite") != null)
document.getElementById("imgFavorite").innerHTML="";	
}
catch(e){}
}
function OpenVTLink(link)
{
var vLink = link.substring(0,25);
if(vLink == 'http://www.mediavisionliv')
{	
MM_openBrWindow(link,'VirtualTour',800, 540);	
}
else if(vLink == 'http://hosting.v-i-c.com/')
{
if(link.indexOf('show2.asp?id=')!=-1)
{
var urlp = link.substring(link.indexOf('show2.asp?id=')+13);
link = "http://hosting.v-i-c.com/" + urlp +"/" + urlp +".htm";
MM_openBrWindow(GetRelativePath2() + 'search_detail_vlink.aspx?vlink='+link,'VirtualTour',700, 580);
}
else
MM_openBrWindow(link,'VirtualTour',800, 540);
}
else if(vLink == 'http://www.3cim.com/3cim/' || vLink == 'http://www.visualtour.com' || vLink == 'http://tours.tourfactory.')
{
link = link.replace('sizetour.asp','tour.asp').replace('show.asp','shownp.asp');
MM_openBrWindow(GetRelativePath2() + 'search_detail_vlink.aspx?vlink='+link,'VirtualTour',813, 630);
}
else if(vLink == 'http://r2.virtualtourhost'|| vLink == 'http://ts.rtvpix.com/tour')
{
MM_openBrWindow(GetRelativePath2() + 'search_detail_vlink.aspx?vlink='+link,'VirtualTour',813, 540);
}
else
{
var myDiv = window.document.getElementById( 'divPop_LV' );
var pHeader = "<DIV id='pHeader' style=\"BACKGROUND-COLOR: #ffffff\"><table ><tr><td width=\"100%\"><IMG src=\"images/Movoto_LogoC.gif\" border=\"0\"></td><td valign=\"top\"><IMG style=\"CURSOR: hand\" onclick=\"CloseVTLink();\" alt=\"Close this pop window\" src=\"images/closewindowbtn2.png\"></td></tr></table></DIV>";
myDiv.innerHTML = pHeader + myDiv.innerHTML;
myDiv.style.display = 'block';
myDiv.style.backgroundColor = '#F4F0C3';	
myDiv.style.position = 'absolute';	
myDiv.style.height = 620;
myDiv.style.width = 800;
var ifmPop = window.document.getElementById( 'ifmPop_LV' );	
ifmPop.src = link;
ifmPop.style.height = 540;
moveToCenter( "divPop_LV" );
}	
}
function OpenMSVEBirdsEye()
{
var uAgent = window.navigator.userAgent;
if(uAgent.indexOf("Safari") != -1)
{
alert("Sorry, the bird's eye feature is not supported by your browser.");
}
else
{
var hInstance = document.getElementById("houseinstance").innerHTML;
var popBirdsEye = new popUpWindow();
popBirdsEye.width = "800";
popBirdsEye.height = "620";
popBirdsEye.titleBar.height = "90";
popBirdsEye.titleBar.backgroundColor = "#FFFFFF";
popBirdsEye.titleBar.textAlign = "left";
popBirdsEye.titleBar.innerHTML = "<IMG src='" + gWebPath + "images/Movoto_LogoC.gif' border='0'>";
popBirdsEye.bodyContainerTypeValue = gWebPath + "mapve.aspx?igen_key=" + GetIGEN_KEY() + "&mlsDb=" + getCurMlsDb() + "&mlsNum=" + getCurMlsNum() + "&HInstance=" + escape(hInstance);
popBirdsEye.show();
}
}
function CloseVTLink()
{
var myDiv = window.document.getElementById( 'divPop_LV' );
myDiv.style.display = "none";
myDiv.style.height = 370;
myDiv.style.width = 600;
var ifmPop = window.document.getElementById( 'ifmPop_LV' );
ifmPop.src = '';
ifmPop.style.height = "100%";
if(window.document.getElementById( 'pHeader' )!=null)
window.top.document.getElementById('pHeader').style.display = "none";	
if(window.document.getElementById( 'myMapArea' )!=null)
window.top.document.getElementById('myMapArea').style.display = "none";	
}
function getPhotoPage(curPage,pageCount)
{
if(pageCount == 0)
{
}
else
{
if(pageCount == 1)
{
}
else
{
var myPage = document.getElementById('myPage');
var myPage0 = document.getElementById('myPage0');
var igen_key = GetIGEN_KEY();
var mlsDb = getCurMlsDb();
var mlsNum = getCurMlsNum();
var i;
var outStr = "";
var prevPage = curPage - 1;
var nextPage = curPage + 1;
var prevPageContent = "<a href='javascript:getPhotoPage("+prevPage+","+pageCount+")' rel=\"nofollow\"><u><<</u></a>&nbsp;&nbsp;";
var nextPageContent = "<a href='javascript:getPhotoPage("+nextPage+","+pageCount+")' rel=\"nofollow\"><u>>></u></a>";
if(curPage == 1)
{
prevPageContent = "<<&nbsp;&nbsp;";
}
if(curPage == pageCount)
{
nextPageContent = ">>";
}
var tbStart="<table><tr><td align=center>";
var min;
var max;	
if(pageCount <= 8)
{
min = 1;
max = pageCount;
}
else
{	
if(curPage + 4 > pageCount)
{
max = pageCount;
min = pageCount - 4;
}
if(curPage - 4 < 1)
{
min = 1;
max = 8;
}
if( curPage + 3 <= pageCount && curPage - 4 >= 1)
{
min = curPage - 4;
max = curPage + 3;
}	
}
for(i = min; i <= max; i ++)
{
if( i == curPage)
outStr += "<strong>"+ i + "</strong>&nbsp;&nbsp;";
else
outStr += "<a href='javascript:getPhotoPage(" + i + ","+pageCount+")' rel=\"nofollow\"><u>" + i + "</u></a>&nbsp;&nbsp;";
}
var allPages = " &nbsp;<a href=\"javascript:ShowAllPhotos(" + mlsDb + ",'" + mlsNum + "');\" rel=\"nofollow\"><u>All</u></a>";
myPhotoPage.innerHTML = tbStart+"Photo:&nbsp;"+prevPageContent + outStr + nextPageContent + allPages;
}	
displayImage(curPage,pageCount);	
}
}
function AddFav()
{
var tbIGEN_KEY = document.getElementById("tbIGEN_KEY");
iGen.WebServices.Common.AddFavorite(tbIGEN_KEY.value,onAddFavSucceed);
}
function onAddFavSucceed(res)
{
if(res == true)
{
var imgFavorite=document.getElementById("imgFavorite");
imgFavorite.innerHTML="<img border=0 src='" + gWebPath + "images/favorite_on.gif'> <a href='javascript:DelFav();'>remove favorite</a>&nbsp;|&nbsp;";
}
else
{
window.location.href = GetHomePageLink(true);
}	
}
function DelFav()
{
var tbIGEN_KEY = document.getElementById("tbIGEN_KEY");
iGen.WebServices.Common.DelFavorite(tbIGEN_KEY.value,onDelFavSucceed);
}
function onDelFavSucceed(res)
{
if(res == true)
{
var imgFavorite=document.getElementById("imgFavorite");
imgFavorite.innerHTML="<img border=0 src='" + gWebPath + "images/favorite_off.gif'> <a href='javascript:AddFav();' rel=\"nofollow\">add to favorites</a>";
}
else
{
window.location.href = GetHomePageLink(true);
}	
}
function callback_GetImageNumbers(res)
{
var imum = res.value;
if(imum == null)
imum = res;
if(imum != "0")
{
getPhotoPage(1, imum);
}
else
{
var HouseImage = document.getElementById("HouseImage");
document.getElementById( 'hdPhoto' ).value = "0";
HouseImage.innerHTML = "<div class='noPhoto_Large'>Photo Unavailable</div>";
}
}
function displayImage(curPhotoPage,totalPage)
{
var igen_key = document.getElementById("tbIGEN_KEY").value;
var mlsNum = document.getElementById("tbCurMlsNum").value;
var mlsDb = document.getElementById("tbCurMlsDb").value;
document.getElementById( 'hdPhoto' ).value = igen_key;
var HouseImage = document.getElementById("HouseImage");
photoFilePage = curPhotoPage - 1;
HouseImage.innerHTML = "<a href=\"javascript:ShowAllPhotos(" + mlsDb + ",'" + mlsNum + "');\"><img border=0 src='" + GetBigImage(mlsNum,mlsDb,photoFilePage,'') + "' height='232px'></a>";
}
function ShowPhoto(mls_num,mls_db, curPhotoPage, totalPage)
{	
window.open(document.getElementById("pHeader_hdRPath").value+"showphotos.aspx?MLS_NUM="+mls_num+"&MLS_DB="+mls_db+"&cur="+curPhotoPage+"&total="+totalPage, "showphoto", "width=650,height=530,status=no,toolbar=no,resizable=no,menubar=no,location=no,scrollbars=no");
}
function ShowAllPhotos(mlsDb,mlsNum)
{
var popShowAllPhotos = new popUpWindow();
popShowAllPhotos.width = "650";
popShowAllPhotos.height = "550";
popShowAllPhotos.titleBar.innerHTML = "Displaying All Photos";
popShowAllPhotos.bodyContainerTypeValue = gWebPath + "showallphotos.aspx?mlsDb=" + mlsDb + "&mlsNum=" + mlsNum;
popShowAllPhotos.body.pageIframeScrolling = "auto";
popShowAllPhotos.show();
}
function getCDSList(str,sch_type)
{
var cdsType = document.getElementById("cdsType");
var cdsNum=document.getElementById("cdsNum");
if(cdsNum.value=="")
cdsNum.value="0";
var cdsCode=document.getElementById(str);
var cdsList=document.getElementById("cdsList");
if(cdsCode.checked)
{
cdsType.value += ","+sch_type;
cdsNum.value=eval(cdsNum.value)+1;
if(cdsList.value)
cdsList.value+=","+cdsCode.value;
else
cdsList.value=cdsCode.value;
}
else
{
if(cdsType.value != "" && cdsType.value.indexOf(sch_type)>-1 )
{
cdsType.value = cdsType.value.replace(","+sch_type,"");
}
cdsNum.value=eval(cdsNum.value)-1;
var cdsArray=cdsList.value.split(',');
if(cdsArray.length>1)
{
if(cdsArray[0]==cdsCode.value)
cdsList.value=cdsList.value.split(cdsCode.value+",").join("");
else
cdsList.value=cdsList.value.split(","+cdsCode.value).join("");
}
else
cdsList.value="";
}
if(cdsNum.value>3)
{
alert("You may compare only up to 3 schools.");
if(cdsType.value != "" && cdsType.value.indexOf(sch_type)>-1 )
cdsType.value = cdsType.value.replace(","+sch_type,"");
cdsCode.checked=false;
cdsNum.value=eval(cdsNum.value)-1;
var cdsArray=cdsList.value.split(',');
if(cdsArray.length>1)
{
if(cdsArray[0]==cdsCode.value)
{
cdsList.value=cdsList.value.split(cdsCode.value+",").join("");
}
else
{
cdsList.value=cdsList.value.split(","+cdsCode.value).join("");
}
}
else
{
cdsList.value="";
}
}
}
function compareSchools()
{
var cdsType = document.getElementById("cdsType");
if(cdsType.value != "" && cdsType.value.split(',').length>2)
{
var sch_list = cdsType.value.substring(1).split(',');
var isSameSchType = true;
var tempSchType = sch_list[0];
for(var i=1; i<sch_list.length; i++)
{
if(tempSchType != sch_list[i])
{
isSameSchType = false;
break;
}
}
if(isSameSchType == false)
{
alert("You can only compare schools of the same type.");
return;
}
}
var cdsNum=document.getElementById("cdsNum");
var cdsList=document.getElementById("cdsList");
var state = document.getElementById("tbStateCode");
if(cdsNum.value>0)
{	
var tbIGEN_KEY = Trim(document.getElementById("tbIGEN_KEY").value);
window.location = GetRelativePath2() + "public-schools/compare-schools/"+state.value+"/"+tbIGEN_KEY+"/"+cdsList.value+".htm";	
}
else
{
alert(" You may compare only up to 3 schools.");
}
}
function doEmailThis()
{
var url = location.href.toLowerCase();
popUpWindowQuickOpen("Email this listing to a friend","500","360",gWebPath + 'search_detail_emailthis.aspx?url=' + url,"popEmailThis")	
}
function doCustomResponse( i )
{
var price = document.getElementById( 'TDListPrice' ).innerHTML.replace("From ","");
var address = document.getElementById( 'hidPropertyAddress' ).value;
var mls = document.getElementById( 'tbCurMlsNum' ).value;
var pic = document.getElementById( 'hdPhoto' ).value;
var bed = document.getElementById('spanBedroom').innerHTML;
var bath = document.getElementById('spanBathroom').innerHTML;
var igen_key = GetIGEN_KEY();
var mlsDb = getCurMlsDb();
var city_code = "";
if(document.getElementById('iptCity')!=null)
city_code = document.getElementById('iptCity').value;
PopUpLeadPage( i, pic, price, address, mls, mlsDb, bed, bath, igen_key, city_code );
}
function moveToCenter( divName )
{
window.document.getElementById( 'divPop' ).style.display = 'none';
window.document.getElementById( 'divDoc' ).style.display = 'none';
window.document.getElementById( divName ).style.display = 'block';
var uAgent = window.navigator.userAgent;
var mydiv = document.getElementById( divName );
if(uAgent.indexOf("Firefox") != -1 || uAgent.indexOf("Netscape") != -1 || uAgent.indexOf("Safari") != -1)
{
mydiv.style.left = document.body.scrollLeft+(document.body.clientWidth-mydiv.offsetWidth)/2 +'px';
if(uAgent.indexOf("Safari") != -1)
mydiv.style.top = document.body.scrollTop+(innerHeight-mydiv.offsetHeight)/2 +'px';
else
mydiv.style.top = document.body.scrollTop+(document.body.clientHeight-mydiv.offsetHeight)/2 +'px';	
}
else
{
window.document.getElementById( divName ).style.posTop = document.body.scrollTop+(document.body.clientHeight-document.getElementById( divName ).offsetHeight)/2;
window.document.getElementById( divName ).style.posLeft = document.body.scrollLeft+(document.body.clientWidth-document.getElementById( divName ).offsetWidth)/2;	
}
var top =mydiv.style.top.replace('px','');
if(top < 0)
mydiv.style.top = '0px';
}
function HomesNearby_Click(cdscode,sch_type)
{
var urlHeader = GetRelativePath();
iGen.WebServices.Common.homesNearby_click(cdscode,urlHeader,sch_type,onHomesNearbyClickSucceed);	
}
function onHomesNearbyClickSucceed(res)
{
if(res != null)
window.location.href = res;
}
function doPopDocList( mls )
{
var divName = "divDoc";
var popDiv = document.getElementById( divName );
var popIfm = document.getElementById( 'ifmDoc' );	
popDiv.style.display = 'block';
popIfm.src = 'popdocumentlist.aspx?mls=' + mls;
popDiv.style.position = 'absolute';
popDiv.style.height = 400;
popDiv.style.width = 600;
moveToCenter( divName );
}
var isNowInSearchDetailPage = false;
function SearchDetailOnLoadEvent()
{
isNowInSearchDetailPage = true;
ShowHouseValueEstimate();
SetCurrentMetroAreaCode();
LoadMapPropertyPage("ifmPMap",0);
LeftOnLoadFunc();
LoadStreetView("ifmStreetView");
var crimeChart = document.getElementById("crimeChart");
var cellCrimeChart = document.getElementById("cellCrimeChart");
if(cellCrimeChart != null)
{
cellCrimeChart.appendChild(crimeChart);
}
var gaTrackName;
var gaParam = window.location.href.getQueryString("googleTrack");
var listingType = document.getElementById("hidListingType");
if(listingType != null && listingType.value == "NewHomeSource")
{
gaTrackName = "Property Detail - New Homes";
}
else
{
gaTrackName = "Property Detail";
}
if(gaParam == "1")
gaTrackName = "systememail_realtime";
else if(gaParam == "2")
gaTrackName = "systememail_daily";
else if(gaParam == "3")
gaTrackName = "systememail_weekly";
else if(gaParam == "-1")
gaTrackName = "systememail_first";
TrackGoogleAnalytics(gaTrackName);
TrackGoogleAnalyticsNew();//Added by Jane sept, 18 2008 for bug 4127
LoadTopAds();
LoadLeaderboardAds("SkyscraperLeftBar");
LoadHomeAccountWidget();
}
function LoadHomeAccountWidget()
{
var ifmHomeAccount = document.getElementById("ifmHomeAccount");
var listpirce = document.getElementById("hidListingPrice").value;
var webPath = document.getElementById("pHeader_hdRPath").value
ifmHomeAccount.src = webPath + "mortgagecalculator.aspx?listprice=" + listpirce;
}
function hiddenCrimeChart()
{
var crimeChart = document.getElementById("crimeChart");
setTimeout("crimeChart.innerHTML = \"<div style='width:315px;height:288px;line-height:288px;text-align:center'>no data</div>\"",500);	
}
function utmx_section(){}function utmx(){}
(function(){var k='3945740808',d=document,l=d.location,c=d.cookie;function f(n){
if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return c.substring(i+n.
length+1,j<0?c.length:j)}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
d.write('<sc'+'ript src="'+
'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
function LoadStreetView(iframeID)
{
var ifmStreetView = document.getElementById(iframeID);
var webPath = document.getElementById("pHeader_hdRPath").value;
ifmStreetView.src = webPath + "streetViewProperty.aspx";
}
function ShowHouseValueEstimate()
{
var mlsDb = getCurMlsDb();
if (mlsDb == 413)
return;
var strIGEN_KEY = GetIGEN_KEY();	
iGen.WebServices.Common.GetHouseValueEstimate(strIGEN_KEY, callback_ShowHouseValueEstimate);
}
function callback_ShowHouseValueEstimate(res)
{
var divHouseValueEstimate = document.getElementById("divHouseValueEstimate");
if(res != null)
divHouseValueEstimate.innerHTML = res;
}
