var cart;

	
function login(cat, sub){
var userKey= readCookie('userCookie');
var myStuff = "";
valid = false;
	for(var i in user[cat][sub]){
    if ( document.login_form.username.value == user[cat][sub][i].login )
    {
			myStuff += "<div><h2>Welcome, " + user[cat][sub][i].name + "</h2>";
			myStuff += "<a href='#' onclick='showCart();'>View Holds</a> &nbsp;| ";
			myStuff += "<a href='#' onclick='logout();'> Logout</>";
document.getElementById('cart').innerHTML = myStuff;
        valid = true;
		createCookie("userCookie", userKey,1);
    }
	 if ( document.login_form.username.value != user[cat][sub][i].login )
    {
	alert("Password invalid");

	}	return false;
		
}
    }
	

function checkLogin(){

	if(document.cookie.indexOf("userCookie") == -1)
	{
	alert("The PINES redesign project is currently in Beta 2  in it's evolution and is not a fully functioning catalog.  There is only one predefined search.  The PINES catalog is intended for iterative usability testing as well as to demonstrate how the PINES catalog will behave upon completion.");


	   var myStuff = "<div>";

  				myStuff += "<table border='0'><tr><td><font face='Verdana, Sans-serif' size='1'>";
				myStuff += "<form name='login_form' onsubmit='return login(0,0);'>";
				myStuff += "<label for='username'>Library Card # | <a href='#.html' onclick='signUp();'>Sign Up</a></label><br />";
				myStuff += "<input type='password' maxlength='12' name='username' id='username' /><input type='submit' name='submit' value='Login' /></form></font>";
				myStuff += "</td></tr></table>";
} document.getElementById('cart').innerHTML = myStuff;

}







function showProducts(cat, sub)
{
previous = [cat, sub];
myString ="";
var userKey = readCookie("userCookie");

if(document.cookie.indexOf("userCookie") != -1)
{
			document.getElementById('contentTable').innerHTML = "";
			document.getElementById('welcomeContent').innerHTML = "";
			document.getElementById('title').innerHTML="Search Results";
			
			var myString = "<div>";

			for(var i in db[cat][sub])
				{
			document.getElementById('contentTable').innerHTML = myString;
					myString += "<table border='0' cellpadding='5' cellspacing='2'>";
					myString += "<tr><td valign='top' rowspan='4' width='85' height='140'>" + db[cat][sub][i].pic + "</td>";
					myString += "<td>" + db[cat][sub][i].title + "</td>" + "<td>" + db[cat][sub][i].format + "</td></tr>";
					myString += "<tr><td  colspan='2' style='font:normal 16px/1.2em Verdana, Sans-serif;color:#125959;'>" + db[cat][sub][i].author + "</td></tr>";
					myString += "<tr><td colspan='2' >" + db[cat][sub][i].detail + "</td></tr>";
					myString += "<tr><td colspan='2'><form name='libSelect' id='libSelect'>";
					myString += db[cat][sub][i].libraryOne + "<br />";
					myString += db[cat][sub][i].libraryTwo + "<br />" ;
					myString += db[cat][sub][i].libraryThree + "</td>";
					myString +="<input type='button' onclick='onHold(),add2cart(" + cat + "," + sub + "," + i + ");' value='place hold' /></form></td>";
					myString += "</tr><tr><td colspan='4' style='border-top:2px solid #030;'>&nbsp;</td></tr></table></div>"; 
					} 
						
						document.getElementById('welcomeContent').innerHTML = "";
						document.getElementById('title').innerHTML="Search Results";

			 }
			 else{
			document.getElementById('contentTable').innerHTML = "";
document.getElementById('welcomeContent').innerHTML = "";
document.getElementById('title').innerHTML="Search Results";

var myString = "<div>";

			for(var i in db[cat][sub])
				{
				document.getElementById('contentTable').innerHTML = myString;
					myString += "<table border='0' cellpadding='5' cellspacing='2'>";
					myString += "<tr><td valign='top' rowspan='6' width='85' height='140'>" + db[cat][sub][i].pic + "</td>";
					myString += "<td>" + db[cat][sub][i].title + "</td>" + "<td>" + db[cat][sub][i].format + "</td></tr>";
					myString += "<tr><td colspan='2' style='font:normal 16px/1.2em Verdana, Sans-serif;color:#125959;'>" + db[cat][sub][i].author + "</td></tr>";
					myString += "<tr><td colspan='2' >" + db[cat][sub][i].detail + "</td></tr>";
					myString += "</tr></table></div>"; 
								
					}	 
						
						document.getElementById('welcomeContent').innerHTML = "";
						document.getElementById('title').innerHTML="Search Results";
						
}
}
	


