﻿//Author(s):                 		Enterprise Solutions
//Creation Date:             		05.30.2007
//Component Name:            	    allsites.js
//Component Description:     	    All Site Scripts

//References:

//Last Revision Date:
//Revision History:
//06.04.2007 - Separated writeYear() into writeCurrentYear() and writeCopyrightYear() - AJ Phillips
//03/20/2007 - DMS - added code to hide/unhide signin link that appears at the top right side of the page

//Global Intrinsic Variables
var Year_Copyright = "2008";
		
//Writes the copyright year for Clark County
function writeCopyrightYear()
{
    document.write(Year_Copyright);
}

//Writes the current year.	
function writeCurrentYear()
{
	var currentDate = new Date();
	document.write(currentDate.getYear());
}


//dms 03/18/2008 - show/hide the sign in link at the top
//to make this work - ON THE MASTER PAGE
// add id='signinlink' to the div that surrounds the control
// add style="display:none;" to hide
// the control will look like:
// <div style="float:right;display:none;" id="signinlink">
//	 <wssuc:Welcome id="explitLogout" runat="server"/>
// </div>
//
//need to add this to the bottom of the master page too to execute the code
//<script type="text/javascript" language="javascript">signinlink();</script>
//
//this function will unhide if dev-internet or staging-internet
function signinlink()
{
	//window.alert("signin");
	//this will show the sign in link at the top of the page 
	//if the host name is not www.accessclarkcounty.com
	var hostname = window.location.hostname;
	//window.alert(hostname);
	
	if ( (hostname == "dev-internet") || (hostname == "staging-internet") 
		|| (hostname == "staging-internet.co.clark.nv.us") || (hostname == "ccitspqa1m.co.clark.nv.us") )
	{
		//window.alert(window.document.all.item("signinlink").style.display);
		window.document.all.item("signinlink").style.display = "";
	}
}
