// (c) 2009 Magnetic Impact

function eq_col(col1, col2) {
    // locate both columns by id
    var left_col = MWJ_findObj(col1);
    var right_col = MWJ_findObj(col2);
    
    // calculate max height
    var column_height = Math.max(left_col.offsetHeight, right_col.offsetHeight);
    
    // set both columns to max height
    left_col.style.height = column_height + 'px';
    right_col.style.height = column_height + 'px';
}

// INDEX PAGE FORM HANDLER
// (c) 2009 Magnetic Impact

function emailfieldclear() {

  // create object handle
  email_field = MWJ_findObj('email'); 
  
  // clear field when clicked
  email_field.onclick = function() {email_field.value=''; email_field.style.color = 'black'};
  
  return;
}

//if(typeof MWJ_findObj != 'function') { 
  // From: www.howtocreate.co.uk/tutorials/index.php?tut=0&part=15#genref
  // Finds the object
  function MWJ_findObj( oName, oFrame, oDoc ) {
    if( !oDoc ) { if( oFrame ) { oDoc = oFrame.document; } else { oDoc = window.document; } }
    if( oDoc[oName] ) { return oDoc[oName]; } if( oDoc.all && oDoc.all[oName] ) { return oDoc.all[oName]; }
    if( oDoc.getElementById && oDoc.getElementById(oName) ) { return oDoc.getElementById(oName); }
    for( var x = 0; x < oDoc.forms.length; x++ ) { if( oDoc.forms[x][oName] ) { return oDoc.forms[x][oName]; } }
    for( var x = 0; x < oDoc.anchors.length; x++ ) { if( oDoc.anchors[x].name == oName ) { return oDoc.anchors[x]; } }
    for( var x = 0; document.layers && x < oDoc.layers.length; x++ ) {
      var theOb = MWJ_findObj( oName, null, oDoc.layers[x].document ); if( theOb ) { return theOb; } }
    if( !oFrame && window[oName] ) { return window[oName]; } if( oFrame && oFrame[oName] ) { return oFrame[oName]; }
    for( var x = 0; oFrame && oFrame.frames && x < oFrame.frames.length; x++ ) {
      var theOb = MWJ_findObj( oName, oFrame.frames[x], oFrame.frames[x].document ); if( theOb ) { return theOb; } }
    return null;
  }
//}

