// ＥＵＣ−ＪＰ


//====================================================================================================================================================================================================

function ShowListings_footer( disp_count )
{
	var ad_html  = '';

	var ad_html  = new Array(disp_count);
	var ad_count = 0;
	var i=6;

	while (i < zSr.length)
	{

		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)


		ad_html[ad_count]
			=	'<a href="' + clickURL + '" target="_new" class="otblocklink" rel="nofollow">'
			+		'<span class="ottitle">' + title    + '</span><br />'
			+		'<span class="otsent">'  + descr    + '</span><br />'
			+		'<span class="othost">'  + sitehost + '</span>'
			+	'</a>';

		ad_count++;

		if( ad_count >= disp_count )
		{
			i = zSr.length + 1;
		}
	}

	if( ad_count >= 1 )
	{
		var html  = '';
	//	var width = Math.floor( (900 - (10 * ad_count))/ad_count );
		var width = Math.floor( 99 / ad_count );

		for( var i=0 ; i<ad_count ; i++ ){
		//	html += '<div class="overture_footer_ad" style="width:'+ width +'px;">' + ad_html[i] + '</div>';
			html += '<div class="overture_footer_ad" style="width:'+ width +'%">'   + ad_html[i] + '</div>';
		}

		html = '<div  class="overture_footer_ad_frame">' + html + '</div>';
		document.write( html );
	}
}

//====================================================================================================================================================================================================

function ShowListings()
{
	var ad_html  = '';
	var ad_count = 0;
	var i=6;

	while (i < zSr.length)
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

		ad_html +=	'<td valign="top">'
				+		'<p style="text-decoration: none;">'
				+			'<a target="_new" href="' + clickURL + '" class="otblocklink" target="_blank" rel="nofollow">'
				+				'<SPAN class="ottitle">' + title    + '</SPAN><BR>'
				+				'<SPAN class="otsent">'  + descr    + '</SPAN><BR>'
				+				'<SPAN class="othost">'  + sitehost + '</SPAN>'
				+			'</a>'
				+		'</p>'
				+	'</td>';
		ad_count++;
	}

	if( ad_count >= 1 ){
		ad_html =	'<table style="border-style:dotted; border-width: 2px; border-color:#6e9238; width:900px; height:90px;">'
				+		'<tr>'
				+			ad_html
				+		'</tr>'
				+	'</table>';
		document.write(ad_html);
	}
}

//====================================================================================================================================================================================================

function ShowListings_search_right()
{
	var ad_html  = '';
	var ad_count = 0;
	var i=6;

//	if(window.location.search != '') {
//		var table_1 = '<table border="0" cellpadding="0" cellspacing="0" width="200" bgcolor="#e8ffd1" style="margin:15 0 15 0;"><tr><td height="5"></td></tr>';
		var table_1 = '<table border="0" cellpadding="0" cellspacing="0" width="90%" bgcolor="#e8ffd1" style="margin:15 0 15 0;"><tr><td height="5"></td></tr>';
		var table_2 = '<tr><td align="right" style="font-size: 12; color: #777777; padding:4 0 4 0">スポンサーサイト&nbsp;&nbsp;</td></tr>';
		var table_3 = '<tr><td height="5"></td></tr></table>';
		var dispcount = 0;
		var i = 6 + (dispcount * 6);
		while( i < zSr.length )
		{
			var descr    = zSr[i++];	// listing description
			var unused1  = zSr[i++];	// (ignore)
			var clickURL = zSr[i++];	// listing link
			var title    = zSr[i++];	// listing title
			var sitehost = zSr[i++];	// advertiserfs domain name
			var unused2  = zSr[i++];	// (ignore)
			table_2
				+=	'<tr><td valign="center" style="padding:5 4 5 7;">'
				+			'<a href="' + clickURL + '"' + ' class="otblocklink_search_right" target="_blank" rel="nofollow">'
				+				'<span class="ottitle_search_right">' + title    + '</span><br />'
				+				'<span class="otsent_search_right">'  + descr    + '</span><br />'
				+				'<span class="othost_search_right">'  + sitehost + '</span>'
				+			'</a>'
				+	'</td></tr>'
				+	'<tr><td height="1"></td></tr>';
			dispcount++;
		//	if(dispcount >= 3) {
			if(dispcount >= 6) {
				break;
			}
		}
		if( dispcount > 0 ){
			document.write( table_1 + table_2 + table_3 );
		}

//	}



}

//====================================================================================================================================================================================================

function ShowListings_skyscraper( width , border_color , bg_color , title_color )
{
	var ad_html  = '';
	var ad_count = 0;
	var i=6;

//	if(window.location.search != '') {
	//	var table_1 = '<table border="0" cellpadding="0" cellspacing="0" width="90%" bgcolor="#e8ffd1" style="margin:15 0 15 0;"><tr><td height="5"></td></tr>';
	//	var table_2 = '<tr><td align="right" style="font-size: 12; color: #777777; padding:4 0 4 0">スポンサーサイト&nbsp;&nbsp;</td></tr>';
	//	var table_3 = '<tr><td height="5"></td></tr></table>';

		var ad = '';
		var dispcount = 0;
		var i = 6 + (dispcount * 6);
		while( i < zSr.length )
		{
			var descr    = zSr[i++];	// listing description
			var unused1  = zSr[i++];	// (ignore)
			var clickURL = zSr[i++];	// listing link
			var title    = zSr[i++];	// listing title
			var sitehost = zSr[i++];	// advertiserfs domain name
			var unused2  = zSr[i++];	// (ignore)
			ad
				+=	'<tr><td valign="center" style="padding:5 4 5 7;">'
				+			'<a href="' + clickURL + '"' + ' class="otblocklink_search_right" target="_blank" rel="nofollow">'
				+				'<span class="ottitle_search_right">' + title    + '</span><br />'
				+				'<span class="otsent_search_right">'  + descr    + '</span><br />'
				+				'<span class="othost_search_right">'  + sitehost + '</span>'
				+			'</a>'
				+	'</td></tr>';
			dispcount++;
			if(dispcount >= 6) {
				break;
			}
		}
		if( dispcount > 0 )
		{
			var ad_html =
				'<center>'
			+	'<table cellpadding="0" cellspacing="0" align="center" width="'+ width +'" style="margin:10px auto 0px auto; padding:0; border-style:solid; border-width:1px; border-color:'+ border_color +'; background-color:'+ bg_color +';">'
			+		'<tr><td align="left" style="padding:5px 7px 5px 0px; color:'+ title_color +'; background-color:'+ border_color +'; font-weight:bold; font-size:13px; text-align:right;">スポンサーサイト</td></tr>'
			+		'<tr>'
			+			'<td>'
			+				'<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">'
			+					ad
			+				'</table>'
			+			'</td>'
			+		'</tr>'
			+	'</table>'
			+	'</center>';
			document.write( ad_html );
		}
//	}
}


