/* 

Script: Configuration.js
	This is the main configuration file for javascript apps on PrFEcT.

*/
HOST = location.host+"/";
TOMCAT_HOST = location.host+"/jsp";
var config = {

	multisite: { 
		url: {
			ASAP:             "https://asap.ahabs.wisc.edu/asap/query_features.php?LocationID=WIS&GenomeID=MG1655&SequenceVersionID=42&ExpSetID=&submit_external_qfSubmit=submit&rnrowsPerPage=100&keyword=",
			coliBASE:         "http://xbase.bham.ac.uk/colibase/search.pl?search=",
  			CyberCell:	  "http://redpoll.pharmacy.ualberta.ca/CCDB/cgi-bin/webglimpse.cgi?id=6&errors=0&maxfiles=200&maxlines=200&cache=yes&query=",
			EchoBASE:         "http://www.york.ac.uk/res/thomas/Query_result.cfm?select=gene&Keywordz=",
			EcoCyc:           "http://biocyc.org/ECOLI/substring-search?type=NIL&object=",
			EcoGene:          "http://ecogene.org/ecoSearchProcess.php?searchType=gene&name=",
			EcoliGenomes:     "http://genexpdb.ou.edu/ecoligenomes/index.php?query=",
			EcoliHub2:	  "http://www.ecolihub.org/AjaxSearch.jsp?searchString=",
			EcoliProteins:     "http://dragon.bio.purdue.edu/ecolpredict2/localsearch/cgi-bin/search3.cgi?sub=keywordSearch&q=",
			EcoliWiki:  	  "http://ecoliwiki.net/colipedia/index.php/Special:Search?search=",
			GenExpDB:         "http://genexpdb.ou.edu/index.php?query=",
			GenoBase:         "http://sal.cs.purdue.edu:8097/GB7/search/keyword_search.jsp?skind=key&fword=",
			GenProtEC:        "http://genprotec.mbl.edu/result.php?search_field=All+Fields&field_value=",
			GIRC:             "http://genome.bio.titech.ac.jp/cgi-bin/o157/search.pl?table=o157&keyword=",
			"JCVI CMR":    	  "http://cmr.jcvi.org/cgi-bin/CMR/shared/AnnotationSearch.cgi?search_type=&match_type=&search_string=",
			"KEGG Genes":	          "http://www.genome.jp/dbget-bin/www_bfind_sub?mode=bfind&max_hit=1000&dbkey=kegg&keywords=",
			Microbes:         "http://www.microbesonline.org/cgi-bin/keywordSearch.cgi?type=0&mapId=01100&term=1&locus=0&hit=0&disp=0&homolog=0&format=1&favorites=&byFavorites=1&taxTyping=Type+the+first+few+letters&taxId=224308&taxId=264462&taxId=-12&taxId=177439&taxId=207559&taxId=391774&taxId=882&taxId=891&taxId=83333&taxId=269799&taxId=243231&taxId=211586&keyword=", 
			MRC:              "http://www.mrc-lmb.cam.ac.uk/genomes/cgi/ec_tf/get-simple-domarch.pl?query=",
			NCBI:             "http://www.ncbi.nlm.nih.gov/sites/gquery?term=",
			"NCBI COGs":      "http://www.ncbi.nlm.nih.gov/COG/grace/wiew.cgi?txt=",
			Orthology:	  "http://sal.cs.purdue.edu:8180/multisite/orthology_search.php?txt=",
			"Pathway Commons": "http://www.pathwaycommons.org/pc/webservice.do?version=3.0&snapshot_id=GLOBAL_FILTER_SETTINGS&record_type=PATHWAY&format=html&cmd=get_by_keyword&q=",
			Patric:	  "http://patricbrc.org/portal/portal/patric/Taxon?cType=taxon&cId=561&query=",
			Pec:              "http://www.shigen.nig.ac.jp/ecoli/pec/quickSearchAction.do?action=all&inputSearchWord=",
                        PMTG:            "http://www1.pasteur.fr/cgi-bin/pmtg/gene.pl?Gene=",
			RegulonDB:        "http://regulondb.cs.purdue.edu/SearchListController?object_form=GN&key_id_org=ECK12&Submit=Go&object_id=",
			String:		  "http://string-db.org/newstring_cgi/show_network_section.pl?UserId=PYrU3NeXMX_h&sessionId=UIP42pa7TjZP&flash=10&identifier=",
			Uniprot: 	  "http://www.uniprot.org/uniprot/?sort=score&query="
		},
		defaultSites: 41979310
	},
	
	workbench: {
		logos: {
			'BioCyc.org':             'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_ecocyc.gif',
			'ecoli.aist-nara.ac.jp':  'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_genobase.gif',
			'regulondb.ccg.unam.mx':  'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_regulondb.gif',
			'genexpdb.ou.edu':        'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_oubcf.gif',
			'ecoliwiki.net':          'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_ecoliwiki.gif',
			'ecogene.org':            'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_ecogene_small.png',
			'sal.cs.purdue.edu:8097': 'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_genobase.gif',
			'regulondb.cs.purdue.edu':'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_regulondb.gif',
			'www.ncbi.nlm.nih.gov':   'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_ncbi.gif',
			'dragon.bio.purdue.edu':  'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_ecolipredict.gif',
			'www.ecolicommunity.org': 'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_ecoliLit.gif',
			'www.ecolihub.org': 'http://'+TOMCAT_HOST+'/EcoliHub/images/icon_ecoliLit.gif'
		},
	
		icons: {
			gene:        'http://'+HOST+'/workbench/images/icons/gene.png',
			pattern:     'http://'+HOST+'/workbench/images/icons/pattern.png',
			search:      'http://'+HOST+'/workbench/images/icons/mag.png',
			diff:        'http://'+HOST+'/workbench/images/icons/diff.png',
			cart_temp:   'http://'+HOST+'/workbench/images/icons/cart_temp.png',
			cart_saved:  'http://'+HOST+'/workbench/images/icons/cart_saved.png',
			search_temp: 'http://'+HOST+'/workbench/images/icons/search_temp.png',
			search_saved:'http://'+HOST+'/workbench/images/icons/search_saved.png'
		},
		services: {
			keywordSearch: {
				url: 'http://'+TOMCAT_HOST+'/EcoliHub/keywordSearch.do',
				data:'output=xml&keyword=[SEARCH_TERM]'
			},
			geneDetails: {
				url: 'http://'+TOMCAT_HOST+'/EcoliHub/geneDetails.do',
				data:'output=xml&namespace=[NAMESPACE]&namespace_id=[NAMESPACE_ID]&searchtype=[multiple]'
			},
			proteinDetails: {
				url: 'http://'+TOMCAT_HOST+'/EcoliHub/proteinDetails.do',
				data:'output=xml&namespace=[NAMESPACE]&namespace_id=[NAMESPACE_ID]&searchtype=[multiple]'
			},
			rangeSearch: {
				url: 'http://'+TOMCAT_HOST+'/EcoliHub/remoteBrowser.do',
				data:'output=xml&namespace=[NAMESPACE]&namespace_id=[NAMESPACE_ID]&rangevalue=[RANGE]'
			},
			genomeBrowser: {
				url: 'http://'+TOMCAT_HOST+'/EcoliHub/remoteBrowser.do',
				data:'namespace=[NAMESPACE]&namespace_id=[NAMESPACE_ID]&rangevalue=[RANGE]&displayMode=genome_browser'
			},
			whatsNewInDetails: {
				url: 'http://'+TOMCAT_HOST+'/WorkflowRest/WhatsNewGeneDetails',
				data:'database=[DATABASE]&namespace=[NAMESPACE]&namespace_id=[NAMESPACE_ID]&logged_date=[2006-01-01]&username=[Guest]&user_ip=[255.255.255.255]'
			},
			whatsNewInIds: {
				url: 'http://'+TOMCAT_HOST+'/WorkflowRest/WhatsNewGeneIDs',
				data:'database=[DATABASE]&namespace=[NAMESPACE]&logged_date=[2006-01-01]&username=[Guest]&user_ip=[255.255.255.255]'
			},
			whatsDiffInDetails: {
				url: 'http://'+TOMCAT_HOST+'/WorkflowRest/WhatsDifferentGeneDetails',
				data:'database1=[DATABASE1]&namespace1=[NAMESPACE1]&namespace_id1=[NAMESPACE_ID1]&database2=[DATABASE2]&namespace2=[NAMESPACE2]&namespace_id2=[NAMESPACE_ID2]'
			},
			whatsDiffInIds: {
				url: 'http://'+TOMCAT_HOST+'/WorkflowRest/WhatsDifferentGeneIDs',
				data:'database1=[DATABASE1]&namespace1=[NAMESPACE1]&database2=[DATABASE2]&namespace2=[NAMESPACE2]'
			}
				
		}
	}
}
	
window.addEvent( 'domready', function( ){
	if ( window.Hash && Hash.Storage )
		window.settings = new Hash.Storage( 'settings' );
});

function remName(a, b){ if(a.value==b){ a.value=''; }else if(a.value==''){ a.value=b; }else{ a.value=a.value; } }   
function chkName(a, b){ if(a.value==''){ a.value=b; }else{ a.value=a.value; } }
