var last = '0_0';
var hash = new Array();

hash["profilo"] = new Array(0,0);
hash["competenze"] = new Array(1000,344);
hash["metodologia"] = new Array(0,806);
hash["database"] = new Array(1310,1296);
hash["curriculum"] = new Array(0,1700);
hash["faq"] = new Array(1260,2200);
hash["contatti"] = new Array(0,2636);

function init()
{
	move_mc = getEl('move');
	ease_x = new Tween(move_mc.style,'left',Tween.regularEaseOut,0,0,0,'px');
	ease_y = new Tween(move_mc.style,'top', Tween.regularEaseOut,0,0,0,'px');
	dove = self.document.location.hash.substring(4);
	if (dove.length > 0) goTo(hash[dove][0],hash[dove][1]);
	ease_x.onMotionChanged = function() { self.scrollTo(parseInt(move_mc.style.left),parseInt(move_mc.style.top)) };	
};

function getEl(psID) {
   if (document.all)
   {
      return document.all[psID];
   } else {
      return document.getElementById(psID);
   }
} 
function goTo(x,y)
{
 var check = x+'_'+y;
 if (check == last) return;
 ease_x.continueTo(x,1);
 ease_y.continueTo(y,1);
 last = check;
}

