var browser_url = Url.decode(document.location); // Decode spaces, etc. from URL to allow string functions
var services_url = "services";
var prem_url = "Premium";
var std_url = "Standard";
var editorial_url = "editorial";
var design_url = "pagedesign";
var isbn_url = "ISBN";
var copy_url = "copyedit";

// Set defaults if no values passed in
if(typeof luluIFrameURL == "undefined") {
	var luluIFrameURL = "http://www.lulu.com/partners/borders/";
} else {
	if(luluIFrameURL == null) { luluIFrameURL = "http://www.lulu.com/partners/borders/"; }
}
if(typeof luluIFrameWidth == "undefined") {
	var luluIFrameWidth = "764px;";
} else {
	if(luluIFrameWidth == null) { luluIFrameWidth = "764px;"; }
}

if(typeof luluIFrameHeight == "undefined") {
	var luluIFrameHeight = "617px;";
} else {
	if(luluIFrameHeight == null) { luluIFrameHeight = "618px;"; }
}

document.writeln('<div class="content_container"> ');
document.writeln('	<div class="fakeBookNav"> ');
document.writeln('		<div class="fakeBookNavBottom"> ');
document.writeln('			<!-- left column --> ');
document.writeln('			<div class="booksBrowseColumn"> ');
document.writeln('				<div class="narrow_results_by"> ');
document.writeln('				   <ul> ');
document.writeln('						<li class="liHeader">Personal Publishing</li> ');
document.writeln('							<li class="liSubHeader"> ');
document.writeln('								<ul><a href="../index.html">Home</a></ul> ');
document.writeln('								<ul><a href="../register/index.html">Sign up for free</a></ul> ');
document.writeln('								<ul><a href="../info/index.html">Program Info</a></ul> ');
document.writeln('								<ul><a href="../demo/index.html">View Demo</a></ul> ');
document.writeln('								<ul><a href="../services/index.html">Author Services</a>	  		 ');

// If this is an author services page then show full subnav
if(
	browser_url.indexOf(services_url) > 0 ||
	browser_url.indexOf(prem_url) > 0 ||
	browser_url.indexOf(std_url) > 0 ||
	browser_url.indexOf(editorial_url) > 0 ||
	browser_url.indexOf(design_url) > 0 ||
	browser_url.indexOf(isbn_url) > 0 ||
	browser_url.indexOf(copy_url) > 0
)
{

	// Override height for Author Services iFrame so there is no vertical scroll bar, also reduce iFrame width as these pages are less wide than the others
	luluIFrameWidth = "748px";
	luluIFrameHeight = "870px";

	document.writeln('									<li><a href="../Premium/index.html">Premium Package</a></li>	 ');
	document.writeln('									<li><a href="../Standard/index.html">Standard Package</a></li>	 ');
	document.writeln('									<li><a href="../editorial/index.html">Editorial Evaluation</a></li>	 ');
	document.writeln('									<li><a href="../pagedesign/index.html">Interior Page Design & Formatting</a></li>	 ');
	document.writeln('									<li><a href="../ISBN/index.html">ISBN Registration</a></li>	 ');
	document.writeln('									<li><a href="../copyedit/index.html">Professional Copy Editing</a></li>	 ');
}

document.writeln('								</ul> ');
document.writeln('								<ul><a href="../redeem/index.html">Redeem Your Service</a></ul> ');
document.writeln('								<ul><a target="_blank" href="http://www.lulu.com/partners/borders/leaving.php?fNextLink=http://www.lulu.com/author/wizard/index.php?fWizard=book&fAction=sendBasicMetaDataPage">Start a New Project</a></ul> ');
document.writeln('								<ul><a href="../marketplace/index.html">Marketplace</a></ul> ');
document.writeln('								<ul><a href="../faq/index.html">FAQ</a></ul> ');
document.writeln('								<ul><a href="mailto:borderspub@lulu.com&subject=Lulu - Contact Us Inquiry">Contact Us</a></ul> ');
document.writeln('							</li><!-- end liSubHeader --> ');
document.writeln('						</li><!-- end liHeader --> ');
document.writeln('					</ul> ');
document.writeln('				</div><!-- end narrow_results_by --> ');
document.writeln('			</div><!-- end booksBrowseColumn --> ');
document.writeln('			 ');
document.writeln('			<iframe id="content_pane" ');
document.writeln('				src="' + luluIFrameURL + '" ');
document.writeln('				align="right" width="' + luluIFrameWidth + '" height="' + luluIFrameHeight + '" ');
document.writeln('				scrolling="auto" frameborder="0" marginheight="0" marginwidth="0"> ');
document.writeln('			</iframe> ');
document.writeln(' ');
document.writeln('		</div><!-- end fakebooknav Bottom --> ');
document.writeln('	</div><!-- end fakebooknav --> ');
document.writeln('</div><!-- content_container --> ');