/*
Shake image script (onMouseover)- 
ฉ Dynamic Drive (www.freesplans.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://freesplans.com
*/

//configure shake degree (where larger # equals greater shake)
var rector=2 /* swing size*/

///////DONE EDITTING///////////
var stopit=0 
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector
}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",30) /*ramdom speed*/
}

function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}

function infoscroll(seed,looped)
{
  var text1  = "FreeSplanS Design solution, Inc.";
  var text2  = "[ Contact ] e-mail : webmaster@freesplans.com";        
  var msg=text1+text2;
  var putout = " ";
  var c   = 1;

  if (looped > 1) 
  {  window.status="Welcome to freesplans.com -I ศูนย์รวมแบบบ้าน และ ตกแต่งหลากหลายสไตล์ -I Best viewed with 800x600 I-";  }
  else if (seed > 100) 
  {
     seed--;
     var cmd="infoscroll(" + seed + "," + looped + ")";
     timerTwo=window.setTimeout(cmd,100);
  }
  else if (seed <= 100 && seed > 0) 
  {
    for (c=0 ; c < seed ; c++) 
    {  putout+=" ";  }
    putout+=msg.substring(0,150-seed);	
    seed--;
    var cmd="infoscroll(" + seed + "," + looped + ")";
    window.status=putout;
    timerTwo=window.setTimeout(cmd,100);
  }
  else if (seed <= 0) 
  {
    if (-seed < msg.length) 
    {
      putout+=msg.substring(-seed,msg.length);
      seed--;
      var cmd="infoscroll(" + seed + "," + looped + ")";
      window.status=putout;
      timerTwo=window.setTimeout(cmd,100); // 100
    }
    else 
    {
      window.status=" ";
      looped += 1;
      var cmd = "infoscroll(100," + looped + ")";
      timerTwo=window.setTimeout(cmd,75); // 75
    }
  }
}


function click() {
if (event.button==2) {window.external.addFavorite('http://www.freesplans.com',' | - F r e e S P l a n S . c o m - | ')}}
document.onmousedown=click

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
// -->

<!--
infoscroll(100,1)
// -->
