var mainPath = "/",
	imgDir = mainPath + "img/",
	pages = [
		newPage( "Home",			mainPath + "", "" ),
		newPage( "Our Practice",	mainPath + "successes.html",	""),
		newPage( "Dismissed Cases",	mainPath + "dismissals.html",		""),
		newPage( "Client Letters",	mainPath + "letters.html",		"")
	],
	activePage = location.pathname,
	casper = mainPath + "img/casper.gif";

function newPage( name, href, banner ) {
	var thisPage = new Object();
	thisPage.name = name;
	thisPage.href = href;
	thisPage.banner = banner;
	return thisPage;
}

function header() {
	var x, currentBanner,
		ear = '<table border="0" cellpadding="0" cellspacing="0" width="200" height="63" align="right">'
				+ '\n<tr><td width="40" class="contact"><img src="' + casper + '" width="40" height=1 alt=""></td>'
				+ '\n	<td width="160" valign="middle" align="left" class="contact">'
				+ '\n		<img src="' + imgDir + 'phone.gif" alt="phone.gif" width="14" height="15" align="top"> &nbsp;323.651.3640<br />'
				+ '\n		<img src="' + imgDir + 'fax.gif" alt="fax.gif" width="14" height="15" align="mid"> &nbsp;323.651.1705<br />'
				+ '\n		<img src="' + casper + '" width="1" height="4" alt=""><br >'
				+ '\n		<a href="mailto:azarelihu@hotmail.com">azarelihu@hotmail.com</a></td></tr></table>',
		out = '\n<table border="0" cellpadding="0" cellspacing="0" width="100%" class="marquee">'
			+ '\n<tr><td width="350" valign="middle" align="right"> &nbsp; LAW OFFICES OF AZAR ELIHU<br>'
			+ '\n		<span class="slogan">criminal defense for the rest of us</span></td>'
			+ '\n	<td align="right">' + ear + '</td>'
			+ '\n</tr>\n</table>'
			+ '\n<table id="tabs" border"0" cellpadding="0" cellspacing="0" width="100%">';
	for ( x=0; x < pages.length; x++ ) {
		var thisLink = pages[x];
		if ( thisLink.href == activePage ) {
			out += '\n	<td><div class="activeLink">' + thisLink.name + '</div></td>';
			currentBanner = thisLink.banner;
		}
		else
			out += '\n	<td><a href="' + thisLink.href + '">' + thisLink.name + '</a></td>';
	}
	out += '\n</table>';
	document.write( out );
}

function footer()
{
	var out = '';
	out += '\n<div id="footer">The information provided in this website is offered for informational purposes only, and not offered as legal advice. Nothing posted on this website, including Clients\' letters and Dismissed cases, guarantees the success or outcome of your case.</div>';
	document.write( out );
}

function Debug(str,code) {
	var str_debug = '', win_debug;
	if ( code ) str_debug += '<plaintext>';
	str_debug += '<body style="margin: 0px 0px 0px 0px;">\n\n' + str + '\n\n</body>';
	win_debug = window.open('', '', 'width=500,height=600,resize');
	win_debug.document.write(str_debug);
}


