
function ResizeImage(image, maxwidth, maxheight) {
    w = image.width;
    h = image.height;

    if (w == 0 || h == 0) {
        image.width = maxwidth;
        image.height = maxheight;
    }
    if (w > h) {
        if (w > maxwidth) image.width = maxwidth;
    }
    else {
        if (h > maxheight) image.height = maxheight;
    }

    image.style.visibility = "visible";
    image.style.display = "block";
    image.style.styleFloat = "none";
    image.style.position = "static";
}

function SetMaxLengthTextBox(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);
	}
}

function ShowImage(image) {
    image.style.visibility = "visible";
    image.style.display = "block";
    image.style.styleFloat = "none";
    image.style.position = "static";
}
