// Javascript file for Website of Amit
// http://amitpatel4u.tripod.com/

// get day of the week
function GetDay(intDay) {
	var DayArray = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")
	return DayArray[intDay]
}


// get month of the year
function GetMonth(intMonth) {
	var MonthArray = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec")
	return MonthArray[intMonth]
}


// get date string with day of week
function getDateStrWithDOW() {
	var today = new Date()
	var year = today.getYear()
	if (year<1000) year+=1900
	var todayStr = GetDay(today.getDay()) + ", "
	todayStr += GetMonth(today.getMonth()) + " " + today.getDate()
	todayStr += ", " + year
	return todayStr
}


// print date on screen
function showdate() {
	document.write("<span class='datestyle'>",getDateStrWithDOW(),"</span>");
}


// write welcome greeting
function writeGreeting() {
	var time = new Date();
	var hr = time.getHours();
	var msg ="Good Evening!";
	if (hr>=0 && hr<12) msg="Good Morning!";
	if (hr>=12 && hr<18) msg="Good Afternoon!";
	document.write(msg);
}


// quote for my homepage
function homepageQuote() {
	var quote = new Array(21);
	var rand = Math.floor(Math.random()*21)+1;

	quote[1]="Do not go where the path may lead, go instead where there is no path and leave a trail.";
	quote[2]="You see things and say, Why? but I dream things that never were and say, Why not?";
	quote[3]="The important thing is not to know more than all men, but to know more at each moment than any particular man.";
	quote[4]="There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish.";
	quote[5]="Nothing in education is so astonishing as the amount of ignorance it accumulates in the form of facts.";
	quote[6]="Genius begins great works; labour alone finishes them.";
	quote[7]="A well-schooled person is one who searches for the degree of precision in each kind of study which the nature of the subject at hand admits.";
	quote[8]="Always be best and distinguished above others.";
	quote[9]="Tell me and I may forget. Show me and I may remember. Involve me and I will understand.";
	quote[10]="Vision without action is a daydream. Action without vision is a nightmare.";
	quote[11]="We do not see things as they are; we see them as we are.";
	quote[12]="Great mind discuss ideas; common mind discuss events; simple mind talk about others.";
	quote[13]="When you know a thing, say that you know it; when you do not know a thing admit that you do not know it. That is knowledge.";
	quote[14]="Don't let your past dictate what you will become, but let your past be part of what you will become.";
	quote[15]="Speak your truth quietly and clearly; and listen to others, even to the dull and ignorant; they too have their story.";
	quote[16]="The more I learn, the more I learn how little I know.";
	quote[17]="Luck that's when preparation and opportunity meet.";
	quote[18]="You do not really understand something unless you can explain it to your grandmother." ;
	quote[19]="We can't solve problems by using the same kind of thinking we used when we created them.";
	quote[20]="Live as if you were to die tomorrow. Learn as if you were to live forever.";
	quote[21]="Arise, awake and stop not till the goal is reached.";

	document.write("<div class='quotestyle'>&quot;",quote[rand],"&quot;</div>");
}


// quote for myfamily.html
function familyQuote() {
	var quote = new Array(10);
	var rand = Math.floor(Math.random()*10)+1;

	quote[1]="In every conceivable manner, the family is link to our past, bridge to our future.";
	quote[2]="To put the world right in order, we must first put the nation in order, to put the nation in order, we must first put the family in order, to put the family in order, we must first cultivate our personal life, we must first set our hearts right.";
	quote[3]="The happiest moments of my life have been the few which I have passed at home in the bosom of my family.";
	quote[4]="Call it a clan, call it a network, call it a tribe, call it a family: Whatever you call it, whoever you are, you need one.";
	quote[5]="Family: A social unit where the father is concerned with parking space, the children with outer space, and the mother with closet space.";
	quote[6]="A family is a unit composed not only of children but of men, women, an occasional animal, and the common cold.";
	quote[7]="Blood is thicker than water, and when one's in trouble best to seek out a relative's open arms.";
	quote[8]="In time of test, family is best.";
	quote[9]="If the family were a fruit, it would be an orange, a circle of sections, held together but separable - each segment distinct.";
	quote[10]="A man travels the world over in search of what he needs, and returns home to find it.";

	document.write("<div class='quotestyle'>&quot;",quote[rand],"&quot;</div>");
}


// quote for myfriends.html
function friendsQuote() {
	var quote = new Array(10);
	var rand = Math.floor(Math.random()*10)+1;

	quote[1]="True friendship is like sound health, the value of it is seldom known until it is lost.";
	quote[2]="A real friend is one who walks in when the rest of the world walks out.";
	quote[3]="Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Walk beside me and be my friend.";
	quote[4]="If you should die before me, ask if you can bring a friend.";
	quote[5]="If all my friends were to jump off a bridge, I wouldn't jump with them, I would be at the bottom to catch them.";
	quote[6]="Everyone hears what you say. Friends listen to what you say. Best friends listen to what you don't say.";
	quote[7]="Many people will walk in and out of your life, but only true friends will leave footprints in your heart.";
	quote[8]="If you have one true friend, you have more than your share.";
	quote[9]="When it hurts to look back, and you're scared to look ahead, you can look beside you and your best friend will be there.";
	quote[10]="If I had one gift that I could give you, my friend, it would be the ability to see yourself as others see you, because only then would you know how extremely special you are.";

	document.write("<div class='quotestyle'>&quot;",quote[rand],"&quot;</div>");
}