function calloutFaqs(){
	var calloutFaqs="";
			calloutFaqs += "<div style='background:transparent url(i/faqs.gif) no-repeat top;margin:0px 0px 0px 0px;border: 0px solid red;width:160px;height:269px;'><p class='faqs'> ";
			calloutFaqs += "<br />Find out the answers to the most <a href='#.html' onclick='showFaqs();'><strong>frequently asked questions</strong></a> about PINES, getting a library card and much more.";
			calloutFaqs += "</p></div>";

			document.getElementById('callouts').innerHTML = calloutFaqs;
			}


function showSubCat(cat, sub, prod)
{
previous = [cat, sub];
myString ="";
var userKey = readCookie("userCookie");

if(document.cookie.indexOf("userCookie") != -1)
{
			document.getElementById('contentTable').innerHTML = "";
			document.getElementById('welcomeContent').innerHTML = "";
			document.getElementById('title').innerHTML="Search Results";
	document.getElementById('contentTable').innerHTML = myString;		
			var myString = "<div>";

				for(var i in db[cat][sub][prod]);
				{
			document.getElementById('welcomeContent').innerHTML = "";
		myString += "<table border='0' cellpadding='3' cellspacing='2' style='font:normal 15px/1.2em Verdana, Sans-serif;'>";
		myString += "<tr ><td colspan='2' align='right' valign='top' style='font:normal 14px/1.2em Verdana, Sans-serif;color:blue;'><img src='i/flag_red.png' alt='Place Hold' title='Place this item on hold' border='0' /><a href='#.html' onclick='onHold(),add2cart(" + cat + "," + sub + "," + prod + ");' >Place Hold</a></td></tr>";
		myString += "<tr><td valign='top' width='25%' style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Title</strong></td>";
		myString += "<td align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db [cat][sub][prod].title + "</td></tr>";
		myString += "<tr><td valign='top' width='25%' style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Author</strong></td>";
		myString += "<td align='left' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].author + "</td></tr>";
		myString += "<tr><td  valign='top' width='25%' style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>ISBN</strong></td>";
		myString += "<td  align='eft' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].ISBN + "</td></tr>";
		myString += "<tr><td  valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Format</strong></td>";
		myString += "<td  align='eft' valign='top' width='75%' style='border-bottom:1px solid #030;'>" + db[cat][sub][prod].format + "</td></tr>";
		myString += "<tr><td valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Description</strong></td>";
		myString += "<td  align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].desc + "</td></tr>";
		myString += "<tr><td valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Publisher</strong></td>";
		myString += "<td  align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].publisher + "</td></tr>";
		myString += "<tr><td valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Publish Date</strong></td>";
		myString += "<td  align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].pubdate + "</td></tr>";
		myString += "<tr><td valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Physical Description</strong></td>";
		myString += "<td  align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].phydesc + "</td></tr>";
		myString += "<tr><td><form><input type='button' value='continue searching' onclick='showProducts(" + previous[0] + "," + previous[1] + ");' /></form></td></tr>";
	
	 		myString += "</table></div>"; 
								
					} 
						
						
						document.getElementById('title').innerHTML="Search Results";

			 }
			 else{
			document.getElementById('contentTable').innerHTML = "";
document.getElementById('welcomeContent').innerHTML = "";
document.getElementById('title').innerHTML="Search Results";

var myString = "<div>";

			for(var i in db[cat][sub][prod]);
				{
				document.getElementById('contentTable').innerHTML = myString;
		myString += "<table border='0' cellpadding='3' cellspacing='2' style='font:normal 15px/1.2em Verdana, Sans-serif;'>";
		myString += "<tr><td valign='top' width='25%' style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Title</strong></td>";
		myString += "<td align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db [cat][sub][prod].title + "</td></tr>";
		myString += "<tr><td valign='top' width='25%' style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Author</strong></td>";
		myString += "<td align='left' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].author + "</td></tr>";
		myString += "<tr><td  valign='top' width='25%' style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>ISBN</strong></td>";
		myString += "<td  align='eft' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].ISBN + "</td></tr>";
		myString += "<tr><td  valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Format</strong></td>";
		myString += "<td  align='eft' valign='top' width='75%' style='border-bottom:1px solid #030;'>" + db[cat][sub][prod].format + "</td></tr>";
		myString += "<tr><td valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Description</strong></td>";
		myString += "<td  align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].desc + "</td></tr>";
		myString += "<tr><td valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Publisher</strong></td>";
		myString += "<td  align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].publisher + "</td></tr>";
		myString += "<tr><td valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Publish Date</strong></td>";
		myString += "<td  align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].pubdate + "</td></tr>";
		myString += "<tr><td valign='top' width='25%'  style='border-right:1px solid #030;border-bottom:1px solid #030;'><strong>Physical Description</strong></td>";
		myString += "<td  align='left' valign='top' width='75%' style='border-bottom:1px solid #030;'>";
		myString += db[cat][sub][prod].phydesc + "</td></tr>";
		myString += "<tr><td><form><input type='button' value='continue searching' onclick='showProducts(" + previous[0] + "," + previous[1] + ");' /></form></td></tr>";
	
	 		myString += "</table></div>"; 
								
					}	 
						
						document.getElementById('welcomeContent').innerHTML = "";
						document.getElementById('title').innerHTML="Search Results";
						
}
}

