// Copyright 2004  wheresOsama.org -- All rights reserved.// Global variablesvar xMousePos = 0;var yMousePos = 0;var xMousePosMax = 0; // Width of the pagevar yMousePosMax = 0; // Height of the pagevar yOff = -12;var xOff = -12;var divsArr=new Array();var timeOutArr=new Array();var targetCount=0;var topLeftY = 35;var topLeftX = 69;var range=4;var xImgOff = Math.ceil(Math.random()*(range-1));var yImgOff = Math.ceil(Math.random()*(range-1));var adjuster = .0672448;var isInit = false;var dSamy;var numPages=0;function captureMousePosition(e) {    if (document.all) {        xMousePos = window.event.x+document.body.scrollLeft;        yMousePos = window.event.y+document.body.scrollTop;        xMousePosMax = document.body.clientWidth+document.body.scrollLeft;        yMousePosMax = document.body.clientHeight+document.body.scrollTop;    } else if (document.getElementById) {        xMousePos = e.pageX;        yMousePos = e.pageY;        xMousePosMax = window.innerWidth+window.pageXOffset;        yMousePosMax = window.innerHeight+window.pageYOffset;    }//    window.status = "xMousePos=" + xMousePos + ", yMousePos=" + yMousePos + ", xMousePosMax=" + xMousePosMax + ", yMousePosMax=" + yMousePosMax;    var displayX = topLeftX + (xMousePos * .0001653);    var displayY = topLeftY - (yMousePos * .0001653);    if ( (displayX > 0) && (displayY > 0)) {      document.pos.xpos.value =  displayX;      document.pos.ypos.value =  displayY;    }}function placeTarget() {   var ddiv = document.createElement("DIV");   ddiv.className="target";   ddiv.style.left = xMousePos+xOff;   ddiv.style.top = yMousePos+yOff;   ddiv.innerHTML = '<img src="images/targetBig.gif">';   document.body.appendChild(ddiv);   divsArr[targetCount++]=ddiv;   targetInfo();}function clearTargets() {  while (targetCount>0) {    targetCount--;    document.body.removeChild(divsArr[targetCount]);  }  dStrike.innerHTML = "";  dStrike.className = null;  clearTimeout(timeOutArr[numPages]);}function panN() { load(0,-1);}function panE() { load(1,0);}function panW() { load(-1,0);}function panS() { load(0,1);}function checkTargets() { return isInit;}function allowChange(x,y) { if ((Math.abs(x) > 15) || (Math.abs(y) > 15)) {   return false; } else { return true; }}function load(dx,dy) { // check to see if load allowed if (checkTargets()==false) {   return; } if (allowChange(xImgOff + dx,yImgOff+dy)==false) {   return; } xImgOff = xImgOff + dx; yImgOff = yImgOff + dy; topLeftY = topLeftY -  adjuster*dy; topLeftX = topLeftX + adjuster*dx; document.pos.xpos.value =  ""; document.pos.ypos.value =  ""; loadImage();}function loadImage() { clearTargets(); dSat.innerHTML = '<div id="samy" style="position:absolute;top:' + (Math.ceil(Math.random()*(360))+163) + 'px; visibility: hidden;"><div style="position: relative; left:' + (Math.ceil(Math.random()*(360))+20) + 'px;"><img src="images/samy2.gif"></div></div><div id="welcome" style="position:absolute; top:275px;z-index:3; visibility: hidden;"><div style="position: relative; left: 18px; text-align:center; background: white; padding: 10px;filter: alpha(opacity=90); -moz-opacity: .90; width: 360px;"><span style="font-size:10pt;color:red;font-weight:bold;">Click on any human signs on this satellite photo, then order an attack.  If you don\'t see anything, you can change locations.</span><br><br><span class="smallBtn" style="filter: alpha(opacity=100); -moz-opacity: 1; height: 12px;"><a href="javascript:hideWelc();" class="menuLinkBar">Okay</a></span></div></div><img src="images/sat/' + (( (xImgOff % (range + 1)) + range + 1) % (range + 1)) + "-" + (( (yImgOff % (range + 1)) + range + 1) % (range + 1)) + '.jpg" id="satellite" height=400 width=400 onmousemove = "javacript:captureMousePosition(event);" onmouseup = "javascript:placeTarget();">'; dSamy=document.getElementById("samy"); dWelc=document.getElementById("welcome"); numPages++; timeOutArr[numPages]= setTimeout("flash()",2000/numPages + 5000); if (numPages == 1) {   dWelc.style.visibility="visible"; }  }function showSam() { dSamy.style.visibility="visible";}function hideSam() { dSamy.style.visibility="hidden";}function hideWelc() { dWelc.style.visibility="hidden";}function flash() { if (Math.random()*numPages>4) {   showSam(); } setTimeout("hideSam()",350);}function init() { isInit = true; load(0,0);}function targetInfo() {	dStrike.className="infoBox";	dStrike.innerHTML = 'You have selected ' + targetCount + ' target(s) in this area. You must <b>confirm your target</b> before leaving this area or the target(s) will be cancelled.<br><br> Since all armed service members in this region have been transfered to Iraq, your strikes will be carried out with Tomahawk missiles.<br><br><span class="smallBtn"><a href="javascript:void confirmInit(1);" class="menuLinkBar">Confirm Targets</a></span>&nbsp;&nbsp;<br><br><span class="smallBtn"><a href="javascript:void clearTargets();" class="menuLinkBar">Clear Targets&nbsp;&nbsp;&nbsp;&nbsp;</a></span>';}function confirmInit(n) {	dStrike.className="wait";	dStrike.style.backgroundColor="F0F0FF";	dStrike.className="infoBox";	dStrike.innerHTML = 'Your target selections are being submitted to be our server.  Please be patient. <br><br><img src="images/wait.gif">';	setTimeout("confirmComplete()",2100+n*440);}function confirmComplete() {	cost = targetCount * 1.9;	clearTargets();	dStrike.className="infoBox";	dStrike.innerHTML = 'Thank you for helping America.<br><br>Your target selections have successfully been submitted to our server. <br><br> This attack  will cost the taxpayers $' + cost + ' million if accepted.<br><br>  You can view another photo by clicking on North, East, South, or West.';}