//Castigo.s
//Javascript file for Art Gallery
//This provides copyright protection by overriding the right-click button
//Only works for Explorer


document.onmousedown=click
var times=0;

function click() {
	if ((event.button==2) || (event.button==3)) {
		if (times>=3) { 
			shake(); }
		if (times==0) {
			alert("Please do not pirate my art."); }
		if (times==1) {
			alert("Por favor no pirate mi arte."); }
		if (times==2) {
			alert("I've warned you in 2 languages."); }
		times++; 
	} 
}

function castigo() {
	alert("La Ley de Herodes:" + "\no te chingas o te jodes.");
	castigo();
}
function shake() {
var x=3;
var y=3;
var duration=20;
  if (parent.moveBy) {
    for (i = 10; i > 0; i--) {
      for (j = duration; j > 0; j--) {
        self.moveBy(0,y);
        self.moveBy(x,0);
        self.moveBy(0,-y);
        self.moveBy(-x,0);
         }
      }
   }
  castigo();
}
