
function F_JS_cyclebanner_ban_hp(pass_IN_JS_imgno_start, pass_IN_JS_start_auto_cycle_bool, pass_IN_JS_id_a_banner_txt, pass_IN_JS_id_img_banner_txt, pass_IN_JS_id_side_text_title, pass_IN_JS_id_side_text_body, pass_IN_JS_id_a_side_text)
{
l_auto_cycle_bool = pass_IN_JS_start_auto_cycle_bool;
if (pass_IN_JS_imgno_start >= 0)
   { 
     js_PAGE_ban_hp_imgno_current = pass_IN_JS_imgno_start; 
     //l_cyclebanner_ind = false;
   }
else
   { 
     js_PAGE_ban_hp_imgno_current = js_PAGE_ban_hp_imgno_current + 1; 
   }
  
if (js_PAGE_ban_hp_imgno_current >= js_PAGE_ban_hp_imgno_max)
   {
	//if next or rotating and beyond max
    js_PAGE_ban_hp_imgno_current = 0;
   }  

var obj_img_banner      = document.getElementById(pass_IN_JS_id_img_banner_txt);
var obj_a_banner        = document.getElementById(pass_IN_JS_id_a_banner_txt);
var obj_side_text_title = document.getElementById(pass_IN_JS_id_side_text_title);
var obj_side_text_body  = document.getElementById(pass_IN_JS_id_side_text_body);
if (obj_a_banner && obj_img_banner )
{
obj_img_banner.src      = js_PAGE_ban_hp_array_img_src[js_PAGE_ban_hp_imgno_current];
obj_img_banner.alt      = js_PAGE_ban_hp_array_img_alt[js_PAGE_ban_hp_imgno_current];
obj_a_banner.title      = js_PAGE_ban_hp_array_a_title[js_PAGE_ban_hp_imgno_current];
obj_a_banner.target     = js_PAGE_ban_hp_array_a_target[js_PAGE_ban_hp_imgno_current];
F_JS_innerHTML_compliant(obj_side_text_title.id, js_PAGE_ban_hp_array_side_text_title[js_PAGE_ban_hp_imgno_current] ) ;
F_JS_innerHTML_compliant(obj_side_text_body.id,  js_PAGE_ban_hp_array_side_text_body[js_PAGE_ban_hp_imgno_current] ) ;

//note this object has to be declared after the side text is loaded since the id for the href is not present until the side text is loaded
var obj_a_side_text     = document.getElementById(pass_IN_JS_id_a_side_text);
obj_a_side_text.title   = js_PAGE_ban_hp_array_a_title[js_PAGE_ban_hp_imgno_current];
obj_a_side_text.target  = js_PAGE_ban_hp_array_a_target[js_PAGE_ban_hp_imgno_current];

if (js_PAGE_ban_hp_array_a_href[js_PAGE_ban_hp_imgno_current] == "")
   { 
   obj_a_banner.href = "javascript:F_JS_stopbanner_ban_hp();";
   obj_a_side_text.href = "javascript:F_JS_stopbanner_ban_hp();";
   }
else
   {
   obj_a_banner.href    = js_PAGE_ban_hp_array_a_href[js_PAGE_ban_hp_imgno_current];
   obj_a_side_text.href = js_PAGE_ban_hp_array_a_href[js_PAGE_ban_hp_imgno_current];
   }
   
if (l_auto_cycle_bool)
{
js_PAGE_ban_hp_timer = setTimeout("F_JS_cyclebanner_ban_hp(-1, true, js_PAGE_ban_hp_id_a_banner, js_PAGE_ban_hp_id_img_banner, js_PAGE_ban_hp_id_side_text_title, js_PAGE_ban_hp_id_side_text_body, js_PAGE_ban_hp_id_a_side_text_body);", js_PAGE_ban_hp_img_swap_msec);
}
else
{
F_JS_stopbanner_ban_hp();
}

}

}
function F_JS_stopbanner_ban_hp()
{
clearTimeout(js_PAGE_ban_hp_timer);
}

function F_JS_get_previous_imgno()
{
l_imgno = 0;
if (js_PAGE_ban_hp_imgno_current == 0)
   { l_imgno = js_PAGE_ban_hp_imgno_max -1; }
else
   { l_imgno = js_PAGE_ban_hp_imgno_current - 1; }

return l_imgno;
}

function F_JS_get_next_imgno()
{
l_imgno = js_PAGE_ban_hp_imgno_current + 1;

return l_imgno;
}

function F_JS_handleMouseOver()
{
 //alert ('over ' + js_PAGE_ban_hp_imgno_current);
 js_PAGE_ban_hp_stoppedviamouseover = true;
 F_JS_stopbanner_ban_hp();
}

function F_JS_handleMouseOut()
{
 //alert ('out '+js_PAGE_ban_hp_imgno_current);
 if (js_PAGE_ban_hp_stoppedviamouseover == true)
   {
    l_start = js_PAGE_ban_hp_imgno_current;
    js_PAGE_ban_hp_stoppedviamouseover = false;
    F_JS_cyclebanner_ban_hp(l_start, true, js_PAGE_ban_hp_id_a_banner, js_PAGE_ban_hp_id_img_banner, js_PAGE_ban_hp_id_side_text_title, js_PAGE_ban_hp_id_side_text_body, js_PAGE_ban_hp_id_a_side_text_body);
   }
}

function F_JS_innerHTML_compliant(pass_IN_JS_id_text, pass_IN_JS_content)
{
<!--http://webcache.googleusercontent.com/search?q=cache:rXq4V8RjT2EJ:www.javascriptkit.com/javatutors/dynamiccontent4.shtml+javascript+div+text+set+firefox+innerhtml&cd=1&hl=en&ct=clnk&gl=us&source=www.google.com -->
//W3C compliant version of innerHTML; innerHTML only works with IE and FF
//call via F_JS_innerHTML_compliant('id_', [variable that holds the actual HTML] )

if (document.getElementById && !document.all)
  {
	//if not IE
    l_range = document.createRange();
    el = document.getElementById(pass_IN_JS_id_text);
    l_range.setStartBefore(el);
    htmlFrag = l_range.createContextualFragment(pass_IN_JS_content);
    while (el.hasChildNodes())
    el.removeChild(el.lastChild);
    el.appendChild(htmlFrag);
   }
else
   {
	//if IE
	el = document.getElementById(pass_IN_JS_id_text);
	el.innerHTML = pass_IN_JS_content;
   }
}

