var street_num = '412';
var street_name = 'Glascock';
var street_cd = 'St.';
var unit = '';
var city = 'Raleigh';
var state = 'North Carolina';
var zip_cd = '27604';

var bphone = '(919) 357-2489';
var kphone = '(919) 357-1651';

var bemail = 'barronh@gmail.com';
var kemail = 'kkhenderson@gmail.com';


function link_item(tmpPath, tmpName) {
	this.name = tmpName;
	this.path = tmpPath;
};

function picture_item(picPath, picName, picDate) {
	this.name = picName;
	this.path = picPath;
	this.date = picDate;
};

var menu_items = [
	new link_item('main.html','Main'),
	new link_item('pictures.html','Pictures'),
//	new link_item('floorplan.html','Our House'),
	new link_item('games.html','Games'),
	new link_item('archives.html','Archives'),
	new link_item('aboutus.html','More about us')
//	new link_item('baby.html','Baby Stuff')
];

var archive_items = [
	new link_item('http://home.texoma.net/~barronh/savethedate.html', 'Save the Date!'),
	new link_item('http://home.texoma.net/~barronh/party.html', 'House Warming Party!')
];

var picture_items = [
	new picture_item('http://picasaweb.google.com/barronh/6To7Months','6 to 7 Months Old','September \'08'),
	new picture_item('http://picasaweb.google.com/barronh/5MonthsOld','More from 5 Months Old','July \'08'),
	new picture_item('http://picasaweb.google.com/barronh/4To5Months','Baxter 4 to 5 Months','June \'08'),
	new picture_item('http://picasaweb.google.com/barronh/2To3MonthsOld','Baxter 2 to 3 Months','Mar \'08'),
	new picture_item('http://picasaweb.google.com/barronh/PhotoShoot','Baxter Photo Shoot','Mar \'08'),
    new picture_item('http://picasaweb.google.com/barronh/BaxFirstMonth','Baxter\'s First Month','Jan \'08'),
    new picture_item('http://picasaweb.google.com/barronh/BaxterFace','Jay Baxter\'s Face', 'Dec \'07'),
    new picture_item('http://picasaweb.google.com/barronh/BirthOfJayBaxter?authkey=POoS-hZATS8','Jay Baxter Arrives!', 'Dec \'07'),
    new picture_item('http://picasaweb.google.com/barronh/Maternity','Maternity looks good!', 'Oct \'07'),
    new picture_item('http://picasaweb.google.com/barronh/Summer2007','A Golden Summer!', 'Oct \'07'),
    new picture_item('http://picasaweb.google.com/barronh/Sonograms','Sonograms!', 'Aug \'07'),
	new picture_item('http://picasaweb.google.com/barronh/412Glascock', '412 Glascock St', ' May \'07'),
	new picture_item('http://www.kodakgallery.com/I.jsp?c=ode36aq.b79qh6wi&x=0&y=7ut6z', 'Ecuador <em>Updated 7/06</em>', 'June \'06'),
	new picture_item('http://www.kodakgallery.com/I.jsp?c=ode36aq.1mjwbzu6&x=0&y=lpqqti', 'Summer/Spring Pictures <em>Updated 7/06</em>', 'Jan \'06 - Jun \'06'),
	new picture_item('http://www.kodakgallery.com/Slideshow.jsp?mode=fromshare&Uc=8p83rd3d.bcwk3101&Uy=edzyqd&Ux=0', 'Fall/Winter Pictures <em>Updated 4/06</em>', 'Aug \'05 - Apr \'06'),
	new picture_item('http://www.kodakgallery.com/I.jsp?c=8p83rd3d.1fnu6dl1&x=0&y=-skvhev','Summer Pictures <em>Updated 9/05</em>', 'May \'05 - September \'05'),
	new picture_item('http://www.kodakgallery.com/I.jsp?c=ode36aq.am2r1eqy&x=0&y=vq4qlq', 'Chapel Hill <em>Updated 5/05</em>', 'October \'04 - May \'05'),
	new picture_item('http://www.ofoto.com/I.jsp?c=ode36aq.ibagm1i&x=0&y=l55zsa', 'Honeymoon Pics! <em>Updated 7/04</em>', 'June 14-21 2004'),
	new picture_item('http://www.ofoto.com/I.jsp?c=ode36aq.86xlrz6&x=0&y=7odo2v', 'Wedding Pics!<em>Updated 9/6/2004</em>', 'June 11-13 2004')
];

