

var globalPath = 'http://idtheft.utah.gov/' //this is the path to root that we can use for building common elements



var uiiOverride = false; //false allows the uii banner to load. true turns it off. used with the loadUII() function below





/* ------------------------------------------------   Menu Arrays   ------------------------------------------------ */

//in the arrays below, the first set of quotes is the url, the second is the graphical button, the third is the alt attribute and title value.

var mainNavArray = new Array();

	mainNavArray[0] = new Array('reportidtheft/index.html', 'imageHere', 'Report ID Theft');

	mainNavArray[1] = new Array('education/index.html', 'imageHere', 'Education');

	mainNavArray[2] = new Array('legislation/index.html', 'imageHere', 'Legislation');

	mainNavArray[3] = new Array('scams_alerts/index.html', 'imageHere', 'Scams and Alerts');

	mainNavArray[4] = new Array('https://iris.utah.gov/iris/validateVictim.jsp', 'imageHere', 'Validate Victim Search');

	mainNavArray[5] = new Array('education/media/index.html', 'imageHere', 'Media Center');

	mainNavArray[6] = new Array('index.html', 'imageHere', 'Home');

	



var homeTopNavArray = new Array();

	homeTopNavArray[0] = new Array('reportidtheft/index.html', 'imageHere', 'Report ID Theft');

	homeTopNavArray[1] = new Array('education/index.html', 'imageHere', 'Education');

	homeTopNavArray[2] = new Array('legislation/index.html', 'imageHere', 'Legislation');

	homeTopNavArray[3] = new Array('scams_alerts/index.html', 'imageHere', 'Scams and Alerts');

	homeTopNavArray[4] = new Array('https://iris.utah.gov/iris/validateVictim.jsp', 'imageHere', 'Validate Victim Search');

	homeTopNavArray[5] = new Array('education/media/index.html', 'imageHere', 'Media Center');

	



var mainLeftArray = new Array();

	mainLeftArray[0] = new Array('dwsnotification/index.html', 'imageHere', 'DWS Notification');

	mainLeftArray[1] = new Array('www.iris.utah.gov', 'imageHere', 'ID Theft Case Status');

	mainLeftArray[2] = new Array('http://attorneygeneral.utah.gov/', 'imageHere', 'Attorney General');

	mainLeftArray[3] = new Array('databreach/index.html', 'imageHere', 'Data Breach');

	mainLeftArray[4] = new Array('contactus/index.html', 'imageHere', 'Contact Us');



/*---------------------------------Contact Us Left Navigation----------------------------------------*/

/*contactUsArray[0] = new Array('urlHere', 'imageHere', 'linkTextHere');*/



var contactUsArray = new Array();

	contactUsArray[0] = new Array('https://www.experian.com/consumer/cac/InvalidateSession.do?code=SECURITYALERT', 'imageHere', 'FRAUD ALERT');

	contactUsArray[1] = new Array('news/story03/fullStory03.html', 'imageHere', 'CREDIT FREEZE');

	contactUsArray[2] = new Array('https://www.annualcreditreport.com/cra/index.jsp', 'imageHere', 'Annual Credit Report');

	contactUsArray[3] = new Array('http://www.ftc.gov/bcp/edu/resources/forms/affidavit.pdf', 'imageHere', 'ID Theft Affidavit');

	contactUsArray[4] = new Array('education/resources/ContactTrackingSheets.pdf', 'imageHere', 'Contact Tracking Sheets');

	

/*---------------------------------Data Breach Left Navigation----------------------------------------*/

/*dataBreachArray[0] = new Array('urlHere', 'imageHere', 'linkTextHere');*/



