// shw_siteSettings.js (c)2008 SugarHill Works LLC - http://www.sugarhillworks.com
var d = document, fullscr, ceibw, tipIsUp = false, tipIsDown = false;
;
//var rootPath = "";
//function getRootPath() {
//	for(var i = 2; i < rootPathNum; i++) {
//		rootPath += "../";
//	}
//	return rootPath;
//}
//var menuItems = new Array();

//// ********************************************************************************************************** //
//// ********************************************************************************************************** //
//// *********************************                                        ********************************* //
//// *********************************      DO NOT EDIT ABOVE THIS LINE       ********************************* //
//// *********************************                                        ********************************* //
//// *********************************         SET SITE OPTIONS BELOW         ********************************* //
//// *********************************                                        ********************************* //
//// ********************************************************************************************************** //
//// ********************************************************************************************************** //
////
//
//// THE FOLLOWING LINES AFFECT THE TITLE THAT APPEARS IN THE BROWSER WINDOW'S TITLEBAR
//// [any legal HTML text is allowed]
var defaultTitle = "matthew elhardt";
var titleSeparator = " | ";

////// THE FOLLOWING LINES ARE USED TO BUILD THE SITE-WIDE HEADER MENU
//// Each menuItem has several attributes:
//// id (required) - the text that will appear as the link, the name of the file to be linked to, the name of the image(gif) if an image is to be used
////			that is, 'about' will appear in the menu or about.png will show,  and link to about.html
//// image (required) - set to 1 if images are to be used - set to 0 for a text link
//// subItems (optional) - set to a comma separated list of quote-enclosed submenu items. images not allowed.
////			or leave blank empty brakets for no submenu items , i.e. []
//// 
//// NOTE: menuItems link to an index.html file in the 'id' folder - i.e /contact/index.html
//// NOTE: images are in the /img/ folder in the 'shw_menu' folder and images should be named 'id'.gif and 'id'_f2.gif - both files required - the _on.png file is for the mouse rollover event
////		See the example below and follow the pattern:
////
////menuItems[menuItems.length] = {
////	id: 'nav_main_menu',  // corresponds to #id rule in fsmenu_h.css
////	mLink: 'main menu',   // the text to be displayed in the menu (use HTML character codes)
////	mHref: 'menu.html',   // the page to link to (relative to site root)
////	subItems: ['sub item 1', 'sub item 2'],   // list submenu link texts here
////	subHrefs: ['menu.html', 'menu.html']      // list corresponding submenu pages to link to here
////};
////
////		
//
//// NOTE THAT WHEN THE MENU IS UPDATED HERE, YOU *MUST* MANUALLY UPDATE THE ZEN CART categories.php TEMPLATE FILE TO MATCH
//
//menuItems[menuItems.length] = {
//	idHref: 'bioLnk',
//	id: 'navBio',
//	mLink: 'Bio',
//	mHref: 'bio/',
//	subItems: '',
//	subHrefs: ''
//};
//
//menuItems[menuItems.length] = {
//	idHref: 'collectionsLnk',
//	id: 'navCollections',
//	mLink: 'Collections',
//	mHref: '#', 
//	subItems: ['Backstage at the Opera','Landmarks','Parks'],
//	subHrefs: ['collections/backstage_gallery','collections/landmarks_gallery','collections/parks_gallery']
//};
//
//menuItems[menuItems.length] = {
//	idHref: 'shopLnk',
//	id: 'navShop',
//	mLink: 'Shop',
//	mHref: 'shop/greeting_cards/',
//	subItems: '',
//	subHrefs: ''
//};
//
//menuItems[menuItems.length] = {
//	idHref: 'customLnk',
//	id: 'navCustom',
//	mLink: 'Custom Orders',
//	mHref: 'custom_orders',
//	subItems: '',
//	subHrefs: ''
//};
//
//menuItems[menuItems.length] = {
//	idHref: 'contactLnk',
//	id: 'navContact',
//	mLink: 'Contact',
//	mHref: 'info@nycgreetingcards.com',
//	subItems: '',
//	subHrefs: ''
//};
//
////menuItems[menuItems.length] = {
////	idHref: 'wholesaleLnk',
////	id: 'navWholesale',
////	mLink: 'Wholesale',
////	mHref: '',
////	subItems: '',
////	subHrefs: ''
////};
//
//menuItems[menuItems.length] = {
//	idHref: 'homeLnk',
//	id: 'navHome',
//	mLink: 'Home',
//	mHref: 'index.html',
//	subItems: '',
//	subHrefs: ''
//};
//
//
//
//// ********************************************************************************************************** //
//// ********************************************************************************************************** //
//// *********************************                                        ********************************* //
//// *********************************      DO NOT EDIT BELOW THIS LINE       ********************************* //
//// *********************************                                        ********************************* //
//// ********************************************************************************************************** //
//// ********************************************************************************************************** //


