/* shwv.P104090729 */
/* (c)2009 SugarHill Works LLC - http://www.sugarhillworks.com */


//
//
//
//
//// ********************************************************************************************************** //
//// ********************************************************************************************************** //
//// *********************************                                        ********************************* //
//// *********************************      DO NOT EDIT BELOW THIS LINE       ********************************* //
//// *********************************                                        ********************************* //
//// ********************************************************************************************************** //
//// ********************************************************************************************************** //










// this controls the plain links in the footer div
//function makeFtrMenu() {
//	var menuParent = document.getElementById('info');
//	menuParent.innerHTML = '';
//	var menu = document.createElement('ul');
//	menu.className = 'ftrLnks';
//	for (var i = 0; i < ftrMenuItems.length; i++) {
//		ftrMenuItems[i].li = document.createElement('li');
//		// the following if statement classes the leftmost li tag to align correctly
//		if(i == 0) {
//			ftrMenuItems[i].li.className = 'left';
//		}
//		ftrMenuItems[i].a = document.createElement('a');
//		ftrMenuItems[i].a.className = 'txtlnk';
//		if(ftrMenuItems[i].mLink == 'Client Login') {
//			ftrMenuItems[i].a.className = 'nolnk';
//		}
//		if(ftrMenuItems[i].mHref == '#') {
//			ftrMenuItems[i].a.href = '#';
//		} else {
//			ftrMenuItems[i].a.href = rootPath + ftrMenuItems[i].mHref;
//		}
//		ftrMenuItems[i].a.innerHTML = ftrMenuItems[i].mLink.replace(/\s/g, '&nbsp;');
//		ftrMenuItems[i].li.appendChild(ftrMenuItems[i].a);
//		
//		menu.appendChild(ftrMenuItems[i].li);
//	}
//	menuParent.appendChild(menu);
//	
//	var ftr_p = document.createElement('p');
//	ftr_p.innerHTML = 'Copyright &copy; <a href=\"http://sugarhillworks.com\", onclick=\"newWin=window.open(this.href,\'new_win\');newWin.focus();return false;\">Site by SugarHill Works</a>.'; 
//	menuParent.appendChild(ftr_p);
//}


var newWin; //this opens the SHW site in another window
function makeCopyFtr() {
	var copyParent = document.getElementById('copy');
	copyParent.innerHTML = '';	
	//copyParent.className = '';
	var copy_p = document.createElement('p');
	copy_p.innerHTML = 'All images &copy; 2009 Elena Seibert.&nbsp;&nbsp;&nbsp;<a href=\"http://sugarhillworks.com\" onclick=\"newWin=window.open(this.href,\'new_win\');newWin.focus();return false;\">Site by SugarHill Works</a>.'
	copyParent.appendChild(copy_p);
}







// assign global vars  ----------------------------------------------
//addEvent(window, 'load', function() {
$(window).ready(function(){
	fullscr = document.getElementById('fullscr');
	ceibw = document.getElementById('ceibw');
	copy = document.getElementById('copy');
	ftr = document.getElementById('ftr');
});
// ------------------------------------------------------------------




// vertical centering  ----------------------------------------------
//var v_offset;
//function vCenter() {
//	v_offset = .5;// value from 0 to 2, 0 = top aligned, 1 = centered, 0.5 = closer to top, 1.5 = closer to bottom, 2 = bottom aligned
//	if (copy) { var copyH = copy.offsetHeight; } else { var copyH = 0; }
//	if (ftr) { var ftrH = ftr.offsetHeight; } else { var ftrH = 0; }
//	var t = Math.round((((fullscr.offsetHeight - copyH - ftrH) - (ceibw.offsetHeight)) / 2) * v_offset);
//	if (t < 0) { t = 0; }
//	ceibw.style.top = t + 'px';
//	var fh = (ceibw.offsetTop + ceibw.offsetHeight + copyH + ftrH);
//	if (fullscr.offsetHeight < (fh + 2)) { 
//		fullscr.style.height = fh + 'px';
//	} else {
//		fullscr.style.height = '100%';
//	}
//}
//addEvent(window, 'load', function() {
//	vCenter();
//});
//addEvent(window, 'resize', function() {
//	fullscr.style.height = '100%';
//	vCenter();
//});
// ------------------------------------------------------------------


var h_limit, pagebody;
//addEvent(window, 'load', function() {
$(window).ready(function(){
	getRootPath();
	makeMenu();
	//makeFtrMenu();
//	pagebody = document.getElementsByTagName('body');
//	if (pagebody[0].id === 'home') { h_limit = 665; } else { h_limit = 795; }
//	if (fullscr.offsetHeight > h_limit) {
//		ceibw.style.height = (fullscr.offsetHeight - 70) + 'px';
//	}
//	makeCopyFtr();
});

//addEvent(window, 'resize', function() {
//	if (!fullscr) { return };
//	fullscr.style.height = '100%';
//	if (fullscr.offsetHeight > h_limit) {
//		ceibw.style.height = (fullscr.offsetHeight - 70) + 'px';
//	}
//});
//addEvent(window, 'load', new Function('listMenu.activateMenu("listMenuRoot", null)'));


//addEvent(window, 'load', function() {
//});
//addEvent(window, 'load', function() {
//});