//====================================================================================================================================================================================================

function ShowListings_ctgy_bgcolor( x , cnt , bgcolor_class , img_disp_flag )
{
	var ad_html   = '';
	var dispcount = 0;
	var i         = 6 + (x * 6);
	var _rand_    = new String(Math.random());
	var ovtid     = 'ov_cm_thumbnail_' + _rand_.replace(/\./,'');
	var thumbs    = new Array();

	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

	//	ad_html
	//		+=	'<div class="overture_listing_bgcolor_'+ bgcolor_class +'">'
	//		+		'<p style="text-decoration:none; text-align:left; margin: 0px 0px 0px 10px;">'
	//		+			'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
	//		+				'<span style="line-height:26px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span>'
	//		+				'<span style="line-height:14px; color:#008000; text-decoration:none;      margin:0px 0px 0px 0px;">' + sitehost + '</span><br />'
	//		+				'<span style="line-height:14px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
	//		+			'</a>'
	//		+		'</p>'
	//		+	'</div>';

		var _s = sitehost;
		_s = _s.replace( /\/$/  , ''  );
		_s = _s.replace( /\//g  , '.' );
		_s = encodeURIComponent(_s);

		var _t = new Object();
		_t.sitehost      = sitehost;
		_t.click_url     = clickURL;
		_t.thumbnail_id  = ovtid + dispcount;
		_t.thumbnail_url = '/site_thumbnails/otss/' + _s + '.jpg';

		thumbs[dispcount] = _t;

		var class_name = (dispcount % 2 == 1) ? '' : 'class="overture_listing_bgcolor_'+bgcolor_class+'"' ;

		if( img_disp_flag == 'ON' )
		{
			ad_html
				+=	'<p style="text-decoration:none; text-align:left; margin: 0px 0px 10px 0px;">'
				+		'<table cellspacing="0" cellpadding="0" border="0" width="100%" '+ class_name +' style="margin:0px 0px 0px 5px;">'
				+			'<tr>'
				+				'<td style="text-align:center; vertical-align:middle; width:64px; padding:0;" id="'+ _t.thumbnail_id +'"><!-- --></td>'
				+				'<td style="text-align:left;   vertical-align:middle; padding:0px 0px 0px 10px;">'
				+					'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
				+						'<span style="line-height:26px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span><br />'
				+						'<span style="line-height:14px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
				+						'<span style="line-height:14px; color:#c0c0c0; text-decoration:none;      margin:0px 0px 0px 10px; font-weight:bold;">' + sitehost + '</span>'
				+					'</a>'
				+				'</td>'
				+			'</tr>'
				+		'</table>'
				+	'</p>'
				;
		}
		else
		{
			ad_html
				+=	'<div '+ class_name +'">'
				+		'<p style="text-decoration:none; text-align:left; margin: 0px 0px 0px 10px;">'
				+			'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
				+				'<span style="line-height:26px; font-size:14px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span><br />'
				+				'<span style="line-height:14px; font-size:12px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
				+				'<span style="line-height:14px; font-size:12px; color:#008000; text-decoration:none;      margin:0px 0px 0px 0px;">' + sitehost + '</span>'
				+			'</a>'
				+		'</p>'
				+	'</div>'
				;
		}

		dispcount++;
		if( dispcount >= cnt ){ break; }
		if( dispcount >= 3   ){ break; }
	}

	if( dispcount > 0 )
	{
		document.write(
				'<div  style="margin:0px 0px 10px 0px; padding:0px 0px 5px 0px;">'
			+		'<div>'
			+			ad_html
			+		'</div>'
			+	'</div>'
		);

		if( img_disp_flag == 'ON' )
		{
			for( var i=0 , x=0 ; i<dispcount ; i++ )
			{
				var myAjax = new Ajax.Request(
					thumbs[x].thumbnail_url
					,
					{
						method: 'get'
						,
						on200: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						on304: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						onFailure: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '';
							x++;
						}
					}
				);
			}
		}
	}
}


//====================================================================================================================================================================================================

