function init() {
  	// Can handle W3C DOM?
  	if (! (document.getElementById && document.createTextNode)) {
  	    return;
    }
    
    // Friendly behaviours of form elements.

    // What? ...
    if ($('what-specific') && $('film') && $('what-specific-label')) {
        //TODO make this a separate function.
        AttachEvent($('what-specific'), 'click', 
            function() { $('film').focus() });
        AttachEvent($('film'), 'change',
            function() { $('what-specific').checked = true; });
        AttachEvent($('what-specific-label'), 'click', 
            function() { $('what-specific').checked = true;});
    }
    // When? ...
    if ($('day') && $('time') && $('when-specific')) {
        AttachEvent($('day'), 'change', 
            function() { $('when-specific').checked = true; });
        AttachEvent($('time'), 'change',
            function() { $('when-specific').checked = true; });
    }
    // Where? ...
    if ($('addr') && $('where-local-label')) {
        var lTxt = 'Enter Street or Postcode';
        AttachEvent($('addr'), 'focus', function() { 
            if ($F('addr') == lTxt) $('addr').value = ''; });
        AttachEvent($('addr'), 'blur', function() { 
            if ($F('addr') == '') $('addr').value = lTxt; });
        AttachEvent($('addr'), 'blur', function() { 
            if ($F('addr') == lTxt) $('where-central').checked = true; });
        AttachEvent($('addr'), 'change', function() {
            if ($F('addr') != lTxt) $('where-local').checked = true; });
        AttachEvent($('where-local-label'), 'click', function() {
            $('where-local').checked = true; });
        AttachEvent($('where-local-label'), 'click', function() {
            $('addr').focus(); });
    }
}

window.onload = init;

