function getexpirydate( nodays){
var UTCstring;
Today = new Date();
nomilli=Date.parse(Today);
Today.setTime(nomilli+nodays*24*60*60*1000);
UTCstring = Today.toUTCString();
return UTCstring;
}
function getcookie(cookiename) {
 var cookiestring=""+document.cookie;
 var index1=cookiestring.indexOf(cookiename);
 if (index1==-1 || cookiename=="") return ""; 
 var index2=cookiestring.indexOf(';',index1);
 if (index2==-1) index2=cookiestring.length; 
 return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}
function setcookie(name,value,duration){
cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration);
document.cookie=cookiestring;
if(!getcookie(name)){
return false;
}
else{
return true;
}
}
function writeMMBWelcome(){
var str='';
str+='<div id="banner" align="center"><strong>First Time Visitor?<br>';
str+='Welcome to my money blog, where you can see<Br> <a href="http:\/\/www.mymoneyblog.com\/my-net-worth-history\/">my actual net worth<\/a>, <a href="http://www.mymoneyblog.com/my-retirement-investment-portfolio\/">how it is invested<\/a>, and my<br>daily updates on making more money and spending less<\/a>.<br><br>';
str+='Don\'t Miss: <a href="http:\/\/www.mymoneyblog.com\/5-easy-ways-to-make-100-today\/">5 Ways You Can Save <font color="#008400">$100<\/font><\/a><br><br>';
str+='Sound interesting? <a href="http:\/\/www.mymoneyblog.com\/subscribe\/">Subscribe to updates easily<\/a>.<br><br><\/strong><\/div>';
str+='<img src="http:\/\/www.mymoneyblog.com\/images\/dot_clear.gif" width="100" height="5"><br>';
document.write(str);
}