var isitIE = false;
var isitIE7 = false;
var isitIE6 = false;
if (window.attachEvent && !window.opera) { //object-detect IE5+, exclude opera
	isitIE = true;
	if(navigator.appVersion.match(/MSIE 7/)) { isitIE7 = true; }
	if(navigator.appVersion.match(/MSIE 6/)) { isitIE6 = true; }
}
//
//// turn off 'image toolbar' in older versions of IE
if(isitIE == true){
	document.write("<meta HTTP-EQUIV=\"imagetoolbar\" content=\"no\">");
}
//
var isitFF2 = false;
//var isitFF2mac = false;
var userAgent = navigator.userAgent.toLowerCase();
  if (/firefox[\/\s](\d+\.\d+)/.test(userAgent)) {
    var ffversion = new Number(RegExp.$1);
    if (ffversion < 3){// && userAgent.indexOf('mac') != -1) {
      isitFF2 = true;
    }
  }
//function detectMacXFF2() {
  if (/firefox[\/\s](\d+\.\d+)/.test(userAgent)) {
    var ffversion = new Number(RegExp.$1);
    if ((ffversion < 3) && (userAgent.indexOf('mac') != -1)) {
      isitFF2mac = true;
    }
  }
//}

// for IE6+ so we can use appendChild, etc...
if (!window.Node) {
	var Node = {
		ELEMENT_NODE: 1,
		ATTRIBUTE_NODE: 2,
		TEXT_NODE: 3,
		COMMENT_NODE: 8,
		DOCUMENT_NODE: 9,
		DOCUMENT_FRAGMENT_NODE: 11
	};
}


//function randOrd(){
//	return (Math.round(Math.random())-0.5);
//}

// so we can dynamically add event watchers...
var addEvent = function( obj, type, fn ) {
	if (obj.addEventListener) {
		obj.addEventListener(type, fn, false);
	} else if (obj.attachEvent) {
		obj.attachEvent('on' + type, function() { return fn.apply(obj, new Array(window.event)); });
	}
}; 





//<script type="text/javascript">
//<![CDATA[

// For each menu you create, you must create a matching "FSMenu" JavaScript object to represent
// it and manage its behaviour. You don't have to edit this script at all if you don't want to;
// these comments are just here for completeness. Also, feel free to paste this script into the
// external .JS file to make including it in your pages easier!

// Here's a menu object to control the above list of menu data:
var listMenu = new FSMenu('listMenu', true, 'display', 'block', 'none');
// The parameters of the FSMenu object are:
//  1) Its own name in quotes.
//  2) Whether this is a nested list menu or not (in this case, true means yes).
//  3) The CSS property name to change when menus are shown and hidden.
//  4) The visible value of that CSS property.
//  5) The hidden value of that CSS property.
//
// Next, here's some optional settings for delays and highlighting:
//  * showDelay is the time (in milliseconds) to display a new child menu.
//    Remember that 1000 milliseconds = 1 second.
//  * switchDelay is the time to switch from one child menu to another child menu.
//    Set this higher and point at 2 neighbouring items to see what it does.
//  * hideDelay is the time it takes for a menu to hide after mouseout.
//    Set this to a negative number to disable hiding entirely.
//  * cssLitClass is the CSS classname applied to parent items of active menus.
//  * showOnClick will, suprisingly, set the menus to show on click. Pick one of 4 values:
//     0 = All levels show on mouseover.
//     1 = Menu activates on click of first level, then shows on mouseover.
//     2 = All levels activate on click, then shows on mouseover.
//     3 = All levels show on click only (no mouseover at all).
//  * hideOnClick hides all visible menus when one is clicked (defaults to true).
//  * animInSpeed and animOutSpeed set the animation speed. Set to a number
//    between 0 and 1 where higher = faster. Setting both to 1 disables animation.

listMenu.showDelay = 0;
listMenu.switchDelay = 0;
listMenu.hideDelay = 0;
listMenu.cssLitClass = 'lit';
listMenu.showOnClick = 3;
listMenu.hideOnClick = true;
listMenu.animInSpeed = 0.07;
listMenu.animOutSpeed = 0.07;

// Now the fun part... animation! This script supports animation plugins you
// can add to each menu object you create. I have provided 3 to get you started.
// To enable animation, add one or more functions to the menuObject.animations
// array; available animations are:
//  * FSMenu.animSwipeDown is a "swipe" animation that sweeps the menu down.
//  * FSMenu.animFade is an alpha fading animation using tranparency.
//  * FSMenu.animClipDown is a "blind" animation similar to 'Swipe'.
// They are listed inside the "fsmenu.js" file for you to modify and extend :).

// I'm applying two at once to listMenu. Delete this to disable!
//listMenu.animations[listMenu.animations.length] = FSMenu.animFade;
//listMenu.animations[listMenu.animations.length] = FSMenu.animSwipeDown;
//listMenu.animations[listMenu.animations.length] = FSMenu.animClipDown;


// Finally, on page load you have to activate the menu by calling its 'activateMenu()' method.
// I've provided an "addEvent" method that lets you easily run page events across browsers.
// You pass the activateMenu() function two parameters:
//  (1) The ID of the outermost <ul> list tag containing your menu data.
//  (2) A node containing your submenu popout arrow indicator.
// If none of that made sense, just cut and paste this next bit for each menu you create.