function showCallouts(){

	var myCallouts="<div id='callouts'>";
			myCallouts += " <p class='topics' style='	background:transparent url(i/topics.gif) no-repeat top;'><ul style='font:bold 12px/2.2em Verdana, Sans-serif;color:#008f00;'>";
			myCallouts += "<li style='list-style-type:none;'>Censorship</li>";
			myCallouts += "<li style='list-style-type:none;font:normal 12px/1.2em Verdana, Sans-serif;margin:0px 0px 0px 10px;color:#591212;'><a href='#.html' onclick='(showSubCat(1,0,0));' title='Go Back' >120 Banned Books</a></li>";
			myCallouts += "<li style='list-style-type:none;'>&nbsp;</li>";
			myCallouts += "<li style='list-style-type:none;font:normal 12px/1.2em Verdana, Sans-serif;margin:0px 0px 0px 10px;color:#591212;'>&nbsp;</li>";
			myCallouts += "</ul></p><br />";
			myCallouts += "<p class='authors' style='background:transparent url(i/authors.gif) no-repeat top;'> <ul style='font:bold 12px/2.2em Verdana, Sans-serif;color:#008f00;'>";
			myCallouts += "<li style='list-style-type:none;font:bold 12px/1.7em Verdana, Sans-serif;margin:0px 0px 0px 0px;'>Bloom, Harold</li>";
			myCallouts += "<li style='list-style-type:none;font:normal 12px/1.7em Verdana, Sans-serif;margin:0px 0px 0px 10px;color:#591212;'><a href='#.html' onclick='(showSubCat(3,0,0));' title='Go Back' >Salman Rushdie</a></li>";
			myCallouts += "<li style='list-style-type:none;font:bold 12px/1.7em Verdana, Sans-serif;margin:0px 0px 0px 0px;'>Bielski, Nella</li>";
			myCallouts += "<li style='list-style-type:none;font:normal 12px/1.7em Verdana, Sans-serif;margin:0px 0px 0px 10px;color:#591212;'><a href='#.html' onclick='(showSubCat(2,0,0));' title='Go Back' >The year is '42</a></li>";
			myCallouts += "</ul></p>";

			document.getElementById('callouts').innerHTML = myCallouts;
			}
