function init(){ // function initialises various javascript routines on start up
	if(checkbrowser()) // do not run the page with netscape 4
	{
		redirectBrowser();  // redirect browser to old site
		return;
	}

	findScreenSize(); // find the size of the web page window
	addjustMainLayerSizes(); // addjust the sizes of the layers if needed
	setFontSizes(); // base on the screen resolutions set the appropriate css styles
	init_menus(); // preload the menu
	showHome(); // show the home page
	init_bears(); // set up the bear image layers
}

function displayGuest()
{
	clearScreen(); // clear the screen

	// fill in the title
	tempVar="<center><table border='2' class='"+css_title+"'><tr><td>Guestbook</td></tr></table></center>";
	writeInfo(dispTtle,tempVar);

	dispIframe_src.src='guestbook/guestbook.html'; // load webrings into the iframe layer

	showMain_elements(); // show main page elements

	if(!isVisible(dispIframe)) show(dispIframe); // show the iframe layer, which will contain the webrings page
}

function displayMeet() // display the meet artist info in the same layer as the links
{
	clearScreen(); // clear the screen
	isChoiceBarDisplayed=false; // flag stating the state of the choice bar
	adjustMain(); // adjust the main display window
	
	// fill in the title
	// adjust for screen size
	tempVar="<center><table border='2' class='"+css_title+"'><tr><td>Meet the Artist</td></tr></table></center>";
	writeInfo(dispTtle,tempVar);

	// fill in the artist info
	// adjust for screen size
	var tempMeet="<table class='"+css_meet+"'><tr><td>";
	
	tempMeet+="<img align='right' src='images/base/debbie.dec.2003.jpg'><br>";
	
	tempMeet+="My name is Debbie Skarupa, and I am the artist behind the Bearz.<BR>";
	tempMeet+="It is hard to believe that we are now into Spring, seems like we just";
	tempMeet+=" had Christmas, and we are already almost into April.  One just can not";
	tempMeet+=" keep up with the time these days!!!!!!<BR><BR>";
	tempMeet+="This year, I am hoping to be able to introduce some new lines in my bears,";
	tempMeet+=" as I have not been able to work a lot on my bears for the past year and a half,";
	tempMeet+=" due to my health.  But I have decided that I really need to get back to doing";
	tempMeet+=" them, as they are really what I enjoy doing, and it brings me great relief,";
	tempMeet+=" to be able to think on something positive.  So hopefully this new beginning will";
	tempMeet+=" bring many positive results.  Looking forward to seeing what lies ahead.<BR><BR>";
	tempMeet+="I will be removing the wahm bearz from my website, as I feel that they are not going any";
	tempMeet+=" where at the moment, so will have them only upon request. They are a therapeutic bear,";
	tempMeet+=" so great for those who are ill, or even elderly, as it provides a lot of comfort both";
	tempMeet+=" physically and emotionally. If you have any questions about them, please drop me a note,";
	tempMeet+=" and I will gladly respond!!!  They are excellent for seniors who are in a nursing home,";
	tempMeet+=" as they are very comforting!!!!!<BR><BR>";
	tempMeet+="Thank you for taking the time in getting to know the artist, behind the bearz.";
	tempMeet+=" The bearz and I hope you enjoy your visit, and please come back and visit again soon. God Bless!";

	tempMeet+="Bear hugz,<BR>";
	tempMeet+="Debbie Skarupa<BR><BR>";
	tempMeet+="Wahm Bearz &amp; Friendz &reg;<br><br>";
	tempMeet+="<b>Contact Information:</b><br>";
	tempMeet+="Email: wahmbearz@shaw.ca<br>";
	tempMeet+="Phone: 403-293-5719<br>";
	tempMeet+="fax: 403-293-8731<br>";
	tempMeet+="Calgary<br>";
	tempMeet+="Alberta, CANADA";
	tempMeet+="<BR><BR>";
	tempMeet+="Updated:  March 2004<BR>";
	tempMeet+="<br>";
	tempMeet+="<A onMouseOver=\"javascript:window.status='All my bears are fully made in Canada';return true\"";
	tempMeet+="onMouseOut=\"javascript:window.status='';return true\">";
	
	tempMeet+="<IMG SRC='images/base/made_in_canada.gif'";
	tempMeet+=" ALT='All my bears are fully made in Canada' ";
	tempMeet+="WIDTH='122' HEIGHT='22' BORDER='0'></A>";
	
	tempMeet+="</td></tr></table>";
	writeInfo(dispMain,tempMeet);

	showMain_page(); // show main links
}

