////JAVASCRIPT by George
////for Out There Whats Different
<!--
coord_A1 = "0,0,0";
coord_A2 = "0,0,0";
coord_A3 = "0,0,0";
coord_A4 = "0,0,0";
coord_A5 = "0,0,0";
coord_A6 = "0,0,0";
coord_A6b = "0,0,0";

areash_A1 = "circle";
areash_A2 = "circle";
areash_A3 = "circle";
areash_A4 = "circle";
areash_A5 = "circle";
areash_A6 = "circle";
areash_A6b = "circle";


Answerspuz = "";

puzzn = 0;

locationz = "http://www.OutThere-bygeorge.com/JuniorpuzzlesGalore/JuniorOTwhatsDifferentGalore.html?puzzn=";
//locationz = "file:///Volumes/Coyote/_OutThere-bygeorge.com/puzzlesGalore/OTwhatsDifferentGalore.html?puzzn=";
function puzzx( puzzn ) //****This strips out the cartoon number
{
 puzzn = puzzn.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
 var regexS = "[\\?&]"+puzzn+"=([^&#]*)";
 var regex = new RegExp( regexS );
 var results = regex.exec( window.location.href );
 if( results == null )
  return "";
 else
    return results[1];
}


function findpuzzn(){//sets the next puzzle number hyperlink
	puzzn_param = puzzx( 'puzzn' );
imageParsed = parseInt(puzzn_param);
puzzn = imageParsed;
}

function templateZ(){
	//TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE
if(puzzn == puzzadd - 10000){document.imga1.src="pgImages/ot2xx-diff.jpg";//template
document.imga2.src="pgImages/ot2xx-diff-01.jpg";
coord_A1 = "";
coord_A2 = "";
coord_A3 = "";
coord_A4 = "";
coord_A5 = "";
coord_A6 = "";
Answerspuz = "<strong>ANSWERS<br> 1. </strong>  <strong> 2. </strong>  <strong> 3. </strong>  <strong> 4. </strong>  <strong> 5. </strong>  <strong> 6. </strong>  ";
}
//TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE-TEMPLATE
}

puzzadd = 5;//increment by one when new puzzle is added

puzanswer1 = "bird missing";
puzanswer2 = "cloud moved";
puzanswer3 = "ostriches leg missing";
puzanswer4 = "ostriches toe missing";
puzanswer5 = "rocks missing";
puzanswer6 = "bush different colour";

coorpuzz1 = "38,237,30";
coorpuzz2 = "15,171,31";
coorpuzz3 = "336,125,40";
coorpuzz4 = "171,12,54";
coorpuzz5 = "156,307,29";
coorpuzz6 = "46,37,21";
coorpuzz6b = "";

JThispuzz = "pgImages/jwdot03-350.jpg";
JThispuzz01 = "pgImages/jwdot03a-350.jpg";

function puzcounter(){findpuzzn();if(puzzn <= puzzadd - 3){puzzn = puzzn + 1};document.write("<a href="+locationz+puzzn+"> Next Puzzle</strong></a>");}//

function puzcounterX(){findpuzzn();if(puzzn >= 2){puzzn = puzzn - 1};document.write("<a href="+locationz+puzzn+"><strong>Previous Puzzle</a> - ");}

function puzzle(){//

if(puzzn == puzzadd - 3){document.imga1.src="pgImages/jwdot02-350.jpg";
document.imga2.src="pgImages/jwdot02a-350.jpg";
coord_A1 = "49,285,38";//alert("test");
coord_A2 = "265,149,31";
coord_A3 = "230,49,40";
coord_A4 = "352,204,63";
coord_A5 = "137,192,29";
coord_A6 = "27,54,30";
Answerspuz = "<strong>ANSWERS<br> 1. </strong> mans hair colour different <strong> 2. </strong> grass clump missing <strong> 3. </strong> spot on giraffe different <strong> 4. </strong> tree colour different <strong> 5. </strong> giraffes tail missing <strong> 6. </strong> cloud missing ";
}
if(puzzn == puzzadd - 2){document.imga1.src="pgImages/jwdot01-350.jpg";
document.imga2.src="pgImages/jwdot01a-350.jpg";
coord_A1 = "95,-3,38";//alert("test");
coord_A2 = "179,246,31";
coord_A3 = "199,58,70";
coord_A4 = "348,211,63";
coord_A5 = "58,162,18";
coord_A6 = "84,81,20";
Answerspuz = "<strong>ANSWERS<br> 1. </strong> pillow different colour <strong> 2. </strong> pattern missing on shell <strong> 3. </strong> alarm bell different colour <strong> 4. </strong> stripe on blanket different colour <strong> 5. </strong> painting missing <strong> 6. </strong> handle missing on drawer ";
}

if(puzzn == 1){document.imga1.src=""+ JThispuzz +"";
document.imga2.src=""+ JThispuzz01 +"";
coord_A1 = ""+coorpuzz1+"";
coord_A2 = ""+coorpuzz2+"";
coord_A3 = ""+coorpuzz3+"";
coord_A4 = ""+coorpuzz4+"";
coord_A5 = ""+coorpuzz5+"";
coord_A6 = ""+coorpuzz6+"";
coord_A6b = ""+coorpuzz6b+"";
Answerspuz = "<strong>ANSWERS<br> 1. </strong>" + puzanswer1 + "<strong> 2. </strong>" + puzanswer2 + "<strong> 3. </strong>" + puzanswer3 + "<strong> 4. </strong>" + puzanswer4 + "<strong> 5. </strong>" + puzanswer5 + "<strong> 6. </strong>" + puzanswer6 + "";
}


}

function answersmulti(){document.getElementById('answerarea').innerHTML=Answerspuz;}

function mapmake(){findpuzzn();puzzle();
	    document.write("<map name=\"Map\" id=\"Map\">");
		document.write("<area shape="+ areash_A1 +" coords="+ coord_A1 +" onclick=\"matched('mt01')\" />");
		document.write("<area shape="+ areash_A2 +" coords="+ coord_A2 +" onclick=\"matched('mt02')\" />");
		document.write("<area shape="+ areash_A3 +" coords="+ coord_A3 +" onclick=\"matched('mt03')\" />");
		document.write("<area shape="+ areash_A4 +" coords="+ coord_A4 +" onclick=\"matched('mt04')\" />");
		document.write("<area shape="+ areash_A5 +" coords="+ coord_A5 +" onclick=\"matched('mt05')\" />");
		document.write("<area shape="+ areash_A6 +" coords="+ coord_A6 +" onclick=\"matched('mt06')\" />");
		document.write("<area shape="+ areash_A6b +" coords="+ coord_A6b +" onclick=\"matched('mt06')\" />");
		document.write("</map>");}
//-->