function ShowListings_ctgy_bgcolor_2( x , cnt , bgcolor_class , type )
{
	var ad_html   = '';
	var dispcount = 0;
	var i         = 6 + (x * 6);
	var _rand_    = new String(Math.random());
	var ovtid     = 'ov_cm_thumbnail_' + _rand_.replace(/\./,'');
	var thumbs    = new Array();

	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)


		var _s = sitehost;
		_s = _s.replace( /\/$/  , ''  );
		_s = _s.replace( /\//g  , '.' );
		_s = encodeURIComponent(_s);

		var _t = new Object();
		_t.sitehost      = sitehost;
		_t.click_url     = clickURL;
		_t.thumbnail_id  = ovtid + dispcount;
		_t.thumbnail_url = '/site_thumbnails/otss/' + _s + '.jpg';

		thumbs[dispcount] = _t;

		var class_name   = (dispcount % 2 == 1) ?  ''   : 'class="overture_listing_bgcolor_' + bgcolor_class + '"' ;
		var class_name_2 = (dispcount % 2 == 1) ? "''" :        "'overture_listing_bgcolor_" + bgcolor_class + "'" ;

		if( type == 'TYPE1' )
		{
			ad_html
				+=		'<tr onmouseover="javascript:overture_cm_onmouseover(this);" onmouseout="javascript:overture_cm_onmouseout(this,'+class_name_2+');">'
				+			'<td ' + class_name + ' id="'+ _t.thumbnail_id +'"><!-- --></td>'
				+			'<td colspan="5" '+ class_name +'>'
				+				'<a href="' + clickURL + '" target="_blank" rel="nofollow" class="sponsor_link">'
				+					title + '<br />' + descr
				+				'</a>'
				+			'</td>'
				+		'</tr>'
				;
		}
		else if( type == 'TYPE2' )
		{
			ad_html
				+=		'<tr onmouseover="javascript:overture_cm_onmouseover(this);" onmouseout="javascript:overture_cm_onmouseout(this,'+class_name_2+');">'
				+			'<td ' + class_name + '><img src="/image/cam.gif" /></td>'
				+			'<td colspan="5" '+ class_name +'>'
				+				'<a href="' + clickURL + '" target="_blank" rel="nofollow" class="sponsor_link">'
				+					title + '<br />' + descr
				+				'</a>'
				+			'</td>'
				+		'</tr>'
				;
		}
		else if( type == 'TYPE3' )
		{
			ad_html
				+=	'<table style="float:left; width:160px; margin:5px;" border="0" cellspacing="0" cellpadding="0" onmouseover="javascript:overture_cm_onmouseover(this);" onmouseout="javascript:overture_cm_onmouseout(this,'+class_name_2+');">'
				+		'<tr>'
				+			'<td style="text-align:center; vertical-align:middle; width:64px; padding:0;" id="'+ _t.thumbnail_id +'"><!-- --></td>'
				+		'</tr>'
				+		'<tr>'
				+			'<td '+ class_name +'>'
				+				'<a href="' + clickURL + '" target="_blank" rel="nofollow" class="sponsor_link">'
				+					title + '<br />' + descr
				+				'</a>'
				+			'</td>'
				+		'</tr>'
				+	'</table>'
				;
		}
		else
		{
			exit;
		}

		dispcount++;
		if( dispcount >= cnt ){ break; }
	}

	if( dispcount > 0 )
	{
		document.write(ad_html);

		if( type != 'TYPE2' )
		{
			for( var i=0 , x=0 ; i<dispcount ; i++ )
			{
				var myAjax = new Ajax.Request(
					thumbs[x].thumbnail_url
					,
					{
						method: 'get'
						,
						on200: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow" class="sponsor_link"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						on304: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow" class="sponsor_link"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						onFailure: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '';
							x++;
						}
					}
				);
			}
		}
	}
}

//====================================================================================================================================================================================================

function ShowListings_search_bgcolor( x , cnt , bgcolor_class , img_disp_flag )
{
	var ad_html   = '';
	var dispcount = 0;
	var i         = 6 + (x * 6);
	var _rand_    = new String(Math.random());
	var ovtid     = 'ov_cm_thumbnail_' + _rand_.replace(/\./,'');
	var thumbs    = new Array();

	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

	//	ad_html
	//		+=	'<div class="overture_listing_bgcolor_'+ bgcolor_class +'">'
	//		+		'<p style="text-decoration:none; text-align:left; margin: 0px 0px 0px 10px;">'
	//		+			'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
	//		+				'<span style="line-height:26px; font-size:14px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span>'
	//		+				'<span style="line-height:14px; font-size:12px; color:#008000; text-decoration:none;      margin:0px 0px 0px 0px;">' + sitehost + '</span><br />'
	//		+				'<span style="line-height:14px; font-size:12px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
	//		+			'</a>'
	//		+		'</p>'
	//		+	'</div>';

		var _s = sitehost;
		_s = _s.replace( /\/$/  , ''  );
		_s = _s.replace( /\//g  , '.' );
		_s = encodeURIComponent(_s);

		var _t = new Object();
		_t.sitehost      = sitehost;
		_t.click_url     = clickURL;
		_t.thumbnail_id  = ovtid + dispcount;
		_t.thumbnail_url = '/site_thumbnails/otss/' + _s + '.jpg';

		thumbs[dispcount] = _t;

		var class_name =  (dispcount % 2 == 0) ? ' class="overture_listing_bgcolor_' + bgcolor_class + '"' : '' ;

		if( img_disp_flag == 'ON' )
		{
			ad_html
				+=		'<table cellspacing="0" cellpadding="0" border="0" width="100%" '+ class_name +'>'
				+			'<tr>'
				+				'<td style="text-align:center; vertical-align:middle; width:55px; height:55px; padding:0;" id="'+ _t.thumbnail_id +'"><!-- --></td>'
				+				'<td style="text-align:left;   vertical-align:middle; padding:0px 0px 0px 10px;">'
				+					'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
				+						'<span style="line-height:26px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span><br />'
				+						'<span style="line-height:14px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
				+						'<span style="line-height:14px; color:#c0c0c0; text-decoration:none;      margin:0px 0px 0px 10px; font-weight:bold;">' + sitehost + '</span>'
				+					'</a>'
				+				'</td>'
				+			'</tr>'
				+		'</table>'
				;
		}
		else
		{
			ad_html
				+=	'<div '+ class_name +'">'
				+		'<p style="text-decoration:none; text-align:left; margin: 0px 0px 0px 0px;">'
				+			'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
				+				'<span style="line-height:26px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span><br />'
				+				'<span style="line-height:14px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
				+				'<span style="line-height:14px; color:#c0c0c0; text-decoration:none;      margin:0px 0px 0px 10px; font-weight:bold;">' + sitehost + '</span>'
				+			'</a>'
				+		'</p>'
				+	'</div>'
				;
		}

		dispcount++;
		if( dispcount >= cnt ){ break; }
		if( dispcount >= 3   ){ break; }
	}

	if( dispcount > 0 )
	{
		document.write(
				'<div>'
			+		ad_html
			+	'</div>'
		);

		if( img_disp_flag == 'ON' )
		{
			for( var i=0 , x=0 ; i<dispcount ; i++ )
			{
				var myAjax = new Ajax.Request(
					thumbs[x].thumbnail_url
					,
					{
						method: 'get'
						,
						on200: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						on304: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						onFailure: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '';
							x++;
						}
					}
				);
			}
		}
	}
}

//====================================================================================================================================================================================================

