function TopofEntry()
{	document.write('<!--  START of Header -->');

	document.write('<table align="center" width="741" border="0" cellspacing="0" cellpadding="0">');
    document.write('<tr><td colspan="4" bgcolor="000066"><img src="spacer.gif" width="1" height="1"></td></tr>');
    document.write('<tr>');    document.write('<td width="1" bgcolor="#000066"><img src="spacer.gif" width="1" height="1"></td>');
    document.write('<td width="740" bgcolor="#FFF8F1">');
    
			document.write('<table width="740" border="0" cellspacing="0" cellpadding="0">');
			document.write('<tr><td width="10" height="30" bgcolor="#000066">&nbsp; </td>');
		    document.write('<td width="1"><img src="spacer.gif" width="1" height="1"></td>');
			document.write('<td width="6" bgcolor="#DEDEDE"><img src="spacer.gif" width="6" height="1"></td>');
			document.write('<td>');
								document.write('<table  width="724" border="0" cellspacing="0" cellpadding="0">');
					document.write('<tr>');					document.write('<td width="329" class="footertext"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="billp.jpg" width="256" height="54" border=0></td>');
					document.write('<td width="340" align="right" class="footertext">');					
					document.write('<a href="http://www.bitsfrombill.com/" ><big>Bits from Bill</big></A> ');					document.write('<img src="spacer.gif" width="6" height="1"> <a href="http://billpstudios.blogspot.com/" ><img align="middle" src="http://www.winpatrol.com/images/mysteryware.gif" border=0></td>');
					document.write('<td width="1" bgcolor="#000066"><img src="spacer.gif" width="1" ></td>');
					document.write('</tr>');					document.write('</table>');

    document.write('<!--  Start of Body  -->');					document.write('<table width="724" border="0" cellspacing="0" cellpadding="0">');
					document.write('<tr><td width="670" align="left">');
					document.write('<P><br><br>');
					
								ShowProgramInfo();		// added for version 12
							document.write('<table  align="center" border="0" cellspacing="5" cellpadding="5">');
							document.write('<tr>');							document.write('<TD width="1"></TD>');							document.write('<td width="668" align="left">');												
document.write('<!--   End of Header -->');


	return;
	
	
	

}