function onHold()
{	
alert("Your item has been placed on hold");
}

function add2cart(cat, sub, prod)
{	
//store index references to products for storage.
			var prodKey = readCookie('cookieCart'); 
	if(prodKey == null)
			{
			//concatenating the empty string converts the whole thing to a string.

			prodKey = "" + cat + sub + prod + document.forms[prod].name;  
			}
			else
			{

			prodKey += "," + cat + sub + prod + document.forms[prod].name;
			}
	cart = prodKey.split(",");
	createCookie("cookieCart",prodKey,1);


}



function showCart()
{	
var myStuff = "";
previous = [cat, sub];

var subTotal = 0.0;

if(document.cookie.indexOf("cookieCart") != -1)
{

		var date = new Date();
		for(var a in db){
	var libOne= db[a] + "<input type='radio' value='checked' /> Piedmont Regional Library>";
	var libTwo= db[a] + "Chestatee Library (not available)";
	var libThree= db[a] + "<input type='radio' />Statham Public Library";

var prodKey = readCookie('cookieCart');
cart = prodKey.split(",");
document.getElementById('callouts').innerHTML ="";
document.getElementById('contentTable').innerHTML = "";
var myStuff = "<table>";

	
myStuff += "<tr><th><p class='one'>Title</p></th><th><p class='one'>ISBN</p></th><th><p class='one'>Library</p></th><th><p class='one'>Placed on Hold</p></th><th><p class='one'>Remove</p></th></tr>";

for(var i in cart){

	var cat =  cart[i].charAt(0);
	var sub =  cart[i].charAt(1);
	var prod = cart[i].charAt(2);

	myStuff += "<tr>";
	myStuff += "<td align='center'>" + db[cat][sub][prod].title + "</td>";
	myStuff += "<td align='center'>" + db[cat][sub][prod].ISBN + "</td>";
	myStuff += "<td align='center'>" +db[a].value + "</td>";
	myStuff += "<td align='left' valign='bottom'>" + date.toGMTString(); + "</td>";
	myStuff += "<td align='center'><input name='remove' type='checkbox' value='" + i + "' onclick='updateCart(this.value);showCart();' /></td>";
	myStuff += "</tr>";
	
	
	}
	
}
previous = [cat, sub];

myStuff += "<tr><td colspan='2'><input type='button' value='continue searching' onclick='showCallouts();showProducts(" + previous[0] + "," + previous[1] + ");' />";
myStuff += "<td colspan='2'><input type='button' value='confirm holds now' onclick='checkOut()' /></td></tr>";
myStuff += "</table>";

document.getElementById('contentTable').innerHTML = myStuff;
 document.getElementById('welcomeContent').innerHTML = "";
document.getElementById('title').innerHTML="Hold Basket";

}else
{ 
	alert("there is nothing in your hold basket!");
}	

}


function checkOut(){
var userConfirm = "";
userConfirm += "<div>";
userConfirm += "A request for a hold has been placed.  Although we can accommodate most hold requests, occasionally an item may not be available upon request.  We recommend you contact your library for final confirmation .<br />"  
userConfirm +=  "";

document.getElementById('contentTable').innerHTML = userConfirm;
document.getElementById('title').innerHTML="Hold Confirmation";
}


function logout(){
	eraseCookie('userCookie');
	location.href = "index.html"
	}

