// JavaScript Library (C) Make IT Work
// http://www.makeitwork.be

// The left() function doesn't exist, so we'll just create one...

function Left(str, n)
{
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}

// The right() function doesn't exist, so we'll just create one...
function Right(str, n)
{
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

// The replace() function doesn't exist, so we'll just create one...
function replace( str, from, to )
{
    var idx = str.indexOf( from );
    while ( idx > -1 ) {
        str = str.replace( from, to );
        idx = str.indexOf( from );
    }
    return str;
}

function ShowPicture(fotonr, hoogte, breedte, src)
{
        naam=fotonr;
		len=naam.length;
		naam=replace(replace(Left(naam,naam.length - 4),"-"," "),"_"," ");
		foto = window.open('','','menubar=no,toolbar=no');
        foto.resizeTo(breedte+15,hoogte+25);
        foto.document.write("<html><head><title>Foto - " + naam + "</title></head>");
		foto.document.write("<body leftmargin='0' topmargin='0'>");
        foto.document.write("<center><img src=" + replace(src," ","%20") + replace(fotonr," ","%20") + "><br>");
        foto.document.write("<font face='Arial, Helvetica, sans-serif' size='2'>"+naam+"<br>");
		foto.document.write("<a href='JavaScript:window.close();'> Close </a></font></center>");
        foto.document.write("</body></html>");
}

function open_me(url,w,h) // pop-up window
{
w=w+15; h=h+15;
window.open(url,'','location=0,resizable=0,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=0,status=0,width='+w+',height='+h+',screenX='+(screen.width - w)/2+',screenY='+(screen.height - h)/2+',top='+(screen.height - h)/2+',left='+(screen.width - w)/2);
}

function open_me_scroll(url,w,h)
{
w=w+15; h=h+15;
window.open(url,'','location=0,resizable=0,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=1,status=0,width='+w+',height='+h+',screenX='+(screen.width - w)/2+',screenY='+(screen.height - h)/2+',top='+(screen.height - h)/2+',left='+(screen.width - w)/2);
}

<!-- Limit size of textarea
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}