var dataBreachArray = new Array();

	dataBreachArray[0] = new Array('https://www.experian.com/consumer/cac/InvalidateSession.do?code=SECURITYALERT', 'imageHere', 'FRAUD ALERT');

	dataBreachArray[1] = new Array('news/story03/fullStory03.html', 'imageHere', 'CREDIT FREEZE');

	dataBreachArray[2] = new Array('https://www.annualcreditreport.com/cra/index.jsp', 'imageHere', 'Annual Credit Report');

	dataBreachArray[3] = new Array('http://www.ftc.gov/bcp/edu/resources/forms/affidavit.pdf', 'imageHere', 'ID Theft Affidavit');

	dataBreachArray[4] = new Array('education/resources/ContactTrackingSheets.pdf', 'imageHere', 'Contact Tracking Sheets');

	

/*---------------------------------Education Left Navigation----------------------------------------*/

/*educationArray[0] = new Array('urlHere', 'imageHere', 'linkTextHere');*/



var educationArray = new Array();

	educationArray[0] = new Array('https://www.experian.com/consumer/cac/InvalidateSession.do?code=SECURITYALERT', 'imageHere', 'FRAUD ALERT');

	educationArray[1] = new Array('news/story03/fullStory03.html', 'imageHere', 'CREDIT FREEZE');

	educationArray[2] = new Array('https://www.annualcreditreport.com/cra/index.jsp', 'imageHere', 'Annual Credit Report');

	educationArray[3] = new Array('http://www.ftc.gov/bcp/edu/resources/forms/affidavit.pdf', 'imageHere', 'ID Theft Affidavit');

	educationArray[4] = new Array('education/resources/ContactTrackingSheets.pdf', 'imageHere', 'Contact Tracking Sheets');

	

/*---------------------------------Legislation Left Navigation----------------------------------------*/

/*legislationArray[0] = new Array('urlHere', 'imageHere', 'linkTextHere');*/



var legislationArray = new Array();

	legislationArray[0] = new Array('https://www.experian.com/consumer/cac/InvalidateSession.do?code=SECURITYALERT', 'imageHere', 'FRAUD ALERT');

	legislationArray[1] = new Array('news/story03/fullStory03.html', 'imageHere', 'CREDIT FREEZE');

	legislationArray[2] = new Array('https://www.annualcreditreport.com/cra/index.jsp', 'imageHere', 'Annual Credit Report');

	legislationArray[3] = new Array('http://www.ftc.gov/bcp/edu/resources/forms/affidavit.pdf', 'imageHere', 'ID Theft Affidavit');

	legislationArray[4] = new Array('education/resources/ContactTrackingSheets.pdf', 'imageHere', 'Contact Tracking Sheets');

	

/*---------------------------------Scams and Alerts Left Navigation----------------------------------------*/

/*scamsAlertsArray[0] = new Array('urlHere', 'imageHere', 'linkTextHere');*/



var scamsAlertsArray = new Array();

	scamsAlertsArray[0] = new Array('https://www.experian.com/consumer/cac/InvalidateSession.do?code=SECURITYALERT', 'imageHere', 'FRAUD ALERT');

	scamsAlertsArray[1] = new Array('news/story03/fullStory03.html', 'imageHere', 'CREDIT FREEZE');

	scamsAlertsArray[2] = new Array('https://www.annualcreditreport.com/cra/index.jsp', 'imageHere', 'Annual Credit Report');

	scamsAlertsArray[3] = new Array('http://www.ftc.gov/bcp/edu/resources/forms/affidavit.pdf', 'imageHere', 'ID Theft Affidavit');

	scamsAlertsArray[4] = new Array('education/resources/ContactTrackingSheets.pdf', 'imageHere', 'Contact Tracking Sheets');

	

/*---------------------------------Report ID Theft Navigation----------------------------------------*/

/*scamsAlertsArray[0] = new Array('urlHere', 'imageHere', 'linkTextHere');*/



var reportIDTheftArray = new Array();

	reportIDTheftArray[0] = new Array('https://www.experian.com/consumer/cac/InvalidateSession.do?code=SECURITYALERT', 'imageHere', 'FRAUD ALERT');

	reportIDTheftArray[1] = new Array('#', 'imageHere', 'Link 1');

	reportIDTheftArray[2] = new Array('#', 'imageHere', 'Link 2');

	reportIDTheftArray[3] = new Array('#', 'imageHere', 'Link 3');

	reportIDTheftArray[4] = new Array('#', 'imageHere', 'Link 4');

	

	

