function updateSize(text)
{viewportHeight=window.innerHeight||document.body.clientHeight;maxHeight=viewportHeight*3/4
text.hiddenText.value=text.value;height=(text.hiddenText.scrollHeight+25)
if(height<text.handyStartHeight)
height=text.handyStartHeight;else if(height>maxHeight)
height=maxHeight;text.style.height=height+'px';}
function initTextResize()
{textareas=document.getElementsByTagName("textarea");textareasCopy=new Array();var j=0;for(var i=0;i<textareas.length;i++)
{if(textareas[i].onkeyup)
{textareasCopy[j]=textareas[i];j++;}}
for(var i=0;i<textareasCopy.length;i++)
{text=textareasCopy[i];hiddenText=text.cloneNode(true);hiddenText.style.visibility="hidden";hiddenText.style.position="absolute";text.hiddenText=hiddenText
text.parentNode.appendChild(text.hiddenText);height=(text.hiddenText.scrollHeight+25)
text.style.height=height+'px';text.handyStartHeight=height;}}