function ShowListings_search_bgcolor_2( x , cnt , bgcolor_class , type )
{
	var ad_html   = '';
	var dispcount = 0;
	var i         = 6 + (x * 6);
	var _rand_    = new String(Math.random());
	var ovtid     = 'ov_cm_thumbnail_' + _rand_.replace(/\./,'');
	var thumbs    = new Array();

	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

		var _s = sitehost;
		_s = _s.replace( /\/$/  , ''  );
		_s = _s.replace( /\//g  , '.' );
		_s = encodeURIComponent(_s);

		var _t = new Object();
		_t.sitehost      = sitehost;
		_t.click_url     = clickURL;
		_t.thumbnail_id  = ovtid + dispcount;
		_t.thumbnail_url = '/site_thumbnails/otss/' + _s + '.jpg';

		thumbs[dispcount] = _t;

		var class_name   = (dispcount % 2 == 1) ?  ''  : ' class="overture_listing_bgcolor_' + bgcolor_class + '"' ;
		var class_name_2 = (dispcount % 2 == 1) ? "''" :        "'overture_listing_bgcolor_" + bgcolor_class + "'" ;

		if( type == 'TYPE1' )
		{
			ad_html
				+=		'<tr' + class_name + ' onmouseover="javascript:overture_cm_onmouseover(this);" onmouseout="javascript:overture_cm_onmouseout(this,'+class_name_2+');">'
				+			'<td style="text-align:center; vertical-align:middle; width:55px; height:55px; padding:0;" id="'+ _t.thumbnail_id +'"><!-- --></td>'
				+			'<td colspan="5"' + class_name + '>'
				+				'<a href="' + clickURL + '" target="_blank" rel="nofollow" class="sponsor_link">'
				+					title + '<br />' + descr
				+				'</a>'
				+			'</td>'
				+		'</tr>'
				;
		}
		else if( type == 'TYPE2' )
		{
			ad_html
				+=		'<tr' + class_name + ' onmouseover="javascript:overture_cm_onmouseover(this);" onmouseout="javascript:overture_cm_onmouseout(this,'+class_name_2+');">'
				+			'<td><img src="/image/cam.gif" /></td>'
				+			'<td colspan="5"' + class_name + '>'
				+				'<a href="' + clickURL + '" target="_blank" rel="nofollow" class="sponsor_link">'
				+					title + '<br />' + descr
				+				'</a>'
				+			'</td>'
				+		'</tr>'
				;
		}
		else if( type == 'TYPE3' )
		{
			ad_html
				+=	'<div style="float:left; text-align:center; vertical-align:middle;">'
				+		'<table cellspacing="0" cellpadding="0" border="0" style="margin:5px; width:220px; text-align:center; vertical-align:middle;" class="sponsor" onmouseover="javascript:overture_cm_onmouseover(this);" onmouseout="javascript:overture_cm_onmouseout(this,'+class_name_2+');">'
				+			'<tr' + class_name + '>'
				+				'<td id="'+ _t.thumbnail_id +'">'
				+					'&nbsp;'
				+				'</td>'
				+			'</tr>'
				+			'<tr' + class_name + '>'
				+				'<td align="center">'
				+					'<a href="' + clickURL + '" target="_blank" rel="nofollow" class="sponsor_link">'
				+						title + '<br />' + descr
				+					'</a>'
				+				'</td>'
				+			'</tr>'
				+		'</table>'
				+	'</div>'
				;
		}
		else
		{
			exit;
		}

		dispcount++;
		if( dispcount >= cnt ){ break; }
		if( dispcount >= 3   ){ break; }
	}

	if( dispcount > 0 )
	{
		document.write(ad_html);

		if( type != 'TYPE2' )
		{
			for( var i=0 , x=0 ; i<dispcount ; i++ )
			{
				var myAjax = new Ajax.Request(
					thumbs[x].thumbnail_url
					,
					{
						method: 'get'
						,
						on200: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px; margin:5px;"></a>';
							x++;
						} ,
						on304: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px; margin:5px;"></a>';
							x++;
						} ,
						onFailure: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '';
							x++;
						}
					}
				);
			}
		}
	}
}

//====================================================================================================================================================================================================

function ShowListings_ctgy(x)
{
	var table_1 = '<table border="0" cellpadding="0" cellspacing="0" width="99%" align="center"><tr><td height="5"></td></tr>';
	var table_2 = '<tr><td height="2"></td></tr><tr><td align="right" style="font-size: 12; color: #777777;">スポンサーサイト&nbsp;&nbsp;</td></tr>';
	var table_3 = '<tr><td height="5"></td></tr></table>';

	var dispcount = 0;
	var i = 6 + (x * 6);
	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

		table_2
			+=	'<tr><td valien="center">'
			+		'<P style="text-decoration: none; bgcolor="#e8ffd1">'
			+			'<a href="' + clickURL + '"' + ' class="otblocklink_2" target="_blank" rel="nofollow">'
			+				'<span class="ottitle_2">' + title    + '</span>&nbsp;&nbsp;'
			+				'<span class="othost_2">'  + sitehost + '</span><br />'
			+				'<span class="otsent_2">'  + descr    + '</span>'
			+			'</a>'
			+		'</p>'
			+	'</td></tr>'
			+	'<tr><td height="1"></td></tr>'

		dispcount++;
		if( dispcount >= 3){break;}
	}

	if( dispcount > 0 ){
		table_2 = '<tr><td valien="center"><table border="0" width="100%" bgcolor="#e8ffd1"><tr><td><table border="0" bgcolor="#e8ffd1" width="100%">'+ table_2 +'</table></td></tr></table></td></tr>';
	//	table_2 = '<tr><td valien="center"><table border="0" width="100%"><tr><td><table border="0" width="100%">'+ table_2 +'</table></td></tr></table></td></tr>';
		document.write( table_1 + table_2 + table_3 );
	}
}

//====================================================================================================================================================================================================

