var publist = new Array(); var publink = new Array(); var pubfile = new Array();
publist[publist.length] = 'Jing-Dong Han and Charles S. Rubin*. Regulation of Cytoskeleton Organization and Paxillin Dephosphorylation by cAMP: STUDIES ON MURINE Y1 ADRENAL CELLS. <b><i>Journal of Biological Chemistry</i></b>, 1996, 271:29211-29215';
publink[publink.length] = '';
pubfile[pubfile.length] = '';
publist[publist.length] = 'Jing-Dong Han, Nicholas E. Baker and Charles S. Rubin*. Molecular Characterization of a Novel A Kinase Anchor Protein from Drosophila melanogaster. <b><i>Journal of Biological Chemistry</i></b>, 1997, 272:26611-26619';
publink[publink.length] = '';
pubfile[pubfile.length] = '';
publist[publist.length] = 'Zhao X., Han J-D.(Co-First Author), Ning Y., Meng A. and Chen Y.G. Bioinformatics analysis of putative gene products encoded in SARS-HCoV genome. <b><i>Tsinghua Science and Technology</i></b>, 2003, 8:389-394';
publink[publink.length] = '';
pubfile[pubfile.length] = '';
publist[publist.length] = 'Siming Li, Christopher M. Armstrong, Nicolas Bertin, Hui Ge, Stuart Milstein, Mike Boxem, Pierre-Olivier Vidal ain, Jing-Dong J. Han ( Co-First Author ), Alban Chesneau, Tong Hao, Debra S. Goldberg, Ning Li, Monica Martinez, Jean-Fran?ois Rual, Philippe Lamesch, Lai Xu, Muneesh Tewari, Sharyl L. Wong, Lan V. Zhang, Gabriel F. Berriz, Laurent Jacotot, Philippe Vaglio, Jerome Reboul, Tomoko Hirozane-Kishikawa, Qianru Li, Harrison W. Gabel, Ahmed Elewa, Bridget Baumgartner, Debra J. Rose, Haiyuan Yu, Stephanie Bosak, Reynaldo Sequerra, Andrew Fraser, Susan E. Mango, William M. Saxton, Susan Strome, Sander van den Heuvel, Fabio Piano, Jean Vandenhaute, Claude Sardet, Mark Gerstein, Lynn Doucette-Stamm, Kristin C. Gunsalus, J. Wade Harper, Michael E. Cusick, Frederick P. Roth, David E. Hill and Marc Vidal*. A Map of the Interactome Network of the Metazoan C. elegans. <b><i>Science</i></b>, January 2004, 303:540-543';
publink[publink.length] = 'http://www.sciencemag.org/cgi/content/full/303/5657/540';
pubfile[pubfile.length] = 'SimingLi.Science.04.pdf';
publist[publist.length] = 'Haiyuan Yu, Nicholas M. Luscombe, Hao Xin Lu, Xiaowei Zhu, Yu Xia, Jing-Dong J. Han, Nicolas Bertin, Sambath Chung, Marc Vidal and Mark Gerstein*. Annotation Transfer Between Genomes: Protein-Protein Interologs and Protein-DNA Regulogs. <b><i>Genome Research</i></b>, March 2004, 14:1107-1118.';
publink[publink.length] = 'http://www.genome.org/cgi/content/full/14/6/1107';
pubfile[pubfile.length] = 'HaiyuanYu.GR.04.pdf';
publist[publist.length] = 'Jing-Dong J. Han, Nicolas Bertin, Tong Hao, Debra S. Goldberg, Gabriel F. Berriz, Lan V. Zhang, Denis Dupuy, Albertha J. M. Walhout, Michael E. Cusick, Frederick P. Roth  &  Marc Vidal*. Evidence for dynamically organized modularity in the yeast protein-protein interaction network. <b><i>Nature</i></b>, July 2004, 430(6995):88-93.';
publink[publink.length] = 'http://www.nature.com/nature/journal/v430/n6995/abs/nature02555.html';
pubfile[pubfile.length] = 'jdhan.nature.04.pdf';
publist[publist.length] = 'Jing-Dong J Han^, Denis Dupuy^, Nicolas Bertin, Michael E Cusick & Marc Vidal. Effect of sampling on topology predictions of protein-protein interaction networks. <b><i>Nature Biotechnology</i></b>, July 2005, 23: 839-844.';
publink[publink.length] = 'http://www.nature.com/nbt/journal/v23/n7/abs/nbt1116.html';
pubfile[pubfile.length] = 'jdhan.nbt.05.pdf';
publist[publist.length] = 'Kristin C. Gunsalus, Hui Ge, Aaron J. Schetter, Debra S. Goldberg, Jing-Dong J. Han, Tong Hao, Gabriel F. Berriz, Nicolas Bertin, Jerry Huang, Ling-Shiang Chuang, Ning Li, Ramamurthy Mani, Anthony A. Hyman, Birte Sonnichsen, Christophe J. Echeverri, Frederick P. Roth, Marc Vidal and Fabio Piano. Predictive models of molecular machines involved in Caenorhabditis elegans early embryogenesis. <b><i>Nature</i></b>, August 2005, 436:861-865.';
publink[publink.length] = 'http://www.nature.com/nature/journal/v436/n7052/full/nature03876.html';
pubfile[pubfile.length] = 'Gunsalus.nature.05.pdf';
publist[publist.length] = 'Xiaoping Wu^, Jing Ma^, Jing-Dong Han, Nanping Wang and Ye-Guang Chen*. Distinct regulation of gene expression in human endothelial cells by TGF-beta and its receptors. <b><i>Microvascular Research</i></b>, January 2006, 12-19.'
publink[publink.length] = ''
pubfile[pubfile.length] = 'XpWu.MVR.06.pdf';
publist[publist.length] = 'Denis Dupuy, Nicolas Bertin, Michael E. Cusick, Jing-Dong J. Han & Marc Vidal. Reply to Toward the complete interactome. <b><i>Nature Biotechnology</i></b>, June 2006, 24:614-615 ';
publink[publink.length] = 'http://www.nature.com/nbt/journal/v24/n6/full/nbt0606-615a.html';
pubfile[pubfile.length] = '';
publist[publist.length] = 'Jing Ma, Qiang Wang, Teng Fei, Jing-Dong Jackie Han and Ye-Guang Chen. MCP-1 mediates TGF-beta-induced angiogenesis by stimulating vascular smooth muscle cell migration. <b><i>Blood</i></b>, October 2006, 109: 987-994.';
publink[publink.length] = 'http://bloodjournal.hematologylibrary.org/cgi/content/full/109/3/987';
pubfile[pubfile.length] = 'JingMa.Blood.07.pdf';
publist[publist.length] = 'Kai Xia^, Dong Dong^ and Jing-Dong J Han*. IntNetDB v1.0: An integrated protein-protein interaction network database generated by a probabilistic model. <b><i>BMC Bioinformatics</i></b>, November 2006, 18; 7:508.';
publink[publink.length] = 'http://www.biomedcentral.com/1471-2105/7/508';
pubfile[pubfile.length] = 'KaiXia.BMC.06.pdf';
publist[publist.length] = 'Kai Xia^, Huiling Xue^, Dong Dong^, Shanshan Zhu^, Jiamu Wang, Qingpeng Zhang, Lei Hou, Hua Chen, Ran Tao, Zheng Huang, Zheng Fu, Ye-Guang Chen, Jing-Dong J. Han*. Identification of the Proliferation/Differentiation Switch in the Cellular Network of Multicellular Organisms. <b><i>PLoS Computational Biology</i></b>, November 2006 2(11):e145.';
publink[publink.length] = 'http://compbiol.plosjournals.org/perlserv/?request=get-document&doi=10.1371/journal.pcbi.0020145';
pubfile[pubfile.length] = 'KaiXia.PLoS.06.pdf';
publist[publist.length] = 'Nicolas Bertin^, Nicolas Simonis^, Denis Dupuy^, Michael E. Cusick, Jing-Dong J. Han, Hunter B. Fraser*, Frederick P. Roth*, Marc Vidal*. Confirmation of organized modularity in the yeast interactome. <b><i>PLoS Biology</i></b>, June 2007, 5(6):e153.';
publink[publink.length] = 'http://biology.plosjournals.org/perlserv/?request=get-document&doi=10.1371/journal.pbio.0050153';
pubfile[pubfile.length] = 'Bertin.PLoS.07.pdf';
publist[publist.length] = 'Dong Dong, Bing Zhou and Jing-Dong J. Han*. Comparing the biological coherence of network clusters identified by different detection algorithms. <b><i>Chinese Science Bulletin</i></b>, October 2007, 52(21), 2938-44.';
publink[publink.length] = 'http://www.springerlink.com/content/l27242k412327666/?p=4d3f1602e3b4447685a33aaf481a8b35&pi=0';
pubfile[pubfile.length] = 'DongDong.CSB.07.pdf';
publist[publist.length] = 'Pujana MA, Han JD (Co-first Author), Starita LM, Stevens KN, Tewari M, Ahn JS, Rennert G, Moreno V, Kirchhoff T, Assmann V, ElShamy WM, Rual JF, Rozek LS, Gelman RS, Gunsalus KC, Greenberg RA, Sobhian B, Bertin N, Venkatesan K, Ayivi-Guedehoussou N, Lazaro C, Nathanson KL, Weber BL, Cusick ME, Hill DE, Livingston DM, Offit K, Gruber SB, Parvin JD & Vidal M. Network modeling links breast cancer susceptibility and centrosome dysfunction. <b><i>Nature Genetics</i></b>, October 2007, 39: 1338-49.';
publink[publink.length] = 'http://www.nature.com/ng/journal/v39/n11/abs/ng.2007.2.html';
pubfile[pubfile.length] = 'Pujana.ng.07.pdf';
publist[publist.length] = 'Huiling Xue^, Bo Xian^, Dong Dong, Kai Xia, Shanshan Zhu, Zhongnan Zhang, Lei Hou, Qingpeng Zhang, Yi Zhang & Jing-Dong J Han*. A modular network model of aging. <b><i>Molecular Systems Biology</i></b>, December 2007, 3:147.';
publink[publink.length] = 'http://www.nature.com/msb/journal/v3/n1/full/msb4100189.html';
pubfile[pubfile.length] = 'HuilingXue.MSB.07.pdf';
publist[publist.length] = 'Jing-Dong Jackie Han*. Understanding biological functions through molecular networks. <b><i>Cell Research</i></b>, January 2008, 18:224-237.';
publink[publink.length] = 'http://www.nature.com/cr/journal/v18/n2/abs/cr200816a.html';
pubfile[pubfile.length] = 'jdhan.CR.08.pdf';
publist[publist.length] = 'Qiang Wang, Zheng Huang, Huiling Xue, Chengcheng Jin, Xiu-Li Ju, Jing-Dong J. Han, and Ye-Guang Chen*. MicroRNA miR-24 inhibits erythropoiesis by targeting activin type I receptor ALK4. <b><i>Blood</i></b>, January 2008, 111:588-595.';
publink[publink.length] = 'http://bloodjournal.hematologylibrary.org/cgi/content/abstract/111/2/588';
pubfile[pubfile.length] = 'QiangWang.Blood.07.pdf';
publist[publist.length] = 'Qian-Ru Li^, Anne-Ruxandra Carvunis^, Haiyuan Yu^, Jing-Dong J. Han^, Quan Zhong, Nicolas Simonis, Stanley Tam, Tong Hao, Niels J. Klitgord, Denis Dupuy, Danny Mou, Ilan Wapinski, Aviv Regev, David E Hill, Michael E. Cusick, and Marc Vidal*. Revisiting the <i>Saccharomyces cerevisiae</i> predicted ORFeome. <b><i>Genome Research</i></b>, May 2008 18(8):1294.';
publink[publink.length] = 'http://genome.cshlp.org/cgi/content/full/18/8/1294';
pubfile[pubfile.length] = 'QianruLi.GR.08.pdf';
publist[publist.length] = 'Hong Yu^, Shanshan Zhu^, Bing Zhou^, Huiling Xue, and Jing-Dong Jackie Han*. Inferring causal relationships among different histone modifications and gene expression. <b><i>Genome Research</i></b>, June 2008, 18(8):1314.';
publink[publink.length] = 'http://genome.cshlp.org/cgi/content/full/18/8/1314';
pubfile[pubfile.length] = 'HongYu.GR.08.pdf';
publist[publist.length] = 'Kai Xia^, Zheng Fu^, Lei Hou, and Jing-Dong Jackie Han*. Impacts of protein-protein interaction domains on organism and network complexity. <b><i>Genome Research</i></b>, August 2008, 18:1500-1508.';
publink[publink.length] = 'http://genome.cshlp.org/content/18/9/1500.full';
pubfile[pubfile.length] = 'KaiXia.GR.08.pdf';
publist[publist.length] = 'Jing-Dong J. Han*, Yi Liu^, Huiling Xue^, Kai Xia^, Hong Yu^, Shanshan Zhu^, Zhang Chen, Wei Zhang, Chunyu Jin, Bo Xian, Jing Li, Lei Hou, Yixing Han, Chaoqun Niu, Timothy C. Alcon. Developmental systems biology flourishing on new technologies. <b><i>Journal of Genetics and Genomics</i></b>, September 2008, 35:577-584.';
publink[publink.length] = 'http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B8H15-4TPNR3J-1&_user=6211566&_coverDate=10%2F31%2F2008&_rdoc=1&_fmt=high&_orig=browse&_srch=doc-info(%23toc%2342513%232008%23999649989%23699937%23FLP%23display%23Volume)&_cdi=42513&_sort=d&_docanchor=&_ct=7&_version=1&_urlVersion=0&_userid=6211566&md5=ccd2e2b45be468067c0322086d5fd2be';
pubfile[pubfile.length] = 'JGG_MeetingReport.pdf';
publist[publist.length] = 'Zhigang Li^, Wei Zhang^, Minyuan Wu, Shanshan Zhu, Chao Gao, Lin Sun, Ruidong Zhang, Nan Qiao, Huiling Xue, Yamei Hu, Shilai Bao*, Huyong Zheng*, and Jing-Dong J. Han*. Expression-based classification and regulatory networks of pediatric acute lymphoblastic leukemia. <b><i>Blood</i></b>, November 2009, 114(20):4486-4493.';
publink[publink.length] = 'http://bloodjournal.hematologylibrary.org/cgi/content/abstract/blood-2009-04-218123v1';
pubfile[pubfile.length] = 'ZhigangLi.Blood.09.pdf';
publist[publist.length] = 'Teng Fei^, Kai Xia^, Zhongwei Li`, Bing Zhou`, Shanshan Zhu`, Hua Chen, Jianping Zhang, Zhang Chen, Huasheng Xiao, Jing-Dong J. Han* and Ye-Guang Chen*. Genome-wide mapping of SMAD target genes reveals the role of BMP signaling in embryonic stem cell fate determination. <b><i>Genome Research</i></b>, January 2010, 20:36-44.';
publink[publink.length] = 'http://www.genome.org/cgi/doi/10.1101/gr.092114.109';
pubfile[pubfile.length] = 'TengFei.GR.10.pdf';


