';
-
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(0,items[i][j].indexOf('/'));}
- else if (((i>0) && (j == 0)) || ((i == 0) && (j > 0))){
- html += items[i][j].slice(0, items[i][j].indexOf('/'));
- }
-
- else {
- html += "Correlation";}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- html += '
';
-
- html += '
';
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(items[i][j].indexOf('/')+1, items[i][j].length);}
- else if (((i>0) && (j == 0)) || ((i == 0) && (j > 0))){
- html += items[i][j].slice(0, items[i][j].indexOf('/'));}
- else {
- html += 'P Value';}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- newWindow.document.write(html);
- newWindow.document.close();
- newWindow.focus();/**/
-}
-
-/*Export Tissue Text for long label*/
-function exportTissueVerboseText(items){
- var windowName = 'ExportVerboseText';
- var newWindow = open("", windowName,"width=900,menubar=0,toolbar=1,resizable=1,status=1,scrollbars=1");
- var html = '
';
-
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(0,items[i][j].indexOf('/'));}
- else if ((i>0) && (j == 0)){
- position1 = items[i][j].indexOf('/') + 1;
- position2 = items[i][j].indexOf('/', position1);
- html += items[i][j].slice(position2 + 1, items[i][j].length);}
- else if ((i == 0) && (j>0)){
- html += items[i][j].slice(0, items[i][j].indexOf('/')) ;}
- else {
- html += "Correlation";}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- html += '
';
-
- html += '
';
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(items[i][j].indexOf('/')+1, items[i][j].length);}
- else if ((i>0) && (j == 0)){
- position1 = items[i][j].indexOf('/') + 1;
- position2 = items[i][j].indexOf('/', position1) + 1;
- html += items[i][j].slice(position2, items[i][j].length);}
- else if ((i == 0) && (j>0)){
- html += items[i][j].slice(0, items[i][j].indexOf('/'));}
- else {
- html += 'P Value';}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- newWindow.document.write(html);
- newWindow.document.close();
- newWindow.focus();/**/
-}
-
-/*For Tissue Correlation Page; Default Save function for results of symbol count =1*/
-function exportAllTissueText(items){
- var windowName = 'ExportTissueText';
- var newWindow = open("", windowName,"width=900,menubar=0,toolbar=1,resizable=1,status=1,scrollbars=1");
- var html = '
';
-
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(0,items[i][j].indexOf('/'));}
- else if (((i>0) && (j == 0)) || ((i == 0) && (j > 0))){
- html += items[i][j].slice(0, items[i][j].indexOf('/'));
- }
-
- else {
- html += "Correlation";}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- newWindow.document.write(html);
- newWindow.document.close();
- newWindow.focus();/**/
-}
-
-/* Display Short Label for Tissue */
-function displayTissueShortName(){
- var geneSymbols = document.getElementsByName("Symbol");
-
- var exportButton = document.getElementsByName("export")[0];
- var shortNameCheck = document.getElementById("shortName_1"); // to check if currently short
-
- if (shortNameCheck.style.display == 'none'){
- exportButton.value="Export";
- exportButton.onclick = function(){exportTissueText(allCorrelations);};
- }
- else {
- exportButton.value="Export";
- exportButton.onclick = function(){exportTissueText(allCorrelations);};
- }
-
- for (i=0; i < geneSymbols.length; i++){
- var shortName = document.getElementById("shortName_" + String(i));
- var verboseName = document.getElementById("verboseName_" + String(i));
- var verboseName2 = document.getElementById("verboseName2_" + String(i));
- var verboseName3 = document.getElementById("verboseName3_" + String(i));
-
-
- if (shortName.style.display == 'block') {
- shortName.style.display = 'none';
- }
-
- else if (shortName.style.display == 'none') {
- if (verboseName.style.display == 'block'){
- verboseName.style.display = 'none';
- verboseName2.style.display = 'none';
- verboseName3.style.display = 'none';
- }
- shortName.style.display = 'block';
- }
- }
-}
-
-/* Display Long Label for Tissue */
-function displayTissueVerboseName(){
- var geneSymbols = document.getElementsByName("Symbol");
-
- var exportButton = document.getElementsByName("export")[0];
- var verboseNameCheck = document.getElementById("verboseName_0"); // to check if currently verbose
-
- if (verboseNameCheck.style.display == 'none'){
- exportButton.value="Export";
- exportButton.onclick = function(){exportTissueVerboseText(allCorrelations);};
- }
- else {
- exportButton.value="Export";
- exportButton.onclick = function(){exportTissueText(allCorrelations);};
- }
-
- for (i=0; i < geneSymbols.length; i++){
- var verboseName = document.getElementById("verboseName_" + String(i));
- var verboseName2 = document.getElementById("verboseName2_" + String(i));
- var verboseName3 = document.getElementById("verboseName3_" + String(i));
- var shortName = document.getElementById("shortName_" + String(i));
-
-
- if (verboseName.style.display == 'block') {
- verboseName.style.display = 'none';
- verboseName2.style.display = 'none';
- verboseName3.style.display = 'none';
- }
-
- else if (verboseName.style.display == 'none'){
- if (shortName.style.display == 'block'){
- shortName.style.display = 'none';
- }
- verboseName.style.display = 'block';
- verboseName2.style.display = 'block';
- verboseName3.style.display = 'block';
- }
- }
-
-}
-
-/* Info page for dataset of tissue correlation */
-function tissueDatasetInfo(thisForm,dataSetNames){
- var windowName = 'dataset_info';
- var Index = thisForm.selectedIndex;
- var datasetName =dataSetNames[Index]
- var page = '/dbdoc/' + datasetName + '.html';
- newWindow = open(page,windowName,"menubar=1,toolbar=1,location=1,resizable=1,status=1,scrollbars=1,directories=1,width=900");
- newWindow.focus()
-}
-
-
-/*for correlation matrix page*/
-/* Display Short Label in Correlation Matrix */
-function displayShortName(){
- var traitList = document.getElementsByName("traitList")[0].value.split("\t");
- var exportButton = document.getElementsByName("export")[0];
- var shortNameCheck = document.getElementById("shortName_1"); // to check if currently short
-
- if (shortNameCheck.style.display == 'none'){
- exportButton.value="Export";
- exportButton.onclick = function(){exportAbbreviationText(allCorrelations);};
- }
- else {
- exportButton.value="Export";
- exportButton.onclick = function(){exportText(allCorrelations);};
- }
-
- for (i=0; i < traitList.length; i++){
- var shortName = document.getElementById("shortName_" + String(i));
- var verboseName = document.getElementById("verboseName_" + String(i));
- var verboseName2 = document.getElementById("verboseName2_" + String(i));
- var verboseName3 = document.getElementById("verboseName3_" + String(i));
-
-
- if (shortName.style.display == 'block') {
- shortName.style.display = 'none';
- }
-
- else if (shortName.style.display == 'none') {
- if (verboseName.style.display == 'block'){
- verboseName.style.display = 'none';
- verboseName2.style.display = 'none';
- verboseName3.style.display = 'none';
- }
- shortName.style.display = 'block';
- }
- }
-}
-
-/* Display Long Label in Correlation Matrix*/
-function displayVerboseName(){
- var traitList = document.getElementsByName("traitList")[0].value.split("\t");
- var exportButton = document.getElementsByName("export")[0];
- var verboseNameCheck = document.getElementById("verboseName_0"); // to check if currently verbose
-
- if (verboseNameCheck.style.display == 'none'){
- exportButton.value="Export";
- exportButton.onclick = function(){exportVerboseText(allCorrelations);};
- }
- else {
- exportButton.value="Export";
- exportButton.onclick = function(){exportText(allCorrelations);};
- }
-
- for (i=0; i < traitList.length; i++){
- var verboseName = document.getElementById("verboseName_" + String(i));
- var verboseName2 = document.getElementById("verboseName2_" + String(i));
- var verboseName3 = document.getElementById("verboseName3_" + String(i));
- var shortName = document.getElementById("shortName_" + String(i));
-
- if (verboseName.style.display == 'block') {
- verboseName.style.display = 'none';
- verboseName2.style.display = 'none';
- verboseName3.style.display = 'none';
- }
-
- else if (verboseName.style.display == 'none'){
- if (shortName.style.display == 'block'){
- shortName.style.display = 'none';
- }
- verboseName.style.display = 'block';
- verboseName2.style.display = 'block';
- verboseName3.style.display = 'block';
- }
- }
-
-}
-
-/*Export for long label in Correlation Matrix*/
-function exportVerboseText(items){
- var windowName = 'ExportVerboseText';
- var newWindow = open("", windowName,"width=900,menubar=0,toolbar=1,resizable=1,status=1,scrollbars=1");
- var html = '
';
-
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(0,items[i][j].indexOf('/'));}
- else if ((i>0) && (j == 0)){
- position1 = items[i][j].indexOf('/') + 1;
- position2 = items[i][j].indexOf('/', position1);
- html += "Trait " + String(i) + ": " + items[i][j].slice(position2 + 1, items[i][j].length);}
- else if ((i == 0) && (j>0)){
- html += items[i][j];}
- else {
- html += "Correlation";}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- html += '
';
-
- html += '
';
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(items[i][j].indexOf('/')+1, items[i][j].length);}
- else if ((i>0) && (j == 0)){
- position1 = items[i][j].indexOf('/') + 1;
- position2 = items[i][j].indexOf('/', position1) + 1;
- html += "Trait " + String(i) + ": " + items[i][j].slice(position2, items[i][j].length);}
- else if ((i == 0) && (j>0)){
- html += items[i][j];}
- else {
- html += 'N';}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- newWindow.document.write(html);
- newWindow.document.close();
- newWindow.focus();/**/
-}
-
-/*Default Export for labels in Correlation Matrix*/
-function exportText(items){
- var windowName = 'ExportText';
- var newWindow = open("", windowName,"width=900,menubar=0,toolbar=1,resizable=1,status=1,scrollbars=1");
- var html = '
';
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(0,items[i][j].indexOf('/'));}
- else if (((i>0) && (j == 0)) || ((i == 0) && (j > 0))){
- html += items[i][j].slice(0, items[i][j].indexOf('/'));}
- else {
- html += "Correlation";}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- html += '
';
-
- html += '
';
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(items[i][j].indexOf('/')+1, items[i][j].length);}
- else if (((i>0) && (j == 0)) || ((i == 0) && (j > 0))){
- html += items[i][j].slice(0, items[i][j].indexOf('/'));}
- else {
- html += 'N';}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- newWindow.document.write(html);
- newWindow.document.close();
- newWindow.focus();/**/
-}
-
-/*Export for short label in Correlation Matrix*/
-function exportAbbreviationText(items){
- var windowName = 'ExportAbbreviationText';
- var newWindow = open("", windowName,"width=900,menubar=0,toolbar=1,resizable=1,status=1,scrollbars=1");
- var html = '
';
-
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(0,items[i][j].indexOf('/'));}
- else if ((i>0) && (j == 0)){
- position1 = items[i][j].indexOf('/') + 1;
- position2 = items[i][j].indexOf('/', position1);
- html += "Trait " + String(i) + ": " + items[i][j].slice(position1, position2);}
- else if ((i == 0) && (j>0)){
- html += items[i][j];}
- else {
- html += "Correlation";}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- html += '
';
-
- html += '
';
- for (i=0;i0) && (j>0)){
- html += items[i][j].slice(items[i][j].indexOf('/')+1, items[i][j].length);}
- else if ((i>0) && (j == 0)){
- position1 = items[i][j].indexOf('/') + 1;
- position2 = items[i][j].indexOf('/', position1);
- html += "Trait " + String(i) + ": " + items[i][j].slice(position1, position2);}
- else if ((i == 0) && (j>0)){
- html += items[i][j];}
- else {
- html += 'N';}
- html += '\t';}
- html += '\n';}
- html += '
';
-
- newWindow.document.write(html);
- newWindow.document.close();
- newWindow.focus();/**/
-}
-
-/*dynamic change formID for process bar display issue. Only Single symbol result page needs process bar*/
-function selectFormIdForTissueCorr(fmName){
-
- var thisForm = getForm(fmName);
- var geneSymbolStr =thisForm.geneSymbols.value;
- var geneSymbolStrSplit =geneSymbolStr.split(/\n/);//delimiter is very important here
-
- len=geneSymbolStrSplit.length;
- if (len==1){
- thisForm.FormID.value="dispTissueCorrelationResult";
- }
- else{
- thisForm.FormID.value="dispMultiSymbolsResult";
- }
- thisForm.submit()
-}
-
-/*make default for dropdown menu in tissue correlation page*/
-function makeTissueCorrDefault(thisform){
- setCookie('cookieTest', 'cookieTest', 1);
- var cookieTest = getCookie('cookieTest');
- delCookie('cookieTest');
- if (cookieTest){
- var defaultTissueDataset = thisform.tissueProbeSetFeezeId.value;
- setCookie('defaultTissueDataset', defaultTissueDataset, 10);
- alert("The current dataset is set to default.");
- }
- else{
- alert("You need to enable Cookies in your browser.");
- }
-
-}
-
-/*set default selected value for tissue correlation dataset Id*/
-function getTissueCorrDefault(fmName){
- var thisForm = getForm(fmName);
- if (getCookie('defaultTissueDataset')){
- thisForm.tissueProbeSetFeezeId.selectedIndex =(getCookie('defaultTissueDataset'))-1;
- }
- else{
- thisForm.tissueProbeSetFeezeId.selectedIndex =0;
- }
-
-}
diff --git a/web/javascript/dhtml.js b/web/javascript/dhtml.js
deleted file mode 100755
index 52676ac8..00000000
--- a/web/javascript/dhtml.js
+++ /dev/null
@@ -1,319 +0,0 @@
-/**
- * These are REALLY simple serialisation tools meant for simple Hash-like
-objects in the for key=val
- */
-var PrefUtils = {
- deserialize:function(inStr){
- return eval('('+inStr+')');
- },
- serialize:function(inObj){
- var buf = '{';
- var cma = '';
- var quote = "'";
- for (i in inObj){
- if (typeof i == 'string'){
- buf += cma + quote + i + quote + " : "
- + quote +inObj[i]+ quote;
- cma = ',';
- }
- }
- buf += '}';
- return buf;
- },
- testCookie:function(){
- setCookie('cookieTest', 'cookieTest', 1);
- var cookieTest = getCookie('cookieTest');
- delCookie('cookieTest');
- if (cookieTest) return true;
- else return false;
- },
- form2Cookie:function(thisForm, cookieName){
- if (!this.testCookie()){
- alert("You need to enable Cookie in your browser!");
- }
- else{
- var pref = getCookie(cookieName);
- var options = this.deserialize(pref);
- if(!options){
- options = new Array();
- }/**/
- for( var x = 0; thisForm.elements[x]; x++ ) {
- if( thisForm.elements[x].type ) {
- var oE = thisForm.elements[x];
- var oT = oE.type.toLowerCase();
- if( oT == 'text' || oT == 'textarea' || oT == 'select-one' ) {
- options[oE.name] = oE.value;
- }
- }
- }
- setCookie(cookieName, this.serialize(options), 10);
- alert("Your preference has been saved.");
- }
- }
-};
-
-function updateInner(Id, str){
- document.getElementById(Id).innerHTML = str;
-}
-
-
-function popWindow(myId){
- if (!document.getElementById || !myId) return false;
- else{
- var div = document.getElementById(myId);
- if (!div){
- div = document.createElement("div");
- div.id = myId;
- div.style.position = "absolute";
- div.style.top = "50%";
- div.style.left = "50%";
- div.style.width = "400px";
- div.style.height = "250px";
- div.style.margin = "-125px 0 0 -200px";
- div.style.border = "4px double #3366cc";
- div.style.padding = "0px";
- div.style.opacity = "0.99";
- div.style.backgroundColor = "#FFFFFF";
- div.style.fontSize = "60px";
- div.style.lineHeight = "60px";
- div.style.textAlign = "right";
- document.body.appendChild(div);
- }
- else{
- //alert("Layer already exists;")
- }
- xmlhttpPost('/webqtl/AJAX_pref.py', 'tab=assembly&divId='+myId, myId);
- div.style.visibility = 'visible';
- }
-}
-
-/*New added by NL*/
-/*
-Used by PartialCorrTraitPage.py, CorrelationPage.py,
-*/
-function xmlhttpPost(strURL, div, querystring) {
-
- var xmlHttpReq = false;
- var self = this;
- var lay = document.getElementById('warningLayer');
- if (lay != null) {lay.style.visibility = "visible";}
- // Mozilla/Safari
- if (window.XMLHttpRequest) {
- self.xmlHttpReq = new XMLHttpRequest();
- }
- // IE
- else if (window.ActiveXObject) {
- self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
- }
- self.xmlHttpReq.open('POST', strURL, true);
- self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
- self.xmlHttpReq.onreadystatechange = function() {
- if (self.xmlHttpReq.readyState == 4) {
- responseText = self.xmlHttpReq.responseText;
- updatepage(div, responseText);
- if (lay != null) lay.style.visibility = "hidden";
- }
- }
- self.xmlHttpReq.send(querystring);
-}
-
-function updatepage(Id, str){
- document.getElementById(Id).innerHTML = str;
-}
-/*
-Used by CorrelationPage.py,
-elements: name,customizer, trait, filename, strainIds and vals are required by getquerystring function
-*/
-function getquerystring(thisform) {
- var db = thisform.customizer.value;
- var dbname = thisform.databaseFull.value;
- var form = thisform.name;
- var trait = thisform.identification.value;
- var file = thisform.filename.value;
- var ids = thisform.strainIds.value;
- var vals = thisform.vals.value;
- qstr = 'cmd=addCorr&db=' + escape(db) + '&dbname=' + escape(dbname) + '&form=' + escape(form) + '&trait=' + escape(trait) + '&file=' + escape(file)+ '&ids=' + escape(ids) + '&vals=' + escape(vals);
- // NOTE: no '?' before querystring
- return qstr;
-}
-
-/*
-* Used by snpBrowserPage.py and AJAX_snpbrowser.py,
-*/
-function xmlhttpPostSNP(strURL) {
- var xmlHttpReq = false;
- var self = this;
- // Mozilla/Safari
- if (window.XMLHttpRequest) {
- self.xmlHttpReq = new XMLHttpRequest();
- }
- // IE
- else if (window.ActiveXObject) {
- self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
- }
- self.xmlHttpReq.open('POST', strURL, true);
- self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
- self.xmlHttpReq.onreadystatechange = function() {
- if (self.xmlHttpReq.readyState == 4) {
- responseTextArray = self.xmlHttpReq.responseText.split("__split__");
- updatepage('menu_group', responseTextArray[0]);
- updatepage('menu_s1', responseTextArray[1]);
- updatepage('menu_s2', responseTextArray[2]);
- updatepage('menu_s3', responseTextArray[3]);
- }
- }
- self.xmlHttpReq.send(getquerystringSNP());
-}
-/*
-* used by snpBrowserPage.py, html elements:newSNPPadding, group, s1 and s2 are required
-*/
-function getquerystringSNP() {
- var form = document.newSNPPadding;
- var group = form.group.value;
- var s1 = form.s1.value;
- var s2 = form.s2.value;
- qstr = 'group=' + escape(group) + '&s1=' + escape(s1) + '&s2=' + escape(s2);
- // NOTE: no '?' before querystring
- return qstr;
-}
-
-
-/*
-Used by CorrelationPage.py, element's Id named 'warningLayer' is required
-*/
-function pageOffset() {
- lay = document.getElementById('warningLayer');
- lay.style.top = document.body.scrollTop + 300; //document.body.clientWidth/2;
- lay.style.left = (windowWidth() -250)/2;
- setTimeout('pageOffset()',100);
-}
-
-/*
-* Used by CorrelationPage.py,
-*/
-function windowWidth(){
- if (document.getElementById){
-
- if (window.innerWidth)
- return window.innerWidth;
- if (document.documentElement&&document.documentElement.clientWidth)
- return document.documentElement.clientWidth;
- if (document.body.clientWidth)
- return document.body.clientWidth;
- }
-}
-
-/*
-* Used by PartialCorrInputPage.py,
-*/
-function setAllAsTarget(thisForm, inputRadioNames){
- var radioArray = new Array();
- radioArray = inputRadioNames.split(',');
-
- for (var i = 0; i < radioArray.length; i++){
- radioElement = thisForm[radioArray[i]];
-
- for (var j = 0; j < radioElement.length; j++){
- radioElement[j].checked = false;
- value = radioElement[j].value;
- if (value == "target"){
- radioElement[j].checked = true;
- }
- }
- }
-}
-
-/*
-* Used by PartialCorrInputPage.py,
-*/
-function setAllAsIgnore(thisForm, inputRadioNames){
- var radioArray = new Array();
- radioArray = inputRadioNames.split(',');
-
- for (var i = 0; i < radioArray.length; i++){
- radioElement = thisForm[radioArray[i]];
-
- for (var j = 0; j < radioElement.length; j++){
- radioElement[j].checked = false;
- value = radioElement[j].value;
- if (value == "ignored"){
- radioElement[j].checked = true;
- }
- }
- }
-}
-
-/*
-* moved from beta2.js
-*/
-function checkUncheck(value, permCheck, bootCheck) {
- if(value=="physic") {
- permCheck.checked=true
- bootCheck.checked=false
- } else {
- permCheck.checked=true
- bootCheck.checked=true
- }
-}
-
-/*
-updated by NL: 06-07-2010
-add new item at the top
-*/
-function addToList(text, value, list) {
- for (var j = list.length-1; j >=0; j--){
- list.options[j+1]= new Option(list.options[j].text,list.options[j].value);
- }
- list.options[0] = new Option(text, value)
-}
-
-function removeFromList(index, list) {
- list.options[index] = null
- list.options[index].selected = true
- if (list.length == 1) {
- list.options[0].selected = true
- }
-}
-
-function swapOptions(index1, index2, list) {
- text1 = list.options[index1].text
- value1 = list.options[index1].value
- text2 = list.options[index2].text
- value2 = list.options[index2].value
- list.options[index1] = new Option(text2, value2)
- list.options[index2] = new Option(text1, value1)
- list.options[index2].selected = true
-}
-
-function selectAllElements(list) {
- for(i=0; i'
-ctext += '
'
-ctext += 'WWW service initiated January, 1994 as The Portable Dictionary of the Mouse Genome and June 15, 2001 as WebQTL.'
-ctext += ''
-ctext += 'This site is currently operated by'
-ctext += ' Rob Williams,'
-ctext += ' Lei Yan,'
-ctext += ' Zachary Sloan,'
-ctext += ' Arthur Centeno. Design and code by Xiaodong Zhou, Christian Fernandez, Ning Liu, Rudi Alberts, Elissa Chesler, Jintao Wang, Kenneth Manly, Robert W. Williams, and colleagues.'
-ctext += ''
-ctext += ''
-ctext += '