function check()
{
if(rand1 == rand2)
{
rand2=Math.floor(Math.random() * items1.length);
check();
}
else
{
return;
}
}

function check2()
{
if(rand3 == rand1 || rand3 == rand2)
{
rand3=Math.floor(Math.random() * items1.length);
check2();
}
else
{
return;
}
}

var tableWidth=830;
var eyWidth=(tableWidth/3)-60;
var items1=items.split("*");

var rand1=Math.floor(Math.random() * items1.length);
var rand2=Math.floor(Math.random() * items1.length);
check();
var rand3=Math.floor(Math.random() * items1.length);
check2();


var items2=items1[rand1].split("|");

$(".ey-related-items").append("<br><br><table class=ey-cross-table align=center width="+tableWidth+"><tr class=ey-cross-tr></tr></table>");

$(".ey-cross-tr").append("<td width="+eyWidth+" id=EYCrossTD1><center><a class=item-link href="+items2[0]+".html><img style='margin-bottom: 5px;' src="+items2[3]+" alt='"+items2[2]+"' border=0></a><br><div class=name><a class=item-link href="+items2[0]+".html><b>"+items2[4]+"</b></a></div><div class=regPriceText>Regular Price: "+items2[1]+"</div><br><div class=salePriceText>Sale Price: </div><div class=salePriceNum>"+items2[2]+"</div></center></td>");

$("#EYCrossTD1").after("<td class=divider1 width=30><img src=http://unbeatablesales.com/lib/yhst-17755263465512/divider2.gif border=0></td>");

items2=items1[rand2].split("|");

$(".divider1").after("<td width="+eyWidth+" id=EYCrossTD2><center><a class=item-link href="+items2[0]+".html><img style='margin-bottom: 5px;' src="+items2[3]+" alt='"+items2[2]+"' border=0></a><br><div class=name><a class=item-link href="+items2[0]+".html><b>"+items2[4]+"</b></a></div><div class=regPriceText>Regular Price: "+items2[1]+"</div><br><div class=salePriceText>Sale Price: </div><div class=salePriceNum>"+items2[2]+"</div></center></td>");

$("#EYCrossTD2").after("<td class=divider2 width=30><img src=http://unbeatablesales.com/lib/yhst-17755263465512/divider2.gif border=0></td>");

items2=items1[rand3].split("|");

$(".divider2").after("<td width="+eyWidth+" id=EYCrossTD3><center><a class=item-link href="+items2[0]+".html><img style='margin-bottom: 5px;' src="+items2[3]+" alt='"+items2[2]+"' border=0></a><br><div class=name><a class=item-link href="+items2[0]+".html><b>"+items2[4]+"</b></a></div><div class=regPriceText>Regular Price: "+items2[1]+"</div><br><div class=salePriceText>Sale Price: </div><div class=salePriceNum>"+items2[2]+"</div></center></td>");