function getArgs() {
	var args = new Object();
	var query = location.search.substring(1);
	var pairs = query.split(',');
	for(var i = 0; i < pairs.length; i++) {
		var pos = pairs[i].indexOf('=');
		if(pos == -1) continue;
		var argname = pairs[i].substring(0,pos);
		var value = pairs[i].substring(pos+1);
		args[argname] = unescape(value);
	};
	return args;
};

function strMenuMaker(strClassName) {
	var tmpOutput = '';
	var separator = '';

	tmpOutput += '<ul class="' + strClassName + '">';

	for(var i = 0; i < menu_items.length; i++) { 
		tmpOutput += separator;
		tmpOutput += '<li><a href="' + menu_items[i].path + '">' + menu_items[i].name + '</a></li>';
		separator = '';
	};

	tmpOutput += '</ul>';
	return tmpOutput
};

function archives() {
	var separator = '';

	for(var i = 0; i < archive_items.length; i++) {
		this.document.write('<p class="archives"><A href="' + archive_items[i].path + '" target="_Blank">' + archive_items[i].name + '</A></p>');
	};
};

function pic_table() {
	var table_width = '80%';
	var col_1_width = '30%';
	var col_2_width = '70%';
	
	this.document.write(	'<table width="' + table_width + '" border=1 class="PictureTable">' +
					'<tr>' +
						'<th width="' + col_1_width + '">' +
							'Date' +
						'</th>' +
						'<th class="picevent" width="' + col_2_width + '">' +
							'Event' +
						'</th>' +
					'</tr>');

	for(var i = 0; i < picture_items.length; i++) {
		this.document.write(	'<tr>' +
						'<td class="picdate" width="' + col_1_width + '">' + 
							picture_items[i].date + 
						'</td>' +
						'<td class="picevent" width="' + col_2_width + '">' +
							'<A href="' + picture_items[i].path + '" target="_blank">' + 
								picture_items[i].name + 
							'</A>' +
						'</td>' +
					'</tr>');
	};
	
	this.document.write(	'</table><br>');
};

function header() {
	var hlinks = strMenuMaker('HeaderLinks');
	this.document.write(	'<IMG class="TopLeft" height=72 src="pictures/flowers.gif" width=54><IMG class="TopRight" height=72 src="pictures/flowers.gif" width=54>' +
				'<H1>The Adventures of <br>' +
				'Barron &amp; Katherine Henderson</H1>');
	this.document.write(hlinks);
	this.document.write(	'<hr class="headerBar" border=0 noshade></hr>');
};

function footer() {
	var flinks = strMenuMaker('FooterLinks');
	this.document.write(	'<hr class="footerBar" border=0 noshade></hr>');
	this.document.write(flinks);
	this.document.write(		'<H3>' +
						'Barron &amp; Katherine Henderson' +
						'<br>' +
						street_num + ' ' + street_name  + ' ' + street_cd + ' ' + unit + '&nbsp; -&nbsp;' +
						city + ', ' + state + '&nbsp; -&nbsp; ' + zip_cd +
						'<br>' +
						'B Cell:&nbsp;' + bphone + '&nbsp;-&nbsp;K Cell:&nbsp;' + kphone +
						'<br>' +
						'<A href="mailto:' + bemail + '">' + bemail + '</a>' + 
						'&nbsp;- ' + 
						'<A href="mailto:' + kemail + '">' + kemail + '</a>' + 
					'</H3>');
};

function showLayer(event, strLayer)
{
	var flyLayer = document.getElementById(strLayer);
	
	var lyrStyle = flyLayer.style;
	lyrStyle.visibility = 'visible';
}

function hideLayer(strLayer)
{
	var flyLayer = document.getElementById(strLayer);
	
	var lyrStyle = flyLayer.style;
	lyrStyle.visibility = 'hidden';
	
}
