
function onNext(iOffset)
{
var iLen=document.formGetEmailView.RecordIDList.options.length;
if(iLen<=1)
{
return;
}
var iNext=document.formGetEmailView.RecordIDList.selectedIndex+iOffset;
if((iNext>=iLen)||(iNext<0))
{
return;
}
document.formGetEmailView.RecordIDList.selectedIndex=iNext;
onPageChange(iOffset);
}
function onPageChange(iOffset)
{
var iCurrPosition=parseInt(document.formGetEmailView.RecordIDList.selectedIndex,10);
var iTotalCount=parseInt(document.formGetEmailView.RecordIDList.options.length,10);
var iIteration=parseInt(document.formGetMultiView.Iteration.value,10);
var iMulti=parseInt(document.formGetMultiView.MultiView.value,10);
var imgPrevious=document.getElementById("Previous");
var imgNext=document.getElementById("Next");
var IEMobile=(navigator.appName=="Microsoft IE Mobile"?true:false);
if(iCurrPosition>=iTotalCount-1)
{
if(!IEMobile)
{
imgNext.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity=30),progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
}
imgNext.disabled=true;
}
else
{
if(!IEMobile)
{
imgNext.style.filter="";
}
imgNext.disabled=false;
}
if(iCurrPosition<=0)
{
if(!IEMobile)
{
imgPrevious.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity=30),progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
}
imgPrevious.disabled=true;
}
else
{
if(!IEMobile)
{
imgPrevious.style.filter="";
}
imgPrevious.disabled=false;
}
if(iTotalCount>1)
{
if(iMulti)
{
if(iCurrPosition>=1)
{
var iLow=(iCurrPosition*iIteration)+1;
}
else
{
var iLow=iCurrPosition+1;
}
var iTotalListings=parseInt(document.formGetMultiView.NoOfRecs.value,10);
var iHi=iLow+iIteration-1;
if(iHi>iTotalListings)
{
iHi=iTotalListings;
}
document.getElementById("InstructionalText").innerText="Displaying properties "+iLow+"-"+iHi+" of "+iTotalListings;
}
else
{
document.getElementById("InstructionalText").innerText="Displaying Property "+(iCurrPosition+1)+" of "+iTotalCount;
document.getElementById("Nav").style.visibility="visible";
}
}
else
{
document.getElementById("InstructionalText").innerText="";
document.getElementById("Nav").style.visibility="hidden";
}
setTimeout("submitForm()",100);
}
function submitForm()
{
document.formGetEmailView.target="frmReportView";
document.formGetEmailView.submit();
}
function onPrint()
{
document.formGetEmailView.ForPrint.value="true";
document.formGetEmailView.target="_blank";
document.formGetEmailView.submit();
document.formGetEmailView.ForPrint.value="false";
}
function HyperlinkIt(p_nPtag,p_sValue,p_nKey,p_sSubType)
{
var iPTagImageCount=17;
var iPTagShowMap=-990099;
try
{
var regExp=new RegExp("\u00A0","g");
p_sValue=p_sValue.replace(regExp," ");
switch(p_nPtag)
{
case iPTagImageCount:
if(p_nKey!=""&&(!isNaN(parseInt(p_sValue,10)))&&(parseInt(p_sValue,10)>0))
{
var sURL="/5.4.04.22493/Tools/MultiImageViewer/MediaViewerDlg.asp?"+
"Mode=2&DefaultTab=0&ShowImages=1&"+
"Address=&SysPropID="+encodeURIComponent(p_nKey)+"&VarList="
+encodeURIComponent(document.formGetEmailView.VarList.value)+"&SiteCode="
+encodeURIComponent(document.formGetEmailView.SiteCode.value);
window.open(sURL,"MediaViewer","toolbar=no,scrollbar=no,resizable=yes,width=732,height=667,screenX=0,top=0");
}
break;
case iPTagShowMap:
if(p_sValue!="")
{
var aMapData=p_sValue.split("~");
var fLat=parseFloat(aMapData[9]);
var fLng=parseFloat(aMapData[10]);
if(isNaN(fLat)||isNaN(fLng))
{
alert("Property cannot be located.");
}
else
{
var sURL="/DotNet/Pub/GetMapEx.aspx?lat="+aMapData[9]+
"&lng="+aMapData[10]+
"&addr="+aMapData[0]+
"&lp="+aMapData[7]+
"&st="+aMapData[5]+
"&ml="+aMapData[12];
window.open(sURL,"MapDialog","toolbar=no,scrollbar=no,resizable=yes,width=732,height=667,screenX=0,top=0");
}
}
break;
default:
break;
}
}
catch(e)
{
}
}


