
var IdVec=new Array(0,1,1,2,3,3,3,3,6,6,7,7,7,7,8,8);                                                
var IdSub=new Array(0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);                                           
var GalSz=new Array(0,0,0,20,60,0,0,0,54,72,4,64,29,9,14,15);                                         
var GalSec=new Array(0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0);                                           
var Pages=new Array("tshirts","PriceList","TshirtCalc","Galleries","soon","links",               
"Contact");                                                                                      
var Folders=new Array("PHOTOS","Oregon","Washington","Camp18","Flowers","Ilwaco","LongBeach",    
"OceanPark","Port","QuiltShow","Beach","HumaneSociety","LH","Town","Docs","DownTown");                                                                                     
var Titles=new Array("Photo Album","Oregon","Washington","Camp18 ","Flowers","Ilwaco","Port","Quilt Show","Long Beach",       
"Ocean Park","Beach","Humane Society","Lighthouses","Downtown","Doc's",                          
"Downtown");                                                                                     
var PicText=new Array("Docs Tavern","Docs pay phone","Gambling at the end of the earth",         
"Lighthouse at North head","Lighthouse at Cape Disapointment","Jacks Country Store founded 1885",
"Looking southJacks on the left and Docs on the right","Looking east on Bay Avenue",             
"Looking west on Bay Ave. toward the Pacific","NE side of Jacks (across the street from Docs)",  
"Docs from across Bay Ave. looking south down Vernon");                                          
var PicFolder=new Array(14,14,14,11,11,15,15,15,15,15,15);                                         
var PicIndex=new Array(1,2,3,27,24,1,2,9,7,6,8);                                                 
var PicPtr=new Array(6,0);                                                                       
var PicLink=new Array("http://www.jackscountrystore.com",                                        
"");                                                                                             
var ReSet=getCookie("ReSet");                                                                    
if(ReSet==null){ReSet=1};                                                                        
if(ReSet==1)                                                                                     
	{                                                                                               
	setCookie("PhPath","");                                                                         
	setCookie("PhCat",1);                                                                           
 	setCookie("PicSz",0);                                                                          
 	setCookie("ReSet",0);                                                                          
 	}                                                                                              
var PhPath=getCookie("PhPath");                                                                  
if(PhPath==null){PhPath="http://beach-tees.com/Photos"}                                          
if(PhPath==""){PhPath="http://beach-tees.com/Photos"}                                            
var PhCat=getCookie("PhCat");                                                                    
if(PhCat==null){PhCat=1}                                                                         
if(PhCat<=1)                                                                                     
{                                                                                                
Gname="";                                                                                        
PhCat=1;                                                                                         
}                                                                                                
PicSz=getCookie("PicSz");                                                                        
if(PicSz==null){PicSz=0};                                                                        
setCookie("PicSz",PicSz);                                                                        
if(PicSz>=1)                                                                                     
		{                                                                                              
		var MyImages=new Array(PicSz);                                                                 
		for(i=0;i<PicSz;i++)                                                                           
			{                                                                                             
			MyImages[i]="pic" + (i+1) + ".jpg";                                                           
			}	                                                                                            
		if(MyImages.length==1)                                                                         
			{                                                                                             
			if(MyImages[0]=="NoImage.jpg")                                                                
				{                                                                                            
				alert("There are no images for this categoty.");                                             
				location="Gallery.html";                                                                     
				}                                                                                            
			}                                                                                             
		}                                                                                              
		                                                                                               
function GoToNextPage()                                                                          
{                                                                                                
PageDX=document.form_menu.gal.value;                                                             
document.form_menu.gal.value=-1;                                                                 
if(PageDX>=0)                                                                                    
	{                                                                                               
	PhCat=IdSub[PageDX];                                                                            
	setCookie("PhCat",PhCat);                                                                       
	PicSz=GalSz[PageDX];                                                                            
	setCookie("PicSz",PicSz);                                                                       
	PhPath=PhPath + "/";                                                                            
	PhPath=PhPath + Folders[PageDX];                                                                
	setCookie("PhPath",PhPath);	                                                                    
	if(PicSz>=1){location="PreloadPhotos.html"}                                                     
	else{location.reload()}                                                                         
	}                                                                                               
}                                                                                                
                                                                                                 
function GetPage(i)                                                                              
{                                                                                                
location=Pages[i-1] + ".html";                                                                   
}                                                                                                
                                                                                                 
function PickGal(i)                                                                              
{                                                                                                
PhCat=i;                                                                                         
setCookie("PhCat",i);                                                                            
PicSz=GalSz[i-1];                                                                                
setCookie("PicSz",PicSz);                                                                        
var path="";                                                                                     
for(j=0;j<IdVec.length;j++)                                                                      
	{                                                                                               
	path="/" + Folders[i-1] + path;                                                                 
	i=IdVec[i-1];                                                                                   
	if(i==1)                                                                                        
		{                                                                                              
		j=IdVec.length;                                                                                
		path="http://beach-tees.com/Photos" + path;                                                    
		}                                                                                              
	}                                                                                               
PhPath=path;                                                                                     
setCookie("PhPath",PhPath);	                                                                     
location="PreloadPhotos.html";                                                                   
}                                                                                                
	                                                                                                