s=0;
i=1;

window.onload = init;

function init() {

document.getElementById("main").onmousedown = function shot (Ereignis) {
  if (!Ereignis)
    Ereignis = window.event;
  s++;
  if (s==1) {
      document.getElementById("decal" + i).style.left  = Ereignis.clientX - 10 + "px";
      document.getElementById("decal" + i).style.top = Ereignis.clientY - 9 + "px";
      if (i==20) {
        i=0;
      }
      i++;
      sendEvent('jstest','stop');
      sendEvent('jstest','playpause');
  }
  s=0;
}

document.getElementById("nosh_seminex").onmousedown = start;
document.getElementById("nosh_funkraum").onmousedown = shot2;
document.getElementById("nosh_kaserne").onmousedown = shot2;
document.getElementById("nosh_kriegsbericht").onmousedown = shot2;
document.getElementById("nosh_feldpost").onmousedown = shot2;
document.getElementById("nosh_schlachtfeld").onmousedown = shot2;  
document.getElementById("blub").onmousedown = shot2;

function shot2() {
  s++;
  document.getElementById("content").style.display = "block";
}

function start() {
  s++;
  document.getElementById("content").style.display = "none";
}

document.getElementById("decal1").onmousedown=shot3;
document.getElementById("decal2").onmousedown=shot3;
document.getElementById("decal3").onmousedown=shot3;
document.getElementById("decal4").onmousedown=shot3;
document.getElementById("decal5").onmousedown=shot3;
document.getElementById("decal6").onmousedown=shot3;
document.getElementById("decal7").onmousedown=shot3;
document.getElementById("decal8").onmousedown=shot3;
document.getElementById("decal9").onmousedown=shot3;
document.getElementById("decal10").onmousedown=shot3;
document.getElementById("decal11").onmousedown=shot3;
document.getElementById("decal12").onmousedown=shot3;
document.getElementById("decal13").onmousedown=shot3;
document.getElementById("decal14").onmousedown=shot3;
document.getElementById("decal15").onmousedown=shot3;
document.getElementById("decal16").onmousedown=shot3;
document.getElementById("decal17").onmousedown=shot3;
document.getElementById("decal18").onmousedown=shot3;
document.getElementById("decal19").onmousedown=shot3;
document.getElementById("decal20").onmousedown=shot3;
}

function shot3(e) {
  s++;
  var xPos    =  e? e.pageX : window.event.x;
  var yPos    =  e? e.pageY : window.event.y;
  if (s==1) {
      document.getElementById("decal" + i).style.left  = xPos - 9 + "px";
      document.getElementById("decal" + i).style.top = yPos - 9 + "px";
      if (i==20) {
        i=0;
      }
      i++;
      sendEvent('jstest','stop');
      sendEvent('jstest','playpause');
  }
  s=0;
}

function sendEvent(swf,typ,prm) {
  thisMovie(swf).sendEvent(typ,prm);
}

function getUpdate(typ,pr1,pr2,swf) {};

function thisMovie(swf) {
  if(navigator.appName.indexOf("Microsoft") != -1) {
    return window[swf];
  } else {
    return document[swf];
  }
}

