﻿<!-- Hide script from old browsers.
//=----------------------------------------------------------------------------
//= This function finds a document control by ID.
//=----------------------------------------------------------------------------
function getElement(id)
{
	return document.getElementById ? document.getElementById(id) : document.all ? document.all(id) : null;
}

//=----------------------------------------------------------------------------
//= This function will show or hide controls.
//=----------------------------------------------------------------------------
function controlShowHide(ctlLink, ctlDiv, hideHtml, hideTitle, showHtml, showTitle)
{
	objLink = getElement(ctlLink);
	objDiv = getElement(ctlDiv);
	if ( objDiv.style.visibility == 'hidden' )
	{
		objDiv.style.visibility = 'visible';
		objDiv.style.display = 'block';
		
		if ( hideHtml == null ) { hideHtml = "-"; }
		objLink.innerHTML = hideHtml;

		if ( hideTitle == null ) { hideTitle = "Hide"; }
		objLink.title = hideTitle;
	}
	else
	{
		objDiv.style.visibility = 'hidden';
		objDiv.style.display = 'none';

		if ( showHtml == null ) { showHtml = "+"; }
		objLink.innerHTML = showHtml;

		if ( showTitle == null ) { showTitle = "Show"; }
		objLink.title = showTitle;
	}
}

//=----------------------------------------------------------------------------
// This function loads the photo that was requested by the previous functions.
//=----------------------------------------------------------------------------
function LoadPhotoViewer(sURL, sAltText) {
	////if (iIndex < 1) return false;
	////if (iIndex > intPhotoIndexMax) return false;
	
	// If the URL is blank, we will return "false" so nothing
	// gets processed and everything is left alone.
	if (sURL == '') return false;
	
	// Check for images, and assign the image URL and Alt text.
	if(document.images)
	{
		// Set the image url to the selected source.
		document.images['imgPhotoViewer'].src = sURL;
		
		// Set the image alt text to the selected text.
		////document.images['Viewers_PhotoViewer_Image'].alt = '' + sAltText;
	}
	
	// Check for the photo viewer text control and assign the inner HTML
	// to the Alt text that is passed in.
	if(document.all)
	{
		// Set the PhotoViewer alternate text to the selected text.
		document.all('txtPhotoViewer').innerHTML = '' + sAltText;
	}
	else if(document.getElementById)
	{
		// Set the PhotoViewer alternate text to the selected text.
		document.getElementById('txtPhotoViewer').innerHTML = '' + sAltText;
	}
}

//=----------------------------------------------------------------------------
// The following functions write out the footer information on all pages.
//=----------------------------------------------------------------------------
function writeFooterLinksHtml()
{
    var linkHome = "<a id='linkHome' class='footerLink' href='/'>Home</a>";
    var linkAbout = "<a id='linkAbout' class='footerLink' href='/content/common/about.htm'>About Us</a>";
    var linkContact = "<a id='linkContact' class='footerLink' href='/content/common/contact.htm'>Contact Us</a>";
    var linkSep = "&nbsp;|&nbsp;";

    document.write("<div>");
    document.write(linkHome);
    //document.write(linkSep);
    //document.write(linkAbout);
    document.write(linkSep);
    document.write(linkContact);
    document.write("</div>");
}
function writeFooterCopyHtml()
{
    var copyText = "&copy; 2007&nbsp; iSchmitz.com.&nbsp; All rights reserved.";
    
    document.write("<div id='copyright' class='smlBoldText'>");
    document.write(copyText);
    document.write("</div>");
}
function writeFooterDateHtml()
{
    var aDayNames = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
    var aMonthNames = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
    var oDate = new Date();
    var iYear = oDate.getYear();
    var iMonth = oDate.getMonth();
    var iDay = oDate.getDay();
    var iDate = oDate.getDate();
    if (iYear < 2000) {iYear = 1900 + iYear;}
    if (iDate < 10) {iDate = '0' + iDate;}
    var sTodaysDate = aDayNames[iDay] + ', ' + aMonthNames[iMonth] + ' ' + iDate + ', ' + iYear
    var dateText = "Today is " + sTodaysDate
    
    document.write("<div id='todaysdate' class='smlText'>");
    document.write(dateText);
    document.write("</div>");
}
// End the hiding here -->