if(typeof(ownserver) == "undefined") {
ownserver = "http://aff-jp.dxlive.com";
}

function openAppWindow(url, name, width, height, wincfg) {
var screenx = (screen.width - 880) / 2;
	if(!wincfg) wincfg = 'top=0, left='+screenx+' resizable=yes, toolbar=no, scrollbars=0, personalbar=no, menubar=no, width='+width+', height='+height;
	var w = window.open(url,name,wincfg);
	w.focus();
}

Performers.prototype.list= function(perLine, popUrl, popName, popWidth, popHeight, howMany, keepOrder, imgType, type ) {
var url = popUrl;
var wname = popName;
with (this) {
if (length) {
document.writeln('<TR>');
var count=1;
var keys = new Array();
var i = 0;
for (var perf in performers) {
keys[i++] = perf;
}
keys.sort(randomizeOrder);
for(i = 0; i < keys.length; i++) {
if(howMany && i >= howMany) break;
var linebreak=((count%perLine)==0);
var k = keys[i];
with (performers[k]) {
if(popUrl.indexOf('?') == -1) url = popUrl + "?"+username;
if(popName == '') wname = username;
document.writeln('<td width="135"><a name="'+count+'"></a>');

		if(public_performers.getPerformer(username)) {
		if (viewers >2) {
        document.writeln('<table width="135" height="160" border="0" cellpadding="0" cellspacing="0" background="http://www.lipsgirl.com/images/listbb.gif" class="list_name">');
        document.writeln('<tr><td height="5"></td></tr>');
        document.writeln('<tr><td>');
		document.writeln('<img src="' + ownserver + '/images/icons/icon_public.gif" alt="チャット中" border="0">');
        document.writeln('</td></tr>');
        }
        else {
        document.writeln('<table width="135" height="160" border="0" cellpadding="0" cellspacing="0" background="http://www.lipsgirl.com/images/listc.gif" class="list_name">');
        document.writeln('<tr><td height="5"></td></tr>');
        document.writeln('<tr><td>');
		document.writeln('<img src="' + ownserver + '/images/icons/icon_public.gif" alt="チャット中" border="0">');
        document.writeln('</td></tr>');
        }
        }
		else if(private_performers.getPerformer(username)) {
        document.writeln('<table width="135" height="160" border="0" cellpadding="0" cellspacing="0" background="http://www.lipsgirl.com/images/listf.gif" class="list_name">');
        document.writeln('<tr><td height="5"></td></tr>');
        document.writeln('<tr><td>');
		document.writeln('<img src="' + ownserver + '/images/icons/icon_private.gif" alt="２ショット" border="0">');
        document.writeln('</td></tr>');
        }
        else {
        document.writeln('<table width="135" height="160" border="0" cellpadding="0" cellspacing="0" background="http://www.lipsgirl.com/images/liste.gif" class="list_name">');
        document.writeln('<tr><td height="5"></td></tr>');
        document.writeln('<tr><td>');
        document.writeln('<img src="' + ownserver + '/images/icons/icon_free.gif" alt="待機中" border="0">');
        document.writeln('</td></tr>');
       }


        document.writeln('<tr><td align=center>');
        var flower = (getAtt('new') == '1');
        if(flower){
        document.writeln('<A href="javascript:;" onClick="openAppWindow(\''+url+'\',\''+wname+'\','+popWidth+','+popHeight+')">');
        document.writeln('<IMG src="http://www.lipsgirl.com/images/newgirl.jpg" alt="'+username+'" border="0" width="120" height="90"></a>');
        }
        else{
        document.writeln('<A href="javascript:;" onClick="openAppWindow(\''+url+'\',\''+wname+'\','+popWidth+','+popHeight+')">');
        document.writeln('<IMG src="http://aff-images.dxlive.com'+getAttValueByAttName(''+imgType+'')+'" alt="'+username+'" border="0" width="120" height="90"></a>');
        }
        document.writeln('</td></tr>');
        document.writeln('<tr><td height="20">');
        document.writeln('<A href="javascript:;" onClick="openAppWindow(\''+url+'\',\''+wname+'\','+popWidth+','+popHeight+')">'+username+'</a>');
        document.writeln('</td></tr>');
        document.writeln('<tr>');
        var cam = (getAtt('has_hires') == '1');
        var rec = (getAtt('recommended') == '1');
	    var mic = (getAtt('has_mic') == '1');
        var flower = (getAtt('new') == '1');
        var toy = (getAtt('has_remote_toy') == '1');
        document.writeln('<td align="center"><table height="20" border="0" cellpadding="0" cellspacing="0">');
        document.writeln('<tr><td>');
        if(toy) {
        document.write('<img src="' + ownserver + '/images/icons/icon_toy_shake.gif" alt="リモートバイブ対応">');
		document.writeln('</td><td>');
        }
        if(cam) {
        document.writeln('<img src="' + ownserver + '/images/icons/icon_HD.gif" alt="HD-ハイビジョン高画質">');
        document.writeln('</td><td>');
        }
        if(flower) {
        document.writeln('<img src="' + ownserver + '/images/icons/icon_newgirl.gif" alt="新人">');
        document.writeln('</td><td>');
        }
        if(mic) {
        document.writeln('<img src="' + ownserver + '/images/icons/icon_sound.gif" alt="マイク有り">');
        document.writeln('</td><td>');
        }
        if(rec) {
        document.writeln('&nbsp;');
        document.writeln('</td><td>');
        }
		if(!flower && !cam && !mic && !rec) {
		document.writeln('&nbsp;');
        document.writeln('</td><td>');
        }
		if(viewers > 0) {
        document.writeln('<span class="num">' + viewers + '</span>');
        }
		document.writeln('</td><td width="20">');
        document.writeln('&nbsp;');
		document.writeln('</td>');
		document.writeln('</tr></table></td></tr>');
     	document.writeln('</table>'); 
        }
    	if (linebreak) document.writeln('<TR>');
    	count++; 
        }
        }
 	 	else {
  	    document.writeln('<TR><TD align="center" class="performers_offline"><img src="' + ownserver + '/images/no_performers.gif"></TD>'); 
		} 
	    } 
        }	
