

// ---------- script properties ----------

var include_num = 1;
var bold = 0;

// ---------- pages ----------

var s = new Array();

s[0] = "Playing^books/pwte.htm^Moore^Gary W. Moore, Gene, Baseball, u-505, 505, germans, 1-932714-24-3, Playing with the Enemy, A baseball Prodigy, a World at War, and a Field a of Broken dreams, Fall 2006, World Wars, Naval, Sports History";
s[1] = "Paradigm^books/paradigm.htm^Taylor^Robert D. Taylor, 1-932714-24-3, Paradigm, Spring 2006, Other";
s[2] = "Warriors^books/warriors.htm^Sneiderman^Barney Sneiderman, 1-932714-28-6, Warriors Seven, Fall 2006, American Revolution, American Civil War, World Wars, Naval";
s[3] = "Indian^books/iwv.htm^ Greene^Jerome A. Greene, 1-932714-26-X, Indian War Veterans, Fall 2006, Indian Wars";
s[4] = "Army Potomac^books/taotp.htm^Beatie^Russel H. Beatie, 1-932714-25-1, The Army of the Potomac. Vol. 3, Fall 2006, American Civil War";
s[5] = "One Continuous^books/ocf.htm^Wittenberg^Eric J. Wittenberg, J. David Petruzzi, Michael F. Nugent, 978-1-932714-43-2, One Continuous Fight The Retreat from Gettysburg and the Pursuit of Lee's Army of Northern Virginia, July 4-14, 1863, Spring 2008, American Civil War";
s[6] = "Plenty^books/pobtga.htm^Wittenberg^Eric J. Wittenberg, J. David Petruzzi, 1-932714-20-0, Plenty of Blame to Go Around Jeb Stuart's Controversial Ride to Gettysburg, Fall 2006, American Civil War";
s[7] = "Triumph^books/triumph2.htm^Winschel^Terrence J. Winschel, 1-932714-21-9, Triumph and Defeat, Triumph & Defeat: The Vicksburg Campaign, vol. 2, Spring 2006, American Civil War";
s[8] = "A History^books/wisconsin.htm^Martin^Michael J. Martin, 1-932714-13-18-9, A History of the 4th Wisconsin Infantry and Cavalry in the Civil War, Spring 2006, American Civil War";
s[9] = "A Guide^books/agttbotar.htm^Savas^Theodore P. Savas, J. David Dameron, 1-932714-12-X, A GUIDE TO THE BATTLES OF THE AMERICAN REVOLUTION, Fall 2006";
s[10] = "Chicago^books/cbb.htm^Williams^Richard Brady Williams, 1-932714-06-5, Chicago's Battery Boys, Fall 2005, American Civil War";
s[11] = "Battle Monroe^books/tbomc.htm^Wittenberg^Eric J. Wittenberg, 1-932714-17-0, The Battle of Monroe's Crossroads, Fall 2005, American Civil War";
s[12] = "CAPITAL NAVY^books/capitalnavy.htm^Coski^John M. Coski, 1-932714-15-4, CAPITAL NAVY, Fall 2005, American Civil War, Naval";
s[13] = "Champion Hill^books/championhill.htm^Smith^Timothy B. Smith, 1-932714-19-7, Champion Hill Vicksburg, Fall 2005, American Civil War";
s[14] = "Ultimate Interactive^books/btwb.htm^Volkin^Sgt. Michael Volkin, 1-932714-32-4, The Ultimate Interactive Basic Training Workbook, Spring 2007, Military Science, Other";
s[15] = "Ultimate^books/btgb.htm^Volkin^Sgt. Michael Volkin, 1-932714-11-1, The Ultimate Basic Training Guidebook, Spring 2005, Military Science, Other";
s[16] = "SILENT^books/sentinels.htm^Newton^George W. Newton, 1-932714-14-6, SILENT SENTINELS, Spring 2005, American Civil War";
s[17] = "Iron Hearts B^books/steelboats.htm^Goebeler^Hans Goebeler, John Vanzo, u-505, 505, 1-932714-07-3, Steel Boat, Iron Hearts, Fall 2004, Hard, World Wars, Naval";
s[18] = "Quest^books/tqftlrl.htm^Clunn^Tony Clunn, 1-932714-08-1, The Quest for the Lost Roman Legions, Fall 2004, Ancient History";
s[19] = "Guns Independence^books/tgoi.htm^Greene^Jerome A. Greene, 1-932714-05-7, The Guns of Independence, The Siege of Yorktown, 1781, Fall 2004, American Revolution";
s[20] = "Triumph2^books/triumph.htm^Winschel^Terrence J. Winschel, 1-932714-04-9, Triumph and Defeat, Triumph & Defeat: The Vicksburg Campaign, Spring 2004, American Civil War";
s[21] = "HUNT^books/hak.htm^Savas^Theodore P. Savas, u-505, 505, 1-932714-01-4, HUNT AND KILL, Spring 2004, World Wars, Naval";
s[22] = "Russian Officer^books/trocotranw.htm^Mikaberidze^Alexander Mikaberidze, 1-932714-02-2, The Russian Officer Corps in the Revolutionary and Napoleonic Wars, 1792-1815, Spring 2004, Napoleonic War";
s[23] = "Shiloh^books/shiloh.htm^Cunningham^Edward Cunningham, Gary D. Joiner, Timothy B. Smith, 1-932714-27-8, Shiloh and the Western Campaign of 1862, American Civil War";
s[24] = "Surviving Unthinkable^books/unthinkable.htm^Maniatis^Nicholas Maniatis, 1-932714-29-4, Surviving the Unthinkable What Your Family Needs to Know and Do to Survive a Terrorist Attack, Military Science";
s[25] = "Surviving Military^books/sms.htm^Maxwell^Marc CB Maxwell, Val J. Laolagi, Surviving Military Separation, An Activity Guide for Family Members of Deployed Personnel, Military Science, Other";
s[26] = "Maps First Bull Run^books/bullrun.htm^Gottfried^Bradley M. Gottfried, 978-1-932714-60-9, The Maps of First Bull Run, An Atlas of the First Bull Run Campaign, including the Battle of Ball Bluff, Manassas, Spring 2009, New Release, American Civil War";
s[27] = "Iron Hearts A^books/steelboats_pb.htm^Goebeler^Hans Goebeler, John Vanzo, 1-932714-07-3, Steel Boat, Iron Hearts, May 2007, Trade Paper, Paperback, World Wars, Naval";
s[28] = "Collecting^books/ctc.htm^Pritchard^Shannon Pritchard, 1-932714-07-3, Collecting the Confederacy, Spring 2007, American Civil War";
s[29] = "Georgia^books/sbtn_uga.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, 978-1-932714-51-7, University of Georgia Football An Interactive Guide to the World of Sports, SBTN, Sports by the Numbers, Fall 2008, New Release, Sports History";
s[30] = "Penn^books/sbtn_psu.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, Jared Trexler, 978-1-932714-52-4, Penn State Football An Interactive Guide to the World of Sports, SBTN, Sports by the Numbers, Fall 2008, New Release, Sports History";
s[31] = "NASCAR^books/sbtn_nascar.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, 978-1-932714-42-5, NASCAR An Interactive Guide to the World of Sports, SBTN, Sports by the Numbers, Spring 2008, New Release, Sports History";
s[32] = "Major League Baseball^books/sbtn_mlb.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, 978-1-932714-40-1, Major League Baseball An Interactive Guide to the World of Sports, SBTN, Sports by the Numbers, Spring 2008, New Release, Sports History";
s[33] = "New York Yankees^books/sbtn_yankees.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, 978-1-932714-41-8, New York Yankees An Interactive Guide to the World of Sports, SBTN, Sports by the Numbers, Spring 2008, New Release, Sports History";
s[34] = "Oklahoma^books/sbtn_ou.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, 978-1932714-33-3, University of Oklahoma Football An Interactive Guide to the World of Sports, SBTN, Sports by the Numbers, Summer 2007, Sports History";
s[35] = "Elementary Common Sense^books/commonsense.htm^Wilensky^Mark Wilensky, 978-1932714-36-4, The Elementary Common Sense of Thomas Paine An Interactive Adaptation for All Ages, Fall 2007, American Revolution";
s[36] = "Benedict^books/benedict.htm^Lefkowitz^Arthur S. Lefkowitz, 978-1932714-03-6, Benedict Arnold's Army The 1775 American Invasion of Canada During the Revolutionary War , Fall 2007, American Revolution";
s[37] = "Major^books/rodes.htm^Collins^Darrell L. Collins, 978-1932714-09-8, Major General Robert E. Rodes of the Army of Northern Virginia Biography, Fall 2007, American Civil War";
s[38] = "Napoleon^books/napoleon.htm^Franceschi^General Michel Franceschi, Ben Weider, 978-1932714-37-1, The Wars Against Napoleon Debunking the Myth of the Napoleonic Wars, Winter 2007, Napoleonic War";
s[39] = "Building^books/bgm.htm^Foutz^Colt Foutz, 978-1932714-39-5, Building the Green Machine, Winter 2007, Other";
s[40] = "Chicago (Paperback)^books/cbb_pb.htm^Williams^Richard Brady Williams, 978-1932714-38-8, Chicago's Battery Boys, Fall 2007, American Civil War";
s[41] = "Wars Against Napoleon^books/napoleon.htm^Franceschi^General Michel Franceschi, Doctor Ben Weider, 978-1932714-37-1, The Wars Against Napoleon, Spring 2008, Napoleonic War";
s[42] = "US Army^books/rangers.htm^Posey^Edward L. Posey, 978-1-932714-45-6, The US Army's First, Last, and Only All-Black Rangers The 2nd Ranger Infantry Company (Airborne) in the Korea War, 1950-1951, Summer 2008, New Release, Korean War";
s[43] = "Saratoga^books/saratoga.htm^Luzader^John Luzader, 978-1-932714-44-9, Saratoga A Military History of the Decisive Campaign of the American Revolution, Summer 2008, American Revolution ";
s[44] = "Once^books/oam.htm^Popaditch^Nick Popaditch, Mike Steere, 978-1-932714-47-0, Once Marine Iraq War Tank Commander Inspirational Memoir Combat, Courage, and Recovery , Summer 2008, New Release, Other, Military Science, Iraq, Current Affairs";
s[45] = "Those^books/iron_brigade.htm^Herdegen^Lance J. Herdegen, 978-1-932714-48-7, Those Damned Blackhats! The Iron Brigade in the Gettysburg Campaign, October 2008, New Release, American Civil War";
s[46] = "Unpopular^books/lincoln.htm^Tagg^Larry Tagg, 978-1-932714-61-6, The Unpopular Mr. Lincoln, The Story of the Most Reviled American President, Spring 2009, New Release, American Civil War";
s[47] = "Maps Gettysburg^books/tmog.htm^Gottfried^Bradley M. Gottfried, The Maps of Gettysburg, The Gettysburg Campaign, June 3 – July 13, 1863, American Civil War ";
s[48] = "Sickles^books/sickles.htm^Hessler^James A. Hessler, 978-1-932714-64-7, Sickles at Gettysburg, The Controversial Civil War General Who Committed Murder, Abandoned Little Round Top, and Declared Himself the Hero of Gettysburg, Spring 2009, New Release, American Civil War";
s[49] = "Civil^books/ncw.htm^Hughes^Mark Hughes, 978-1-932714-63-0, The New Civil War Handbook, Facts and Photos from America Greatest Conflict, Spring 2009, New Release, American Civil War";
s[50] = "Complete Gettysburg^books/cgg.htm^Petruzzi^J. David Petruzzi, Steven Stanley, 978-1-932714-63-0, The Complete Gettysburg Guide, Walking and Driving Tours of the Battlefield, Town, Cemeteries, Field Hospital Sites, and other Topics of Historical Interest, Spring 2009, New Release, American Civil War";
s[51] = "Mixed Martial^books/sbtn_mma.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, Zac Robinson, 978-1-932714-67-8, Mixed Martial Arts, An Interactive Guide to the World of Sports, Spring 2009, New Release, Sports History";
s[52] = "San Francisco Giants^books/sbtn_sfgiants.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, Zac Robinson, 978-1-932714-65-4, San Francisco Giants, An Interactive Guide to the World of Sports, Spring 2009, New Release, Sports History";
s[53] = "Boston Red Sox^books/sbtn_redsox.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, 978-1-932714-66-1, Boston Red Sox, An Interactive Guide to the World of Sports, Spring 2009, New Release, Sports History";
s[54] = "Sacramento Kings^books/sbtn_sackings.htm^Brush^Daniel J. Brush, David Horne, Marc CB Maxwell, 978-1-932714-69-2, Sacramento Kings, An Interactive Guide to the World of Sports, Spring 2009, New Release, Sports History";
s[55] = "Flying Drunk^books/flyingdrunk.htm^Balzer^Joseph Balzer, 978-1-932714-71-5, Flying Drunk, True Story Northwest Airlines Flight, Three Northwest Pilots, Man Fight for Redemption, Spring 2009, New Release, Other";
s[56] = "Confessions^books/confessions.htm^Gross^Mollie Gross, 978-1-932714-76-0, Confessions of a Military Wife, Fall 2009, New Release, Other, Military Science, Iraq, Current Affairs";
s[57] = "Maps Chickamauga^books/chickamauga.htm^Friedrichs^David A. Friedrichs, David A. Powell, 978-1-932714-72-2, The Maps of Chickamauga, Atlas Chickamauga Campaign, August 29 September 23 1863, Fall 2009, New Release, American Civil War";

