//Script for Displaying Downloads with Items Tag 

function displayDownloads() {

  var download = document.getElementsByTagName("input");

  for (var i=0; i<download.length; i++) {

var ischeck = download[i].name.substr(0, 5);  

    if ((ischeck == "check") && (download[i].value!="")){

      	var itemid = "download" + download[i].name.substring(6);

	document.getElementById(itemid).style.display="block";

                      }

          }

}


// Encrypt E-Mailaddresses

function JSrot13(text) {var text = text.replace(/%/, "@");var rot13text_rotated = ""; /* the function will return this string */;for (i = 1 ; i < (text.length + 1); i++) {k = text.charCodeAt(i-1);if (k >= 97 && k <= 109) {k = k + 13;} else if (k >= 110 && k <= 122) {k = k - 13;} else if (k >= 65 && k <= 77) {k = k + 13;} else if (k >= 78 && k <= 90) {k = k - 13;}rot13text_rotated = rot13text_rotated + String.fromCharCode(k);}return rot13text_rotated;}
function Securemail(maillink){var maillink_output;maillink_output = JSrot13(maillink);location.href= 'mailto:' + maillink_output;}function displaymailaddress(linktext){var linktext_output;linktext_output = JSrot13(linktext);linktext_output = linktext_output.replace(/@/, "<span style='display:none'> *secure E-Mailaddress* </span>@");document.write(linktext_output);}

