function ReadCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return ""; 
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}

var democookie = ReadCookie("MRSDemoFlashCookie")
if (democookie=="") //null meaning first time
{
    democookie=1
    SetCookie("MRSDemoFlashCookie",democookie,1) 
}
else if (democookie=="1") 
{
    democookie=0
    SetCookie("MRSDemoFlashCookie",democookie,1) 
}


document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="428" height="349" id="MRSDemo" align="middle" VIEWASTEXT>')
document.write('<param name="allowScriptAccess" value="sameDomain" />')
document.write('<param name="quality" value="high" />')
document.write('<param name="wmode" value="transparent" />')
document.write('<param name="bgcolor" value="#17275d" />')
document.write('<param name="movie" value="/Flash/mrs_demo_final.swf?autoPlay=' + democookie + '" />')
document.write('<embed src="/Flash/mrs_demo_final.swf?autoPlay=' + democookie + '" quality="high" wmode="transparent" bgcolor="#17275d" width="428" height="349" name="MRSDemo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
document.write('</object>')


