﻿
var bannerImg = new Array(); // global variable to handle image rotation
// 	prepare image list
//  bannerImg[0]="images/front1.jpg";
  bannerImg[0]="images/front2.jpg";
 // bannerImg[2]="images/front3.jpg";
  bannerImg[1]="images/front4.jpg";
  bannerImg[2]="images/front5.jpg";
  bannerImg[3]="images/front6.jpg";
  bannerImg[4]="images/front7.jpg";
  bannerImg[5]="images/front8.jpg";
  bannerImg[6]="images/front9.jpg";
  bannerImg[7]="images/front10.jpg";
  bannerImg[8]="images/front11.jpg";
  bannerImg[9]="images/front12.jpg";
  bannerImg[10]="images/front13.jpg";
  bannerImg[11]="images/front14.jpg";
var newBanner = 0;
var totalBan = bannerImg.length;

// function to cycle through the image list
function cycleBan() {
  newBanner++;
  if (newBanner == totalBan) {
    newBanner = 0;
  }
  document.banner.src=bannerImg[newBanner];
  // set the time below for length of image display
  // i.e., "4*1000" is 4 seconds
  setTimeout("cycleBan()",6*1000);
}

// -------------------------------------------------------------
// Toggle DIV hide/show a DIV element given its ID and show 
// realtive to another element
// -------------------------------------------------------------
function toggle_e(id,from_id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
          e.style.left = (document.getElementById(from_id).offsetLeft +10)+'px';
 		  e.style.top =  (document.getElementById(from_id).offsetTop +140)+'px';
}
// eQuote.com Chart
function yChart(symbol,t){
	document.indChat.src='http://ichart.finance.yahoo.com/v?s='+symbol+'&t='+t;
}
function eQuote(id,symbol){
document.getElementById(id).src='http://mobile.quote.com/quotes.aspx?symbols='+symbol;
}

function eChart(symbol,p,w,h){
	document.indChart.src='http://charts.marketcenter.com/cis/qc?CONT='+symbol+'&SIZE='+w+'x'+h+'&bartype=AREA&period='+p;
}