function ShowListings_vote(x)
{
	var table_1 = '<table border="0" cellpadding="0" cellspacing="0" width="99%" align="center"><tr><td height="20"></td></tr>';
	var table_2 = '<tr><td align="right" style="font-size: 12; color: #777777;">スポンサーサイト&nbsp;&nbsp;</td></tr>';
	var table_3 = '<tr><td height="10"></td></tr></table>';

	var dispcount = 0;
	var i = 6 + (x * 6);
	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)
		table_2
			+=	'<tr><td valien="center">'
		//	+		'<P style="text-decoration: none; bgcolor="#e8ffd1">'
			+			'<a href="' + clickURL + '"' + ' class="otblocklink_2" target="_blank" rel="nofollow">'
			+				'<span class="ottitle_2">' + title    + '</span>&nbsp;&nbsp;'
			+				'<span class="otsent_2">'  + descr    + '</span>&nbsp;&nbsp;'
			+				'<span class="othost_2">'  + sitehost + '</span>'
			+			'</a>'
		//	+		'</p>'
			+	'</td></tr>'
			+	'<tr><td height="1"></td></tr>'
		dispcount++;
		break;
	}

	if( dispcount > 0 ){
		table_2 = '<tr><td valien="center"><table border="0" width="100%" bgcolor="#e8ffd1"><tr><td><table border="0" bgcolor="#e8ffd1" width="100%">'+ table_2 +'</table></td></tr></table></td></tr>';
		document.write( table_1 + table_2 + table_3 );
	}
}

//====================================================================================================================================================================================================

function ShowListings_bbs(x)
{
	var table_1 = '<table border="0" cellpadding="0" cellspacing="0" width="99%" align="center"><tr><td height="20"></td></tr>';
	var table_2 = '<tr><td align="right" style="font-size: 12; color: #777777;">スポンサーサイト&nbsp;&nbsp;</td></tr>';
	var table_3 = '<tr><td height="10"></td></tr></table>';

	var dispcount = 0;
	var i = 6 + (x * 6);
	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)
		table_2
			+=	'<tr><td valien="center">'
		//	+		'<P style="text-decoration: none; bgcolor="#e8ffd1">'
			+			'<a href="' + clickURL + '"' + ' class="otblocklink_2" target="_blank" rel="nofollow">'
			+				'<span class="ottitle_2">【PR】' + title    + '</span>&nbsp;&nbsp;'
			+				'<span class="otsent_2">'  + descr    + '</span>&nbsp;&nbsp;'
			+				'<span class="othost_2">'  + sitehost + '</span>'
			+			'</a>'
		//	+		'</p>'
			+	'</td></tr>'
			+	'<tr><td height="1"></td></tr>'
		dispcount++;
		break;
	}

	if( dispcount > 0 ){
		table_2 = '<tr><td valien="center"><table border="0" width="100%" bgcolor="#e8ffd1"><tr><td><table border="0" bgcolor="#e8ffd1" width="100%">'+ table_2 +'</table></td></tr></table></td></tr>';
		document.write( table_1 + table_2 + table_3 );
	}
}

//====================================================================================================================================================================================================

function ShowListings_detail_bgcolor( x , cnt , bgcolor_class , img_disp_flag )
{
	var ad_html   = '';
	var dispcount = 0;
	var i         = 6 + (x * 6);
	var _rand_    = new String(Math.random());
	var ovtid     = 'ov_cm_thumbnail_' + _rand_.replace(/\./,'');
	var thumbs    = new Array();

	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

	//	ad_html
	//		+=	'<div class="overture_listing_bgcolor_'+ bgcolor_class +'">'
	//		+		'<p style="text-decoration:none; text-align:left; margin: 0px 0px 0px 10px;">'
	//		+			'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
	//		+				'<span style="line-height:26px; font-size:14px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span>'
	//		+				'<span style="line-height:14px; font-size:12px; color:#008000; text-decoration:none;      margin:0px 0px 0px 0px;">' + sitehost + '</span><br />'
	//		+				'<span style="line-height:14px; font-size:12px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
	//		+			'</a>'
	//		+		'</p>'
	//		+	'</div>';

		var _s = sitehost;
		_s = _s.replace( /\/$/  , ''  );
		_s = _s.replace( /\//g  , '.' );
		_s = encodeURIComponent(_s);

		var _t = new Object();
		_t.sitehost      = sitehost;
		_t.click_url     = clickURL;
		_t.thumbnail_id  = ovtid + dispcount;
		_t.thumbnail_url = '/site_thumbnails/otss/' + _s + '.jpg';

		thumbs[dispcount] = _t;

		if( img_disp_flag == 'ON' )
		{
			ad_html
				+=	'<p style="text-decoration:none; text-align:left; margin: 0px 0px 10px 0px;">'
				+		'<table cellspacing="0" cellpadding="0" border="0" width="100%" class="overture_listing_bgcolor_'+bgcolor_class+'" style="margin:0px 0px 0px 5px;">'
				+			'<tr>'
				+				'<td style="text-align:center; vertical-align:middle; width:64px; padding:0;" id="'+ _t.thumbnail_id +'"><!-- --></td>'
				+				'<td style="text-align:left;   vertical-align:middle; padding:0px 0px 0px 10px;">'
				+					'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:underline;" target="_blank" rel="nofollow">'
				+						title	+ '<br />' +	descr
//				+						'<span style="line-height:26px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span><br />'
//				+						'<span style="line-height:14px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
//				+						'<span style="line-height:14px; color:#c0c0c0; text-decoration:none;      margin:0px 0px 0px 10px; font-weight:bold;">' + sitehost + '</span>'
				+					'</a>'
				+				'</td>'
				+			'</tr>'
				+		'</table>'
				+	'</p>'
				;
		}
		else
		{
			ad_html
				+=	'<div class="overture_listing_bgcolor_'+ bgcolor_class +'">'
				+		'<p style="text-decoration:none; text-align:left; margin: 0px 0px 0px 10px;">'
				+			'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
				+				title	+ '<br />' +	descr
//				+				'<span style="line-height:26px; font-size:14px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span><br />'
//				+				'<span style="line-height:14px; font-size:12px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
//				+				'<span style="line-height:14px; font-size:12px; color:#008000; text-decoration:none;      margin:0px 0px 0px 0px;">' + sitehost + '</span>'
				+			'</a>'
				+		'</p>'
				+	'</div>'
				;
		}

		dispcount++;
		if( dispcount >= cnt ){ break; }
		if( dispcount >= 3   ){ break; }
	}

	if( dispcount > 0 )
	{
		document.write(
				'<div class="overture_listing_bgcolor_'+ bgcolor_class +'" style="margin:0px 0px 10px 0px; padding:0px 0px 5px 0px;">'
			+		'<div class="overture_listing_bgcolor_'+ bgcolor_class +'" style="text-align:right; margin:4px 10px 4px 0px; padding:0px 0px 0px 0px; font-size:14px">スポンサーサイト</div>'
			+		'<div class="overture_listing_bgcolor_'+ bgcolor_class +'">'
			+			ad_html
			+		'</div>'
			+	'</div>'
		);

		if( img_disp_flag == 'ON' )
		{
			for( var i=0 , x=0 ; i<dispcount ; i++ )
			{
				var myAjax = new Ajax.Request(
					thumbs[x].thumbnail_url
					,
					{
						method: 'get'
						,
						on200: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:64px; height:48px;"></a>';
							x++;
						} ,
						on304: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:64px; height:48px;"></a>';
							x++;
						} ,
						onFailure: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '';
							x++;
						}
					}
				);
			}
		}
	}
}

