var h_highlights=new Array();
var h_structure= new Array();
var h_content= new Array();

/*if Mac IE does not work, use table<table border="0" cellpadding="0" cellspacing="0" width="248" height="160"> */
h_structure[0] = '';
h_structure[1] = '<div id="texttype" valign="">';
h_structure[2] = '';
h_structure[3] = '';
h_structure[4] = '';
h_structure[5] = '<img src="';
h_structure[6] = '" ';
h_structure[7] = ' ';
h_structure[8] = '" border="0" title="" align="left"';
h_structure[9] = '" />';
h_structure[10] = '';
h_structure[11] = '';
h_structure[12] = '';
h_structure[13] = '';
h_structure[14] = '';
h_structure[15] = '</div>';
h_structure[16] = '';



/* Block 1:             Image and Text  */
h_content[1]  = ' ';
h_content[2]  = '';
h_content[3]  = 'pic/drilling-1.jpg';
h_content[4]  = 'width="72"';
h_content[5]  = 'height="85';
h_content[6]  = 'Successful Story';
h_content[7]  = '<div id="title"></div>';
h_content[8]  = 'LogDigi,LLC found a large bypassed reservoir in south Texas in 2005. <a href="http://logdigi.com/client/product_info.php?cPath=2&products_id=37"><b>More ...</b></a>';

/* Block 2:             Image and Text  */
h_content[9]  = ' ';
h_content[10]  = '';
h_content[11]  = 'pic/drilling-3.jpg';
h_content[12]  = 'width="72"';
h_content[13]  = 'height="85';
h_content[14]  = 'Successful Story';
h_content[15]  = '<div id="title"></div>';
h_content[16]  = 'Utilize LogDigi\'s proprietary technologies to reveal untapped reservoirs in Louisiana Oil Field. <a href="http://logdigi.com/client/product_info.php?cPath=2&products_id=38"><b>More ...</b>';


/* Block 3:             Image and Text  */
h_content[17]  = ' ';
h_content[18]  = '';
h_content[19]  = 'pic/drilling-2.jpg';
h_content[20]  = 'width="72"';
h_content[21]  = 'height="85';
h_content[22]  = 'Successful Story';
h_content[23]  = '<div id="title"></div>';
h_content[24]  = 'LogDigi,LLC has several inventory of participation opportunities from low- cost recompletions to infield developmental drilling project. <a href="http://www.logdigi.com/Low_Resistivity_Pay.pdf"><b>More ...</b>';


var num_of_blocks      = 3;

var elements_per_block = 0;

for (var block_num=1; block_num<num_of_blocks + 1; block_num++) { 	
 
	h_highlights[block_num]  = h_structure[0] + h_structure[1] + h_structure[2];
	h_highlights[block_num] += h_content[1+elements_per_block];
	h_highlights[block_num] += h_structure[3];
	h_highlights[block_num] += h_content[2+elements_per_block];
	h_highlights[block_num] += h_structure[4] + h_structure[5];
	h_highlights[block_num] += h_content[3+elements_per_block];
	h_highlights[block_num] += h_structure[6];
	h_highlights[block_num] += h_content[4+elements_per_block];
	h_highlights[block_num] += h_structure[7];
	h_highlights[block_num] += h_content[5+elements_per_block];
	h_highlights[block_num] += h_structure[8];
	h_highlights[block_num] += h_content[6+elements_per_block];
	h_highlights[block_num] += h_structure[9] + h_structure[10] + h_structure[11] + h_structure[2];
	h_highlights[block_num] += h_content[1+elements_per_block];
	h_highlights[block_num] += h_structure[3];
	h_highlights[block_num] += h_content[2+elements_per_block];
	h_highlights[block_num] += h_structure[12] + h_structure[13];
	h_highlights[block_num] += h_content[7+elements_per_block];
	h_highlights[block_num] += h_structure[14];
	h_highlights[block_num] += h_content[8+elements_per_block];
	h_highlights[block_num] += h_structure[15] + h_structure[16];
	
	elements_per_block = elements_per_block+8;	
}


function h_writeHighlights() {
 var vis=0;

 for (var x = 1; x < h_highlights.length; x++) {
  if (x==1)  { vis=1; }
  else { vis=0; }
  document.gn_newLayer('hm' + x,h_highlights[x],1,vis,10,303,120,131);
 }

}


var h_curr=0;
var h_old=0;
var h_timeout;
var h_userSwap=0;



function h_swapDir(n,t) { 
 if ((h_curr + n) <= 0) { 
  h_curr = h_highlights.length - 1;
 }
 else if ((h_curr + n) >= h_highlights.length) {
  h_curr = 1;
 }
 else {
  h_curr = h_curr + n;
 }
 h_swap(h_curr);
 if (t) {
  h_userSwap = 1;
  h_timeout=null;
 }
}



//was 3000 (3 seconds) now 5000 (5 seconds)
function h_swapStart() {
 if (!h_userSwap) {
  h_swapDir(1);
  if (h_curr != (h_highlights.length - 1)) {
   h_timeout=setTimeout("h_swapStart()",5000);
  }
  else {
   h_timeout=setTimeout("h_swapDir(1)",5000);
   h_timeout=null;
  }
 }
}



function h_swap(n) {

 if (h_old && h_old != n) {
  gn_layers['hm' + h_old].vis(0);
 }

 gn_layers['hm' + n].vis(1);

 h_old=n;

}

