//marques comar 11/16/2006 javascript for strikes bowling lounge site

//variables
var photo_num = 1;
var thespace = "  ";

function imageOver(id)
{
	document.images[id].src = 'images/top_' + id + '-over.jpg';
}

function imageOut(id)
{
	document.images[id].src = 'images/top_' + id + '.jpg';
}

function subImageOver(nav,id)
{
	document.images[nav + '_0' + id].src = 'images/sub_' + nav + "_0" + id + '-over.gif';
}

function subImageOut(nav,id)
{
	document.images[nav + '_0' + id].src = 'images/sub_' + nav + "_0" + id + '.gif';
}

function nextPhoto(polarity)
{
 //alert(polarity + " " + photo_num);
	if(polarity > 0)
	{
		if(photo_num + 1 < 9)
		{
			photo_num = photo_num + 1;
		}
		else
		{
			photo_num = 1;
		}
	}
	else
	{
		if(photo_num - 1 > 0)
		{
			photo_num = photo_num - 1;
		}
		else
		{
			photo_num = 8;
		}
	}
	if(photo_num <= 9)
	{
		show_photo_num = "0" + photo_num;
		thespace = "  ";
	}
	else
	{
		show_photo_num = photo_num;
		thespace = " ";
	}
	if(photo_num < 10)
	{
		width_num = "7";
	}
	else
	{
		width_num = "11";
	}
	//alert(width_num);
	document.images['about_photo'].src = 'images/photos_' + show_photo_num + '.jpg';
	document.photo.photonum.value = thespace + photo_num + " of 8";
}

//Drop in Box

// Drop-in content box- By Dynamic Drive
// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
// This credit MUST stay intact for use

var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"

var bouncelimit=32 //(must be divisible by 8)
var direction="down"

function initbox()
{
  if (!dom&&!ie&&!ns4)
  return
    crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
    scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
    crossobj.top=scroll_top-250+calunits
    crossobj.visibility=(dom||ie)? "visible" : "show"
    dropstart=setInterval("dropin()",50)
}

function dropin(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<100+scroll_top)
crossobj.top=parseInt(crossobj.top)+40+calunits
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


window.onload=initbox