function updateCart(prod){
cart.splice(prod,1);

if(cart.length < 1 || cart == null)
{ 
eraseCookie('cookieCart'); 
document.getElementById('contentTable').innerHTML = "<h3>Your hold basket is currently empty</h3>";
}else{

var prodKeys = cart.join();
createCookie("cookieCart",prodKeys,1);
}
}


	function validate(mySignup)
	{
		var firstName = document.getElementById('firstName').value;
		var firstName = document.getElementById('firstName').value;
		var lastName = document.getElementById('lastName').value;
		var streetAddress = document.getElementById('streetAddress').value;
		var city = document.getElementById('city').value;
		var zipCode = document.getElementById('zipCode').value;
		var email = document.getElementById('email').value;
		var phone = document.getElementById('phone').value;
		var errors =""
		
		if(firstName == "") {
			errors += "- You Must Enter Your First Name.\n";
		};
		
		if(lastName == "") {
			errors += "- You Must Enter Your Last Name.\n";
		};
		
		if(streetAddress == "") {
			errors += "- You Must Enter Your Street Address.\n";
		};
		
		if(city == "") {
			errors += "- You Must Enter Your City.\n";
		};
		
		if(zipCode == "") {
			errors += "- You Must Enter Your Zip Code.\n";
		};

		if(email == "") {
			errors += "- You Must Enter Your E-mail Address.\n";
		} else if((email.indexOf("@") == -1) || (email.indexOf(".") == -1) || (email.length < 7)) {
			errors += "- You must enter a vaild e-mail address.\n";
		};
		
		if(phone == "") {
			errors += "- You Must Enter Your Phone Number.\n";
		};
		
		if(errors != "") {
			alert(errors);
			return false;
		}
		
		return true;
	}	
function signUp(){

var myStuff = "";
	myStuff +=" <form id='mySignup' name='mySignup' action='thanks.php' method='post' onsubmit='return validate();'";
	myStuff += "<p class='one'><strong>Please note:</strong> You will not be able to place library materials on hold until you have presented 2 forms of identification to the local library of your choosing.  A PINES library card will be issued to you at that time, and then you may begin placing holds on library material.  You must be a resident of Georgia to obtain a PINES library card.";
	myStuff +="<p class='two'><strong>All fields are required</strong></p>";
	myStuff +="<p class='three'>First Name:	<input id='firstName' type='text' name='firstName' /><br>";
	myStuff +="Last Name:	<input id='lastName' type='text' name='lastName' /><br>";
		myStuff +="Street Address:	<input id='streetAddress' type='text' name='streetAddress' /><br>";
	myStuff +="City:	<input id='city' type='text' name='city' /> &nbsp;Georgia<br>";
	myStuff +="Zip Code:	<input id='zipCode' type='text' name='zipCode' /><br>";
	myStuff +="Email Address:	<input id='email' type='text' name='email' /><br>";
	myStuff +="Phone Number:	<input id='phone' type='text' name='phone' /></p>";
	myStuff +="<input type='submit' name='submit' value='Sign Up'  />&nbsp;&nbsp;&nbsp;&nbsp;";
	myStuff +="<input type='reset' name='reset' value='Reset' />";
	myStuff +="</form>";

	
document.getElementById('contentTable').innerHTML = myStuff;
	document.getElementById('welcomeContent').innerHTML = "";
	document.getElementById('title').innerHTML="Sign Up";


}


function createWin()
{
 document.open("confirm.html", "confirm", "width='300',height='1500','status'");

	}	


function numberFormat(amount) {
var rawNumStr = round(amount) + '';
rawNumStr = (rawNumStr.charAt(0) == '.' ? '0' + rawNumStr : rawNumStr);
if (rawNumStr.charAt(rawNumStr.length - 3) == '.') {
return rawNumStr
}
else if (rawNumStr.charAt(rawNumStr.length - 2) == '.') {
return rawNumStr + '0';
}
else { 
return rawNumStr + '.00'; }
}