//====================================================================================================================================================================================================

function ShowListings_detail_2( x , cnt , bgcolor_class , img_disp_flag )
{
	var ad_html   = '';
	var dispcount = 0;
	var i         = 6 + (x * 6);
	var _rand_    = new String(Math.random());
	var ovtid     = 'ov_cm_thumbnail_' + _rand_.replace(/\./,'');
	var thumbs    = new Array();


	var ad_count_max = ((zSr.length - i - 6) / 6) + 1;
	var width        = 10;

	if (ad_count_max < cnt) {
		width = Math.floor(100 / ad_count_max);
	} else {
		width = Math.floor(100 / cnt);
	}

	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

		var _s = sitehost;
		_s = _s.replace( /\/$/  , ''  );
		_s = _s.replace( /\//g  , '.' );
		_s = encodeURIComponent(_s);

		var _t = new Object();
		_t.sitehost      = sitehost;
		_t.click_url     = clickURL;
		_t.thumbnail_id  = ovtid + dispcount;
		_t.thumbnail_url = '/site_thumbnails/otss/' + _s + '.jpg';

		thumbs[dispcount] = _t;

		if( img_disp_flag == 'ON' )
		{
			ad_html
				+=	'<td width="'+ width +'%" align="center" valign="top">'
				+		'<div id="'+ _t.thumbnail_id +'" height="48"></div><br />'
				+		'<a href="' + clickURL + '"' + ' style="display:block; margin:0px; padding:0px; text-decoration:none;" target="_blank" rel="nofollow">'
				+		'<span align="center" style="width:100%; text-align:center; text-decoration:underline; color:#0000ff; font-size:14px; line-height:16px;">' + title    + '</span><br />'
				+		'<span align="center" style="width:100%; text-align:center; text-decoration:none;      color:#000000; font-size:12px; line-height:14px;">' + descr    + '</span><br />'
				+		'<span align="center" style="width:100%; text-align:center; text-decoration:none;      color:#008000; font-size:12px; line-height:18px;">' + sitehost + '</span><br />'
				+		'</a>'
				+	'</td>'
			;
		}

		dispcount++;
		if( dispcount >= cnt ){ break; }
		if( dispcount >= 5   ){ break; }
	}

	if( dispcount > 0 )
	{
		document.write(
				'<div class="overture_listing_bgcolor_'+ bgcolor_class +'">'
			+	'<table border="0" cellpadding="0" cellspacing="0" width="100%">'
			+		'<tr align=right">'
			+			'<td align="right" style="font-size:14px; text-align:right;">'
			+				'スポンサーサイト'
			+			'</td>'
			+		'</tr>'
			+		'<tr><td align="center"><table border="0" cellpadding="0" cellspacing="0"><tr>'+ ad_html +'</tr></table></td></tr>'
			+	'</table>'
			+	'</div>'
			+	'<br />'
		);

		if( img_disp_flag == 'ON' )
		{
			for( var i=0 , x=0 ; i<dispcount ; i++ )
			{
				var myAjax = new Ajax.Request(
					thumbs[x].thumbnail_url
					,
					{
						method: 'get'
						,
						on200: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:64px; height:48px;"></a>';
							x++;
						} ,
						on304: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:64px; height:48px;"></a>';
							x++;
						} ,
						onFailure: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '';
							x++;
						}
					}
				);
			}
		}
	}
}

//====================================================================================================================================================================================================



//====================================================================================================================================================================================================

function ShowListings_square_200x200( )
{
	var x   = 0;
	var cnt = 1;

	var ad_html   = '';
	var dispcount = 0;
	var i         = 6 + (x * 6);
	var _rand_    = new String(Math.random());
	var ovtid     = 'ov_cm_thumbnail_' + _rand_.replace(/\./,'');
	var thumbs    = new Array();

	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

		var _s = sitehost;
		_s = _s.replace( /\/$/  , ''  );
		_s = _s.replace( /\//g  , '.' );
		_s = encodeURIComponent(_s);

		var _t = new Object();
		_t.sitehost      = sitehost;
		_t.click_url     = clickURL;
		_t.thumbnail_id  = ovtid + dispcount;
		_t.thumbnail_url = '/site_thumbnails/otss/' + _s + '.jpg';

		thumbs[dispcount] = _t;

		ad_html
			+=	'<table cellspacing="0" cellpadding="0" border="0" width="200px" height="200px" style="margin-top:5px; margin-bottom:5px; text-align:center; vertical-align:middle; background-color:#f7ffef;">'
			+		'<tr><td id="'+ _t.thumbnail_id +'"> </td></tr>'
			+		'<tr><td>'
			+			'<table cellspacing="0" cellpadding="0" border="0" width="100%">'
			+				'<tr><td style="text-align:center; vertical-align:middle; width:64px; padding:0;" id="'+ _t.thumbnail_id +'"><!-- --></td></tr>'
			+				'<tr>'
			+					'<td style="text-align:center; vertical-align:middle; padding:0px 0px 0px 10px;">'
			+						'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
			+							'<span style="line-height:26px; font-size:14px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span><br />'
			+							'<span style="line-height:14px; font-size:12px; color:#008000; text-decoration:none;      margin:0px 0px 0px 0px;">' + sitehost + '</span><br />'
			+							'<span style="line-height:14px; font-size:12px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
			+						'</a>'
			+					'</td>'
			+				'</tr>'
			+			'</table>'
			+		'</td></tr>'
			+	'</table>'
			;

		dispcount++;
		if( dispcount >= cnt ){ break; }
		if( dispcount >= 3   ){ break; }
	}

	if( dispcount > 0 )
	{
		document.write(ad_html);


		for( var i=0 , x=0 ; i<dispcount ; i++ )
		{
			var myAjax = new Ajax.Request(
				thumbs[x].thumbnail_url
				,
				{
					method: 'get'
					,
					on200: function( ){
						document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:80px; height:80px;"></a>';
						x++;
					} ,
					on304: function( ){
						document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:80px; height:80px;"></a>';
						x++;
					} ,
					onFailure: function( ){
						document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '';
						x++;
					}
				}
			);
		}
	}
}


