// JavaScript Document

<!--

//Determine if there is an existing query string.
var strQueryString = location.search.substring(1); 
//alert(strQueryString);
var blnQueryStringExists;

if (strQueryString.length > 0) {
	blnQueryStringExists = true
}
else {
	blnQueryStringExists = false
}


var strPrintableVersionLink;
var strThisPage;
var regexPattern;
var blnDisplayPrintableVersion;

regexPattern = /print=yes/;

strThisPage = document.location;

if (regexPattern.test(strThisPage)) {
	blnDisplayPrintableVersion = "True";
	strPrintableVersionLink = strThisPage;
}
else {
	blnDisplayPrintableVersion = "False";

	if (blnQueryStringExists){
		strPrintableVersionLink = strThisPage + "&print=yes";
	}
	else {
		strPrintableVersionLink = strThisPage + "?print=yes";
	}
}


if (blnDisplayPrintableVersion == "True") {
	//alert("Display Printable Version");
	//Import style sheet for printable version here.
	document.write('<link rel="stylesheet" type="text/css" href="/homeownerplan/lib/print.css">');
}
else {
	//alert("Display Regular Version");
}

if (blnDisplayPrintableVersion == "False") {

				document.write('<div id="story">');
							
						}
						
				else { 
				document.write('<div id="storyprint">');
				
				} 

//-->
