﻿// JScript File

nervline = function(){
    this.phrases = new Array();
    this.properties = new Object();
    this.properties.timeout = 6000;
    
    
    //add phrases
    this.addPhrase("Searching two terms and then adding a related term from the left hand column yields better results");
	this.addPhrase("The [D] indicates that the related term is a Disease entity and is shown before other terms");
	this.addPhrase("Clicking the plus sign by a citation expands it, clicking the citation opens it on a new page");
	this.addPhrase("Clicking on the Google or Pubmed results opens that search");
	this.addPhrase("If too many results are found, filter them by clicking a term from the \“Related Terms\”");
	this.addPhrase("Because our searches cross reference results they take a few seconds longer…");
	this.addPhrase("\“Related Terms\” can be helpful for differential diagnosis");
	this.addPhrase("Our database is tagged by physicians practicing in Neurology");
	
	this.properties.phraseSpot = Math.floor(Math.random()*(this.phrases.length-1));
    
}
nervline.prototype.addPhrase = function(phrase){
    this.phrases.push(phrase);
}
nervline.prototype.playPhrases = function(container){
	 if(this.properties.phraseSpot>=(this.phrases.length-1))
		this.properties.phraseSpot=0;
	 else
		this.properties.phraseSpot++;
	 
    document.getElementById(container).innerHTML = "<span class=\"loaderTitle\">Search Tips</span><BR>"+this.phrases[this.properties.phraseSpot];
    setTimeout("NERVLINE.playPhrases('" + container + "')", this.properties.timeout);
}
nervline.prototype.remoteResults = function(qry){
/*
   jax = new Jax("");
   jax.GETRequest("remote_results.aspx?qry="+qry);
   document.getElementById('ctl00_ContentPlaceHolder1_RemoteResults1_lbl_RemoteResults').innerHTML = "<img src=\"loader_small.gif\"> Gathering Remote Results";
   jax.onComplete = function(txt){
      if(txt.length>0){
			//alert(txt);
         document.getElementById('ctl00_ContentPlaceHolder1_RemoteResults1_lbl_RemoteResults').innerHTML = txt;
         }
      else{
			if(document.getElementById('ctl00_ContentPlaceHolder1_RemoteResults1_lbl_RemoteResults').innerHTML.length<1)
				document.getElementById('ctl00_ContentPlaceHolder1_RemoteResults1_lbl_RemoteResults').innerHTML = "No Remote Results";
         }
    //document.getElementById('ctl00_ContentPlaceHolder1_RemoteResults1_lbl_RemoteResults').style.display = 'none';
   }*/
}
nervline.prototype.displayShield = function(div){
   div.style.display = 'block';
   div.style.width = document.body.clientWidth + 'px';
   div.style.height = document.body.clientHeight + 'px';
}