<!-- Hide from JavaScript-Impaired Browsers
/* 
	First, if you load fewer or more than 5 sponsors
   into your rotator, change the "sponnr" variable
   to the actual number of sponsor .gifs you plan to
   load. */
number_of_sponsors=6;

var sctr=0;
var halt=0;
var isn=new Array();
var durl=new Array();

for (i=0;i<number_of_sponsors;i++){
 isn[i]=new Image();
}

isn[0].src="./Partners/images/ohm.jpg";
isn[1].src="./Partners/images/dunbar.jpg";
isn[2].src="./Partners/images/MTS_New.jpg";
isn[3].src="./Partners/images/Powersource.jpg";
isn[4].src="./Partners/images/LabServices.jpg";
isn[5].src="./Partners/images/OHSPractice.jpg";
/*
durl[0]="./StrategicPartners/allscripts.htm";
durl[1]="./StrategicPartners/dunbar.htm";
durl[2]="./StrategicPartners/RyanAssociates.htm";
durl[3]="./StrategicPartners/BTE.htm";
durl[4]="./StrategicPartners/labone.htm";
*/

durl[0]="http://www.ohmwc.com";
durl[1]="http://www.billdunbar.com";
durl[2]="http://www.mtskc.com";
durl[3]="http://groupsourceinc.com";
durl[4]="http://ohscompcare.com";
durl[5]="http://www.pamsmd.com/";



//durl[0]="./Partners/Partners.aspx?partner=40";
//durl[1]="./Partners/Partners.aspx?partner=2";
//durl[2]="./Partners/Partners.aspx?partner=67";
//durl[3]="./Partners/Partners.aspx?partner=66";
//durl[4]="./Partners/Partners.aspx?partner=23";
//durl[5]="./Partners/Partners.aspx?partner=23";

/* This script is set to rotate every 10 seconds.
   (5000=5 seconds, so 30000 would equal 30, etc)
   You should change the number in the setTimeout()
   call below for the number of seconds you wish. */
   
function rotateIt(){
 if (halt!=1){
  sctr++;
  if (sctr>number_of_sponsors-1){
   sctr=0;
   }
  document.sponsor.src=isn[sctr].src;
  setTimeout("rotateIt()",5000);
  }
 }

/* This code will work just fine with or without
   frames.  However, if you are in frames and wish
   to replicate the TARGET="_top" call to remove
   frames, change the location.href call to:
    parent.location.href=durl[sctr];
   below. */
function doIt(){
 
 // Get the width of the users screen
 var the_w = screen.availWidth - 7;
 var the_h = screen.availHeight - 7;
 
 var win = window.open(durl[sctr], '', 'width=' + the_w + ',height=' + the_h + ',screenX=0, screenY=0, left=0, top=0');
 
 //halt=1;
 //location.href=durl[sctr];
 }

function dispIt(){
 //parent.window.status="";	
 //parent.window.status=durl[sctr];
 }
 
 var main_ad = 0; 
 
function main_ad_rotate()
{
   
    //alert('start process');
   
    main_ad = 0;
    setTimeout("main_rotate_now()",5000);
}

function main_rotate_now()
{

    //alert('now rotating' + main_ad);

    // get the object
    var ad_obj = document.getElementById('rotate_this');
    var link_obj = document.getElementById('ad_link');

    switch (main_ad)
    {
        case 0: ad_obj.src= "Images/DunbarNew.jpg";
                link_obj.href = "http://www.billdunbar.com";
                break;
    
        case 1: ad_obj.src= "Images/MTSNew.jpg";
                link_obj.href = "http://www.mtskc.com";
                break;
    
        case 2: ad_obj.src= "Images/NewPower.jpg";
                link_obj.href = "http://groupsourceinc.com";
                break;   
    
        case 3: ad_obj.src= "Images/NewPAMS.jpg";
                link_obj.href = "http://www.pamsmd.com/";
                break;       
    
        case 4: ad_obj.src= "Images/NewOHMWork.jpg";
                link_obj.href = "http://www.ohmwc.com";
                break;   
    
    }

    // advance the ad count
    main_ad = main_ad + 1;

    // roll around if at end of cycle
    if (main_ad == 5)
    {
        main_ad = 0;
    }

    // Call the next item
    setTimeout("main_rotate_now()",5000);

} 
 
 
 
// End Hiding -->