//====================================================================================================================================================================================================


function ShowListings_aucview_bgcolor( x , cnt , bgcolor_class , img_disp_flag )
{
	var ad_html   = '';
	var dispcount = 0;
	var i         = 6 + (x * 6);
	var _rand_    = new String(Math.random());
	var ovtid     = 'ov_cm_thumbnail_' + _rand_.replace(/\./,'');
	var thumbs    = new Array();

	var colorflag = 0;

	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

		var _s = sitehost;
		_s = _s.replace( /\/$/  , ''  );
		_s = _s.replace( /\//g  , '.' );
		_s = encodeURIComponent(_s);

		var _t = new Object();
		_t.sitehost      = sitehost;
		_t.click_url     = clickURL;
		_t.thumbnail_id  = ovtid + dispcount;
		_t.thumbnail_url = '/site_thumbnails/otss/' + _s + '.jpg';

		thumbs[dispcount] = _t;

		if( img_disp_flag == 'ON' )
		{
			ad_html
				+=	'<p style="text-decoration:none; text-align:left; margin: 0px 0px 10px 0px;">';

			if(colorflag > 0) {
				ad_html
				+=		'<table cellspacing="0" cellpadding="0" border="0" width="100%" class="overture_listing_bgcolor_none" style="margin:0px 0px 0px 5px;">';
				colorflag = 0;
			} else {
				ad_html
				+=		'<table cellspacing="0" cellpadding="0" border="0" width="100%" class="overture_listing_bgcolor_'+bgcolor_class+'" style="margin:0px 0px 0px 5px;">';
				colorflag = 1;
			}

			ad_html
				+=			'<tr>'
				+				'<td style="text-align:center; vertical-align:middle; width:64px; padding:0;" id="'+ _t.thumbnail_id +'"><!-- --></td>'
				+				'<td style="text-align:left;   vertical-align:middle; padding:0px 0px 0px 10px;">'
				+					'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
				+						'<span style="line-height:26px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span>'
				+						'<span style="line-height:14px; color:#008000; text-decoration:none;      margin:0px 0px 0px 10px; font-weight:bold;">' + sitehost + '</span><br />'
				+						'<span style="line-height:14px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
				+					'</a>'
				+				'</td>'
				+			'</tr>'
				+		'</table>'
				+	'</p>'
				;
		}
		else
		{
			ad_html
				+=	'<div class="overture_listing_bgcolor_'+ bgcolor_class +'">'
				+		'<p style="text-decoration:none; text-align:left; margin: 0px 0px 0px 10px;">'
				+			'<a href="' + clickURL + '"' + ' style="display:block; width:100%; text-decoration:none;" target="_blank" rel="nofollow">'
				+				title	+ '<br />' +	descr
//				+				'<span style="line-height:26px; font-size:14px; color:#0000ff; text-decoration:underline; margin:0px 0px 0px 0px;">' + title    + '</span><br />'
//				+				'<span style="line-height:14px; font-size:12px; color:#000000; text-decoration:none;      margin:0px 0px 0px 0px;">' + descr    + '</span>'
				+				'<span style="line-height:14px; font-size:12px; color:#008000; text-decoration:none;      margin:0px 0px 0px 0px;">' + sitehost + '</span>'
				+			'</a>'
				+		'</p>'
				+	'</div>'
				;
		}

		dispcount++;
		if( dispcount >= cnt ){ break; }
		if( dispcount >= 3   ){ break; }
	}

	if( dispcount > 0 )
	{

//'<div class="overture_listing_bgcolor_'+ bgcolor_class +'" style="margin:0px 0px 10px 0px; padding:0px 0px 5px 0px;">'

		document.write(
				'<div style="margin:0px 0px 10px 0px; padding:0px 5px 5px 0px;">'
//			+		'<div class="overture_listing_bgcolor_'+ bgcolor_class +'" style="text-align:right; margin:4px 10px 4px 0px; padding:0px 0px 0px 0px; font-size:14px">スポンサーサイト</div>'
//			+		'<div class="overture_listing_bgcolor_'+ bgcolor_class +'">'
			+		'<div class="overture_listing_bgcolor_box">'
			+			ad_html
			+		'</div>'
			+	'</div>'
		);

		if( img_disp_flag == 'ON' )
		{
			for( var i=0 , x=0 ; i<dispcount ; i++ )
			{
				var myAjax = new Ajax.Request(
					thumbs[x].thumbnail_url
					,
					{
						method: 'get'
						,
						on200: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						on304: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						onFailure: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '';
							x++;
						}
					}
				);
			}
		}
	}
}
//====================================================================================================================================================================================================


