var ISHS = {};ISHS.infoArr = [];ISHS.url = '/ths_banner/xml/grokKizasiWords.xml';ISHS.htmlId = 'InfoseekHotSpotHtmlId';ISHS.sv = 'isweb';ISHS.dispNum = 20;ISHS.tagcloud = true;ISHS.separator = ' ・ ';ISHS.fontSizeArr = ['size="-1"','size="-1"','size="+0" style="font-weight: bold;"'];ISHS.targetBlank = false;ISHS.debug = false;ISHS.errorText = '取得中･･･';ISHS.FuncDownload = function(){try{var targetHTML = document.getElementById(ISHS.htmlId);if(!targetHTML){return false;}var ajaxObj = null;try{ajaxObj = new XMLHttpRequest();}catch(e){try{ajaxObj = new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajaxObj = new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return false;}}}ajaxObj.onreadystatechange = function(){if (ajaxObj.readyState == 4){if(ajaxObj.status == 200){var tmpObj = ajaxObj.responseXML.getElementsByTagName("Term");for(var i = 0, length = tmpObj.length ; i < length ; i++){ISHS.infoArr[i] = tmpObj[i].firstChild.nodeValue;}ISHS.FuncMakeTagCloud();return true;}else{targetHTML.innerHTML = ISHS.errorText;return false;}};return true;};ajaxObj.open("GET",ISHS.url,true);ajaxObj.send("");}catch(e){targetHTML.innerHTML = ISHS.errorText;return false;}return true;};ISHS.FuncMakeTagCloud = function(){var htmlTextArray = [];var targetHTML = document.getElementById(ISHS.htmlId);if(!targetHTML){return false;}var tmpArray = [];for(var i = 0 , length = ISHS.infoArr.length ; i < length ; i++){tmpArray[i] = ISHS.infoArr[i];}for(var i = 0 ; i < ISHS.dispNum ; i++){if(tmpArray.length <= 0){break;}var tmpNum = Math.floor(Math.random()*tmpArray.length);var tmpStr = tmpArray[tmpNum];var tmpFontSize = '';if(ISHS.tagcloud){var tmpFontSize = ISHS.fontSizeArr[Math.floor(Math.random()*ISHS.fontSizeArr.length)];}var tmpHtmlText = '';tmpHtmlText += '<a href="http://search.www.infoseek.co.jp/Hotspot';tmpHtmlText += '?col=HS';tmpHtmlText += '&qt='+encodeURIComponent(tmpStr);tmpHtmlText += '&sv='+ISHS.sv;tmpHtmlText += '" ';tmpHtmlText += (ISHS.targetBlank)? ' target="_top" ' : '';tmpHtmlText += ' >';tmpHtmlText += '<font '+tmpFontSize+'>';tmpHtmlText += tmpStr;tmpHtmlText += '</font>';tmpHtmlText += '</a>';htmlTextArray.push(tmpHtmlText);tmpArray.splice(tmpNum , 1);}if(htmlTextArray.length == '0'){targetHTML.innerHTML = ISHS.errorText;}else{targetHTML.innerHTML = htmlTextArray.join(ISHS.separator);}return true;};
