// v1.0
// Change The World scripts
// Copyright 2009-2010 Ben Baudart.  All rights reserved.

function shakeHorizontal(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
	parent.moveBy(i,0);
	parent.moveBy(-i,0);
         }
      }
   }
}

function shakeVertical(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
	parent.moveBy(0,i);
	parent.moveBy(0,-i);
         }
      }
   }
}

function shake(n) {
x = n;
if(window.devicePixelRatio) {x = n*30};
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = x; j > 0; j--) {
	parent.moveBy(0,i);
	parent.moveBy(i,0);
	parent.moveBy(0,-i);
	parent.moveBy(-i,0);
         }
      }
   }

}

// Copyright 2001 by www.CodeBelly.com
// Please do *not* remove this notice.

var backColor = new Array(); // don't change this

// Enter the colors you wish to use.  Follow the
// pattern to use more colors.  The number in the
// brackets [] is the number you will use in the
// function call to pick each color.

backColor[0] = '#FF0000';
backColor[1] = '#00FF00';
backColor[2] = '#0000FF';
backColor[3] = '#FFFFFF';

// Do not edit below this line.
//-----------------------------

function changeBG(whichColor){
document.bgColor = backColor[whichColor];
}
