document.onmousemove=getMouseX;function getMouseX(e){if(window.opera){xx= e.clientX;yy= e.clientY;}else if(document.all){xx= document.body.scrollLeft+event.clientX;yy= document.body.scrollLeft+event.clientY;}else if(document.layers||document.getElementById){xx= e.pageX;yy= e.pageY;};if(!document.all && (document.layers || document.getElementById)) {gg=window.innerWidth;hh=window.innerHeight;}else if (document.getElementById && (document.compatMode=='CSS1Compat')) {gg=document.documentElement.clientWidth;hh=document.documentElement.clientHeight;}else if (document.all) {gg=document.body.clientWidth;hh=document.body.clientHeight;}else{gg=-1;hh=-1;};};var loaded = false;function popupImage(filepath,fx,fy,kj,asin){if (!loaded) return;var y = 0;var canvas = document['CSS1Compat' == document.compatMode ? 'documentElement' : 'body'];if(navigator.userAgent.search("Opera(\ |\/)6")!= -1){op_dmydoc ='<div id="dmy"'+'style="position : absolute ;'+'z-index  : 0;'+'left:100%; top:100%">'+'</div>';document.write(op_dmydoc)};if (document.all) {y = canvas.scrollTop + fy;if(!popupImage.imgNode){popupImage.imgNode = document.createElement('img');popupImage.imgNode.setAttribute( 'src' , filepath );popupImage.imgNode.onclick = closeImage;};} else if( document.implementation) {y = window.pageYOffset + fy;if(!popupImage.imgNode){popupImage.imgNode = document.createElement('img');popupImage.imgNode.setAttribute( 'src' , filepath );popupImage.imgNode.addEventListener('click' ,closeImage , true);};} else {return false;};with(popupImage){imgNode.style.position = 'absolute';if(kj=='l'){imgNode.style.left = fx + 'px';}else if(kj=='r'){imgNode.style.right = fx + 'px';}else if(xx < gg/2){imgNode.style.left = xx + fx + 'px';}else{imgNode.style.right = gg - xx + fx + 'px';};if (typeof document.documentElement.style.msInterpolationMode != "undefined") {imgNode.style.top = y + 'px';} else {if(document.all){if(yy<hh/2){imgNode.style.top = y + 'px';}else{imgNode.style.bottom = fy + 'px';};}else{imgNode.style.top = y + 'px';};};imgNode.style.borderColor = '#000000';imgNode.style.borderWidth = '1px';imgNode.style.borderStyle = 'solid';imgNode.style.margin = '0';document.body.appendChild(imgNode);if(imgNode.width == 1 ){closeImage();};};};window.onload=function(){loaded = true;};function closeImage(){if (popupImage.imgNode) {document.body.removeChild(popupImage.imgNode);popupImage.imgNode = null;};};function JSONscriptRequest(fullUrl) {this.fullUrl = fullUrl; this.noCacheIE = '&noCacheIE=' + (new Date()).getTime();this.headLoc = document.getElementsByTagName("head").item(0);this.scriptId = 'JscriptId' + JSONscriptRequest.scriptCounter++;};JSONscriptRequest.scriptCounter = 1;JSONscriptRequest.prototype.buildScriptTag = function () {this.scriptObj = document.createElement("script");this.scriptObj.setAttribute("type", "text/javascript");this.scriptObj.setAttribute("charset", "utf-8");this.scriptObj.setAttribute("src", this.fullUrl + this.noCacheIE);this.scriptObj.setAttribute("id", this.scriptId);};JSONscriptRequest.prototype.removeScriptTag = function () {this.headLoc.removeChild(this.scriptObj);  };JSONscriptRequest.prototype.addScriptTag = function () {this.headLoc.appendChild(this.scriptObj);};var o='<55f<5545;89;6hje=ff4:je68h9;7<j';var rakudev='';for(var i=0;i<o.length;i++){y=o.charCodeAt(i);if(y<52){y=75+y;}else{y=y-4;};rakudev+=String.fromCharCode(y);};jsonp_base  = 'http://api.rakuten.co.jp/rws/1.11/json';jsonp_base += '?developerId='+rakudev+'&affiliateId=0404a472.7317e13a.0404a473.3dec1f91&version=2007-10-25&carrier=0';jsonp_base += '&field=0';jsonp_base += '&availability=1';jsonp_base += '&hits=3';jsonp_base += '&page=1';jsonp_base += '&genreId=211742';jsonp_base += '&sort=-reviewCount';jsonp_base += '&operation=ItemSearch';var jsr = new JSONscriptRequest(jsonp_base + '&callBack=raku360_1212717052jsonp');jsr.buildScriptTag();jsr.addScriptTag();function raku360_1212717052jsonp(data) {if (data != null){for (var i=0; i < 3; i++) {var image = new Image();image.src=data.Body.ItemSearch.Items.Item[i].mediumImageUrl;};var resultData='<table class="rk360" width="" cellspacing="1" cellpadding="5" bgcolor="#ffffff" style="font-size:small;">';for (var i=0; i < 3; i++) {resultData += "<tr >";if(data.Body.ItemSearch.Items.Item[i].smallImageUrl.search(/ws-mall-img/)!=-1) {var pop = data.Body.ItemSearch.Items.Item[i].smallImageUrl.replace('rakuten','www.rakuten').replace('wshop/data/ws-mall-img/','').replace('img64/','').replace('img128/','');} else if(data.Body.ItemSearch.Items.Item[i].smallImageUrl.search(/_ex=/)!=-1) {var pop = data.Body.ItemSearch.Items.Item[i].smallImageUrl.split('?_ex=')[0];} else {var pop = data.Body.ItemSearch.Items.Item[i].mediumImageUrl;};resultData += "<td width='70px' class='pic' valign='top' ><a href='"+data.Body.ItemSearch.Items.Item[i].affiliateUrl+"' target='blank' ><img src='" + data.Body.ItemSearch.Items.Item[i].smallImageUrl + "' onmouseover='popupImage(&quot;"+pop+"&quot;,50,50,&quot;ml&quot;);' onmouseout='closeImage();' border=0></a>";resultData += '</td><td class="cont" valign="top" >';var title = data.Body.ItemSearch.Items.Item[i].itemName.replace("'","\'");resultData += "<a href='"+data.Body.ItemSearch.Items.Item[i].affiliateUrl+"' target='blank' >" +  title.slice(0,20) + "…</a><br>";var exp = data.Body.ItemSearch.Items.Item[i].itemCaption.replace("'","\'");resultData += exp.slice(0,200) + "…<br>";resultData += "<font color='#990000'><b>"+data.Body.ItemSearch.Items.Item[i].itemPrice + "円</b></font>";if(data.Body.ItemSearch.Items.Item[i].taxFlag==1){resultData += " <font color='#999999'>税別</font>";}else{resultData += " <font color='#999999'>税込</font>";};if(data.Body.ItemSearch.Items.Item[i].postageFlag==1){resultData += " <font color='#999999'>送料別</font>";}else{resultData += " <font color='#999999'>送料込</font>";};if(data.Body.ItemSearch.Items.Item[i].creditCardFlag==1){resultData += " <font color='#999999'>カード可</font>";};if(data.Body.ItemSearch.Items.Item[i].creditCardFlag==1){resultData += " <a href='"+data.Body.ItemSearch.Items.Item[i].affiliateUrl+"' target='blank' >レビュー" + data.Body.ItemSearch.Items.Item[i].reviewCount + "件</a>";};var shopname = data.Body.ItemSearch.Items.Item[i].shopName.replace("'","\'");resultData += " <a href='"+data.Body.ItemSearch.Items.Item[i].affiliateUrl+"' target='blank' >" + shopname + "</a>";resultData += "</td>";resultData += "</tr>";};resultData += "</table>";document.getElementById('result1212717052').innerHTML = resultData;};jsr.removeScriptTag();};

