// js top/*if(window.location.href == top.location.href){	//alert('Reloading frameset, please wait.');	if(window.location.href.indexOf("SearchKeywords_") > -1)		redirectTo = "http://www.needlecrafter.com/patterns.html";	else		redirectTo = 'http://www.needlecrafter.com/index.html?page='+window.location.href;			window.location.href = redirectTo;}*/var NS = (document.layers && !document.getElementById) ? true : false ;var W3C = (document.getElementById) ? true : false ;var IE = (document.all) ? true : false ;var skyscrapper = false;function Browser() {	var usrAg, strTest, index;		this.isIE = false;	this.isOP = false;	this.isNS = false;	this.version = null;		usrAg = navigator.userAgent;		strTest = "Opera";	index = usrAg.indexOf(strTest);	if(index >= 0) 	{		this.isOP = true;		this.version = parseFloat(usrAg.substr(index + strTest.length));		return;						}		strTest = "Netscape6/";	index = usrAg.indexOf(strTest);	if(index >= 0)	{		this.isNS = true;		this.version = parseFloat(usrAg.substring(index + strTest.length));		return;		}		strTest = "Gecko";	index = usrAg.indexOf(strTest);	if(index >= 0)	{		this.isNS = true;		this.version = 6.1;		return;		}	strTest = "MSIE";	index = usrAg.indexOf(strTest);	if(index >= 0 )	{		this.isIE = true;		this.version = parseFloat(usrAg.substr(index + strTest.length));		return	}}var browser = new Browser();function getContainerWith(node, tagName, className) {	while(node != null)	{		if(node.tagName != null && node.tagName == tagName && hasClassName(node, className))			return node;				node = node.parentNode;	}	return node;}function hasClassName(el, name){	var index, list;	list = el.className.split(" ");	for(i = 0; i < list.length; i++)	{		if(list[i] == name)			return true;	}	return false;}function removeClassName(el, name){	var i, oldList, newList;		if(el.className == null)		return;			newList = new Array();	oldList = el.className.split(" ");	for(i = 0; i < oldList.length; i++)	{		if(oldList[i] !=  name)			newList.push(oldList[i]);			}	el.className = newList.join(" ");}function getOffsetLeft(el) {	var x;		x = el.offsetLeft;	if( el.offsetParent != null)	{		x += getOffsetLeft(el.offsetParent);	}		return x;}function getOffsetTop(el){	var y;		y = el.offsetTop;		if(el.offsetParent != null)		y += getOffsetTop(el.offsetParent);			return y;}function buttonMouseover(event,menuid){	var button;		if(browser.isIE)		button = window.event.srcElement;	else		button = event.currentTarget;			button.blur();		if(button.menu == null)	{		button.menu = document.getElementById(menuid);		if(button.menu.isInitialized == null)			menuInit(button.menu);	}		if(activeButton != null)		resetButton(activeButton);			if(true)	{		depressButton(button);		activeButton = button;				activeMenu = button.menu;				}	//else	//	activButton = null;			return false;}var displayedMenu;function buttonMouseout(event, menuid){	// user may be moving to the menu or over to another button	// if they are moving anywhere but the menu then hide this menu		displayedMenu = menuid;	//setTimeout('checkMenu();',200);}function checkMenu(id){	// if the user goes over a new button the activeMenu will change		if(browser.isIE)		button = window.event.srcElement;	else		button = event.currentTarget;	}function menuMouseout(menuid){	//activeButton = null;	//setTimeout('checkActive();',200);	document.getElementById(menuid).style.visibility = "hidden";	activeMenu = null;	return;//alert('mouseout');	var button		if(browser.isIE)		button = window.event.srcElement;	else		button = event.currentTarget;				resetButton(button);				activeButton = null;}function checkActive(){//alert('activeButton='+activeButton);	if(activeButton == null)	{		document.getElementById('menu1').style.visibility = "hidden";		document.getElementById('menu2').style.visibility = "hidden";		document.getElementById('menu3').style.visibility = "hidden";		document.getElementById('menu4').style.visibility = "hidden";		document.getElementById('menu5').style.visibility = "hidden";	}}/*function buttonMouseover(event, menuid){	var button;		if(browser.isIE)	{		button = window.event.srcElement;			}	else		button = event.currentTarget;			if(activeButton != null && activeButton != button)		buttonClick(event, menuid);}*/function depressButton(button){	var x, y;		button.className += " menuButtonActive";		x = getOffsetLeft(button);	y = getOffsetTop(button) + button.offsetHeight;		button.menu.style.left = x + "px";	button.menu.style.top = y + "px";	button.menu.style.visibility = "visible";	}function resetButton(button){	removeClassName(button, "menuButtonActive");		if(button.menu != null)	{		button.menu.style.visibility = "hidden";		}}if(browser.isIE)	document.onmousedown = pageMousedown;else	document.addEventListener("mousedown", pageMouseover, true);		if(browser.isIE)	document.onmouseover = pageMousedown;else	document.addEventListener("mouseover", pageMouseover, true);	function pageMousedown(event){	var el;		if(activeButton == null)		return;			if(browser.isIE)		el = window.event.srcElement;	else		el = (event.target.tagName ? event.target : event.target.parentNode);					if (el == activeButton)		return;			if (getContainerWith(el, "DIV", "menu") == null )	{		resetButton(activeButton);		activeButton = null;		}}function pageMouseover(event){	var el;		if(activeButton == null)		return;			if(browser.isIE)		el = window.event.srcElement;	else		el = (event.target.tagName ? event.target : event.target.parentNode);					if (el == activeButton)		return;			if (getContainerWith(el, "DIV", "menu") == null )	{		resetButton(activeButton);		activeButton = null;		}}function menuInit(menu){	var itemList, spanList;	var textEl, arrowEl;	var itemWidth;	var w, dw;	var i, j;		}var activeButton = null;var activeMenu = null;var navpage = new Array();navpage[0] = 'home.html';navpage[1] = 'library.html'; navpage[2] = 'Terms/terms.html';navpage[3] = 'Stitches/stitches.html';navpage[4] = 'articles/articleshome.html'; navpage[5] = 'articles/projects.html';navpage[6] = 'messages/mboard.html';navpage[7] = 'faq.html';navpage[8] = 'bibliography.html'; navpage[9] = 'links/links.html';navpage[10] = 'contact.html';navpage[11] = 'messages/signup.html';navpage[12] = 'Store/store.html';navpage[13] = 'Gallery/gallery.html';navpage[14] = 'patterns.html';navpage[15] = 'messages/mboard1.php';navpage[16] = 'Store/store_b.html';navpage[17] = 'Store/store_n.html';navpage[18] = 'Store/store_v.html';navpage[19] = 'Gallery/ale.html';navpage[20] = 'Gallery/vntg.html';function newgoToPage(id) {		document.location.href = loc+navpage[id];}function newgoToLogOnPage(id) {		parent.signonLocation = document.location.href;	document.location.href = loc+navpage[id];}function logoff(){	if(confirm('Logging Off?'))	{		parent.energized = false;		document.location.href = document.location.href;	}}var bannerH = 80;var navW = 610;if(!skyscrapper)	navW = 740;if (thispage=='home')	bannerH = 10;var text = '';text += '<div align="center">';//1111111111111111 Table Number 1text += '<table cellpadding="0" cellspacing="0" border="0" width="760">';text += '<tr>';//<!-- new shadow cell -->text += '<td class="brdr" background="'+loc+'images/shad1.gif"><img src="'+loc+'images/spacer.gif" width="30" height="10"></td>';text += '<td class="brdr"><img src="'+loc+'images/spacer.gif" width="10" height="10"></td>';text += '<td class="brdr"><img src="'+loc+'images/spacer.gif" width="1" height="1"></td>';text += '<td class="brdr"><img src="'+loc+'images/spacer.gif" width="10" height="1"></td>';//<!-- new shadow cell -->text += '<td class="brdr" background="'+loc+'images/shad2.gif"><img src="'+loc+'images/spacer.gif" width="30" height="10"></td>';text += '</tr>';//*******************************************************************//*******************************************************************//*******************************************************************//*******************************************************************//*******************************************************************//*******************************************************************text += '<tr>';//<!-- new shadow cell -->text += '<td class="brdr" background="'+loc+'images/shad1.gif"><img src="'+loc+'images/spacer.gif" width="30" height="10"></td>';text += '<td class="brdr"><img src="'+loc+'images/spacer.gif" height="10" width="10"></td>';text += '<td align="center" valign="top" class="page">';text += '<!-- ************************************************************************************   -->';//4444444444444444444444444text += '<table cellpadding="0" cellspacing="0" border="0">';text += '<tr>';text += '<td class="page" align="center" valign="top">';text += '<!-- Navigation ------------------------------------------------------------------------ -->';document.write(text);text = '';	//END5555555555555555555555555var menubar = '<div id="menuBar" class="menubar">';menubar += '';//menubar buttonsmenubar += '<a class="menubutton" href="javascript:newgoToPage(0);" onmouseover="buttonMouseover(event, \'menu1\');">Home</a>';menubar += '<a class="menubutton" href="javascript:newgoToPage(1);" onmouseover="buttonMouseover(event, \'menu2\');"> Library </a>';menubar += '<a class="menubutton" href="javascript:newgoToPage(12);" onmouseover="buttonMouseover(event, \'menu3\');"> Shop </a>';menubar += '<a class="menubutton" href="javascript:newgoToPage(13);" onmouseover="buttonMouseover(event, \'menu4\');"> Gallery </a>';menubar += '<a class="menubutton" href="javascript:newgoToPage(6);" onmouseover="buttonMouseover(event, \'menu5\');">Message Board</a>';menubar += '</div>';menubar += '<div id="menu1" class="menu" >';//menubar += '<a class="menuitem" href="javascript:newgoToPage(0);" >Home</a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(10);"> Contact </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(7);"> FAQ </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(9);"> Links </a>';menubar += '</div>';//Librarymenubar += '<div id="menu2" class="menu" >';menubar += '<a class="menuitem" href="javascript:newgoToPage(14);"> Designs </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(3);"> Stitches </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(2);"> Glossary </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(4);"> Articles </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(5);"> Projects </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(8);"> Bibliography </a>';menubar += '</div>';//Storemenubar += '<div id="menu3" class="menu">';menubar += '<a class="menuitem" href="javascript:newgoToPage(16);"> Books </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(18);"> Embroideries </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(17);"> Kits & Notions </a>';menubar += '</div>';//Gallerymenubar += '<div id="menu4" class="menu">';menubar += '<a class="menuitem" href="javascript:newgoToPage(19);"> ALE Originals </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(20);"> Vintage Collection </a>';menubar += '</div>';//Message Boardmenubar += '<div id="menu5" class="menu">';menubar += '<a class="menuitem" href="javascript:newgoToPage(6)" > Log In </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(11);"> Sign Up </a>';menubar += '<a class="menuitem" href="javascript:newgoToPage(15)"> Read Only </a>';menubar += '</div>';document.write(menubar)	;//document.write(out)text += '<!-- /Navigation ------------------------------------------------------------------------ -->';text+='<br>';//88888888888888888888888888888// Logo Tablevar tableWidth = 740;if(skyscrapper)	tableWidth = 580; 	text += '<table cellpadding="0" cellspacing="0" border="0" height="450" width="580">';text += '<tr>';text += '<td height="10">';//&nbsp;</td>';//text += '</tr>';if(logotype == 'large')//Large Standard{	text += '<tr>';	text += '<td align="center" height="160"><img src="'+loc+'images/logo2005.gif" width="500" height="127" border="0" alt="Needlecrafter.com"></td></tr>';	text += '</tr>	';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'small')//Small Standard{	text += '<tr>'	text += '<td align="center" valign="top" height="100"><p><img src="'+loc+'images/logo2005b.gif" width="355" height="90" border="0" alt="Needlecrafter.com"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'glossary')//Glossary{	text += '<tr>'	text += '<td align="center" valign="top" height="98"><p><img src="'+loc+'Terms/glossary.gif" width="486" height="90" border="0" alt="Glossary"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'vntg')//Vintage Gallery{	text += '<tr>'	text += '<td align="center" valign="top" height="100"><p><img src="'+loc+'Gallery/gallery_imgs/vntg2.gif" width="350" height="85" border="0" alt="Vintage Collection"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'gallery')//Gallery{	text += '<tr>'	text += '<td align="center" valign="top" height="100"><p><img src="'+loc+'Gallery/gallery_imgs/gallery4.gif" width="129" height="90" border="0" alt="Needlecrafter Gallery"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'ale')//ALE Collection{	text += '<tr>'	text += '<td align="center" valign="top" height="100"><p><img src="'+loc+'Gallery/gallery_imgs/ae3.gif" width="270" height="85" border="0" alt="Andrea English"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'biblio')//Bibliography{	text += '<tr>'	text += '<td align="center" valign="top" height="100"><p><img src="'+loc+'images/biblio.gif" width="362" height="90" border="0" alt="Needlecrafter Bibliography"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'library')//Library{	text += '<tr>'	text += '<td align="center" valign="top" height="100"><p><img src="'+loc+'images/logo2005b.gif" width="355" height="90" border="0" alt="Needlecrafter.com"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'store')//Store{	text += '<tr>'	text += '<td align="center" valign="top" height="90"><p><img src="'+loc+'Store/store_imgs/shop.gif" width="375" height="90" border="0" alt="Store"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'books')//Bookstore{	text += '<tr>'	text += '<td align="center" valign="top" height="90"><p><img src="'+loc+'Store/store_imgs/books.gif" width="362" height="90" border="0" alt="Needlecrafter Books"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}else if(logotype == 'stitches')//Stitches{	text += '<tr>'	text += '<td align="center" valign="top"><p><img src="'+loc+'Stitches/stitches.gif" width="440" height="92" border="0" alt="Stitch Dictionary"></p></td></tr>';	text += '</tr>';	text += '<tr>';	text += '<td valign="top">';}document.write(text);
