/* ***********************************************************
* Scroll Text
************************************************************ */

var scrollerwidth='200px'
var scrollerheight='70px'
//var scrollerbgcolor='D5E1ED'
var scrollerbgcolor=''
var scrollerbackground=''
var linkhead = '<A HREF="#press" CLASS="special7pt" ONCLICK="winpopup(' + "'"
var linktail = "','',600,550)" + '">'
var midnews = new Array();	
var messages=new Array()
var nCntr = 0

for (j=0; j<9; j++)
{
	midnews[j] = new Array("","","","");
}

/* ---------------------------
Array Element descriptions
[x][0] HREF Link
[x][1] News header  + html code
[x][2] News text  + html code
[x][3] News date + html code
------------------------------ */

midnews[nCntr][0] = linkhead +  'pdf/reports/reognization.pdf' + "','',650,700)" + '">' 
midnews[nCntr][1] = '<B>Reorganization Announcement</B>'
midnews[nCntr][2] = ''
midnews[nCntr][3] = '<P ALIGN="RIGHT"><I>February 15, 2010 </I></P></A>'
nCntr++

midnews[nCntr][0] = linkhead +  'pressrls/mrf2010/020110.pdf' + linktail 
midnews[nCntr][1] = '<B>MRF 2010 Resource LP</B><BR>'
midnews[nCntr][2] = 'Closing February 19, 2010'
midnews[nCntr][3] = '<P ALIGN="RIGHT"><I>February 1, 2010</I></P></A>'
nCntr++

midnews[nCntr][0] = linkhead +  'pressrls/path/121009.pdf' + linktail 
midnews[nCntr][1] = '<B>Pathfinder Convertible Debenture Fund</B><BR>'
midnews[nCntr][2] = 'Raises $75 Million'
midnews[nCntr][3] = '<P ALIGN="RIGHT"><I>December 10, 2009</I></P></A>'
nCntr++

midnews[nCntr][0] = linkhead +  'pressrls/discovery09/111909.pdf' + linktail 
midnews[nCntr][1] = '<B>Discovery 2009 Flow-Through LP</B><BR>'
midnews[nCntr][2] = 'Raises $23 Million'
midnews[nCntr][3] = '<P ALIGN="RIGHT"><I>November 19, 2009</I></P></A>'
nCntr++

midnews[nCntr][0] = linkhead +  'pressrls/mgte/072809.pdf' + linktail 
midnews[nCntr][1] = '<B>Groppe Tactical Energy Class Launched</B>'
midnews[nCntr][2] = ''
midnews[nCntr][3] = '<P ALIGN="RIGHT"><I>July 28, 2009</I></P></A>'
nCntr++

midnews[nCntr][0] = linkhead +  'pressrls/mgte/070609.pdf' + linktail 
midnews[nCntr][1] = '<B>Middlefield introduces Groppe Tactical Energy Class and new low load sales option.</B>'
midnews[nCntr][2] = ''
midnews[nCntr][3] = '<P ALIGN="RIGHT"><I>June 30, 2009</I></P></A>'
nCntr++

midnews[nCntr][0] = linkhead   + 'slideshow.htm'  + "','outlook',660,790)" + '">'
midnews[nCntr][1] = '<B>Middlefield TSX-Listed Funds<BR>Q3 2009 Update.</B>'
midnews[nCntr][2] = '  '
midnews[nCntr][3] = '<P ALIGN="RIGHT"><I>September 2009</I></P></A>'
nCntr++

midnews[nCntr][0] = linkhead +  'pdf/reports/qremarks.pdf' + linktail 
midnews[nCntr][1] = '<B>Market Commentary, Q2 2009</B>'
midnews[nCntr][2] = ' '
midnews[nCntr][3] = '<P ALIGN="RIGHT"><I>June 30, 2009</I></P></A>'
nCntr++

midnews[nCntr][0] = linkhead +  'mrftrack.htm' + "','',650,700)" + '">' 
midnews[nCntr][1] = '<B>Resource Funds Performance</B>'
midnews[nCntr][2] = ''
midnews[nCntr][3] = '<P ALIGN="RIGHT"><I>Returns as at Dissolution</I></P></A>'
nCntr++

for (j=0; j<nCntr; j++)
{
	messages[j] = midnews[j][0] + midnews[j][1] + midnews[j][2] + midnews[j][3]
}

var ie=document.all
var dom=document.getElementById

if (messages.length>2)
	i=2
else
	i=0

function move1(whichlayer)
{
	tlayer=eval(whichlayer)
	if (tlayer.top>0&&tlayer.top<=5)
	{
		tlayer.top=0
		setTimeout("move1(tlayer)",7500)
		setTimeout("move2(document.main.document.second)",7500)
		return
	}
	if (tlayer.top>=tlayer.document.height*-1)
	{
		tlayer.top-=5
		setTimeout("move1(tlayer)",50)
	}
	else
	{
		tlayer.top=parseInt(scrollerheight)
		tlayer.document.write(messages[i])
		tlayer.document.close()
		if (i==messages.length-1)
			i=0
		else
			i++
	}
}

