<script>
var t;
function _w_up() {
var top = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
if(top > 0) {
window.scrollBy(0,-50);
t = setTimeout('_w_up()',2);
} else clearTimeout(t);
return false;
}
</script>
<style type="text/css">
.btnUp {
position: fixed;
right: 40;
bottom: 0;
padding: 10px;
background: 1 solid #000;
background-color: #eeeeee;
color: #000;
min-width: 20px;
}
</style>
<style>
#__goUp {
background-image: url(/scrollUp/action/png/goUp);
background-color:transparent;
width:50px;
height:12px;
}
</style>
<a onclick="_w_up();"><div id="__goUp" class="btnUp" style="visibility:hidden">@@UP@@</div></a>
<script>
window.onscroll = function(){
document.getElementById('__goUp').style.visibility = (window.pageYOffset > 0 ? '' : 'hidden');
}
</script>
function getXMLHttp()
{
var xmlHttp
try
{
//Firefox, Opera 8.0+, Safari
xmlHttp = new XMLHttpRequest();
}catch(e){
//Internet Explorer
try{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){
alert("Your browser does not support AJAX!")
return false;
}
}
}
return xmlHttp;
}
function MakeRequest(action, id)
{
lastAction = action;//alert(action + ' ' + id);
state = '';
divMakeReq = document.getElementById('makereq');
divMakeReq.innerHTML = 'Action:' + action +'; id:' + id;
divError = document.getElementById('err');
divError.innerHTML = '';
var xmlHttp = getXMLHttp();
xmlHttp.onreadystatechange = function()
{
if(xmlHttp.readyState == 4)
{
if (xmlHttp.responseXML != null)
HandleResponse(action, id, xmlHttp.responseXML);
}
}
xmlHttp.open("GET", aLink+ "/action/"+action+"/"+id, true);
xmlHttp.send(null);
}