1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
function init(){
//Initialize the link (href) for the next buttom (optional)
var arrow_right_link=document.createElement('a');
arrow_right_link.id='LienNext';
arrow_right_link.href='#';
arrow_right_link.style.textDecoration='none';
arrow_right_link.appendChild(document.getElementById('arrows_right'));
document.getElementById('highlights-arrow-right').appendChild(arrow_right_link);
//Initialize the link (href) for the previous buttom (optional)
var arrow_left_link=document.createElement('a');
arrow_left_link.id='LienPrevious';
arrow_left_link.href='#';
arrow_left_link.style.textDecoration='none';
arrow_left_link.appendChild(document.getElementById('arrows_left'));
document.getElementById('highlights-arrow-left').appendChild(arrow_left_link);
//initialize the link to open the full page of the research item
var Open_research=document.createElement('a');
Open_research.id='LienOpen';
Open_research.href='#';
Open_research.style.textDecoration='none';
Open_research.appendChild(document.getElementById('SlideShow'));
document.getElementById('highlights-image').appendChild(Open_research);
//Initialize the ttitle of the research
document.getElementById('highlights-text').innerHTML = txt[j];
}
//Set the href of the links
function aleatoire(){
//document.getElementById("SlideShow").src = "img/research/"+image[j]+".jpg";
document.getElementById('LienOpen').href="http://www.domaine.ch/research/resarch-detail?id="+image[j];
document.getElementById('arrows_right').href="javascript:change_to_next();";
document.getElementById('arrows_left').href="javascript:change_to_previous();";
}
//set the next link
function change_to_next(){
j=j+1;
if(j>nbMax){j=1;}
document.getElementById("SlideShow").src = "img/research/"+image[j]+".jpg";
document.getElementById('LienOpen').href="http://www.doamine.ch/research/resarch-detail?id="+image[j];
document.getElementById('highlights-text').innerHTML = txt[j];
}
function change_to_previous(){
j=j-1;
if(j<1){j=nbMax;}
document.getElementById("SlideShow").src = "img/research/"+image[j]+".jpg";
document.getElementById('LienOpen').href="http://www.doamine.ch/research/resarch-detail?id="+image[j];
document.getElementById('highlights-text').innerHTML = txt[j];
}
//set the image name to display
image = new Array();
image[1]="30";
image[2]="24";
image[3]="17";
image[4]="31";
image[5]="26";
image[6]="14";
image[7]="16";
image[8]="15";
image[9]="33";
//Set the text to display for a image
txt = new Array();
txt[1] ='<font>Landslide triggering</font>';
txt[2] ='<font>Evaporation from porous media</font>';
txt[3] ='<font>Acoustic emission detection in soil</font>';
txt[4] ='<font>Wireless sensor network</font>';
txt[5] ='<font>Linking Diffusional Heterogeneity...</font>';
txt[6] ='<font>Shrink-Swell Behavior and Hydraulic Properties...</font>';
txt[7] ='<font>Noninvasive Imaging of Near-Surface...</font>';
txt[8] ='<font>Diffusional Contraints Affecting...</font>';
txt[9] ='<font>Acoustic Emission for Landslide Detection</font>';
-->
</script>
<div id="highlights">
<div id="highlights-background"></div>
<div id="highlights-highlights">
<div><img src="img/highlights/highlight.jpg" align="absmiddle" onLoad="init(); aleatoire();" /> Research Highlights</div>
</div>
<div id="highlights-image"><img src="img/research/30.jpg" alt="reasearch" name="SlideShow" id="SlideShow" /></div>
<div id="highlights-arrow-left"><a name="arrows_left" id="arrows_left">Previous</a></div>
<div id="highlights-arrow-right"><a name="arrows_right" id="arrows_right">Next</a></div>
<div id="highlights-text"></div>
</div>""" |
Partager