// if ( ll == "" ) ll = 0;

    var linkplacement = "";
    var i;
    for ( i = 0; i < ll; i++ ) {
      linkplacement = linkplacement + "../";
    }

if (document.images) {            // Active Images
	img01on = new Image();
	img01off = new Image();
	img01on.src = linkplacement + "images/nav/btn_home_over.gif";
	img01off.src = linkplacement + "images/nav/btn_home.gif";

	img02on = new Image();
	img02off = new Image();
	img02on.src = linkplacement + "images/nav/btn_what_over.gif";
	img02off.src = linkplacement + "images/nav/btn_what.gif";

	img03on = new Image();
	img03off = new Image();
	img03on.src = linkplacement + "images/nav/btn_tour_over.gif";
	img03off.src = linkplacement + "images/nav/btn_tour.gif";

	img04on = new Image();
	img04off = new Image();
	img04on.src = linkplacement + "images/nav/btn_documentation_over.gif";
	img04off.src = linkplacement + "images/nav/btn_documentation.gif";

	img05on = new Image();
	img05off = new Image();
	img05on.src = linkplacement + "images/nav/btn_download_over.gif";
	img05off.src = linkplacement + "images/nav/btn_download.gif";

	img06on = new Image();
	img06off = new Image();
	img06on.src = linkplacement + "images/nav/btn_purchase_over.gif";
	img06off.src = linkplacement + "images/nav/btn_purchase.gif";

	img07on = new Image();
	img07off = new Image();
	img07on.src = linkplacement + "images/nav/btn_faq_over.gif";
	img07off.src = linkplacement + "images/nav/btn_faq.gif";

	img08on = new Image();
	img08off = new Image();
	img08on.src = linkplacement + "images/nav/btn_contact_over.gif";
	img08off.src = linkplacement + "images/nav/btn_contact.gif";

	img09on = new Image();
	img09off = new Image();
	img09on.src = linkplacement + "images/nav/btn_legal_over.gif";
	img09off.src = linkplacement + "images/nav/btn_legal.gif";

}
   
// Function to 'activate' images.
function imgOn(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "on.src");
	}
}
// Function to 'deactivate' images.
function imgOff(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "off.src");
	}
}
// Function for 'down' images.
function imgDown(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "down.src");
	}
}

