/*@cc_on _d=document;eval('var document=_d')@*/
function DWBanner(user_id){
	var banner = new Array();
	var banner_two = new Array();
	var banner_three = new Array();
	
	//block1
	banner[0] = new Array('http://image.sbs-ad.com/sozai/102/1/700x150.jpg','トリプルエックス','http://www.xxx-av.com/home/home.html','102');
	banner[1] = new Array('http://image.sbs-ad.com/sozai/114/1/uraaaa700_200.jpg','Venusg Gllery','http://www.venus-gallery.com/event/0710_beach.html','114');
	banner[2] = new Array('http://image.sbs-ad.com/sozai/122/1/akjidou700_200.jpg','Angel Kiss','http://www.angelkisskiss.com/event/details/119.html','122');
	banner[3] = new Array('http://image.sbs-ad.com/sozai/129/1/tsubaki_1207_700_150.gif','anan-AV','http://www.anan-av.com/mov/content/1207/','129');
	//block2
	banner_two[0] = new Array('http://image.sbs-ad.com/sozai/107/1/052s_700x200.jpg','丸の穴ピカデリー','http://www.marupika.com/list.php?keyword=052s','107');
	banner_two[1] = new Array('http://image.sbs-ad.com/sozai/119/1/hclub_700x150.jpg','人妻クラブ','http://www.093-club.com/home/home.html','119');
	banner_two[2] = new Array('http://image.sbs-ad.com/sozai/124/1/a700_01.jpg','Pinky','http://www.pinky-gal.com/home/home.html','124');
	banner_two[3] = new Array('http://image.sbs-ad.com/sozai/104/1/700x200.08.jpg','CLUB-XXX','http://www.club-xxx.net/home/','104');
	//block3
	banner_three[0] = new Array('http://image.sbs-ad.com/sozai/127/1/090717_700x200.jpg','WORLD COLLECTION','http://www.worldcolle.com/event/details/122','127');
	banner_three[1] = new Array('http://image.sbs-ad.com/sozai/125/1/eve_tosatsu_700x200.jpg','1919GoGo','http://www.1919gogo.com/home/home.html','125');
	banner_three[2] = new Array('http://image.sbs-ad.com/sozai/126/1/dm_open02_700_200.jpg','男道ミサイル ゲイボーイ','http://www.missile-gayboy.com/home.html','126');
	banner_three[3] = new Array('http://image.sbs-ad.com/sozai/115/1/nakadasi_700x200.jpg','Street GALS','http://www.street-gals.com/home/','115');
	
	var rand_num = Math.floor(Math.random() * banner.length);
	var rand_num_two = Math.floor(Math.random() * banner_two.length);
	var rand_num_three = Math.floor(Math.random() * banner_three.length);
	var header = '<p style="margin:0px 0px 6px 0px;"><a href="http://www2.sbs-ad.com/track/traffic.php?c=';
	var a_url  = '&u=';
	var a_alt  = '" alt="';
	var a_title = '" title="';
	var bn_id  = '-3201-';
	var middle = '" target="_blank"><img style="border-style:none;" src="';
	//var footer = '" width="700" height="200" target="_blank"/></a></p>';
	var footer = '" target="_blank"/></a></p>';

	return document.write(
			header,	user_id,bn_id,banner[rand_num][3],
			a_url,	banner[rand_num][2],
			a_title,banner[rand_num][1],
			middle,	banner[rand_num][0],
			a_alt,	banner[rand_num][1],
			footer,
			
			header,	user_id,bn_id,banner_two[rand_num_two][3],
			a_url,	banner_two[rand_num_two][2],
			a_title,banner_two[rand_num_two][1],
			middle,	banner_two[rand_num_two][0],
			a_alt,	banner_two[rand_num_two][1],
			footer,
			
			header,	user_id,bn_id,banner_three[rand_num_three][3],
			a_url,  banner_three[rand_num_three][2],
			a_title,banner_three[rand_num_three][1],
			middle,	banner_three[rand_num_three][0],
			a_alt,  banner_three[rand_num_three][1],
			footer
		);
}
function WSMovieData(user_id,site_id,NumberRows,Maxnum){
  var x_size =  120;
  var y_size =  120;
  var x_size_cell = x_size +2;
  var y_size_cell = y_size+ 30;
  var size = (x_size + 4) * NumberRows;
  var chWidth = size +'px';

	function IsGecko(){
	    if(navigator){
	        if(navigator.userAgent){
				if(navigator.userAgent.indexOf("Gecko/") != -1){
				    return true;
				}
	        }
	    }
	    return false;
	}
  var userid = user_id;
  var siteid = site_id;
  var NumberRows = NumberRows;
  var Maxnum = Maxnum;
  var afurl = 'http://www2.sbs-ad.com/track/traffic.php?c='+ userid +'-3203-'+ siteid +'&u=';
  var div = document.createElement('div');
  var ul = document.createElement('ul');

  div.style.border = 'solid 2px #FFFFFF';
  div.style.fontSize = '12px';
  div.style.backgroundColor = '#FFFFFF';
  div.style.width = chWidth;
  div.style.padding = '0px';
  div.style.textAlign = 'left';
  if( typeof(eval("ec"+siteid).posts.movies ) != 'undefined' ){
    	for (var i=0, item; item = eval("ec"+siteid).posts.movies[i]; i++){
    		if(i >= Maxnum){ break; }
    		
		var cell = document.createElement('div');
		var title_cell = document.createElement('div');
		var a = document.createElement('a');
		var img = document.createElement('img');
		if(IsGecko()) {
		      cell.style.cssFloat = 'left';
		} else {
		      cell.style.styleFloat = 'left';
		}
   		
		cell.style.width = x_size_cell+'px';
		cell.style.height = y_size_cell+'px';
		cell.style.padding = '1px';
		cell.style.margin = '0px';
		cell.style.overflow = 'hidden';
		cell.style.textAlign = 'center';
		
		a.setAttribute('href', afurl+item.link);
		a.setAttribute('target','_blank');
		a.style.color = 'blue';	//'#000000';
		a.style.fontSize = '120%';
		a.style.fontWeight = 'bold';
		a.title = item.comment;
  		
		img.setAttribute('src', item.square)
		img.alt = item.comment;
		img.style.borderStyle = 'none';
		img.width = x_size;
		img.height = y_size;
		
		title_cell.style.height = '1.1em';
		title_cell.style.overflow = 'hidden';
		title_cell.style.cursor = 'pointer';
		title_cell.appendChild(document.createTextNode(item.m_title));
		
		a.appendChild(img);
		a.appendChild(title_cell);
		
		cell.appendChild(a);
		cell.appendChild(document.createTextNode('Date: '));
		cell.appendChild(document.createTextNode(item.date));
		div.appendChild(cell);
	}
 document.getElementById('s'+siteid).appendChild(div);
 }
}