/* ------------------------------------------------   Menu Functions   ------------------------------------------------ */

// !! this uses an array to build menu items. it relies on the global variable called globalPath (defined at top of page) to point to the current domain.

// Provide the array you want to build.

// Answer 'yes' to hardReturn if you want the menu organized as paragraphs

// Answer 'yes' to listItem if you want the menu organized as a list



function buildTextMenu(theArray, hardReturn, listItem, sectionHighlight) { 

 var htmlCode = '';

 

 var listOpen = '';

 var listClose = '';

 var listItemBegin = '';

 var listItemEnd = '';

 var hardReturnBegin = '';

 var hardReturnEnd = '';

 var addClass = '';

 

 if (hardReturn == 'yes') {

  hardReturnBegin = '<p>';

  hardReturnEnd = '</p>';

 }

 

 if (listItem == 'yes') {

  listOpen = '<ul>';

  listClose = '</ul>';

  listItemBegin = '<li>';

  listItemEnd = '</li>';

 }

 

 htmlCode += listOpen;

 

 for(i=0; i<theArray.length; i++) {

  if (sectionHighlight == i) {

   addClass = 'class="selected"';

  } else {

   addClass = '';

  }

  

if( theArray[i][0].indexOf('http://') != -1 || theArray[i][0].indexOf('https://') != -1){ //check for absolute url

   htmlCode += hardReturnBegin + listItemBegin + '<a href="' + theArray[i][0] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '" ' + addClass + '>' + theArray[i][2] + '</a>' + listItemEnd + hardReturnEnd;

  } else { //if url is not absolute, then add the global path

   htmlCode += hardReturnBegin + listItemBegin + '<a href="' + globalPath + theArray[i][0] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '" ' + addClass + '>' + theArray[i][2] + '</a>' + listItemEnd + hardReturnEnd;

  }

  //alert('addClass is: ' + addClass);

 }

 

 htmlCode += listClose;

 //alert(htmlCode);

 

 document.write(htmlCode);

 //alert(htmlCode);

}





//buildGraphicMenu(mainNavArray);

function buildGraphicMenu(theArray) { // !! this uses an array to build menu items. it relies on the global variable called globalPath (defined at top of page) to point to the current domain. 

	var htmlCode = '';



	for(i=0; i<theArray.length; i++) {

		if( theArray[i][0].indexOf('http://') != -1 ){ //check for absolute url

			htmlCode += '<a href="' + theArray[i][0] + '"><img src="' + globalPath + theArray[i][1] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '" /></a>';

		} else { //if url is not absolute, then add the global path

			htmlCode += '<a href="' + globalPath + theArray[i][0] + '"><img src="' + globalPath + theArray[i][1] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '" /></a>';

		}

	}

	

	document.write(htmlCode);

}







/* ------------------------------------------------   Content   ------------------------------------------------ */

function uiiCustom() {

	var htmlCode = '';

	htmlCode += '<a href="http://utah.gov"><img src="' + globalPath + 'common/images/uii/00Logo.gif" alt="Utah.gov" title="Utah.gov" width="70" height="31" /></a>';

	//htmlCode += '<a href="http://www.utah.gov/services/index.html"><img src="' + globalPath + 'common/images/uii/01OnlineServices.gif" alt="Online Services" title="Online Services" width="140" height="31" /></a>';

	//htmlCode += '<a href="http://www.utah.gov/government/agencylist.html"><img src="' + globalPath + 'common/images/uii/02AgencyList.gif" alt="Agency List" title="Agency List" width="122" height="31" /></a>';

	//htmlCode += '<a href="http://business.utah.gov/business/"><img src="' + globalPath + 'common/images/uii/03Business.gif" alt="Business" title="Business" width="92" height="31" /></a>';

	

	document.write(htmlCode);

}







/*-----------------------------------BRANDING BANNERS---------------------------------------*/

