function scrollit_r2l(seed)
{
        var m1  = "Have it Done Right...The First Time   "; 
        var m2  = "Contact our staff at 1-781-231-9990 or...";
        var m3  = "send E-Mail to: info@donerightlandscape.com";
        var msg=m1+m2+m3;
        var out = " ";
        var c   = 1;
        if (seed > 100) {
                seed--;
                var cmd="scrollit_r2l(" + seed + ")";
                timerTwo=window.setTimeout(cmd,130);
        }
        else if (seed <= 100 && seed > 0) {
                for (c=0 ; c < seed ; c++) {
                        out+=" ";
                }
                out+=msg;
                seed--;
                var cmd="scrollit_r2l(" + seed + ")";
                    window.status=out;
                timerTwo=window.setTimeout(cmd,130);
        }
        else if (seed <= 0) {
                if (-seed < msg.length) {
                        out+=msg.substring(-seed,msg.length);
                        seed--;
                        var cmd="scrollit_r2l(" + seed + ")";
                        window.status=out;
                        timerTwo=window.setTimeout(cmd,130);
                }
                else {
                        window.status=" ";
                        timerTwo=window.setTimeout("scrollit_r2l(60)",75);
                }
        }
}

if (!document.createStyleSheet){
  Document.prototype.createStyleSheet=function(){
    var s=arguments[0];
    var n=document.createElement("link");
    var c=document.getElementsByTagName("head")[0];
    var d=document.styleSheets.length;
    var u=new Array();
    n.rel = "stylesheet";
    n.type = "text/css";
    n.href = s;
    
    var i=(arguments.length==2)?(arguments[1] >= d)?d:arguments[1]:d;
    if (i >= d)
    {
      c.appendChild(n);
      return n;
    }
    
    if (arguments.length == 2 && arguments[1] < d)
    {
      var k=0;
      while (k < c.childNodes.length)
      {
        if ((c.childNodes[k].tagName == "link" &&
             c.childNodes[k].rel == "stylesheet") ||
            c.childNodes[k].tagName == "style")
          u.push(c.childNodes[k++]);
      }
    }
    
    c.insertBefore(n, u[arguments[1]]);
    return n;
  }
}
  HTMLCollection.prototype.concat = function()
{
  var i=0,j=0,r=this;
  while (i < arguments.length)
  {
    if (typeof arguments[i] == "HTMLCollection")
    {
      var j=arguments[i].length;
      for (var k=0; k < j; k++)
        r[r.length] = arguments[i][k];
    }
    else r[r.length] = arguments[i++];
  }
  return r;
}
  function dss()
  {
    var d=document.styleSheets.length,str='';
    var s=document.styleSheets;
    var h='';
    for (var i=0;i < d; i++)
    {
      h=(s[i].href=='')?'[inline]':s[i].href;
      str += "<li>"+h+" - "+s[i].type+"</li>";
    }
    document.getElementById('info').innerHTML = str;
    return true;
  }
  
function checkTime(){
	Davestime=new Date();
	time=Davestime.getHours();
	if (time<17) {
		document.createStyleSheet('styles-day.css');
	} else if (time<24) {
		document.createStyleSheet('styles-night.css');
	} else {
		document.createStyleSheet('styles-day.css');
	}
}
onload=dss;

// my writing functions

function getLink(){
	Davestime=new Date();
	time=Davestime.getHours();
	if (time<17) {
		document.write('<a href="http://www.donerightlandscaping.com/day_home.html">');
	} else if (time<24) {
		document.write('<a href="http://www.donerightlandscaping.com/night_home.html">');
	} else {
		document.write('<a href="http://www.donerightlandscaping.com/day_home.html">');
	}
}
function writeEnter(){
	Davestime=new Date();
	time=Davestime.getHours();
	if (time<17) {
	document.write('<h2><a href="day_home.html">Enter Site ></a></h2>');
	} else if (time<24) {
	document.write('<h2><a href="night_home.html">Enter Site ></a></h2>');
	} else {
	document.write('<h2><a href="day_home.html">Enter Site ></a></h2>');}
}

function writeFlash(){
	Davestime=new Date();
	time=Davestime.getHours();
	if (time<17) {
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="760" HEIGHT="149"><PARAM NAME="movie" VALUE="day_crop3.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#000000"><EMBED src="day_crop3.swf" quality="high" bgcolor="#000000"  WIDTH="760" HEIGHT="149" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');
	} else if (time<24) {
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=407 HEIGHT=147> <PARAM NAME=movie VALUE="night_sparkle.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="night_sparkle.swf" quality=high bgcolor=#000000  WIDTH=407 HEIGHT=147 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=353 HEIGHT=147> <PARAM NAME=movie VALUE="NightClickHere.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="NightClickHere.swf" quality=high bgcolor=#000000  WIDTH=353 HEIGHT=147 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');
	} else {
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="760" HEIGHT="149"><PARAM NAME="movie" VALUE="day_crop3.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#000000"><EMBED src="day_crop3.swf" quality="high" bgcolor="#000000"  WIDTH="760" HEIGHT="149" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');
	}
}

