﻿// JScript File


function AddPairedDiamondRow(CurrProduct)
{
	    var LeftStone=CurrProduct.LeftStone;
	    var RightStone=CurrProduct.RightStone;
	    
	    var DiamondPair=AddDPRow(LeftStone,RightStone);
	   
	    
       return DiamondPair;
}

function AddDPRow(LeftStone,RightStone)
{
    var RowString="<tr height='43'>";
     
    RowString+=AppendDPCells(LeftStone,RightStone);
    RowString+="</tr>";
   
   return RowString;
 }
 
 function AppendDPCells(LeftStone,RightStone)
 {
    var Cell1String="<td align='center' width='74' height='43'><span class='welcome' >"+LeftStone.Shape+"<br>"+RightStone.Shape+"</span></td>"
    var Cell2String="<td align='center' width='64' height='43'><span class='welcome' >"+LeftStone.Carat+"<br>"+RightStone.Carat+"</span></td>"
    var Cell3String="<td align='center' width='64' height='43'><span class='welcome' >"+LeftStone.Color+"<br>"+RightStone.Color+"</span></td>"
    var Cell4String="<td align='center' width='66' height='43'><span class='welcome' >"+LeftStone.Clarity+"<br>"+RightStone.Clarity+"</span></td>"
    var Cell5String="<td align='center' width='69' height='43'><span class='welcome' >"+LeftStone.Cut+"<br>"+RightStone.Cut+"</span></td>"
    var Cell6String="<td align='center' width='66' height='43'><span class='welcome' >"+LeftStone.Report+"<br>"+RightStone.Report+"</span></td>"
    var Cell7String="<td align='center' width='81' height='43'><span class='welcome' >"+LeftStone.Symmetry+"<br>"+RightStone.Symmetry+"</span></td>"
    var Cell8String="<td align='center' width='66' height='43'><span class='welcome' >"+LeftStone.Price+"<br>"+RightStone.Price+"</span></td>"
    var CellCompareString="<td align='center' width='66' height='43'><input align='center' type='checkbox' productid='"+LeftStone.ProductID+"' name='compareBox' value='checkboxValue' onclick='UpdateComparisonList(this,"+RightStone.ProductID+");'></td>"
  
  var HREF="";
  if(document.location.toString().toLowerCase().indexOf("earrings")>-1)
       HREF="p-"+LeftStone.ProductID+"-"+LeftStone.Name+".aspx?earrings=true&rs_pid="+RightStone.ProductID+"&byr=true&Metal="+Metal+"&Style="+Style;
  else
    HREF="p-"+LeftStone.ProductID+"-"+LeftStone.Name+".aspx?rs_pid="+RightStone.ProductID+"&byr=true";
   
  var Cell9String="<td align='center' width='25' height='43'><img src='skins/skin_1/images/icon_view.gif' alt='' height='14' width='18' border='0'><span class='welcome'><a href='"+HREF+"' id='"+LeftStone.Name+"'><u>View</u></a></span></td>";
	 
	return Cell1String+Cell2String+Cell3String+Cell4String+Cell5String+Cell6String+Cell7String+Cell8String+CellCompareString+Cell9String;

 }
 

 

       /*<tr height="43">
							<td align="center" width="74" height="43"><input type="checkbox" name="checkboxName" value="checkboxValue"></td>
							<td align="center" width="74" height="43"><span class="welcome">7.27<br>
									8.22</span></td>
							<td align="center" width="64" height="43"><span class="welcome">J</span></td>
							<td align="center" width="73" height="43"><span class="welcome">VS2<br>
									VS1</span></td>
							<td align="center" width="69" height="43"><span class="welcome">Ideal<br>
									Very Good</span></td>
							<td align="center" width="74" height="43"><span class="welcome">GIA<br>
									EGL<br>
								</span></td>
							<td align="center" width="81" height="43"><span class="welcome">VG/EX<br>
									GF/GH</span></td>
							<td align="center" width="76" height="43"><span class="welcome">$105,432<br>
									$99.2000</span></td>
							<td align="center" height="43"><img src="skins/skin_1/images/icon_view.gif" alt="" height="14" width="18" border="0"><span class="welcome"><a href="(EmptyReference!)"><u>View</u></a></span></td>
						</tr>
						<tr>
							<td align="center"></td>
							<td colspan="8" align="center"><img src="skins/skin_1/images/lightdot.gif" alt="" height="1" width="100%" border="0"></td>
						</tr>
						
					
					-->*/
					
					
					
					
	
	     			/*	 <!--
					<table width="654" border="0" cellspacing="0" cellpadding="0" height="293">
						<tr bgcolor="#445ca2" height="24">
							<td align="center" width="74" height="24">
								<table width="66" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="15"><img src="skins/skin_1/images/sortarrow_up.gif" alt="" height="8" width="15" border="0"></td>
										<td rowspan="2" width="51"><span class="wite">Compare</span></td>
									</tr>
									<tr>
										<td width="15"><img src="skins/skin_1/images/sortarrow_down.gif" alt="" height="7" width="15" border="0"></td>
									</tr>
								</table>
							</td>
							<td align="center" width="74" height="24"><span class="wite">
									<table width="62" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_up.gif" alt="" height="8" width="15" border="0"></td>
											<td rowspan="2" align="center" width="47"><span class="wite">Carats</span></td>
										</tr>
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_down.gif" alt="" height="7" width="15" border="0"></td>
										</tr>
									</table>
								</span></td>
							<td align="center" width="64" height="24"><span class="wite">
									<table width="54" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_up.gif" alt="" height="8" width="15" border="0"></td>
											<td rowspan="2" align="center" width="39"><span class="wite">Color</span></td>
										</tr>
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_down.gif" alt="" height="7" width="15" border="0"></td>
										</tr>
									</table>
								</span></td>
							<td align="center" width="73" height="24"><span class="wite">
									<table width="66" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_up.gif" alt="" height="8" width="15" border="0"></td>
											<td rowspan="2" align="center" width="51"><span class="wite">Clarity</span></td>
										</tr>
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_down.gif" alt="" height="7" width="15" border="0"></td>
										</tr>
									</table>
								</span></td>
							<td align="center" width="69" height="24"><span class="wite">
									<table width="47" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_up.gif" alt="" height="8" width="15" border="0"></td>
											<td rowspan="2" align="center" width="32"><span class="wite">Cut</span></td>
										</tr>
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_down.gif" alt="" height="7" width="15" border="0"></td>
										</tr>
									</table>
								</span></td>
							<td align="center" width="74" height="24"><span class="wite">
									<table width="66" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_up.gif" alt="" height="8" width="15" border="0"></td>
											<td rowspan="2" width="51"><span class="wite">Report</span></td>
										</tr>
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_down.gif" alt="" height="7" width="15" border="0"></td>
										</tr>
									</table>
								</span></td>
							<td align="center" width="81" height="24">
								<table width="66" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="15"><img src="skins/skin_1/images/sortarrow_up.gif" alt="" height="8" width="15" border="0"></td>
										<td width="51"><span class="wite">Polish </span></td>
									</tr>
									<tr>
										<td width="15"><img src="skins/skin_1/images/sortarrow_down.gif" alt="" height="7" width="15" border="0"></td>
										<td width="51"><span class="wite">Symmerty</span></td>
									</tr>
								</table>
							</td>
							<td align="center" width="76" height="24"><span class="wite">
									<table width="66" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_up.gif" alt="" height="8" width="15" border="0"></td>
											<td rowspan="2" width="51"><span class="wite">Price</span></td>
										</tr>
										<tr>
											<td width="15"><img src="skins/skin_1/images/sortarrow_down.gif" alt="" height="7" width="15" border="0"></td>
										</tr>
									</table>
								</span></td>
							<td align="center" height="24"><span class="wite">Details</span></td>
						</tr>
						</table>
					<table width="658" border="0" cellspacing="2" cellpadding="0">
						<tr>
							<td><img src="skins/skin_1/images/compare.gif" alt="" height="35" width="150" border="0"></td>
						</tr>
					</table>*/
						
	