function DoFooter()
{

		document.write('<!--  START of Footer -->');
//		document.write('Friday we experienced a catastrophic failure at our Data Centers in Dulles, Virginia.<br> ');
//		document.write('PLUS info was not available most of day on 22-Sept.<br> ');
//		document.write('We apologize for any inconvenience. We are now running at 100% capacity again.');																												
		
		
							document.write('</td>');							document.write('<TD></TD>');
							document.write('</tr>');
							document.write('</table>');			if(GetID() == 0)				UpgradeToday();
			
					document.write('</td>');
					document.write('<td align="right" width="1" bgcolor="#000066"><img src="spacer.gif" width="1" ></td>');
					document.write('</tr>');					document.write('</table>');



		
		
			document.write('</td></tr>');
			document.write('<tr><td colspan="4" bgcolor="#000066"><img src="spacer.gif" width="1" height="1"></td></tr>');
			document.write('</table>');
			

		document.write('</td>');		document.write('<TD></TD>');
		document.write('</tr>');
		document.write('</table>');
		document.write('<!--  End of Boddy of Header -->    ');
		document.write('<br>');
		if(GetID() > 0)		{			PCPitstop();			document.write('<br>');	
			Google();
		}
		document.write('<table width="741" align="center" border="0" cellspacing="0" cellpadding="0">');
		document.write('<tr><td colspan="4" bgcolor="#000066"><img src="spacer.gif" width="1" height="1"></td></tr>');
		document.write('<tr><td width="1" bgcolor="#000066"><img src="spacer.gif" width="1" height="1"></td>');
		document.write('<td width="740" bgcolor="#FFF8F1">');		
				document.write('<table width="688" border="0" cellspacing="0" cellpadding="0">');
				document.write('<tr><td width="10" height="30" bgcolor="#000066">&nbsp;</td>');
				document.write('<td width="1"><img src="spacer.gif" width="1" height="1"></td>');
				document.write('<td	width="6" bgcolor="#DEDEDE"><img src="spacer.gif" width="6" height="1"></td>');
				document.write('<td>');
						document.write('<table width="670" border="0" cellspacing="0" cellpadding="0">');
						document.write('<tr><td width="329" class="footertext">&nbsp;&nbsp;&nbsp; &copy; 2004-2008 BillP Studios  All Rights Reserved.</td>');
						document.write('<td width="340" align="right">');
						
						
						document.write("<A href='mailto:dbrobin11@winpatrol.com?Subject=PLUS Edit :" + GetDBFileName() + "'>" )
						document.write("Report Errors in Description</A>");
							document.write('</td>');						document.write('</tr>');						document.write('</table>');
				document.write('</td>');
				document.write('</tr>');				document.write('</table>');
    	document.write('</td>');			document.write('<td width="1" bgcolor="#000066"><img src="spacer.gif" width="1" ></td>');
		document.write('<tr><td colspan="4" bgcolor="#000066"><img src="spacer.gif" width="1" height="1"></td></tr>');
		document.write('</tr>');		document.write('</table>');
		
	document.write('<!--  End of Footer -->');
    

	return;
}

 function GetDBFileName()
 {
	var h = parent.location.href;
	var nr = h.split("?");

	if(( typeof(nr[1])== "undefined") )
		sProgram = "";
	else
		sProgram=nr[1];
		
	return sProgram;
 }
 function GetProgramName()
 {
	var h = parent.location.href;
	var nr = h.split("?");

	if(( typeof(nr[1])== "undefined") )
		sProgram = "";
	else
	{
		sProgram=nr[1];
		p = sProgram.split("&")
		if(( typeof(p[0])== "undefined") )
			sProgram="";
		else
			sProgram=p[0];
	}			
		
	return sProgram;
 }



function Google()
{


	var prog = GetProgramName();
	if(prog == "")
	{
		window.location = "http://www.winpatrol.com/stats.html";
	}
	

	document.write("<center>");
	document.write("<FORM method=GET action='http://www.google.com/custom'>");
	document.write("<TABLE bgcolor='#FEFAEF'><tr><td nowrap='nowrap' valign='top' align='center' height='32'>");
	document.write("<A HREF='http://www.google.com/'>");
	document.write("<IMG SRC='http://www.google.com/logos/Logo_25wht.gif' border=0 ALT='Google' align='absmiddle'></A>");

	document.write("<INPUT TYPE=text name=q size=25 maxlength=255 value='" + GetProgramName() + "'>");

	document.write("<INPUT type=submit name=sa VALUE='Try Google'>");

	document.write("<input type=hidden name=client value='pub-5216032068438142'>");
	document.write("<input type=hidden name=forid value='1'>");
	document.write("<input type=hidden name=ie value='ISO-8859-1'>");
	document.write("<input type=hidden name=oe value='ISO-8859-1'>");
	document.write("<input type=hidden name=cof value='GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;'>");
	document.write("<input type=hidden name=hl value='en'>");
	document.write("</td></tr></TABLE>");
	document.write("</FORM>");
	document.write("</center>");
	return;
}

function PCPitstop(){
	var prog = GetProgramName();
	if(prog == "")
	{
		return;
	}
	

	document.write("<center>");
	document.write("<A href='http://www.pcpitstop.com/spycheck/SWDetail.asp?fn="+ GetProgramName() + "'>");	document.write("<img src='http://www.winpatrol.com/images/pcpitstop.gif' height=54 width=90 border=0><br>");
	document.write("Look for Information on '" + GetProgramName() + "' from PC Pitstop</A>" );	document.write("</center><br>");	return;}

