var HoldDate var Changed = "NO" var gFlag = "GOOD" var arrFontSize = new Array(); arrFontSize[0]= ".5" arrFontSize[1]= "2" iFontSize = 0; // // start of image stuff // // newlistingactive = new Image(); // newlistingactive.src = "buttons/newlistingactive.jpg"; // newlistinginactive = new Image(); // newlistinginactive.src = "buttons/newlistinginactive.jpg"; function moveovers(imgName,imgReplace){ document.images[imgName].src = eval(imgReplace + ".src"); } // // end of image stuff // function jsJ_UserAccountR(tmp){ window.open("ReportUser.asp?option=Clients&UseridCnt=1&cbUserid1=on&fdUserid1=" +tmp+"&cbUInfo1=on&window=YES" ,"ReportUser","HEIGHT=550,WIDTH=900,toolbars=No,scrollbars=Yes") } function AU_BranchesAllR(){ for(iCnt=1;iCnt<=document.forms[0].fdBranchesCnt.value;iCnt++){ document.forms[0]["cbBranches"+iCnt].checked = document.forms[0].cbBranchesAll.checked } } function jsJ_NavagationBarItemR(tmp){ msgtxt = "" GoodFlag = "Good" if(GoodFlag=="Good"){ if(tmp.name=="btnHomePage"||tmp=="btnHomePage"){ window.location = "default.html" } if(tmp.name=="btnLogIn"||tmp=="btnLogIn"){ document.forms[0].action = "LogIn.asp?option=LogOff" document.forms[0].submit() } if(tmp.name=="btnPropertyLeadsList"||tmp=="btnPropertyLeadsList"){ document.forms[0].action = "PropertyLeadsList.asp" document.forms[0].submit() } if(tmp.name=="btnLogInNow"||tmp=="btnLogInNow"){ document.forms[0].action = "LogIn.asp?option=LogIn" document.forms[0].submit() } if(tmp.name=="btnbtnLogOff"||tmp=="btnLogOff"){ window.location = "LogIn.asp?option=LogOff" } if(tmp.name=="btnAdmin"||tmp=="btnAdmin"){ document.forms[0].action = "Admin.asp?option=Select" document.forms[0].submit() } if(tmp.name=="btnClientRequest"||tmp=="btnClientRequest"){ document.forms[0].action = "ClientRequest.asp" document.forms[0].submit() } if(tmp.name=="btnResearchLeads"||tmp=="btnResearchLeads"){ document.forms[0].action = "PropertyList.asp?option=New&Title=New" document.forms[0].submit() } if(tmp.name=="btnDealManager"||tmp=="btnDealManager"){ document.forms[0].action = "TransCoordList.asp?option=List" document.forms[0].submit() } if(tmp.name=="btnPreferences"||tmp=="btnPreferences"){ document.forms[0].action = "AdminUserGeneral.asp?option=EditUser" document.forms[0].submit() } if(tmp.name=="btnOfferManager"||tmp=="btnOfferManager"){ document.forms[0].action = "OfferList.asp?option=List" document.forms[0].submit() } if(tmp.name=="btnSendEmailAlerts"||tmp=="btnSendEmailAlerts"){ if(window.confirm("You want to send the Email Alert?")){ window.open("SendEmailAlerts.asp?option=SendAlerts","SendAlerts","HEIGHT=650,WIDTH=420,toolbars=No,scrollbars=Yes") } } if(tmp.name=="btnWebTour"||tmp=="btnWebTour"){ window.open("webtour/slide1.htm","webtour","HEIGHT=650,WIDTH=750,toolbars=No,scrollbars=Yes") } } else{ window.alert(msgtxt) } } function jsJ_NavagationBarSelectR(){ msgtxt = "" GoodFlag = "Good" tmpValue = document.forms[0].fdPropertyType.options[document.forms[0].fdPropertyType.selectedIndex].value if(GoodFlag=="Good"){ if(tmpValue=="Search"){ document.forms[0].action = "PropertySearch.asp?fdiiState=" + gCurrentState document.forms[0].submit() } if(tmpValue=="New"){ document.forms[0].action = "PropertyList.asp?option=New&Title=New" document.forms[0].submit() } if(tmpValue=="Ready"){ document.forms[0].action = "PropertyList.asp?option=Ready&Title=Ready" document.forms[0].submit() } if(tmpValue=="Approved"){ document.forms[0].action = "PropertyList.asp?option=Approved&Title=Approved" document.forms[0].submit() } if(tmpValue=="PendingDeals"){ document.forms[0].action = "PropertyList.asp?option=PendingDeals&Title=Pending+Deals" document.forms[0].submit() } if(tmpValue=="SOLD"){ document.forms[0].action = "PropertyList.asp?option=SOLD&Title=SOLD" document.forms[0].submit() } if(tmpValue=="SOLDSYS"){ document.forms[0].action = "PropertyList.asp?option=SOLDSYS&Title=SOLDSYS" document.forms[0].submit() } if(tmpValue=="Pending"){ document.forms[0].action = "PropertyList.asp?option=PENDING&Title=Pending" document.forms[0].submit() } if(tmpValue=="Private"){ document.forms[0].action = "PropertyList.asp?option=Private&Title=Private" document.forms[0].submit() } if(tmpValue=="NotApp"){ document.forms[0].action = "PropertyList.asp?option=NotApp&Title=Not+Approved" document.forms[0].submit() } if(tmpValue=="PropertyLeads"){ document.forms[0].action = "PropertyLeadsList.asp?option=PropertyLeads" document.forms[0].submit() } } } function jsJ_NewWindowR(tmpURL){ window.open(tmpURL,"tmpURL","HEIGHT=700,WIDTH=900,resizable=Yes,toolbars=Yes,scrollbars=Yes") } function jsJ_AdminVendorWindowR(){ window.open("AdminVendor.asp?option=Show","AdminVendor","HEIGHT=550,WIDTH=900,toolbars=No,scrollbars=Yes") } function jsJ_HelpPageR(tmp){ window.open("HelpSys.asp?HelpFile=" + tmp,"HelpPage","HEIGHT=700,WIDTH=950,toolbars=No,scrollbars=Yes") } function jsJ_CheckLength(tmp,ilength){ msgtxt = "" GoodFlag = "GOOD" if(tmp.value.length>ilength){ msgtxt = msgtxt + "You can only enter up to " + ilength + "\n" msgtxt = msgtxt + "You have entered " + tmp.value.length + "\n" GoodFlag = "Bad" } if(GoodFlag=="GOOD"){ gFlag = "GOOD" } else{ gFlag = "Bad" window.alert(msgtxt) } } function jsJ_YearCheckR(tmpObj){ tmp = parseInt(tmpObj.value) if(isNaN(tmp)||tmp<1000||tmp>3000){ alert("Bad Year must be in format YYYY") tmpObj.focus() } } function jsJ_NumberCheckR(tmpObj){ tmp = tmpObj.value if(tmp.toUpperCase()=="N/A"){ } else{ jsJ_CheckNumeric(tmp) if(gFlag=="BAD"){ alert("Bad Number") tmpObj.value = "0" tmpObj.focus() } } } function jsJ_CheckNumeric(tmpValue){ while(tmpValue.indexOf(",")>-1){ tmpValue = tmpValue.replace(",","") } tmpValue = tmpValue.replace("$","") tmpValue = tmpValue.replace("%","") if(isNaN(tmpValue)){ gFlag = "BAD" } else{ gFlag = "GOOD" } } function jsJ_NumericClean(tmpValue){ while(tmpValue.indexOf(",")>-1){ tmpValue = tmpValue.replace(",","") } tmpValue = tmpValue.replace("$","") tmpValue = tmpValue.replace("%","") if(isNaN(tmpValue)){ return 0 } else{ return tmpValue } } function jsJ_CalcPI(inLoanAmount,inIntRate,inYearlyPayments,inPaymentYears){ if(inIntRate==0){ outPrincipalInt = 0 } else{ tmpInterest = inIntRate / inYearlyPayments tmpTotalPI = 1 tmpInterest1 = 1 + tmpInterest for(iCnt=1;iCnt<=inPaymentYears * inYearlyPayments;iCnt++){ tmpTotalPI = tmpTotalPI * tmpInterest1 } outPrincipalInt = inLoanAmount * tmpInterest / ( 1 - (1/tmpTotalPI)) outPrincipalInt = parseInt((outPrincipalInt+.005)*100)/100.0 } return outPrincipalInt } function jsJ_BuildNumeric(parm1){ tmpvalue = parm1.value tmpOut = "" while(tmpvalue.indexOf(",")>-1){ tmpvalue = tmpvalue.replace(",","") } if (isNaN(tmpvalue)|| tmpvalue.length<1){ window.confirm("Bad Number") parm1.focus() parm1.value = "0" gFlag = "Bad" } else{ tmpOut = "" tmpvalue = "A" + parseInt(tmpvalue) if(tmpvalue.length < 4){ tmpLen = tmpvalue.length - 1 tmpPos = 1 } else{ tmpLen = 3 tmpPos = tmpvalue.length - 3 } tmpOut = tmpvalue.substr(tmpPos,tmpLen) if(tmpvalue.length > 4){ tmpOut = "," + tmpOut } if(tmpvalue.length < 7){ tmpLen = tmpvalue.length - 4 tmpPos = 1 } else{ tmpLen = 3 tmpPos = tmpvalue.length - 6 } tmpOut = tmpvalue.substr(tmpPos,tmpLen) + tmpOut if(tmpvalue.length > 7){ tmpOut = "," + tmpOut tmpLen = tmpvalue.length - 7 tmpPos = 1 tmpOut = tmpvalue.substr(tmpPos,tmpLen) + tmpOut } parm1.value = tmpOut gFlag = "Good" } } function jsJ_CheckBlank(parm1){ while(parm1.indexOf(" ")>-1){ parm1 = parm1.replace(" ","") } if (parm1.length==0){ return -10 } else{ return 0 } } function jsJ_RemoveBlanks(parm1){ while(parm1.indexOf(" ")>-1){ parm1 = parm1.replace(" ","") } return parm1 } function jsJ_ChangedR(){ Changed = "YES" } function jsJ_DateCheck(parm1){ var hDate = parm1.value; var calucd var d = new Date(); calucd = Date.parse(hDate) if (isNaN(calucd)){ hDate = "" parm1.value = hDate parm1.focus() return -10 } else{ d.setTime(calucd) hDate = (d.getMonth() + 1) + "/" + d.getDate() + "/" if(d.getFullYear() < 1975){ hDate = hDate + (d.getFullYear() + 100) } else{ hDate = hDate + d.getFullYear() } } parm1.value = hDate } function jsJ_TimeCheck(parm1){ var hTime = "1/1/2003 " + parm1.value; var caluct var d = new Date(); caluct = Date.parse(hTime) if (isNaN(caluct)){ window.confirm("Bad Time for " + parm1.name) hTime = "" parm1.value = hTime parm1.focus() return -10 } else{ d.setTime(caluct) tmpHours = d.getHours() if(tmpHours<13){ tmpAMPM = "AM" } else{ tmpHours = tmpHours - 12 tmpAMPM = "PM" } if(tmpHours<10){ tmpHours = "0" + tmpHours } tmpMinutes = d.getMinutes() if(tmpMinutes<10){ tmpMinutes = "0" + tmpMinutes } hTime = tmpHours + ":" + tmpMinutes + " " + tmpAMPM } parm1.value = hTime } function jsJ_ChangedR(){ Changed = "YES" } function jsJ_CheckExit(tmparea){ var Leaveflg = "YES" if(Changed == "YES"){ if(window.confirm("You have made a change without saving!\nDo you want to exit without saving? ")){ Leaveflg = "YES" } else{ Leaveflg = "NO" } } if(Leaveflg == "YES"){ if(tmparea == "open"){ window.open("TopLevel.asp#Top","TopLevel","menubar=Yes,toolbars=No,status=Yes,scrollbars=Yes") } if(tmparea == "close"){ window.close() } if(tmparea == "return"){ return("YES") } } } function jsJ_NoteCounter() { maxlimit = 240 tmptxt = document.forms[0].fdNote.value if (tmptxt.length > maxlimit) { // if too long...trim it! document.forms[0].fdNote.value = document.forms[0].fdNote.value.substring(0, maxlimit); } // otherwise, update 'characters left' counter else { document.forms[0].fdCounter.value = maxlimit - tmptxt.length; } }