//======================= Constant Parameters =================================
var defAuthors = ['Han JD','Han J.-D. J','Han J.-D.','Jing-Dong J. Han','Jing-Dong Han','Han J-D','Han J-D J','Jing-Dong J Han','Jing-Dong Jackie Han'];
var pubSelection = [4,6,7,8,16];
var pubNews = [publist.length-2,publist.length-1,publist.length];

//================== Functions about the Publist Data==========================
function getFormatPublist(pubs,pubk,pubf,odr){
	//var outlist = '<ol>';
	var order = 'DESC';
	if(odr != undefined && odr == 'asc')
		order = 'ASC';
	
	var outlist = '';
	var purl = '/paper/';
	for(var i=pubs.length-1;i>-1;i--){
//		var tid = 'xxxxx'+(i+1) + '. ';
		var tid = 'xxxxx'+(pubs.length-i) + '. ';
		tid = tid.substr(tid.length-4);
		tid = tid.replace(/x/g,'&nbsp;&nbsp;');
		var imglink = pubk[i];
		if(imglink != ''){
			imglink = '<a href="' + imglink + '"><img src="css/img/file.png"/></a>';
		}		
		var pdflink = pubf[i];
		if(pdflink != ''){
			pdflink = '<a href="' + purl + pdflink + '"><img src="css/img/pdf.gif"/></a>';
		}	
		
		outlist += '<li>' + tid + pubs[i] + ' ' + imglink + ' ' + pdflink + '</li>';
				
	}	
	//outlist += '</ol>';
	return outlist;
}

