function maxArray( tagArr ) {	// this function calculates the maximum value in the associative array	var max = 0;	for(var i in tagArr){  	    if (tagArr[i] > max) {  	    		max = tagArr[i];  	    	}  	}  	//alert(max);  	return max;}function minArray( tagArr, maximum ) {	// this function calculates the minimum value in the associative array	var min = maximum;	var count = 0;	for(var i in tagArr){		if (! isNaN(tagArr[i])) {			if (tagArr[i] < min) {  		    		min = tagArr[i];		  	    	//alert(min);  	    		}  	    	}  	    	count++;  	}  	return min;}function drawTagCloud(vtagMap, maxStyle) {		// this function draws the tag cloud using the associative javascript array generated by the Notes view	// calculate the maximum entries in the cloud. if not found, no tags are found	var maxEntries = maxArray(vtagMap);	if (maxEntries==0) {		document.write('No tags found');		alert('No tags found');	}		//	calculate the minimum entries in the cloud	var minEntries = minArray(vtagMap, maxEntries);		// calculate the range	var range = maxEntries - minEntries;	if (range <= 0) {		range = 1; 	}		// loop through the tag map to draw each tag.	for(var tag in vtagMap){		if (! isNaN(vtagMap[tag])) {			//alert(tag);	  		drawTag(tag, vtagMap[tag], minEntries, maxEntries, maxStyle);			//alert(vtagMap[tag]);	  	}  	}}function drawTag(tag, count, min, max, maxStyle) {  // alert(tag + " = " + count);  // this function renders a tag line. first determine  // the size tag to use for this tag count  var sizeTag = Math.round((((maxStyle-1)/(max-min))*count) +(1*max-maxStyle*min)/(max-min));    // now write the link to the page  //alert('<a href="yoururl" class="tag' + sizeTag + '">' + tag + '</a>&nbsp;');  //document.write('<a href="javascript:openView(\''+dbname+'//search?SearchView&SearchOrder=4&query=[Tags]%20Contains%20' + tag + '\');" class="tag' + sizeTag + '">' + tag + '</a> ');  document.write('<a href="'+dbname+'/suchen.xsp?suche=' + tag + '" class="tag' + sizeTag + '">' + tag + '</a> ');}