//====================================================================================================================================================================================================
function ShowListings_aucview( x , cnt , bgcolor_class , img_disp_flag )
{
	var ad_html   = '';
	var dispcount = 0;
	var i         = 6 + (x * 6);
	var _rand_    = new String(Math.random());
	var ovtid     = 'ov_cm_thumbnail_' + _rand_.replace(/\./,'');
	var thumbs    = new Array();

	var colorflag = 0;

	// Aucfan Premium

	if(colorflag > 0) {
		ad_html
		+=		'<table class="overture_listing_bgcolor_none" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin: 0px 0px 0px 5px;"><tbody><tr>';
		colorflag = 0;
	} else {
		ad_html
		+=		'<table class="overture_listing_bgcolor_'+bgcolor_class+'" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin: 0px 0px 0px 5px;">';
		colorflag = 1;
	}

	ad_html
		+=	'<tbody><tr>'
		+	'<td id="ov_cm_thumbnail_aucfan" style="padding: 0pt; text-align: center; vertical-align: middle; width: 64px;"><a rel="nofollow" target="_blank" style="display: block; width: 100%; text-decoration: none;" href="http://aucfan.com/ad_cs?id=2269"><img src="/img/ovt_aucfan_thumbnail_50x50.gif" /></a></td>'
		+	'<td style="padding: 0px 0px 0px 10px; text-align: left; vertical-align: middle;">'
		+	'<a rel="nofollow" target="_blank" style="display: block; width: 100%; text-decoration: none;" href="http://aucfan.com/ad_cs?id=2269">'
		+	'<span class="listing_title">オークションで、相場より安く買い、高く売る秘訣はこちらから</span>'
		+	'<span style="margin: 0px 0px 0px 10px; line-height: 14px; color: rgb(0, 128, 0); text-decoration: none; font-weight: bold;">aucfan.com/navi/premium</span><br/>'
		+	'<span style="margin: 0px; line-height: 14px; color: rgb(0, 0, 0); text-decoration: none;">なんと8,000円分の商品をもれなく無料プレゼント！先着1,000名限定。</span>'
		+	'</a>'
		+	'</td></tr></tbody></table>';



	while( i < zSr.length )
	{
		var descr    = zSr[i++];	// listing description
		var unused1  = zSr[i++];	// (ignore)
		var clickURL = zSr[i++];	// listing link
		var title    = zSr[i++];	// listing title
		var sitehost = zSr[i++];	// advertiserfs domain name
		var unused2  = zSr[i++];	// (ignore)

		var _s = sitehost;
		_s = _s.replace( /\/$/  , ''  );
		_s = _s.replace( /\//g  , '.' );
		_s = encodeURIComponent(_s);

		var _t = new Object();
		_t.sitehost      = sitehost;
		_t.click_url     = clickURL;
		_t.thumbnail_id  = ovtid + dispcount;
		_t.thumbnail_url = '/site_thumbnails/otss/' + _s + '.jpg';

		thumbs[dispcount] = _t;

		if( img_disp_flag == 'ON' )
		{
			if(colorflag > 0) {
				ad_html
				+=		'<table class="overture_listing_bgcolor_none" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin: 0px 0px 0px 5px;"><tbody><tr>';
				colorflag = 0;
			} else {
				ad_html
				+=		'<table class="overture_listing_bgcolor_'+bgcolor_class+'" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin: 0px 0px 0px 5px;">';
				colorflag = 1;
			}

			ad_html
				+=			'<td id="'+ _t.thumbnail_id +'" style="padding: 0pt; text-align: center; vertical-align: middle; width: 64px;"><!-- --></td>'
				+			'<td style="padding: 0px 0px 0px 10px; text-align: left; vertical-align: middle;">'

				+			'<a rel="nofollow" target="_blank" style="display: block; width: 100%; text-decoration: none;" href="' + clickURL + '">'

				+			'<span class="listing_title">' + title + '</span>'

				+			'<span style="margin: 0px 0px 0px 10px; line-height: 14px; color: rgb(0, 128, 0); text-decoration: none; font-weight: bold;">' + sitehost + '</span><br/>'

				+			'<span style="margin: 0px; line-height: 14px; color: rgb(0, 0, 0); text-decoration: none;">' + descr + '</span>'

				+			'</a>'
				+	'</td></tr></tbody></table>'
				;
		}
		else
		{
			ad_html
				+=	'<ul class="sponsor">';

			if(colorflag > 0) {
				ad_html
				+=		'<li class="sponsor_odd_none">';
				colorflag = 0;
			} else {
				ad_html
				+=		'<li class="sponsor_odd_'+bgcolor_class+'">';
				colorflag = 1;
			}

			ad_html
				+=			'<a href="' + clickURL + '"' + ' target="_blank" rel="nofollow">'
//				+			'<span style="text-align:center; vertical-align:middle; width:64px; padding:0;" id="'+ _t.thumbnail_id +'"><!-- --></span>'
				+			'<span><strong style="text-decoration:underline;">' + title + '</strong>'
				+			'<em>' + sitehost + '</em><br />'
				+			descr + '</span>'
				+			'</a>'
				+		'</li>'
				+	'</ul>'
				;
		}

		dispcount++;

		if( dispcount >= cnt ){ break; }

	}



	if( dispcount > 0 )
	{

		document.write(
				'<div style="margin:10px 5px 5px 0px; padding:0px 5px 5px 0px;">'
			+		ad_html
			+	'</div>'
		);

		if( img_disp_flag == 'ON' )
		{
			for( var i=0 , x=0 ; i<dispcount ; i++ )
			{
				var myAjax = new Ajax.Request(
					thumbs[x].thumbnail_url
					,
					{
						method: 'get'
						,
						on200: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						on304: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '<a href="'+ thumbs[x].click_url +'" target="_blank" rel="nofollow"><img src="'+ thumbs[x].thumbnail_url +'" border="0" style="width:50px; height:50px;"></a>';
							x++;
						} ,
						onFailure: function( ){
							document.getElementById( thumbs[x].thumbnail_id ).innerHTML = '';
							x++;
						}
					}
				);
			}
		}
	}
}
//====================================================================================================================================================================================================









function overture_cm_style_change (obj,fontSize,fontWeigh) {
	obj.style.fontSize   = fontSize;
	obj.style.fontWeight = fontWeigh;
}

function overture_cm_onmouseover (obj) {
	obj.className = 'sponsor_onmouseover';
}

function overture_cm_onmouseout (obj,class_name) {
	obj.className = class_name;
}

