_spa="/assets/aj/searchPanelAjax.cfc";_ip="/public/images/";function getPanelConstituent(A){modifyOnClick(A);$.AjaxCFC({type:"GET",url:_spa,method:"gpc",data:{iPID:A},unnamedargs:false,serialization:"json",success:function(B){gpc_result(B)}})}function gpc_result(A){createIt(A);collapseIt_header(A.pid,0)}function modifyOnClick(A){var C=document.getElementById("a_constituent_"+A);var B="javascript:collapseIt("+A+")";C.href=B}function createIt(A){if(A.icc>0){createHeader(A.pid);for(ii=0;ii<A.icc;ii++){createTopRow(ii,A.pid,A.arrcd[ii]);createBottomRow(ii,A.pid,A.arrcd[ii])}createLowerRow(A.pid)}}function createHeader(F){var C=document.createElement("tr");C.id="collapseItHeaderRow_"+F;var Q=document.createElement("td");var O=document.createElement("td");O.className="headerRowConstituent";var B=document.createTextNode(" ");O.appendChild(B);var L=document.createElement("td");L.setAttribute("nowrap","true");L.className="headerRowConstituent";var P=document.createElement("p");P.className="headerPConstituent";var D="(see&nbsp;key)";var A="<b>Applications</b>&nbsp;&nbsp;";var N="<b>&nbsp;&&nbsp;Reactivity </b>&nbsp;&nbsp;";var K=document.createElement("span");K.innerHTML=A;var I=document.createElement("span");I.innerHTML=N;var H=document.createElement("a");H.className="headerAConstituent";H.href="javascript:void(0);";H.onmouseover=function(){onmouseStatus("View Applications key table");return 1};H.onmouseout=function(){onmouseStatus("");return 1};H.onclick=function(){popUp("/assets/popups/popup_applications_table.htm","menubar=0,location=0,toolbar=0,directories=0,width=480,height=450,resizable=0,scrollbars=1")};H.innerHTML=D;var G=document.createElement("a");G.className="headerAConstituent";G.href="javascript:void(0);";G.onmouseover=function(){onmouseStatus("View Applications key table");return 1};G.onmouseout=function(){onmouseStatus("");return 1};G.onclick=function(){popUp("/assets/popups/popup_species_table.htm","menubar=0,location=0,toolbar=0,directories=0,width=380,height=450,resizable=0,scrollbars=1")};G.innerHTML=D;P.appendChild(K);P.appendChild(H);P.appendChild(I);P.appendChild(G);L.appendChild(P);var J=document.createElement("td");J.setAttribute("nowrap","true");J.className="fitWidthHeaderRowConstituent";var M=document.createElement("p");M.className="headerPConstituent";M.innerHTML="<b>Image&nbsp;Abreview&nbsp;Publication</b>&nbsp;";J.appendChild(M);C.appendChild(Q);C.appendChild(O);C.appendChild(L);C.appendChild(J);var E=document.getElementById("content_"+F);E.appendChild(C)}function createTopRow(U,X,F){var P=document.createElement("tr");P.id="collapseItFirstRow_"+X+"_"+(U+1);P.className="colorBackground";var b=document.createElement("td");b.className="whiteBackgroundNoLeftPadd";var M=document.createTextNode(" ");b.appendChild(M);var a=document.createElement("td");a.className="fitWidthTopRowConstituent";var k=document.createElement("p");var c=document.createElement("a");c.href="/index.html?datasheet="+F.abid;c.title=F.spn;var h=document.createTextNode(F.spn+" (ab"+F.abid+")");c.appendChild(h);k.appendChild(c);var g=document.createTextNode(" ");k.appendChild(g);a.appendChild(k);var Z=document.createElement("td");Z.className="topRowConstituent";var j=document.createElement("p");var J="  ";if(F.app.length>0){J=F.app}var L=document.createTextNode(J);j.appendChild(L);Z.appendChild(j);var Y=document.createElement("td");Y.className="topRowConstituent";var O=document.createElement("div");O.className="IconBlock";var I=document.createElement("div");I.className="IconImages";if(F.fimg>0){var W=document.createElement("a");W.href="/index.html?datasheet="+F.abid+"##images";W.title="Images for "+F.spn;var f=document.createElement("img");f.alt="Images";f.style.border="0px";f.src=_ip+"ima_icon.gif";W.appendChild(f);I.appendChild(W)}else{var e=document.createElement("img");e.src=_ip+"ima_icon_off.gif";I.appendChild(e)}var H=document.createElement("div");H.className="IconReviews";if(F.iavg>0){var B=document.createElement("a");B.href="/index.html?pageconfig=reviews&intAbID="+F.abid;B.title=F.spn+" Customer abreviews";var Q="Customer Abreviews: "+F.iavg+" stars (out of 5)";var R=new Array();for(jj=0;jj<5;jj++){R[jj]=document.createElement("img");R[jj].alt=Q;R[jj].title=Q;R[jj].style.border="0px";R[jj].style.height="20px";R[jj].style.width="10px";if(jj<F.iavg){R[jj].src=_ip+"height_sun.gif"}else{R[jj].src=_ip+"height_sun_grey.gif"}B.appendChild(R[jj])}H.appendChild(B)}else{if(F.frev>0){var A=document.createElement("a");A.href="/index.html?pageconfig=reviews&intAbID="+F.abid;A.title=F.spn+" Customer abreviews, currently unrated";var K=document.createTextNode("unrated");A.appendChild(K);H.appendChild(A)}else{H.innerHTML="&nbsp;"}}var G=document.createElement("div");G.className="IconPubs";if(F.fpub>0){var S=document.createElement("a");S.href="/index.html?datasheet="+F.abid+"##references";S.title="Publications referencing "+F.spn;var V=document.createElement("img");V.alt="Specific publication references";V.style.border="0px";V.src=_ip+"NCBI_icon.gif";S.appendChild(V);G.appendChild(S)}else{var T=document.createElement("img");T.src=_ip+"NCBI_icon_off.gif";G.appendChild(T)}O.appendChild(I);O.appendChild(H);O.appendChild(G);var N=document.createElement("div");N.className="NumBlock";var E=document.createElement("div");E.className="NumImages";E.innerHTML=F.nimg;var D=document.createElement("div");D.className="NumReviews";D.innerHTML=F.nrev;var C=document.createElement("div");C.className="NumPubs";C.innerHTML=F.npub;N.appendChild(E);N.appendChild(D);N.appendChild(C);Y.appendChild(O);Y.appendChild(N);P.appendChild(b);P.appendChild(a);P.appendChild(Z);P.appendChild(Y);var d=document.getElementById("content_"+X);d.appendChild(P)}function createBottomRow(S,V,K){var H=document.createElement("tr");H.id="collapseItSecondRow_"+V+"_"+(S+1);H.className="colorBackground";var R=document.createElement("td");R.className="whiteBackground";var O=document.createTextNode(" ");R.appendChild(O);var Q=document.createElement("td");var A=document.createElement("p");var X=document.createElement("span");X.innerHTML=K.des+"<br>";A.appendChild(X);if(K.stc.length){var W=document.createElement("span");W.style.color=K.col;var B=document.createTextNode(K.stc+" conjugated");W.appendChild(B);A.appendChild(W)}Q.appendChild(A);var N=document.createElement("td");if(K.reac.length>0||K.pred.length>0){var F=document.createElement("table");var P=document.createElement("tbody");F.border=0;F.cellPadding=0;F.cellSpacing=0;if(K.reac.length>0){var d=document.createElement("tr");var Z=document.createElement("td");Z.className="applicReactHeader";var h=document.createElement("p");var J=document.createElement("span");var G=document.createTextNode("Reacts with:");J.appendChild(G);h.appendChild(J);Z.appendChild(h);var Y=document.createElement("td");var g=document.createElement("p");var I=document.createElement("span");I.style.color="gray";I.innerHTML="&nbsp;&nbsp;"+K.reac+"&nbsp;&nbsp;";g.appendChild(I);Y.appendChild(g);d.appendChild(Z);d.appendChild(Y);P.appendChild(d)}if(K.pred.length>0){var c=document.createElement("tr");var E=document.createElement("td");E.className="applicReactHeader";var U=document.createElement("p");var f=document.createElement("span");var b=document.createTextNode("Predicted:");f.appendChild(b);U.appendChild(f);E.appendChild(U);var D=document.createElement("td");var T=document.createElement("p");var e=document.createElement("span");e.style.color="gray";e.innerHTML="&nbsp;&nbsp;"+K.pred+"&nbsp;&nbsp;";T.appendChild(e);D.appendChild(T);c.appendChild(E);c.appendChild(D);P.appendChild(c)}F.appendChild(P);N.appendChild(F)}else{var C=document.createElement("p");var a=document.createTextNode("  ");C.appendChild(a);N.appendChild(C)}var M=document.createElement("td");H.appendChild(R);H.appendChild(Q);H.appendChild(N);H.appendChild(M);var L=document.getElementById("content_"+V);L.appendChild(H)}function createLowerRow(B){var D=document.createElement("tr");D.id="collapseItLowerRow_"+B;D.style.height="10px";var A=document.createElement("td");A.colspan="5";D.appendChild(A);var C=document.getElementById("content_"+B);C.appendChild(D)}function collapseIt_header(F,A){var B=document.getElementById("collapseIt_img_"+F);var E=document.getElementById("collapseIt_strHead_"+F);var D=document.getElementById("strHeadCollapsedContent_"+F);var C=document.getElementById("strHeadExpandedContent_"+F);if(A==0){E.innerHTML=C.value;B.src="/public/images/minusbottom.gif"}else{E.innerHTML=D.value;B.src="/public/images/plusbottom.gif"}}function collapseIt_content(C,B){var A=document.getElementById("intComponentTotal_"+C).value;if(B==0){document.getElementById("collapseItHeaderRow_"+C).style.display="";for(i=1;i<=A;i=i+1){document.getElementById("collapseItFirstRow_"+C+"_"+i).style.display="";document.getElementById("collapseItSecondRow_"+C+"_"+i).style.display=""}document.getElementById("collapseItLowerRow_"+C).style.display=""}else{document.getElementById("collapseItHeaderRow_"+C).style.display="none";for(i=1;i<=A;i=i+1){document.getElementById("collapseItFirstRow_"+C+"_"+i).style.display="none";document.getElementById("collapseItSecondRow_"+C+"_"+i).style.display="none"}document.getElementById("collapseItLowerRow_"+C).style.display="none"}}function collapseIt(C){var A=document.getElementById("collapseItFirstRow_"+C+"_1");var B=1;if(A.style.display=="none"){B=0}collapseIt_header(C,B);collapseIt_content(C,B)}function doShow(A){if(document.getElementById(A).style.display==""){document.getElementById(A).style.display="none"}else{document.getElementById(A).style.display=""}}function showStates(B){var A=document.getElementById(B).value;if(A=="US"){doShow("USstate");if(document.getElementById("USstate").style.display==""){document.getElementById("strStateCA2LCode").value=""}}else{if(A=="CA"){doShow("CAstate");if(document.getElementById("CAstate").style.display==""){document.getElementById("strStateUS2LCode").value=""}}}};
