      //var undefined = 0;

      function getWindowYOffsetSpy() {
        if ( window.pageYOffset || window.pageYOffset == 0 )
          return window.pageYOffset;
        if ( document.body.scrollTop || document.body.scrollTop == 0 ) {
          if ( document.documentElement.scrollTop || document.documentElement.scrollTop == 0 ) {
            // IE 6 uses document.documentElement.scrollTop instead of
            // document.body.scrollTop. Has to do with viewpoints -
            // see some w3 spec ;-)
            return document.body.scrollTop + document.documentElement.scrollTop;
          } else
            return document.body.scrollTop;
        }
      }

      function doscroll(y) {
        window.scrollTo(0,parseInt(y));
      }

      function getscroll(form) {
        
        if(form) {        
          document.forms[form].scroll.value=getWindowYOffsetSpy();
        } else {
          document.forms[0].scroll.value=getWindowYOffsetSpy();
        }
        return 0;
      }
      
      
      
      $(document).ready( function() {
      	
      	
      	
      	$("input[class*=scroll]").bind("click", function(e) { 
      			$("input[name=scroll]").attr("value", getWindowYOffsetSpy());
      			return true;
      	})
      	
      	$("a[class*=scroll]").bind("click", function(e) { 
      			
      			var href = $(this).attr("href");
      			values = href.split('?'); 
      			
      			if(values.length == 2)	{
      				$(this).attr("href", href + "&scroll=" + getWindowYOffsetSpy());
      			}	else	{
      				$(this).attr("href", href + "?scroll=" + getWindowYOffsetSpy());
      			}
      			
      			return true;
      			
      			//$("input[name=scroll]").attr("value", getWindowYOffsetSpy());
      			//return true;
      	})
      	
      	
      });
      
      