// Round all passed numbers to two 
// decimal places (hundredths place)
//------------------------------------------------------
function round(number,decPlace) {
decPlace = (!decPlace ? 2 : decPlace);
return Math.round(number * Math.pow(10,decPlace)) / Math.pow(10,decPlace);
}


function showAbout(){


	var myString = "<div>";
			document.getElementById('title').innerHTML="About Pines";
document.getElementById('welcomeContent').innerHTML ="";

	myString += "<p><strong>Georgia Library Public Information Network for Electronic Services</strong>, or PINES, is Georgia's public library automation and lending network for 249 libraries in 127 counties. PINES is an initiative of the Georgia Public Library Service, a unit of the University System of Georgia. Fifty percent of Georgia's population and 44 of Georgia's 58 public library systems rely on the PINES network for their library service. PINES creates a statewide 'borderless library' that eliminates geographic and socio-economic barriers and provides equal access to information for all Georgians. </p>";
	myString += "<p><strong>Georgians with a PINES library card have access to materials beyond what is available on their local shelves</strong> and enjoy the benefits of a shared collection of 7.7 million books and materials that can be delivered to their home library with no charge to the library user that contributes to a more educated Georgia through lifelong learning.</p>";
myString += "<h3>How do Georgia citizens benefit from PINES?</h3>";
myString += "<p>Any resident of Georgia may <a href='#.html' onclick='signUp();'>obtain a free PINES card</a> by visiting any PINES library. In addition to browsing and checking out books on the shelves of their local libraries, PINES allows library users to log on to pines.lib.ga.us, browse or search the online catalog for books and other library materials and have their selections delivered to their local library. Anyone with a PINES card can access the PINES catalog by using computers at their local library or by using a PIN number to log on from home.</p>";
myString += "<h3>How do Georgia public libraries benefit from PINES?</h3>";
myString += "<p><strong>PINES facilitates collection sharing for Georgia's public libraries. </strong>This means that local public libraries are free to use their limited resources to develop collections that are tailored to the needs and interests of their local communities. ";
myString +=  "In addition to avoiding duplication of collections, PINES also prevents duplication of staff, equipment and maintenance. Georgia Public Library Service helps public libraries leverage a tremendous economy of scale by providing staff, equipment and centralized processing at the state level, rather than individually at each public library system. If PINES were eliminated, the estimated replacement cost would be $14 million for the 44 public library systems currently served by PINES to purchase and install their own automation systems. Separate automation systems would collectively cost an additional $5 million each year in support and maintenance because of the duplication of system administration and support personnel. </p>";
 	
	document.getElementById('welcomeContent').innerHTML = myString;

 document.getElementById('contentTable').innerHTML ="" ;

}

function showHome(){
var myString ="";
 document.getElementById('title').innerHTML = "Welcome";
	document.getElementById('welcomeContent').innerHTML ="";

		myString += "Welcome to the Georgia Library System's";
		myString +=" Public Information  Network Electronic System. Search for material found in your local PINES affiliated library. If you would like to place materials on hold in your local library,  login using your library card number. If you do not already have a library card, <a href='#.html' onclick='signUp()'><strong>Sign Up</strong>.</a>";
	
	document.getElementById('welcomeContent').innerHTML = myString;
		document.getElementById('contentTable').innerHTML = "";
			document.getElementById('callouts').innerHTML = "";

 }


