
// clear screen routines and routines to get references to layers

function getBaseLayerRefs() // get the pointers to the layers
{
	dispTtle=GetObject('divTitle');
	dispBckGnd=GetObject('divBckGnd');
	dispMain=GetObject('divMain');
	dispButton=GetObject('divButton');
	dispMenuInfo=GetObject('divInfo');
	dispBckImg=GetObject('divBckGnd_img');
	dispIframe=GetObject('divIframe');
	dispIframe_src=GetObject('iframe_src');
	dispChoiceBar=GetObject('divChoiceBar');
}

function clearMain() // hides the main layers
{
	clearMain_elements(); // hides the main elements
	if(isVisible(dispMain)) hide(dispMain)
	if(isVisible(dispChoiceBar)) hide(dispChoiceBar); // hide the choice bar if it is visible
}

function clearMain_elements() // hides the main elements
{
	if(isVisible(dispTtle)) hide(dispTtle);
	if(isVisible(dispBckGnd)) hide(dispBckGnd);
	if(isVisible(dispIframe)) hide(dispIframe);
	if(isVisible(dispTtle)) hide(dispTtle); // show the page title

}

function showMain_page() // show requested links
{
	showMain_elements(); // show main elements of the page
	show(dispMain);
}

function showMain_elements() // show main elements of the page
{
	show(dispTtle);
	show(dispBckGnd);
}

function clearScreen() // clear the screen
{
	clearMain(); // hide layers from the main page
	if(isOrderLayerDisplayed) clearOrderImg_page(); // hide layers from the image order page
	if(isLinksLayerDisplayed) clearLink_page(); // hide layers from the links pages
}

// scripts used for the display of bears in the order portion of the site

function clearImg_page() // hide all the image layers that show
{
	clearBearList(); // hides the bear list layers
	clearScreen(); // hides the main layers
}

function showBearList() // show the layers that contain the bear list layers
{
	if(!isVisible(dispMain)) show(dispMain);
	if(!isVisible(dispBckGnd)) show(dispBckGnd);
	if(!isVisible(dispTtle)) show(dispTtle);
}

function clearBearList() // clear the layers that contain the bear list layers
{
	if(isVisible(dispMain)) hide(dispMain);
	if(isVisible(dispBckGnd)) hide(dispBckGnd);
	if(isVisible(dispTtle)) hide(dispTtle);
}

// scripts used for the order page and bear info

function showOrderImg_page() // show the order image page
{
	showMain_elements(); // show main elements of the page

	if(!isVisible(dispBckGnd)) show(dispBckGnd);
	if(!isVisible(orderImgDiv)) show(orderImgDiv);
	if(!isVisible(orderDescrDiv)) show(orderDescrDiv);
	if(!isVisible(orderInfoDiv)) show(orderInfoDiv);
	if(!isVisible(orderClsDiv)) show(orderClsDiv);
}

function clearOrderImg_page() // clear the order image page
{
	if(isVisible(dispBckGnd)) hide(dispBckGnd);
	if(isVisible(orderImgDiv)) hide(orderImgDiv);
	if(isVisible(orderDescrDiv)) hide(orderDescrDiv);
	if(isVisible(orderInfoDiv)) hide(orderInfoDiv);
	if(isVisible(orderClsDiv)) hide(orderClsDiv);
}	

// functions associated with the links page

function clearLink_page() // hide all the image layers that show
{
	// hide the layers on the page
	
	if(isVisible(lnkbkgDiv)) hide(lnkbkgDiv);
	if(isVisible(pictDiv)) hide(pictDiv);
	if(isVisible(addDiv)) hide(addDiv);
	if(isVisible(webDiv)) hide(webDiv);
	if(isVisible(northAmDiv)) hide(northAmDiv);
	if(isVisible(europeDiv)) hide(europeDiv);
	if(isVisible(asiaDiv)) hide(asiaDiv);
	if(isVisible(austrDiv)) hide(austrDiv);
	if(isVisible(allLnkDiv)) hide(allLnkDiv);
	if(isVisible(dispDiv)) hide(dispDiv);
	if(isVisible(displinkTtle)) hide(displinkTtle);
	if(isVisible(dispLinks)) hide(dispLinks);
	if(isVisible(dispclsBttn)) hide(dispclsBttn);
	if(isVisible(disLinkButton)) hide(disLinkButton);
}

function showLinks_page() // show the links interface
{
	if(!isVisible(lnkbkgDiv)) show(lnkbkgDiv);
	if(!isVisible(pictDiv)) show(pictDiv);
	if(!isVisible(addDiv)) show(addDiv);
	if(!isVisible(webDiv)) show(webDiv);
	if(!isVisible(northAmDiv)) show(northAmDiv);
	if(!isVisible(europeDiv)) show(europeDiv);
	if(!isVisible(asiaDiv)) show(asiaDiv);
	if(!isVisible(austrDiv)) show(austrDiv);
	if(!isVisible(allLnkDiv)) show(allLnkDiv);
	if(!isVisible(dispDiv)) show(dispDiv);
}

function showLinks_page() // show the links page with larger background
{
	if(!isVisible(lnkbkgDiv)) show(lnkbkgDiv);
	if(!isVisible(dispMain)) show(dispMain);
}


