/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: John Hobbs :: http://www.velvetcache.org/ */

var quotes = new Array(16) // Add your quotes below
  quotes[0]="Hey, when you are walking that walk; remember not to step on someone else. Step over if you need to.";
  quotes[1]="If something is unbelievable to you; it may be time to check your expectations or limitations, something may need to change.";
  quotes[2]="Silence is golden. Connect your head and your heart - breathe - then speak from that place. There will not have to be an 'I'm sorry.'";
  quotes[3]="You love peace. It is time to seek out something new to try... perhaps a ride to an area that is less crowded can give you a different perception.";
  quotes[4]="If it is due to happen 1 hour, 1 day, or 1 week it is still the future and you can not get there without being here.";
  quotes[5]="They did not make you mad. They did not reach inside and flip your mad switch. If they crossed a boundary of yours, it is because you did not let them know. Words may not be enough.";
  quotes[6]="Today you need to keep your mind present. This means right now this second because even one hour from now is the future. If you are not present you may miss something. ";
  quotes[7]="No one knows everything. Do not be afraid to ask or search it out. You can say you do not have that answer at this moment. ";
  quotes[8]="You may believe you do not choose your family at birth but you certainly can now. Do not engage, step back and breathe. You have choice and choosing to set your boundaries would be wise. Be what you want others to be. Set the example. ";
  quotes[8]="Mr/Mrs right is only what is right at this moment for you. Make sure they can adapt and grow - this way they may be Mr/Mrs right for life. ";
  quotes[9]="Feeling alone? Stop trying to do it all yourself. Seek help - it is out there for everyone.";
  quotes[10]="Gather your community. You all need a good laugh, and good company.";
  quotes[11]="Today is your day to work on  efficiency...discover what is lacking. Finding what is lacking in life usually takes you looking within.  It is like finding gold. This is why they call it a 'Mine.'";
  quotes[12]="The more we see, the more we grow. It is through growing we realize we can reach higher. ";
  quotes[13]="Take not of the beauty around you both big and small. When we focus on the things that are beautiful either in us or around us then we will attract more of the beauty for us. ";
  quotes[14]="Letting others make decisions for you? This only makes it easier to blame others rather than yourself. Now is time to own your own power and get out of your own way. ";
  quotes[16]="Remember not all things happen in our timeframe. This does not mean it will not happen. This is your choice.";
  quotes[17]="Ego is self image and this mean ego itself is not a bad thing. It is when it is small or big that it becomes out of balance. ";
  quotes[18]="Are you living your life or is your mind? Does your mind know what your heart wants?  ";
  quotes[19]="You need to trust yourself, but first you need to be quiet enough to hear yourself.";
  quotes[20]="Transition takes us off autopilotÑ intention puts you in the pilot seat. Where are you going? Live your life, speak your words, and create your actions, all with intention. Choose from your heart and speak your choice with words and actions that are a reflection of who you really are and what you truly want.";
  quotes[21]="Fear not, for fear is an illusion; and wait no more for life will pass you by.";
  quotes[22]="Why be the only person standing your way?  It is time to make a move. Step out of your own way. They are all excuses and fears. You have created. If you have created them, you can dispel them.";
  quotes[23]="No matter what everyone else has taught you, you are the author of your own journey. Take from your many teachers in life what resonates for you. IF it causes an internal struggle than it does not resonate for you. ";
  quotes[24]="To be noble in mind and true in heart will enable you to speak that great wisdom that lies with in. And that great wisdom will show the true reflection of you. ";
  quotes[25]="Remember to make the choice that gets you where you truly want to be. Your heart knows the way.";
  quotes[26]="How you do something is more important that if what you do is successful.";
  quotes[27]="People learn best by results. This why we teach by example, so set that example. If you expect someone to do something you will not do you will find they will not also. ";
  quotes[28]="Stress happens when your heart says one thing and your head says another. Connect the two and breath. What are you feeling and why are you feeling it? These are the questions you ask to connect the two and make it one. ";
  quotes[29]="It is not too late to follow your dream. Just create the vision and walk. Do not let life pass your dreams by. Dreams happen at every age.";
  quotes[30]="When you point out the positive thing about people you will get more positive things out of people. Try pointing out those things that work. ";
  quotes[31]="Your history can help as long as you do not use it as a road block or excuse. Learn from your past so you can be present and move on to a better future.";
  quotes[32]="With judgment comes punishment, but with acceptance, growth may occur for self and/or others.";
  quotes[33]="If you bite your tongueÉ it will hurt and may even bleed. Speak the things that ÒneedÓ to be spokenÑgently.";
  quotes[34]="Speak from your possibilityÉis it kind, true and necessary?  Less is just less, if you want moreÉthen create better communication.  Your relationships depend on it!";
  quotes[35]="This life is but a blink of time to your soul--but as vital as your breathe is to youÉlearn to enjoy the moments.";
  quotes[36]="Take time to share with the ones you loveÉListen to what they say.  Act as if it is the last time you will see themÉwhat would you say?  Do it today and create a better place while you walk this earthly plane.";
  quotes[37]="Are you feeling alone?  Create a different space for you by getting out and participating in life.  ";
  quotes[38]="Set the exampleÉ.be kind then you can ask for it to be returned.  Sometimes the hardest things in life have the biggest rewards.";
  quotes[39]="Remember, wonderful things come in small packages.  It will arrive soon, don't miss it!";
    
/* function fortune(objID) {
  var rand_int = Math.floor(Math.random()*16); // Get a number for picking the quote
  document.getElementById(objID).innerHTML=(quotes[rand_int]); // Put the quote in the box
  
  document.getElementById('fortunebox').style.visibility="visible";
  
}  */


function fortune(objID){

var runstring = "fortunedelayed('"+objID+"');"

setTimeout(runstring,2000);

}


function fortunedelayed(objID) {
 var
cc = checkCookie();
//alert("Checkcookie was : "+ cc);
if (cc){
	document.getElementById(objID).innerHTML="A new message awaits for you tomorrow. Please check back..."; // Put the quote in the box
	document.getElementById ('fortunebox').style.visibility="visible";
}
else {
 
 var rand_int = Math.floor(Math.random()*16); // Get a number for picking the quote
 document.getElementById(objID).innerHTML=(quotes[rand_int]); // Put the quote in the box

 document.getElementById ('fortunebox').style.visibility="visible";
}
}

function closefortune() {
	document.getElementById('fortunebox').style.visibility="hidden";

}

function getCookie(c_name)
{
//alert("Called getCookie:"+c_name);

if(document.cookie.length>0){

	c_start=document.cookie.indexOf(c_name + "=")

if(c_start!=-1)
{
	c_start=c_start + c_name.length+1
	c_end=document.cookie.indexOf(";",c_start)
	if(c_end==-1) c_end=document.cookie.length
	var retstr = unescape(document.cookie.substring(c_start,c_end))
	//alert("cookie found was:"+retstr);
	return retstr;
}

}

return "";

}

function setCookie(c_name,value,expiredays)
{
	var exdate=new Date()
	exdate.setDate(exdate.getDate()+expiredays)
	document.cookie=c_name+"=" +escape(value)+((expiredays==null) ? "" : "; expires=" +exdate.toGMTString())
}

function checkCookie()
{
	username=getCookie('dailyintention')

	//alert("username was:"+username);
if(username && username!=null && username!="")
{
	return true;
}
else
{
	//alert("tried to set the cookie");
	setCookie('dailyintention','delivered',1);
	return false;
}

}






