document.posx = 0;
$(document).ready(function(){
  resizew(true);
  $(document).bind("contextmenu",function(e){
		if(document.posx>0){								  
			var xx = document.posx-600;
			if(xx<600){xx=0;}
			scrollToX(xx);
		}
        return false;
   });
});
$(window).resize(function(){
  resizew(true);
});
function resizew(animated){
	var h = $(window).height();
	var divh = Math.floor((h-550)/2);
	if (divh<0){divh=0;}
	if (animated){$("#spacer").animate({'height':divh},1000);}else{$("#spacer").height(divh);}
}
function scrollBack(){$('html,body').animate({scrollLeft:0},2500);}
function scrollToX(x){$('html,body').animate({scrollLeft:x},1000);document.posx=x;}