function displayNew() // display the meet artist info in the same layer as the links
{
	clearScreen(); // clear the screen
	isChoiceBarDisplayed=false; // flag stating the state of the choice bar
	adjustMain(); // adjust the main display window
	
	// fill in the title
	// adjust for screen size
	var tempVar="<center><table border='2' class='"+css_title+"'><tr><td>What\'s New</td></tr></table></center>";
	writeInfo(dispTtle,tempVar);

	// fill in the artist info
	// adjust for screen size
	var tempVar="<table class='"+css_meet+"'><tr><td>";

	tempVar+='<UL>';
	tempVar+='<li>Made a few minor changes to the site</li>';
	tempVar+='<BR>'
	tempVar+='<li>Added a link to Teddy Bear Stock Photography.</li>';
	tempVar+='</UL>';
	
	tempVar+="</td></tr></table>";
	writeInfo(dispMain,tempVar);
	
	showMain_page(); // show main links
}


function showHome() // fill in the information on the main page as the home page
{
	clearScreen(); // clear the screen
	isChoiceBarDisplayed=false; // flag stating the state of the choice bar
	adjustMain(); // adjust the main display window
	
	// fill in the title
	// adjust for screen size
	tempVar="<center><table border='2' class='"+css_title+"'><tr><td>Wahm Bearz &amp; Friendz &reg;</td></tr></table></center>";
	writeInfo(dispTtle,tempVar);

	// fill in the artist info
	var homeInfo="<center><table class='"+css_meet+"'><tr><td>";
	
	homeInfo+="<p>Quick Links";
	homeInfo+="<table border='1' class='notice'>";
	homeInfo+="<tr><td><a class='notice' href=\"javascript:printBearList('designer')\">Designer Bears</a>&nbsp;</td>";
	homeInfo+="<td><a class='notice' href=\"javascript:printBearList('wahmbearz')\">Wahmbearz</a>&nbsp;</td>";
	homeInfo+="<td><a class='notice' href=\"javascript:printBearList('puppet')\">Hand Puppets</a></td>"
	homeInfo+="<td><a class='notice' href=\"javascript:printBearList('wheatbag')\">wheat Bags</a>&nbsp;</td>"
	homeInfo+="<td><a class='notice' href=\"javascript:printBearList('jacket')\">Doll Jackets</a>&nbsp;</td>"
	homeInfo+="<td><a class='notice' href=\"javascript:printBearList('mrytle')\">Knit Doll</a></td></tr>";
	homeInfo+="</table></p>"
	
	
	homeInfo+="<center><H1>Good Day!!!! Welcome to Wahm Bearz and Friendz &reg;</H1></center><BR>";

	homeInfo+="<font color='red'>NOTE: If you use an internet firewall such as Norton Internet Security you may have to turn off ";
	homeInfo+="pop-up blocking for the site to work properly.</font>"

	homeInfo+="<p>Sorry about taking so long to update this web page, as there has been a number of things going in ";
	homeInfo+="my life. I had to revaluate what I was doing with the bears since there has there has not ";
	homeInfo+="been a great demand for the bears that I have made. After looking at my options, I have decided to ";
	homeInfo+="focus more on the design of bears, and other stuffed animals. I will still however sell you a bear ";
	homeInfo+="if you are still interested in purchasing one.</p>";

	homeInfo+="<p>I will be happy to design you a bear or another type of stuffed animal. I am willing to work with you from ";
	homeInfo+="the prototype of the bear, right though the final design. If you want just one bear, then I would ";
	homeInfo+="be happy to make you the bear that you want. If you want 10 or more, then I will have them manufactured for you. ";
	homeInfo+="I am willing to work with you from the beginning of the process unto the end and delivery of the bears to you. ";

	homeInfo+="<p>If you are familiar with the site, you know that I have made a variety of different bears. I have also produced ";
	homeInfo+="a puppet, and have diversified into making an outfit for a modern dancer.</p>";

	homeInfo+="<p>Take some time to browse the site, and see what interests you. I would be more then happy to leverage ";
	homeInfo+="my knowledge of bear making to make you an article you will be happy with.</p>";

	homeInfo+="<p>Thanks again, for your patients and understanding.</p>";

	homeInfo+="<p>Please feel free to ";
	homeInfo+="<a class='"+css_def+"' href='mailto:wahmbearz@shaw.ca?subject=General Inqiry'>E-mail</a>";
	homeInfo+=" me any comments on my web page.<BR><BR>";
	homeInfo+="Have a wonderful day!! God Bless<p>";

	homeInfo+="</td></tr></table></center>";
	writeInfo(dispMain,homeInfo);
	
	showMain_page(); // show main links
}

function setFontSizes() // base on the screen resolutions set the appropriate css styles
{
	if(WebWidth > 800 && WebHeight > 450) return; // no need to set the css fonts to small
	
	css_def+='_small'; // small links
	css_menu+='_small'; // small links in menu
	css_maplink+='_small'; // small links in map
	css_info+='_small'; // small box for info
	css_meet+='_small'; // small box for meet the artist
	css_order+='_small'; // small box for order
 	css_title+='_small'; // small box for title
	css_feature+='_small'; // small for default paragraph
	css_clickinstr+='_small'; // small for click instructions
	css_instr+='_small'; // small for the instruction layer
	css_display+='_small'; // small for the display layer
	css_webrings+='_small'; // small for the webrings layer
	
	sizeSelection=0; // set to 0 since we are dealing with a small screen
}

