//SET SCROLLER APPEARANCE AND MESSAGES
var myScroller1 = new Scroller(0, 0, 400, 20, 0, 0); //(xpos, ypos, width, height, border, padding)
myScroller1.setColors("#010080", "#D1E9FF", "#D1E9FF"); //(fgcolor, bgcolor, bdcolor)
myScroller1.setFont("Verdana,Arial,Helvetica", 1.5);
myScroller1.addItem("Welcome to <b>Media Group Financial</b>, <i>where members come first...</i>");
myScroller1.addItem("Check out the new <b><a href=\"http://www.mediagroupfinancial.ca/products.html\">PRODUCTS & SERVICES</a></b> we have to offer!");
myScroller1.addItem("Need a loan?  <b><a href=\"https://secure2.securewebexchange.com/mediagroupfinancial.ca/loan.html\">APPLY NOW!</a></b> using our secure Loan Application form.");
myScroller1.addItem("Do your banking from home or at the office with <b><a href=\"https://bank.mediagroupfinancial.ca/\">HOMEBANKING</a></b>.");

//SET SCROLLER PAUSE
myScroller1.setPause(6500); //set pause beteen msgs, in milliseconds

function runscroll() {

  var layer;
  var mikex, mikey;

  // Locate placeholder layer so we can use it to position the scrollers.

  layer = getLayer("placeholder");
  x = getPageLeft(layer);
  y = getPageTop(layer);

  // Create the first scroller and position it.

  myScroller1.create();
  myScroller1.hide();
  myScroller1.moveTo(x, y);
  myScroller1.setzIndex(100);
  myScroller1.show();
}

window.onload=runscroll

function jumpToPage() {
	if (document.all.sitemap.value != "")
		document.location.href = "http://www.mediagroupfinancial.ca/" + document.all.sitemap.value;
}

function toggleLayer(whichLayer, whichImg) {
	var i = 0;
	var items = new Array();
	items[0] = 'i1';
	items[1] = 'i2';
	items[2] = 'i3';
	items[3] = 'i4';
	//items[4] = 'i5';
	//items[5] = 'i6';
	//items[6] = 'i7';
	//items[7] = 'i8';
	
	for (i in items) {
		document.getElementById(items[i]).style.display='none';
		document.getElementById(items[i]+"_img").src="img/toggle/plus.gif";
		document.getElementById(items[i]+"_hd").style.fontWeight='normal';
	}
		
	if (document.getElementById(whichLayer).style.display=='block') {
		// this is the way the standards work
		document.getElementById(whichLayer).style.display='none';
		document.getElementById(whichLayer+"_img").src="img/toggle/plus.gif";
		document.getElementById(whichLayer+"_hd").style.fontWeight='normal';
	} else {
		document.getElementById(whichLayer).style.display='block';
		document.getElementById(whichLayer+"_img").src="img/toggle/minus.gif";
		document.getElementById(whichLayer+"_hd").style.fontWeight='bold';
		//this.style.fontWeight="bold";
	}
}