<script type="text/javascript">
<!--
function openNewWindow1()
{
window.open('html/request.html');
}
function openNewWindow2()
{
window.open('html/request_e.html');
}
var a = new Array();
var heights = new Array();
var widths = new Array();
var k=0;
var whp=new Array();
<logic:iterate id="element" indexId="index"
property="data.photoInfoList" name="SampleInsertUpadteForm">
<logic:equal value="1" name="element" property="openingPicture">
<logic:notEmpty name="element" property="filePath">
a[k]='<bean:write name="element" property="filePath"/>';
widths[k]='<bean:write name="element" property="width"/>';
heights[k]='<bean:write name="element" property="height"/>';
k++;
</logic:notEmpty>
</logic:equal>
</logic:iterate>
function showlarge(X)
{
var l;
var x=X;
//smallbox[x].style.border="1px solid";
document.imglarge.src=a[x-1];
document.getElementById("hrefimglarge").href=document.imglarge.src;
var o1;
var o2;
if(whp[x]>1){
imglarge.style.width="240px";
l=240/whp[x];
imglarge.style.height=l+"px";
o1=-120;
o2=-l/2;
}else
{l=240*whp[x];
imglarge.style.width=l+"px";
imglarge.style.height="240px";
o1=-l/2;
o2=-120;
}
var marginstr=o2+ "px " + " 0 " +"0 "+o1+"px";
imglarge.style.margin= marginstr;
//document.getElementById(smallbox[c].id).style.borderColor="#FFFFFF";
//alert(smallbox.length);
if(k == smallbox.length-1){
for(var c=1;c<=k;c++){
document.getElementById(smallbox[c].id).style.borderColor="#FFFFFF";
}
}
document.getElementById(smallbox[x].id).style.borderColor="#FF0000";
}
var smallbox=new Array();
function show(){
if(k==0){
document.imglarge.src="image/noimage.jpg";
//document.getElementById("hrefimglarge").href=document.imglarge.src;
document.getElementById("hrefimglarge").onclick = function () { javascript:void(0); };
document.getElementById("hrefimglarge").onmouseover = function () { };
var marginstr=-120+ "px " + " 0 " +"0 "+-120+"px";
imglarge.style.margin= marginstr;
}else if(k==1){
document.imglarge.src=a[0];
document.getElementById("hrefimglarge").href=document.imglarge.src;
// var ima1 = document.createElement('img');
// var smallside = document.getElementById("smallside");
// smallside.appendChild(ima1);
// ima1.src = a[0];
var w=widths[0];
var h=heights[0];
wh=w/h;
whp[1]=wh;
showlarge(1);
}else{
document.imglarge.src=a[0];
document.getElementById("hrefimglarge").href=document.imglarge.src;
wh
var ima = new Array();
for (i = 1; i <= k; i++) {
imgId=i;
var smallside = document.getElementById("smallside");
smallbox[i] = document.createElement('div');
smallbox[i].id=imgId;
smallbox[i].style.width="60px";
smallbox[i].style.height="60px";
smallbox[i].style.background="#ffffff";
smallbox[i].style.position="relative";
smallbox[i].style.border="1px solid";
smallbox[i].style.borderColor="#FFFFFF";
smallside.appendChild(smallbox[i]);
ima[i] = document.createElement('img');
smallbox[i].appendChild(ima[i]);
ima[i].id=imgId;
ima[i].src = a[i-1];
var w=widths[i-1];
var h=heights[i-1];
var wh=w/h;
var l;
var o1;
var o2;
ima[i].style.top="50%";
ima[i].style.left="50%";
ima[i].style.position="absolute";
if(wh>1){
ima[i].style.width="60px";
l = 1/wh*60;
ima[i].style.height=l+"px";
o1=-l/2;
o2=-30;
//ima[i].style.margin-top=o+"px";
}else
{ima[i].style.height="60px";
l = wh*60;
ima[i].style.width=l+'px';
o1=-30;
o2=-l/2;
//ima[i].style.margin-left=o+"px";
}
var marginstr = o1+ "px " + " 0 " +"0 "+o2+"px";
ima[i].style.margin= marginstr;
whp[i]=wh;
document.getElementById(ima[i].id).οnclick=tt(i);
showlarge(1);
}
}
// document.imglarge.onclick = function (event) { return zoomClick(this, event); };
//document.imglarge.onmouseover = function () { zoomPreload(this); };
setupZoom();
}
function tt(i){
//for(int c=1;c<=k;c++){
// document.getElementById(smallbox[c].id).style.borderColor="#FFFFFF";
// }
return function (){showlarge(i);};
}
function search(){
var win = window.showModalDialog('taxnoSel.do',window,"dialogWidth=600px;dialogHeight=420px;center=yes;status=no;resizable=yes;");
if(win != null)
{
document.getElementsByName("data.sample.taxonId")[0].value = win[0];
document.getElementsByName("data.taxonDetail.scientificName")[0].value = '';
document.getElementsByName("data.taxonDetail.japaneseName")[0].value = '';
document.getElementsByName("data.taxonDetail.taxonomy")[0].value = win[18];
}
}
function removeTaxonId(){
if (!doShowMsg('CQ00001', '06')) {
return false;
}
document.getElementsByName("data.sample.taxonId")[0].value = '';
document.getElementsByName("data.taxonDetail.scientificName")[0].value = '';
document.getElementsByName("data.taxonDetail.japaneseName")[0].value = '';
document.getElementsByName("data.sample.identificatorEn")[0].value = '';
document.getElementsByName("data.sample.identificatedSyear")[0].value = '';
document.getElementsByName("data.sample.identificatedSmonth")[0].value = '';
document.getElementsByName("data.sample.identificatedSday")[0].value = '';
document.getElementsByName("data.taxonDetail.taxonomy")[0].value = '';
document.getElementsByName("data.taxonDetail.taxonomyEn")[0].value = '';
return false;
}
$('#userInfoTable').css("display","none");
$('#ngmenu').css("display","none");
$('#tngmenu').css("display","none");
//-->
var documentsId = "";
var documentsClick = true;
var journalRadiotextArr = new Array();
var journalRadioArr = new Array();
var journalRadioCheckBoxArr =new Array();
<logic:notEmpty property="data.documents" name="SampleInsertUpadteForm">
<logic:iterate id="element" indexId="index" property="data.documents" name="SampleInsertUpadteForm">
journalRadioArr[<bean:write name="element" property="journalId"/>]=new Array();
journalRadioArr[<bean:write name="element" property="journalId"/>][0] = getHTMLString('<bean:write name="element" property="author"/>');
//journalRadioArr[<bean:write name="element" property="journalId"/>][0] = getHTMLString('<bean:write name="element" property="authorEn"/>');
journalRadioArr[<bean:write name="element" property="journalId"/>][1] = '<bean:write name="element" property="publicationYear" format="####"/>';
journalRadioArr[<bean:write name="element" property="journalId"/>][2] = getHTMLString('<bean:write name="element" property="title"/>');
//journalRadioArr[<bean:write name="element" property="journalId"/>][2] = getHTMLString('<bean:write name="element" property="titleEn"/>');
journalRadioArr[<bean:write name="element" property="journalId"/>][3] = getHTMLString('<bean:write name="element" property="jpurnal"/>');
//journalRadioArr[<bean:write name="element" property="journalId"/>][3] = getHTMLString('<bean:write name="element" property="jpurnalEn"/>');
journalRadioArr[<bean:write name="element" property="journalId"/>][4] = getHTMLString('<bean:write name="element" property="pages"/>');
journalRadioArr[<bean:write name="element" property="journalId"/>][5] = getHTMLString('<bean:write name="element" property="doi"/>');
journalRadioArr[<bean:write name="element" property="journalId"/>][6] = getHTMLString('<bean:write name="element" property="url"/>');
journalRadioArr[<bean:write name="element" property="journalId"/>][7] = '<bean:write name="element" property="journalId"/>';
journalRadioArr[<bean:write name="element" property="journalId"/>][8] = '<bean:write name="element" property="exclusive"/>';
journalRadioCheckBoxArr[<bean:write name="element" property="journalId"/>]=new Array();
journalRadioCheckBoxArr[<bean:write name="element" property="journalId"/>][0] = '<bean:write name="element" property="openingJournal"/>';
</logic:iterate>
</logic:notEmpty>
journalRadiotextArr[0]='data.journal.author';
//journalRadiotextArr[0]='data.journal.authorEn';
journalRadiotextArr[1]='data.journal.publicationYear';
journalRadiotextArr[2]='data.journal.title';
//journalRadiotextArr[2]='data.journal.titleEn';
journalRadiotextArr[3]='data.journal.jpurnal';
//journalRadiotextArr[3]='data.journal.jpurnalEn';
journalRadiotextArr[4]='data.journal.pages';
journalRadiotextArr[5]='data.journal.doi';
journalRadiotextArr[6]='data.journal.url';
journalRadiotextArr[7]='data.journal.journalId';
journalRadiotextArr[8]='data.journal.exclusive';
// $('#riyo').corner("10px");
//$('#koukayi').corner("10px");
</script>