function Pacman(){
	var prog = GetProgramName();
	if(prog == "")
	{
		return;
	}

	document.write("<A href='http://www.sysinfo.org/startuplist.php?filter=" + GetProgramName() + "'>" );
	document.write("<u>For additional info click here to search the Sysinfo.org database</u></A>" );
	document.write("<br>");	return;}


 function GetID()
 {
	var h = parent.location.href;
	var nr = h.split("?");

	if(( typeof(nr[1])== "undefined") )
		sProgram = 0;
	else
	{
		sProgram=nr[1];
		p = sProgram.split("&")
		if(( typeof(p[1])== "undefined") )
			sProgram=0;
		else
			sProgram=1;
	}			
		
	return sProgram;
 }


function UpgradeToday()
{
		//history.go(-1);
		
		 var location=("http://www.winpatrol.com/nonplus.html");
         this.location.href = location;
		
		document.write('&nbsp;&nbsp;<STRONG>Free <B><i>PLUS</i> Info</B> is available as part of our Back to School Special</A>');
		document.write('<br>&nbsp;&nbsp;Don\'t Wait. This promotion will end soon.<br>&nbsp;&nbsp;Click below to always have "PLUS Info", along with our Real-Time Monitoring of Undocumented Windows locations.</STRONG>');
		
		document.write('<br>');

		document.write('<A href="http://store.yahoo.com/winpatrol/winplusmemre.html">');
		document.write('<IMG align=middle alt="Scotty Icon" border=0 src="http://www.winpatrol.com/images/scotty_plus.gif" ></A> &nbsp;');
		document.write('<A href="http://store.yahoo.com/winpatrol/winplusmemre.html">');
		document.write('<STRONG><b>Upgrade to WinPatrol <I>PLUS</I> Now!</b></STRONG></A>');
		document.write('<br>');
		document.write('<br>&nbsp;&nbsp;<b>PC World says "<i>...a must-have tool!</I>"<b>');

}

