﻿function openExternalWindow(url, windowTitle)
//opens an external javascript window.
{
	var newWindow = window.open(url, windowTitle);
}

function numericOnly(evt)
//only allows numeric input and blocks all alpha characters
{
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
    if (charCode > 31 && (charCode < 48 || charCode > 57))
    {
        return false;
    }
    return true;
}

function autofocusNextField(field, limit, next, evt)
//auto-focuses on the next field in the tab order for fixed length fields. We use this for
//SSN's broken into three separate boxes, for example. When the user enters three digits
//in the first SSN box, this method auto-focuses to the second SSN box.
{
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
    if (charCode > 31 && field.value.length == limit)
    {
        field.form.elements[next].focus();
    }
}

function openConstructionPopup()
{
    var winpops = window.open("constructionPhotos.aspx?ImgNo=1","","width=800,height=650");
}