function move2(whichlayer)
{
	tlayer2=eval(whichlayer)
	if (tlayer2.top>0&&tlayer2.top<=5)
	{
		tlayer2.top=0
		setTimeout("move2(tlayer2)",7500)
		setTimeout("move1(document.main.document.first)",7500)
		return
	}
	if (tlayer2.top>=tlayer2.document.height*-1)
	{
		tlayer2.top-=5
		setTimeout("move2(tlayer2)",50)
	}
	else
	{
		tlayer2.top=parseInt(scrollerheight)
		tlayer2.document.write(messages[i])
		tlayer2.document.close()
		if (i==messages.length-1)
			i=0
		else
			i++
	}
}

function move3(whichdiv)
{
	tdiv=eval(whichdiv)
	if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5)
	{
		tdiv.style.top=0+"px"
		setTimeout("move3(tdiv)",7500)
		setTimeout("move4(second2_obj)",7500)
		return
	}
	if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1)
	{
		tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
		setTimeout("move3(tdiv)",50)
	}
	else
	{
		tdiv.style.top=parseInt(scrollerheight)
		tdiv.innerHTML=messages[i]
		if (i==messages.length-1)
			i=0
		else
			i++
	}
}

function move4(whichdiv)
{
	tdiv2=eval(whichdiv)
	if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5)
	{
		tdiv2.style.top=0+"px"
		setTimeout("move4(tdiv2)",7500)
		setTimeout("move3(first2_obj)",7500)
		return
	}
	if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1)
	{
		tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
		setTimeout("move4(second2_obj)",50)
	}
	else
	{
		tdiv2.style.top=parseInt(scrollerheight)
		tdiv2.innerHTML=messages[i]
		if (i==messages.length-1)
			i=0
		else
			i++
	}
}

function startscroll()
{
	if (ie||dom)
	{
		first2_obj=ie? first2 : document.getElementById("first2")
		second2_obj=ie? second2 : document.getElementById("second2")
		move3(first2_obj)
		second2_obj.style.top=scrollerheight
		second2_obj.style.visibility='visible'
	}
	else if (document.layers)
	{
		document.main.visibility='show'
		move1(document.main.document.first)
		document.main.document.second.top=parseInt(scrollerheight)+5
		document.main.document.second.visibility='show'
	}
}


function firstlayer()
{
	if (document.layers) 	
		return messages[0] 
	else 
		return ""
}

function secondlayer()
{
	if (document.layers)
		return messages[dyndetermine=(messages.length==1)? 0 : 1]
	else
		return ""
}

function iebrowser()
{
	if (ie||dom)
	{
		var retstring=''
		retstring = retstring + '<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">'
		retstring = retstring + '<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">'
		retstring = retstring + '<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">'
		retstring = retstring + messages[0]
		retstring = retstring + '</div>'
		retstring = retstring + '<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">'
		retstring = retstring + messages[dyndetermine=(messages.length==1)? 0 : 1]
		retstring = retstring + '</div>'
		retstring = retstring + '</div>'
		retstring = retstring + '</div>'
		return retstring
	}
	else
	{
		return ""	}
}

