////JAVASCRIPT by George
////for Out There Whats Different

<!--
xc=0;
puzn = 0;
cbx1 = 0;
cbx2 = 0;
cbx3 = 0;
cbx4 = 0;
cbx5 = 0;
cbx6 = 0;
ranc = 0;
messagex= "";
messagey= "<img src=\"http://www.outthere-bygeorge.com/images_2/smiley.gif\">";


loc1="http://www.outthere-bygeorge.com/OTwhatsDifferent.html";
loc2="http://www.outthere-bygeorge.com/wdpuzzles/OTwhatsDifferent_1.html";
loc3="http://www.outthere-bygeorge.com/wdpuzzles/OTwhatsDifferent_2.html";
loc4="http://www.outthere-bygeorge.com/wdpuzzles/OTwhatsDifferent_3.html";
loc5="http://www.outthere-bygeorge.com/wdpuzzles/OTwhatsDifferent_4.html";
loc6="http://www.outthere-bygeorge.com/wdpuzzles/OTwhatsDifferent_5.html";
loc100="http://www.outthere-bygeorge.com/wdpuzzles/OTwhatsDifferenthard.html";




locator = "";
hpuz = ">Here's the next puzzle</a>";

function answers(puz){
if(puz=="puz0"){document.getElementById('answerarea').innerHTML="<strong>ANSWERS<br>1.</strong> small tree missing <strong>2.</strong> elephant's knee line missing <strong>3.</strong> man's top different colour <strong>4.</strong> smoke puff missing <strong>5.</strong> extra telegraph wire <strong>6.</strong> TV aerial missing "}

if(puz=="puz1"){document.getElementById('answerarea').innerHTML="<strong>ANSWERS<br>1.</strong> painting on wall <strong>2.</strong> salt shaker <strong>3.</strong> dogs ear <strong>4.</strong> line on window <strong>5.</strong> line on glass <strong>6.</strong> fork spike"}

if(puz=="puz2"){document.getElementById('answerarea').innerHTML="<strong>ANSWERS<br>1.</strong> small butterfly missing <strong>2.</strong> steering wheel <strong>3.</strong> black line on roof <strong>4.</strong> line on mirror <strong>5.</strong> stud on headrest <strong>6.</strong> ladies earring"}

if(puz=="puz3"){document.getElementById('answerarea').innerHTML="<strong>ANSWERS<br>1.</strong> I in CRITTERS <strong>2.</strong> duck bill <strong>3.</strong> mans hair colour <strong>4.</strong> phone handle dots <strong>5.</strong> chair <strong>6.</strong> man's pocket"}

if(puz=="puz4"){document.getElementById('answerarea').innerHTML="<strong>ANSWERS<br>1.</strong> smoke puff <strong>2.</strong> wheel hub police car <strong>3.</strong> checker missing police car <strong>4.</strong> E missing police <strong>5.</strong> patch on clown arm <strong>6.</strong> arm rest"}

if(puz=="puz5"){document.getElementById('answerarea').innerHTML="<strong>ANSWERS<br>1.</strong> extra balloon <strong>2.</strong> balloon colour change <strong>3.</strong> wire on machine <strong>4.</strong> bottle on trolley <strong>5.</strong> tail on doctor's hat <strong>6.</strong> operating light colour"}

if(puz=="puz100"){document.getElementById('answerarea').innerHTML="<strong>ANSWERS<br>1.</strong> knot on left tree backwards <strong>2.</strong> man's shoe colour changed <strong>3.</strong> birds are backwards <strong>4.</strong> man has extra forehead wrinkle <strong>5.</strong> middle bush changed shape <strong>6.</strong> middle tree branch is lower"}
}
	
function locatorz(){if(puzn==1){locator=loc1+hpuz}
if(puzn==2){locator=loc2+hpuz}
if(puzn==3){locator=loc3+hpuz}
if(puzn==4){locator=loc4+hpuz}
if(puzn==5){locator=loc5+hpuz}
if(puzn==6){locator=loc6+hpuz}
if(puzn==7){locator=""}
if(puzn==100){locator=loc100+hpuz}
}

function puzx( puzn ) //****This strips out the cartoon number
{
 puzn = puzn.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
 var regexS = "[\\?&]"+puzn+"=([^&#]*)";
 var regex = new RegExp( regexS );
 var results = regex.exec( window.location.href );
 if( results == null )
  return "";
 else
    return results[1];
}

function puzsubmitted() {
//puzx_param = puzx( 'puzn' );
//imageParsed = parseInt(puzx_param);
//alert(puzx_param);

if(window.location.href==loc1 || window.location.href==loc1+"#"){puzn=2}
if(window.location.href==loc2 || window.location.href==loc2+"#"){puzn=3}
if(window.location.href==loc3 || window.location.href==loc3+"#"){puzn=4}
if(window.location.href==loc4 || window.location.href==loc4+"#"){puzn=5}
if(window.location.href==loc5 || window.location.href==loc5+"#"){puzn=6}
if(window.location.href==loc6 || window.location.href==loc6+"#"){puzn=7}
if(window.location.href==loc100 || window.location.href==loc100+"#"){puzn=100}
locatorz();
//if(parseInt(puzx_param) == 2){puzn=2;document.location.href=loc1}
//if(parseInt(puzx_param) == 3){puzn=3;document.location.href=loc2}
//if(parseInt(puzx_param) == 4){puzn=4;document.location.href=loc3}
//if(parseInt(puzx_param) == 5){puzn=5;document.location.href=loc4}
//if(parseInt(puzx_param) == 6){puzn=6;document.location.href=loc5}
//if(isNaN (imageParsed)){puzn=1}//welcomeCartoons()
}

