// JavaScript Document SetChildrenView.js

var format;
var z1, v1, w1, h1, l1, t1;
var z2, v2, w2, h2, l2, t2;
var z3, v3, w3, h3, l3, t3;
var z4, v4, w4, h4, l4, t4;
var z5, v5, w5, h5, l5, t5;
var z6, v6, w6, h6, l6, t6;
var obj; 
var frn=0,idx=0,format=0;


function setChildrenView(fr) 
{

	frn = ffn + fr
	
	//alert("Help0: " + "frame= " + fr );
	
	switch (frn) {
	  case 0:
		   format = 1; idx=0;  // 1P 600x450 centered  Packer Room
		   break;
	  case 1:
		   format = 2; idx=1;  // 1P Left 300x450 2L Right 300x225 - Bear&Tree
		   break;
	  case 2:
		   format = 1; idx=4;  // 1L 600x450 centered  Birdhouse
		   break;
	  case 3: 
		   format = 2; idx=5;  // 1P Left 300x450 2L Right 300x225 Cats
		   break;
	  case 4:
		   format = 2; idx=8;  // 1P Left 300x450 2L Right 300x225 Cats
		   break;
	  case 5:
		   format = 3; idx=11;  // 2P 300x450 Left/Right 2 Column ForestAnimals
		   break;
	  case 6: 
		   format = 4; idx=13; //  2L 450x300 TopLeft/BotRight Offset ForestAnimals
		   break;
	  case 7: 
		   format = 5; idx=15; // 2L Top 310x230 3P Lower 210x300 Gracie Castle & Coach
		   break;
	  case 8: 
		   format = 1; idx=20; // 1L 600x450 Horse & Field
		   break;
	  case 9: 
		   format = 1; idx=21; // 1L 600x450 Nemo
		   break;
	  case 10: 
		   format = 5; idx=22; // 2L Top 310x230 3P Lower 210x300 Nemo
		   break;	   
      case 11: 
		   format = 2; idx=27; // 1P Left 300x450 2L Right 300x225 Nemo
		   break;	   	   
      case 12: 
		   format = 1; idx=30; // 1L 600x450 Base Ball 
		   break;	   	   
      case 13: 
		   format = 1; idx=31; // 1L 600x450 Puppies
		   break;	   	   
      case 14: 
		   format = 5; idx=32; // 2L Top 310x230 3P Lower 210x300 Puppies
		   break;	   	   
      case 15: 
		   format = 1; idx=37; // 1L 600x450 Puppies
		   break;	   	   
      case 16: 
		   format = 1; idx=38; // 1L 600x450 Sound Of Music
		   break;	   	   
      case 17: 
		   format = 6; idx=39; // 2L 450x300 TopLeft/BotRight Offset Superman
		   break;	   	   
      case 18: 
		   format = 7; idx=41; // Top 3P 200x300 Bottom 3P 200x150 Tree Corner
		   break;	   	   	
  	  case 19: 
		   format = 33; idx=99; // Bible Stories with Page Link 
		   break;	   	  
		   
	}
    
	//Description 
	document.getElementById("label1").innerHTML = DescText[frn];
	
    //alert("Help1: " + "format= " + format + "   idx= " + idx + " imgs(idx)= " + imgs[idx] + " ffn= " +ffn);


//Parameter Settings
  if (format==1) {         // 1L 600x450 centered - Baseball
       z1="11"; v1="True"; w1="600px"; h1="450px"; l1="10px";  t1="60px";
	   v2="false";v3="false";v4="false"; v5="false"; v6="false";
	   
  } else if (format==2) {  // 1P Left 300x450 2L Right 300x225 - Bear&Tree
       z1="11"; v1="True"; w1="300px"; h1="450px"; l1="10px"; t1="100px";
	   z2="12"; v2="True"; w2="300px"; h2="225px"; l2="320px"; t2="70px";
	   z3="13"; v3="True"; w3="300px"; h3="225px"; l3="320px"; t3="320px";
       v4="false"; v5="false"; v6="false";
  
  } else if (format==3) {   //  2L 300x450 centered   Forest Animals
       z1="11"; v1="True"; w1="300px"; h1="450px"; l1="10px";  t1="60px";
	   z2="12"; v2="True"; w2="300px"; h2="450px"; l2="320px"; t2="60px";	   	   
	   v3="false";v4="false"; v5="false"; v6="false";
		   
  } else if (format==4) {   // 2L 450x300 Left/Right Offset Forest Animals
       z1="11"; v1="True"; w1="450px"; h1="300px"; l1="10px"; t1="60px";
	   z2="12"; v2="True"; w2="450px"; h2="300px"; l2="220px";t2="370px";	   	   
       v3="false";v4="false";v5="false";v6="false"; 
	   
  } else if (format==5) {   //  2L Top 310x230 3P Lower 210x300 
       z1="11"; v1="True"; w1="310px"; h1="230px"; l1="10px";  t1="60px";
	   z2="12"; v2="True"; w2="310px"; h2="230px"; l2="330px"; t2="60px";
	   z3="13"; v3="True"; w3="210px"; h3="300px"; l3="0px";  t3="300px";
	   z4="14"; v4="True"; w4="210px"; h4="300px"; l4="220px"; t4="300px";
	   z5="15"; v5="True"; w5="210px"; h5="300px"; l5="440px"; t5="300px";
       v6="false";


  } else if (format==6) {   // Top 3P 200x300 Bottom 3P 200x150 Tree Corner
       z1="11"; v1="True"; w1="310px"; h1="230px"; l1="10px";  t1="60px";
	   z2="12"; v2="True"; w2="310px"; h2="230px"; l2="330px"; t2="60px";
	   v3="false";v4="false"; v5="false"; v6="false";
		   
  } else if (format==7) {   // Top 3P 200x300 Bottom 3P 200x150 Tree Corner
       z1="11"; v1="True"; w1="200px"; h1="266px"; l1="10px";  t1="60px";
	   z2="12"; v2="True"; w2="200px"; h2="266px"; l2="220px"; t2="60px";
	   z3="13"; v3="True"; w3="200px"; h3="266px"; l3="430px"; t3="60px";
	   z4="14"; v4="True"; w4="200px"; h4="150px"; l4="10px";  t4="340px";
	   z5="15"; v5="True"; w5="200px"; h5="150px"; l5="220px"; t5="340px";
	   z6="16"; v6="True"; w6="200px"; h6="150px"; l6="430px"; t6="340px";
	   
  } else if (format==8) {   // NOT USED 
       z1="11"; v1="True"; w1="600px"; h1="450px"; l1="10px"; t1="60px";
       z2="12"; v2="True"; w2="600px"; h2="600px"; l2="10px"; t2="520px";
       v3="false"; v4="false"; v5="false"; v6="false";	   	   
	   
  } else if (format==9) {   // NOT USED 
       z1="11"; v1="True"; w1="300px"; h1="450px"; l1="10px"; t1="100px";
	   z2="12"; v2="True"; w2="300px"; h2="200px"; l2="320px"; t2="100px";
	   z3="13"; v3="True"; w3="300px"; h3="200px"; l3="320px"; t3="350px";	   
       v4="false"; v5="false"; v6="false";	   	   	  
	   
  } else if (format==10) {   // NOT USED Tiled Kitchen
       z1="11"; v1="True"; w1="300px"; h1="225px"; l1="10px";  t1="60px";
	   z2="12"; v2="True"; w2="300px"; h2="225px"; l2="330px"; t2="60px";
	   z3="13"; v3="True"; w3="200px"; h3="267px"; l3="10px";  t3="295px";
	   z4="14"; v4="True"; w4="200px"; h4="267px"; l4="220px"; t4="295px";
	   z5="15"; v5="True"; w5="200px"; h5="267px"; l5="430px"; t5="295px";
       v6="false";
       
  } else {     // Reset - Reload   	  
	  v1="false"; v2="false";v3="false"; v4="false"; v5="false"; v6="false";
	  location.href="Bible-Murals.html";
  }

//Content  Overflow: scroll/hidden
    obj = document.getElementById('content');
	obj = obj.style;
    if (format=="99") 
	{
		obj.overflowY = "scroll";
	} else {
		obj.overflow = "hidden";
	}

//apDiv1	
	obj = document.getElementById('apDiv1');
	obj = obj.style;
	if (v1=="True")
	{
		obj.visibility = "visible";
		obj.zIndex = z1;
		obj.width = w1; 
		obj.height =h1 ;
		obj.left = l1; 
		obj.top = t1;		
	
        //alert("Help1 imgs(idx)=" + imgs[idx]) 
	    document.images.pic1.src =  imgs[idx];
		document.images.pic1.alt =  imgs[idx];
		  
	} else {
	   obj.visibility = "hidden";
	}
		
//apDiv2		
	obj = document.getElementById('apDiv2');
	obj = obj.style;
	if (v2=="True")
	{
   		obj.visibility = "visible";
		obj.zIndex = z2;	
		obj.width = w2; 
		obj.height = h2;
		obj.left = l2; 
		obj.top = t2;

		++idx;
		//alert("Help2 imgs(idx)=" + imgs[idx]);  
		document.images.pic2.src =  imgs[idx];
		document.images.pic2.alt =  imgs[idx];
		
	} else {
	   obj.visibility = "hidden";
	}
	
//apDiv3		
	obj = document.getElementById('apDiv3');
	obj = obj.style;
	if (v3=="True")
	{
	    obj.zIndex = z3;	
		obj.visibility = "visible";
		obj.width = w3; 
		obj.height =h3;
		obj.left = l3; 
		obj.top = t3;	
		
		++idx;
		document.images.pic3.src =  imgs[idx];		
		document.images.pic3.alt =  imgs[idx];
		
    } else {
	   obj.visibility = "hidden";
	}
	
//apDiv4		
	obj = document.getElementById('apDiv4');
	obj = obj.style;
     if (v4=="True")
	{
	    obj.zIndex = z4;	
		obj.visibility = "visible";
		obj.width = w4; 
		obj.height =h4;
		obj.left = l4; 
		obj.top = t4;	

		++idx;
		document.images.pic4.src =  imgs[idx];
		document.images.pic4.alt =  imgs[idx];
		
	} else {
	   obj.visibility = "hidden";
	}	
	
//apDiv5		
	obj = document.getElementById('apDiv5');
	obj = obj.style;
	if (v5=="True")
	{
	    obj.zIndex = z5;	
		obj.visibility = "visible";
		obj.width = w5; 
		obj.height =h5;
		obj.left = l5; 
		obj.top = t5;	

		++idx
		document.images.pic5.src =  imgs[idx];
		document.images.pic5.alt =  imgs[idx];
		
	} else {
	   obj.visibility = "hidden";
	}    
	
//apDiv6		
	obj = document.getElementById('apDiv6');
	obj = obj.style;
	if (v6=="True")
	{
	    obj.zIndex = z6;	
		obj.visibility = "visible";
		obj.width = w6; 
		obj.height =h6;
		obj.left = l6; 
		obj.top = t6;	

		++idx
		document.images.pic6.src =  imgs[idx];
		document.images.pic6.alt =  imgs[idx];
		
	} else {
	   obj.visibility = "hidden";
	}    




}

