function getRatImg(rank) {
	 var bkgIMG = "img/banana.gif";
	 var bkgIMGT = "img/banana2.gif";
	 var wiIMG = 12;
	 var heIMG = 18;
	 var wiTB = wiIMG * rank;
	 var wiTBT = wiIMG * 5;
	 var out = "<table width='" + wiTBT + "' height='" + heIMG + "' background='" + bkgIMGT +"' cellpadding='0' cellspacing='0'>";
	 out = out + "<tr><td><table width='" + wiTB +"' height='" + heIMG +"' background= '" + bkgIMG + "' cellpadding='0' cellspacing='0'>";
	 out = out + "<tr><td></td></tr></table></td></tr></table>";
	 return out;
}

function getBanana(v)
{
	var d = v -  Math.floor(v);
	if(d > .4){
		return "banana_" + Math.floor(v) + "5" 
	} 
	else{
		return "banana_" + Math.floor(v) + "0" 
	}
}
function InformationVideo(theVideoViewTO, i){
	
	var background='';
		if(i % 2){
			backgroud = '/cl.shigaru.view.img.videolibrary/bkg_sea_odd680.gif';
		}
		else{
			backgroud = '/cl.shigaru.view.img.videolibrary/bkg_sea_even680.gif';
		}
	if(os == 'quick'){
		st = $('#txtsearch').val();	
	}
	else{
		st = $('#txtsongtitle').val();
	}

	var theParameter = "?vid=" + theVideoViewTO.id + "&os=" + os + "&qso=" + qso + "&io=" + io + "&la=" + la + "&go=" + go + "&lo=" + lo + "&st=" + st + "&pp=" + thePagination_page + "&vep=" + items_per_page;
	var newcontent = '';
 var tutor =theVideoViewTO.tutor; //.replace(/'/gi,"");

  
  //tutor = tutor.replace(/"/gi,"");
 var title = theVideoViewTO.title;//.replace(/'/gi,"");
//title = title.replace(/"/gi,"");


newcontent += '<table width="680px" height="110px" border="0" cellpadding="0" cellspacing="0" background="' + backgroud + '">';
newcontent += '  <tr>';
newcontent += '    <td  align="center" valign="middle"><table width="670" border="0" cellspacing="0" cellpadding="0">';
newcontent += '      <tr>';
newcontent += '        <td align="left" width="60" height="30" class="seatit Negro">&nbsp;Plays:';
newcontent += '          <table width="65" border="0" cellpadding="1" cellspacing="0" class="tabres">';
newcontent += '              <tr>';
newcontent += '                <td class="seatex">' + theVideoViewTO.visitCount + '</td>';
newcontent += '              </tr>';
newcontent += '            </table>';
newcontent += '          </td>';
newcontent += '        <td width="510" rowspan="3"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">';
newcontent += '            <tr>';
newcontent += '              <td width="100%" align="left"><table width="100%" height="80" border="0" cellpadding="2" cellspacing="0" class="seatit">';
newcontent += '                <tr bgcolor="#FFFFFF">';
newcontent += '                  <td colspan="5" align="right" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="seatit">';
newcontent += '                      <tr bgcolor="#FFFFFF">';
newcontent += '                        <td align="rigth"  valign="top" width="80" nowrap="nowrap"><label class="search">Video Title:</label></td>';
newcontent += '                        <td align="left"  class="seatex">&nbsp;' + theVideoViewTO.title +  '</td>';
newcontent += '                      </tr>';
newcontent += '                      <tr bgcolor="#FFFFFF">';
newcontent += '                        <td align="left"  valign="top" width="80"nowrap="nowrap"><label class="search">Shigaru Tutor:</label></td>';
newcontent += '                        <td align="left" class="seatex">&nbsp;'  + theVideoViewTO.tutor +  '</td>';
newcontent += '                      </tr>';
newcontent += '                  </table></td>';
newcontent += '                </tr>';
newcontent += '                <tr>';
newcontent += '                  <td height="1" colspan="5" bgcolor="#CCCCCC"></td>';
newcontent += '                </tr>';
newcontent += '                <tr>';
newcontent += '                  <td width="20%" bgcolor="#FFFFFF">Instrument:<br /></td>';
newcontent += '                  <td width="20%" bgcolor="#FFFFFF">Genre:<br /></td>';
newcontent += '                  <td width="20%" bgcolor="#FFFFFF">Level:<br /></td>';
newcontent += '                  <td width="20%" bgcolor="#FFFFFF">Language:<br /></td>';
newcontent += '                  <td width="20%" rowspan="2" align="center" bgcolor="#FFFFFF">';
newcontent += "	<a href='../shigaru2.php" + theParameter + "'><img src='../cl.shigaru.view.img.videolibrary/bt_view.gif' border='0' width='66' height='28' /></a>";
newcontent += '</td>';
newcontent += '                </tr>';
newcontent += '                <tr class="seatex">';
newcontent += '                  <td bgcolor="#FFFFFF">' + theVideoViewTO.instrument + '</td>';
newcontent += '                  <td bgcolor="#FFFFFF">' + theVideoViewTO.genre + '</td>';
newcontent += '                  <td bgcolor="#FFFFFF">' + theVideoViewTO.videoLevel + '</td>';
newcontent += '                  <td bgcolor="#FFFFFF">' + theVideoViewTO.language + '</td>';
newcontent += '                </tr>';
newcontent += '              </table></td>';
newcontent += '            </tr>';
newcontent += '        </table></td>';
newcontent += '		<td width="100" align="right" valign="middle" rowspan="3">';
newcontent += "<a id='btnshowvideo'  href='../shigaru2.php" + theParameter + "'>";
newcontent += "<img src='../img_res.php?vid=" + theVideoViewTO.id + "&w=95&h=70' width='95' height='70' border='0' /></a></td>";
newcontent += '		</td>';
newcontent += '      </tr>';
newcontent += '      <tr>';
newcontent += '        <td align="left" class="seatit Negro" height="40">&nbsp;Ratings:' + theVideoViewTO.ratiocount;
newcontent += '            <table width="60" border="0" cellpadding="1" cellspacing="0" class="tabres">';
newcontent += '              <tr>';
//newcontent += '                <td class="seatex"><div  id="banana_' + parseInt(theVideoViewTO.ratio) + '"></div></td>';
//newcontent += '                <td class="seatex">' + getRatImg(theVideoViewTO.ratio) + '</td>';
newcontent += '                <td class="seatex"><div  id="' + getBanana(theVideoViewTO.ratio) + '"></div></td>';
newcontent += '              </tr>';
newcontent += '          </table></td>';
newcontent += '      </tr>';
newcontent += '          <tr>';
newcontent += '	     	<td align="right" width="70" height="20" class="seatit Negro">&nbsp;Comments:';
newcontent += '	     	 	<table width="30" border="0" cellpadding="1" cellspacing="0" class="tabres">';
newcontent += '             	 <tr>';
newcontent += '               		 <td class="seatex">' + theVideoViewTO.commentsCount + '</td>';
newcontent += '                </tr>';
newcontent += '          </table>';
newcontent += '		      </td>	';
newcontent += '     		 </tr>';      
newcontent += '    </table></td>';
newcontent += '  </tr>';
newcontent += '</table><br/>';
return newcontent
}