<div style="display: none; position: absolute; top: 70px;" id="preview_div"></div>
<?
$user_id=$_SESSION[userid];
$datecheck=date("Y-m-d H:i:s");
$feature_sql_m="select * from auction_details where status='Active' and selling_method='11' and picture1!='' and (expire_date > '$datecheck') order by expire_date limit 0,10 ";
	$feature_res_m=mysql_query($feature_sql_m);
	$tot_count2=mysql_num_rows($feature_res_m);
	$count=0;
	if($tot_count2 > 0)
	{
	 ?>
	
	<table width="980" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_l.gif></td>
<td class="tdhead_main" width="98%" height="24" valign="middle">&nbsp;<B>Scratch Auctions</b></td>
<td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_r.gif></td></tr>
	</table>
<table border="0" cellpadding="0" cellspacing="0" style="padding-left:0px;padding-right:0px;" width=980 class="ft_right"><tr><td align="center" valign="top">
<BR><?

//	require 'cats.php';
?>
</td><td>
<table border="0" align="center" cellpadding="0" cellspacing="0" width=980 style="padding-left:0px;padding-right:0px;">
    <?
$l=1;
$i=1;
while($feature_row_m=mysql_fetch_array($feature_res_m))
{
$i=$feature_row_m['productid'];
$sale_price=$feature_row_m['currency'];
	?>
<? if(($l==1)||($l==6))
{
echo "<tr>";
}
?>
	<td valign=middle align="center">
	<table align="center" valign="middle" cellpadding=5 cellspacing=2 style="background:url(templates/<? echo "$tfold" ?>/img_files/prod.gif) no-repeat center;">
	<tr><td valign="top" width="180" height="298" align="center" valign="middle">
<?
$imgsize = $feature_row_m['picture1'];
list($widths, $heights, $types, $attrs) = getimagesize("uploads/$imgsize");
if($feature_row_m['picture2']==""){
$feature_row_m['picture2']=$feature_row_m['picture1'];
}
	               $img=$feature_row_m['picture2'];
				   list($width, $height, $type, $attr) = getimagesize("uploads/$img");
				   $h=$height;
				   $w=$width;
				   if($h>80)	
				   {
				   $nh=80;
				   $nw=($w/$h)*$nh;
				   $h=$nh;
				   $w=$nw;
				   }
				  if($w>100)
				  {
				  $nw=100;
				  $nh=($h/$w)*$nw;
				  $h=$nh;
				  $w=$nw;
				  }
$w=round($w);	
	?>
<script type="text/javascript">
<!-- hide from non JavaScript Browsers
Image<?=$i?>= new Image;
Image<?=$i?>.src = "uploads/<? echo $feature_row_m['picture1']; ?>"
// End Hiding -->
</script>
	<table height="49" border="0" cellpadding=0 cellspacing=0>
		<tr>
		<td align="center" height="12" ><BR><font color="#4a4a4a">
<B>Retail: <? echo Trim($sale_price); ?><?=$feature_row_m['or_price']?></b></font></td>
		</tr>
		<tr>
<td align="center" height="35" style="padding-right:5px;padding-left:5px;padding-top:5px;padding-bottom:5px;">

<a href="itechd.php?productid=<? echo $feature_row_m['productid']; ?>">
	<? echo $feature_row_m['producttitle'];?></a>
</td></tr><tr><td align="center">
		
		<table border="0" cellpadding="0" cellspacing="0" width=65 height=65 bordercolor="#000000">
		<tr valign="top">
		<td align="center" bgcolor="#ffffff">

	<a onmouseover="showtrail('uploads/<? echo $feature_row_m['picture1']; ?>','',<?=$widths?>,<?=$heights?>)" onmouseout="hidetrail()" href="itechd.php?productid=<? echo $feature_row_m['productid']; ?>">
	 <img src="uploads/<? echo $feature_row_m['picture2']; ?>" width=<?= $w; ?> height=<?=$h?> border=0>
	</a>

<?
$expiry_date = $feature_row_m['expire_date'];
$min_bid_amount=$feature_row_m['min_bid_amount'];
$bidincrement=$feature_row_m['bidincrement'];

?>
<?
$bidnow=$_SESSION[userid];
?>
<?
$expire_date = $feature_row_m['expire_date']; 
$date2=strtotime($expire_date);
$date2 = date("d-m-Y H:i:s",$date2); 
$dateTo = $date2;
$date1 = mktime(date("H"),date("i"),date("s"),date("n"),date("j"),date("Y"));
$dateToElements = split(' ', $dateTo);
$dateToDateElements = split('-', $dateToElements[0]);
$dateToTimeElements = split(':', $dateToElements[1]); 
$date2 = mktime($dateToTimeElements[0], $dateToTimeElements[1], $dateToTimeElements[2], $dateToDateElements[1], $dateToDateElements[0], $dateToDateElements[2]); 
$difference = $date2 - $date1;
?>
<div id="futu<?=$feature_row_m['productid'];?>" style="display:none;"><?=$difference?></div>
<div id="futu_m<?=$feature_row_m['productid'];?>" style="display:none;"><?=$difference?></div>
<div id="totb_m<?=$feature_row_m['productid'];?>" style="display:none;"><?=$feature_row_m['totbid'];?></div>	     
<div id="pause_m<?=$i;?>" style="display:none;">no</div>
<div id="pause<?=$i;?>" style="display:none;">no</div>
	</td>
		</tr>
		</table>
		</td>
		</tr>
		<tr>
<td valign=top align="center"><BR>
<div style="border:0px; padding:0px; font-weight:bold; color:teal; font-size:14px;">
<span style="border:0px; padding:0px; font-weight:bold; color:teal; font-size:14px;" id="Amt_m<?=$i?>">
??????</span>
<div id="Bid<?=$feature_row_m['productid'];?>" style="font-size:16px; font-weight:bold;">
<b>--|--|--|--</b>
</div><BR>
<div id="But_m<?=$i?>">
<?if(empty($_SESSION[userid])) { ?>
<a name= "link1" href="signin.php" style="text-decoration:none;">
<img NAME = "IMG<?=$i?>" src=templates/<?=$tfold?>/img_files/bidnow.png border="0"></a>
<? } ?>
<?if(!empty($_SESSION[userid])) { ?>
<a name= "link1" href="javascript:bidnowMystery(<?=$feature_row_m['productid']?>,<?=$bidnow?>)" style="text-decoration:none;">
<img NAME = "IMG<?=$i?>" src=templates/<?=$tfold?>/img_files/bidnow.png border="0"></a>
<? } ?>
</div><div id="buy_wait<?=$feature_row_m['productid']?>" style="display:none; font-weight:bold; color:teal; font-size:10px;">
Buy Before <span style="border:0px; padding:0px; font-weight:bold; color:teal; font-size:14px;" id="buy_timer<?=$i?>">
</span> Second(s)<BR>
<form action=reviewitechds.php method=post style=MARGIN:0px;>
<input type=hidden name=productid value="<?=$feature_row_m['productid'];?>">
<input type=hidden name=recycle value=yes>
<input type=image src="templates/<?=$tfold?>/img_files/buy_now.png">
</form>
</div>
</td>
		</tr>
		</table>	</td></tr>
	</table></td>
<?
$l++;
 if(($l==1)||($l==6))
{
echo "<tr>";
$l=1;
}
$allpro2 = $feature_row_m['productid'];
$allpro1 = "$allpro2";
if($allpro!=""){
$allpro = "$allpro1|$allpro";
}
if($allpro==""){
$allpro = "$allpro1";
}
?>
	<?
	}
	?>
</table></td></tr></table>
	<table width="980" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/t_bot_l.gif></td>
<td class="tdbot_main" width="98%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/t_bot_r.gif></td></tr>
	</table>
	<?
	}
	?><?
	if($tot_count > 0)
	{ 
if($user_id==""){
$put_user=0;
}
else
{
$put_user="$user_id";
}
?>
<SCRIPT LANGUAGE='javascript'>countdown('<?=$allpro?>')</SCRIPT>
<SCRIPT LANGUAGE='javascript'>setTimeout("GetUpdate('<?=$allpro?>','<?=$put_user?>',0)",2000);</SCRIPT>
<? } ?>