/* 
	JAVASCRIPT Library for ProcessLibrary.com

*/

/* 
	JAVASCRIPT Library for ProcessLibrary.com

*/


var kw_application = "An application is a set of files (executables, configuration files, ancillary data files, etc.) that make up software such as spreadsheets, word processors and database programs for end users.";
var kw_adware = "Adware is software installed at the same time as a shareware or similar program that at regular intervals displays 'pop up' advertisements on a user's computer. These ads are made 'user relevant' according to the Web sites visited by the user and on key words entered in search engines. The marketing data is collected periodically and sent in the background back to the originating web server.";
var kw_backdoor = "Also known as a trapdoor, this is an undeclared vulnerability within a system often deliberately built into a system by its designers or maintainers. The motivation for such holes is not always hostile, however it is an undeclared way of gaining access of a program, online service, personal information or an entire computer system and as such is a potential security risk as it may allow unauthorized users to 'see' your personal data.";
var kw_background = "Background processes run in 'hidden' mode. They either run with a relatively low priority output, or for longer tasks that require substantial computation and take up CPU time. They communicate with other programs or with other computers via a network. They may be identified in the Task Manager list of running processes but there is no active window.";
var kw_dialer = "A dialer is a computer program which creates a connection to the Internet or another computer network over an analogue telephone or ISDN network. Many operating systems include such a program for connections through the Point-to-Point-Protocol (PPP). Nowadays, the term \"dialer\" often refers specifically to dialers which connect without the user's full knowledge that costs are being incurred, with the creator of the dialer intending to commit fraud.";
var kw_downloader = "A Windows program that automatically downloads and runs and/or installs other software without the user's knowledge or permission. In addition to downloading and installing other software, it may download updated versions of itself. Once active on your system, a Downloader can constantly check for updated files which may allow ad/mal/spyware access to your system. ";
var kw_duplicate = "Duplicate files can be created during downloading or file sharing over networks. They use up large quantities of disk space and can slowdown your OS. They are unnecessary and should be removed.";
var kw_hardware = "The physical computer equipment directly involved in the performance of data-processing or communications functions. It can also include the software that the system uses to communicate with a device such as a CPU or TFT monitor, printer or mouse.";
var kw_hijacker = "Browser hijackers are malware or spyware programs designed to remove and replace  the users existing internet browser home page, error page, or search page with its own, in order to direct hits to a particular website. System Hijackers take control of a host computer's resources to use the system as a resource for its own, usually malicious purpose. This activity grabs large amounts of space and negatively affecting computer and Internet speeds, often turning the host computer into a 'zombie' that is useless to its owner.";
var kw_internet = "This process accesses the Internet via your browser.  It enables millions of users to usefully transfer and share resources and upload/download information. This also creates opportunities for creators of ad/share/mal/spyware and virus writers to spread their own activities via unsuspecting host user PCs, or access personal information.";
var kw_network = "This process links two or more computers in order to send, organize, store and update data. A local area network (LAN - up to one mile), and metropolitan area network (MAN) up to 60 miles, can connect personal computers and workstations (each called a node) over dedicated, private communications links. A wide area network (WAN) connects large numbers of nodes over long-distance communications links worldwide and internet.";
var kw_notneeded = "This process is not needed and can be terminated from the computer at any time.";
var kw_nuisance = "Anything that disturbs the free use of a system, or that renders its normal use impossible. Such a  process may have a legitimate purpose, but may expose the user to security problems or loss in productivity.";
var kw_service = "This process runs in the background and provides functionality for a particular software program. Network services are programs that transmit data or provide conversion of data in a network. Database services provide for the storage and retrieval of data in a database. Web services are applications that interact with each other via the Internet.";
var kw_spyware = "A software program that gathers user information, without his or her knowledge or permission. Such malicious applications are normally hidden within freeware or shareware programs. Once installed, the spyware monitors user activity on the Internet and transmits that information in the background to someone else. Information gathered can include e-mail addresses and even passwords and credit card numbers, for unsolicited advertising, theft and fraud.";
var kw_system = "System processes are part of the operating system. They are responsible for controlling, integrating, and managing the individual hardware components of a computer. They coordinate activities and the sharing of the resources of the computer. The operating system (OS) acts as a host for application programs that are run on the machine.";
var kw_systemutility = "System software that is involved with and helps to control the operating system of a computer, such as data and programs management, control programs, and database management systems. ";
var kw_traybar = "TrayBar is a small and useful application launcher that runs in the system tray next to the Windows clock and lets you access your favorite programs and files easily in just a couple of clicks.";
var kw_trojan = "A Trojan is similar to a virus, but without the ability to replicate itself. It is a program attached to a free game or other utility or email attachment that appears to be a harmless, even desirable application. Trojans are designed to be actively harmful to PCs by intentionally damaging PC operating systems, other software or hard drives. ";
var kw_virus = "A virus is a self-replicating, self-executing computer program written to alter the way a computer operates, without the permission or knowledge of the user. Once present, it copies itself into the other programs stored in a computer. It may be benign but is usually very damaging and can cause programs to operate incorrectly or corrupt a computer's memory and destroy data files.";
var kw_keylogger = "A Keylogger is a 'stealth' program that runs invisibly in the background, recording all the keystrokes, while saving the results to a log file that can later be sent to a third party (hacker) via email, providing a means to obtain passwords or encryption keys in order to bypass other security measures without the knowledge of the user.";
var kw_library = "A Dynamic Link Library (DLL) is a library of executable functions or data that can be used by a Windows application. Typically, a DLL provides one or more particular functions which can be accessed by programs by creating either a static or dynamic link to the DLL. A static link remains constant during program execution while a dynamic link is created by the program as needed. DLLs can also simply contain data.";
var kw_autostartup = "This file is often found to be set to run automatically when the system starts.  Autostartup files then commonly stay running in the background, and take up valuable resources such as memory and CPU-time. For this reason autostartup files should be kept to a minimum.";
var kw_unreviewed = "This process is still being reviewed by our team. Additional information (such as Security Rating) will be added once the process is reviewed.";