function getPubByAuthAndDate(authors,dates,datee){
	if(dates == undefined)
		dates = 1996;
	if(datee == undefined)
		datee = new Date().getYear()+1900;
	//alert(dates + " to "+ datee);
	
	var pubs = new Array();
	var pubk = new Array();
	var pubf = new Array();
	
	for(var i=0; i<publist.length; i++){
		for(var k=0; k< authors.length; k++){
			var regdate = /,\s+\w*\s*(\d{4})[^-]/;
			var regauth = new RegExp(authors[k]);
			var curDateStr = regdate.exec(publist[i]);
			
			var curYear = new Date().getYear()+1900;
			var ispass = false;
			if(!curDateStr){
				if(datee == curYear)
					ispass = true;
			} else if(curDateStr[1]*1 >= dates && curDateStr[1]*1 <= datee){
				ispass = true;
			};
				
			if(ispass && publist[i].search(regauth) > -1){
				pubs[pubs.length] = publist[i].replace(regauth, authors[k].bold());
				pubk[pubk.length] = publink[i];
				pubf[pubf.length] = pubfile[i];
				break;
			}
		}
	}
	var pubret = new Array();
	pubret['pubs'] = pubs;
	pubret['pubk'] = pubk;
	pubret['pubf'] = pubf;
	return pubret;
}

