/*
 *  ElenaPhoto.com
 *  Javascript functions for web design.
 *  (c) 2009 Elena Elisseeva
 *  requires associated wise.css stylesheet
 */
function copyright() {
	document.write("&copy; 2006-2010 <a href='mailto:elena@elenaphoto.com'>Elena Elisseeva</a> - All rights reserved.");
}

var showcount = false;
function contentStart(page, titleH1) {
	document.write("<table width=100% height=100% class='outer'><tr><td bgcolor=#303030>&nbsp;</td><td class='inner' valign=top align=center width=850px>");

	document.write("<table width=100%><tr valign=top>");
	if (titleH1 == undefined) {
		titleH1 = "PHOTOGRAPHY<br>by ELENA ELISSEEVA";
	}

	document.write("<td>&nbsp;</td><td><center><h1>"+titleH1+"</h1></center></td>");
	document.write("</tr>");
	document.write("<tr><td valign=top width=10%>");
	if (page == "0") showcount = true;
	navbar(page);
	document.write("</td><td class=contentCell valign=top>");
}

function contentEnd() {
	document.write("</td></tr>");
	document.write("<tr><td>&nbsp;</td><td>");
	document.write("<p class=copyright><script type='text/javascript'>copyright()</script></p></td></tr>");
	if (showcount) showCount();
	document.write("</table></center>");
	
	document.write("</td><td bgcolor=#303030>&nbsp;</td></tr></table>");

}

function showCount() {
	document.write("<tr><td></td><td align=center>");
	document.write("<p style='padding-top:25;padding-bottom:200'>");
	document.write("<img SRC='http://www.elenaphoto.com/cgi-bin/Count.cgi?df=elenaphoto_com.dat&ft=0&srgb=00ff00&prgb=909090&dd=D&trgb=000000&pad=N' NOSAVE>");
	document.write("<br><font size=-1>visitors since<br>May 30, 2006</font>");
	document.write("</td></tr>");
}

function navbar(page) {
	document.write("<br/><br/><br/><table style='border-right-style:solid; border-right-color:rgb(200,200,200); border-right-width:thin'>");
	navbarEntry(page, 0, "Home", "index.html");
	navbarEntry(page, 1, "Profile", "profile.html");
	navbarEntry(page, 2, "License&nbsp;Images&nbsp;&nbsp;", "license.html");
	// navbarEntry(page, 3, "Fine&nbsp;Art&nbsp;Prints", "prints.html");
	navbarEntry(page, 4, "Contact", "contact.html");
	navbarEntry(page, 5, "Info for Models", "modelinfo.html");
	document.write("</table>");
}

function navbarEntry(pagenow, page, text, url){
	document.write("<tr>");
	if (page == pagenow) {
		document.write("<td style='color:white'>");
	}
	else {
		document.write("<td style='color:gray'><a class=nav href=\""+url+"\">");
	}
	document.write(text);
	if (page != pagenow) {
		document.write("</a>");
	}
	document.write("</td></tr>");
}