// create bubbles for all keywords
function enableKeywordTooltips(keywordIds) {
	for (var i=0; i<keywordIds.length; i++) 
	{
		if (keywordIds[i]!='') {
			Prepare_Keywords(keywordIds[i]);
		}
	}
}

function Prepare_Keywords(elId){
	var tooltip,t,b,s,cnt;
	el = document.getElementById(elId)
	
	
	// new
	if (el != null)
	{

	// the bubble heading is in the title
	t = el.getAttribute("title");
	// remove title so browser does not show
	el.removeAttribute("title");
	elT = CreateEl("span","title");
	elT.appendChild(document.createTextNode(t));

	// generate content by reading variable with same name as id
	cnt = eval(elId);
	elCnt = CreateEl("span","textcnt");
	elCnt = CreateContent(elCnt, cnt);
	
	tooltip=CreateEl("span","tooltip");  // create tootltip bubble
	s=CreateEl("span","top"); // create tooltip top
	b=CreateEl("b","bottom"); // create tooltip bottom
	
	s.appendChild(elT);  // add title to top span
	s.appendChild(elCnt);  // add content to top span
	tooltip.appendChild(s); // add top span to main bubble span
	tooltip.appendChild(b); // add bottom span to bubble

	//setOpacity(tooltip);
	
	el.tooltip=tooltip;
	el.onmouseover=showTooltip;
	el.onmouseout=hideTooltip;
	el.onmousemove=Locate;
	}
}


function enableTooltips(id){
	var links,i,h;
	if(!document.getElementById || !document.getElementsByTagName) return;
	AddCss();
	h=document.createElement("span");
	h.id="btc";
	h.setAttribute("id","btc");
	h.style.position="absolute";
	document.getElementsByTagName("body")[0].appendChild(h);
	if(id==null) links=document.getElementsByTagName("a");
	else links=document.getElementById(id).getElementsByTagName("a");
	for(i=0;i<links.length;i++){
		Prepare(links[i]);
		}
}

//<strong>Popularity Rating</strong><br />0 Stars = No search activity<br />1 Star = Little search activity<br />2 Stars = Some search activity<br />3 Stars = Medium search activity<br />4 Stars = High search activity<br />5 Stars = Most frequent search activity

function Prepare(el){
	var tooltip,t,b,s,l;
	t=el.getAttribute("title");
	if(t==null || t.length==0) t="link:";
	el.removeAttribute("title");
	tooltip=CreateEl("span","tooltip");
	s=CreateEl("span","top");
	//s.appendChild(document.createTextNode(t));
	s.innerHTML = t;
	tooltip.appendChild(s);
	b=CreateEl("b","bottom");
	tooltip.appendChild(b);
	//setOpacity(tooltip);
	el.tooltip=tooltip;
	el.onmouseover=showTooltip;
	el.onmouseout=hideTooltip;
	el.onmousemove=Locate;
}

function showTooltip(e){
	document.getElementById("btc").appendChild(this.tooltip);
	Locate(e);
}

function hideTooltip(e){
	var d=document.getElementById("btc");
	if(d.childNodes.length>0) d.removeChild(d.firstChild);
}

function setOpacity(el){
	el.style.filter="alpha(opacity:95)";
	el.style.KHTMLOpacity="0.95";
	el.style.MozOpacity="0.95";
	el.style.opacity="0.95";
}

function CreateEl(t,c){
	var x=document.createElement(t);
	x.className=c;
	x.style.display="block";
	return(x);
}

function AddCss(){}

function Locate(e){
	var posx=0,posy=0;
	if(e==null) e=window.event;
	if(e.pageX || e.pageY){
		posx=e.pageX; posy=e.pageY;
		}
	else if(e.clientX || e.clientY){
		if(document.documentElement.scrollTop){
			posx=e.clientX+document.documentElement.scrollLeft;
			posy=e.clientY+document.documentElement.scrollTop;
			}
		else{
			posx=e.clientX+document.body.scrollLeft;
			posy=e.clientY+document.body.scrollTop;
			}
		}
	document.getElementById("btc").style.top=(posy+10)+"px";
	document.getElementById("btc").style.left=(posx-20)+"px";
}