//defaultBannerArray[] = new Array('default image', 'alt/title/description');



var defaultBannerArray = new Array();

	defaultBannerArray[0] = new Array('common/banner/images/home/homeDefault.jpg', 'ID Theft'); // default (same as home, for now)

	defaultBannerArray[1] = new Array('common/banner/images/home/homeDefault.jpg', 'ID Theft Home');

	defaultBannerArray[2] = new Array('common/banner/images/education/educationDefault.jpg', 'ID Theft Education');

	defaultBannerArray[3] = new Array('common/banner/images/legislation/legislationDefault.jpg', 'ID Theft Legislation');

	defaultBannerArray[4] = new Array('common/banner/images/scams/scamsDefault.jpg', 'ID Theft Scams and Alerts');

	defaultBannerArray[5] = new Array('common/banner/images/breach/breachDefault.jpg', 'ID Theft Data Breach');

	defaultBannerArray[6] = new Array('common/banner/images/contact/contactDefault.jpg', 'ID Theft Contact Us');

	defaultBannerArray[7] = new Array('common/banner/images/dws/dwsDefault.jpg', 'ID Theft DWS');

	defaultBannerArray[8] = new Array('common/banner/images/reportidtheft/reportIDTheftDefault.jpg', 'Report ID Theft');



	



function brandingContent(whatSection, buildFlash) {

	//alert("whatSection = " + whatSection);

	var htmlCode = '';



	htmlCode += '<div id="brandingLeft"><a href="' + globalPath + 'index.html"><img src="http://webassets.utah.gov/idtheft.utah.gov/common/images/branding/irislogo.gif" alt="IRIS - Identity Theft Reporting Information System" width="232" height="123" border="0" /></a></div>';

	htmlCode += '<div id="brandingMiddle"><img src="' + globalPath + defaultBannerArray[whatSection][0] + '" alt="' + defaultBannerArray[whatSection][1] + '" title="' + defaultBannerArray[whatSection][1] + '" /></div>';

	htmlCode += '<div id="brandingRight"><a href="http://attorneygeneral.utah.gov/"><img src="http://webassets.utah.gov/idtheft.utah.gov/common/images/branding/aglogo.gif" alt="State of Utah Attorney General" width="232" height="123" /></a></div>';

	

	document.write(htmlCode);

	



	if(buildFlash == true) {



		var theFlashVars = {};

			theFlashVars.xmlSource = globalPath + "common/banner/banners.xml";

			theFlashVars.whatBannerSection = whatSection;

			theFlashVars.showSourcePath = false;

			theFlashVars.theDomainSuffix = 'utah.gov';

		

		var params = {};

		

		var attributes = {};

	

		swfobject.embedSWF(globalPath + "common/banner/banner.swf", "brandingMiddle", "446", "123", "8", false, theFlashVars, params, attributes);



	}

}





        













var theDate = new Date();

var currentYear = theDate.getYear();

if (currentYear < 2000) {

	currentYear += 1900;

}

//alert('currentYear = ' + currentYear);



function lastmod() {

	var months = new Array(13);

	months[1] = "January";

	months[2] = "February";

	months[3] = "March";

	months[4] = "April";

	months[5] = "May";

	months[6] = "June";

	months[7] = "July";

	months[8] = "August";

	months[9] = "September";

	months[10] = "October";

	months[11] = "November";

	months[12] = "December";



	var dateObj = new Date(document.lastModified)

	var lmonth = months[dateObj.getMonth() + 1]

	var fyear = dateObj.getYear()

	var date = dateObj.getDate()

	

	htmlCode = '<p>&nbsp</p>';

	htmlCode += '<p align="right">';

	htmlCode += ' This page last modified: ';

	htmlCode += lmonth;

	htmlCode += ' ';

	htmlCode += date;

	htmlCode += ', ';

	htmlCode += fyear;

	htmlCode += '</p>';

	

	document.write(htmlCode);

}



