<!DOCTYPE html>
<html>
<head>
<title>DAD, PUT ME IN THE GAME</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div data-role="page">
<div data-role="header" data-theme="a">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6908679240944495";
/* MobileBanner320by50 */
google_ad_slot = "7580604750";
google_ad_width = 320;
google_ad_height = 50;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<div data-role="navbar" data-theme="c">
<ul>
<li><a href="index.html" rel="external" data-transition="slideup" data-prefetch>Home</a></li>
<li><a href="Library.html" rel="external" data-transition="slidedown" data-prefetch>Library</a></li>
<li><a href="Games.html" rel="external" data-transition="pop" data-prefetch>Games</a></li>
<li><a href="http://astore.amazon.com/ksfsdnfl-20" rel="external" data-transition="pop" data-prefetch>Store</a></li>
</ul>
</div><!-- /navbar-->
</div><!-- /header -->
<div id="content" data-role="content">
<!-- STORY SECTION -->
<p id="pStory" />
<br/>
<div>
<img src="http://bsccart.appspot.com/Sports/img/Football/BlankSM.png" width="200" height="200" id="imgStory" />
</div><br/>
<a href="#" onclick="javascript:runStory(0)" >PREVIOUS</a>
<a href="#" onclick="javascript:runStory(1)" >NEXT</a>
<div id="footer"><center>
<img src="img/bannerSM.jpg" /><br/>
© Apps4Canadians
</center>
<br>
<center><a href="index.html" rel="external" data-transition="slideup" data-prefetch>| Home </a> |<a href="mailto:apps4canadians@live.com"> Contact |</a> </center>
</div><!-- /footer -->
<!--</div><!-- /content -->
</div><!-- /page -->
</body>
<script type="text/javascript">
//global variables to track the order
var loc1 = localStorage.getItem("A4CCustom0");
var loc2 = localStorage.getItem("A4CCustom1");
var loc3 = localStorage.getItem("A4CCustom2");
var loc4 = localStorage.getItem("A4CCustom3");
var loc5 = localStorage.getItem("A4CCustom4");
var loc6 = localStorage.getItem("A4CCustom5");
var loc7 = localStorage.getItem("A4CCustom6");
var loc8 = localStorage.getItem("A4CCustom7");
var loc9 = localStorage.getItem("A4CCustom8");
var loc10 = localStorage.getItem("A4CCustom9");
var loc11 = localStorage.getItem("A4CCustom10");
var myHealth = "A4CHealth";
var _myHealth = localStorage.getItem(myHealth);
var _storyText = "";
var imgSrc;
var storyPos = 0;
runStory(1);
//show only the selected story div
//this code will be in the new page running the story and will use localstorage values
function runStory(direction){
if (loc1 != null && loc2 != null && loc3 != null && loc4 != null && loc5 != null && loc6 != null & loc7 != null && loc8 != null && loc9 != null && loc10 != null){
var opt1_A = "1a";
var opt1_B = "1b";
var opt1_C = "1c";
var opt2_A = "2a";
var opt2_B = "2b";
var opt2_C = "2c";
var opt3_A = "3a";
var opt3_B = "3b";
var opt3_C = "3c";
var storyRange = _myHealth;
var storyId = 1;
switch(storyId){
case 1:
if (storyPos == 0){
if (storyRange > 0 && storyRange < 19){
_storyText = "A1";
storyPos = 1;
}
else if (storyRange > 20 && storyRange < 39){
_storyText = "A2";
storyPos = 1;
}
else if (storyRange > 40 && storyRange < 59){
_storyText = "A3";
storyPos = 1;
}
else{
_storyText ="1 error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc1 + ".jpg";
}
else if (storyPos == 1){
if (storyRange > 0 && storyRange < 19){
if (direction == 1){
_storyText = "B1";
storyPos = 2;
}
else{
_storyText = "A1";
storyPos = 0;
}
}
else if (storyRange > 20 && storyRange < 39){
if (direction == 1){
_storyText = "B2";
storyPos = 2;
}
else{
_storyText = "A2";
storyPos = 0;
}
}
else if (storyRange > 40 && storyRange < 59){
if (direction == 1){
_storyText = "B3";
storyPos = 2;
}
else{
_storyText = "A3";
storyPos = 0;
}
}
else{
_storyText ="2 error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc2 + ".jpg";
}
else if (storyPos == 2){
if (storyRange > 0 && storyRange < 19){
if (direction == 1){
_storyText = "C1";
storyPos = 3;
}
else{
_storyText = "B1";
storyPos = 1;
}
}
else if (storyRange > 20 && storyRange < 39){
if (direction == 1){
_storyText = "C2";
storyPos = 3;
}
else{
_storyText = "B2";
storyPos = 1;
}
}
else if (storyRange > 40 && storyRange < 59){
if (direction == 1){
_storyText = "C3";
storyPos = 3;
}
else{
_storyText = "B3";
storyPos = 1;
}
}
else{
_storyText ="3 error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc3 + ".jpg";
}
else if (storyPos == 3){
if (storyRange > 0 && storyRange < 19){
if (direction == 1){
_storyText = "D3";
storyPos = 3;
}
else{
_storyText = "C3";
storyPos = 1;
}
}
else if (storyRange > 20 && storyRange < 39){
if (direction == 1){
_storyText = "D3";
storyPos = 3;
}
else{
_storyText = "C3";
storyPos = 1;
}
}
else if (storyRange > 40 && storyRange < 59){
if (direction == 1){
_storyText = "D3";
storyPos = 3;
}
else{
_storyText = "C3";
storyPos = 1;
}
}
else{
_storyText ="4 error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc4 + ".jpg";
}
else if (storyPos == 4){
if (storyRange > 0 && storyRange < 19){
if (direction == 1){
_storyText = "E3";
storyPos = 3;
}
else{
_storyText = "D3";
storyPos = 1;
}
}
else if (storyRange > 20 && storyRange < 39){
if (direction == 1){
_storyText = "E3";
storyPos = 3;
}
else{
_storyText = "D3";
storyPos = 1;
}
}
else if (storyRange > 40 && storyRange < 59){
if (direction == 1){
_storyText = "E3";
storyPos = 3;
}
else{
_storyText = "D3";
storyPos = 1;
}
}
else{
_storyText ="5 error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc5 + ".jpg";
}
else if (storyPos == 5){
if (storyRange > 0 && storyRange < 19){
_storyText = opt2_A;
}
else if (storyRange > 20 && storyRange < 39){
_storyText = opt2_B;
}
else if (storyRange > 40 && storyRange < 59){
_storyText = opt2_C;
}
else{
_storyText ="error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc6 + ".jpg";
}
else if (storyPos == 6){
if (storyRange > 0 && storyRange < 19){
_storyText = opt2_A;
}
else if (storyRange > 20 && storyRange < 39){
_storyText = opt2_B;
}
else if (storyRange > 40 && storyRange < 59){
_storyText = opt2_C;
}
else{
_storyText ="error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc7 + ".jpg";
}
else if (storyPos == 7){
if (storyRange > 0 && storyRange < 19){
_storyText = opt2_A;
}
else if (storyRange > 20 && storyRange < 39){
_storyText = opt2_B;
}
else if (storyRange > 40 && storyRange < 59){
_storyText = opt2_C;
}
else{
_storyText ="error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc8 + ".jpg";
}
else if (storyPos == 8){
if (storyRange > 0 && storyRange < 19){
_storyText = opt2_A;
}
else if (storyRange > 20 && storyRange < 39){
_storyText = opt2_B;
}
else if (storyRange > 40 && storyRange < 59){
_storyText = opt2_C;
}
else{
_storyText ="error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc9 + ".jpg";
}
else if (storyPos == 9){
if (storyRange > 0 && storyRange < 19){
_storyText = opt2_A;
}
else if (storyRange > 20 && storyRange < 39){
_storyText = opt2_B;
}
else if (storyRange > 40 && storyRange < 59){
_storyText = opt2_C;
}
else{
_storyText ="error";
}
imgSrc = "http://bsccart.appspot.com/Sports/img/Basketball/Stories/" + loc10 + ".jpg";
}
else{
_storyText ="storyposerror";
}
break;
case 2:
if (storyPos == 1){
if (storyRange > 0 && storyRange < 19){
_storyText = "case2"+ opt1_A;
}
else if (storyRange > 20 && storyRange < 39){
_storyText = "case2"+opt1_B;
}
else if (storyRange > 40 && storyRange < 59){
_storyText = "case2"+opt1_C;
}
else{
_storyText ="case2error";
}
}
break;
case 3:
if (storyPos == 2){
if (storyRange > 0 && storyRange < 19){
_storyText = opt1_A;
}
else if (storyRange > 20 && storyRange < 39){
_storyText = opt1_B;
}
else if (storyRange > 40 && storyRange < 59){
_storyText = opt1_C;
}
else{
_storyText ="case3error";
}
}
break;
default:
_storyText ="switcherror";
}
//alert('storytext' + _storyText);
document.getElementById("pStory").innerHTML = _storyText;
document.getElementById("imgStory").src = imgSrc;
} //end != null if statement
}
</script>
</html>