function CreateContent(el, source) {
	var prevpos = 0;
	var nxtpos = 0;
	
	if (source.indexOf("\n", prevpos)>-1) {
		// newlines in description
		while (source.indexOf("\n", prevpos)>-1)
		{
			// get next bit
			nxtpos = source.indexOf("\n", prevpos);
			txt = source.substring(prevpos, nxtpos);
			txtNode = document.createTextNode(txt);
			el.appendChild(txtNode);
			el.appendChild(document.createElement('br'));
			prevpos = nxtpos + 2; // to jump '/n'
		}
	} 
	// add last part (or all if there were no line breaks
	el.appendChild(document.createTextNode(source.substring(prevpos, source.length)));
	
	return el;
}


/* DROP DOWN MENU SCRIPTS */


//Chrome Drop Down Menu v2.01
//Modified by Richard for Uniblue Systems Limited (June 2007)

//Please don't edit this unless you're a god. \\

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
disablemenuclick: false, //when user clicks on a menu item with a drop down menu, disable menu item's link?
enableswipe: 1, //enable swipe effect? 1 for yes, 0 for no
enableiframeshim: 1, 
dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all, swipetimer: undefined, bottomclip:0,

getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
},

swipeeffect:function(){
if (this.bottomclip<parseInt(this.dropmenuobj.offsetHeight)){
this.bottomclip+=10+(this.bottomclip/10) //unclip drop down menu visibility gradually
this.dropmenuobj.style.clip="rect(0 auto "+this.bottomclip+"px 0)"
}
else
return
this.swipetimer=setTimeout("cssdropdown.swipeeffect()", 10)
},

showhide:function(obj, e){
if (this.ie || this.firefox)
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover"){
if (this.enableswipe==1){
if (typeof this.swipetimer!="undefined")
clearTimeout(this.swipetimer)
obj.clip="rect(0 auto 0 0)" //hide menu via clipping
this.bottomclip=0
this.swipeeffect()
}
obj.visibility="visible"
}
else if (e.type=="click")
obj.visibility="hidden"
},

iecompattest:function(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
},

clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},

dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden" //hide menu
this.clearhidemenu()
if (this.ie||this.firefox){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
obj.onclick=function(){return !cssdropdown.disablemenuclick} //disable main menu item link onclick?
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(e){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e)
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+0+"px"
this.positionshim() //call iframe shim function
}
},

positionshim:function(){ //display iframe shim function
if (this.enableiframeshim && typeof this.shimobject!="undefined"){
if (this.dropmenuobj.style.visibility=="visible"){
this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
this.shimobject.style.height=this.dropmenuobj.offsetHeight+"px"
this.shimobject.style.left=this.dropmenuobj.style.left
this.shimobject.style.top=this.dropmenuobj.style.top
}
this.shimobject.style.display=(this.dropmenuobj.style.visibility=="visible")? "block" : "none"
}
},

hideshim:function(){
if (this.enableiframeshim && typeof this.shimobject!="undefined")
this.shimobject.style.display='none'
},

contains_firefox:function(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
},

dynamichide:function(e){
var evtobj=window.event? window.event : e
if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
this.delayhidemenu()
else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
this.delayhidemenu()
},

delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'; cssdropdown.hideshim()",this.disappeardelay) //hide menu
},

clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
},

startchrome:function(){
for (var ids=0; ids<arguments.length; ids++){
var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
for (var i=0; i<menuitems.length; i++){
if (menuitems[i].getAttribute("rel")){
var relvalue=menuitems[i].getAttribute("rel")
menuitems[i].onmouseover=function(e){
var event=typeof e!="undefined"? e : window.event
cssdropdown.dropit(this,event,this.getAttribute("rel"))
}
}
}
}
if (window.createPopup && !window.XmlHttpRequest){ //if IE5.5 to IE6, create iframe for iframe shim technique
document.write('<IFRAME id="iframeshim"  src="" style="display: none; left: 0; top: 0; z-index: 90; position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)" frameBorder="0" scrolling="no"></IFRAME>')
this.shimobject=document.getElementById("iframeshim") //reference iframe object
}
}

}


/* SHOW/HIDE MENU SCRIPT */

var visibleTab;

function quickshow(id) {document.getElementById(id).style.display = "";}
function quickhide(id) {document.getElementById(id).style.display = "none";}
function show(id) {Effect.Appear(id);}
function hide(id) {quickhide(id);}
function setDisplay(id, style) {document.getElementById(id).style.display = style;}


function showContent(switchTo) {
	
	if (switchTo==visibleTab) {return;}
	quickshow(switchTo);
	quickhide(visibleTab);
	visibleTab = switchTo;
	}