function getPub(authors, dates, datee){
	var pubret = getPubByAuthAndDate(authors, dates, datee);
	var outlist = getFormatPublist(pubret['pubs'], pubret['pubk'], pubret['pubf']);
	document.writeln(outlist);
}

function getPubDef(ds, de){	
	getPub(defAuthors, ds, de);
}

function getPubSet(pubset){
	var authors = defAuthors;	
	var pubs = new Array();
	var pubk = new Array();
	var pubf = new Array();
	for(var i=0; i<pubset.length; i++){
		for(var k=0; k< authors.length; k++){
			var regauth = new RegExp(authors[k]);
			var curlist = publist[pubset[i]-1];
			var curlink = publink[pubset[i]-1];
			var curfile = pubfile[pubset[i]-1];
			if(curlist.search(regauth) > -1){
				pubs[pubs.length] = curlist.replace(regauth, authors[k].bold());
				pubk[pubk.length] = curlink;
				pubf[pubf.length] = curfile;
				break;
			}
		}
	}
	
	var pubret = new Array();
	pubret['pubs'] = pubs;
	pubret['pubk'] = pubk;
	pubret['pubf'] = pubf;
	return pubret;
}

function getPubSel(){
	return getPubSet(pubSelection);
}

function getPubNews(){
	return getPubSet(pubNews);
}

