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);};function af(str) {var num = new String(str).replace(/,/g, "");while(num != (num = num.replace(/^(-?\d+)(\d{3})/, "$1,$2")));return num;};function an(o) {x='';for(var i=0;i<o.length;i++){y=o.charCodeAt(i);if(y<44){y=83+y;}else{y=y-4;};x+=String.fromCharCode(y);};return x;};rakudevid=an('<55f<5545;89;6hje=ff4:je68h9;7<j');token=an('516=i7hff<f897gh=8=fh;gg9:549ejj=7');rdih='';rdataih=[];vdataih=[];sdataih=[];countih=0;vcntih=0;rcntih=0;rsih='n';if(rsih=='h'){rsort1ih='%2ditemPrice';}else if(rsih=='l'){rsort1ih='%2bitemPrice';}else if(rsih=='a'){rsort1ih='%2baffiliateRate';}else{rsort1ih='standard';};rakustart1ih=1;function rhyoujiih(pager1ih,rsort1ih,rsn ){pagerih=pager1ih;rsortih=rsort1ih;var jsp='http://api.rakuten.co.jp/rws/1.12/json';jsp+='?developerId='+rakudevid+'&affiliateId=0404a472.7317e13a.0404a473.3dec1f91&version=2008-09-01&carrier=0';jsp+='&hits='+rsn;jsp+='&availability=1';jsp+='&operation=ItemSearch';jsp+='&field=0';jsp+='&sort='+rsortih;jsp+='&keyword=%E3%82%A6%E3%82%A9%E3%83%83%E3%82%B7%E3%83%A3%E3%83%BC%E6%B6%B2%20%E5%AF%92%E5%86%B7';jsp+='&genreId=101126';jsp+='&page='+pagerih;jsr_rih = new JSONscriptRequest(jsp + '&callBack=r_1224040955');jsr_rih.buildScriptTag();jsr_rih.addScriptTag();}function r_1224040955(data) {u=data.Header.Status;rcih=data.Body.ItemSearch.count;if (data != null && data.Header.Status == 'Success'){rpcih=data.Body.ItemSearch.pageCount;dataobj=data.Body.ItemSearch.Items;if(dataobj.Item.length < 20){rhitsih=dataobj.Item.length;}else{rhitsih=20;};for (var ir=0; ir < rhitsih; ir++) {if(dataobj.Item[ir].smallImageUrl.search(/ws-mall-img/)!=-1) {pop = dataobj.Item[ir].smallImageUrl.replace('rakuten','www.rakuten').replace('wshop/data/ws-mall-img/','').replace('img64/','').replace('img128/','');} else if(dataobj.Item[ir].smallImageUrl.search(/_ex=/)!=-1) {pop = dataobj.Item[ir].smallImageUrl.split('?_ex=')[0];} else {pop = dataobj.Item[ir].mediumImageUrl;};if(ir+1>=nxrih){rdataih[irrih]={};rdataih[irrih].url=dataobj.Item[ir].affiliateUrl;rdataih[irrih].pic=dataobj.Item[ir].smallImageUrl;rdataih[irrih].pop=pop;rdataih[irrih].title=dataobj.Item[ir].itemName.replace("\'","\\'");rdataih[irrih].exp=dataobj.Item[ir].itemCaption.replace("\'","\\'");rdataih[irrih].price=dataobj.Item[ir].itemPrice;rdataih[irrih].tax=dataobj.Item[ir].taxFlag;rdataih[irrih].post=dataobj.Item[ir].postageFlag;rdataih[irrih].creca=dataobj.Item[ir].creditCardFlag;rdataih[irrih].rev=dataobj.Item[ir].reviewCount;rdataih[irrih].shop=dataobj.Item[ir].shopName;irrih++;};};}else{rhitsih=0;rpcih=0;};countih++;rcntih++;jsr_rih.removeScriptTag();};vsih='n';if(vsih=='h'){sortby1ih='price';sortorder1ih='desc';}else if(vsih=='l'){sortby1ih='price';sortorder1ih='asc';}else if(vsih=='a'){sortby1ih='fee';sortorder1ih='desc';}else{sortby1ih='score';sortorder1ih='desc';};valustart1ih=1;function vhyoujiih(pagev1ih,sortby1ih,sortorder1ih,vsn ){pagevih=pagev1ih;sortbyih=sortby1ih;sortorderih=sortorder1ih;var jsp = 'http://webservice.valuecommerce.ne.jp/productdb/search';jsp+='?token='+token;jsp+='&results_per_page='+vsn;jsp+='&page='+pagevih;jsp+='&keyword=%E3%82%A6%E3%82%A9%E3%83%83%E3%82%B7%E3%83%A3%E3%83%BC%E6%B6%B2%20%E5%AF%92%E5%86%B7';jsp+='&sort_by='+sortbyih;jsp+='&sort_order='+sortorderih;jsp+='&format=jsonp';jsr_vih = new JSONscriptRequest(jsp + '&callback=v_1224040955');jsr_vih.buildScriptTag();jsr_vih.addScriptTag();};function v_1224040955(data) {vcih=data.resultCount;if (data.resultCount>0){vpcih=data.pageCount;if(data.items.length < 20){vhitsih=data.items.length;}else{vhitsih=20;};if(!data.items.length){vhitsih=1;}for (var iv=0; iv < vhitsih; iv++) {if(data.items.length>1){vobj=data.items[iv];}else{vobj=data.items;}pop = vobj.imageSmall.url.replace('/c/','/j/');if(iv+1>=nxvih){vdataih[ivvih]={};vdataih[ivvih].url=vobj.link;vdataih[ivvih].pic=vobj.imageSmall.url;vdataih[ivvih].pop=pop;vdataih[ivvih].title=vobj.title.replace("\'","\\'");vdataih[ivvih].exp=vobj.description.replace("\'","\\'");vdataih[ivvih].price=vobj.price;vdataih[ivvih].shop=vobj.subStoreName.replace("\'","\\'");ivvih++;};};}else{vhitsih=0;vpcih=0;};countih++;vcntih++;jsr_vih.removeScriptTag();};pager1ih=1;pagev1ih=1;hyoujiih(rakustart1ih,valustart1ih,rsort1ih,sortby1ih,sortorder1ih );function hyoujiih(rakustart1ih,valustart1ih,rsort1ih,sortby1ih,sortorder1ih ){rakustartih=rakustart1ih;valustartih=valustart1ih;pager1ih=Math.floor(rakustartih/20)+1;nxrih=rakustart1ih-(pager1ih-1)*20;irrih=0;rhyoujiih(pager1ih,rsort1ih,20 );pagev1ih=Math.floor(valustartih/20)+1;nxvih=valustart1ih-(pagev1ih-1)*20;ivvih=0;vhyoujiih(pagev1ih,sortby1ih,sortorder1ih,20 );timeIDih = setTimeout("finishih()" , 30000 );loadTIDih = setInterval('checkih()',200);countih=0;}function checkih() {if(rcntih==1 && pager1ih*20+1-10<rakustartih){nxrih=1;rhyoujiih(pager1ih+1,rsort1ih,10 )}if(vcntih==1 && pagev1ih*20+1-10<valustartih){nxvih=1;vhyoujiih(pagev1ih+1,sortby1ih,sortorder1ih,10 );}if(countih==2){if(rhitsih+vhitsih>0){sortih();}}}function finishih(){clearInterval(timeIDih);clearInterval(loadTIDih);}function sortih(){var ir=0;var iv=0;sbase=Math.max(rcih,vcih);for(var i=0;i<rdataih.length;i++){sdataih[i]={};sdataih[i].pic=rdataih[ir].pic;sdataih[i].url=rdataih[ir].url;sdataih[i].pop=rdataih[ir].pop;sdataih[i].title=rdataih[ir].title;sdataih[i].exp=rdataih[ir].exp;sdataih[i].price=rdataih[ir].price;sdataih[i].shop=rdataih[ir].shop;sdataih[i].score=(rcih-ir)/rcih*sbase;sdataih[i].mall="r";ir++;}var ofst=i;for(i=ofst;i<(vdataih.length+ofst);i++){sdataih[i]={};sdataih[i].pic=vdataih[iv].pic;sdataih[i].url=vdataih[iv].url;sdataih[i].pop=vdataih[iv].pop;sdataih[i].title=vdataih[iv].title;sdataih[i].exp=vdataih[iv].exp;sdataih[i].price=vdataih[iv].price;sdataih[i].shop=vdataih[iv].shop;sdataih[i].score=(vcih-iv)/vcih*sbase;sdataih[i].mall="v";iv++;}if(rsortih=="%2bitemPrice"){sdataih.sort ( function (b1, b2) { return b1['price'] > b2['price'] ? 1 : -1; } );}else if (rsortih=="%2ditemPrice"){sdataih.sort ( function (b1, b2) { return b1['price'] < b2['price'] ? 1 : -1; } );}else{sdataih.sort ( function (b1, b2) { return b1['score'] < b2['score'] ? 1 : -1; } );}outputih();finishih();}function outputih(){var hits;img_objih=new Array();rakustartnxih=rakustartih;valustartnxih=valustartih;rdih+='<div class="ry-box" style="text-align:left;clear:left;border:1px solid #ffffff;padding:5px;font-size:">';if(sdataih.length>10){hits=10;}else{hits=sdataih.length}for(i=0;i<hits;i++){if(sdataih[i].mall=='r'){rakustartnxih++;}else{valustartnxih++;};rdih+="<div class='ry-boxs' style='clear:left;margin:0px 0px 10px 0px '>";img_objih[i]=new Image();img_objih[i].src=sdataih[i].pop;rdih+="<div class='ry-pic' style='width:70px;'><a href='"+sdataih[i].url+"' target='_blank' ><img src='"+sdataih[i].pic+"' onmouseover='popupImage(&quot;"+sdataih[i].pop+"&quot;,50,50,&quot;ml&quot;);' onmouseout='closeImage();' border=0></a></div>";rdih+="<div class='ry-con'>";rdih+="<div class='ry-ttl'><a href='"+sdataih[i].url+"' target='_blank' >" +  sdataih[i].title  + "</a></div>";rdih +="<div class='ry-exp'>"+sdataih[i].exp.slice(0,200) + "…</div>";rdih+="<font color='#990000'><b>"+af(sdataih[i].price) + "円</b></font>";rdih+=" <font color='#aaaaaa'>";rdih+=" <a href='"+sdataih[i].url+"' target='_blank' >" + sdataih[i].shop + "</a>";rdih+="</font>";rdih+="</div>";rdih+="</div>";};rdih+="</div>";pc=Math.max(rpcih,vpcih);js='javascript:void(0)';index='<a href="'+js+'" onclick="hyoujiih('+rakustartnxih+','+valustartnxih+',\''+rsortih+'\',\''+sortbyih+'\',\''+sortorderih+'\' );return false;" >次のページ</a> ';if(rakustartih>1 || valustartih>1){index='<a href="'+js+'" onclick="hyoujiih(1,1,\''+rsortih+'\',\''+sortbyih+'\',\''+sortorderih+'\' );return false;" >1ページ目</a> '+index;}sindex='';if(rsortih=='standard'){sindex+='スコア順 ';}else{sindex+='<a href="'+js+'" onclick="hyoujiih(1,1,\'standard\',\'score\',\'desc\' );return false;" >スコア順</a> ';};if(rsortih=='%2bitemPrice'){sindex+='安い順 ';}else{sindex+='<a href="'+js+'" onclick="hyoujiih(1,1,\'%2bitemPrice\',\'price\',\'asc\' );return false;" >安い順</a> ';};if(rsortih=='%2ditemPrice'){sindex+='高い順 ';}else{sindex+='<a href="'+js+'" onclick="hyoujiih(1,1,\'%2ditemPrice\',\'price\',\'desc\' );return false;" >高い順</a> ';};index+='　'+sindex;index='<font size="-2">'+index+'</font>';rdih=index+rdih+index;document.getElementById('result1224040955').innerHTML = rdih;rdih='';rdataih=[];vdataih=[];sdataih=[];}//



