var imagePath = "/media/images/common/";
var rightNavPath = "/media/images/common/right_nav/";
var homePath = "/media/images/homepage/";

function swapHomeImg(elm){
	var obj = document.getElementById(elm);
	obj.src = homePath+elm+"_over.jpg";
}

function swapHomeImgBack(elm){
	var obj = document.getElementById(elm);
	obj.src = homePath+elm+".jpg";
}

function swapNav(elm){
	var obj = document.getElementById(elm);
	obj.src = imagePath+elm+"_over.jpg";
}

function swapNavBack(elm){
	var obj = document.getElementById(elm);
	obj.src = imagePath+elm+".jpg";
}

function swapRightNav(elm){
	var obj = document.getElementById(elm);
	obj.src = rightNavPath+elm+"_over.gif";
}

function swapRightNavBack(elm){
	var obj = document.getElementById(elm);
	obj.src = rightNavPath+elm+".gif";
}

function setNav(elm){
	var obj = document.getElementById(elm);
	obj.className = 'selected';
}

//FUNCTIONS USED FOR WEEKLY TIP ROTATION - 1 FOR EACH WEEK OF THE YEAR
function getTip(){
	var weekNum = getWeekNr();
	switch(weekNum){
		case 1:
			message = "Carry only one or two credit cards in your wallet.";
			break;
		case 2:
			message = "Carry only the identification information that you\'ll actually need when you go out.";
			break;
		case 3:
			message = "Do not carry your social security card in your wallet; leave it in a secure place.";
			break;
		case 4:
			message = "If your purse or wallet was stolen, report it to the police immediately.";
			break;
		case 5:
			message = "Review your bank and credit card statements monthly for signs of suspicious activity. Immediately contact the company if an item looks suspicious.";
			break;
		case 6:
			message = "If your statement is late by more than a couple of days, call your credit card company or bank to confirm your billing address and account balances.";
			break;
		case 7:
			message = "Check your credit reports from the three major credit bureaus, Equifax, Experian and TransUnion, at least twice a year and correct any inaccuracies.";
			break;
		case 8:
			message = "Order a copy of your credit report. An amendment to the federal Fair Credit Reporting Act requires each of the major nationwide consumer reporting companies to provide you with a free copy of your credit reports, at your request, once every 12 months. To order your free annual report from one or all the national consumer reporting companies, visit www.annualcreditreport.com, call toll-free 877-322-8228, or complete the Annual Credit Report Request Form and mail it to: Annual Credit Report Request Service, P.O. Box 105281, Atlanta, GA 30348-5281. You can print the form from ftc.gov/credit. Do not contact the three nationwide consumer reporting companies individually; they provide free annual credit reports only through www.annualcreditreport.com";
			break;
		case 9:
			message = "Under state law, consumers in Colorado, Georgia, Maine, Maryland, Massachusetts, New Jersey, and Vermont already have free access to their credit reports.";
			break;
		case 10:
			message = "Do not hand over your ATM/Debit Cards or Credit Cards to anyone.";
			break;
		case 11:
			message = "Cancel all unused credit card accounts. Even though you do not use them, their account numbers are recorded on your credit report.";
			break;
		case 12:
			message = "Avoid paying by credit card if you think the business does not use adequate safeguards to protect your personal information.";
			break;
		case 13:
			message = "When you open new accounts, place passwords on them.";
			break;
		case 14:
			message = "Add passwords to your credit card, bank and telephone accounts that are not the typical passwords, such as the last four digits of your Social Security number, your birth date, your mother\'s maiden name, your phone number, or a series of consecutive numbers. If you are opening a new account that requests your mother\'s maiden name, use a password instead.";
			break;
		case 15:
			message = "Before providing identifying information, especially your Social Security number, ask if the information is required. Give your Social Security number only when absolutely necessary and ask to use other types of identifiers.";
			break;
		case 16:
			message = "Remove your Social Security number from any identification you carry, such as checks, a driver license or your health insurance card. Both your health insurance company and the Department of Motor Vehicles will give you a new number if you request it.";
			break;
		case 17:
			message = "If you ask, only the last four digits of your Social Security number will appear on your credit reports.";
			break;
		case 18:
			message = "Deposit your outgoing mail in post office collection boxes or at your local post office, rather than in an unsecured mailbox. Promptly remove mail from your mailbox.";
			break;
		case 19:
			message = "If you\'re planning to be away from home and can\'t pick up your mail, call the U.S. Postal Service at 1-800-275-8777 to request a vacation hold. The Postal Service will hold your mail at your local post office until you can pick it up or are home to receive it.";
			break;
		case 20:
			message = "When ordering new checks, pick them up from the bank instead of having them mailed to your home mailbox.";
			break;
		case 21:
			message = "Opt out of receiving offers of credit in the mail by calling: 1-888-5-OPTOUT (1-888-567-8688) or through the following website: www.optoutprescreen.com. The three nationwide consumer reporting companies use the same toll-free number to let consumers choose not to receive credit offers based on their lists. Note: You will be asked to provide your Social Security number which the consumer reporting companies need to match you with your file.";
			break;
		case 22:
			message = "Be cautious when responding to promotions. Identity thieves may create phony promotional offers to get you to give them your personal information.";
			break;
		case 23:
			message = "Be wary of anyone calling you to \"confirm\" personal or financial information. Often, these are criminals trying to obtain those facts under the guise of \"confirmation\".";
			break;
		case 24:
			message = "Stop receiving unsolicited calls. You may do so by contacting the National Do Not Call Registry either by phone at 1-888-382-1222 or online at https://www.donotcall.gov/register/Reg.aspx .The registration is free of charge and is effective for five years. Never give out personal information on the phone, through the mail, or on the Internet unless you\'ve initiated the contact or you are sure you know who you\'re dealing with. Identity thieves are clever, and have posed as representatives of banks, Internet service providers (ISPs), and even government agencies to get people to reveal their Social Security number, mother\'s maiden name, account numbers, and other identifying information.";
			break;
		case 25:
			message = "Before you share any personal information, confirm that you are dealing with a legitimate organization. Call the company back using a phone number from a statement or from the telephone book (not a phone number the person who is calling gives you). You may check an organization\'s website by typing its URL in the address line, rather than cutting and pasting it. Many companies post scam alerts when their name is used improperly. For more information, see How Not to Get Hooked by a \'Phishing\' Scam";
			break;
		case 26:
			message = "Treat your trash carefully.";
			break;
		case 27:
			message = "To thwart an identity thief who may pick through your trash or recycling bins to capture your personal information, tear or shred your charge receipts, copies of credit applications, insurance forms, physician statements, checks and bank statements, expired charge cards that you\'re discarding, and credit offers you get in the mail. Preferably use a crosscut shredder, which cuts paper into confetti like pieces instead of strips.";
			break;
		case 28:
			message = "To see a list of the documents that you should always shred, please see the following link: http://www.fightidentitytheft.com/shred.html.";
			break;
		case 29:
			message = "Secure personal information in your workplace. Keep your purse or wallet in a safe place at work; do the same with copies of administrative forms that have your sensitive personal information such as your paycheck.";
			break;
		case 30:
			message = "Ask about information security procedures in your workplace or at businesses, doctor\'s offices or other institutions that collect your personally identifying information.";
			break;
		case 31:
			message = "Find out who has access to your personal information and verify that records are kept in a secure location. Find out if your information will be shared with anyone else. If so, ask how your information can be kept confidential.";
			break;
		case 32:
			message = "Ask about the disposal procedures for those records as well.";
			break;
		case 33:
			message = "Secure personal information in your home, especially if you have roommates, employ outside help, or are having work done.";
			break;
		case 34:
			message = "If your house or car was broken into, report it to the police immediately.";
			break;
		case 35:
			message = "Do not keep computers online when not in use. Either shut them off or physically disconnect them from Internet connection.";
			break;
		case 36:
			message = "Use anti-virus software and a firewall, and keep them up to date Some phishing emails contain software that can harm your computer or track your activities on the Internet without your knowledge.";
			break;
		case 37:
			message = "Be cautious about opening any attachment or downloading any files from emails you receive, regardless of who sent them. These files can contain viruses or other software that can weaken your computer\" security.";
			break;
		case 38:
			message = "If you get an email or pop-up message that asks for personal or financial information, do not reply. And don\" click on the link in the message, either.";
			break;
		case 39:
			message = "Do not leave any personal information in your car.";
			break;
		case 40:
			message = "If your car is broken into, report it to the police immediately.";
			break;
		case 41:
			message = "When buying a new car from a private individual, make sure the title and registration match the name and address of the person selling the car.";
			break;
		case 42:
			message = "Be cautious of a seller with no fixed address, place of employment, or phone number.";
			break;
		case 43:
			message = "Carry only one or two credit cards in your wallet.";
			break;
		case 44:
			message = "Carry only the identification information that you\'ll actually need when you go out.";
			break;
		case 45:
			message = "Do not carry your social security card in your wallet; leave it in a secure place.";
			break;
		case 46:
			message = "If your purse or wallet was stolen, report it to the police immediately.";
			break;
		case 47:
			message = "Review your bank and credit card statements monthly for signs of suspicious activity. Immediately contact the company if an item looks suspicious.";
			break;
		case 48:
			message = "If your statement is late by more than a couple of days, call your credit card company or bank to confirm your billing address and account balances.";
			break;
		case 49:
			message = "Check your credit reports from the three major credit bureaus, Equifax, Experian and TransUnion, at least twice a year and correct any inaccuracies.";
			break;
		case 50:
			message = "Order a copy of your credit report. An amendment to the federal Fair Credit Reporting Act requires each of the major nationwide consumer reporting companies to provide you with a free copy of your credit reports, at your request, once every 12 months. To order your free annual report from one or all the national consumer reporting companies, visit www.annualcreditreport.com, call toll-free 877-322-8228, or complete the Annual Credit Report Request Form and mail it to: Annual Credit Report Request Service, P.O. Box 105281, Atlanta, GA 30348-5281. You can print the form from ftc.gov/credit. Do not contact the three nationwide consumer reporting companies individually; they provide free annual credit reports only through www.annualcreditreport.com";
			break;
		case 51:
			message = "Under state law, consumers in Colorado, Georgia, Maine, Maryland, Massachusetts, New Jersey, and Vermont already have free access to their credit reports.";
			break;
		case 52:
			message = "Do not hand over your ATM/Debit Cards or Credit Cards to anyone.";
			break;
	}
	writeTip(message);
}

function writeTip(message){
	document.getElementById('tip_area').innerHTML = message;
}

function getWeekNr(){
	var today = new Date();
	Year = takeYear(today);
	Month = today.getMonth();
	Day = today.getDate();
	now = Date.UTC(Year,Month,Day+1,0,0,0);
	var Firstday = new Date();
	Firstday.setYear(Year);
	Firstday.setMonth(0);
	Firstday.setDate(1);
	then = Date.UTC(Year,0,1,0,0,0);
	var Compensation = Firstday.getDay();
	if (Compensation > 3)
		Compensation -= 4;
	else
		Compensation += 3;
		
	NumberOfWeek =  Math.round((((now-then)/86400000)+Compensation)/7);
	return NumberOfWeek;
}


function takeYear(theDate){
	x = theDate.getYear();
	var y = x % 100;
	y += (y < 38) ? 2000 : 1900;
	return y;
}

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