// Writing common top navigation images
if (cat=="home") {
  var txtHome = "<a href=\""+linkplacement+"index.html\"><img border=\"0\" name=\"img01\" src=\""+linkplacement+"images/nav/btn_home_over.gif\" width=\"54\" height=\"24\" alt=\"Scribe Home Page\"></a>";
}
else {
  var txtHome = "<a onMouseOver=\"imgOn('img01')\" onMouseOut=\"imgOff('img01')\" href=\""+linkplacement+"index.html\"><img border=\"0\" name=\"img01\" src=\""+linkplacement+"images/nav/btn_home.gif\" width=\"54\" height=\"24\" alt=\"Scribe Home Page\"></a>";
}
if (cat=="what") {
  var txtWhat = "<a href=\""+linkplacement+"what-is-scribe.htm\"><img border=\"0\" name=\"img02\" src=\""+linkplacement+"images/nav/btn_what_over.gif\" width=\"112\" height=\"24\" alt=\"What is Scribe?\"></a>";
}
else {
  var txtWhat = "<a onMouseOver=\"imgOn('img02')\" onMouseOut=\"imgOff('img02')\" href=\""+linkplacement+"what-is-scribe.htm\"><img border=\"0\" name=\"img02\" src=\""+linkplacement+"images/nav/btn_what.gif\" width=\"112\" height=\"24\" alt=\"What is Scribe?\"></a>";
}
if (cat=="tour") {
  var txtTour = "<a href=\""+linkplacement+"guided-tour.htm\"><img border=\"0\" name=\"img03\" src=\""+linkplacement+"images/nav/btn_tour_over.gif\" width=\"94\" height=\"24\" alt=\"Guided Tour\"></a>";
}
else {
  var txtTour = "<a onMouseOver=\"imgOn('img03')\" onMouseOut=\"imgOff('img03')\" href=\""+linkplacement+"guided-tour.htm\"><img border=\"0\" name=\"img03\" src=\""+linkplacement+"images/nav/btn_tour.gif\" width=\"94\" height=\"24\" alt=\"Guided Tour\"></a>";
}
if (cat=="download") {
  var txtDownload = "<a href=\""+linkplacement+"download-scribe.htm\"><img border=\"0\" name=\"img05\" src=\""+linkplacement+"images/nav/btn_download_over.gif\" width=\"83\" height=\"24\" alt=\"Download Scribe\"></a>";
}
else {
  var txtDownload = "<a onMouseOver=\"imgOn('img05')\" onMouseOut=\"imgOff('img05')\" href=\""+linkplacement+"download-scribe.htm\"><img border=\"0\" name=\"img05\" src=\""+linkplacement+"images/nav/btn_download.gif\" width=\"83\" height=\"24\" alt=\"Download Scribe\"></a>";
}
if (cat=="purchase") {
  var txtPurchase = "<a href=\""+linkplacement+"purchase-scribe.htm\"><img border=\"0\" name=\"img06\" src=\""+linkplacement+"images/nav/btn_purchase_over.gif\" width=\"80\" height=\"24\" alt=\"Purchase Scribe\"></a>";
}
else {
  var txtPurchase = "<a onMouseOver=\"imgOn('img06')\" onMouseOut=\"imgOff('img06')\" href=\""+linkplacement+"purchase-scribe.htm\"><img border=\"0\" name=\"img06\" src=\""+linkplacement+"images/nav/btn_purchase.gif\" width=\"80\" height=\"24\" alt=\"Purchase Scribe\"></a>";
}
if (cat=="faq") {
  var txtFaq = "<a href=\""+linkplacement+"resources/faq.htm\"><img border=\"0\" name=\"img07\" src=\""+linkplacement+"images/nav/btn_faq_over.gif\" width=\"44\" height=\"24\" alt=\"Frequently Asked Questions\"></a>";
}
else {
  var txtFaq = "<a onMouseOver=\"imgOn('img07')\" onMouseOut=\"imgOff('img07')\" href=\""+linkplacement+"resources/faq.htm\"><img border=\"0\" name=\"img07\" src=\""+linkplacement+"images/nav/btn_faq.gif\" width=\"44\" height=\"24\" alt=\"Frequently Asked Questions\"></a>";
}
if (cat=="contact") {
  var txtContact = "<a href=\""+linkplacement+"contact-us.htm\"><img border=\"0\" name=\"img08\" src=\""+linkplacement+"images/nav/btn_contact_over.gif\" width=\"89\" height=\"24\" alt=\"Contact Us\"></a>";;
}
else {
  var txtContact = "<a onMouseOver=\"imgOn('img08')\" onMouseOut=\"imgOff('img08')\" href=\""+linkplacement+"contact-us.htm\"><img border=\"0\" name=\"img08\" src=\""+linkplacement+"images/nav/btn_contact.gif\" width=\"89\" height=\"24\" alt=\"Contact Us\"></a>";
}
if (cat=="legal") {
  var txtLegal = "<a href=\""+linkplacement+"legal/overview.htm\"><img border=\"0\" name=\"img09\" src=\""+linkplacement+"images/nav/btn_legal_over.gif\" width=\"59\" height=\"24\" alt=\"Legal\"></a>";
}
else {
  var txtLegal = "<a onMouseOver=\"imgOn('img09')\" onMouseOut=\"imgOff('img09')\" href=\""+linkplacement+"legal/overview.htm\"><img border=\"0\" name=\"img09\" src=\""+linkplacement+"images/nav/btn_legal.gif\" width=\"59\" height=\"24\" alt=\"Legal\"></a>";
}

var emailAddr = "info";
var emailAddr = emailAddr + "@gestalt.com";
var emailMain = "<a href=\"mailto:" + emailAddr + "\">" + emailAddr + "</a>";

var emailAddr2 = "webmaster";
var emailAddr2 = emailAddr + "@gestalt.com";
var emailWebmaster = "<a href=\"mailto:" + emailAddr + "\">" + emailAddr + "</a>";

function SubmitContactForm()
{
//Check the form
// Submit the form if no errors
	if (CheckAddContactForm() == true )
		{					
		document.ContactForm.action = "contact-us-confirmed.php";
		document.ContactForm.submit();
		}
}
function CheckAddContactForm() 
{
	 if	(document.ContactForm.name_from.value 		== 	"")		
			{ 	
				alert("Please enter your name ");	
				return false;
			}
	else if		(document.ContactForm.email_from.value 		== 	"")		
			{ 	
				alert("Please enter your email address ");	
				return false;
			}
	else	if (document.ContactForm.email_from.value.indexOf("@") == -1) 
			{
				alert("Please enter your email address ");	
				return false;
			}
	else	{	
			return true;
			}
} 

// Function to display current date

function todaydate() {

  var dayName = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  var monthName = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
  var time = new Date();
  var aDay = 24*60*60*1000;
  var days = 0;
  var year = time.getYear();

  if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000))		
	year="19" + year;
	if (navigator.appName == "Netscape")
		year=1900 + year;
		var todaysDate = new Date();

  document.write(dayName[todaysDate.getDay()] + ", " + monthName[todaysDate.getMonth()] + " " + todaysDate.getDate() + ", " + year);

}

function popup(URL)
{
// URL is the passed in parameter where you specified your popup page
// 0 means no, set toolbars = 0 means you don't want a toolbar to show up in your popup.
// if you want a toolbar, set it to 1.  Other attributes work the same.
window.open(URL,"popup01","'toolbars=0,width=500,height=400,menubar=0,scrollbars=1,resize=0'");
}