
//0 標準 1更新（新） 2レビュー 3価格安 4価格高 5ランダム 6料率高
var dsort = new Array("standard","-updateTimestamp","-reviewCount","-itemPrice","%2BitemPrice","random","-affiliateRate");

var script = "http://www.stradition-navi.com/service/r_webItemSearch.php?key=";

keydata = key.split(" ");
data = "";

for(i = 0; i < keydata.length; i++) {
 if(i != 0){ data += '\+'; }
 data += encodeURI(keydata[i]);
}
script += data ;

//if(key2){ script += "%20" + encodeURI(key2); }
//if(key3){ script += "%20" + encodeURI(key3); }
//if(key4){ script += "%20" + encodeURI(key4); }
//if(key5){ script += "%20" + encodeURI(key5); }

if(h){ script += '&h=' + h; }
if(p){ script += '&p=' + p; }
if(s){ script += '&s=' + dsort[s]; }
if(av){ script += '&av=' + av; }
if(fi){ script += '&fi=' + fi; }
if(img){ script += '&img=' + img; }
if(or){ script += '&or=' + or; }
if(cnt){ script += '&cnt=' + cnt; }
if(l){ script += '&l=' + l; }
if(last){ script += '&last=' + last;}
if(nkey){ script += '&nkey=' + encodeURI(nkey);}

script = script.replace("&amp;","&");
scripttag = "<script type=\"text/javascript\" src=\"" + script + "\" charset=\"utf-8\"></script>";

document.write(scripttag);

