/* ---------------------------------------------------------------------
JavaScript for FITONE OFFICIAL WEB
FileName: artist_list.js
--------------------------------------------------------------------- */

// *** initialize
var prevObj;


// *** profile change
function profChange(artistProperty, targetObj){

	// initialize
	if(prevObj != undefined){
		prevObj.style.backgroundImage = 'url(img/list_bg.gif)';
	} else {
		prevObj = document.getElementById('defobj');
		prevObj.style.backgroundImage = 'url(img/list_bg.gif)';
	}
	var P = artistProperty;
	targetObj.style.backgroundImage = 'url(img/list_bg_on.gif)';

	// profile set
	var docSrc = '';
	docSrc += '<table cellspacing="0" cellpadding="0" class="body">'

		// photo
		docSrc += '<tr><th><img src="' + P.dir + 'img/profile_detail_01.jpg"';
		docSrc += ' alt="' + targetObj.firstChild.alt + '" width="220" height="315" /></th></tr>'

	docSrc += '<tr><td><table width="190" cellspacing="0" cellpadding="0" class="profile">';

		// name
		if(P.name != undefined){
			docSrc += '<tr><td colspan="3"><img src="../common/img/s.gif" width="1" height="13" /></td></tr>';
			docSrc += '<tr>';
			docSrc += '<th width="44" valign="top"><img src="img/txt_profile_name.gif" alt="NAME" /></th>';
			docSrc += '<td width="10" class="line"><img src="../common/img/s.gif" /></td>';
			docSrc += '<td width="135" class="name">' + P.name + '</td>';
			docSrc += '</tr>';
		}

		// birth
		if(P.birth != undefined){
			docSrc += '<tr><td colspan="3"><img src="../common/img/s.gif" width="1" height="13" /></td></tr>';
			docSrc += '<tr>';
			docSrc += '<th valign="top"><img src="img/txt_profile_birth.gif" alt="BIRTH" /></th>';
			docSrc += '<td class="line"><img src="../common/img/s.gif" /></td>';
			docSrc += '<td>' + P.birth + '</td>';
			docSrc += '</tr>';
		}

		// height
		if(P.height != undefined){
			docSrc += '<tr><td colspan="3"><img src="../common/img/s.gif" width="1" height="13" /></td></tr>';
			docSrc += '<tr>';
			docSrc += '<th valign="top"><img src="img/txt_profile_height.gif" alt="HEIGHT" /></th>';
			docSrc += '<td class="line"><img src="../common/img/s.gif" /></td>';
			docSrc += '<td>' + P.height + 'cm</td>';
			docSrc += '</tr>';
		}

		// size
		if(P.size != undefined){
			docSrc += '<tr><td colspan="3"><img src="../common/img/s.gif" width="1" height="13" /></td></tr>';
			docSrc += '<tr>';
			docSrc += '<th valign="top"><img src="img/txt_profile_size.gif" alt="SIZE" /></th>';
			docSrc += '<td class="line"><img src="../common/img/s.gif" /></td>';
			docSrc += '<td>' + P.size + '</td>';
			docSrc += '</tr>';
		}

		// foot
		if(P.foot != undefined){
			docSrc += '<tr><td colspan="3"><img src="../common/img/s.gif" width="1" height="13" /></td></tr>';
			docSrc += '<tr>';
			docSrc += '<th valign="top"><img src="img/txt_profile_foot.gif" alt="FOOT" /></th>';
			docSrc += '<td class="line"><img src="../common/img/s.gif" /></td>';
			docSrc += '<td>' + P.foot + 'cm</td>';
			docSrc += '</tr>';
		}

		// blood
		if(P.blood != undefined){
			docSrc += '<tr><td colspan="3"><img src="../common/img/s.gif" width="1" height="13" /></td></tr>';
			docSrc += '<tr>';
			docSrc += '<th valign="top"><img src="img/txt_profile_blood.gif" alt="BLOOD" /></th>';
			docSrc += '<td class="line"><img src="../common/img/s.gif" /></td>';
			docSrc += '<td>' + P.blood + '</td>';
			docSrc += '</tr>';
		}

		// from
		if(P.from != undefined){
			docSrc += '<tr><td colspan="3"><img src="../common/img/s.gif" width="1" height="13" /></td></tr>';
			docSrc += '<tr>';
			docSrc += '<th valign="top"><img src="img/txt_profile_from.gif" alt="FROM" /></th>';
			docSrc += '<td class="line"><img src="../common/img/s.gif" /></td>';
			docSrc += '<td>' + P.from + '</td>';
			docSrc += '</tr>';
		}

		// link
		docSrc += '<tr><td colspan="3"><img src="../common/img/s.gif" width="1" height="18" /></td></tr>';
		docSrc += '<tr>';
		docSrc += '<td colspan="3" align="right"><a href="' + targetObj.href + '"';
		if(targetObj.target != '' && targetObj.target != undefined) docSrc += ' target="' + targetObj.target + '"';
		docSrc += '>';
		docSrc += '<img src="img/list_more.gif" alt="→ MORE INFO"';
		docSrc += ' onmouseover="imgChange(this);" onmouseout="imgChange(this);"';
		docSrc += ' /></a></td></tr>';
		docSrc += '<tr><td colspan="3"><img src="../common/img/s.gif" width="1" height="20" /></td></tr></table>';

	docSrc += '</td></tr></table>';
	docSrc += '<div class="bottom"><img src="img/left_detail_bg_bottom.gif" /></div>';

	document.getElementById('move_detail').innerHTML = docSrc;

	prevObj = targetObj;
}


