function settab(thistab) {
	//alert(document.MM_sr[0].oSrc);
	//alert(x.oSrc);
	var thiselement = "";
	var thisimage = "";
	for(i = 1; i <= 4; i++) {
		var thisitem = "tab_content_" + i;
		var thisicon = "tab_off_" + i;
		if(i == thistab) {
			thiselement = document.getElementById(thisitem);
			thiselement.style.display = "block";
			thisimage = document.getElementById(thisicon);
			thisimage.src = "images/tab_on_" + i + ".gif";
			document.MM_sr[0].oSrc = "images/tab_on_" + i + ".gif";
			
		}
		else {
			thiselement = document.getElementById(thisitem);
			thiselement.style.display = "none";
			thisimage = document.getElementById(thisicon);
			thisimage.src = "images/tab_off_" + i + ".gif";
			//document.MM_sr[0].oSrc = "images/tab_off_" + i + ".gif";
			
		}
	}
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function viewpageid(thispage, thisid, thiswidth, thisheight) {
	var thiswindow;
	thiswindow = window.open(thispage + '?id=' + thisid, 'viewpage', 'width=' + thiswidth + ',height=' + thisheight + ',scrollbars,resizable');
	thiswindow.focus();
}
function viewpage(thispage, thiswidth, thisheight) {
	var thiswindow;
	thiswindow = window.open(thispage, 'viewpage2', 'width=' + thiswidth + ',height=' + thisheight + ',scrollbars,resizable');
	thiswindow.focus();
}
function viewimage(thisimg, thiswidth, thisheight) {
	var thiswindow;
	thiswindow = window.open('viewimage.php?id=' + thisimg, 'viewphoto', 'width=' + thiswidth + ',height=' + thisheight + ',scrollbars,resizable');
	//alert('viewimage.php?id=' + thisimg);
	thiswindow.focus();
}
function viewphotogallery(thisimg, thiswidth, thisheight) {
	var thiswindow;
	thiswindow = window.open('viewphotogallery.php?id=' + thisimg, 'viewphotogallery', 'width=' + thiswidth + ',height=' + thisheight + ',scrollbars,resizable');
	//alert('viewimage.php?id=' + thisimg);
	thiswindow.focus();
}
function closethiswindow() {
	window.close();
	window.opener.focus();
}

var hospitalArray = new Array();
//hospitalArray[hospitalArray.length] = '<a href="http://www.miller-dwan.com" target="_blank"><img src="assets/templates/sisu/images/logo_md.gif" border="0"  id="logo_md" name="logo_md" alt="Miller-Dwan" onmouseover="MM_swapImage(\'logo_md\',\'\',\'assets/templates/sisu/images/logo_md_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.mercymooselake.org/" target="_blank"><img src="assets/templates/sisu/images/logo_mercy.gif" border="0"  id="logo_mercy" name="logo_mercy" alt="Mercy Hospital" onmouseover="MM_swapImage(\'logo_mercy\',\'\',\'assets/templates/sisu/images/logo_mercy_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.bigforkvalley.org/" target="_blank"><img src="assets/templates/sisu/images/logo_bigfork.gif" border="0"  id="logo_bigfork" name="logo_bigfork" alt="Bigfork Valley" onmouseover="MM_swapImage(\'logo_bigfork\',\'\',\'assets/templates/sisu/images/logo_bigfork_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.pinemedicalcenter.org/" target="_blank"><img src="assets/templates/sisu/images/logo_pm.gif" border="0"  id="logo_pm" name="logo_pm" alt="Pine Medical Center" onmouseover="MM_swapImage(\'logo_pm\',\'\',\'assets/templates/sisu/images/logo_pm_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.drhc.org/" target="_blank"><img src="assets/templates/sisu/images/logo_dr.gif" border="0"  id="logo_dr" name="logo_dr" alt="Deer River Healthcare Center" onmouseover="MM_swapImage(\'logo_dr\',\'\',\'assets/templates/sisu/images/logo_dr_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
//hospitalArray[hospitalArray.length] = '<a href="http://www.cloquethospital.com/" target="_blank"><img src="assets/templates/sisu/images/logo_cmh.gif" border="0"  id="logo_cmh" name="logo_md" alt="Community Memorial Hospital" onmouseover="MM_swapImage(\'logo_cmh\',\'\',\'assets/templates/sisu/images/logo_cmh_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.cuyunamed.org/" target="_blank"><img src="assets/templates/sisu/images/logo_crmc.jpg" border="0"  id="logo_crmc" name="logo_crmc" alt="Cuyuna Regional Medical Center" onmouseover="MM_swapImage(\'logo_crmc\',\'\',\'assets/templates/sisu/images/logo_crmc_on.jpg\',1)" onmouseout="MM_swapImgRestore()" /></a>';
//hospitalArray[hospitalArray.length] = '<a href="http://www.ebch.org/" target="_blank"><img src="assets/templates/sisu/images/logo_ely.gif" border="0"  id="logo_ely" name="logo_ely" alt="Ely-Bloomenson Community Hospital and Nursing Home" onmouseover="MM_swapImage(\'logo_ely\',\'\',\'assets/templates/sisu/images/logo_ely_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.hutchinsonhealthcare.com/" target="_blank"><img src="assets/templates/sisu/images/logo_hutchinson.gif" border="0"  id="logo_hutchinson" name="logo_hutchinson" alt="Hutchinson Area Health Care" onmouseover="MM_swapImage(\'logo_hutchinson\',\'\',\'assets/templates/sisu/images/logo_hutchinson_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.scbh.org/" target="_blank"><img src="assets/templates/sisu/images/logo_scbh.gif" border="0"  id="logo_scbh" name="logo_scbh" alt="SCBH" onmouseover="MM_swapImage(\'logo_scbh\',\'\',\'assets/templates/sisu/images/logo_scbh_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.cookhospital.org/" target="_blank"><img src="assets/templates/sisu/images/logo_cook.gif" border="0"  id="logo_cook" name="logo_cook" alt="Miller-Dwan" onmouseover="MM_swapImage(\'logo_cook\',\'\',\'assets/templates/sisu/images/logo_cook_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.ebch.org/" target="_blank"><img src="assets/templates/sisu/images/logo_elybloom.gif" border="0"  id="logo_elybloom" name="logo_elybloom" alt="Ely-Bloomenson" onmouseover="MM_swapImage(\'logo_elybloom\',\'\',\'assets/templates/sisu/images/logo_elybloom_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.kanabechospital.org/" target="_blank"><img src="assets/templates/sisu/images/logo_kanabec.gif" border="0"  id="logo_kanabec" name="logo_kanabec" alt="Kanabec Hospital" onmouseover="MM_swapImage(\'logo_kanabec\',\'\',\'assets/templates/sisu/images/logo_kanabec_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.reginamedical.org/index.asp?pageID=1" target="_blank"><img src="assets/templates/sisu/images/logo_regina.gif" border="0"  id="logo_regina" name="logo_regina" alt="Regina Medical Center" onmouseover="MM_swapImage(\'logo_regina\',\'\',\'assets/templates/sisu/images/logo_regina_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://trustedcareforlife.org/" target="_blank"><img src="assets/templates/sisu/images/logo_innovis.gif" border="0"  id="logo_innovis" name="logo_innovis" alt="Innovis Health" onmouseover="MM_swapImage(\'logo_innovis\',\'\',\'assets/templates/sisu/images/logo_innovis_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.riverwoodhealthcare.com/" target="_blank"><img src="assets/templates/sisu/images/logo_riverwood.gif" border="0"  id="logo_riverwood" name="logo_riverwood" alt="Riverwood Healthcare Center" onmouseover="MM_swapImage(\'logo_riverwood\',\'\',\'assets/templates/sisu/images/logo_riverwood_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.cloquethospital.com/" target="_blank"><img src="assets/templates/sisu/images/logo_CMH.jpg" border="0"  id="logo_cmh" name="logo_cmh" alt="Community Memorial Hospital" onmouseover="MM_swapImage(\'logo_cmh\',\'\',\'assets/templates/sisu/images/logo_cmh_on.jpg\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.boreal.org/nshcf/" target="_blank"><img src="assets/templates/sisu/images/logo_cookcounty.gif" border="0"  id="logo_cookcounty" name="logo_cookcounty" alt="Cook County North Shore Hospital" onmouseover="MM_swapImage(\'logo_cookcounty\',\'\',\'assets/templates/sisu/images/logo_cookcounty_on.gif\',1)" onmouseout="MM_swapImgRestore()" /></a>';
hospitalArray[hospitalArray.length] = '<a href="http://www.smdc.org/" target="_blank"><img src="assets/templates/sisu/images/logo_SMDCMedicalCenter.jpg" border="0"  id="logo_SMDCMedicalCenter" name="logo_SMDCMedicalCenter" alt="SMDC Medical Center" onmouseover="MM_swapImage(\'logo_SMDCMedicalCenter\',\'\',\'assets/templates/sisu/images/logo_SMDCMedicalCenter_on.jpg\',1)" onmouseout="MM_swapImgRestore()" /></a>';
	
var curImgPos = 3;	
function setImg(){
	document.getElementById("img1").innerHTML = hospitalArray[curImgPos];
	document.getElementById("img2").innerHTML = hospitalArray[(curImgPos + 1) % hospitalArray.length ];
	document.getElementById("img3").innerHTML = hospitalArray[(curImgPos + 2) % hospitalArray.length];
	curImgPos = (curImgPos + 3) % hospitalArray.length;
}