// ---------- end of script properties and pages ----------


var cookies = document.cookie;
var p = cookies.indexOf("d=");

if (p != -1) {
	var st = p + 2;
	var en = cookies.indexOf(";", st);
	if (en == -1) {
		en = cookies.length;
	}
	var d = cookies.substring(st, en);
	d = unescape(d);
}
var od = d;
var m = 0;
if (d.charAt(0) == '"' && d.charAt(d.length - 1) == '"') {
	m = 1;
}

var r = new Array();
var co = 0;

if (m == 0) {
	var woin = new Array();
	var w = d.split(" ");
	for (var a = 0; a < w.length; a++) {
		woin[a] = 0;
		if (w[a].charAt(0) == '-') {
			woin[a] = 1;
		}
	}
	for (var a = 0; a < w.length; a++) {
		w[a] = w[a].replace(/^\-|^\+/gi, "");
	}
	a = 0;
	for (var c = 0; c < s.length; c++) {
		pa = 0;
		nh = 0;
		for (var i = 0; i < woin.length; i++) {
			if (woin[i] == 0) {
				nh++;
				var pat = new RegExp(w[i], "i");
				var rn = s[c].search(pat);
				if (rn >= 0) {
					pa++;
				} else {
					pa = 0;
				}
			}
			if (woin[i] == 1) {
				var pat = new RegExp(w[i], "i");
				var rn = s[c].search(pat);
				if (rn >= 0) {
					pa = 0;
				}
			}
		}
		if (pa == nh) {
			r[a] = s[c];
			a++;
		}
	}
	co = a;
}

