function breadcrumbs(){
	if (chkObject('breadTitle')) 
	{
	  sURL = new String;
	  bits = new Object;
	  var x = 0;
	  var stop = 0;
	  var output = "<a href=\"/\">Home</a> &nbsp;&#187;&nbsp; ";
	  sURL = location.href;
	  sURL = sURL.slice(8,sURL.length);
	  chunkStart = sURL.indexOf("/");
	  sURL = sURL.slice(chunkStart+1,sURL.length)
	  while(!stop){
	    chunkStart = sURL.indexOf("/");
	    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){
	    if (bits[i] == 'about')
		 {
		 	output += toProperCase(bits[i]) + "&nbsp;&#187;&nbsp; ";
		 }	    
	    else
		 {
	    	output += "<a href=\"";
	    	for(y=1;y<x-i;y++){
	      	output += "../";
	    	}
	    		output += bits[i] + "/\">" + toProperCase(bits[i]) + "</a> &nbsp;&#187;&nbsp; ";
	    }
	  }
	  document.getElementById('breadCrumb').innerHTML = output + document.getElementById('breadTitle').innerHTML;
	  if (document.getElementById('breadTitle').innerHTML != "Judy Dworin Performance Project")
	  	document.title =document.getElementById('breadTitle').innerHTML + " - JDPP Inc."
	 }
}


function toProperCase(s)
{
  if (s == 'current')
  	s = 'current repertory'
  if (s == 'fullworks')
  	s = 'full works'
  if (s == 'shortworks')
  	s = 'short works'
  if (s == 'mm')
  	s = 'moving matters!'  	
 if (s == 'reaching_out')
  	s = 'reaching out'  	
 if (s == 'connected')
  	s = 'get connected'  	
  	  	 	
  if (s != 'jdpe')
  {
    return s.toLowerCase().replace(/^(.)|\s(.)/g, 
          function($1) { return $1.toUpperCase(); });
  }
  else
  	return s.toUpperCase();
}

function chkObject (theVal) 
{
    if (document.getElementById(theVal) != null)
        return true; 
    else 
       return false;
}

 