function getPubNewsLi(){
	var pubret = getPubNews();
	var outlist = getFormatPublist(pubret['pubs'], pubret['pubk'], pubret['pubf']);
	document.writeln(outlist);
}

//====================== Functions about display control=======================
function refreshPublist(pubtype,node,auths,ds,de){
	var pubret;
	if(pubtype == 'sel'){
		pubret = getPubSel();
	}else{
		pubret = getPubByAuthAndDate(auths, ds, de);
	}
	
	var outlist = getFormatPublist(pubret['pubs'], pubret['pubk'], pubret['pubf']);
	node.innerHTML = outlist;
}

function refreshPubFlag(flag){
	var pubFlag = document.getElementById('pubFlag');
	var pubNav = document.getElementById('sidebar');
	pubFlag.value = flag;
	pubNav.innerHTML = getPubNavHtml();
}

function refreshPublistDef(ds,de){
	var node = document.getElementById('publist');	
	refreshPublist('def',node,defAuthors,ds,de);
}

function refreshPublistSel(){
	var node = document.getElementById('publist');	
	refreshPublist('sel',node,defAuthors);
}

function getPublistByView(view){
	var vid = view.substr(0,3);
	var vdt = view.substr(3);
	switch(vid){
		case 'sin':
			return 'refreshPublistDef(' + vdt + ')';
		case 'sel':
			return 'refreshPublistSel()';
		default:
			return 'refreshPublistDef()';
	}
}

function getPubNavHtml(){
	var curView='all';
	var pubFlag = document.getElementById('pubFlag');
	if(pubFlag != undefined){
		curView = pubFlag.value;
	}
	//alert(curView);
	//return;
	
	// navigation data
	var navlist = new Array();
		navlist['selected collection'] = new Array();
			navlist['selected collection']['sel'] = 'Selected Collection';
			
		navlist['list by date'] = new Array();
		//simply add list below, need not change anything.
			navlist['list by date']['sin2009'] = 'Since 2009';
			navlist['list by date']['sin2008'] = 'Since 2008';
			navlist['list by date']['sin2007'] = 'Since 2007';
			navlist['list by date']['sin2006'] = 'Since 2006';
//			navlist['list by date']['sin2005'] = 'Since 2005';
//			navlist['list by date']['sin2000'] = 'Since 2000';
			
		navlist['browsing list'] = new Array();
			navlist['browsing list']['all'] = 'List of all';


		var navli = '';
		for(var i in navlist){
			navli += '<li id="title"><span>' + i + '</span></li>';
			for(var k in navlist[i]){
				var flag = ' ';
				if(curView == k){
					flag = ' id="current"';
				}
				navli += '<li' + flag + '><a href="javascript:'+ getPublistByView(k) + ';refreshPubFlag(\''+ k +'\')"><span>' + navlist[i][k] + '</span></a></li>';
			}
			navli += '<li id="span"></li>';
		}

		
	var subnav = ''; //'<div id="sidebar">';
	subnav += '<div id="sidebox"><img src="img/publications.gif" width="96%"/></div>';
	
	subnav += '<ul class="sidemenu">';
	subnav += navli;
	subnav += '</ul>';
	//subnav += '</div>';
	
	return subnav;
}

function getPubNav(){
	var pubnav = getPubNavHtml();
	document.writeln(pubnav);
}