function matched(m1){if(window.location.href==loc1){messagey ="  <strong>PASSWORD REQUIRED:-</strong> If you would like to access more What's Different puzzles - join the free email list and receive your password to the members directory";}
if(m1 == "mt01" && cbx1 == 0){document.cbox1.src="http://www.outthere-bygeorge.com/images_2/ctbox.gif";xc=xc+1;cbx1=1;ranc = 0}
if(m1 == "mt02" && cbx2 == 0){document.cbox2.src="http://www.outthere-bygeorge.com/images_2/ctbox.gif";xc=xc+1;cbx2=1;ranc = 1}
if(m1 == "mt03" && cbx3 == 0){document.cbox3.src="http://www.outthere-bygeorge.com/images_2/ctbox.gif";xc=xc+1;cbx3=1;ranc = 2}
if(m1 == "mt04" && cbx4 == 0){document.cbox4.src="http://www.outthere-bygeorge.com/images_2/ctbox.gif";xc=xc+1;cbx4=1;ranc = 3}
if(m1 == "mt05" && cbx5 == 0){document.cbox5.src="http://www.outthere-bygeorge.com/images_2/ctbox.gif";xc=xc+1;cbx5=1;ranc = 4}
if(m1 == "mt06" && cbx6 == 0){document.cbox6.src="http://www.outthere-bygeorge.com/images_2/ctbox.gif";xc=xc+1;cbx6=1;ranc = 5}

if(xc==6 && ranc == 0){messagex="<strong>Congratulations</strong> - you have a good eye for detail<br>";document.getElementById('answerarea').innerHTML=messagex+"<a href="+locator+messagey}//<img src=\"../images_2/smiley.gif\">

if(xc==6 && ranc == 1){messagex="<strong>Good One</strong> - You have a knack for spotting differences<br>";document.getElementById('answerarea').innerHTML=messagex+"<a href="+locator+messagey}//<img src=\"../images_2/smiley.gif\">

if(xc==6 && ranc == 2){messagex="<strong>Brilliant</strong> - Your sharp eye got them all<br>";document.getElementById('answerarea').innerHTML=messagex+"<a href="+locator+messagey}//<img src=\"../images_2/smiley.gif\">

if(xc==6 && ranc == 3){messagex="<strong>Legend</strong> - Did someone help you?<br>";document.getElementById('answerarea').innerHTML=messagex+"<a href="+locator+messagey}//<img src=\"../images_2/smiley.gif\">

if(xc==6 && ranc == 4){messagex="<strong>You got them all</strong> - Try a new what's different every week<br>";document.getElementById('answerarea').innerHTML=messagex+"<a href="+locator+messagey}//<img src=\"../images_2/smiley.gif\">

if(xc==6 && ranc == 5){messagex="<strong>WINNER</strong> - You spotted all the differences<br>";document.getElementById('answerarea').innerHTML=messagex+"<a href="+locator+messagey}//<img src=\"../images_2/smiley.gif\">

if(xc==6 && puzn == 100){messagex="<strong>Just to good</strong> - You have a laser sharp eye<br>";document.getElementById('answerarea').innerHTML=messagex+messagey}//<img src=\"../images_2/smiley.gif\">
}

function resettick(){document.cbox1.src="http://www.outthere-bygeorge.com/images_2/cbox.gif";document.cbox2.src="http://www.outthere-bygeorge.com/images_2/cbox.gif";document.cbox3.src="http://www.outthere-bygeorge.com/images_2/cbox.gif";document.cbox4.src="http://www.outthere-bygeorge.com/images_2/cbox.gif";document.cbox5.src="http://www.outthere-bygeorge.com/images_2/cbox.gif";cbx1=0;cbx2=0;cbx3=0;cbx4=0;cbx5=0;cbx6=0;ranc=0;document.cbox6.src="http://www.outthere-bygeorge.com/images_2/cbox.gif";xc=0;document.getElementById('answerarea').innerHTML="TRY AGAIN"}

function emailInfoII(){var new_text = "<span class=\"arial12\">If you'd like to receive Monday's cartoon hot off the drawing board? subscribe by sending your email address to otbg@outthere-bygeorge.com (use the form for convenience) - You are guaranteed that your email address will never be shared. Your Username and Password will be confirmed in your confirmation email<br><br><small>TROUBLESHOOTING - If you do not receive an email confirming your subscription within 24 hours just resubscribe using the manual email link located on the letterbox graphic<br>Some browsers do not post form requests 100% of the time</small></span><br>"; document.getElementById('answerarea').innerHTML = new_text}
//end of Shop script
//-->