/*
 * ads.js ver1.6
 * Indivision Inc. 2010-07-07
 */
var imnumber=0,hsnumber=0,task=[],request_flg=false;function ShowIM(d,c,b,a,e,g,f,h,j,k,l,m,n,o){ProcessIM(d,c,b,a,e,g,f,h,j,k,l,m,n,o,false)}function ShowIM_debug(d,c,b,a,e,g,f,h,j,k,l,m,n,o){ProcessIM(d,c,b,a,e,g,f,h,j,k,l,m,n,o,true)}
function ProcessIM(d,c,b,a,e,g,f,h,j,k,l,m,n,o,r){imnumber++;var i=[];i.number=imnumber;i.frame=CheckFrame(d,m,n);i.source=c;i.type=b;i.keywords=a;i.gen=e;i.age=g;i.title_color=CheckColor(f,"#0000EE");i.text_color=CheckColor(h,"#333333");i.url_color=CheckColor(j,"#3CB371");i.bg_color=CheckColor(l,"#CCCCCC");i.border_color=CheckColor(k,"#999999");i.ctxtids=o;i.debug=r;task.push(i);document.write('<iframe width="'+i.frame.width+'" height="'+i.frame.height+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" vspace="0" hspace="0" allowtransparency="true" id="iv_im'+
i.number+'" src="javascript:false">&nbsp;</iframe>');var q=setInterval(function(){if(!request_flg){request_flg=true;var p=task.shift();Loader(function(s){CreateIM(s,p)},p);clearInterval(q);q=null}},100)}
function Loader(d,c){var b="https:"==document.location.protocol?"https://s.indivision.jp/js_flat/":"http://im.ov.yahoo.co.jp/js_flat/",a=encodeURIComponent(document.referrer);b=b+"?source="+c.source+"&type="+c.type+"&ctxtId="+c.ctxtids[Math.floor(Math.random()*c.ctxtids.length)]+"&ctxtUrl="+encodeURIComponent(document.URL)+"&keywordCharEnc=utf8&outputCharEnc=utf8&maxCount="+c.frame.count;b+=a!=""?"&ref="+a:"";b+=c.keywords!=""?"&ctxtKeywords="+encodeURIComponent(c.keywords):"";b+=c.gen!=""?"&gen="+
c.gen:"";b+=c.age!=""?"&age="+c.age:"";var e=document.createElement("script");e.type="text/javascript";if(window.ActiveXObject)e.onreadystatechange=function(){e.readyState=="complete"&&d(zSr);e.readyState=="loaded"&&d(zSr)};else e.onload=function(){d(zSr)};e.src=b;document.body.appendChild(e);c.debug&&ViewDebug(c,b)}function ViewDebug(d,c){var b=document.createElement("div");b.id=d.frame.name+"_"+d.number;b.innerHTML=d.frame.name+"_"+d.number+":src="+c;document.body.appendChild(b)}
function CreateIM(d,c){if(!(typeof d=="undefined"||d.length<6))if(c.frame.name=="adline")AdLineBody(d,c);else{request_flg=false;var b="",a=c.frame.url=="left"?" float:left;":"";b+="<head>";b+='<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';b+='<meta http-equiv="Content-Style-Type" content="text/css" />';b+='<meta http-equiv="Content-Script-Type" content="text/javascript" />';b+="</head>";b+='<style type="text/css">';b+="/*-- Common styles --*/";b+='.adOverture { position:relative; margin:0; padding:0; font-family:"Lucida Grande","Hiragino Kaku Gothic Pro","\u30d2\u30e9\u30ae\u30ce\u89d2\u30b4 Pro W3","\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af",Geneva,Arial,Verdana,sans-serif !important; text-align:left !important; letter-spacing:normal !important;}';
b+=".adLayout a:link, .adLayout a:visited, .adLayout a:hover, .adLayout a:active { text-decoration:none; }";b+="/*-- common_span --*/";b+=".adLayout a span.adttl { text-decoration:underline; font-weight:bold; font-size:16px; display:block; text-decoration: underline; color: "+c.title_color+";"+a+"}";b+=".adLayout a span.adtext { font-size:12px; display:block; color: "+c.text_color+";}";b+=".adLayout a span.adlink { margin-top:3px; font-size:10px; display:block; color: "+c.url_color+";"+a+"}";b+="#frame { width:"+
(c.frame.width-2)+"px; height:"+(c.frame.height-2)+"px; position:relative; margin:0; padding:0; overflow:hidden; }";b+="#frame .adLayout a { height:100%; display:block; }";b+=c.frame.css;b+=".adInfo{ position:absolute; bottom:0; margin:0; padding:0; width:100% !important; height: "+c.frame.footer_size+"px; clear:both; text-align:right; }";b+=".adInfo ul { margin:0; padding:0; height:"+c.frame.footer_size+"px; font-size:10px; list-style:none; vertical-align:middle; }";b+=".adInfo ul li{ margin:0; padding:0; }";
b+=".adInfo ul li a { margin:0; padding:0 5px 0 0; width:auto; height:auto; text-decoration:none; display:block; }";b+=".border_color { border:1px solid "+c.border_color+"; }";b+=".bg_color { background: "+c.bg_color+"; }";b+="</style>";b+='<body style="background-color: transparent;">';b+='<div id="frame" class="adOverture border_color">';b+='<div class="adInner">';for(a=6;a<d.length;a+=6){b+='<div class="adLayout">';b+='<a href="'+d[a+2]+'" target="_new">';if(c.frame.img)b+='<img src="http://indivision.heartrails-capture.com/'+
c.frame.img+"/?http://"+d[a+4]+'/" />';b+='<span class="adwrap"><span class="adttl">'+d[a+3]+"</span>";if(c.frame.url=="left")b+='<span class="adlink">&nbsp;-&nbsp;'+d[a+4]+"</span>";b+='<span class="adtext">'+d[a]+"</span>";if(c.frame.url=="bottom")b+='<span class="adlink">'+d[a+4]+"</span>";b+="</span></a>";b+="</div>"}b+='<div class="adInfo bg_color">';b+="<ul>";b+="<li>\u30a4\u30f3\u30bf\u30ec\u30b9\u30c8\u30de\u30c3\u30c1&nbsp;-&nbsp;</li>";b+='<li><a href="http://ov.yahoo.co.jp/service/int/index.html?o=IM0028" target="_blank">\u5e83\u544a\u306e\u63b2\u8f09\u306b\u3064\u3044\u3066</a></li>';
b+="</ul>";b+="</div>";b+="</div>";b+="</div>";b+="</body>";a=document.getElementById("iv_im"+c.number).contentWindow.document;a.write(b);a.close()}}
function CheckFrame(d,c,b){var a=[];a.css=".adLayout a span { line-height:120%; } #frame .adLayout a span.adwrap { padding:4px 8px; display:block; }";switch(d){case "w125h151":a.name="w125h151";a.width=125;a.height=151;a.count=1;a.img=false;a.url="bottom";a.css+=" #frame .adLayout { height: 125px; }";a.footer_size=26;break;case "w160h200thumbnail":a.name="w160h200thumbnail";a.width=160;a.height=200;a.count=1;a.img="124x62";a.url="bottom";a.css+=" #frame .adLayout { height: 190px; } #frame .adLayout a img{ border:none; float:left; margin: 4px 16px; border:1px solid #CCCCCC; }";
a.footer_size=26;break;case "w160h600":a.name="w160h600";a.width=160;a.height=600;a.count=4;a.img=false;a.url="bottom";a.css+=" #frame .adLayout { height: 140px; }";a.footer_size=26;break;case "w160h600thumbnail":a.name="w160h600thumbnail";a.width=160;a.height=600;a.count=3;a.img="124x82";a.url="bottom";a.css+=" #frame .adLayout { height: 190px; } #frame .adLayout a img{ border:none; float:left; margin: 4px 16px; border:1px solid #CCCCCC; }";a.footer_size=26;break;case "w200h200":a.name="w200h200";
a.width=200;a.height=200;a.count=2;a.img=false;a.url="bottom";a.css+=" #frame .adLayout { height: 87px; }";a.footer_size=26;break;case "w234h60":a.name="w234h60";a.width=234;a.height=60;a.count=1;a.img=false;a.url=false;a.css=".adLayout a span { line-height:100%; } #frame .adLayout a span.adwrap { padding:1px 8px; display:block; } .adInfo ul li, .adInfo ul li a { display:inline !important;}";a.footer_size=16;break;case "w300h250":a.name="w300h250";a.width=300;a.height=250;a.count=4;a.img=false;a.url=
"left";a.css+=" #frame .adLayout { height:58px; } .adInfo ul li, .adInfo ul li a { display:inline !important;} #frame .adLayout a span.adtext {clear: both; } ";a.footer_size=16;break;case "w300h250thumbnail":a.name="w300h250thumbnail";a.width=300;a.height=250;a.count=2;a.img="86x57";a.url="bottom";a.css+=" #frame .adLayout { height:58px; } .adInfo ul li, .adInfo ul li a { display:inline !important;} #frame .adLayout { height:117px; clear:both; } #frame .adLayout a img{ width:86px; float:left; margin:4px; border:1px solid #CCCCCC; } #frame .adLayout a span.adwrap { float:left; width:185px; }";
a.footer_size=16;break;case "w468h60":a.name="w468h60";a.width=468;a.height=60;a.count=1;a.img=false;a.url="left";a.css+=" #frame .adLayout { height:58px; } .adInfo ul li, .adInfo ul li a { display:inline !important;} .adLayout a span.adtext {clear: both; }";a.footer_size=16;break;case "w430h60":a.name="w430h60";a.width=430;a.height=158;a.count=3;a.img=false;a.url="left";a.css+=" #frame .adLayout { height:46px; } .adInfo ul li, .adInfo ul li a { display:inline !important;} .adLayout a span.adtext {clear: both; }";a.footer_size=16;break;case "w640h60":a.name="w640h60";a.width=640;a.height=158;a.count=3;a.img=false;a.url="left";a.css+=" #frame .adLayout { height:46px; } .adInfo ul li, .adInfo ul li a { display:inline !important;} .adLayout a span.adtext {clear: both; }";a.footer_size=16;break;case "w728h90":a.name="w728h90";a.width=728;a.height=90;a.count=3;a.img=false;a.url="bottom";a.css+=" #frame .adLayout { width:33.3%; float:left; height:72px; } .adInfo ul li, .adInfo ul li a { display:inline !important;}";
a.footer_size=16;break;case "w728h90thumbnail":a.name="w728h90thumbnail";a.width=728;a.height=90;a.count=2;a.img="86x57";a.url="bottom";a.css+=" #frame .adLayout { width:50%; float:left; height:72px; } .adInfo ul li, .adInfo ul li a { display:inline !important;} #frame .adLayout a img { border:none; float:left; margin: 4px; border:1px solid #CCCCCC; }";a.footer_size=16;break;case "free":a.name="free";a.width=b;a.height=parseInt(c)*42+18;a.count=c?c:"5";a.img=false;a.url="left";a.css+=" #frame .adLayout { height:42px; } .adInfo ul li, .adInfo ul li a { display:inline !important;} #frame .adLayout a span.adtext {clear: both; } ";
a.footer_size=16;break;case "freethumbnail":a.name="freethumbnail";a.width=b;a.height=parseInt(c)*72+18;a.count=c?c:"5";a.img="86x57";a.url="bottom";a.css+=" #frame .adLayout { height:72px; } .adInfo ul li, .adInfo ul li a { display:inline !important;} #frame .adLayout a img{ border:none; float:left; margin: 4px; border:1px solid #CCCCCC; }";a.footer_size=16;break;case "adline":a.name="adline";a.width=b;a.height=30;a.count=1;a.img=false;a.url=false;a.css=".adLayout a span { line-height:120%; } .adLayout .pr{ font-size:10px; margin-right:5px; }";
a.footer_size=16;break;default:break}return a}function CheckColor(d,c){var b=d.toString();if(d!="")if(b.match(/(^#[a-f0-9]{3}$)|(^#[a-f0-9]{6}$)/i))return b;return c}
function AdLineBody(d,c){var b="";b+="<head>";b+='<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';b+='<meta http-equiv="Content-Style-Type" content="text/css" />';b+='<meta http-equiv="Content-Script-Type" content="text/javascript" />';b+="</head>";b+='<style type="text/css">';b+='#adLine { position:relative; margin:0; padding:0; font-family:"Lucida Grande","Hiragino Kaku Gothic Pro","\u30d2\u30e9\u30ae\u30ce\u89d2\u30b4 Pro W3","\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af",Geneva,Arial,Verdana,sans-serif !important; text-align:left !important;letter-spacing:normal !important;}';b+=
".adLayout a:link, .adLayout a:visited, .adLayout a:hover, .adLayout a:active { text-decoration:none; }";b+=".adLayout .pr{ font-size:10px; margin-right:5px; }";b+=".adLayout a span.adttl { line-height:120%; text-decoration:underline; font-weight:bold; font-size:16px; color: "+c.title_color+";}";b+=".adLayout a span.adtext { line-height:120%; font-size:12px; color: "+c.text_color+";}";b+=".adLayout .siteHost { float: left; }";b+=".adLayout .info { float: right; }";b+="</style>";b+='<body style="background-color: transparent;">';
b+='<div id="adLine" class="adLayout"><a href="'+d[8]+'" target="_new"><span class="adttl">'+d[9]+'</span><span class="adtext">&nbsp;-&nbsp;'+d[6]+"</span></a><br/>";b+='<div class="siteHost"><span class="pr">'+d[10]+'</span></div><div class="info"><span class="pr">\u30a4\u30f3\u30bf\u30ec\u30b9\u30c8\u30de\u30c3\u30c1 - <a href="http://ov.yahoo.co.jp/service/int/index.html?o=IM0028" target="_blank">\u5e83\u544a\u306e\u63b2\u8f09\u306b\u3064\u3044\u3066</a></span></div></div>';b+="</body>";var a=
document.getElementById("iv_im"+c.number).contentWindow.document;a.write(b);a.close()}
function ShowHS(d,c,b,a,e,g,f){hsnumber++;var h=[];for(var j in c)h.push(j);j=e>h.length?h.length:e;var k=a==""?"s.indivision.jp":a;if(d=="custom")ShowHS_Custom(c,h,b,a,j);else{a="";a=d=="list"?g>180?g:180:g>j*180?g:j*180;e=d=="list"?e*25+20:28;g=CheckColor(f,"#1A54C9");document.write('<iframe width="'+a+'" height="'+e+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" vspace="0" hspace="0" allowtransparency="true" id="iv_hs'+hsnumber+'" src="javascript:false">&nbsp;</iframe>');f=
"";f+="<head>";f+='<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';f+='<meta http-equiv="Content-Style-Type" content="text/css" />';f+='<meta http-equiv="Content-Script-Type" content="text/javascript" />';f+="</head>";f+='<style type="text/css">';if(d=="list"){f+=".overture_other_top { font-size:12px; border-top:1px solid "+g+"; border-bottom:1px solid "+g+"; padding-top : 10px; }";f+=".overture_other_top div { margin:0 auto; }";f+=".overture_other_top ul { margin:0 auto; list-style:none; }";
f+=".overture_other_top li { list-style:none; height:25px; }"}else{f+=".overture_other_top { font-size:12px; height:20px; border-top:1px solid "+g+"; border-bottom:1px solid "+g+"; padding-top:4px; }";f+=".overture_other_top ul { margin:0 auto; list-style:none; }";f+=".overture_other_top li { float:left; width:170px; text-align:center; }"}f+="</style>";f+='<body style="background-color: transparent;">';f+='<div id="hsLine" class="overture_other_top">';f+="<ul>";for(d=0;d<j;d++){e=Math.floor(Math.random()*
h.length);f+='<li><a href="http://'+k+"/sponsor?type="+b+"&ref="+h[e]+'" target="_new">'+c[h[e]]+"</a></li>";h.splice(e,1)}f+="</ul>";f+="</body>";c=document.getElementById("iv_hs"+hsnumber).contentWindow.document;c.write(f);c.close()}}function ShowHS_Custom(d,c,b,a,e){var g="";g+="<ul>";for(var f=0;f<e;f++){var h=Math.floor(Math.random()*c.length);g+='<li><a href="http://'+a+"/sponsor?type="+b+"&ref="+c[h]+'" target="_new">'+d[c[h]]+"</a></li>";c.splice(h,1)}g+="</ul>";document.write(g)}
function ShowHSW(d,c,b,a){hsnumber++;c=[];for(var e in d)c.push(e);a=a>c.length?c.length:a;e="";e+="<ul>";for(c=0;c<a;c++){var g=Math.floor(Math.random()*d.length);e+='<li><a href="http://'+b+"/search?q="+d[g]+'" target="_new">'+d[g]+"</a></li>";d.splice(g,1)}e+="</ul>";document.write(e)};
