function Page(pagename){
	this.name=pagename;
	this.backgroundImage=PAGE_BACKGROUND;
	this.pageHtml="Page: HTML not created...";
	this.layout=false;
	this.hasGoBack=false;
}
function page_createPageHeader(){
  // main table (4 row, 2 col)
	var header="<table width='"+(PAGE_WIDTH+20)+"' "+
	"height='"+(PAGE_HEIGHT+20)+"' "+
	"cellpadding=0 cellspacing=0 "+
	"style='background-image:url("+this.backgroundImage.src+"); "+
	"background-position:top left; bachground-repeat: no-repeat;'>"+
	"<tr height=50>"+				// row 1
	"<td rowspan=3>"+
	"<img src='" + wPath + "transparent.gif' width=6 height=1 border=0/>"+
	"</td>"+
	"<td ";
	if(this.layout)header+=" style='border: 1px dotted green;'";
	header+=">";
  // header table (1 row, 2 col)
	header+="<table width=100% cellspacing=0 cellpadding=0 ";
	if(PAINT_DIVIDERS)header+="style='border-bottom:1px solid " + LIGHT_COLOR + ";' ";
	header+=">"+
	"<tr><td>"+
	"<img src='"+PAGE_LOGO+"' border=0 vspace=4 />"+
	"</td>"+
	"<td align=center>"+top.navbar.getHtml()+"</td>"+
	"</tr></table>";
  // main table
	header+="</td>"+
	"<td rowspan=3>"+
	"<img src='" + wPath + "transparent.gif' width=6 height=1 border=0 />"+
	"</td><td width=20 rowspan=3 "+
	"style='background-image:url("+wPath+"backgroundShadow_right.jpg); "+
	"background-repeat: repeat-y;'>"+
	"<img src='"+wPath+"transparent.gif' width=20 height=1 border=0>"+
	"</td></tr><tr><td";
	if(this.layout)header+=" style='border: 1px dotted green;' ";
	header+=">";
	return header;
}
function page_createPageFooter(){
  // main table
	var footer="</td></tr><tr>"+				// row 3
	"<td height=34";
	if(this.layout)footer+=" style='border:1px dotted green; '";
	footer+=">";
  // footer table (1 row, 2 col)
	footer+="<table width=100% cellspacing=4 cellpadding=0 ";
	if(PAINT_DIVIDERS)footer+="style='border-top:1px solid "+LIGHT_COLOR+";' ";
	footer+="><tr><td>"+
	"<img src='"+wPath+"Baba_icon.jpg' title='\"Be happy. I am always happy.\"' "+
	"style='cursor:pointer; border:1px solid #d6d6d6;' "+
	"onclick='top.actionPerformed(\"Sathya Sai Baba\")' "+
	"onmouseover='this.style.border=\"1px solid blue\"' "+
	"onmouseout='this.style.border=\"1px solid #d6d6d6\"'> &nbsp;"+
	"</td><td style='font-size:7pt;color:"+DARK_COLOR+"'>"+PAGE_FOOTER+"</td>"+
	"<td align=center title='send email to Jane'>"+
	"<a href='mailto:janed@san.rr.com'>"+
	"<img src='"+wPath+"email.gif' width=40 height=24 border=0></a>"+
	"</td><td align=center><img src='"+wPath+"paymentcards.gif'></td>"+
	"</tr></table>"+
  // main table
	"</td></tr><tr>"+				// row 4
	"<td height=20 colspan=3 "+
	"style='background-image:url("+wPath+"backgroundShadow_bottom.jpg); "+
	"background-repeat:repeat-x;'>"+
	"<img src='"+wPath+"transparent.gif' width=1 height=20 border=0>"+
	"</td>"+
	"<td style='background-image:url("+wPath+"backgroundShadow_corner.jpg); "+
	"background-repeat:no-repeat;' >"+
	"<img src='"+wPath+"transparent.gif' width=20 height=20 border=0 />"+
	"</td></tr></table>"+
	"<div align=center style='color:#efe9e3;'><small>Jane Darin Studio, 5430 Linda Vista Road #12, "+
	"San Diego, Ca 92111<br />phone: (619) 684-5196 &nbsp; &nbsp; email: "+
	"<a href='mailto:janed@san.rr.com'>janed@san.rr.com</a></small></div>";
	return footer;
}
function page_createPageHtml(pagecontent){
	var content=this.createPageHeader();

	if(this.hasGoBack){
		content+="<div style='position:absolute;'>"+
		"<img src='"+wPath+"transparent.gif' width=1 height=16/><br />"+
		"<img src='"+wPath+"goBack.gif' width=104 height=18 style='cursor:pointer;' "+
		"title='previous page' onclick='top.navbar.fireActionPerformed(top.navbar.selectedIndex)'/>"+
		"<br /><img src='"+wPath+"transparent.gif' width=1 height=10/></div>";
	}

	if(typeof(pagecontent)=="object")content+=pagecontent.getHtml();
	else content+=pagecontent;
	content+=this.createPageFooter();
	this.pageHtml=content;
}
function page_getHtml(){return this.pageHtml;}
function page_paintLayout(paint){this.layout=paint;}
Page.prototype.createPageFooter=page_createPageFooter;
Page.prototype.createPageHeader=page_createPageHeader;
Page.prototype.createPageHtml=page_createPageHtml;
Page.prototype.getHtml=page_getHtml;
Page.prototype.paintLayout=page_paintLayout;