/***********************************************
* Gradual Highlight image script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Modified by Mauricio Marquez to fit DNN and MMLinks Module http://dnn.tiendaboliviana.com

//configure shake degree (where larger # equals greater shake)
var mml_rector=3

///////DONE EDITTING///////////
var mml_stopit=0
var mml_a=1

function mml_init(which){
mml_stopit=0
mml_shake=which
mml_shake.style.position= 'relative'
mml_shake.style.left=0
mml_shake.style.top=0
mml_cleartimer()
}

function mml_cleartimer(){
if (window.mml_oldshake) clearInterval(mml_oldshake)
}

function mml_rattleimage(){

if ((!document.all&&!document.getElementById)||mml_stopit==1)
return
if (mml_a==1){
mml_shake.style.top=parseInt(mml_shake.style.top)+mml_rector
}
else if (mml_a==2){
mml_shake.style.left=parseInt(mml_shake.style.left)+mml_rector
}
else if (mml_a==3){
mml_shake.style.top=parseInt(mml_shake.style.top)-mml_rector
}
else{
mml_shake.style.left=parseInt(mml_shake.style.left)-mml_rector
}
if (mml_a<4)
mml_a++
else
mml_a=1
mml_oldshake=setTimeout("mml_rattleimage()",50)
}

function mml_stoprattle(which){
mml_stopit=1
which.style.left=0
which.style.top=0
which.style.position= 'static'
}