function GetStartupType(sType)
{
	sResult = "";
	switch(sType)
	{
		case "1":	
			sResult = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
			break;
		case "2":
			sResult = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce";
			break;
		case "3":	
			sResult = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx";
			break;
		case "4":
			sResult = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunService";
			break;
		case "5":	
			sResult = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce";
			break;
		case "6":
			sResult = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\policies\\Explorer\\Run";
			break;
		case "11":	
			sResult = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run";
			break;
		case "12":
			sResult = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce";
			break;
		case "13":	
			sResult = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx";
			break;
		case "14":
			sResult = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunService";
			break;
		case "15":	
			sResult = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce";
			break;
		case "100":	
			sResult = "WIN.INI  LOAD=";
			break;
		case "101":	
			sResult = "WIN.INI RUN=";
			break;
		case "200":
			sResult = "STARTUP Folder";			
			break;
		case "250":
			sResult = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon";			
			break;
		case "251":
			sResult = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon  Shell";			
			break;
		case "252":
			sResult = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ShellServiceObjectDelayLoad";			
			break;
		case "253":
			sResult = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SharedTaskScheduler";			
			break;
		case "254":
			sResult = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellExecuteHooks";			
			break;
		case "255":
			sResult = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows  AppInit_DLLs";			
			break;
		case "256":
			sResult = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Notify";			
			break;
		case "370":
			sResult = "Hidden File";			
			break;
		case "400":
			sResult = "FileType Association";			
			break;
		case "600":
			sResult = "Active Task";			
			break;
		case "700":
			sResult = "Windows Service";			
			break;
		case "701":
			sResult = "Windows Service using SVCHOST.exe";			
			break;
		case "800":
			sResult = "Scheduled Task";			
			break;
		case "900":
			sResult = "Browser Helper Object";			
			break;
		case "901":
			sResult = "Internet Explorer Toolbar";			
			break;
		case "902":
			sResult = "Internet Explorer Extension";			
			break;
			
			

	}
	return sResult;
}
		
	
function ShowProgramInfo()
{
	var h = parent.location.href;
	var nr = h.split("?");

	if(( typeof(nr[1])== "undefined") )
		sProgram = "";
	else
	{
		sProgram=nr[1];
		p = sProgram.split("&")
		if(( typeof(p[0])== "undefined") )
			sProgram=" ";
		else
			sProgram=p[0];

		if(( typeof(p[1])== "undefined") )
			sType=" ";
		else
			sType=p[1];

		if(( typeof(p[2])== "undefined") )
			sLocation=" ";
		else
			sLocation=p[2];

		if(( typeof(p[3])== "undefined") )
			sCompany =" ";
		else
			sCompany=p[3];

		if(( typeof(p[4])== "undefined") )
			sDetail=" ";
		else
			sDetail=p[4];

		if(( typeof(p[5])== "undefined") )
			sCopy =" ";
		else
			sCopy=p[5].replace(/%C2%A9/g, "©");

		if(( typeof(p[6])== "undefined") )
			sVersion=" ";
		else
			sVersion=p[6];


		if(( typeof(p[7])== "undefined") )
			sCreated=" ";
		else
			sCreated=p[7];

		if(( typeof(p[8])== "undefined") )
			sDetected=" ";
		else
			sDetected=p[8];

		if(( typeof(p[8])== "undefined") )
			return;
	

		if(( typeof(p[9])== "undefined") )
			sSize=" ";
		else
			sSize=p[9];

		if(( typeof(p[10])== "undefined") )
			sExe =" ";
		else
			sExe=p[10];


		if(( typeof(p[11])== "undefined") )
			sPath =" ";
		else
			sPath=p[11];


		document.write( "<Table  bgcolor='#ebe9ed'  cellspacing='2' cellpadding='3' align='center' border='5' bordercolordark='#3366CC' bordercolorlight='#66CCFF'  bordercolor='#3366CC'>");
		
		document.write("<TR><TD align=center colspan=3> ");
		document.write("<big><b>" + sDetail.replace(/%20/g, " ") + "</B></BIG><BR>");
		document.write("<BIG>" + sProgram + "." + sExe + "</BIG><BR>");
		if(sType+0 < 275)
		{
			document.write( "<BR><B> Startup Location:</B> " + GetStartupType(sType) );
		}
		else
		{
			document.write( "<BR> " + GetStartupType(sType) );
		}

		
		
		document.write("</TD></TR>");

		document.write("<TR><TD colspan=3>");
		document.write(" Company: " + sCompany.replace(/%20/g, " ") + "<BR>");
		document.write(" Copyright: " + sCopy.replace(/%20/g, " ") + "<BR>");
		document.write(" Version: " + sVersion.replace(/%20/g, " ") + "<BR>");
		document.write("</TD> </TR>");
		
		document.write("<TR> <TD align='center'>Created<br>" + sCreated.replace(/%20/g, " ") + "</TD>");
		document.write("     <TD align='center'>First Detected<br>" + sDetected.replace(/%20/g, " ") + "</TD>");
		document.write("     <TD align='center'>File Size<br>" + sSize.replace(/%20/g, " ") + "</TD>");
		document.write("</TR>");
		
		document.write("<TR><TD colspan=3");
		document.write("<big><B>Path:</B> " + sPath.replace(/%20/g, " ") + "</big>");

		document.write( "</TD> </TR>");
		document.write( "</TABLE>");

	}			
		
	return;
 }

function Twitter()
{
	document.write("<center><h3><br><A href='http://twitter.com/home?status=@WinPatrol Free detected a file called \"");
	document.write( GetProgramName() );
	document.write( "\". Anyone know if this is safe?'>");
	document.write( "<img align='middle' border=0 src='http://www.winpatrol.com/images/wptwitter.jpg'>");
	document.write("NEW! Get help from millions on Twitter</A></h3></center><br>");
	return;
}
