/*
FIX IMAGE to VIEWPORT I

author: Jens Brueckmann
        http://www.j-a-b.net/

      created: 2004-06-25
last modified: 2004-06-25
________________________________________________________________________________
This script is published under a Creative Commons License. For more information 
about this license visit http://creativecommons.org/licenses/by-sa/2.0/
________________________________________________________________________________
Comments are welcome :-) Use contact form or mail me at jens[at]j-a-b.net
________________________________________________________________________________
*/

function glueImg() {

  var gjpImgObj = document.getElementById('gjpOriginal').style;
  var checkObj  = document.getElementById('toggleFix');

  if (checkObj.value=='off') {

    gjpImgObj.position    = 'fixed';
    gjpImgObj.top         = '1%';
    gjpImgObj.left        = '50%';
    gjpImgObj.marginLeft  = '-125px';

    checkObj.value = 'on';

  }

  else {

    gjpImgObj.position    = 'relative';
    gjpImgObj.top         = '0';
    gjpImgObj.left        = '0';
    gjpImgObj.marginLeft  = '0';

    checkObj.value = 'off';
  }
}

