﻿function SendLinkTOFriend(url) { var options = { caption: 'Send Property Link to Friend', height: 248, width: 400, fullscreen: false, center_win: true, reload_on_close: false }; var win = new GB_Window(options); return win.show(url) } function Request(ctrl, UserID, EmailID, PropertyID) { if (EmailID != '') { var response = PropertySearchList.RequestAgent(parseInt(UserID), EmailID, parseInt(PropertyID)); ctrl.removeAttribute("href"); ctrl.setAttribute("onclick", ''); ctrl.style.color = "green"; ctrl.innerHTML = "Request Send SuccessFully" } } function ReInviteFriend(ctrl, UserID, EmailID) { if (EmailID != '') { var response = PropertySearchList.ReInvite(parseInt(UserID), EmailID); ctrl.removeAttribute("href"); ctrl.setAttribute("onclick", ''); ctrl.style.color = "green"; ctrl.innerHTML = "ReInvited SuccessFully" } } function InviteFriend(ctrl, UserID, EmailID) { if (EmailID != '') { var response = PropertySearchList.InviteFriends(parseInt(UserID), EmailID); ctrl.removeAttribute("href"); ctrl.setAttribute("onclick", ''); ctrl.style.color = "green"; ctrl.innerHTML = "Invited As a Friend SuccessFully" } return false } function PopUP(userid, propid, buttonID) { if (userid == 0) { var url = '../login.aspx?IsPopup=true&CallParent=true&PropertyID=' + propid; var options = { caption: 'Please login to save listing', height: 300, width: 410, fullscreen: false, center_win: true, reload_on_close: false, callback_fn: SetParentEvent }; var win = new GB_Window(options); return win.show(url) } else { document.getElementById(buttonID).value = 'Listing Saved'; clsGeneralAjax.SaveListing(propid); SetParentEvent() } return false } function ClosePopupandRedirect(url) { parent.parent.window.location.href = url; parent.parent.GB_hide() } function RedirectToParent(type) { if (type == 'forgot') { window.location = 'forgotpassword.aspx' } else { window.location = 'registeruser.aspx' } } function adjustDivs() { var df = document.getElementById('progTemplate'); var foreItem = document.getElementById('progDisplay'); var scrollLeft = (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); var scrollTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); var clientWidth; if (window.innerWidth) { clientWidth = (window.__safari ? window.innerWidth : Math.min(window.innerWidth, document.documentElement.clientWidth)) } else { clientWidth = document.documentElement.clientWidth } var clientHeight; if (window.innerHeight) { clientHeight = (window.__safari ? window.innerHeight : Math.min(window.innerHeight, document.documentElement.clientHeight)) } else { clientHeight = document.documentElement.clientHeight } df.style.position = 'absolute'; foreItem.style.position = 'absolute'; df.style.left = scrollLeft + 'px'; df.style.top = scrollTop + 'px'; df.style.width = clientWidth + 'px'; df.style.height = clientHeight + 'px'; foreItem.style.left = scrollLeft + ((clientWidth - foreItem.offsetWidth) / 2) + 'px'; foreItem.style.top = scrollTop + ((clientHeight - foreItem.offsetHeight) / 2) + 'px' } window.onload = adjustDivs; window.onresize = adjustDivs; window.onscroll = adjustDivs;
