//a procedure automatically called
 if (window.top.fadeInDocument) {
   if (window.top.fadeInDocument(self)) { 
	   document.location.replace('about:blank');
		 }
   }
	else if (window.parent==this) { //not in frame, add logo after the page is loaded
   if (window.addEventListener)
   	 window.addEventListener('load', addHomingLogo, false);
    else if (window.attachEvent)
   	 window.attachEvent('onload', addHomingLogo);
    else 
   	 window['onload'] = addHomingLogo; 
	 }
	 
	 
function addHomingLogo() {
 var l_link=document.createElement('a');;
 var l_img=document.createElement('img');;

 l_img.src="http://www.8dimensions.com/logos/logo_mini.png";
 l_img.style.border=0;
 l_img.alt="8 Dimensions";
 l_img.title="See the page at 8 Dimensions site";
 
 l_link.appendChild(l_img);
 
 var l_href=document.location.pathname;
 if (l_href.indexOf("/cs/")>-1)
   l_href="http://www.8dimensions.com/index_cs.html";
	else 
   l_href="http://www.8dimensions.com/index.html";

 l_href=l_href+"?"+fileOfHref(document.location.href);
 l_link.href=l_href; 
 l_link.target="_top";
 l_link.style.position="absolute";
 l_link.style.visibility="hidden";
 document.body.appendChild(l_link);
 l_link.style.top="10px";
 l_link.style.right="10px";
 l_link.style.visibility="visible";
}	 

function fileOfHref(in_Href) {
 var l_pos=in_Href.lastIndexOf("/");
 if (l_pos==-1)
   return in_Href;
  else
   return in_Href.substr(l_pos+1);	
}
