var date = new Date();
var rnd = new Randomize(date.getDate()*date.getYear());

var f9doc;var script_count=0;tags=document.getElementsByTagName('script');for(i=1;i<tags.length;i++){e=tags[i];if(e.getAttributeNode('src')){ur=e.getAttributeNode('src').value;if(ur.match(/fun9rank/)){script_count+=1;}}}if(script_count<=1){

//var f9page=Math.floor(1+f9mp*Math.random());
var f9page=Math.floor(1+f9mp*rnd.random());

if(f9c<11){var uri="?AssociateTag="+f9at+"&Operation=ItemSearch&ItemSearch.Shared.SearchIndex="+f9si+"&ItemSearch.1.ItemPage="+f9page+"&image_size="+f9sz+"&rank="+f9rk+"&titles="+f9c+"&design="+f9de;}else{var uri="?AssociateTag="+f9at+"&Operation=ItemSearch&ItemSearch.Shared.SearchIndex="+f9si+"&ItemSearch.1.ItemPage="+f9page+"&ItemSearch.2.ItemPage="+(f9page+1)+"&image_size="+f9sz+"&rank="+f9rk+"&titles="+f9c+"&design="+f9de;}if(f9si2)var uri="?AssociateTag="+f9at+"&Operation=ItemSearch&ItemSearch.1.SearchIndex="+f9si+"&ItemSearch.2.SearchIndex="+f9si2+"&ItemSearch.Shared.ItemPage="+f9page+"&image_size="+f9sz+"&rank="+f9rk+"&titles="+f9c+"&design="+f9de;if(f9node){uri+="&ItemSearch.Shared.BrowseNode="+f9node}if(f9key){uri+="&ItemSearch.Shared.Keywords="+f9key}document.write("\<scr"+"ipt type='text/javascript' src='http://fun9rank.appspot.com/fun9rank/jp?Service=AWSECommerceService&Version=2004-10-04&ResponseGroup=Small,Images&ContentType=text/html&Style=http://fun9.net/text/xsl/fun9rank03.xsl",uri.replace("?","&"),"'  charset='UTF-8'\>","\</script\>");};


function Randomize(seed) {
  this.srand=function(seed) {
    tmpdt=new Date();
    this.seed=this.srand.arguments.length ? seed : tmpdt.getSeconds()*1000+tmpdt.getMilliseconds();
  }

  this.random=function() {
    this.seed=(this.seed*2061+7)%65536;
    return this.seed/65536;
  }
  this.randomi=function(range) {
    return Math.floor(this.random()*range*10)%range;
  }

  Randomize.arguments.length ? this.srand(seed) : this.srand();
}
