// Copyright (c) 2006 by My Pattern Designer, LLC 

function jsinclude(script_filename) {
    document.write('<' + 'script');
    document.write(' language="javascript"');
    document.write(' src="' + script_filename + '">');
    document.write('</' + 'script' + '>');
}
var manFlag = false;
var loc = "";
var d1 = "<a href='mailto:";
var d2 = "";
var d3 = "@MyPatternDesigner.com";
var d4 = "";

jsinclude ("ua.js");
jsinclude ("ftiens4.js");
jsinclude ("Menu.js");

function CreateHeader(path)
{
	var tall=document.body.clientHeight;
	var headerHeight=50;
	var clientHeight=tall-headerHeight;
	var edge=220;
	var wide=document.body.clientWidth-edge;
	if (navigator.org=="mozilla")
		wide -= 20;	
	var Calendar = new Date();
	var pic_count=20;
	var type="";
	loc = path;

	if (manFlag)
	{
		pic_count=10;
		type="m";
	}

	num=(Calendar.getSeconds() % pic_count) + 1;

	// logo
	document.write('<A HREF="'+path+'/Home.htm"><IMG BORDER="0" ALT="My Pattern Designer Homepage" SRC="'+path+'/images/MPDsmallLogo2.gif" STYLE="position: absolute; left: 0; top: 0; z-index:5" WIDTH="263" HEIGHT="89"></A>');

	// tree view
	document.write('<TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">');
	document.write('<TR><TD>');
	document.write('<A STYLE="font-size:14pt;text-decoration:none;color:#A7CCFF" HREF=http://www.treemenu.net/ TARGET=_blank>Javascript Tree Menu</A>');
	document.write('</tr></TD></TABLE>');
	document.write('<SPAN CLASS="TreeviewSpanArea">');
	document.write('<SCRIPT>');
	document.write('initializeDocument()');
	document.write('</SCRIPT>');
	document.write('<NOSCRIPT>');
	document.write('A tree for site navigation will open here if you enable JavaScript in your browser.');
	document.write('</NOSCRIPT>');
	document.write('</SPAN><p><p>');

	// model
	document.write('<img border="0" src="'+path+'/images/Fashions/'+type+'Pic'+num+'.gif" align="left" hspace="20"></p>');

	// now the header across the top with the buttons
	document.write('<table cellspacing="0" cellpadding="0" border="0" class="HeaderTable" style="position: absolute; left: '+edge+'; width: '+wide+'; top: 0; height: '+headerHeight+'; z-index: 1>');
	document.write('<TR HEIGHT="50">');
//	document.write('<td style="width: 24;">&nbsp;</td>');
	document.write('<td align="center">');

	document.write('<table><td><FORM ACTION="http://search.freefind.com/find.html" METHOD="GET" accept-charset="utf-8" target="_self"> ');
	document.write('<INPUT TYPE="HIDDEN" NAME="id" VALUE="12905290">');
	document.write('<INPUT TYPE="HIDDEN" NAME="pid" VALUE="r">');
	document.write('<INPUT TYPE="HIDDEN" NAME="mode" VALUE="ALL"> ');
	document.write('<INPUT type="HIDDEN" name="n" value="0">');
	document.write('<INPUT TYPE="HIDDEN" NAME="_charset_" VALUE="">');
	document.write('<INPUT TYPE="HIDDEN" NAME="bcd" VALUE="&#247;">');
	document.write('<INPUT TYPE="TEXT" NAME="query" SIZE="20">');
	document.write('<INPUT TYPE="SUBMIT" VALUE=" Find! ">');
//	if (wide > 600)
//		document.write('<input type="SUBMIT" name="sitemap" value="Site Map">');
	document.write('</td></table></center></FORM>');

//	document.write('<FORM action="search.asp" method="GET" ID="Form1">');
//	document.write('&nbsp;&nbsp;<INPUT type="text" size="20" name="searchPhrase" ID="Text1">');
//	document.write('<INPUT type="submit" value="Search" ID="Submit1" NAME="Submit1">');
//	document.write('</FORM>');
	document.write('</td>');
	document.write('<td align="right">');
//	document.write('<FONT color="#FFFF00" SIZE="2"><B>Place orders on-line or by calling (800) 316-6354</B> &nbsp;&nbsp;&nbsp;<BR>');
	document.write('<A HREF="/Secure/YourAccount.aspx"><IMG ALT="Check your account" BORDER="0" SRC="'+path+'/images/menu/MPDyourAccount.gif" WIDTH="100" HEIGHT="25"></A> ');
	document.write('&nbsp <A HREF="/ShoppingCart.aspx"><IMG ALT="Go to Your Shopping Cart" BORDER="0" SRC="'+path+'/images/menu/MPDcart.gif" WIDTH="100" HEIGHT="25"></A> ');
	document.write('&nbsp <A HREF="'+path+'/MPDhelp.htm"><IMG ALT="Get some help" BORDER="0" SRC="'+path+'/images/menu/MPDhelp.gif" WIDTH="100" HEIGHT="25"></A>');
	document.write('</TD>');
	document.write('</TR>');
	document.write('</table>');

	// now open a table that represents the inner display area (the end of this table is in footer.js
	document.write('<table cellspacing="0" cellpadding="0" border="0" style="position: absolute; left: '+edge+'; width: '+wide+'; top: '+headerHeight+'; height: '+clientHeight+'">');
	document.write('<tr><td align="left" valign="top" width="100%">');

}

