function clearBOX() { if (this.value!=null && this.value=='') { this.value=''; } if (this.value!=null && this.value=='type another symptom (optional)') { this.value=''; } } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); if (ca!=null) { for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } } return null; } function eraseCookie(name) { createCookie(name,"",-1); } function rowMOver(r) { if (r.className!='rowHEADER') { r.className='rowOver'; } else { //r.style.cursor='hand'; } } function rowMOut(r) { if (r.className!='rowHEADER') { r.className='rowColor'; } } function toggleD(d) { var E=document.getElementById(d); var EIMG=document.getElementById('IMG'+d); if (E!=null) { if (E.style.display=='none') { E.style.display='block'; if (EIMG!=null) { EIMG.src='/cms/interface/minus.gif'; } } else { E.style.display='none'; if (EIMG!=null) { EIMG.src='/cms/interface/plus.gif'; } } } } var openedSelect=new Array(); function openSelect(a) { var b=a+'BOX'; var E=document.getElementById(a); var F=document.getElementById(b); if (E!=null && F!=null) { F.style.display='block'; openedSelect[openedSelect.length]=a; } } function closeSelect(a) { var b=a+'BOX'; var E=document.getElementById(a); var F=document.getElementById(b); if (E!=null && F!=null) { F.style.display='none'; } } function closeAllSelects() { for (var i=0;i0) { for (var j=0;j0) { gg[j]=gg[j].substring(0,gg[j].indexOf('(')); gg[j]=trim(gg[j]); } gg[j]=gg[j].replace("(",""); gg[j]=gg[j].replace(")",""); gg[j]=gg[j].replace("(",""); gg[j]=gg[j].replace(")",""); gg[j]=gg[j].replace("(",""); gg[j]=gg[j].replace(")",""); gg[j]=gg[j].replace("(",""); gg[j]=gg[j].replace(")",""); gg[j]=trim(gg[j]); gg[j]=trim(gg[j]); */ gg[j]=trim(gg[j]); if (gg[j]==S) { doo=0; break; } } } if (doo==1) { gg=null; } } if (gg==null || gg.length==0) { //var EEE=document.getElementById("ERRORDIV1"); //var DDD=document.getElementById("ERRORDIV1INFO"); //if (EEE!=null && DDD!=null) { var res='

We could not find a match for "'+S+'". One symptom per line please. This at times may be due to a gender/symptom conflict. Either select a symptom, diagnosis, drug, procedure from the drop down or pictoral menu. '; alertMessage(res); //DDD.innerHTML=res; //EEE.style.display=''; return 5; //} } } } } } } } function alertMessage(m) { var F=document.getElementById('INFOALERTMESSAGEDIV'); var E=document.getElementById('INFOALERTMESSAGEDIVMESSAGE'); if (E!=null) { E.innerHTML=''+m+''; showInfoCENTER('ALERTMESSAGEDIV'); } } function verify() { var g=0; if (1==1) { var RAA=document.getElementById("realagegiven"); if (RAA!=null) { RAA=RAA.options[RAA.selectedIndex].value; RAA*=1; if (RAA==0) RAA=29; var AGERANGE="18-29"; if (RAA<=3) { AGERANGE="1-3"; } else if (RAA<=11) { AGERANGE="4-11"; } else if (RAA<=17) { AGERANGE="12-17"; } else if (RAA<=29) { AGERANGE="18-29"; } else if (RAA<=50) { AGERANGE="30-50"; } else { AGERANGE="50+"; } var BAA=document.getElementById('agerangeselect'); if (BAA!=null) { for (var i=0;i0) { setRIGHTTYPE(ESS); } } } if (g==0) { var SEC=document.getElementById("section"); if (SEC!=null) { SEC.value=CURRENTSECTIONC; } for (var i=1;i<=4;i++) { var SN='DIVSYM'+i+'VALUE'; var E=document.getElementById(SN); if (E!=null) { if (E.value=='type another symptom (optional)') { E.value=''; } } } var ADW=''; //document.forms[0].w.value=ADW; document.forms[0].w.value=''; document.forms[0].submit(); } } var ADWORDSSYM=new Array(); var ADWORDS=new Array(); function getADWORD(sy) { for (var i=0;i2) { if (w.indexOf(TT)==-1) { if (TT.charAt(TT.length-1)=='s') { var TTS=TT.substring(0,TT.length-1); if (w.indexOf(TTS)==-1) return 0; } else { return 0; } } } } } return 1; //alert(w+" "+TT); //if (ts[i]=='in' || ts[i]=='a' || ts[i]=='the' || ts[i]=='i' ) continue; //if (ts[i].length>2 && ts[i]!=' ' && ts[i]!='') } function containsAllWords(ts,w,a) { for (var i=0;i2) { if (w.indexOf(ts[i])==-1) return 0; } } return 1; } function trim(value) { var temp = value; var obj = /^(\s*)([\W\w]*)(\b\s*$)/; if (obj.test(temp)) { temp = temp.replace(obj, '$2'); } var obj = / +/g; temp = temp.replace(obj, " "); if (temp == " ") { temp = ""; } if (temp.length>0 && temp.charAt(0)==' ') temp=temp.substring(1); if (temp.length>0 && temp.charAt(temp.length-1)==' ') temp=temp.substring(0,temp.length-1); return temp; } function trim22(stringToTrim) { return stringToTrim.replace(/^\s+|\s+$/g,""); } function baseSymptoms(found) { var f=new Array(found.length); for (var x=0;x1) { var q=ds[0]; if (q.charAt(q.length-1)==':') { q=q.substring(0,q.length-1); } f[f.length]=q; } else { f[f.length]=w; } } } } return f; } function injectSyn(t,w,pos,BR) { //return w; //t=trim(t); var ds=w.split('/'); if (ds!=null) { if (ds.length>1) { var dsQ=w.split('/'); if (t=='') { var q=ds[0]; q=trim(q); if (q.charAt(q.length-1)==':') q=q.substring(0,q.length-1); //alert("A: "+q+" : "+w); return q; } for (var i=0;i0) alert(R.length+" "+X.length+" "+Y.length); if (X.length==Y.length) { var n=new Array(X.length); currentSub=new Array(Y.length); var ci=0; for (var i=0;i0) { n[ci]=X[i]; currentSub[ci]=Y[i]; ci++; } } HREQQRES=n; //return n; if (DSR.length>1) { HREQQRESALL[HREQQRESALL.length]=n; //alert(n.length); } } else { } } } } else { if (TRYCC<10) { setTimeout('matchAA()',100); } } } else { if (TRYCC<10) { setTimeout('matchAA()',100); } } } var MATCHREQOBJ=null; var HREQQTXT=''; var HREQQ=null; var HREQQRES=new Array(); var HREQQRESALL=new Array(); var HREQQPREVREQ=''; function getMatches(matchString,matchStringCAT,t) { //TESTTINEA=(new Date()).getTime(); var n=new Array(100); currentSub=new Array(100); HREQQRES=n; HREQQRESALL=new Array(10); HREQQTXT=t; if (t==null || trim(t).length<1) return; if (matchString==matchStringCAT) matchString=''; var gen=''; if (1) { var E=document.getElementsByName('gender'); if (E!=null) { var h=0; for (var i=0;i 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } function getMatchType(t) { if (t==null || trim(t).length<1) return; if (matchString==matchStringCAT) matchString=''; var url='/ajaxmatch.jsp?task=gettype&t='+escape(t)+'&language=english'; var rand_no = Math.random(); url+='&rand='+rand_no; var req = false; // branch for native XMLHttpRequest object if(window.XMLHttpRequest && !(window.ActiveXObject)) { try { req = new XMLHttpRequest(); } catch(e) { req = false; } // branch for IE/Windows ActiveX version } else if(window.ActiveXObject) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { req = false; } } } if(req) { //req.overrideMimeType('text/xml; charset=iso-8859-1'); //req.onreadystatechange = fun; req.open("GET", url, false); req.send(""); return matchTT(req); } return ''; } function matchTT(hreq) { if (hreq.readyState == 4) { if (hreq.status == 200) { var R=hreq.responseText; R=trim(R); R=trim22(R); if (R.length==0) R=''+CURRENTSECTIONC; //alert(R+"||"+CURRENTSECTIONC); return R; } else { } } else { } } function containsAlreadySimple(ar,v) { var ARL=ar.length; for (var i=0;i10 && ar[i].indexOf(v)!=-1) return 1; } return 0; } function showSearchEdit() { var E=document.getElementById('searchformarea'); var F=document.getElementById('searcheditsearch'); if (E!=null && F!=null) { if (E.style.display=='none') { E.style.display=''; F.style.display='none'; } else { E.style.display='none'; F.style.display=''; } } } function showWebSearch() { window.location='?section=keyword'; } var SYMTXTWIDTHSMALL='390px'; var SYMTXTWIDTHLARGE='780px'; var AUTOCOMPWIDTHLARGE='930px'; function showDURQ() { for (var x=1;x<=4;x++) { var EN='DIVSYM'+x+'VALUE'; var EE=document.getElementById(EN); if (EE!=null) { if (EE.value.length>=0) { var F=document.getElementById('DURADIV'+x); if (F!=null) { EE.style.width=SYMTXTWIDTHSMALL;//'240px'; var FN='DIVSYM'+x+'VALUECONTAINER'; var FE=document.getElementById(FN); FE.style.width=SYMTXTWIDTHSMALL;//'240px'; F.style.display=''; } } } } if (1) { var E=document.getElementById('SYMSEARCHPLUSSIGN'); if (E!=null) E.style.display=''; var E=document.getElementById('SYMSEARCHGENAGE'); if (E!=null) E.style.display=''; } } function hideDurations() { for (var x=2;x<=4;x++) { var F=document.getElementById('DURADIV'+x); if (F!=null) F.style.display='none'; } if (1) { var E=document.getElementById('SYMSEARCHPLUSSIGN'); if (E!=null) E.style.display='none'; var E=document.getElementById('SYMSEARCHGENAGE'); if (E!=null) E.style.display='none'; } } function showDurations() { for (var x=1;x<=4;x++) { var F=document.getElementById('DURADIV'+x); if (F!=null) F.style.display=''; } } function hideDURQ() { if (CURRENTSECTIONC!='' && MULTIROWON!='false') { for (var x=4;x>1;x--) { var EN='DIVSYM'+x+'VALUE'; var EE=document.getElementById(EN); if (EE!=null) { var q=EE.value; q=trim(q); if (q.length>0 && q!='type another symptom (optional)') { var FN='DIVSYM1VALUE'; var FE=document.getElementById(FN); if (FE!=null) { FE.value=q; } break; } } } if (1) { var E=document.getElementById('SYMSEARCHPLUSSIGN'); if (E!=null) E.style.display='none'; var E=document.getElementById('SYMSEARCHGENAGE'); if (E!=null) E.style.display='none'; } } for (var x=1;x<=4;x++) { var EN='DIVSYM'+x+'VALUE'; var EE=document.getElementById(EN); if (EE!=null) { if (EE.value.length>0) { var F=document.getElementById('DURADIV'+x); if (F!=null) { EE.style.width=SYMTXTWIDTHLARGE;//'680px'; var FN='DIVSYM'+x+'VALUECONTAINER'; var FE=document.getElementById(FN); FE.style.width=SYMTXTWIDTHLARGE;//'680px'; F.style.display='none'; } } } if (x>1 && MULTIROWON!='false') { var EN='DIVSYM'+x+'VALUE'; var EE=document.getElementById(EN); var g=0; if (EE!=null) { EE.value=''; var YEN='SYMPTOMROW'+x; var YEE=document.getElementById(YEN); if (YEE!=null) { YEE.style.display='none'; } } } } } function showThisSymptomRow(n) { var E=document.getElementById('SYMPTOMROWCONTROL'+n); var F=document.getElementById('SYMPTOMROWDETT'+n); var G=document.getElementById('SYMPTOMROWDETTB'+n); if (E!=null && F!=null && G!=null) { E.style.display='none'; F.style.display=''; G.style.display=''; var H=document.getElementById('DIVSYM'+n+'VALUE'); if (H!=null) { H.focus(); } } } function showNextSymptomRow() { var FF=document.getElementById("section"); if (FF!=null) FF.value=CURRENTSECTIONC; if (CURRENTSECTIONC=='') { if (1) { var EN='DIVSYM1VALUE'; var EE=document.getElementById(EN); if (EE!=null) { if (EE.value!='' && EE.value!='' && EE.value!='type another symptom (optional)') { showDurations(); showDURQ(); } } } for (var x=1;x<=4;x++) { var EN='DIVSYM'+x+'VALUE'; var EE=document.getElementById(EN); var g=0; if (EE!=null) { EE.name='symptom'; if (EE.value!='' && EE.value!='' && EE.value!='type another symptom (optional)') { if (x==1) g=1; var y=x+1; if (y<=4) { var YEN='SYMPTOMROW'+y; var YEE=document.getElementById(YEN); if (YEE!=null) { YEE.style.display=''; } } } } } showslide('1'); } else { var EN='DIVSYM1VALUE'; var EE=document.getElementById(EN); if (EE!=null) { if ('keyword'==CURRENTSECTIONC) { EE.name='keyword'; showslide('2'); hideDURQ(); } else if ('searchdrug'==CURRENTSECTIONC) { EE.name='drug'; showslide('3'); hideDURQ(); } else if ('searchproc'==CURRENTSECTIONC) { EE.name='procedure'; showslide('4'); hideDURQ(); } else if ('searchdoc'==CURRENTSECTIONC) { EE.name='associateddocs'; showslide('5'); hideDURQ(); } else if (''==CURRENTSECTIONC) { EE.name='symptom'; showslide('1'); } } } } function showAdvancedSearch() { var E=document.getElementById('advancedsearch'); var F=document.getElementById('ADVLINK'); if (E!=null && F!=null) { if (E.style.display=='none') { E.style.display=''; F.innerHTML='advanced'; } else { E.style.display='none'; F.innerHTML='advanced'; } } } function showGraphicalSearch() { var E=document.getElementById('GRAPHICALSEARCH'); if (E!=null ) { if (E.style.display=='none') { E.style.display=''; } else { E.style.display='none'; } } } var CURRENTSECTIONC=''; var MULTIROWON=''; var SINGLECOLUMNAUTO=''; function AutoComplete(aStr, aStrCAT,oText, oDiv, oCont,nMaxSize,iN,addto) { // initialize member variables this.matchS=aStr; this.matchSCAT=aStrCAT; this.oText = oText; this.oDiv = oDiv; this.oCont = oCont; this.activeTDIV=null; this.indexName=iN; this.nMaxSize = nMaxSize; this.usingKeys = 0; this.inDIV=0; this.addtofield=addto; if (this.addtofield==undefined || this.addtofield==null) { this.addtofield='false'; } this.SNR=true; if (oDiv!=null) { if ((''+oDiv.id).indexOf('DTESTVALUE')>=0) { this.SNR=false; } } // preprocess the texts for fast access // attach handlers to the text-box if (oText!=null) { oText.AutoComplete = this; oText.onkeyup = AutoComplete.prototype.onTextChange; oText.onkeydown = AutoComplete.prototype.onKD; oText.onblur = AutoComplete.prototype.onTextBlur; //oCont.on = function() { alert("AA"); } //AutoComplete.prototype.onBMOO; oCont.AutoComplete=this; oDiv.AutoComplete=this; oText.onfocus = AutoComplete.prototype.onTextFocus; oText.onclick = AutoComplete.prototype.onClickT; } } AutoComplete.prototype.onKD = function (oEvent) { if (!oEvent) { oEvent = window.event; } if (this.value!=null && this.value=='') { this.value=''; } if (this.value!=null && this.value=='type another symptom (optional)') { this.value=''; } oEvent.cancelBubble=true; switch(oEvent.keyCode) { case 38: //up arrow //this.previousSuggestion(); this.AutoComplete.usingKeys=1; if (this.AutoComplete.activeTDIV==null) { //this.AutoComplete.activeTDIV=this.AutoComplete.oDiv.firstChild; this.AutoComplete.activeTDIV=this.AutoComplete.oDiv.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild; } if (this.AutoComplete.activeTDIV && this.AutoComplete.activeTDIV!=null) { //alert("D"+this.AutoComplete.activeTDIV.previousSibling+" "+this); if (this.AutoComplete.activeTDIV.previousSibling) { this.AutoComplete.activeTDIV.className = "AutoCompleteBackground"; this.AutoComplete.activeTDIV.previousSibling.className = "AutoCompleteHighlight"; this.AutoComplete.activeTDIV=this.AutoComplete.activeTDIV.previousSibling; } } break; case 37: //left arrow this.AutoComplete.usingKeys=1; if (this.AutoComplete.activeTDIV && this.AutoComplete.activeTDIV!=null) { if (this.AutoComplete.activeTDIV.parentNode.parentNode.previousSibling) { this.AutoComplete.activeTDIV.className = "AutoCompleteBackground"; this.AutoComplete.activeTDIV=this.AutoComplete.activeTDIV.parentNode.parentNode.previousSibling.firstChild.firstChild; this.AutoComplete.activeTDIV.className = "AutoCompleteHighlight"; } } break; case 39: //right arrow this.AutoComplete.usingKeys=1; if (this.AutoComplete.activeTDIV && this.AutoComplete.activeTDIV!=null) { if (this.AutoComplete.activeTDIV.parentNode.parentNode.nextSibling) { this.AutoComplete.activeTDIV.className = "AutoCompleteBackground"; this.AutoComplete.activeTDIV=this.AutoComplete.activeTDIV.parentNode.parentNode.nextSibling.firstChild.firstChild; this.AutoComplete.activeTDIV.className = "AutoCompleteHighlight"; } } break; case 40: //down arrow //this.nextSuggestion(); this.AutoComplete.usingKeys=1; if (this.AutoComplete.activeTDIV==null) { this.AutoComplete.activeTDIV=this.AutoComplete.oDiv.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild; this.AutoComplete.activeTDIV.className = "AutoCompleteHighlight"; } else { if (this.AutoComplete.activeTDIV && this.AutoComplete.activeTDIV!=null) { //alert("D"+this.AutoComplete.activeTDIV.nextSibling+" "+this); if (this.AutoComplete.activeTDIV.nextSibling) { this.AutoComplete.activeTDIV.className = "AutoCompleteBackground"; this.AutoComplete.activeTDIV.nextSibling.className = "AutoCompleteHighlight"; this.AutoComplete.activeTDIV=this.AutoComplete.activeTDIV.nextSibling; } } } break; case 13: //enter this.AutoComplete.usingKeys=1; if (this.AutoComplete.activeTDIV!=null) { //this.AutoComplete.oText.value = this.AutoComplete.activeTDIV.innerHTML; if (false && this.AutoComplete.activeTDIV.title==this.AutoComplete.activeTDIV.title.toUpperCase() && this.AutoComplete.activeTDIV.title.indexOf("#")<0) { this.AutoComplete.usingKeys=0; break; } CURRENTSECTIONC=this.AutoComplete.activeTDIV.getAttribute('alt'); if (CURRENTSECTIONC=='' || MULTIROWON=='false') { if (this.AutoComplete.addtofield=='true') { var CVV=this.AutoComplete.oText.value; CVV=CVV.replace(',,',','); var CVVCP=CVV.lastIndexOf(','); if (CVVCP>0) {CVV=CVV.substring(0,CVVCP)+', ';} else CVV=''; CVV+=this.AutoComplete.activeTDIV.title; this.AutoComplete.oText.value=CVV+','; if (this.AutoComplete.activeTDIV.title.indexOf("#")>=0) { var CVV=this.AutoComplete.oText.value; CVV=CVV.replace(',,',','); var CVVCP=CVV.lastIndexOf(','); if (CVVCP>0) {CVV=CVV.substring(0,CVVCP)+', ';} else CVV=''; CVV+=this.AutoComplete.activeTDIV.innerHTML; this.AutoComplete.oText.value=CVV+','; } this.AutoComplete.oText.focus(); } else { this.AutoComplete.oText.value = this.AutoComplete.activeTDIV.title; if (this.AutoComplete.activeTDIV.title.indexOf("#")>=0) { this.AutoComplete.oText.value = this.AutoComplete.activeTDIV.innerHTML; } } } else { var SN='DIVSYM1VALUE'; var E=document.getElementById(SN); if (E!=null) { E.value = this.AutoComplete.activeTDIV.title; if (this.AutoComplete.activeTDIV.title.indexOf("#")>=0) { E.value = this.AutoComplete.activeTDIV.innerHTML; } } for (var i=2;i<=4;i++) { var SN='DIVSYM'+i+'VALUE'; var E=document.getElementById(SN); if (E!=null) { E.value=''; } } } CURRENTSECTIONC=this.AutoComplete.activeTDIV.getAttribute('alt'); } //this.AutoComplete.oText.value = this.AutoComplete.activeTDIV.innerHTML; this.AutoComplete.activeTDIV=null; //this.AutoComplete.oDiv.innerHTML = ""; this.AutoComplete.oDiv.style.display = "none"; this.AutoComplete.showtextfields(); //this.AutoComplete.usingKeys=0; if (MULTIROWON!='false') { if (this.AutoComplete!=undefined || this.AutoComplete!=null) { if (this.AutoComplete!=undefined && this.AutoComplete!=null) { if (this.AutoComplete.SNR) showNextSymptomRow(); } } } return false; break; case 9: //tab this.AutoComplete.usingKeys=1; if (this.AutoComplete.activeTDIV!=null) { //this.AutoComplete.oText.value = this.AutoComplete.activeTDIV.innerHTML; if (false && this.AutoComplete.activeTDIV.title==this.AutoComplete.activeTDIV.title.toUpperCase() && this.AutoComplete.activeTDIV.title.indexOf("#")<0) { this.AutoComplete.usingKeys=0; break; } CURRENTSECTIONC=this.AutoComplete.activeTDIV.getAttribute('alt'); if (CURRENTSECTIONC=='') { if (this.AutoComplete.addtofield=='true') { var CVV=this.AutoComplete.oText.value; CVV=CVV.replace(',,',','); var CVVCP=CVV.lastIndexOf(','); if (CVVCP>0) {CVV=CVV.substring(0,CVVCP)+', ';} else CVV=''; CVV+=this.AutoComplete.activeTDIV.title; this.AutoComplete.oText.value=CVV+','; if (this.AutoComplete.activeTDIV.title.indexOf("#")>=0) { var CVV=this.AutoComplete.oText.value; CVV=CVV.replace(',,',','); var CVVCP=CVV.lastIndexOf(','); if (CVVCP>0) {CVV=CVV.substring(0,CVVCP)+', ';} else CVV=''; CVV+=this.AutoComplete.activeTDIV.innerHTML; this.AutoComplete.oText.value=CVV+','; } this.AutoComplete.oText.focus(); } else { this.AutoComplete.oText.value = this.AutoComplete.activeTDIV.title; if (this.AutoComplete.activeTDIV.title.indexOf("#")>=0) { this.AutoComplete.oText.value = this.AutoComplete.activeTDIV.innerHTML; } } } else { var SN='DIVSYM1VALUE'; var E=document.getElementById(SN); if (E!=null) { E.value = this.AutoComplete.activeTDIV.title; if (this.AutoComplete.activeTDIV.title.indexOf("#")>=0) { E.value = this.AutoComplete.activeTDIV.innerHTML; } } for (var i=2;i<=4;i++) { var SN='DIVSYM'+i+'VALUE'; var E=document.getElementById(SN); if (E!=null) { E.value=''; } } } CURRENTSECTIONC=this.AutoComplete.activeTDIV.getAttribute('alt'); } //this.AutoComplete.oText.value = this.AutoComplete.activeTDIV.innerHTML; this.AutoComplete.activeTDIV=null; //this.AutoComplete.oDiv.innerHTML = ""; this.AutoComplete.oDiv.style.display = "none"; this.AutoComplete.showtextfields(); //this.AutoComplete.usingKeys=0; if (MULTIROWON!='false') { if (this.AutoComplete!=undefined && this.AutoComplete!=null) { if (this.AutoComplete.SNR) showNextSymptomRow(); } } //this.AutoComplete.showtextfields(); break; default: this.AutoComplete.usingKeys=0; break; } } AutoComplete.prototype.onBMOV = function() { //this.AutoComplete.inDIV=1; this.inDIV=1; } AutoComplete.prototype.onBMOO = function() { this.inDIV=0; //this.oDiv.style.visibility = "hidden"; this.usingKeys=0; if (this.oDiv.style) this.oDiv.style.display = "none"; this.showtextfields(); } AutoComplete.prototype.onClickT = function() { if (this.value!=null && this.value=='') { this.value=''; } if (this.value!=null && this.value=='type another symptom (optional)') { this.value=''; } } AutoComplete.prototype.onTextBlur = function() { this.AutoComplete.onblur(); if (this.AutoComplete!=undefined && this.AutoComplete!=null) { if (this.AutoComplete.SNR) showNextSymptomRow(); } } AutoComplete.prototype.onblur = function() { //if (this.inDIV==0) { //this.oDiv.style.visibility = "hidden"; this.usingKeys=0; //this.oDiv.style.display = "none"; //this.showtextfields(); //} if (this.AutoComplete!=undefined && this.AutoComplete!=null) { if (this.AutoComplete.SNR) showNextSymptomRow(); } } AutoComplete.prototype.onDivMouseDown = function() { //this.AutoComplete.oText.value = this.innerHTML; if (false && this.title==this.title.toUpperCase() && this.title.indexOf("#")<0 ) { } else { this.AutoComplete.oDiv.style.display = "none"; this.AutoComplete.showtextfields(); this.AutoComplete.usingKeys=0; if (this.AutoComplete.addtofield=='true') { var CVV=this.AutoComplete.oText.value; CVV=CVV.replace(',,',','); var CVVCP=CVV.lastIndexOf(','); if (CVVCP>0) {CVV=CVV.substring(0,CVVCP)+', ';} else CVV=''; CVV+=this.title; this.AutoComplete.oText.value=CVV+','; this.AutoComplete.oText.focus(); } else { this.AutoComplete.oText.value = this.title; } if (this.AutoComplete.addtofield=='true') { if (this.title.indexOf("#")>=0) { var CVV=this.AutoComplete.oText.value; CVV=CVV.replace(',,',','); var CVVCP=CVV.lastIndexOf(','); if (CVVCP>0) {CVV=CVV.substring(0,CVVCP)+', ';} else CVV=''; CVV+=this.innerHTML; this.AutoComplete.oText.value=CVV+','; this.AutoComplete.oText.focus(); } } else { if (this.title.indexOf("#")>=0) { this.AutoComplete.oText.value = this.innerHTML; } } CURRENTSECTIONC=this.getAttribute('alt'); if (this.AutoComplete.SNR) showNextSymptomRow(); if (this.AutoComplete.addtofield=='true') { this.AutoComplete.oText.focus(); } //this.AutoComplete.oText.value = this.innerHTML; } } AutoComplete.prototype.onTextFocus = function() { this.AutoComplete.usingKeys==0; } AutoComplete.prototype.onDivMouseOver = function() { this.AutoComplete.inDIV=1; if (this.AutoComplete.usingKeys==0) { this.AutoComplete.activeTDIV=this; this.className = "AutoCompleteHighlight"; } } AutoComplete.prototype.onDivMouseMove = function() { this.AutoComplete.usingKeys=0; } AutoComplete.prototype.onDivMouseOut = function() { this.AutoComplete.inDIV=0; this.className = "AutoCompleteBackground"; } AutoComplete.prototype.showtextfields = function() { //for (var x=1;x<=4;x++) { for (var x=1;x<=5;x++) { var EN='DIVSYM'+x+'VALUE'; var EE=document.getElementById(EN); if (EE!=null) { EE.style.visibility="visible"; } } } function toggleGHOST(e) { var E=document.getElementById(e); var F=document.getElementById(e+'GHOST'); if (E!=null && F!=null) { if (E.value!='') hideDiv(e+'GHOST'); else showDiv(e+'GHOST'); } } var LATESTTXT=''; var AUTOCOMPLASTTIME=(new Date()).getTime(); var CURRENTKEYFUN=null; function helperOnTextChange() { if (CURRENTKEYFUN!=null) { if (CURRENTKEYFUN.oText!=null) { toggleGHOST(CURRENTKEYFUN.oText.id); } var txt = CURRENTKEYFUN.oText.value; if (txt!='' && txt!='type another symptom (optional)') { CURRENTKEYFUN.oText.style.color='#000000'; } else { CURRENTKEYFUN.oText.style.color='#acacac'; } var NOWT=(new Date()).getTime(); var TDIF=NOWT-AUTOCOMPLASTTIME; if (TDIF>500 && txt.length>0 && txt==LATESTTXT) { CURRENTKEYFUN.onchange(); AUTOCOMPLASTTIME=(new Date()).getTime(); return; } else { if (txt.length>0 && txt!=LATESTTXT) { LATESTTXT=txt; setTimeout('helperOnTextChange()',500); return; } } } } AutoComplete.prototype.onTextChange = function() { if (this.AutoComplete.oText!=null) { toggleGHOST(this.AutoComplete.oText.id); } var txt = this.AutoComplete.oText.value; if (txt!='' && txt!='type another symptom (optional)') { this.AutoComplete.oText.style.color='#000000'; } else { //this.AutoComplete.oText.style.color='#acacac'; this.AutoComplete.oText.style.color='#454545'; //this.AutoComplete.oText.style.color='#000000'; } var NOWT=(new Date()).getTime(); var TDIF=NOWT-AUTOCOMPLASTTIME; var LMMM=100; if (TDIF>LMMM && txt.length>0 && txt==LATESTTXT) { if (this.AutoComplete!=null) { this.AutoComplete.onchange(); } //this.onchange(); AUTOCOMPLASTTIME=(new Date()).getTime(); //return; } else { if (txt.length>0 && txt!=LATESTTXT) { LATESTTXT=txt; CURRENTKEYFUN=this.AutoComplete; setTimeout('helperOnTextChange()',500); return; } } } var TESTTIMEA=(new Date()).getTime(); var TESTTIMEB=(new Date()).getTime(); var AUTOCOMPONLYSHOW=''; var INONCHANGE=0; var LASTCALL=(new Date()).getTime(); AutoComplete.prototype.onchange = function() { //TESTTIMEA=(new Date()).getTime(); if (INONCHANGE<0) INONCHANGE=0; this.usingKeys=0; if (this.usingKeys!=0) return; var txt = this.oText.value; if (txt!='' && txt!='type another symptom (optional)') { this.oText.style.color='#000000'; } else { this.oText.style.color='#acacac'; } txt=txt.toLowerCase(); if (this.addtofield=='true') { var cp=txt.lastIndexOf(','); if (cp>0 && (cp+1)0 && (cp+1)==txt.length) { txt=''; } } txt=trim(txt); if (txt.length<1) { this.oDiv.innerHTML = ""; if (this.oDiv.style) this.oDiv.style.display = "none"; this.showtextfields(); return; } var NOWTT=(new Date()).getTime(); var LMMM=100; if (LATESTTXT!=txt) { if (txt.length0) { // alert("overlay"+INONCHANGE); //} INONCHANGE++; var MYONCHANGE=INONCHANGE+0; // count the number of strings that match the text-box value //var nCount = this.db.getCount(txt, true); //var aStr=getMatches(this.matchS,this.matchSCAT,txt); //TESTTIMEB=(new Date()).getTime(); //alert(''+(TESTTIMEB-TESTTIMEA)); LASTCALL=(new Date()).getTime(); var ALLOPS=new Array(); if (SINGLECOLUMNAUTO!='') { if ('symptom'==SINGLECOLUMNAUTO) { ALLOPS[0]=getMatches('matchString','',txt); ALLOPS[1]=new Array(); ALLOPS[2]=new Array(); ALLOPS[3]=new Array(); ALLOPS[4]=new Array(); } else if ('diagnosis'==SINGLECOLUMNAUTO) { ALLOPS[0]=new Array(); ALLOPS[1]=getMatches('matchDiagString','',txt); ALLOPS[2]=new Array(); ALLOPS[3]=new Array(); ALLOPS[4]=new Array(); } else if ('medication'==SINGLECOLUMNAUTO) { ALLOPS[0]=new Array(); ALLOPS[1]=new Array(); ALLOPS[2]=new Array(); ALLOPS[3]=getMatches('matchMedsString','',txt); ALLOPS[4]=new Array(); } else if ('procedure'==SINGLECOLUMNAUTO) { ALLOPS[0]=new Array(); ALLOPS[1]=new Array(); ALLOPS[2]=new Array(); ALLOPS[3]=new Array(); ALLOPS[4]=getMatches('matchProcString','',txt); } else if ('physician'==SINGLECOLUMNAUTO) { ALLOPS[0]=new Array(); ALLOPS[1]=new Array(); ALLOPS[2]=getMatches('matchDoccString','',txt); ALLOPS[3]=new Array(); ALLOPS[4]=new Array(); } } else { ALLOPS=getMatches('matchAll','',txt); } if (ALLOPS == undefined || ALLOPS==null || ALLOPS.length==0) { INONCHANGE--; return; } //TESTTIMEB=(new Date()).getTime(); //alert(''+(TESTTIMEB-TESTTIMEA)); //alert(ALLOPS); if (ALLOPS.length==5) { var aStr=ALLOPS[0]; var DDStr=ALLOPS[1]; var DPRStr=ALLOPS[2]; var DRStr=ALLOPS[3]; var PRStr=ALLOPS[4]; } //alert(txt+" "+INONCHANGE+" "+MYONCHANGE+" :: "+LATESTTXT); if (LATESTTXT!=txt || INONCHANGE>MYONCHANGE) { INONCHANGE--; return; } var RESS=new Array(); var RESSLABEL=new Array(); var RESSECT=new Array(); var RESCOLOR=new Array(); RESS[RESS.length]=aStr; RESSLABEL[RESSLABEL.length]='SYMPTOMS'; RESSECT[RESSECT.length]=''; RESCOLOR[RESCOLOR.length]='#ffffff'; RESS[RESS.length]=DDStr; RESSLABEL[RESSLABEL.length]='DIAGNOSES'; RESSECT[RESSECT.length]='keyword'; RESCOLOR[RESCOLOR.length]='#fffafa'; RESS[RESS.length]=PRStr; RESSLABEL[RESSLABEL.length]='PROCEDURES'; RESSECT[RESSECT.length]='searchproc'; RESCOLOR[RESCOLOR.length]='#fffaff'; RESS[RESS.length]=DRStr; RESSLABEL[RESSLABEL.length]='DRUGS'; RESSECT[RESSECT.length]='searchdrug'; RESCOLOR[RESCOLOR.length]='#fffffa'; RESS[RESS.length]=DPRStr; RESSLABEL[RESSLABEL.length]='PHYSICIANS'; RESSECT[RESSECT.length]='searchdoc'; RESCOLOR[RESCOLOR.length]='#fafaff'; if (SINGLECOLUMNAUTO!='') { RESS=new Array(); RESSLABEL=new Array(); RESSECT=new Array(); if ('symptom'==SINGLECOLUMNAUTO) { RESS[RESS.length]=aStr; RESSLABEL[RESSLABEL.length]='SYMPTOMS'; RESSECT[RESSECT.length]=''; } else if ('diagnosis'==SINGLECOLUMNAUTO) { RESS[RESS.length]=DDStr; RESSLABEL[RESSLABEL.length]='DIAGNOSES'; RESSECT[RESSECT.length]='keyword'; } else if ('medication'==SINGLECOLUMNAUTO) { RESS[RESS.length]=DRStr; RESSLABEL[RESSLABEL.length]='DRUGS'; RESSECT[RESSECT.length]='searchdrug'; } else if ('procedure'==SINGLECOLUMNAUTO) { RESS[RESS.length]=PRStr; RESSLABEL[RESSLABEL.length]='PROCEDURES'; RESSECT[RESSECT.length]='searchproc'; } else if ('physician'==SINGLECOLUMNAUTO) { RESS[RESS.length]=DPRStr; RESSLABEL[RESSLABEL.length]='PHYSICIANS'; RESSECT[RESSECT.length]='searchdoc'; } } if (aStr==null && DDStr==null && PRStr==null && DRStr==null) { this.oDiv.innerHTML = ""; //this.oDiv.style.visibility = "hidden"; if (this.oDiv.style) this.oDiv.style.display = "none"; this.showtextfields(); INONCHANGE--; return; } if (aStr!=null && aStr.length==0 && DDStr!=null && DDStr.length==0 && PRStr!=null && PRStr.length==0 && DRStr!=null && DRStr.length==0) { this.oDiv.innerHTML = ""; //this.oDiv.style.visibility = "hidden"; if (this.oDiv.style) this.oDiv.style.display = "none"; this.showtextfields(); INONCHANGE--; return; } hideDurations(); // if a suitable number then show the popup-div //if ( (this.nMaxSize == -1 ) || ((nCount < this.nMaxSize) && (nCount > 0)) ) { if (1) { // clear the popup-div. this.oDiv.innerHTML = ""; while ( this.oDiv.hasChildNodes() ) this.oDiv.removeChild(this.oDiv.firstChild); this.oDiv.style.width=AUTOCOMPWIDTHLARGE;//'930px'; if (SINGLECOLUMNAUTO!='') { this.oDiv.style.width='300px'; } var TO=document.createElement('table'); var tbodyObj = document.createElement("TBODY"); TO.appendChild(tbodyObj); var trObj = document.createElement("TR"); tbodyObj.appendChild(trObj); var WPP='20%'; var HCC=0; for (var p=0;pMYONCHANGE) { INONCHANGE--; return; } aStr=RESS[p]; if (aStr==null || aStr.length==0 || aStr.length==1) { continue; } HCC++; } if (HCC>0) { WPP=100/HCC; WPP=WPP+'%'; } for (var p=0;pMYONCHANGE) { INONCHANGE--; return; } aStr=RESS[p]; if (aStr==null || aStr.length==0 || aStr.length==1) { continue; } //var TIME0=(new Date()).getTime(); var SECTIONLABEL=RESSLABEL[p]; var SECTIONTYPE=RESSECT[p]; if (AUTOCOMPONLYSHOW!='' && AUTOCOMPONLYSHOW!=SECTIONLABEL) continue; var nCount=aStr.length; var SECTIONTD = document.createElement('td'); SECTIONTD.style.verticalAlign='top'; if (p>0) { SECTIONTD.style.borderLeft='1px solid #ededed'; //SECTIONTD.style.width='20%'; SECTIONTD.style.width=WPP; } SECTIONTD.style.backgroundColor=RESCOLOR[p]; var SECTIONDIV = document.createElement('div'); var SECTIONLABELDIV = document.createElement('div'); SECTIONLABELDIV.style.fontFamily='lucida grande, tahoma, verdana, arial, sans-serif'; //SECTIONLABELDIV.style.color='#a4c4cf'; SECTIONLABELDIV.style.color='#54747f'; SECTIONLABELDIV.style.fontSize='11pt'; SECTIONLABELDIV.style.fontSize='12pt'; SECTIONLABELDIV.style.paddingLeft='2px'; //SECTIONLABELDIV.style.fontWeight='bold'; SECTIONLABELDIV.innerHTML=SECTIONLABEL; SECTIONDIV.appendChild(SECTIONLABELDIV); //var BASERES=baseSymptoms(aStr); //var TIME1=(new Date()).getTime(); /* var NA=new Array(); for (var i = 0; i < nCount; i++ ) { if (aStr[i]!=null && aStr[i]=='||') { aStr[i]=null; } if (aStr[i]==null) continue; aStr[i]=aStr[i].replace("|","","gi"); NA[NA.length]=trim(aStr[i]); } aStr=NA; */ nCount=aStr.length; //var TIME2=(new Date()).getTime(); //need to sort till var DIRECTMATCHBREAK=-2; var FT=txt.charAt(0); var ST=txt.charAt(1); var SHOWSS=new Array(nCount); for (var i=0;i"; var txtRRR=new RegExp(txt,"i"); for (var i = 0; i < nCount; i++ ) { if (aStr[i]==null) continue; var tDiv = BASEtDiv.cloneNode(false);//document.createElement('div'); //var tDiv = document.createElement('div'); tDiv.style.fontFamily='"lucida grande", tahoma, verdana, arial, sans-serif'; tDiv.style.fontSize='10.5pt'; tDiv.style.fontSize='12pt'; tDiv.style.paddingLeft='2px'; tDiv.style.paddingBottom='3px'; tDiv.style.nowrap='nowrap'; tDiv.onmousedown = AutoComplete.prototype.onDivMouseDown; tDiv.onmouseover = AutoComplete.prototype.onDivMouseOver; tDiv.onmouseout = AutoComplete.prototype.onDivMouseOut; tDiv.onmousemove = AutoComplete.prototype.onDivMouseMove; tDiv.AutoComplete = this; var SHOW=SHOWSS[i]; var SHOWBOLD=SHOW;//SHOW.replace(txtRRR,RPT); //var SHOWBOLD=SHOW; tDiv.innerHTML = SHOWBOLD; tDiv.title=SHOW; tDiv.setAttribute('alt',SECTIONTYPE); if (i==DIRECTMATCHBREAK) { tDiv.style.borderBottom='1px solid #aeaeae'; } SECTIONDIV.appendChild(tDiv); } SECTIONTD.appendChild(SECTIONDIV); trObj.appendChild(SECTIONTD); } if (LATESTTXT!=txt || INONCHANGE>MYONCHANGE) { INONCHANGE--; return; } this.oDiv.appendChild(TO); this.oDiv.onmouseover=AutoComplete.prototype.onBMOV; this.oDiv.onblur=AutoComplete.prototype.onBMOO; //need to hide other text fields var g=0; for (var x=1;x<=5;x++) { if (x==this.indexName) { g=1; } if (g==1 && x!=this.indexName) { var EN='DIVSYM'+x+'VALUE'; var EE=document.getElementById(EN); if (EE!=null) { EE.style.visibility="hidden"; } } } if (this.oDiv.style) this.oDiv.style.display = ""; } else { this.oDiv.innerHTML = ""; if (this.oDiv.style) this.oDiv.style.display = "none"; this.showtextfields(); } INONCHANGE--; //TESTTIMEB=(new Date()).getTime(); //alert(''+(TESTTIMEB-TESTTIMEA)); } function createAutoComplete() { if (document.getElementById('DIVSYM1VALUE')) { new AutoComplete( matchString,'', document.getElementById('DIVSYM1VALUE'), document.getElementById('DIVSYM1VALUECHOICE'), document.getElementById('DIVSYM1VALUECONTAINER'), 500,1 ); } if (document.getElementById('DIVSYM2VALUE')) { new AutoComplete( matchString,'', document.getElementById('DIVSYM2VALUE'), document.getElementById('DIVSYM2VALUECHOICE'), document.getElementById('DIVSYM2VALUECONTAINER'), 500,2 ); } if (document.getElementById('DIVSYM3VALUE')) { new AutoComplete( matchString,'', document.getElementById('DIVSYM3VALUE'), document.getElementById('DIVSYM3VALUECHOICE'), document.getElementById('DIVSYM3VALUECONTAINER'), 500,3 ); } if (document.getElementById('DIVSYM4VALUE')) { new AutoComplete( matchString,'', document.getElementById('DIVSYM4VALUE'), document.getElementById('DIVSYM4VALUECHOICE'), document.getElementById('DIVSYM4VALUECONTAINER'), 500,4 ); } if (document.getElementById('DIVSYM5VALUE')) { new AutoComplete( matchDiagString,'', document.getElementById('DIVSYM5VALUE'), document.getElementById('DIVSYM5VALUECHOICE'), document.getElementById('DIVSYM5VALUECONTAINER'), 500,5 ); } } function showTESTINFO(n) { var E=document.getElementById("TESTINFO"); if (E!=null) E.innerHTML=n; } function sar() { document.forms[0].showallresults.value='true'; document.forms[0].submit(); } function setEValue(d,v,b) { var EE=document.getElementById(d); if (EE!=null) { if (v!=null) { EE.value=v; } if (b!=null) { if ('true'==b) { EE.checked=true; } else { EE.checked=false; } } } } function setSYMS(n) { if ('male'==n) { matchString=matchStringMALE; matchStringCOPY=matchStringCOPYMALE; } else if ('female'==n) { matchString=matchStringFEMALE; matchStringCOPY=matchStringCOPYFEMALE; } else { matchString=matchStringCOPYORIG; matchStringCOPY=matchStringCOPYORIG; } } function toggleDISPLAYOFELEMENT(n) { var E=document.getElementById(n); if (E!=null) { if (E.style.display=='none') { E.style.display=''; } else { E.style.display='none'; } } } function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; } function findDim(obj) { var CW=''+getStyleO(obj,'width'); var CH=''+getStyleO(obj,'height'); var OW=obj.offsetWidth; var OH=obj.offsetHeight; if ('auto'==CH && OH!=null) CH=OH; else if ('auto'==CH) CH=50; if ('auto'==CW && OW!=null) CW=OW; else if ('auto'==CW) CW=50; CH=''+CH; CW=''+CW; //if ('auto'==CH) CH='50'; //if ('auto'==CW) CW='50'; //alert(obj.id+" "+CW+" "+obj.clientWidth+" "+" "+OW+" "+OH); CH=CH.replace('px',''); CW=CW.replace('px',''); return [CW,CH]; } function toggleDISPLAYOFELEMENTUNDERPARENT(n,pid,tof) { var E=document.getElementById(n); var PD=document.getElementById(pid); if (E!=null && PD!=null) { var pp=findPos(PD); E.style.position='absolute'; E.style.left=pp[0]+'px'; E.style.top=(pp[1]+tof)+'px'; } toggleDISPLAYOFELEMENT(n); } function toggleDISPLAYOFELEMENTUNDERPARENTAA(n,pid,tof,lo,to) { var E=document.getElementById(n); var PD=document.getElementById(pid); if (E!=null && PD!=null) { var pp=findPos(PD); E.style.position='absolute'; E.style.left=(pp[0]-lo)+'px'; E.style.top=(pp[1]+tof-to)+'px'; } toggleDISPLAYOFELEMENT(n); } function toggleDISPLAYOFELEMENTUNDERPARENTAARR(n,pid,tof,lo,to) { toggleDISPLAYOFELEMENT(n); var E=document.getElementById(n); var PD=document.getElementById(pid); if (E!=null && PD!=null) { var pp=findPos(PD); var dd=findDim(E); E.style.position='absolute'; var rr=pp[0]-lo-dd[0]; E.style.left=(pp[0]-lo-dd[0])+'px'; E.style.top=(pp[1]+tof-to)+'px'; //alert(E.style.right+" "+E.style.top); } } function toggleDISPLAYOFELEMENTSMART(n,pid) { toggleDISPLAYOFELEMENT(n); var E=document.getElementById(n); var PD=document.getElementById(pid); if (E!=null && PD!=null) { var pp=findPos(PD); var dd=findDim(E); E.style.position='absolute'; var SH=screen.height;//document.body.parentNode.scrollHeight;; var SW=screen.width;//document.body.parentNode.scrollWidth;; SH=(typeof window.innerHeight != 'undefined' ? window.innerHeight : document.body.offsetHeight); SW=(typeof window.innerWidth != 'undefined' ? window.innerWidth : document.body.offsetWidth); var SCL=document.body.scrollLeft; var SCT=document.body.scrollTop; var RCX=cX-SCL; var RCY=cY-SCT; var LR=RCX/SW; var TB=RCY/SH; if (LR<.5 && TB<.5) { E.style.left=(cX+10)+'px'; E.style.top=(cY+20)+'px'; } else if (LR<.5 && TB>=.5) { E.style.left=(cX+10)+'px'; E.style.top=(cY-dd[1]-10)+'px'; } else if (LR>=.5 && TB<.5) { E.style.left=(cX-dd[0]-10)+'px'; E.style.top=(cY+20)+'px'; } else if (LR>=.5 && TB>=.5) { E.style.left=(cX-dd[0])+'px'; E.style.top=(cY-dd[1]+5)+'px'; } } } function toggleDISPLAYOFELEMENTUNDERPARENTRIGHT(n,pid,tof) { var E=document.getElementById(n); var PD=document.getElementById(pid); if (E!=null && PD!=null) { var pp=findPos(PD); E.style.right=pp[0]+'px'; E.style.top=(pp[1]+tof)+'px'; //E.style.display=''; } toggleDISPLAYOFELEMENT(n); } function updateprop(user,dt,coll,id,p,v,bid) { var r='/updateprop.jsp?uuu='+escape(user)+'&datatype='+escape(dt)+'&collection='+escape(coll)+'&id='+escape(id)+'&prop='+escape(p)+'&value='+escape(v); doAjaxQ(r); var E=document.getElementById(bid+'status'); if (E!=null) { E.innerHTML='Updated'; } } function hideInfo(n) { var E=document.getElementById("INFO"+n); if (E!=null) E.style.display='none'; } function hideInfoCENTER(n) { LIGHTENPAGE(); var E=document.getElementById("INFO"+n); if (E!=null) E.style.display='none'; } var openInfoBoxs=new Array(); function showInfo(n) { hideAllInfo(); var E=document.getElementById("INFO"+n); if (E!=null) { var NL=cX; if (cX>500) { NL=cX-500; } else { NL=cX-30; } if (NL<20) NL=20; if (NL>1000) NL=500; E.style.left=(NL)+'px'; E.style.top=(cY+20)+'px'; E.style.display=''; openInfoBoxs[openInfoBoxs.length]=E; } } function hideAllInfo() { for (var i=0;i0) { //must be symptom E.value=v; done=1; //alert(i+" "+v+" "+E.value); //if (matchStringMALE.indexOf(E.value)<0 && matchStringFEMALE.indexOf(E.value)<0) { //} } } } if (done==1) break; } hideActiveDiv(); showNextSymptomRow(); } function setNextSymptomAndDur(v) { var done=0; for (var i=1;i<=4;i++) { var SN='DIVSYM'+i+'VALUE'; var E=document.getElementById(SN); if (E!=null) { if (E.value=='' || E.value=='' || E.value=='type another symptom (optional)') { if (i>1) { showThisSymptomRow(i); E.value=v; var C=document.getElementById('SYMPTOMDUR'+(i-1)); var D=document.getElementById('SYMPTOMDUR'+i); if (C!=null && D!=null) { if (C.selectedIndex!=0) { D.selectedIndex=C.selectedIndex; E.style.backgroundColor='#efefff'; done=1; } } } } } if (done==1) break; } hideActiveDiv(); showNextSymptomRow(); } function clearNotSymptom(v) { for (var i=1;i<=4;i++) { var SN='NOTDIVSYM'+i+'VALUE'; var E=document.getElementById(SN); if (E!=null) { if (E.value==v) { E.value=''; break; } } } } function setNextNotSymptom(v) { var done=0; for (var i=1;i<=4;i++) { var SN='NOTDIVSYM'+i+'VALUE'; var E=document.getElementById(SN); if (E!=null) { if (E.value=='') { E.value=v; done=1; } } if (done==1) break; } hideActiveDiv(); } function doDiagmatixSearch() { var doo=1; if (1==0) { var E=document.getElementById('DIVSYM1VALUE'); if (E!=null) { var S=E.value; var gg=getMatches(matchString,'',E.value); if (gg && gg.length>0) { for (var j=0;j0) { for (var i=0;i0) { for (var i=0;i0) { A.checked=false; } //alert("G "+T+" = "+F.value); T++; } } if (T>4) break; } for (var i=T;i<=4;i++) { var F=document.getElementById('DIVSYM'+i+'VALUE'); if (F!=null) { F.value=''; } } } } } var HTTPREQUEST=false; var FETCHDISPLAY=''; function fetchurl(url,DE) { FETCHDISPLAY=DE; var req = false; // branch for native XMLHttpRequest object if(window.XMLHttpRequest && !(window.ActiveXObject)) { try { req = new XMLHttpRequest(); } catch(e) { req = false; } // branch for IE/Windows ActiveX version } else if(window.ActiveXObject) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { req = false; } } } if(req) { HTTPREQUEST=req; req.onreadystatechange = fetchurlDISP; req.open("GET", url, true); req.send(""); var E=document.getElementById(FETCHDISPLAY); if (E!=null) { var R='

'; E.innerHTML=R; } } } function fetchurlDISP() { if (HTTPREQUEST.readyState == 4) { if (HTTPREQUEST.status == 200) { var E=document.getElementById(FETCHDISPLAY); if (E!=null) { if (FETCHDISPLAY.indexOf('MODAL')>=0) { var R=HTTPREQUEST.responseText; R='
'+R+'
'; E.innerHTML=R; } else { var R=HTTPREQUEST.responseText; E.innerHTML=R; } } } } } function SDSET() { var E=document.getElementById("NRDUR"); if (E!=undefined && E!=null) { var V=E.selectedIndex; for (var i=1;i<=4;i++) { var SN='DIVSYM'+i+'VALUE'; var F=document.getElementById(SN); if (F!=undefined && F!=null) { if (F.value!='') { var DSN='SYMPTOMDUR'+i; var G=document.getElementById(DSN); if (G!=null) { G.selectedIndex=V; } } } } } } function SETALLDURA(V) { for (var i=1;i<=4;i++) { var SN='DIVSYM'+i+'VALUE'; var F=document.getElementById(SN); if (F!=undefined && F!=null) { if (F.value!='') { var DSN='SYMPTOMDUR'+i; var G=document.getElementById(DSN); if (G!=null) { G.selectedIndex=V; } } } } } function displayHeightEdit() { var D=document.getElementById("EDITHEIGHT"); D.style.display=''; } function calcHAndClose() { var E=document.getElementById("height"); var F=document.getElementById("heightDISPLAY"); var cm=document.getElementById("cm").value; var feet=document.getElementById("feet").value; var inches=document.getElementById("inches").value; cm=trim(cm); feet=trim(feet); inches=trim(inches); if (cm.length==0) { feet=parseInt(feet); inches=parseInt(inches); var X=feet*30.48+inches*2.54; X=0.01*parseInt(X*100); cm=parseFloat(feet)*12.0 + parseFloat(inches); cm*=2.54; if ((''+X)=='NaN') { F.innerHTML=''; E.value=''; } else { var cmcc=''+X; if (cmcc.indexOf('.')>0) cmcc=cmcc.substring(0,cmcc.indexOf('.')); F.innerHTML=cmcc+"cm  ("+feet+"'"+inches+'")'; E.value=X; } } else { cm=0.01*parseInt(cm*100); var totalIN=parseFloat(cm)*0.39; feet=parseInt(totalIN/12); inches=parseInt(totalIN%12); if ((''+cm)=='NaN') { F.innerHTML=''; E.value=''; } else { var cmcc=''+cm; if (cmcc.indexOf('.')>0) cmcc=cmcc.substring(0,cmcc.indexOf('.')); F.innerHTML=cmcc+"cm  ("+feet+"'"+inches+'")'; E.value=cm; } } cm=0.01*parseInt(cm*100); feet=parseInt(feet); inches=parseInt(inches); var D=document.getElementById("EDITHEIGHT"); D.style.display='none'; } function displayWeightEdit() { var D=document.getElementById("EDITWEIGHT"); D.style.display=''; } function calcWAndClose() { var E=document.getElementById("weight"); var F=document.getElementById("weightDISPLAY"); var kg=document.getElementById("kg").value; var pounds=document.getElementById("pounds").value; kg=trim(kg); pounds=trim(pounds); if (kg.length==0) { var X=pounds*0.45359; var kgcc=''+X; if (kgcc.indexOf('.')>0) kgcc=kgcc.substring(0,kgcc.indexOf('.')); F.innerHTML=kgcc+"kg"; E.value=X; } else { var kgcc=''+kg; if (kgcc.indexOf('.')>0) kgcc=kgcc.substring(0,kgcc.indexOf('.')); F.innerHTML=kg+"kg"; E.value=kg; } var D=document.getElementById("EDITWEIGHT"); D.style.display='none'; } function goTOO(u) { alert(u); //window.location=u; } function goTOOA(u,a,p) { var r=u+'&'+a+'='+escape(p); window.location=r; } function addlife(l) { var II='REF'+l; var EE=document.getElementById(II); if (EE!=null) { EE.checked=true; nsverify(); } } function addsymm(l) { var II='SELSYMLINK'+l; var EE=document.getElementById(II); if (EE!=null) { EE.checked=true; nsverify(); } } function nsverify() { modANSearch(); verify(); } function displayTrans(d,m,lg) { } function displayTransDiv(d,lg) { } function submitRankMove() { var d=document.getElementById('rankdd').value; var upd=document.getElementById('rankdir').value; vote(unescape(d),'symptom',upd,'','',''); hideRCD(); } function hideRCD() { var R=document.getElementById('RANKCOMMENTDIV'); if (R!=null) { R.style.display='none'; } } function urank(upd,t,d) { document.getElementById('rankdd').value=d; document.getElementById('rankdir').value=upd; document.getElementById('rankcomment').value=''; toggleDISPLAYOFELEMENTUNDERPARENTAA('RANKCOMMENTDIV',t,0,0,0); var RD=document.getElementById('RANKDIRECTION'); if (RD!=null) { if ('Up'==upd) RD.innerHTML='Suggest move rank of '+unescape(d)+' "UP" for search'; if ('Down'==upd) RD.innerHTML='Suggest move rank of '+unescape(d)+' "DOWN" for search '; } //need to construct query to pass for dirvote } var mapTEXTSIZE=["vsmTXT","bsmTXT","smTXT","asmTXT","msTXT","mmTXT","blmTXT","lmTXT"]; function increaseFontSize() { for (var j=0;j0) { ss=parseInt(ss.replace('pt','')); ss++; S.style.fontSize=ss+'pt'; } } } } function decreaseFontSize() { for (var j=0;j0) { ss=parseInt(ss.replace('pt','')); ss--; S.style.fontSize=ss+'pt'; } } } } function getCSSRule(ruleName, deleteFlag) { // Return requested style obejct ruleName=ruleName.toLowerCase(); // Convert test string to lower case. if (document.styleSheets) { // If browser can play with stylesheets for (var i=0; i