<!--
//  This script is called from the following webpages on DeMarche.com
//     corp_rating_stock_results.asp

/*
		Cross browser Marquee script- © Dynamic Drive (www.dynamicdrive.com)
		For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
		Credit MUST stay intact
		*/

		var iedom = document.all || document.getElementById;
		//Specify the marquee's width (in pixels)
		var marqueewidth = "385px";
		//Specify the marquee's height
		var marqueeheight = "20px";
		//Specify the marquee's marquee speed (larger is faster 1-10)
		var marqueespeed = 2;
		var copyspeed = marqueespeed;
		var pausespeed = (pauseit == 0)? marqueespeed: 0;

		//configure background color:
		//var marqueebgcolor="#DEFDD9";
		//var marqueebgcolor = "#336666";
		var marqueebgcolor = "#FFFFFF";
		//Pause marquee onMousever (0=no. 1=yes)?
		var pauseit = 1;

		//Specify the marquee's content (don't delete <nobr> tag)
		//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
		//var marqueecontent = '<nobr>No data defined</nobr>';
		var asmarqueecontent = new Array();

		function populatemarquee()
		{
			// Loop through all of the marquee 'controls' on the page
			if (asmarqueecontent.length > 0)
			{
				var strctrlname = "";
				for (var nmitem = 0; nmitem < asmarqueecontent.length; nmitem++)
				{
					// - Is this an IE browser or another type of browser
					if (iedom)
					{
						strctrlname = "ie_marquee" + nmitem;
						document.getElementById(strctrlname).style.left = parseInt(marqueewidth) + 8 +" px";
						document.getElementById(strctrlname).innerHTML = asmarqueecontent[nmitem];
					}  //  if (iedom)
					else if (document.layers)
					{
						strctrlname = "ns_lmarquee" + nmitem;
						document.getElementById(strctrlname).left = parseInt(marqueewidth) + 8;
						document.getElementById(strctrlname).document.write(asmarqueecontent[nmitem]);
						document.getElementById(strctrlname).document.close();
					}  //  else if (document.layers)
				}  //  for (var nmitem = asmarqueecontent.length; nmitem <= asmarqueecontent.length; nmitem++)
							
				// - Setup the timer			
				lefttime = setInterval("scrollmarquee()", 20);
			}  //  if (asmarqueecontent.length > 0)
		}  //  populatemarquee

		function scrollmarquee()
		{
			// Loop through all of the marquee 'controls' on the page
			if (asmarqueecontent.length > 0)
			{
				var strctrlname = "";
				for (var nmitem = 0; nmitem < asmarqueecontent.length; nmitem++)
				{
					// - Is this an IE browser or another type of browser
					if (iedom)
					{
						strctrlname = "ie_marquee" + nmitem;
						if (parseInt(document.getElementById(strctrlname).style.left) > (document.getElementById(strctrlname).offsetWidth*(-1)+8))
						{
							document.getElementById(strctrlname).style.left = parseInt(document.getElementById(strctrlname).style.left) - copyspeed + "px";
						}  //  if (parseInt(document.getElementById(strctrlname).style.left) > (actualwidth*(-1)+8))
						else
						{
							document.getElementById(strctrlname).style.left = parseInt(marqueewidth) + 8 + "px";
						}  //  <else>  if (parseInt(document.getElementById(strctrlname).style.left) > (actualwidth*(-1)+8))	
					}
					else if (document.layers)
					{
						strctrlname = "ns_lmarquee" + nmitem;
						if (document.getElementById(strctrlname).left > (document.getElementById(strctrlname).offsetWidth*(-1)+8))
						{
							document.getElementById(strctrlname).left -= copyspeed;
						}	
						else
						{
							document.getElementById(strctrlname).left = parseInt(marqueewidth)+8;
						}	
					}
				}  //  for (var nmitem = asmarqueecontent.length; nmitem <= asmarqueecontent.length; nmitem++)
			}  //  if (asmarqueecontent.length > 0)
		}  //  scrollmarquee

		function createmarquee(marqueespeed, marqueewidth, marqueeheight, marqueebgcolor, marqueecontent)
		{
			asmarqueecontent[asmarqueecontent.length] = marqueecontent;

			if (iedom || document.layers)
			{
				with (document)
				{
					if (iedom)
					{
						document.write('<span id="temp' + (asmarqueecontent.length-1) + '" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">' + asmarqueecontent[(asmarqueecontent.length-1)] + '</span>')
					}  //  if (iedom)

					document.write('<table border="1" cellspacing="0" cellpadding="0"><td>');
					if (iedom)
					{
						write('<div style="position:relative;width:' + marqueewidth + ';height:' + marqueeheight + ';overflow:hidden">');
						write('<div style="position:absolute;width:' + marqueewidth + ';height:' + marqueeheight + ';background-color:' + marqueebgcolor + '" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">');
						write('<div id="ie_marquee' + (asmarqueecontent.length-1) + '"');
						
						write(' style="position:absolute;left:0px;top:0px"></div>');
						write('</div></div>');
					}  //  if (iedom)
					else if (document.layers)
					{
						write('<ilayer width=' + marqueewidth + ' height=' + marqueeheight + ' name="ns_ilmarquee"' + (asmarqueecontent.length-1) + ' bgColor=' + marqueebgcolor+'>');
						write('<layer name="ns_lmarquee' + (asmarqueecontent.length-1) + '" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>');

						write('</ilayer>');
					}  //  else if (document.layers)
					document.write('</td></table>');
				}  //  with (document)
			}  //  if (iedom || document.layers)
		}  //  createmarquee

//-->