/***************************** SHAKE IT *****************************************/



var halt=0;
var id;
var a=1;

function init(obj){
  halt=0;
  shake=obj;
  shake.style.left='0px';
  shake.style.top='0px';
}

function shakeit(){

if (halt==1){
  clearTimeout(id);
  return;
}

if (a==1){
 //shake.style.top=parseInt(shake.style.top)+4;
 shake.style.top = '1px';
} else if (a==2){
 // shake.style.left=parseInt(shake.style.left)+4;
 shake.style.left = '3px';
} else if (a==3){
 // shake.style.top=parseInt(shake.style.top)-4;
 shake.style.top = '-1px';
} else {
 // shake.style.left=parseInt(shake.style.left)-4;
 shake.style.left = '-3px';
}

if (a<4)
 a++;
else
 a=1;

  id = setTimeout("shakeit()",50);
}

function stop_shakeit(obj){
  halt=1;
  obj.style.left=0;
  obj.style.top=0;
}

