
document.write("<div id='toto'></div>");

function _onLoad()
{

	if ( 
		( typeof(window.page) == "undefined" ) &&
		( typeof(window.parent.page) == "undefined" ) &&
		( typeof(window.parent.parent.page) == "undefined" ) &&
		( typeof(window.parent.parent.parent.page) == "undefined" ) 
		)
		{
		pToto = document.getElementById("toto");
		if (pToto)
			pToto.innerHTML= "<H2><font color=red>This page is part of another frame. To fully view the entire site, please visit the FTA web site (<a href='http://www.freetoolsassociation.com'>www.freetoolsassociation.com</a>)</font></H2>";
	//	alert("This page is part of another frame. To fully view the site, please visit the FTA web site (www.freetoolsassociation.com)");
	
		}
		
	if (onLoadPtr)
		eval(onLoadPtr);
}



function submitGuestBook(_link,_name,_email,_comment,_host)
{

	_name = ascii2html(_name);
	_comment = ascii2html(_comment);
	_link += "&email="+_email+"&thename="+_name+"&comment="+_comment+"&thehost="+_host;
	
	moveTo(_link);	
}

   var hexChars = "0123456789ABCDEF";

function Dec2Hex (Dec) { var a = Dec % 16; var b = (Dec - a)/16; hex = "" + hexChars.charAt(b) + hexChars.charAt(a); return hex; }



function ascii2html(s) 
{
 if (!s) return ;

 return s.replace ( /(\w|\W)/g, 

   function (s, n) 
   {
     c=n.charCodeAt(0);
     return (c==10?'%0A':c==13?'%0D':c==34?'%22':c==39?'%27':c==38?'%26':(c>127?'%'+Dec2Hex(c)+'':n));
   }    
 );
}


function download(_id,_file,_log)
{
	obj = 	document.getElementById(_id);
	if (obj)
	{
		src = "../fta/stat.php?f="+_log;
		obj.innerHTML = "<img width=2 height=2 src='"+src+"'>";
	}
	
	moveTo(_file);
}


function copyEstat()
{
	src = document.getElementById("estatsrc");	
	pdest = parent ;
	dest = null;
	for(i=0;i<4;i++)
	{
		if (typeof(pdest.document)=="unknown") { dest = null; break; }
		dest = pdest.document.getElementById("estatdst");
		if (dest) break;
		pdest = pdest.parent;
	}
		
	if (dest)
	{
		if (src)
		{
			dest.innerHTML = src.innerHTML;
			src.innerHTML = "";
		//	alert(dest.innerHTML);
		}
	}
	
	dest = 0;
	pdest = parent ;
	for(i=0;i<4;i++)
	{
		if (typeof(pdest.document)=="unknown") { dest = null; break; }
		document.images
		dest = pdest.document.images["counter"];	//getElementById("counterdst");
		if (dest) break;
		pdest = pdest.parent;
	}
	if (dest)
		dest.src ='http://www.imingo.com/services/compteur/icptgr.php?id=freetoolsassociation';
}