//use this to set a maxlength for multiline textboxes
function maxLength(text,long) 
{
    var maxlength = new Number(long); // Change number to your max length.

    if (text.value.length > maxlength){

        text.value = text.value.substring(0,maxlength);

        alert("This field allows a maximum of " + long + " characters");

    }
}

//open a new window
function openWindow(url,w,h)
{   
    window.open(url,"Resource","toolbar=yes, location=yes, directories=no, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width="+w+", height="+h+", top=220, left=200");
}