var maskingTarget = null; function imgmask_init( id ) { maskingTarget = ( document.getElementById( id ) || document.getElementsByName( id )[0] ); if( !maskingTarget ) return; maskingTarget.style.float = 'left'; maskingTarget.style.position = 'relative'; } function prev( value ) { if( !maskingTarget ) return; if( !value ) value = 137; /* if($.browser.msie) { if(maskingTarget.offsetLeft >= 0 ) return; maskingTarget.style.left = (maskingTarget.offsetLeft + value +2 ) + 'px'; } else {*/ var left = parseInt(maskingTarget.style.left.replace('px', '')); if(isNaN(left) === true) left = 0; if(left >= 0 ) return; maskingTarget.style.left = (left + value +2 ) + 'px'; //} } function next( value ) { if( !maskingTarget ) return; if( !value ) value = 137; /*if($.browser.msie) { if( ( maskingTarget.childNodes.item( maskingTarget.childNodes.length -1 ).offsetLeft + maskingTarget.offsetLeft ) < mask.offsetWidth ) return; maskingTarget.style.left = ( maskingTarget.offsetLeft - value -2 ) + 'px'; } else {*/ var left = parseInt(maskingTarget.style.left.replace('px', '')); if(isNaN(left) === true) left = 0; //if( ($(maskingTarget).children().eq($(maskingTarget).children().size()-1).get(0).offsetLeft+left) < mask.offsetWidth ) return; maskingTarget.style.left = ( left - value - 2 ) + 'px'; //} }