function showFaqs(){
	var myString = "<div>";
		myString += "<ul>";
		myString += "<li><a href='#card' title='Go Back' >How do I get a card?</a></li>";
		myString += "<li><a href='#eligibility' title='Go Back' >Who is elegible to get a PINES card?</a></li>";
		myString += "<li><a href='#hold' title='Go Back' >How do I place a hold on items in the catalog?</a></li>";
		myString += "<li><a href='#nohold' title='Go Back' >Are there any items I can't place on hold?</a></li>";
		myString += "<li><a href='#login' title='Go Back' >How do I log in to my account?</a></li>";
		myString += "<li><a href='#fines' title='Go Back' >What are the fines for overdue materials in PINES libraries?</a></li>";
		myString += "<li><a href='#renew' title='Go Back' >How can I renew items?</a></li>";
		myString += "<li><a href='#libraries' title='Go Back' >Which public libraries participate in PINES?</a></li>";
		myString += "</ul>";
		myString += "<br /><a name='card'><h3>How do I get a card?</h3></a><p class='bodyCopy'> Visit any PINES participating Library to get a library card.  Please bring:<ul><li style='list-style-type:lower-alpha;'>photo ID showing current local address, OR</li>";
		myString += "	<li style='list-style-type:lower-alpha;'>photo ID and one item from approved list (see below) showing current, local address (if photo ID does not have correct address), OR</li>";
		myString += "	<li style='list-style-type:lower-alpha;'>TWO (2) items from approved list (see below) showing current, local address.</li>";
		myString += "</ul>";
       myString += "<p class='bodyCopy'>Approved list of identification:";
	 myString += "<ul>";
		myString += "<li style='list-style-type:lower-alpha;'>valid driver’s license,</li>";
		myString += "<li style='list-style-type:lower-alpha;'> valid voter registration card, </li>";
		myString += "<li style='list-style-type:lower-alpha;'>checks with pre-printed addresses, </li>";
			myString += "<li style='list-style-type:lower-alpha;'>a utility bill, </li>";
			myString += "<li style='list-style-type:lower-alpha;'>tax receipt or </li>";
			myString += "<li style='list-style-type:lower-alpha;'>mail that shows the user’s name and present address.</li>";
		myString += "</ul>";
		myString += "<p class='bodyCopy'>Applicants for a card must complete and sign an application form, available at any PINES participating library’s circulation desk.   Or, you can <a href='#.html' onclick='signUp();'>sign up</a> online, go to the library, show your id and get your library card. </p>";
	myString += "<a href='#top' style='text-decoration:none;'><img src='i/arrow-up-big.png' alt='Back to Top' title='Back to Top' border='0' /> Back to Top</a>";
	myString += "<br /><br />";
	myString += "<a name='eligibility'><h3>Who is elegible to get a PINES card?</h3></a>";
	myString += "	<p class='bodyCopy'> <strong>Library cards are free to all residents of Georgia.</strong>  Patrons of both PINES and non-participating Georgia public libraries may receive a PINES card. Users from non-participating Georgia libraries shall have the same privileges as PINES users. Most PINES cards are valid for 2 years.  Property owners who do not reside in Georgia may be required to show proof of ownership, such as a tax bill or deed. Persons employed in Georgia or attending school in Georgia may be required to show proof of employment or enrollment.</p> ";
	myString += "<p class='bodyCopy' style='	font:oblique 10pt/1.7em Verdana, Sans-serif;'> Out-of-state cards are available to persons living outside Georgia who do not meet the above criteria for a $25 annual fee, payable at the time the card is issued.</strong></p> ";
	myString += "<p class='bodyCopy'>There is no minimum age for a child to receive a PINES card. A parent or legal guardian may register a child. Parent or guardian must show proper ID to register a child. A parent or guardian must sign the application for all children under 18.  Proper identification must be presented to register.</p>";
	myString += "<a href='#top' style='text-decoration:none;'><img src='i/arrow-up-big.png' alt='Back to Top' title='Back to Top' border='0' /> Back to Top</a>";
	myString += "<br /><br />";
	myString += "<a name='hold'><h3>How do I place a hold on items in the catalog?</h3></a>";
	myString += "<p class='bodyCopy'> You may place holds on items in the PINES catalog by contacting your local PINES library for information or by clicking on the place hold icon next to each item selection. (Your home library will be the library at which you registered for your PINES card unless you specified otherwise)  To place a hold online, you must log in using your library card number.  You will be prompted to sign in if you have not already done so.  A message will display notifying you that the hold was placed or that there was some problem in placing the hold. In the event of a problem, please contact your local PINES library for further assistance.</p>";
	myString += "<p class='bodyCopy'><strong>Please note:</strong>  We try to keep our online inventory as up to date as possible.  We strongly recommend you call your local library to confirm that your hold was received and the material is ready to be picked up. </p></p>";
	myString += "<a href='#top' style='text-decoration:none;'><img src='i/arrow-up-big.png' alt='Back to Top' title='Back to Top' border='0' /> Back to Top</a>";
myString += "<br /><br />";
	myString += "<a name='nohold'><h3>Are there any items I can't place on hold?</h3></a>";
	myString += "<p class='bodyCopy'> PINES policy is created by the PINES Executive Committee, made up of nine library directors; PINES does not allow statewide PINES hold requests on the following item categories: audiobooks; CDs; DVDs; bestsellers; equipment; microforms; new books; reference; reserve; software; toys, videocassettes, leased materials, outreach and deposit (monetary). These items (except for reference items) may have hold requests placed on them if they are owned by the libraries within your home regional library system. New books and bestsellers become available to PINES patrons throughout the state after six months.</p>";
	myString += "<a href='#top' style='text-decoration:none;'><img src='i/arrow-up-big.png' alt='Back to Top' title='Back to Top' border='0' /> Back to Top</a>";
	myString += "<br /><br />";
	myString += "<a name='login'><h3>How do I log in to my account?</h3></a>";
	myString += "<p class='bodyCopy'> Log in at any time by entering your library card number in the upper right corner input field of every PINES web page.</p>";
	myString += "<a href='#top' style='text-decoration:none;'><img src='i/arrow-up-big.png' alt='Back to Top' title='Back to Top' border='0' /> Back to Top</a>";
	myString += "<br /><br />";
	myString += "<a href='#top' style='text-decoration:none;'><img src='i/arrow-up-big.png' alt='Back to Top' title='Back to Top' border='0' /> Back to Top</a>";
	myString += "<br /><br />";
	myString += "<a name='fines'><h3>What are the fines for overdue materials in PINES libraries?</h3></a>";
		myString += "<ul>";
			myString += "<li>Overdue material - $.10/day</li>";
		myString += "	<li>Overdue material/high demand - $.50/day</li>";
		myString += "	<li>Overdue interlibrary loan - $.50/day</li>";
		myString += "	<li>Overdue overnight material - $.50/day</li>";
		myString += "	<li>Overdue PINES ILL - $.50/day</li>";
		myString += "	<li>Overdue equipment - $1.00/day</li>";
		myString += "</ul>";
	myString += "<a href='#top' style='text-decoration:none;'><img src='i/arrow-up-big.png' alt='Back to Top' title='Back to Top' border='0' /> Back to Top</a>";
	myString += "<br /><br />";
	myString += "<a name='renew'><h3>How can I renew items?</h3></a>";
	myString += "<p class='bodyCopy'> Renewal requests may be made in person only.</p>";
	myString += "<a href='#top' style='text-decoration:none;'><img src='i/arrow-up-big.png' alt='Back to Top' title='Back to Top' border='0' /> Back to Top</a>";
	myString += "<br /><br />";
	myString += "<a name='libraries'><h3>Which public libraries participate in PINES?</h3></a>";
	myString += "<p class='bodyCopy'> Please see our <a href='#.html' onclick='showLibrary();'>list of PINES Participating Libraries.</a></p>";
	myString += "<a href='#top' style='text-decoration:none;'><img src='i/arrow-up-big.png' alt='Back to Top' title='Back to Top' border='0' /> Back to Top</a>";

		document.getElementById('contentTable').innerHTML = myString;
			document.getElementById('callouts').innerHTML = "";
	document.getElementById('welcomeContent').innerHTML = "";
	document.getElementById('title').innerHTML = "FAQs";

 }