if (m == 1) {
	d = d.replace(/"/gi, "");
	var a = 0;
	var pat = new RegExp(d, "i");
	for (var c = 0; c < s.length; c++) {
		var rn = s[c].search(pat);
		if (rn >= 0) {
			r[a] = s[c];
			a++;
		}
	}
	co = a;

}


function return_query() {
	document.SB_Form.d.value = od;
}

function num_SB() {
	document.write(co);
}

function out_SB() {
	if (co == 0) {
		document.write('<p class="news10">&nbsp;</p><p class="news4"><b>Your search did not match any documents.</b></p><p class="news4">Make sure all keywords are spelled correctly. Try different or more general keywords. Contact <a class="links4" href="mailTo:customerservice@savasbeatie.com">Customer Support</a> if you feel you need assistance in your search.</p>');
		return;
	}
	for (var a = 0; a < r.length; a++) {
		var os = r[a].split("^");
		if (bold == 1 && m == 1) {
			var br = "<b>" + d + "</b>";
			os[2] = os[2].replace(pat, br);
		}
		document.write('<tr><td WIDTH=1 title="Title" Align="left" class="news0" vAlign="top">', os[0], '</td><td WIDTH=1 title="Author" Align="left" class="news0" vAlign="top">', os[2], '</td><TD title="Description" WIDTH=485 BGCOLOR=#FFFFFF><IFRAME marginWidth=0 marginHeight=0 SRC="', os[1], '" NAME="bookFrame" frameBorder=0 width=485 HEIGHT=390 SCROLLING="NO" NORESIZE></IFRAME></TD><td WIDTH=1 title="Open" Align="left" class="news0" vAlign="top"></td></tr>');
	}

}