var arrow = null;
if (document.createElement && document.documentElement)
{
 arrow = document.createElement('span');
// arrow.appendChild(document.createTextNode('>'));
 arrow.innerHTML = '&nbsp;&gt;';
 // Feel free to replace the above two lines with these for a small arrow image...
 //arrow = document.createElement('img');
 //arrow.src = 'arrow.gif';
 //arrow.style.borderWidth = '0';
 arrow.className = 'subind';
}


// You may wish to leave your menu as a visible list initially, then apply its style
// dynamically on activation for better accessibility. Screenreaders and older browsers will
// then see all your menu data, but there will be a 'flicker' of the raw list before the
// page has completely loaded. If you want to do this, remove the CLASS="..." attribute from
// the above outermost UL tag, and uncomment this line:
//addEvent(window, 'load', new Function('getRef("listMenuRoot").className="menulist"'));


// To create more menus, duplicate this section and make sure you rename your
// menu object to something different; also, activate another <ul> list with a
// different ID, of course :). You can hae as many menus as you want on a page.

//]]>

////script>





var Geom = {};
//var listMenu = new Object();
// things to do onload...
addEvent(window, 'load', function() {
/*	getWinX/Y(): return the position of the window on the screen
	getInnrW/H(): return the size of the browser viewport (inner width/height) area
	getDocW/H(): return the size of the document
	getScrH(): return the position of the horizontal scrollbar
	getScrV(): return the position fo the vertical scrollbar */
//	if (window.screenLeft) { // IE and others
//		Geom.getWinX = function() { return window.screenLeft; };
//		Geom.getWinY = function() { return window.screenTop; };
//	}
//	else if (window.screenX) { // FF and others
//		Geom.getWinX = function() { return window.screenX; };
//		Geom.getWinY = function() { return window.screenY; };
//	}
	if(window.innerWidth) { // ALL browsers - except IE
		Geom.getInnrW = function() { return window.innerWidth; };
		Geom.getInnrH = function() { return window.innerHeight; };
		Geom.getScrH = function() { return window.pageXOffset; };
		Geom.getScrV = function() { return window.pageYOffset; };
	}
	else if (document.documentElement && document.documentElement.clientWidth) {
		//These functions are for IE6 when there is a DOCTYPE
		Geom.getInnrW = function() { return document.documentElement.clientWidth; };
		Geom.getInnrH = function() { return document.documentElement.clientHeight; };
		Geom.getScrH = function() { return document.documentElement.scrollLeft; };
		Geom.getScrV = function() { return document.documentElement.scrollTop; };
	}
	else if (document.body.clientWidth) {
		//These functions are for IE4, IE5, and IE6 when there is NO DOCTYPE
		Geom.getInnrW = function() { return document.body.clientWidth; };
		Geom.getInnrH = function() { return document.body.clientHeight; };
		Geom.getScrH = function() { return document.body.scrollLeft; };
		Geom.getScrV = function() { return document.body.scrollTop; };
	}
//	// The following functions return the size of the DOCUMENT, not the window.
//	if  (document.documentElement && document.documentElement.scrollWidth) {
//		Geom.getDocW = function() { return document.documentElement.scrollWidth; };
//		Geom.getDocH = function() { return document.documentElement.scrollHeight; };
//	}
//	else if (document.body.scrollWidth) {
//		Geom.getDocW = function() { return document.body.scrollWidth; };
//		Geom.getDocH = function() { return document.body.scrollHeight; };
//	}
	ceibw = d.getElementById('ceibw');
//	var ceibwT = parseInt(((Geom.getInnrH() - ceibw.offsetHeight) / 2) - 60);
//	if (ceibwT < 25) { ceibwT = 25; }
//	ceibw.style.top = ceibwT + 'px';
	ceibw.style.visibility = 'visible';
	//document.getElementsByTagName('title')[0].text = defaultTitle;
//	getRootPath();
//	makeMenu();
//	makeCopyFtr();
	ceibw.onclick = new Function('listMenu.hideAll()');
	fullscr = d.getElementById('fullscr');
//	fullscr.onclick = new Function('listMenu.hideAll()');
});
addEvent(window, 'load', new Function('listMenu.activateMenu("listMenuRoot", null)'));

//addEvent(window, 'resize', function() {
//	var ceibwT = parseInt(((Geom.getInnrH() - ceibw.offsetHeight) / 2)) - 60;
//	if (ceibwT < 25) { ceibwT = 25; }
//	ceibw.style.top = ceibwT + 'px';
//	if (isitIE6 === true) { if(Geom.getInnrH() > 625) {fullscr.style.height = Geom.getInnrH() +'px'; } }
//	if (tipIsUp) {
//		if (tipIsUp === true) {
//			oSize_bg.style.width = Geom.getInnrW() + 'px';
//			oSize_bg.style.height = Geom.getInnrH() + 'px';
//		}
//	}
//});

