// JavaScript Document

//--------Scroll
var bioparcScrollToElement2 = function( element ){
                    var stylize = function( element){ return !+"\v1" ? element.currentStyle : document.defaultView.getComputedStyle( element , null ) },
                         getPosition = function( element ){
                              var computedStyle, tryComputedStyle,
                                   position = { x: 0, y: 0 };
                                   
                                   if ( element.style.left  && /px/i.test(element.style.left) ){
                                        position.x = parseInt(element.style.left, 10); // without padding
                                   } else {
                                        computedStyle = stylize( element );
                                        var tryComputedStyle = computedStyle && computedStyle.left && /px/i.test( computedStyle.left );
                              
                                        if (tryComputedStyle)
                                             position.x = parseInt( computedStyle.left, 10 ); // without padding, includes css
                              
                                        if(!tryComputedStyle || position.x == 0) // otherwise we might run into problems on safari and opera (mac only)
                                             position.x = element.offsetLeft;   // includes padding
                                   }
                              
                                   if ( element.style.top && /px/i.test(element.style.top) )
                                        position.y = parseInt( element.style.top, 10); // without padding
                                   else
                                   {
                                        if ( !computedStyle )
                                             computedStyle = stylize( element );
                              
                                   var tryComputedStyle = computedStyle && computedStyle.top && /px/i.test( computedStyle.top );
                              
                                        if ( tryComputedStyle )
                                             position.y = parseInt( computedStyle.top, 10 ); // without padding, includes css
                              
                                        if( !tryComputedStyle || position.y == 0 ) // otherwise we might run into problems on safari and opera (mac only)
                                             position.y = element.offsetTop;   // includes padding
                                   }
                              
                              return position;
                         }
                         console.log(getPosition( element ).y-2000)
                         //scroll( 0, getPosition( element ).y+400 );
               }
			   
var bioparcScrollToElement = function( element ){
                    var stylize = function( element){ return !+"\v1" ? element.currentStyle : document.defaultView.getComputedStyle( element , null ) },
                         getPosition = function( element ){
                              var computedStyle, tryComputedStyle,
                                   position = { x: 0, y: 0 };
                                   
                                   if ( element.style.left  && /px/i.test(element.style.left) ){
                                        position.x = parseInt(element.style.left, 10); // without padding
                                   } else {
                                        computedStyle = stylize( element );
                                        var tryComputedStyle = computedStyle && computedStyle.left && /px/i.test( computedStyle.left );
                              
                                        if (tryComputedStyle)
                                             position.x = parseInt( computedStyle.left, 10 ); // without padding, includes css
                              
                                        if(!tryComputedStyle || position.x == 0) // otherwise we might run into problems on safari and opera (mac only)
                                             position.x = element.offsetLeft;   // includes padding
                                   }
                              
                                   if ( element.style.top && /px/i.test(element.style.top) )
                                        position.y = parseInt( element.style.top, 10); // without padding
                                   else
                                   {
                                        if ( !computedStyle )
                                             computedStyle = stylize( element );
                              
                                   var tryComputedStyle = computedStyle && computedStyle.top && /px/i.test( computedStyle.top );
                              
                                        if ( tryComputedStyle )
                                             position.y = parseInt( computedStyle.top, 10 ); // without padding, includes css
                              
                                        if( !tryComputedStyle || position.y == 0 ) // otherwise we might run into problems on safari and opera (mac only)
                                             position.y = element.offsetTop;   // includes padding
                                   }
                              
                              return position;
                         }
                         
                         scroll( 0, getPosition( element ).y );
               }
