/* author: CDH Consulting http://www.cdhconsult.com */
/* Creation date:  Feb 3 2005*/
/* If page is not in the standard cdhconsult frame environment, it redirects it */
/* unless the page url has the word cache in it. Search engines cache pages. */
<!--
 if ( self == top ) {
   var url = self.location.href;
   if ( url.indexOf('file://') == -1 ) {
	var k = (url.indexOf("/cdh/") + 4);
	var isCached = ( url.indexOf("cache") != -1 );
	var preamble = url.substr(0, k);
	var frameContent = url.substr(k+1, url.length);
	var newurl = preamble + '/index.jsp?frameSrc=' + frameContent

	//alert('Not in a frame '+ self.location.href + " preamble = " + preamble
	//  + ' contents = ' + frameContent + ' new url = ' + newurl + ' isCached = '
	// + isCached );
    var isIE = 0;
	if ( navigator.appName == "Microsoft Internet Explorer" ) {
	   isIE = true;
	}
	if ( isCached ) {
	  /* do nothing */
	  document.write("The CDH Consulting site pages should be framed to work properly.<br/>");
	  document.write("The Javascript code in Cached pages from search engines may not work. <br/>");
	  document.write("Please go to the real CDH framed site.<br/>");
	  document.write("<a href=\"http://www.cdhconsult.com/cdh\""  + " target=\"_top\" >Go to Framed cdhconsult web site home page! </a><br/>");
	}
	else if ( isIE ) {
       location.replace( newurl );  // allows the BACK button to function as the user expects
       /* document.write("<a href=\"" + newurl +"\"  target=\"_top\" > Goto Framed UMI web site page! </a>"); */
	}
    else {
        window.location.href = newurl;
    }
   }
 }
//-->
