// JavaScript Document
// macromedia functions
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 MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// bread crumbs (navigation trail)

function breadcrumbs(){
    sURL = new String;
    bits = new Object;
    var x = 0;
    var stop = 0;
    var output = "<span class='content_smtext'>You are here > </span> ";
    sURL = location.href;
    sURL = sURL.slice(8,sURL.length);
    chunkStart = sURL.indexOf("e:\ccbhealthcare.com/");
    sURL = sURL.slice(chunkStart+1,sURL.length)
    while(!stop){
      chunkStart = sURL.indexOf("E:\ccbhealthcare.com/");
      if (chunkStart != -1){
        bits[x] = sURL.slice(0,chunkStart)
        sURL = sURL.slice(chunkStart+1,sURL.length);
      }else{
        stop = 1;
      }
      x++;
    }
    for(var i in bits){
      output += "<A HREF=\"";
      for(y=1;y<x-i;y++){
        output += "E:\ccbhealthcare.com/";
      }
      output += bits[i] + "/\">" + bits[i] + "</A> > ";
    }
    var where_is_mytool=document.title;
    var mytool_array=where_is_mytool.split("-");
    document.write(output + mytool_array[0]);
}

// for printing and email functions

var printitle=document.title;
var printitle_array=printitle.split("-");
var printitle_word = '<title>' + printitle_array[0] + '- CCB Healthcare System</title>'

function printPage(ID,csstype) {
if (csstype==null){
	csstype='main.css'
	}	
	
elem = document.getElementById('content_2col');
if(elem != null)
  var content = document.getElementById('content_2col').innerHTML
else
  var content = document.getElementById('content').innerHTML	

var winprint = window.open("","printer",""); 
//var content = document.getElementById(ID).innerHTML;
winprint.document.open(); 
winprint.document.write('<html><head>'+ printitle_word + '<LINK type=text/css rel=stylesheet href=' + csstype + '></head><body style=background-color:#ffffff onload=window.print(); window.close();><br><br><br>'); 
winprint.document.write(content);
winprint.document.write('</body></html>'); 
winprint.document.close(); 
winprint.focus(); 
}

function toggleblock1(theid,theimg,thevideo){
	var bname = navigator.appName;
	 
	if (document.getElementById(theid).style.display == 'none')			
		{
		if (thevideo != 'x') {
				if (bname.search(/microsoft/i) == 0)
   				{
  				document.getElementById(thevideo).controls.play();
   				}
		}
		document.getElementById(theid).style.display = 'block';	
		if (!theimg==''){
			switch (thevideo) {
   				case 'IAudio1': MM_swapImage(theimg,'','images/closeaudio.png',1); break;
   				case 'IChart1': MM_swapImage(theimg,'','images/closechart.png',1); break;
   				default: MM_swapImage(theimg,'','images/closevideo.png',1);
			}
			document.getElementById(theimg).alt = 'close';	
			}
		}
	else
		{
		if (bname.search(/microsoft/i) == 0)
   						{
  						if (thevideo != 'x') {
						document.getElementById(thevideo).controls.stop();
  						document.getElementById(thevideo).close();
						}
  						document.getElementById(theid).style.display = 'none';
   						}
						else
   						{
   						document.getElementById(theid).style.display = 'none';
   						}
		if (!theimg==''){
			MM_swapImgRestore(); 
			document.getElementById(theimg).alt = 'view';	
			}
		}
	
 
}


function toggleblock2(theid,theimg){
	
	 
	if (document.getElementById(theid).style.display == 'none')			
		{
		document.getElementById(theid).style.display = 'block';	
		if (!theimg==''){
			MM_swapImage(theimg,'','images/playvideo.png',1);
			document.getElementById(theimg).alt = 'close video';	
			}
		}
	else
		{
		document.getElementById(theid).style.display = 'none';	
		if (!theimg==''){
			MM_swapImgRestore(); 
			document.getElementById(theimg).alt = 'play video';	
			}
		}
	
 
}