function footer() {

	var htmlCode = '';

	htmlCode += '<p>| <a href="' + globalPath + 'dwsnotification/index.html">DWS Notification</a> | <a href="https://iris.utah.gov">ID Theft Case Status</a> | <a href="' + globalPath + 'databreach/index.html">Data Breach</a> | <a href="' + globalPath + 'education/StepbyStepInstructions/index.html">Step-by-Step Help</a> | <a href="http://www.crimereports.com">crimereports.com</a> | <a href="' + globalPath + 'contactus/index.html">Contact Us</a> </p>';

	htmlCode += '<p>';

	htmlCode += '&copy;' + currentYear + '&nbsp;Utah State Attorney General\'s Office';

	htmlCode += '</p>';

	document.write(htmlCode);



}

 

function footer2() {

	var htmlCode = '';

	htmlCode += '<p>';

	htmlCode += '&copy;' + currentYear + '&nbsp;Utah State Attorney General\'s Office';

	htmlCode += '</p>';

	document.write(htmlCode);



}









/* ------------------------------------------------   Popups   ------------------------------------------------ */

// daParams means include parameters or don't; parameter passed here should be 'y' for yes or 'n' for no

// You can use defaults for the parameters by leaving them between empty quote marks. Example: ('http:// url', '', '', '', '', 'y')

// You can specify the parameters you want to by adding numeric values. DO NOT, however, put the numeric values in quotes.



function popup(daURL, daWidth, daHeight, daTop, daLeft, daParams) {



	var h = ''; // New window height. Defined by daHeight, but has a default if daHeight is empty.

	var w = ''; // New window width. Defined by daWidth, but has a default if daWidth is empty.

	var t = ''; // New window location from screen top. Defined by daTop, but has a default if daTop is empty.

	var l = ''; // New window location from screen left. Defined by daLeft, but has a default if daLeft is empty.



		if(daWidth == 'null' || daWidth == '') {

		  w = screen.availWidth / 2; //width default

		} else {

		  w = daWidth;

		}



		if(daHeight == 'null' || daHeight == '') {

		  h = screen.availHeight / 2; //height default

		} else {

		  h = daHeight;

		}



		if(daTop == 'null' || daTop == '') {

		  t = 75; //top default

		} else {

		  t = daTop

		}



		if(daLeft == 'null' || daLeft == '') {

		  l = screen.availWidth / 2.5; //left default

		} else {

		  l = daLeft

		}



	var params = 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+ w +',height='+ h +',top='+ t +',left='+ l +'';

	var params2 = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+ w +',height='+ h +',top='+ t +',left='+ l +'';

	var newWindow = '';



		if (daParams == 'y') {

		  newWindow = window.open(daURL, 'daWindow', params);

		} else {

		  newWindow = window.open(daURL, 'daWindow', params2);

		}

		

	newWindow.focus();

}



/* ------------------------------------------------   IE Style   ------------------------------------------------ */



function ieStyle() {

	//alert('ieStyle() fired');

	var htmlCode = '';

	htmlCode += '<!--[if IE 5]><link href="' + globalPath + 'common/css/ieStyle.css" rel="stylesheet" type="text/css"><![endif]-->';

	htmlCode += '<!--[if IE 6]><link href="' + globalPath + 'common/css/ieStyle.css" rel="stylesheet" type="text/css"><![endif]-->';

	

	document.write(htmlCode);

}



/* ------------------------------------------------   UII Loader   ------------------------------------------------ */

function checkUIIblock() {

	if (uiiOverride == true) {

		document.getElementById('uiiStage').innerHTML = '<img src="common/images/uii/uiiLeft.gif" alt="Utah.gov" title="Utah.gov" />';

	}

}



function loadUII(pleaseLoad) {

	var htmlCode =  '';



	if (pleaseLoad == true && uiiOverride == false) {

		//alert("pleaseLoad = true");

		document.getElementById('uiiBanner').innerHTML = document.getElementById('uiiStage').innerHTML;

		document.getElementById('uiiStage').innerHTML = ' ';

	}

}





































































