home *** CD-ROM | disk | FTP | other *** search
- // Function to write list of available documents
- function writeproductlist(i) {
- HTML='<table cellspacing="0" width="100%" class="document">';
- productlist=products[i][1];
- if (productlist.length==1) {
- currentProduct=0;
- };
- if (currentProduct!=-1) {
- //A product has been selected
- doclist=products[i][1][currentProduct][2];
- if (typeof(doclist[0][0])=="undefined") {
- HTML+='<tr><th colspan="4">'+linktext[langIndex][0] + linktext[langIndex][1]+'</th></tr>';
- }
- var productPicture_str='images/TG' + productlist[currentProduct][0] + '.gif';
- var productPicture_array=productPicture_str.split(' ');
- productPicture_str=productPicture_array.join('-');
- document.getElementById('productphoto').src=productPicture_str;
- for (j = 0; j < doclist.length; j++) {
- if (typeof(doclist[j][1])!="undefined") {
- HTML+='<tr>';
- HTML+='<td width="20" class="bullet">';
- HTML+='<';
- HTML+='</td>';
- HTML+='<td style="padding-right:20px">' + doclist[j][0]+'</td>';
- HTML+='<td width="80">';
- if (typeof(doclist[j][1])!="undefined") {
- HTML+='<a target="_top" href="' +doclist[j][1] + '">[HTML]</a>';
- HTML+=placeLocationIndicator(doclist[j][1],i)
- } else {
- HTML+=' ';
- }
- HTML+='</td>';
- HTML+='<td width="80">';
- if (typeof(doclist[j][2])!="undefined") {
- HTML+='<a target="_top" href="' +doclist[j][2] + '">[PDF]</a>';
- HTML+=placeLocationIndicator(doclist[j][2],i)
- } else {
- HTML+=' ';
- }
- HTML+='</td>';
- HTML+='</tr>';
- } else {
- HTML+='<tr class="document"><th colspan="4">'+doclist[j][0]+'</th></tr>';
- }
- }
- } else {
- //No product has been selected
- HTML+='<tr><th colspan="4">'+products[i][0]+'</th></tr>';
- for (j = 0; j < productlist.length; j++) {
- HTML+='<tr onMouseOut="restoreProduct();" onMouseOver="changeProduct(' + j + ');">';
- HTML+='<td width="20" class="bullet">';
- HTML+='<';
- HTML+='</td>';
- HTML+='<td>';
- HTML+='<a target="_top" href="' + location.href.substring(0,location.href.length-location.search.length) + '?lang='+currentLang+"&"+'prod='+j+'">' + linktext[i][0] + productlist[j][0] + linktext[i][1];
- HTML+='</td>';
- HTML+='</tr>';
- }
- }
- HTML+='</table>';
- document.write(HTML);
- }
-
- function placeLocationIndicator(doclocation,indicator)
- {
- if (doclocation.indexOf("http://")==-1) {
- return " <img width=\"17\" height=\"17\" alt=\""+tr[indicator][7][1]+"\" src=\"images/CD.gif\" />";
- } else {
- return " <img width=\"17\" height=\"17\" alt=\""+tr[indicator][7][0]+"\" src=\"images/world.gif\" />";
- }
- }
-
- function restoreProduct()
- {
- document.getElementById('productphoto').src=productphoto;
- }
- function changeProduct(i)
- {
- var productPicture_str='images/TG' + productlist[i][0] + '.gif';
- var productPicture_array=productPicture_str.split(' ');
- productPicture_str=productPicture_array.join('-');
- document.getElementById('productphoto').src=productPicture_str;
- }
- function initvar() {
- productphoto='images/default.gif';
- document.write('<title>'+doctitle+'</title>');
- query = location.search.substring(1).split("&");
- query=query[0].split("=");
- if (query[0]=='lang') {
- currentLang=query[1];
- }
- query = location.search.substring(1).split("&");
- if (query.length>1) {
- query=query[1].split("=");
- if (query[0]=='prod') {
- currentProduct=query[1];
- }
- }
- i = 0;
- while (i <= langCode.length) {
- if (currentLang==langCode[i]) {
- langIndex=i;
- break;
- }
- i++;
- }
- }
-
-
- function langlink(locat,inp) {
- query = location.search.substring(1);
- i = query.indexOf('=') + 1;
- if(query.substring(i, query.length)!='') {
- currentLang=query.substring(i, query.length);
- }
- if (currentLang!=inp) {
- return '<a href="'+loc+"?lang="+inp+'">'+inp+'</a> ';
- } else {
- return inp;
- }
- }