function startPoint() {
	randomTips();
	openNewWindow();
}
startPoint();

function randomTips() {
	var contentArray = new Array();   		
	contentArray[0] = "Call your mum out of the blue for a chat. Ah, go on";
	contentArray[1] = "Buy flowers...just for yourself";
	contentArray[2] = "Spend some time in the park (with an umbrella if necessary)";
	contentArray[3] = "Laugh out loud (it's good for you)";
	contentArray[4] = "Arrange to meet a friend you haven't seen for ages";
	contentArray[5] = "Play your favourite song";
	contentArray[6] = "Call in on your neighbour";
	contentArray[7] = "Make a call instead of sending a text or email";
	contentArray[8] = "Have a long, hot soak";
	contentArray[9] = "Go to bed early and get up early, just for once";
	contentArray[10] = "Smile, and watch the world smile with you";
	contentArray[11] = "Buy the big issue, or give money to a busker";
	contentArray[12] = "Lend a hand - to a mother with a pram, for example";
	contentArray[13] = "Treat yourself to half an hour of me-time. What you do with it is up to you";
	contentArray[14] = "Do something you've been meaning to do for ages";
	contentArray[15] = "Have a good gossip";
	contentArray[16] = "Organise an office outing or night out";
	contentArray[17] = "Walk around the centre of town and look for five things you've never noticed before (an unusual building, for example, or a really old tree)";
	contentArray[18] = "Play a silly game with colleagues (office golf anyone, or how about lunchtime tag?)";
	contentArray[19] = "Take an hour for lunch (and not a minute less). You're not allowed to spend it at your desk";
	contentArray[20] = "Dig out some old photos";
	contentArray[21] = "Stand still and look around you for a full three minutes";
	contentArray[22] = "Cook something for your partner you've never tried before (or bake a cake)";
	contentArray[23] = "Start planning your next trip away with family or friends";
	contentArray[24] = "Read at least one chapter of a book";
	contentArray[25] = "Go dancing (in a club, at a class, or just round your living room)";
	contentArray[26] = "Give someone a big hug";
	contentArray[27] = "Offer to baby sit for a friend";
	contentArray[28] = "If you kept one, read through an old diary or journal";
	contentArray[29] = "If it's a clear night, go outside with a loved one and stare at the stars for at least two minutes";
	contentArray[30] = "Wear your favourite outfit...just round the house";
	contentArray[31] = "Turn everything off and enjoy a few moments of complete peace and quiet";
	contentArray[32] = "Before bed, make yourself a soothing camomile tea";
	contentArray[33] = "Get into your pyjamas...at 7pm";
	contentArray[34] = "Eat a healthy, hearty breakfast while chatting to your partner or flatmate - you'll feel better for the rest of the day";
	contentArray[35] = "Take a long, hard look in the mirror. Then admit it, you look good!";
	contentArray[36] = "Fly in the face of fashion. Wear your most comfy clothes all day";
	contentArray[37] = "Go to the gym, but spend the whole time in the sauna";
	contentArray[38] = "Toss a coin to decide your morning. Make both of the choices things you really want to do";
	contentArray[39] = "Write a letter (not an email) to someone you love";
	contentArray[40] = "De-clutter your wardrobe (remember, any space you save is space that can be filled with more clothes) and give unwanted items to charity";
	contentArray[41] = "Have a picnic in the park with a friend (in the bandstand if it's raining, or under the trees)";		
	
	var idx,content;
	var tipsNumber = 42;
	idx = Math.random();
	idx = Math.round(idx*(tipsNumber-1));		
	var content = contentArray[idx];
	changeTipContent(content);
}


function changeTipContent(content) {
	var v = document.getElementById("tipdailycontent");
	if(window.ActiveXObject)
		v.childNodes[1].childNodes[0].innerHTML = content;  //IE
	else if(document.implementation&&document.implementation.createDocument)
		v.childNodes[1].childNodes[0].innerHTML = content;  //firefox
	
}

//open new window for navigation logo
function openNewWindow(){
	var objAnchor = document.getElementById("win");
	objAnchor.setAttribute("target","_blank");
}