function getvideo()
{
	var cHdr = "<TABLE WIDTH='100%' CELLPADDING='0' CELLSPACING='0' BORDER='0' CLASS='standard7pt'>"
	var cCell1 = "<TR><TD ALIGN='LEFT' VALIGN='TOP' STYLE='border-left: 1pt #C1C1C1 solid; padding-top: 2pt; padding-left: 2pt; padding-bottom: 2pt'>"
	var cCell2 = "</TD></TR><TR><TD ALIGN='LEFT' VALIGN='TOP' BGCOLOR='#C1C1C1' HEIGHT='1'></TD></TR>"
	var cVideoStr = ""
	var nCnt = 0
	var VideoDetail = new Array();	

	for (k=0; k<14; k++)
	{
		VideoDetail[k] = new Array("","","");
	}

	VideoDetail[nCnt][0] = "<B>Dennis da Silva</B><BR>Managing Director, Resource Group of Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='graphics/video/bnn021010-256k.wmv' "
	VideoDetail[nCnt][2] = "CLASS='special7pt'>View video BNN - Market Call</A><BR><FONT CLASS='standard7pt'>February 10, 2010.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Dean Orrico</B><BR>Managing Director and Chief Investment Officer of Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='graphics/video/bnn012010-256k.wmv' CLASS='special7pt'>View video BNN Market Call</A>"
	VideoDetail[nCnt][2] = "<BR><FONT CLASS='standard7pt'>January 20, 2010.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Oil Steady at US$80 in 2010</B>&nbsp;&nbsp;"
	VideoDetail[nCnt][1] = "<A HREF='#press' ONCLICK=" + '"' + "javascript:winpopup('pdf/resource/fp010810.pdf','',600,620)" + '"' + "CLASS='special7pt'>Read more...</A>&nbsp;&nbsp;"
	VideoDetail[nCnt][2] = "<IMG SRC='graphics/pdf.gif' WIDTH='10' HEIGHT='10' BORDER='0'><BR><FONT CLASS='standard7pt'>National Post - January 8, 2010.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Rob Lauzon</B><BR>Managing Director, Trading of<BR>Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='graphics/video/bnn010610-256k.wmv' "
	VideoDetail[nCnt][2] = "CLASS='special7pt'>View video BNN Market Call Tonight</A><BR><FONT CLASS='standard7pt'>January 6, 2010.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Rob Lauzon</B><BR>Managing Director, Trading of<BR>Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='#press' ONCLICK=" + '"' + "javascript:winpopup('pdf/reports/np122609.pdf','',600,620)" + '"' + "CLASS='special7pt'>Seeking income in a post-trust world</A>&nbsp;&nbsp;"
	VideoDetail[nCnt][2] = "<IMG SRC='graphics/pdf.gif' WIDTH='10' HEIGHT='10' BORDER='0'><BR><FONT CLASS='standard7pt'>National Post - December 26, 2009.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Dean Orrico</B><BR>Managing Director and Chief Investment Officer of Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='#press' ONCLICK=" + '"' + "javascript:winpopup('pdf/reports/globemail121509.pdf','',600,620)" + '"' + "CLASS='special7pt'>Special Report on Flow-Through Shares</A>&nbsp;&nbsp;"
	VideoDetail[nCnt][2] = "<IMG SRC='graphics/pdf.gif' WIDTH='10' HEIGHT='10' BORDER='0'><BR><FONT CLASS='standard7pt'>Globe and Mail - December 15, 2009.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Rob Lauzon</B><BR>Managing Director, Trading of<BR>Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='graphics/video/bnn120409-256k.wmv' "
	VideoDetail[nCnt][2] = "CLASS='special7pt'>View video BNN - Market Call</A><BR><FONT CLASS='standard7pt'>December 4, 2009.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Dennis da Silva</B><BR>Managing Director, Resource Group of Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='graphics/video/bnn111809-256k.wmv' "
	VideoDetail[nCnt][2] = "CLASS='special7pt'>View video BNN - Market Call</A><BR><FONT CLASS='standard7pt'>November 18, 2009.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Rob Lauzon</B><BR>Managing Director, Trading of<BR>Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='graphics/video/bnn100509-256k.wmv' "
	VideoDetail[nCnt][2] = "CLASS='special7pt'>View video BNN - Market Call Tonight</A><BR><FONT CLASS='standard7pt'>October 5, 2009.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Henry Groppe</B>, Principal Groppe, Long & Littell. and <B>Dean Orrico</B> Managing Director and Chief Investment Officer of Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='graphics/video/bnn072309-256.wmv' "
	VideoDetail[nCnt][2] = "CLASS='special7pt'>View video BNN - Market Call</A><BR>July 23, 2009.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Dennis da Silva</B><BR>Managing Director, Resource Group of Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='#bnn' ONCLICK=" + '"' + "javascript:winpopup('http://broadband.bnn.ca/bnn/?noad=1&id=32674','',480,900,0,0,1,1,0,100)" +'"'
	VideoDetail[nCnt][2] = "CLASS='special7pt'>View video BNN - Market Call</A><BR><FONT CLASS='standard7pt'>July 16, 2009.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>&#148;Despite talking heads, no confusion in <BR>where the price of oil is headed&#148;</B><BR>"
	VideoDetail[nCnt][1] = "<A HREF='#bnn' ONCLICK=" + '"' + "javascript:winpopup('pdf/mgte/072509.pdf','',600,620)" +'"'
	VideoDetail[nCnt][2] = "CLASS='special7pt'>Read more...</A>&nbsp;&nbsp;<IMG SRC='graphics/pdf.gif' WIDTH='10' HEIGHT='10' BORDER='0'><BR><FONT CLASS='standard7pt'>The Globe and Mail - July 25, 2009.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Rob Lauzon</B><BR>Managing Director, Trading of<BR>Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='#bnn' ONCLICK=" + '"' + "javascript:winpopup('http://broadband.bnn.ca/bnn/?noad=1&id=25311','',480,900,0,0,1,1,0,100)" +'"'
	VideoDetail[nCnt][2] = "CLASS='special7pt'>View video BNN - Market Call</A><BR><FONT CLASS='standard7pt'>March 2, 2009.</FONT>"
	nCnt++

	VideoDetail[nCnt][0] = "<B>Henry Groppe</B>, Principal Groppe, Long & Littell. and <B>Dean Orrico</B> Managing Director and Chief Investment Officer of Middlefield Capital Corporation.<BR>"
	VideoDetail[nCnt][1] = "<A HREF='#bnn' ONCLICK=" + '"' + "javascript:winpopup('http://broadband.bnn.ca/bnn/?noad=1&id=23987','',480,900,0,0,1,1,0,100)" +'"'
	VideoDetail[nCnt][2] = "CLASS='special7pt'>View video BNN - Market Call</A><BR>February 6, 2009.</FONT>"
	nCnt++

	for (k=0; k<nCnt; k++)
	{
		cVideoStr = cVideoStr + cCell1 + VideoDetail[k][0] + VideoDetail[k][1] + VideoDetail[k][2] + cCell2
	}

	cVideoStr = cHdr + cVideoStr + "</TABLE>"
	return cVideoStr
}

window.onload=startscroll
